query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Show the form for creating a new resource.
public function create() { return view('samples.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 é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(StoreSampleRequest $request) { $this->sampleService->storeData($request); return redirect()->route('samples.index') ->with('success','Sample created successfully.'); }
{ "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(Sample $sample) { $sample = $this->sampleService->get($sample); return view('samples.show', compact('sample')); }
{ "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(Sample $sample) { return view('samples.edit', compact('sample')); }
{ "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(UpdateSampleRequest $request, Sample $sample) { $this->sampleService->updateData($request, $sample); return redirect()->route('samples.index') ->with('success','Sample updated successfully'); }
{ "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(Sample $sample) { $this->sampleService->delete($sample); return redirect()->route('samples.index') ->with('success','Sample deleted successfully'); }
{ "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
Get event info by URI.
function GetEventByURI($uri_path = '') { if ( ! $uri_path) { return false; } $data = $this->db ->join('status', 'status.id_status = event.id_status', 'left') ->join('event_detail', 'event_detail.id_event = event.id_event', 'left') ->join('localization', 'localization.id_localization = event_detail.id_localization', 'left') ->where('is_delete', 0) ->where('publish_date <=', $this->date_now) ->where("(expire_date >= '{$this->date_now}' OR expire_date IS NULL || expire_date = '0000-00-00')") ->where("LCASE({$this->db->dbprefix('event')}.uri_path)", strtolower($uri_path)) ->where("LCASE({$this->db->dbprefix('status')}.status_text)", "publish") ->where("LCASE({$this->db->dbprefix('localization')}.iso_1)", $this->lang->get_active_uri_lang()) ->order_by('event.id_event', 'desc') ->limit(1) ->get('event') ->row_array(); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEvent();", "private function getEventByUri($uri, $calendarId){\n\n\t\t$joinCriteria = FindCriteria::newInstance()\n\t\t\t->addRawCondition('t.id', 'd.id');\n\t\t\n\t\t$whereCriteria = FindCriteria::newInstance()\n\t\t\t->addModel(DavEvent::model(),'d')\n\t\t\t->addCondition('calendar_id', $calendarId)\n\t\t\t->addCondition('uri', $uri,'=','d');\n\t\t\n\t\t$findParams = FindParams::newInstance()\n\t\t\t->single()\n\t\t\t->join(DavEvent::model()->tableName(),$joinCriteria, 'd')\n\t\t\t->criteria($whereCriteria);\n\t\t\n\t\treturn \\GO\\Calendar\\Model\\Event::model()->find($findParams);\n\t}", "public function getEvent()\n {\n // get event\n $this\n ->get('/event')\n ->assertStatus(200);\n }", "public function getEventDetail()\n {\n // get event detail\n $this\n ->get('/event/detail/'.$this->event->id)\n ->assertStatus(200);\n }", "public function get($uri);", "public function getEvent()\n {\n $headers = $this->getHeaders();\n return isset($headers['X-NE-Event']) ? $headers['X-NE-Event'] : null;\n }", "public function getEvent()\n {\n return $this->getData('event');\n }", "private function loadEvent()\n {\n $api_event = $this->product->getWebUrlApi() . \"segments?_sort=id&_order=desc&_start=0&_end=26&is_displayed=1\";\n $api_event = $this->httpClient->get($api_event);\n $api_event = json_decode($api_event->getRawBody(), true);\n return $api_event;\n }", "public static function get_event_basic_eid($eid) {\n\t\t\t// #1 default value\n\t\t\t$event = array(\n\t\t\t\t\t\t 'url' => '',\n\t\t\t\t\t\t 'image' => DefaultImage::Event. '_small.jpg',\n\t\t\t\t\t\t 'image_large' => DefaultImage::Event.'_large.jpg', \n\t\t\t\t\t\t 'alt' => '', \n\t\t\t\t\t\t 'title' => ''\n\t\t\t\t\t\t );\n\t\t\t\n\t\t\t// #2 get event basic info\n\t\t\t$mysqli = MysqlInterface::get_connection();\n\t\t\t$stmt = $mysqli->stmt_init();\n\t\t\t$stmt->prepare('SELECT logo, title FROM event WHERE eid=? LIMIT 1;');\n\t\t\t$stmt->bind_param('i', $eid);\n\t\t\t$stmt->execute();\n\t\t\t$result = $stmt->get_result();\n\t\t\tif ($row = $result->fetch_array(MYSQLI_ASSOC)) {\n\t\t\t\t$event['url'] = 'event?eid='.$eid;\n\t\t\t\tif (!empty($row['logo'])) \n\t\t\t\t{\n\t\t\t\t\t$event['image'] = $row['logo'].'_small.jpg';\n\t\t\t\t\t$event['image_large'] = $row['logo'].'_large.jpg';\n\t\t\t\t}\n\t\t\t\t$event['alt'] = strip_tags($row['title']);\n\t\t\t\t$event['title'] = strip_tags($row['title']);\n\t\t\t}\n\t\t\t$stmt->close();\n\t\t\treturn $event;\n\t\t}", "public function getURI();", "function detail_events($url)\n {\n $query = $this->db->query(\"SELECT * FROM tbl_events as a JOIN tbl_users as b ON a.user_id = b.id_user WHERE a.slug = '$url'\");\n\n if($query->num_rows() > 0)\n {\n return $query->row();\n }else\n {\n return NULL;\n }\n }", "public function getEvent($event_uri, $verbose = true)\n {\n $params = [];\n if ($verbose) {\n $params['verbose'] = 'yes';\n }\n\n $event_list = (array)json_decode($this->apiGet($event_uri, $params));\n if (isset($event_list['events']) && isset($event_list['events'][0])) {\n $event = new EventEntity($event_list['events'][0]);\n $this->eventDb->save($event);\n\n foreach ($event->getHosts() as $hostsInfo) {\n if (isset($hostsInfo->host_uri)) {\n $hostsInfo->username = $this->userApi->getUsername($hostsInfo->host_uri);\n $hostsInfo->entity = $this->userApi->getUser($hostsInfo->host_uri);\n }\n }\n return $event;\n }\n\n return false;\n }", "public function getEvent() {\n $request = $this->getRequest();\n\n if (request('type') == 'event_callback') {\n $event = $request['event'];\n } else {\n $event = $request;\n }\n\n return $event;\n }", "public function getEvent($name, $method = HTTP_METH_GET)\n {\n $url = '/events/' . $name . '.json';\n return $this->send($url, $method);\n }", "abstract public function getUri();", "public static function event() {\n return self::service()->get('events');\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent() {\n return $this->event;\n }", "public function getCollection($uri, array $queryParams = [])\n {\n $events = (array)json_decode($this->apiGet($uri, $queryParams));\n $meta = array_pop($events);\n\n $collectionData = [];\n foreach ($events['events'] as $item) {\n $event = new EventEntity($item);\n\n foreach ($event->getHosts() as $hostsInfo) {\n if (isset($hostsInfo->host_uri)) {\n $hostsInfo->username = $this->userApi->getUsername($hostsInfo->host_uri);\n }\n }\n\n $collectionData['events'][] = $event;\n\n // save the URL so we can look up by it\n $this->eventDb->save($event);\n }\n $collectionData['pagination'] = $meta;\n\n return $collectionData;\n }", "public function getEvent()\n {\n $event = array(\n \"eid\" => $this->eid,\n \"name\" => $this->name,\n \"venue\" => $this->venue,\n \"date\" => $this->date,\n \"time\" => $this->time,\n \"type\" => $this->type,\n \"status\" => $this->status\n );\n return $event;\n }", "public function getEvent($eventId)\n {\n $url = '/events/' . $eventId;\n\n $response = $this->request($url);\n\n $dataWrapper = $this->contentHandler->getEventDataWrapper($response);\n\n return $dataWrapper->getData()->get(0);\n }", "protected function getEvent(string $event) {\n return $this\n ->mailjet_webhook_events()\n ->where('event', $event)\n ->orderBy('created_at', 'desc')\n ->first();\n }", "public function getEvent()\n {\n return isset($this->event) ? $this->event : null;\n }", "public function getUri() {}", "public function getUri() {}", "public function getEvent($id)\n {\n\n $cached = $this->getFromCache('event_cache_'.$id);\n if ($cached !== null) {\n return $cached;\n }\n\n // Fetch, event, checkins and RSVPs (only the latter has pictures)\n $event = $this->client->getEvent(array('id' => $id));\n\n $rsvps = $this->client->getRSVPs(\n array('event_id' => $id, 'rsvp' => 'yes', 'order' => 'name', 'fields' => 'host', 'page' => 300)\n );\n\n $event = $event->toArray();\n $event['checkins'] = array();\n $event['rsvps'] = array();\n foreach ($rsvps as $rsvp) {\n $event['rsvps'][] = array(\n 'id' => $rsvp['member']['member_id'],\n 'name' => $rsvp['member']['name'],\n 'photo' => isset($rsvp['member_photo']) ? $rsvp['member_photo'] : null,\n 'host' => $rsvp['host']\n );\n }\n\n $this->saveInCache('event_cache_'.$id, $event);\n\n return $event;\n }", "abstract public function getEventName();", "public function getEvent() {\n\t}", "public function getUri();", "public function getUri();", "public function getUri();", "public function getUri();", "public function getEvent()\n {\n return $this->getProperty(\"Event\",\n new Event($this->getContext(), new ResourcePath(\"Event\", $this->getResourcePath())));\n }", "public function getEventById($event_id) {\n\t\t$sql_query = \"SELECT * FROM evento WHERE Id=\".$this->connection->real_escape_string($event_id).\";\";\n\t\t$result = $this->connection->query($sql_query);\n\t\tif($row = $result->fetch_assoc()){\n\t\t\t$event_info = [\n\t\t\t\t\"id\" => $row[\"Id\"],\n\t\t\t\t\"name\" => $row[\"Nombre\"],\n\t\t\t\t\"date\" => $row[\"Fecha\"],\n\t\t\t\t\"time\" => $row[\"Hora\"],\n\t\t\t\t\"dateM\" => $row[\"FechaModificacion\"],\n\t\t\t\t\"timeM\" => $row[\"HoraModificacion\"],\n\t\t\t\t\"author\" => $row[\"Autor\"],\n\t\t\t\t\"description\" => $row[\"Descripcion\"],\n\t\t\t\t\"thumbnail\" => $row[\"Miniatura\"]\n\t\t\t];\n\t\t}\n\t\treturn $event_info;\n\t}", "public function getEventDetails($eventId) {\n $sql = 'SELECT cmr.*, cmroom.room_name FROM ces_meeting_requests cmr '\n . 'LEFT JOIN ces_meeting_rooms cmroom ON cmroom.id = cmr.room_id '\n . 'WHERE cmr.id = :id';\n \n $stmt = $this->conn->prepare($sql);\n $stmt->execute([':id' => $eventId]);\n \n return $stmt->fetch();\n }", "public function getEvent()\r\n {\r\n return $this->Event;\r\n }", "abstract protected function get_event_name();", "public function _getInfoEvent($objectid=0){\n global $dbconn_zabbix;\n if($objectid == 0){\n return array();\n }\n $select = \"SELECT e.eventid, e.value, e.clock, e.objectid as triggerid, e.acknowledged FROM events e \";\n $where = \"WHERE e.object=0 AND e.objectid={$objectid} AND (e.value=1 OR e.value=0 OR e.value=2) \";\n $orderby = \"ORDER by e.object DESC, e.objectid DESC, e.eventid DESC LIMIT 1\";\n $sql = $select . $where . $orderby;\n\n if(MODE_DEBUG == true){\n echo $sql;\n echo \"<br>\";\n }\n $result = mysql_query($sql,$dbconn_zabbix);\n $rows = array();\n while($row = mysql_fetch_assoc($result)){\n $rows[] = $row;\n }\n mysql_free_result($result);\n return (count($rows) > 0) ? $rows[0] : array('eventid' => 0);\n }", "public function getOutlook($url, $eventPath) {\n $body = '';\n $headers = array();\n if ($this->oAuthToken) {\n $headers['Authorization'] = 'Bearer ' . $this->oAuthToken;\n }\n\n $response = $this->request('GET', $url, $body, $headers);\n if ($response['statusCode'] === 200) {\n return array(\n 'body' => $response['body'],\n );\n }\n \n return array('body' => '');\n }", "public function requestUri() {}", "function get_event($options = array()) {\n\n\t\t/*\n\t\targs:\n\t\t{\n\t\t\tid: the event id\n\t\t\tget_has: 1 = retrieve info table values, 0 = do not retrieve info table values\n\t\t\tshow_private_has: 1 = show has values that should only be privately accessible (to devs), 0 = do not show\n\t\t}\n\t\t*/\n\n\t\tCore::ensure_defaults(array(\n\t\t\t\t'id' => -1,\n\t\t\t\t'get_has' => 1,\n\t\t\t\t'show_private_has' => 1\n\t\t\t)\n\t\t, $options);\n\n\t\tglobal $dbh;\n\n\t\t$sql = \"SELECT\n\t\tid,\n\t\ttitle,\n\t\tdescription,\n\t\tdate_time,\n\t\tdate_time as date,\n\t\tend_time,\n\t\tactive,\n\t\tsummary\n\t\tFROM \" . CORE_DB . \".virtual_events\n\t\tWHERE id = :id\n\t\t\";\n\n\t\t$sth = $dbh->prepare($sql);\n\t\t$sth->execute(array(\n\t\t\t\t':id' => $options['id']\n\t\t\t)\n\t\t);\n\n\t\t$event = $sth->fetch();\n\n\t\tif(!is_array($event)) { // Could not find event\n\n\t\t\treturn Core::error($this->errors, 8);\n\n\t\t}\n\n\t\t$event = Core::remove_numeric_keys($event);\n\t\t$event['has'] = array();\n\n\t\tif($options['show_private_has'] == 1) {\n\n\t\t\t$params = array(\n\t\t\t\t'event_id' => $options['id']\n\t\t\t);\n\n\t\t\t$filters = Core::db_params(array(\n\t\t\t\t\t'values' => $params\n\t\t\t\t)\n\t\t\t);\n\n\t\t} else {\n\n\t\t\t$filters['sql'] = \"event_id = :event_id AND (info_type = 'livestream_id' OR info_type = 'coveritlive_id' OR info_type = 'launched')\";\n\t\t\t$filters['params'] = array(\n\t\t\t\t':event_id' => $options['id']\n\t\t\t);\n\n\t\t}\n\n\t\t// Retrieve has values\n\t\t$sql = \"SELECT\n\t\tvirtual_events_info_id,\n\t\tevent_id,\n\t\tinfo_type,\n\t\tint_info,\n\t\tinfo,\n\t\tinfo_b,\n\t\ttime\n\t\tFROM\n\t\t\" . CORE_DB . \".virtual_events_info\n\t\tWHERE \" . $filters['sql'];\n\n\t\t$sth = $dbh->prepare($sql);\n\n\t\t$sth->execute($filters['params']);\n\n\t\twhile($row = $sth->fetch()) {\n\n\t\t\tarray_push($event['has'], Core::remove_numeric_keys($row));\n\n\t\t}\n\n\t\treturn $event;\n\n\t}", "function get_event_details($userId, $eventId)\n {\n\t\tlog_message('debug', '_event/get_event_list');\n\t\tlog_message('debug', '_event/get_event_list:: [1] userId='.$userId.' eventId='.$eventId);\n\n $result = $this->_query_reader->get_list('get_event_details',array(\n\t\t\t'user_id'=>$userId,\n\t\t\t'event_id'=>$eventId\n\t\t\t));\n\n log_message('debug', '_event/get_event_list:: [2] result='.json_encode($result));\n return $result;\n }", "public function getEvent() {\n return $this->task['identifier'];\n }", "public function getUri()\n {\n }", "public function getUri()\n {\n }", "public function getEvent($eventUrl)\n\t{\n\t\t// The given $eventUrl could, in legacy code, actually be a token instead\n\t\tif (!$this->connector->isEventUrl($eventUrl))\n\t\t{\n\t\t\t// This is an old-style token. Properly path it.\n\t\t\t$eventUrl = 'events/'. $eventUrl;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The Event is using the new distributed API, and we're given an EventUrl\n\t\t\t$eventUrl = urldecode($eventUrl);\n\n\t\t\t// Verify the OAuth signature of the call\n\t\t\t//\n\t\t\t// Todo: This can be deferred to get the wrapper functional, but MUST be done!\n\t\t\t// Maybe see: OAuthSignatureMethod_HMAC_SHA1::check_signature()?\n\t\t\t// Should be a library call, not a local method implementation\n\t\t\tif (false)\n\t\t\t{\n\t\t\t\t$error = array('error' => 'The request did not validate using AppDirect OAuth signatures');\n\t\t\t\tthrow new AppDirectValidationException('401', $error);\n\t\t\t}\n\t\t}\n\n\t\t// GET the event from the provided $eventUrl using a OAuth-signed request\n\t\treturn new AppDirectEvent($this->connector->get($eventUrl));\n\t}", "public function getEvents();", "public function getEvents();", "public function getEventSubscriber();", "public function getEventDispatch();", "function uri(): string;", "public function getEvent(): EventInterface;", "public function getInfo($url);", "public function getEventName() : String;", "function getEvent() {\t\n\n\t//Get the event from pipe and json_decode it\n\treturn json_decode(file_get_contents('php://input'));\n}", "public function get_uri()\n {\n }", "public function getEventUrl () {\n $urlPixel = 'https://www.google-analytics.com/collect?v=1'\n . '&tid=' . $this->GAtrackingID\n . '&t=event'\n . '&ec=' . urlencode($this->category)\n . '&ea=' . urlencode($this->action)\n . '&cn=' . urlencode($this->campaign)\n . '&cs=' . urlencode($this->source)\n . '&cm=' . urlencode($this->medium)\n . '&cc=' . urlencode($this->content)\n . '&cid=' . $this->supporterID;\n return $urlPixel;\n }", "protected function getHostFromUri() {}", "public function getActivityDetailsForEvent($eventName);", "protected function get_uri()\n {\n }", "public static function get($uri,$callback){\n static::add('GET',$uri,$callback);\n\n }", "public function getEvent()\n {\n // Check for a new event on the current connection\n $buffer = '';\n do {\n $buffer .= fgets($this->socket, 512);\n } while (!empty($buffer) && !preg_match('/\\v+$/', $buffer));\n $buffer = trim($buffer);\n\n // If no new event was found, return NULL\n if (empty($buffer)) {\n return null;\n }\n\n // If the event has a prefix, extract it\n $prefix = '';\n if (substr($buffer, 0, 1) == ':') {\n $parts = explode(' ', $buffer, 3);\n $prefix = substr(array_shift($parts), 1);\n $buffer = implode(' ', $parts);\n }\n\n // Parse the command and arguments\n list($cmd, $args) = array_pad(explode(' ', $buffer, 2), 2, null);\n\n // Parse the server name or hostmask\n if (strpos($prefix, '@') === false) {\n $hostmask = new Phergie_Hostmask(\n null, null, $prefix\n );\n } else {\n $hostmask = Phergie_Hostmask::fromString($prefix);\n }\n\n // Parse the event arguments depending on the event type\n $cmd = strtolower($cmd);\n switch ($cmd) {\n case 'names':\n case 'nick':\n case 'quit':\n case 'ping':\n case 'pong':\n case 'error':\n case 'part':\n $args = array_filter(array(ltrim($args, ':')));\n break;\n\n case 'privmsg':\n case 'notice':\n $args = $this->parseArguments($args, 2);\n list($source, $ctcp) = $args;\n if (substr($ctcp, 0, 1) === \"\\001\" && substr($ctcp, -1) === \"\\001\") {\n $ctcp = substr($ctcp, 1, -1);\n $reply = ($cmd == 'notice');\n list($cmd, $args) = array_pad(explode(' ', $ctcp, 2), 2, array());\n $cmd = strtolower($cmd);\n switch ($cmd) {\n case 'version':\n case 'time':\n case 'finger':\n case 'ping':\n if ($reply) {\n $args = array($args);\n }\n break;\n case 'action':\n $args = array($source, $args);\n break;\n }\n }\n // This fixes the issue that seems to occur, but why does it?\n if (!is_array($args)) {\n $args = array($args);\n }\n break;\n\n case 'topic':\n case 'invite':\n case 'join':\n $args = $this->parseArguments($args, 2);\n break;\n\n case 'kick':\n case 'mode':\n $args = $this->parseArguments($args, 3);\n break;\n\n // Remove target and colon preceding description from responses\n default:\n $args = substr($args, strpos($args, ' ') + 2);\n break;\n }\n\n // Create, populate, and return an event object\n if (ctype_digit($cmd)) {\n $event = new Phergie_Event_Response;\n $event\n ->setCode($cmd)\n ->setDescription($args);\n } else {\n $event = new Phergie_Event_Request;\n $event\n ->setType($cmd)\n ->setArguments($args);\n $event->setHostmask($hostmask);\n }\n $event->setRawData($buffer);\n return $event;\n }", "function url_ical(string $pkey, string $eventid): string\n{\n return $GLOBALS['icaldownload']->url_ical($pkey, $eventid);\n}", "function logEventFromUrl($manage_state = false) {\n\t\t\n\t\t// keeps php executing even if the client closes the connection\n\t\tignore_user_abort(true);\n\t\t$service = owa_coreAPI::serviceSingleton();\n\t\t$service->request->decodeRequestParams();\n\t\t$event = owa_coreAPI::supportClassFactory('base', 'event');\n\t\t$event->setEventType(owa_coreAPI::getRequestParam('event_type'));\n\t\t$event->setProperties($service->request->getAllOwaParams());\n\t\t\n\t\t// check for third party cookie mode.\n\t\t$mode = owa_coreAPI::getRequestParam('thirdParty');\n\t\tif ( $mode ) {\n\t\t\treturn $this->trackEvent($event);\n\t\t} else {\n\t\t\treturn owa_coreAPI::logEvent($event->getEventType(), $event);\n\t\t}\n\t}", "abstract protected function getUri(): string;", "public function getUserEvents() {\n\t\tif(!$data = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/userevent/get_user_events.jsp?_plus=true')) {\n\t\t\tthrow new Exception($this->feedErrorMessage);\n\t\t}\n\t\treturn $data;\n\t}", "public function getUri()\n {\n return $this->getAttribute('uri');\n }", "public function getUri() : string\n {\n $rtn = $this->data['uri'];\n\n return $rtn;\n }", "public function getExchangeInfo();", "public function getEvent($id)\n {\n $id = (int)$id;\n $this->checkID($id);\n\n $event = $this->model->getEvent($id);\n\n $this->send(200, $event);\n }", "private function getUri(){\n return $this->uri = parse_url($_SERVER['REQUEST_URI']);\n }", "private function getTaskByUri($uri, $calendarId){\n\t\t//$this->db->query(\"SELECT e.* FROM cal_events e INNER JOIN dav_events d ON d.id=e.id WHERE d.uri=?\",\"s\",$uri);\n\t\t\n\t\t$joinCriteria = FindCriteria::newInstance()\n\t\t\t->addRawCondition('t.id', 'd.id');\n\t\t\n\t\t$whereCriteria = FindCriteria::newInstance()\n\t\t\t->addModel(DavTask::model(),'d')\n\t\t\t->addCondition('uri', $uri,'=','d');\n\t\t\n\t\t$findParams = FindParams::newInstance()\n\t\t\t->single()\n\t\t\t->join(DavTask::model()->tableName(),$joinCriteria, 'd')\n\t\t\t->criteria($whereCriteria);\n\t\t\n\t\treturn \\GO\\Tasks\\Model\\Task::model()->find($findParams);\n\t}", "public function GetEvents($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "public static function getEvent($event_id)\n\t{\n\t\t$database = DatabaseFactory::getFactory()->getConnection();\n\n\t\t$sql = \"SELECT *, events.id as event_id, fest_type.name as fest_type_name FROM events JOIN fest_type ON fest_type.id = events.fest_type_id WHERE events.id = :event_id\";\n\t\t$query = $database->prepare($sql);\n\t\t$query->execute(array(':event_id' => $event_id));\n\n\t\t// fetch() is the PDO method that gets a single result\n\t\treturn $query->fetch();\n\t}", "public function getEvent($name, $default = null)\n {\n return isset($this->events[$name]) ? $this->events[$name] : $default;\n }", "public function show($id)\n {\n return $this->eventService->getEvent($id);\n }", "public function get ($eventid) {\n\n $stmt = $this->db->prepare(\"\n SELECT *\n FROM stadium_events\n WHERE eventid = ?;\");\n if ($stmt) {\n\n $params = array($eventid);\n if ($stmt->execute($params)) {\n\n if ($stmt->rowCount() > 0) {\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $response = array (\n 'hostid' => $row['hostid'],\n 'title' => $row['title'],\n 'sport' => $row['sport'],\n 'event_desc' => $row['event_desc'],\n 'location' => $row['location'],\n 'eventid' => $row['eventid'],\n 'skill_level' => $row['skill_level'],\n 'longitude' => $row['longitude'],\n 'latitude' => $row['latitude'],\n 'event_start' => $row['event_start'],\n 'event_end' => $row['event_end'],\n 'privacy' => $row['privacy']\n );\n\n $this->json_response_success(\"Event successfully retrieved!\", $response);\n\n } else {\n $this->json_response_error(\"Error getting event! - No rows returned\");\n }\n\n } else {\n $this->json_response_error(\"Error getting event - A Database error occurred while executing the stmt!\");\n }\n } else {\n $this->json_response_error(\"PDO stmt could not be created!\");\n }\n\n $stmt->closeCursor();\n unset($this->db);\n }", "public function getURI()\t{\n\t\treturn $this->route;\n\t}", "public function findWhereUri($uri);", "public function getRequestUri() {}", "public function getURI()\n {\n return $this->uri;\n }", "public function uri() \n\t{\n\t\treturn $this->uri;\n\t}", "function get($uri){\n require __DIR__ . '/../model/object.php';\n $headers = apache_request_headers();\n switch ($uri) {\n case '/':\n index($headers);\n break;\n\n case '/qualcosa.php':\n getQualcosa($headers);\n break;\n\n case '/questionari.php':\n getQuestionariQ($headers);\n break;\n\n case '/esercenti.php':\n getEsercentiQ($headers);\n break;\n\n case '/utenti.php':\n getUtentiQ($headers);\n break;\n\n case '/dashboardApertamente.php':\n getDashboard($headers);\n break;\n\n case '/esercenti.php':\n getEsercentiQ($headers);\n break;\n \n default:\n notFound();\n break;\n }\n}", "public function getByURI(string $uri) {\r\n if (empty($uri)) {\r\n $uri = '/';\r\n }\r\n $handlers = $this->getHandlers();\r\n if (!isset($handlers[$uri])) {\r\n throw new \\Exception(\"handler for '{$uri}' not registered\");\r\n }\r\n $class = $handlers[$uri];\r\n return $class;\r\n }", "function eventoni_get_events_by_id()\n{\n\t$event_ids = $_POST['event_ids'];\n\n\t// Aufsplitten des Strings in ein Array mit den Events\n\t$event_ids = explode('-',$event_ids);\n\n\t// Holen der Informationen zu den Events\n\t$data = eventoni_fetch('',true,$event_ids);\n\n\t// Rückgabe der Informationen zu den Events in XML\n\techo $data['xml'];\n\tdie();\n}", "function get_eventbrite_event_data($post_id) {\n \n // If event is not linked to eventbrite, do nothing\n if (! get_field('is_eventbrite', $post_id) || ! get_field('eventbrite_id', $post_id)) {\n return;\n }\n \n $eb_private_token = get_field('eb_private_token', 'option');\n \n /**\n * GET request on main event endpoint to get event summary, image and url.\n */\n \n $eb_event_endpoint = \"https://www.eventbriteapi.com/v3/events/\" . get_field('eventbrite_id', get_the_ID()) . '/?expand=venue';\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $eb_event_endpoint);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_HEADER, FALSE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n \"Authorization: Bearer \" . $eb_private_token\n ));\n \n $response = curl_exec($ch);\n curl_close($ch);\n \n $event_data = json_decode($response);\n \n return $event_data;\n}", "public function eventDetails($eventSlug)\n {\n $data['event'] = Event::where([\n 'slug' => $eventSlug,\n 'status' => 1,\n ])->with('media')->first();\n\n\n if (!empty($data['event']))\n {\n return view('app.event_details', $data);\n }\n\n return abort(404);\n }", "public function getEventType(): string;", "public function getEventLocation() {\n\t\treturn ($this->eventLocation);\n\t}", "function getEventById()\n\t{\n\t\t//echo \" From ByID: \" . $this->_id;\n\t\t$eventId = 1;\n\t\t$db\t\t= JFactory::getDbo();\n\t\t$query\t= $db->getQuery(true);\n\n\t\t$query->select(\"DATE_FORMAT(dt_event_time, '%d.%m.%Y')\");\n\t\t$query->select(\"DATE_FORMAT(dt_event_time, '%H:%i')\");\n\t\t$query->select(\"DATE_FORMAT(dt_event_end, '%H:%i')\");\n\t\t$query->select($db->nameQuote('t1.s_category'));\n\t\t$query->select($db->nameQuote('t1.s_place'));\n\t\t$query->select($db->nameQuote('t1.s_price'));\n\t\t$query->select($db->nameQuote('t1.idt_drivin_event'));\n\t\t$query->select($db->nameQuote('t1.n_num_part'));\n\t\t$query->select('t1.`n_num_part` - (SELECT COUNT(t2.`idt_drivin_event_apply`) ' .\n\t\t\t' FROM #__jevent_events_apply as t2 ' .\n\t\t\t' WHERE t2.`idt_drivin_event` = t1.`idt_drivin_event` AND t2.dt_cancel is null) as n_num_free');\n\t\t$query->from('#__jevent_events as t1');\n\t\t$query->where($db->nameQuote('idt_drivin_event') . '=' . $this->_id);\n\n\t\t$db->setQuery($query);\n\t\tif ($link = $db->loadRowList()) {\n\t\t}\n\t\t//echo \" From ByID: \" . count($link);\n\t\t//echo \" From ByID: \" . $query;\n\t\treturn $link;\n\t}", "public function uri();", "public function uri();", "public function uri();", "public function uri() {\n return $this->uri;\n }", "public function uri()\n {\n return $this->uri;\n }", "public function uri()\n {\n return $this->uri;\n }", "public function uri() {\n\t\treturn $this->getUri();\n\t}", "public function getEvent(): Event\n {\n return $this->mainEvent;\n }" ]
[ "0.6369309", "0.62550056", "0.61440885", "0.6005824", "0.58997524", "0.5811434", "0.5769192", "0.5727823", "0.5696106", "0.56900805", "0.566711", "0.5621523", "0.5589314", "0.555214", "0.5516269", "0.5495286", "0.548315", "0.548315", "0.548315", "0.5454822", "0.5448647", "0.54152685", "0.541471", "0.5399902", "0.5368285", "0.53661126", "0.53661126", "0.5327683", "0.5317434", "0.53146964", "0.5309739", "0.5309739", "0.5309739", "0.5309739", "0.52801365", "0.5270902", "0.51871747", "0.51856244", "0.5175003", "0.5174175", "0.51733994", "0.5169662", "0.516512", "0.5132493", "0.5132237", "0.5117902", "0.5117902", "0.51121545", "0.5107799", "0.5107799", "0.51069903", "0.51067764", "0.5106652", "0.5101101", "0.50973463", "0.50971085", "0.5084247", "0.5073497", "0.5071216", "0.50639987", "0.5056221", "0.5052145", "0.5048599", "0.5045469", "0.50284183", "0.50155526", "0.500606", "0.49889532", "0.49825907", "0.49799907", "0.49638665", "0.49625245", "0.4962152", "0.49444392", "0.49422476", "0.49351174", "0.4913263", "0.49096328", "0.49037254", "0.4894882", "0.48920244", "0.48908144", "0.48873913", "0.4869656", "0.48651496", "0.4863778", "0.486027", "0.48537222", "0.48527998", "0.48524106", "0.48503223", "0.48494583", "0.4848956", "0.4848956", "0.4848956", "0.48483688", "0.48469687", "0.48469687", "0.48404095", "0.48378545" ]
0.69409263
0
Get the default editing service.
public function get() { $editing_service = new DefaultPlaceEditingService( $this->commandBus, $this->uuidGenerator, $this->placeJsonLdRepository, $this->placeCommandFactory, $this->placeRepository ); if ($this->config->get('publication_date')) { $publicationDate = \DateTimeImmutable::createFromFormat( 'Y-m-d H:i:s', (string) $this->config->get('publication_date') . ' 00:00:00' ); $editing_service = $editing_service->withFixedPublicationDateForNewOffers($publicationDate); } return $editing_service; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getService ()\n {\n if (null === $this->_service) {\n $this->setService('Default_Service_Spirit');\n }\n return $this->_service;\n }", "protected function getRouting_ResourcesLocator_DefaultService()\n {\n return $this->services['routing.resources_locator.default'] = new \\phpbb\\routing\\resources_locator\\default_resources_locator('./../', 'production', ${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'});\n }", "public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}", "protected function getA2lixTranslationForm_Default_Service_TranslationService()\n {\n return $this->services['a2lix_translation_form.default.service.translation'] = new \\A2lix\\TranslationFormBundle\\TranslationForm\\TranslationForm($this->get('form.registry'), $this->get('doctrine'));\n }", "function get_default_page_to_edit()\n {\n }", "protected function getVictoireBlog_ArticleSettings_Form_TypeService()\n {\n return $this->services['victoire_blog.article_settings.form.type'] = new \\Victoire\\Bundle\\BlogBundle\\Form\\ArticleSettingsType($this->get('doctrine.orm.default_entity_manager'));\n }", "protected function getSwiftmailer_Mailer_DefaultService()\n {\n return $this->services['swiftmailer.mailer.default'] = new \\Swift_Mailer($this->get('swiftmailer.mailer.default.transport'));\n }", "protected function getA2lixTranslationForm_Default_Type_TranslatedentityService()\n {\n $this->services['a2lix_translation_form.default.type.translatedentity'] = $instance = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslatedEntityType();\n\n $instance->setRequest(NULL);\n\n return $instance;\n }", "public function getContentService(){\n if(null === $this->contentService)\n $this->contentService = $this->getServiceLocator()->get('content_service');\n return $this->contentService;\n }", "public function getSlideService(){\n if(null === $this->slideService)\n $this->slideService = $this->getServiceLocator()->get('slide_service');\n return $this->slideService;\n }", "protected function getWorkspaceService() {}", "protected function getWorkspaceService() {}", "protected function getEditModule() {}", "public function service()\r\n {\r\n return $this->service;\r\n }", "public function getService()\n {\n\n if (preg_match('/^2\\./', $this->getVersion())) {\n $service = 'get';\n } else {\n $service = 'objects';\n }\n\n return $service;\n\n }", "public function service() {\n return $this->service;\n }", "public function getServiceLocator()\n {\n if (empty($this->serviceLocator)) {\n $class = $this->defaultServiceLocator;\n $this->serviceLocator = new $class();\n }\n\n return $this->serviceLocator;\n }", "public function getUpdateForm()\n {\n return new UpdateBlogFormService;\n }", "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 getEdit()\n\t{\n\t}", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function edit(Service $service)\n {\n //\n }", "public function edit(Service $service)\n {\n //\n }", "public function edit(Service $service)\n {\n //\n }", "public function edit(Service $service)\n {\n //\n }", "public function service()\n {\n return $this->service;\n }", "protected function service()\n {\n return new Service();\n }", "protected function getA2lixTranslationForm_Default_Type_TranslationsformsService()\n {\n return $this->services['a2lix_translation_form.default.type.translationsforms'] = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslationsFormsType($this->get('a2lix_translation_form.default.service.translation'), $this->get('a2lix_translation_form.default.listener.translationsforms'), $this->get('a2lix_translation_form.default.service.parameter_locale_provider'));\n }", "public function getService()\n {\n return null;\n }", "abstract function get_crud_service();", "public function getService()\n {\n if (!$this->service) {\n /** @var \\OAuth\\ServiceFactory $serviceFactory */\n $serviceFactory = $this->app->make('oauth/factory/service');\n $this->service = $this->factory->createService($serviceFactory);\n }\n\n return $this->service;\n }", "protected function getVictoireCore_AdminMenuService()\n {\n return $this->services['victoire_core.admin_menu'] = $this->get('victoire_core.admin_menu_builder')->getMenu();\n }", "public function getdefaultPersonInEditor()\n {\n return $this->defaultpersonineditor;\n }", "public function getEditObject()\n {\n $soxId = $this->getEditObjectId();\n if ($this->_oEditObject === null && isset($soxId) && $soxId != '-1') {\n $this->_oEditObject = oxNew('oxOrder');\n $this->_oEditObject->load($soxId);\n }\n\n return $this->_oEditObject;\n }", "public function getAddOnManagerService() {\n\t\treturn $this->get('sly-service-addon-manager');\n\t}", "protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }", "protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }", "protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Victoire\\Bundle\\I18nBundle\\Translation\\Translator($this, ${($_ = isset($this->services['translator.selector']) ? $this->services['translator.selector'] : $this->getTranslator_SelectorService()) && false ?: '_'}, array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => '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' => (__DIR__.'/translations'), 'debug' => false, 'resource_files' => array('sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Latn.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sr_Latn.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sr_Latn.yml')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.pl.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pl.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pl.yml')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.he.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.he.yml')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ro.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ro.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ro.yml')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.et.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.et.yml')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fa.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fa.yml')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ar.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ar.yml')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.gl.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.th.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.th.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.th.yml')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ru.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ru.yml')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sv.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sv.yml')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.da.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.da.yml')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fi.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fi.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fi.yml')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lb.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lb.yml')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.zh_CN.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.zh_CN.yml')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.nl.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nl.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nl.yml')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.fr.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fr.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fr.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.fr.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.fr.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.fr.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.fr.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.fr.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.fr.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.fr.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.fr.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.fr.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.fr.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.fr.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/messages.fr.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.fr.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.fr.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.fr.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.fr.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/messages.fr.xlf'), 23 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.fr.xliff'), 24 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.fr.xliff')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.mn.xlf')), 'af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.af.yml')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hr.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hr.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hr.yml')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.tr.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.tr.yml')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hy.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.en.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.en.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.en.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.en.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.en.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.en.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.en.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.en.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.en.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.en.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.en.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.en.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.en.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.en.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.en.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.en.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.en.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.en.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.en.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.en.xliff')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lv.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lv.yml')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt.xlf'), 2 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.pt.xliff'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt.yml')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ca.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ca.yml')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lt.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lt.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lt.yml')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.id.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.id.yml')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.eu.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eu.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eu.yml')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.bg.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.bg.yml')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ja.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ja.yml')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sl.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sl.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sl.yml')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.uk.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.uk.yml')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.cs.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.cs.yml')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.el.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.el.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.el.yml')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.vi.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.vi.yml')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.de.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.de.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.de.yml')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.it.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.it.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.it.yml')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sk.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sk.yml')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hu.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hu.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hu.yml')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.es.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.es.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.es.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.es.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.es.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.es.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.es.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.es.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.es.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.es.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.es.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.es.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.es.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.es.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.es.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.es.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.es.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.es.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.es.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.es.xliff')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt_BR.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt_BR.yml')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ua.xlf')), 'ky' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ky.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ky.yml')), 'eo' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eo.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eo.yml')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nb.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nb.yml')))), array());\n\n $instance->setConfigCacheFactory($this->get('config_cache_factory'));\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Default_Model_Doctrine_Service');\n }", "protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }", "protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }", "public function edit($id, Request $request)\n {\n $services = Services::where('id', $id)->first();\n\n \n }", "public function getEditForm();", "public function editViewName() {\n return ContentServiceProvider::NAME.\"::admin.edit\";\n }", "protected function getVictoireBlog_Article_Form_TypeService()\n {\n return $this->services['victoire_blog.article.form.type'] = new \\Victoire\\Bundle\\BlogBundle\\Form\\ArticleType($this->get('doctrine.orm.default_entity_manager'));\n }", "function get_default_link_to_edit()\n {\n }", "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 }", "public function getAppService()\n {\n return $this->getController()->getServiceLocator()->get('Application\\Service\\Service');\n }", "protected function getKitAdmin(): LightKitAdminService\n {\n return $this->getContainer()->get('kit_admin');\n }", "public function getEditor();", "public function getService()\n\t{\n\t\treturn $this->_service;\n\t}", "public function getService()\n {\n return $this->_service;\n }", "protected function getService()\n {\n return $this->service;\n }", "protected function getService()\n {\n return $this->service;\n }", "protected function getVictoireBlog_Article_Container_Form_TypeService()\n {\n return $this->services['victoire_blog.article.container.form.type'] = new \\Victoire\\Bundle\\BlogBundle\\Form\\ArticleTemplateType($this->get('doctrine.orm.default_entity_manager'));\n }", "protected function getSwiftmailer_Mailer_Default_TransportService()\n {\n return $this->services['swiftmailer.mailer.default.transport'] = new \\Swift_Transport_SpoolTransport(${($_ = isset($this->services['swiftmailer.mailer.default.transport.eventdispatcher']) ? $this->services['swiftmailer.mailer.default.transport.eventdispatcher'] : $this->getSwiftmailer_Mailer_Default_Transport_EventdispatcherService()) && false ?: '_'}, $this->get('swiftmailer.mailer.default.spool'));\n }", "public function getService()\n\t{\n\t\treturn $this->service;\n\t}", "protected function getHandler()\n {\n static $soap;\n\n if (empty($soap)) {\n $soap = new ECommerceServices(\n new Request(),\n $this->getApplication()->getKernel()->getContainer()->get('Logger'),\n new EventDispatcher()\n );\n }\n\n return $soap;\n }", "protected function getWidgetService()\n {\n if (!$this->widgetService) {\n $this->widgetService = new WidgetService(\n $this->container->get('shopware.emotion_component_installer'),\n $this->container->get('models')\n );\n }\n return $this->widgetService;\n }", "protected function getA2lixTranslationForm_Default_Type_TranslationsService()\n {\n return $this->services['a2lix_translation_form.default.type.translations'] = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslationsType($this->get('a2lix_translation_form.default.listener.translations'), $this->get('a2lix_translation_form.default.service.parameter_locale_provider'));\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getPreset() : ServiceInterface;", "public function getService() {\n return $this->service;\n }", "protected function getTemplating_LocatorService()\n {\n return $this->services['templating.locator'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocator($this->get('file_locator'), __DIR__);\n }", "public function getLoginService()\r\n\t{\r\n\t\treturn $this->loginService = new LoginService();\r\n\t}", "function get_default_post_to_edit($post_type = 'post', $create_in_db = \\false)\n {\n }", "public function edit($ID, Request $request)\n {\n $coutService = $this->RechercherCoutService($ID,$request);\n return $coutService;\n }", "protected function getStageService() {}", "public function getService()\r\n\t{\r\n\t\t$this->_service = $this->getClient()->objectStoreService('cloudFiles', $this->region);\r\n\t\treturn $this->_service;\r\n\t}", "protected function getVictoireBlog_BlogSettings_Form_TypeService()\n {\n return $this->services['victoire_blog.blog_settings.form.type'] = new \\Victoire\\Bundle\\BlogBundle\\Form\\BlogSettingsType(array(0 => 'fr', 1 => 'en'), $this->get('request_stack'), $this->get('security.authorization_checker'));\n }", "public static function i(): ServicesFactory\n {\n return parent::getInstance();\n }", "function getService() {\n return $this->service;\n }", "protected function getSwiftmailer_Mailer_Default_Transport_RealService()\n {\n $a = new \\Swift_Transport_Esmtp_AuthHandler(array(0 => new \\Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), 1 => new \\Swift_Transport_Esmtp_Auth_LoginAuthenticator(), 2 => new \\Swift_Transport_Esmtp_Auth_PlainAuthenticator()));\n $a->setUsername(NULL);\n $a->setPassword(NULL);\n $a->setAuthMode(NULL);\n\n $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \\Swift_Transport_EsmtpTransport(new \\Swift_Transport_StreamBuffer(new \\Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), ${($_ = isset($this->services['swiftmailer.mailer.default.transport.eventdispatcher']) ? $this->services['swiftmailer.mailer.default.transport.eventdispatcher'] : $this->getSwiftmailer_Mailer_Default_Transport_EventdispatcherService()) && false ?: '_'});\n\n $instance->setHost('127.0.0.1');\n $instance->setPort(25);\n $instance->setEncryption(NULL);\n $instance->setTimeout(30);\n $instance->setSourceIp(NULL);\n (new \\Symfony\\Bundle\\SwiftmailerBundle\\DependencyInjection\\SmtpTransportConfigurator(NULL, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}))->configure($instance);\n\n return $instance;\n }", "public function editAction()\n {\n return $this->editor($isEditAction=true);\n }", "private function getRessourceService()\n {\n if (!$this->ressourceService) {\n $this->ressourceService = $this->getServiceManager()->get('playgroundcms_ressource_service');\n }\n\n return $this->ressourceService;\n }", "public function getCreateForm()\n {\n return new CreateBlogFormService;\n }", "public function getArticleTypeService() {\n\t\treturn $this->get('sly-service-articletype');\n\t}", "public function edit(Services $services)\n {\n //\n }", "public function edit(Services $services)\n {\n //\n }", "public function edit(Services $services)\n {\n //\n }", "public function getAddOnPackageService() {\n\t\treturn $this->get('sly-service-package-addon');\n\t}", "public function get_service($index = FALSE, $settings = FALSE)\n\t{\t\t\n\t\treturn parent::get_object($index, $settings);\n\t}", "public function edit()\n {\n return $this->get();\n }", "protected function getVictoire_WidgetFilter_Blog_Set_Default_Values_Form_ListenerService()\n {\n return $this->services['victoire.widget_filter.blog.set.default.values.form.listener'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\ArticleFilterDefaultValuesListener($this->get('doctrine.orm.default_entity_manager'));\n }", "public function getService() : ?ServiceOTP\n {\n return $this->service;\n }", "public function edit()\r\n {\r\n return null;\r\n }", "public function edit($id)\n {\n if (Gate::denies('service.update',ServiceType::findOrFail($id))) {\n session()->flash('warning', 'You do not have permission to edit a service');\n return redirect()->back();\n }\n $serviceType = ServiceType::findOrFail($id);\n return view('pages.settings.services-type.edit', compact('serviceType'));\n }", "public function edit(Service $Service)\n {\n\n return view('pagesystem.Service.edit', compact('Service'));\n }", "protected function getLiipImagine_Cache_Resolver_DefaultService()\n {\n return $this->services['liip_imagine.cache.resolver.default'] = new \\Liip\\ImagineBundle\\Imagine\\Cache\\Resolver\\WebPathResolver($this->get('filesystem'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ($this->targetDirs[3].'/app/../web'), 'media/cache');\n }", "public static function getMainInstance(): ServiceProvider\n {\n return self::getInstance(-1);\n }", "public static function getExtensionService(): ExtensionService\n {\n return ObjectManageable::createObject(ExtensionService::class);\n }", "public function getCustomizationService();", "protected function getVictoireWidget_WidgetStyleTypeService()\n {\n return $this->services['victoire_widget.widget_style_type'] = new \\Victoire\\Bundle\\WidgetBundle\\Form\\WidgetStyleType($this->get('kernel'), $this->get('file_locator'));\n }", "protected function getA2lixTranslationForm_Default_Type_TranslationslocalesselectorService()\n {\n return $this->services['a2lix_translation_form.default.type.translationslocalesselector'] = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslationsLocalesSelectorType($this->get('a2lix_translation_form.default.service.parameter_locale_provider'));\n }" ]
[ "0.6098191", "0.60196674", "0.5873266", "0.58377963", "0.5827025", "0.55958503", "0.5575934", "0.55286473", "0.55135185", "0.5478375", "0.54738855", "0.54738855", "0.5472626", "0.545844", "0.54470694", "0.5445974", "0.5443236", "0.54409003", "0.54353774", "0.5422558", "0.54094696", "0.53951323", "0.53951323", "0.53951323", "0.53951323", "0.5395039", "0.53878796", "0.53774905", "0.5375372", "0.5371965", "0.5365025", "0.5352636", "0.5352565", "0.53519225", "0.53462666", "0.5331671", "0.5331671", "0.53261703", "0.5309207", "0.5304688", "0.5304688", "0.5303508", "0.53000945", "0.5299932", "0.5281193", "0.5273298", "0.52706766", "0.5254341", "0.52463603", "0.52383304", "0.52361125", "0.5231027", "0.52236724", "0.52236724", "0.520944", "0.52066755", "0.5198413", "0.51927614", "0.5190706", "0.51827854", "0.5182535", "0.5182535", "0.5182535", "0.5182535", "0.5182535", "0.5182535", "0.5182535", "0.51820034", "0.51743245", "0.5168707", "0.51663226", "0.51589006", "0.5154423", "0.5153851", "0.51497996", "0.5148235", "0.5134024", "0.51320904", "0.51296794", "0.5128286", "0.5117361", "0.5112528", "0.5108373", "0.5106187", "0.5106187", "0.5106187", "0.5105485", "0.5103857", "0.51026756", "0.510089", "0.5100686", "0.50914854", "0.5091041", "0.5076997", "0.5069853", "0.5065754", "0.5059914", "0.50462914", "0.5044695", "0.504142" ]
0.7202705
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 authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'equity_no' => 'required|integer', 'due_date' => 'required|string', 'monthly_equity' => 'required|numeric', 'penalty' => 'required|numeric', 'payment_status' => 'required|boolean', 'equity_id' => 'required|integer', 'equity_payment_id' => 'nullable|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 $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() { $settings = new \App\Settings(); $settings->title = 'Camo-Tec™ Интернет-магазин милитари одежды оригинального качества'; $settings->description = 'Camo-Tec™ Большой выбор милитари одежды | ① Низкие цены ② Высокое качество ③ Доставка: вся Украина - ☎ (063)135-15-40'; $settings->title_shop = 'Camo-Tec™'; $settings->owner = 'Camo-Tec™'; $settings->address = 'Наш офіс знаходиться за адресою: м. Одесса, вул. Базовая, 11, 65120'; $settings->geocode = '51.519,31.2706109'; $settings->email = '[email protected]'; $settings->telephone = '+38(063) 135 15 40'; $settings->open = "<p class=\"adres icon-gps\">ул. Базовая, 11, 65120</p> <p class=\"phone icon-walkie-talkie\"><a href=\"tel:+380631351540\">+380 63 135 15 40</a>, <a href=\"tel:+380978882165\">+380 97 888 21 65</a></p> <p class=\"email icon-envelope\"><a href=\"mailto:[email protected]\">[email protected]</a></p>"; $settings->open_ua = "<p class=\"adres icon-gps\">ул. Базовая, 11, 65120</p> <p class=\"phone icon-walkie-talkie\"><a href=\"tel:+380631351540\">+380 63 135 15 40</a>, <a href=\"tel:+380978882165\">+380 97 888 21 65</a></p> <p class=\"email icon-envelope\"><a href=\"mailto:[email protected]\">[email protected]</a></p>"; $settings->open_en = "<p class=\"adres icon-gps\">ул. Базовая, 11, 65120</p> <p class=\"phone icon-walkie-talkie\"><a href=\"tel:+380631351540\">+380 63 135 15 40</a>, <a href=\"tel:+380978882165\">+380 97 888 21 65</a></p> <p class=\"email icon-envelope\"><a href=\"mailto:[email protected]\">[email protected]</a></p>"; $settings->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' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Get all templates in DB
public function get();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplatesFromDB();", "public function getAllTemplates(){ //return all templates in database to the select to choose from templates\n return TemplatesResource::collection(TemplateProject::all());\n }", "public function getTemplates(){\n\t\n\t\tif( empty($this->_templates) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 't.tmpl_id AS value, t.tmpl_name AS text' );\n\t\t\t$query->from( '#__zbrochure_templates AS t' );\n\t\t\t$query->where( 't.tmpl_published = 1' );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_templates = $this->_db->loadObjectList();\n\n\t\t}\n\t\t\n\t\treturn $this->_templates;\n\t\n\t}", "function getTemplates() {\n\n // Lets load the data if it doesn't already exist\n if (empty($this->_data)) {\n\n // constructs the query\n $query = ' SELECT * '\n . ' FROM #__templateck';\n\n // retrieves the data\n $this->_data = $this->_getList($query);\n }\n\n return $this->_data;\n }", "function ListTemplates()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $Config;\r\n\t\t\t\r\n\t\t\t$sql = \"select * from templates order by TemplateDisplayName asc\" ; \r\n\t\t\treturn $this->get_results($sql);\t\t\r\n\t }", "public function index() {\n $templates = Template::all();\n return $templates;\n }", "public function getAllSMSTemplates()\n {\n $selectTempsql = 'SELECT temp_id, temp_name FROM ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $selectTempsql .= ' WHERE 1 Order By temp_name ASC';\n $templateRes = Db::getInstance()->ExecuteS($selectTempsql);\n return $templateRes;\n }", "public function getAllTemplates() {\n $pages = Templates::templates()->get();\n\n return response()->json($pages);\n }", "public function getTemplates()\n {\n $finder = Finder::create()\n ->files()\n ->name('*.sql')\n ->in($this->rootDir.'/../templates')\n ;\n\n $templates = [];\n\n /** @var SplFileInfo $file */\n foreach ($finder as $file) {\n $templates[] = $file->getRelativePathname();\n }\n\n return $templates;\n }", "public function get_templates()\n {\n $template = new MailTemplate();\n return $template->findAll();\n }", "public function getTemplates()\n {\n return $this->hasMany(Template::className(), ['atk_id' => 'id']);\n }", "function getAllPageTemplates() {\n global $wpdb;\n return $wpdb->get_col(\"SELECT DISTINCT meta_value FROM wp_postmeta WHERE meta_key = '_wp_page_template'\"); \n }", "public function getAllSlideTemplates() {\n return $this->container->get('doctrine')\n ->getRepository('Os2DisplayCoreBundle:SlideTemplate')\n ->findAll();\n }", "function customcert_get_templates() {\n global $DB;\n\n return $DB->get_records_menu('customcert_template', array(), 'name ASC', 'id, name');\n}", "protected function getTemplates()\r\n\t{\r\n\t\t$templates = array();\r\n\t\tforeach ($this->getProjectDao()->getAllModelTemplates() as $template)\r\n\t\t\t$templates[$template->ID] = $template->Template;\r\n\t\treturn $templates;\r\n\t}", "public function GetSavedTemplates() {\n\t\t$templates = &drupal_static(__FUNCTION__, NULL, $this->reset);\n\n\t\tif (!isset($templates)) {\n\t\t\t$templates = db_select('{'.ACQUIA_COMPOSER_TEMPLATES_TABLE.'}', 'ac')\n\t\t\t\t->fields('ac')\n\t\t\t\t->execute()\n\t\t\t\t->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t\tif (!count($templates)) {\n\t\t\t\t$templates = array();\n\t\t\t}\n\t\t}\n\t\treturn $templates;\n\t}", "public function fetchAll()\n {\n $templateTypeTable = new Api_Model_DbTable_TemplateType();\n\n $rowset = $templateTypeTable->fetchAll(null, 'name');\n\n $templateTypes = new Set();\n foreach ($rowset as $row) {\n $templateType = Type::factory($row);\n\n $templateTypes->addItem($templateType);\n }\n\n return $templateTypes;\n }", "function templates()\n {\n return [];\n }", "public function getTemplates() {\n $pages = Templates::templates()->paginate(Templates::getPageSize());\n\n return response()->json($pages);\n }", "public function getTemplates (){\n $dir = conf::pathHtdocs() . \"/templates\";\n $templates = file::getFileList($dir, array('dir_only' => true));\n\n $ary = array ();\n foreach ($templates as $val){\n $info = $this->getSingleTemplate($val);\n if (empty($info)) {\n continue;\n }\n $ary[] = $info;\n }\n return $ary;\n }", "public function getAllScreenTemplates() {\n return $this->container->get('doctrine')\n ->getRepository('Os2DisplayCoreBundle:ScreenTemplate')\n ->findAll();\n }", "public function getCreatedTemplates ()\n {\n // Get all the templates\n $table = DB::select('select id_template, name_template, created_at, icon from ezz_templates');\n return response()->json([\n 'templates' => $table\n ], 200);\n }", "public function allEmailTemplateForDataTable()\n {\n return $this->emailTemplateRepository->getAllEmailTemplateForDataTable();\n }", "public function getTemplates0()\n {\n return $this->hasMany(Template::className(), ['background_id' => 'id']);\n }", "public function getTemplateList() {\n\t\t$aArgs = func_get_args();\n\t\t$aRet = call_user_func_array( array( $this, 'getTemplates' ), $aArgs );\n\t\treturn implode( '|', $aRet );\n\t}", "function fetch_templates( $module_id = false ) // fetch templates for module or all or global\n\t{\n\t\tif( $module_id ) {\n\t\t\t$this->db->where( 'module_id', $module_id );\n\t\t}\n\t\t$query=$this->db->get( 'templates' );\n\t\t$this->db->flush_cache();\n\t\treturn $query->result_array();\n\t}", "public function getTemplates()\n {\n return $this->templates;\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "private function find_templates () {\r\n\t\t$results = array();\r\n\r\n\t\t$files = WooDojo_Utils::glob_php( '*.php', GLOB_MARK, $this->templates_dir );\r\n\r\n\t\tif ( is_array( $files ) && count( $files ) > 0 ) {\r\n\t\t\tforeach ( $files as $k => $v ) {\r\n\t\t\t\t$data = $this->get_template_data( $v );\r\n\t\t\t\tif ( is_object( $data ) && isset( $data->title ) ) {\r\n\t\t\t\t\t$results[$v] = $data->title;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $results;\r\n\t}", "function getPrintTemplates(){\r\n require $this->sRessourcesFile;\r\n if (in_array(\"print_templates\", $this->aSelectedFields)){\r\n $aParams['sSchemaVmap'] = array('value' => $this->aProperties['schema_vmap'], 'type' => 'schema_name');\r\n $aParams['group_id'] = array('value' => $this->aValues['my_vitis_id'], 'type' => 'number');\r\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getGroupPrintTemplates'], $aParams);\r\n\t\t$sListPrintTemplateId = \"\";\r\n\t\t$aListPrintTemplateName = array();\r\n\t\twhile($aLigne=$this->oConnection->oBd->ligneSuivante ($oPDOresult)) {\r\n\t\t\tif ($sListPrintTemplateId == \"\"){\r\n\t\t\t\t$sListPrintTemplateId = $aLigne[\"printtemplate_id\"];\r\n\t\t\t}else{\r\n\t\t\t\t$sListPrintTemplateId .= \"|\".$aLigne[\"printtemplate_id\"];\r\n\t\t\t}\r\n $aListPrintTemplateName[] = $aLigne[\"name\"];\r\n\t\t}\r\n\t\t$oPDOresult=$this->oConnection->oBd->fermeResultat();\r\n $this->aFields['print_templates'] = $sListPrintTemplateId;\r\n $this->aFields['print_templates_label'] = implode(',', $aListPrintTemplateName);\r\n }\r\n }", "public static function getTemplatesUsed()\n {\n return static::$allTemplates;\n }", "public function getTemplates5()\n {\n return $this->hasMany(Template::className(), ['type_id' => 'id']);\n }", "public function getTemplates4()\n {\n return $this->hasMany(Template::className(), ['name_id' => 'id']);\n }", "public function get()\n {\n return $this->templates;\n }", "static function getAllSettingsTemplates($a_type)\r\n\t{\r\n\t\tglobal $ilDB;\r\n\r\n\t\t$set = $ilDB->query(\"SELECT * FROM adm_settings_template \".\r\n\t\t\t\" WHERE type = \".$ilDB->quote($a_type, \"text\").\r\n\t\t\t\" ORDER BY title\");\r\n\r\n\t\t$settings_template = array();\r\n\t\twhile ($rec = $ilDB->fetchAssoc($set))\r\n\t\t{\r\n\t\t\t$settings_template[] = $rec;\r\n\t\t}\r\n\r\n\t\treturn $settings_template;\r\n\t}", "function getAllTemplates($active=null, $account){\n\t\tglobal $db;\n\t\tif($active != null){\n\t\t\t$statement = $db->prepare('SELECT ID, msg, DATE_FORMAT(created, \"%Y-%m-%e\") AS created, active FROM msg_template WHERE active=:active AND accountID=:account ORDER BY ID DESC');\n\t\t\t$statement->execute(array(':active'=>$active, ':account'=>$account));\n\t\t}else{\n\t\t\t$statement = $db->prepare('SELECT ID, msg, DATE_FORMAT(created, \"%Y-%m-%e\") AS created, active FROM msg_template WHERE accountID=:account ORDER BY ID DESC');\n\t\t\t$statement->execute(array(':account'=>$account));\n\t\t}\n\t\treturn $statement->fetchAll(PDO::FETCH_ASSOC);\n\t}", "function GetTemplates($userid=0)\n\t{\n\t\t$this->GetDb();\n\n\t\t$qry = \"SELECT templateid, name, ownerid FROM \" \n\t\t . SENDSTUDIO_TABLEPREFIX \n\t\t . \"templates\";\n\t\t\n\t\tif ($userid) {\n\t\t\t$qry .= \" AS t, \" . SENDSTUDIO_TABLEPREFIX \n\t\t\t . \" usergroups_access AS a \"\n\t\t\t . \" WHERE \"\n\t\t\t . \" a.resourceid = t.templateid AND \" \n\t\t\t . \" a.resourcetype = 'templates' \";\n\t\t\t$qry .= \" OR t.ownerid='\" . $this->Db->Quote($userid) . \"'\";\n\t\t} else {\n\t\t\tif (!$this->TemplateAdmin()) {\n\t\t\t\t$qry .= \" WHERE ownerid='\" . $this->Db->Quote($this->userid) . \"'\";\n\t\t\t\t\n\t\t\t\tif (!empty($this->access['templates'])) {\n\t\t\t\t\t$qry .= \" OR templateid IN (\" . implode(',', $this->access['templates']) . \")\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$qry .= \" OR isglobal='1'\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$qry .= \" ORDER BY LOWER(name) ASC\";\n\n\t\t$templates = array();\n\t\t$result = $this->Db->Query($qry);\n\t\t\n\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\t$templates[$row['templateid']] = $row['name'];\n\t\t}\n\n\t\treturn $templates;\n\t}", "function GetDocumentTemplates()\n\t{\n\t\t$result = $this->sendRequest(\"GetDocumentTemplates\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getTemplates1()\n {\n return $this->hasMany(Template::className(), ['cost_id' => 'id']);\n }", "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}", "public function selectgetTemplate()\n {\n $queryString=\"SELECT * FROM Templates WHERE Active ='1' \";\n $this->result = @$this->dbConnection->query($queryString);\n\n if(!$this->result)\n {\n die('Could not retrieve records from the CMS Database: ' .\n $this->dbConnection->error);\n }\n\n }", "function get_all_templates () {\n global $dbconnect;\n $query = \"SELECT * FROM emails ORDER BY email_id ASC;\";\n $result = mysql_query($query, $dbconnect);\n confirm_query($result);\n return $result;\n}", "public function index()\n\t{\n\t $this->authorize('index', 'Template');\n\n\t $templates = $this->templateLoader->loadAll();\n\n\t $perPage = $this->request->get('per_page', 10);\n\t $page = $this->request->get('page', 1);\n\n\t if ($this->request->has('query')) {\n\t $templates = $templates->filter(function($template) {\n\t return str_contains(strtolower($template['name']), $this->request->get('query'));\n });\n }\n\n if ($orderBy = $this->request->get('order_by', 'updated_at')) {\n $desc = $this->request->get('order_dir', 'desc') === 'desc';\n $templates = $templates->sortBy($orderBy, SORT_REGULAR, $desc);\n }\n\n\t $pagination = new LengthAwarePaginator(\n\t $templates->slice($perPage * ($page - 1), $perPage)->values(),\n count($templates),\n $perPage,\n $page\n );\n\n\t return $this->success(['pagination' => $pagination]);\n\t}", "public function getTemplates()\n {\n $templates = SSViewer::get_templates_by_class(static::class, '', __CLASS__);\n // Prefer any custom template\n if ($this->getTemplate()) {\n array_unshift($templates, $this->getTemplate());\n }\n return $templates;\n }", "public function getShowTemplates();", "public function getTemplates3()\n {\n return $this->hasMany(Template::className(), ['health_id' => 'id']);\n }", "public function get_templates($data)\n {\n $res = $this->service->getApi()->getAllTemplates();\n return $res;\n }", "public function getAllForDropDownList()\n {\n $items = (new Query())\n ->select('emails_templates.id, emails_templates.name')\n ->from(['emails_templates' => 'emails_templates'])\n ->orderBy(['emails_templates.name' => SORT_ASC])\n ->all();\n\n return ArrayHelper::map($items, 'id', 'name');\n }", "public function get_post_templates()\n {\n }", "public function getMailTemplates()\n {\n $arrTemplates = array();\n $objTemplates = Database::getInstance()->execute(\"SELECT id,name,category FROM tl_mail_templates ORDER BY category, name\");\n\n while( $objTemplates->next() )\n {\n if ($objTemplates->category == '')\n {\n $arrTemplates[$objTemplates->id] = $objTemplates->name;\n }\n else\n {\n $arrTemplates[$objTemplates->category][$objTemplates->id] = $objTemplates->name;\n }\n }\n\n return $arrTemplates;\n }", "public static function all() {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$liste = db::findAll(db::table($table));\n\t\treturn $liste;\n\t}", "public function loadTemplates() {\n // Get database hooks.\n $doctrine = $this->container->get('doctrine');\n $slideTemplateRepository = $doctrine->getRepository('Os2DisplayCoreBundle:SlideTemplate');\n $screenemplateRepository = $doctrine->getRepository('Os2DisplayCoreBundle:ScreenTemplate');\n $entityManager = $doctrine->getManager();\n\n // Get parameters.\n $path = $this->container->get('kernel')->getRootDir() . '/../web/';\n $serverAddress = $this->container->getParameter('absolute_path_to_server');\n\n // Locate templates in /web/bundles/\n $templates = $this->findTemplates($path . 'bundles/');\n\n foreach ($templates['slides'] as $config) {\n $dir = explode('/web/', pathinfo($config, PATHINFO_DIRNAME));\n $this->loadSlideTemplate($config, $slideTemplateRepository, $entityManager, $dir[1], $serverAddress, $path);\n }\n\n foreach ($templates['screens'] as $config) {\n $dir = explode('/web/', pathinfo($config, PATHINFO_DIRNAME));\n $this->loadScreenTemplate($config, $screenemplateRepository, $entityManager, $dir[1], $serverAddress, $path);\n }\n\n // Get all templates from the database, and push update to screens.\n $existingTemplates = $screenemplateRepository->findAll();\n $middlewareService = $this->container->get('os2display.middleware.communication');\n foreach ($existingTemplates as $template) {\n foreach ($template->getScreens() as $screen) {\n $middlewareService->pushScreenUpdate($screen);\n }\n }\n }", "public function actionIndex()\n {\n $accountId = $this->getAccountId();\n return MessageTemplate::findAll(['accountId' => $accountId]);\n }", "function scanPmanTemplates()\n {\n $tp = DB_DAtaObject::Factory('core_template');\n \n foreach ($this->modules() as $m){\n //var_dump($m);\n // templates...\n $ar = $this->scanDir(array(\n 'tdir' => \"Pman/$m/templates\",\n 'subdir' => '',\n 'match' => '/\\.(html|txt|abw)$/',\n 'skipdir' => array('images','css','js'),\n \n ));\n // print_r($ar);\n \n foreach($ar as $pg) {\n \n $temp = $tp->syncTemplatePage(array(\n 'base' =>'Pman.'.$m, \n 'template_dir' => \"Pman/$m/templates\",\n 'template' => $pg\n ));\n if ($temp) {\n $ids[] = $temp->id;\n }\n }\n // should clean up old templates..\n // php files..\n $ar = $this->scanDir(array(\n 'tdir' => \"Pman/$m\",\n 'subdir' => '',\n 'match' => '/\\.(php)$/',\n 'skipdir' => array('templates'),\n \n ));\n \n \n foreach($ar as $pg) {\n \n $temp = $tp->syncPhpGetText(array(\n 'base' =>'Pman.'.$m, \n 'template_dir' => \"Pman/$m\",\n 'template' => $pg\n ));\n if ($temp) {\n $ids[] = $temp->id;\n }\n \n }\n \n \n \n \n \n //$tp->syncTemplatePage($pg);\n }\n $del = DB_DataObject::factory('core_template');\n $del->whereAddIn('!id', $ids, 'int');\n $del->whereAddIn('view_name', $this->modules(), 'string');\n $del->whereAddIn('filetype' , array( 'php', 'html' ), 'string');\n $delids = $del->fetchAll('id');\n if ($delids) {\n DB_DataObject::factory('core_template')->query(\n 'update core_template set is_deleted = 1 where id in('. implode(',', $delids). ')'\n );\n }\n \n }", "public function retrieveEmailTemplates()\n {\n return $this->start()->uri(\"/api/email/template\")\n ->get()\n ->go();\n }", "function admin_get_idtemplates()\n{\n global $app;\n\n $idtemplates = $app->bbs->idTemplates();\n $idtypes = $app->calibre->idTypes();\n $ids2add = [];\n foreach ($idtypes as $idtype) {\n if (empty($idtemplates)) {\n array_push($ids2add, $idtype['type']);\n } else {\n $found = false;\n foreach ($idtemplates as $idtemplate) {\n if ($idtype['type'] === $idtemplate->name) {\n $found = true;\n break;\n }\n }\n if (!$found) {\n array_push($ids2add, $idtype['type']);\n }\n }\n }\n foreach ($ids2add as $id2add) {\n $ni = new IdUrlTemplate();\n $ni->name = $id2add;\n $ni->val = '';\n $ni->label = '';\n array_push($idtemplates, $ni);\n }\n $app->getLog()->debug('admin_get_idtemplates ' . var_export($idtemplates, true));\n $app->render('admin_idtemplates.html', [\n 'page' => mkPage(getMessageString('admin_idtemplates'), 0, 2),\n 'templates' => $idtemplates,\n 'isadmin' => is_admin()]);\n}", "public function getTemplates2()\n {\n return $this->hasMany(Template::className(), ['description_id' => 'id']);\n }", "function get_template_data($conditions_array=array(),$rows_per_page=10,$start=0)\n\t{\n\t\t$rows=array();\n\t\t$this->db->order_by('id');\n\t\t$result=$this->db->get_where('red_diy_templates',$conditions_array,$rows_per_page,$start);\n\t\tforeach($result->result_array() as $row)\n\t\t{\n\t\t\t$rows[]=$row;\n\t\t}\n\t\treturn $rows;\n\t}", "public static function get_templates($conn, $from = 0, $max = 20, $search = '') \n {\n Ossim_db::check_connection($conn);\n \n $list = array();\n \n $num_rows = 0;\n \n // Filter if am i proadmin\n $perms_where = '';\n $users_allowed = array();\n \n if (self::is_pro() && Acl::am_i_proadmin()) \n {\n if (is_array($_SESSION['_user_vision']['users_to_assign'])) \n {\n foreach ($_SESSION['_user_vision']['users_to_assign'] as $user => $perm) \n {\n if ($perm && $user != self::get_session_user())\n { \n $users_allowed[] = $user; \n }\n }\n }\n \n if (count($users_allowed) > 0) \n {\n $perms_where = \"WHERE (id NOT IN (SELECT DISTINCT template_id FROM users) OR id IN (SELECT DISTINCT template_id FROM users WHERE login IN ('\".implode(\"', '\", $users_allowed).\"')))\";\n } \n else \n {\n $perms_where = \"WHERE id NOT IN (SELECT DISTINCT template_id FROM users)\";\n }\n }\n \n //Search filter\n if($search != '' && preg_match('/where/i', $perms_where)) \n {\n $search = preg_replace('/where/i', 'AND', $search);\n }\n \n $query = \"SELECT SQL_CALC_FOUND_ROWS HEX(id) as id, name FROM acl_templates $perms_where $search LIMIT $from, $max\";\n \n $rs = $conn->Execute($query);\n \n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n {\n $total = $conn->Execute('SELECT FOUND_ROWS() AS counter');\n \n if (!$total->EOF) \n {\n $num_rows = $total->fields['counter'];\n }\n \n while (!$rs->EOF) \n {\n // Get users assigned\n $users = array();\n $query = 'SELECT login FROM users WHERE template_id = UNHEX(?)';\n \n $rs_2 = $conn->Execute($query, array($rs->fields['id']));\n \n if (!$rs_2) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n {\n while (!$rs_2->EOF) \n {\n $users[] = $rs_2->fields['login'];\n \n $rs_2->MoveNext();\n }\n }\n \n // Get sections allowed\n $total = $conn->Execute(\"SELECT count(*) AS total FROM acl_perm WHERE type = 'MENU' AND description != '' AND enabled = 1\");\n \n $conf = $GLOBALS['CONF'];\n $av_features = ($conf->get_conf('advanced_features') == 1) ? TRUE : FALSE;\n \n \n // av_features = 1 Enable advanced features\n // 50 = Analysis -> Detection -> Anomalies\n // 80 = Configuration -> Network Discovery\n \n if (!$total->EOF)\n {\n $total_perms = $total->fields['total'];\n $total_perms = ($av_features == TRUE) ? $total_perms : $total_perms-2;\n }\n \n $total_perms = ($total_perms < 1) ? 1 : $total_perms;\n \n $total = $conn->Execute(\"SELECT count(*) AS num FROM acl_templates_perms WHERE ac_templates_id = UNHEX(?)\", array($rs->fields['id']));\n \n if (!$total->EOF) \n {\n $count_perms = $total->fields['num'];\n $count_perms = ($count_perms > $total_perms) ? $total_perms : $count_perms;\n }\n \n $perc = round($count_perms * 100 / $total_perms);\n \n $list[] = array(\n \"id\" => $rs->fields['id'],\n \"name\" => $rs->fields['name'],\n \"users\" => implode(', ', $users),\n \"percent\" => $perc\n );\n \n $rs->MoveNext();\n }\n }\n \n return array($list, $num_rows);\n }", "public function retrieveMessageTemplates()\n {\n return $this->start()->uri(\"/api/message/template\")\n ->get()\n ->go();\n }", "function getTemplates($use_defintion, $template_id = null) {\n\t\t$conditions = array();\n\t\t$find_type = $template_id? 'first' : 'all';\n\t\tswitch($use_defintion) {\n\t\t\tcase 'template edition':\n\t\t\t\t$conditions = array(\n\t\t\t\t\t'OR' => array(\n\t\t\t\t\t\tarray('Template.owner' => 'user', 'Template.owning_entity_id' => AppController::getInstance()->Session->read('Auth.User.id')),\n\t\t\t\t\t\tarray('Template.owner' => 'bank', 'Template.owning_entity_id' => AppController::getInstance()->Session->read('Auth.User.group_id')),\n\t\t\t\t\t\tarray('Template.owner' => 'all')),\t\t\t\n\t\t\t\t\t// Both active and inactive template\n\t\t\t\t\t'Template.flag_system' => false);\n\t\t\t\tif(AppController::getInstance()->Session->read('Auth.User.group_id') == '1') unset($conditions['OR']);\t// Admin can work on all templates\n\t\t\t\tif($template_id) $conditions['Template.id'] = $template_id;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'template use':\n\t\t\t\t$conditions = array(\n\t\t\t\t\t'OR' => array(\n\t\t\t\t\t\tarray('Template.visibility' => 'user', 'Template.visible_entity_id' => AppController::getInstance()->Session->read('Auth.User.id')),\n\t\t\t\t\t\tarray('Template.visibility' => 'bank', 'Template.visible_entity_id' => AppController::getInstance()->Session->read('Auth.User.group_id')),\n\t\t\t\t\t\tarray('Template.visibility' => 'all'),\n\t\t\t\t\t\tarray('Template.flag_system' => true)),\n\t\t\t\t\t'Template.flag_active' => 1);\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tAppController::getInstance()->redirect('/Pages/err_plugin_system_error?method='.__METHOD__.',line='.__LINE__, null, true);\t\n\t\t}\n\t\t\n\t\t$templates = $this->find($find_type, array('conditions' => $conditions));\n\t\tif($templates && $find_type == 'first') {\n\t\t\t$templates['Template']['allow_properties_edition'] = ((AppController::getInstance()->Session->read('Auth.User.group_id') == 1) || (AppController::getInstance()->Session->read('Auth.User.id') == $templates['Template']['created_by']));\n\t\t}\n\t\treturn $templates;\n\t}", "function _get_templates()\n\t{\n\t\t$location = FILESYSTEM_PATH .'modules/customcats/templates/cattemplates/';\n\t\t$filelist=array();\n\t\tif ($handle = opendir($location))\n\t\t{\n\t\t\twhile (false !== ($file = readdir($handle)))\n\t\t\t{\n\t\t\t\tif ($file != \".\" && $file != \"..\" && $file!=\".svn\" && $file!=\"index.htm\")\n\t\t\t\t{\n\t\t\t\t\t$filelist[]=$file;\n\t\t\t\t}\n\t\t\t}\n \t\t\tclosedir($handle);\n\t\t}\n\t\treturn $filelist;\n\t}", "public function actionIndex()\n {\n $model = (new Templates())->getFirstRecordModel();\n $searchModel = new Templates();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $dataProvider->pagination->pageSize = 20;\n\n return $this->render('index', [\n 'firstRecord' => $model,\n 'existRecord' => (new ExistRecordModel())->getExistRecordModel(Templates::class),\n 'disabledAttribute' => true,\n 'dataProvider' => $dataProvider,\n 'filteredColumns' => [],\n 'searchModel' => $searchModel,\n ]);\n }", "public function getTemplates($context = null);", "function getFormTemplates(){\n\t\t$AccessToken = Auth::token();\n\t\t$baseUrl = url . '/api/v1/' . customerAlias . '/' . databaseAlias;\n\t\t$endpoint = '/formtemplates';\n\t\t$request = $baseUrl . $endpoint;\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, array(\n\t\t CURLOPT_HTTPGET => true,\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t\t\t'Authorization: Bearer ' . $AccessToken),\n\t\t CURLOPT_URL => $request,\n\t\t\tCURLOPT_RETURNTRANSFER => 1\n\t\t ));\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $response;\n\t}", "function campaignTemplates() {\n $params = array();\n return $this->callServer(\"campaignTemplates\", $params);\n }", "public function get_all()\n {\n return $this->findAll();\n // return $this->db->table('settings')->get();\n // return $this->builder->get();\n }", "public function getAll()\n {\n return $this->prepare(DB::findAll($this->table));\n }", "public static function msgTemplatesList(){\n $accessToken = WxApi::accessToken();\n $offset = 0;\n $count = 5;\n $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=' . $accessToken;\n $postFields = json_encode(array(\n // \"access_token\" => $accessToken,\n \"offset\" => 0,\n \"count\" => 5,\n ));\n $api = curl_init();\n curl_setopt($api, CURLOPT_URL, $url);\n curl_setopt($api, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($api, CURLOPT_HEADER, false);\n curl_setopt($api, CURLOPT_POST, true);\n curl_setopt($api, CURLOPT_POSTFIELDS, $postFields);\n $listObj = curl_exec($api);\n curl_close($api);\n $listObj = json_decode($listObj);\n if($listObj->errcode != 0){\n return NULL;\n }else{\n return $listObj->list;\n // return json_encode($listObj->list);\n }\n }", "public function get_available_templates($contextid) {\n\n $fs = get_file_storage();\n $files = $fs->get_area_files($contextid, 'mod_surveypro', SURVEYPRO_TEMPLATEFILEAREA, 0, 'sortorder', false);\n if (empty($files)) {\n return array();\n }\n\n $templates = array();\n foreach ($files as $file) {\n $templates[] = $file;\n }\n\n return $templates;\n }", "public function allTemplates(int $user_id) {\n $query = $this->db->select('sta_quiztemplate.id AS qtid,pathname,dbname,dbpropname,qoname')\n ->from('sta_quiz')->join('sta_quiztemplate','sta_quiztemplate.id=sta_quiz.templid')\n ->where('sta_quiz.valid',1)->where('sta_quiz.userid',$user_id)->where('sta_quiz.end IS NOT NULL')\n ->group_by('sta_quiztemplate.id')->order_by('pathname')->get();\n return $query->result();\n }", "public function allPages()\n {\n $this->get('/', function(Request $request, Response $response) {\n $templates = [];\n foreach(new DirectoryIterator($this->basePath . '/src/views/') as $fileInfo) {\n if ($fileInfo->isFile() && strtolower($fileInfo->getExtension()) === 'twig') {\n $baseName = $fileInfo->getBasename('.twig');\n\n $templates[$baseName] = [\n 'name' => $baseName,\n 'has_data' => file_exists($this->basePath . '/src/data/' . $baseName . '.php'),\n ];\n }\n }\n ksort($templates);\n\n return $this->view->render($response, 'app_pages.twig', ['templates' => $templates, 'css_url' => $cssUrl]);\n })->setName('templates.list');\n\n return $this;\n }", "protected function readTemplatePacks() {\n\t\tif ($this->items) {\n\t\t\t$sql = \"SELECT\t\tpack.*, COUNT(template.templateID) AS templates\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_template_pack pack\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_template template\n\t\t\t\tON\t\t(template.templatePackID = pack.templatePackID)\n\t\t\t\tGROUP BY\tpack.templatePackID\n\t\t\t\tORDER BY\t\".($this->sortField != 'templates' ? 'pack.' : '').$this->sortField.\" \".$this->sortOrder;\n\t\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$this->templatePacks[] = $row;\n\t\t\t}\n\t\t}\n\t}", "public function index()\n {\n $templates = $this->templates->paginate('name');\n\n return view('templates.index', compact('templates'));\n }", "public function getAllDocumentTemplates($limit, $offset) {\n $query = Doctrine_Query::create()\n ->select('dtt.*, count(dts.id) AS number, dtv.id as document_template_id')\n ->from('DocumentTemplate dtt')\n ->leftJoin('dtt.DocumentTemplateVersion dtv')\n ->leftJoin('dtv.DocumentTemplateSlot dts')\n ->where('dtt.deleted_at IS NULL')\n ->andWhere('dtv.active_version = ?', 1);\n if($limit != -1 AND $offset != -1) {\n $query->limit($limit)\n ->offset($offset);\n }\n return $query->groupBy('dtt.id')\n ->orderBy('dtt.id desc')\n ->execute();\n }", "public function getAll()\n\t{\n\t\t$args = array('order' => 't.id');\n \t$records = $this->record->findAll($args);\n \treturn $this->model->populateModels($records, 'id');\n\t}", "public function getTemplates($setId) {\n $select = $this->getDatabase()\n ->select()\n ->from(self::TEMPLATES_TABLE)\n ->where('statisticSetId = ?', $setId);\n\n $data = $select->fetchAll();\n\n $result = array();\n foreach ($data as $item) {\n $result[] = (int)$item['statisticTemplateId'];\n }\n\n return $result;\n }", "public function getAll(){\n \n // 1. Establece la conexion con la base de datos y trae todos los generos\n $query = $this->getDb()->prepare(\" SELECT * FROM genero\");\n $query-> execute(); \n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "public function fetchAll() {\n\t\t$queryBuilder = $this->db->createQueryBuilder();\n\t\t$queryBuilder\n\t\t\t->select('*')\n\t\t\t->from($this->table_name, 't1')\n\t\t;\n\t\t$result = $queryBuilder->execute()->fetchAll();\n\n\t\treturn $result;\n\t}", "public function getTemplateSet(){\n\t\treturn $this->templateSet;\n\t}", "public function GetTemplatesFromDB(GetTemplatesFromDB $parameters)\n {\n return $this->__soapCall('GetTemplatesFromDB', array($parameters));\n }", "static public function listTemplates($type)\n {\n $templates = array();\n\n $_templates = Horde::loadConfiguration('templates.php', '_templates', 'whups');\n foreach ($_templates as $name => $info) {\n if ($info['type'] == $type) {\n $templates[$name] = $info['name'];\n }\n }\n\n return $templates;\n }", "public function viewProvider()\n {\n $config = $this->getMartyConfig();\n $templateDir = $config['templateDir'];\n $templates = [];\n $it = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($templateDir));\n /** @var \\SplFileInfo $file */\n foreach ($it as $file) {\n if ($file->isFile() && $file->getExtension() == 'tpl') {\n $templateName = substr($file->getPathname(), strlen($templateDir) + 1);\n $templateId = str_replace(['/', '.tpl'], ['.', ''], $templateName);\n $templates[$templateId] = [$templateName];\n }\n }\n\n return $templates;\n }", "protected function _loadTemplates()\n {\n $this->_tpl = array();\n $dir = Solar_Class::dir($this, 'Data');\n $list = glob($dir . '*.php');\n foreach ($list as $file) {\n \n // strip .php off the end of the file name to get the key\n $key = substr(basename($file), 0, -4);\n \n // load the file template\n $this->_tpl[$key] = file_get_contents($file);\n \n // we need to add the php-open tag ourselves, instead of\n // having it in the template file, becuase the PEAR packager\n // complains about parsing the skeleton code.\n // \n // however, only do this on non-view files.\n if (substr($key, 0, 4) != 'view') {\n $this->_tpl[$key] = \"<?php\\n\" . $this->_tpl[$key];\n }\n }\n }", "public function getAll()\n {\n return $this->tables;\n }", "public function get_templ_db(array $templids) {\n assert(!empty($templids));\n\n // We take the last entry, presumably the most current\n $query = $this->db\n ->select('dbname,dbpropname,qoname')\n ->where_in('id',$templids)\n ->order_by('id','DESC')\n ->limit(1)\n ->get('sta_quiztemplate');\n\n return $query->row();\n }", "public static function getTemplate(string $ip)\n {\n return DB::select(\"SELECT id, hotel, data, scheduled, schedule_start_time, schedule_end_time FROM `templates` WHERE hotel IN (SELECT id from hotels WHERE id IN (SELECT hotel FROM nas WHERE nasname = :ip)) AND `activated`='yes' AND `deleted_at` IS NULL \",\n ['ip' => $ip]);\n }", "protected function getTemplatesRequest(){\n\t\t\n\t\t//If the user is logged in\n\t\tif($this->getModel()->checkLogin(true))\n\t\t{\n\t\t\t// Set the state and tell plugins.\n\t\t\t$this->setState('GETTING_TEMPLATES_LIST');\n\t\t\t$this->notifyObservers();\n\t\t\t\n\t\t\t//Gets template data\n\t\t\t$data = $this->getModel()->getFeaturedTemplates();\n\t\t\t\n\t\t\t//Show data\n\t\t\t$this->getView()->showInstallableTemplates($data);\n\t\t}\n\t}", "public function allDatabaseEntrysForTablePagesAction() {\r\n\t\ttry {\r\n\t\t\t$searchPhrase = (string) $this->getModuleData('tx_extracache_manager_searchPhraseForTablePages');\r\n\t\t\t$sqlWhere = $this->createSqlWhereClauseForDbRecords($searchPhrase, array('tstamp','crdate','starttime','endtime')) . Tx_Extracache_System_Persistence_Typo3DbBackend::getSqlWherePartForPagesWithCacheCleanerStrategy();\r\n\t\t\t$this->getView()->assign ( 'allDatabaseEntrysForTablePages', $this->getCacheDatabaseEntryRepositoryForTablePages()->query ( '(tx_extracache_cleanerstrategies!=\\'\\' OR tx_extracache_events!=\\'\\') AND '.$sqlWhere ) );\r\n\t\t\treturn $this->getView()->render ( 'allDatabaseEntrysForTablePages' );\r\n\t\t} catch (Exception $e) {\r\n\t\t\treturn $this->showErrorMessage($e);\r\n\t\t}\r\n\t}", "public static function getAll(){\n $result = DB::dataQuery(\"SELECT * FROM timeslots\");\n return $result;\n }", "public function run()\n {\n // template1\n DB::table('template')->insert([\n 'nombre' => 'plantilla1',\n 'archivo' => 'templates.template1.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '1',\n 'imagen' => 'imagen1.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Diseño Web'\n ]);\n\n // template2\n DB::table('template')->insert([\n 'nombre' => 'plantilla2',\n 'archivo' => 'templates.template2.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '2',\n 'imagen' => 'imagen2.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n // template3\n DB::table('template')->insert([\n 'nombre' => 'plantilla3',\n 'archivo' => 'templates.template3.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '3',\n 'imagen' => 'imagen3.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'E-Commerce'\n ]);\n\n //template4\n DB::table('template')->insert([\n 'nombre' => 'plantilla4',\n 'archivo' => 'templates.template4.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '4',\n 'imagen' => 'imagen4.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template5\n DB::table('template')->insert([\n 'nombre' => 'plantilla5',\n 'archivo' => 'templates.template5.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '5',\n 'imagen' => 'imagen5.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template6\n DB::table('template')->insert([\n 'nombre' => 'plantilla6',\n 'archivo' => 'templates.template6.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '6',\n 'imagen' => 'imagen6.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template7\n DB::table('template')->insert([\n 'nombre' => 'plantilla7',\n 'archivo' => 'templates.template7.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '7',\n 'imagen' => 'imagen7.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template8\n DB::table('template')->insert([\n 'nombre' => 'plantilla8',\n 'archivo' => 'templates.template8.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '8',\n 'imagen' => 'imagen8.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template9\n DB::table('template')->insert([\n 'nombre' => 'plantilla9',\n 'archivo' => 'templates.template9.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '9',\n 'imagen' => 'imagen9.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template3\n DB::table('template')->insert([\n 'nombre' => 'plantilla10',\n 'archivo' => 'templates.template10.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '10',\n 'imagen' => 'imagen10.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template3\n DB::table('template')->insert([\n 'nombre' => 'plantilla11',\n 'archivo' => 'templates.template11.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '11',\n 'imagen' => 'imagen11.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template3\n DB::table('template')->insert([\n 'nombre' => 'plantilla12',\n 'archivo' => 'templates.template12.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '12',\n 'imagen' => 'imagen12.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n }", "public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function actionIndex()\n {\n $searchModel = new TemplateSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->get());\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }", "public static function getAll()\n {\n try {\n $db = static::getDB();\n $stmt = $db->query('SELECT id, title, content FROM posts ORDER BY created_at');\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n return $results;\n \n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }", "static function getTemplates($id) {\n return EmailmarketingTemplates::includedInCampaign($id);\n }" ]
[ "0.8587745", "0.8293541", "0.7671164", "0.7665918", "0.753087", "0.73570216", "0.7201601", "0.71520114", "0.70985746", "0.70741546", "0.7063972", "0.7042091", "0.702012", "0.6945892", "0.6940633", "0.6890929", "0.68672633", "0.67723876", "0.67228", "0.67060196", "0.670375", "0.6700436", "0.66305", "0.6628975", "0.66134757", "0.6595926", "0.6563817", "0.6563817", "0.6536245", "0.6452933", "0.6397207", "0.6375441", "0.63650894", "0.63192403", "0.6315983", "0.63127714", "0.6308352", "0.62590635", "0.6247063", "0.6242283", "0.6235053", "0.6210148", "0.61749446", "0.6173006", "0.6163467", "0.61456466", "0.6121931", "0.6083755", "0.6069371", "0.60486525", "0.6035512", "0.60163", "0.601047", "0.5994597", "0.5988729", "0.5978003", "0.5977398", "0.59751076", "0.59599125", "0.594184", "0.59369725", "0.59156346", "0.5907993", "0.58734363", "0.5863506", "0.58441424", "0.58432835", "0.58247703", "0.58201694", "0.5819772", "0.5818968", "0.58175105", "0.5815159", "0.5809263", "0.5807958", "0.58073324", "0.58048654", "0.5789608", "0.5778532", "0.57694054", "0.5751345", "0.5744728", "0.57434106", "0.57413757", "0.57326984", "0.57322776", "0.57248527", "0.5721963", "0.5720845", "0.5718892", "0.57084846", "0.5707082", "0.5705546", "0.5705546", "0.5705546", "0.5705546", "0.5705546", "0.5705546", "0.56968796", "0.56900054", "0.5688928" ]
0.0
-1
Create new template in DB
public function create(array $data);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreateTemplate() {\n $searchService = $this->getProvider()->get('\\PM\\Search\\Service\\Template'); /* @var $searchService \\PM\\Search\\Service\\Template */\n\n $this->getExecutor()\n ->add(function(Database $database, Request $request) {\n $database->getTransaction()->begin();\n return array('templateData' => $request->getInput());\n })\n ->add('createTemplate', $searchService)\n ->add(function(Database $databasse) {\n $databasse->getTransaction()->commitAll();\n });\n }", "abstract public function createTemplateEntity();", "public function create()\n {\n // * route: /template/create\n }", "public function create()\n {\n // * route: /template/create\n }", "public function savetemplate()\n\t{\n\t\t// Get form data\n\t\t$template_name = ee()->input->get_post('template_name');\n\t\t$template = ee()->input->get_post('json-ld-template-final');\n\n\t\t// Write it to database\n\t\t$data = [\n\t\t\t'template_name' => $template_name,\n\t\t\t'template_text' => $template\n\t\t];\n\n\t\tee()->db->insert('exp_json_ld_templates', $data);\n\n\t\t// return index view\n\t\treturn $this->index();\n\t}", "public function CreateTemplate($tname,$hfname,$tfname) {\r\n\t\t$fhcontents = addslashes(file_get_contents($hfname));\r\n\t\t$ftcontents = addslashes(file_get_contents($tfname));\r\n\t\t$sql = \"insert into templates (t_name, t_html, t_text) values (\\\"$tname\\\",\\\"$fhcontents\\\",\\\"$ftcontents\\\")\";\r\n\t\treturn $this->dbconn->query($sql);\r\n\t}", "public function actionCreate()\n {\n $model = new Template();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function store(TemplateRequest $request)\n {\n $request['template_content'] = $request->editor1;\n Template::create($request->all());\n session()->flash('success', 'Template successfully added');\n if ($request->save == \"save\") {\n\n return redirect('configurations/template');\n } else {\n return redirect('configurations/template/create');\n }\n }", "function saveNew() {\n\t\t$this->prepareForDb(); \n\t\t$query = \"INSERT INTO `\".sql_table('plug_miniforum_templates').\"` \".\n\t\t\t $this->prepareQuery();\t\t\n\t\t\t\t\t\n\t\tsql_query($query);\n }", "public function createTemplate()\n {\n $template_id = $this->app->input->get('template_id');\n $association_id = $this->app->input->get('association_id');\n $association_type = $this->app->input->get('association_type');\n\n $template = $this->getTemplate($template_id);\n\n $current_date = date(\"Y-m-d 00:00:00\");\n\n if (count($template) > 0)\n {\n $event_model = new Event;\n\n foreach ($template as $event)\n {\n unset($event['id']);\n\n $event['association_id'] = $association_id;\n $event['association_type'] = $association_type;\n $event['type'] = \"task\";\n\n $event['due_date'] = DateHelper::formatDBDate(date(\"Y-m-d\",strtotime($current_date.\" +\".$event['day'].\" days\")),false);\n $event['due_date_hour'] = \"00:00:00\";\n\n if (!$event_model->store($event))\n {\n return false;\n }\n }\n }\n\n return true;\n }", "public function createTemplate() {\n\n //save new user\n $project = new $this->projects;\n\n //data\n $project->project_id = -time();\n $project->project_title = request('project_title');\n $project->project_clientid = 0;\n $project->project_creatorid = auth()->id();\n $project->project_description = request('project_description');\n $project->project_categoryid = request('project_categoryid');\n $project->project_date_start = null;\n $project->project_type = 'template';\n\n $project->project_billing_type = (in_array(request('project_billing_type'), ['hourly', 'fixed'])) ? request('project_billing_type') : 'hourly';\n $project->project_billing_rate = (is_numeric(request('project_billing_rate'))) ? request('project_billing_rate') : 0;\n $project->project_billing_estimated_hours = (is_numeric(request('project_billing_estimated_hours'))) ? request('project_billing_estimated_hours') : 0;\n $project->project_billing_costs_estimate = (is_numeric(request('project_billing_costs_estimate'))) ? request('project_billing_costs_estimate') : 0;\n\n //project permissions (make sure same in 'update method')\n $project->clientperm_tasks_view = (request('clientperm_tasks_view') == 'on') ? 'yes' : 'no';\n $project->clientperm_tasks_collaborate = (request('clientperm_tasks_collaborate') == 'on') ? 'yes' : 'no';\n $project->clientperm_tasks_create = (request('clientperm_tasks_create') == 'on') ? 'yes' : 'no';\n $project->clientperm_timesheets_view = (request('clientperm_timesheets_view') == 'on') ? 'yes' : 'no';\n $project->clientperm_expenses_view = (request('clientperm_expenses_view') == 'on') ? 'yes' : 'no';\n $project->assignedperm_tasks_collaborate = (request('assignedperm_tasks_collaborate') == 'on') ? 'yes' : 'no';\n\n //apply custom fields data\n $this->applyCustomFields($project);\n\n //save and return id\n if ($project->save()) {\n return $project->project_id;\n } else {\n Log::error(\"record could not be created - database error\", ['process' => '[ProjectRepository]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n return false;\n }\n }", "public function create()\n {\n $this->load->library('form_validation');\n $this->form_validation->set_rules($this->_validation_rules);\n \n $email_template->is_default = 0;\n \n // Go through all the known fields and get the post values\n foreach($this->_validation_rules as $key => $field)\n {\n $email_template->$field['field'] = $this->input->post($field['field']);\n }\n \n if($this->form_validation->run())\n {\n foreach($_POST as $key => $value)\n {\n $data[$key] = $this->input->post($key);\n }\n unset($data['btnAction']);\n if($this->email_templates_m->insert($data))\n {\n $this->session->set_flashdata('success', sprintf(lang('templates.tmpl_create_success'), $data['name']));\n }\n else\n {\n $this->session->set_flashdata('error', sprintf(lang('templates.tmpl_create_error'), $data['name']));\n }\n redirect('admin/templates');\n }\n \n $this->template->set('email_template', $email_template)\n\t\t\t\t\t\t->title(lang('templates.create_title'))\n ->append_metadata( $this->load->view('fragments/wysiwyg', $this->data, TRUE) )\n ->build('admin/form');\n }", "public function saveTemplateAction()\n {\n \n }", "public function run()\n {\n \\Illuminate\\Support\\Facades\\DB::table('factory_templates')->insert([\n \"name\" => \"nouveau\",\n \"slug\" => \"nouveau-template\",\n \"area_id\" => 0,\n \"email_object\" => \"Objet de mon email\",\n \"email_content\" => \"<p>Je vous propose ma candidature spontanée pour un poste de… . Afin que vous puissiez en savoir plus sur mes compétences et\\\"+\n \\\"mes motivations, je vous joins mon CV et ma lettre de motivation.\\\"+\n \\\"Disponible dans les plus brefs délais, je suis à votre disposition pour d’éventuelles informations complémentaires.\\\"+\n \\\"Cordialement\\\"+\n \\\"Prénom Nom\\\"+\n \\\"Numéro de téléphone</p>\",\n \"object\" => \"Objet de ma lettre\",\n \"content\" => \"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur delectus hic impedit modi, natus soluta totam voluptatibus. Dolores facere illum ipsum iusto nobis officia perspiciatis, quasi suscipit ut velit! Excepturi!\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur numquam rem rerum. Cum dolores eos, iure magni molestias pariatur quae quaerat quam quis, quo quod reiciendis reprehenderit, repudiandae vel voluptatibus.\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad aliquid aperiam cum distinctio doloremque ex exercitationem facere harum numquam odit quia quo ratione rem repudiandae sed, tempore totam, vero, voluptate?\"\n ]);\n }", "public static function addTemplate(Template $oTemplate) { \n\t\t$db = CdtDbManager::getConnection(); \n\n\t\t\n\t\t$ds_template = $oTemplate->getDs_template();\n\t\t\n\t\t$ds_path = $oTemplate->getDs_path();\n\t\t\n\t\t\n\t\t$nu_image = CdtFormatUtils::ifEmpty( $oTemplate->getNu_image(), 'null' );\n\t\t\n\t\t$img_header = $oTemplate->getImg_header();\n\t\t\n\t\t$img_footer = $oTemplate->getImg_footer();\n\t\t\n\t\t$tableName = BOL_TABLE_TEMPLATE;\n\t\t\n\t\t$sql = \"INSERT INTO $tableName (ds_template, ds_path, nu_image, img_footer, img_header) VALUES('$ds_template', '$ds_path', $nu_image, '$img_footer', '$img_header')\"; \n\n\t\t$result = $db->sql_query($sql);\n\t\tif (!$result)//hubo un error en la bbdd.\n\t\t\tthrow new DBException($db->sql_error());\n\n\t\t//seteamos el nuevo id.\n\t\t$cd = $db->sql_nextid();\n $oTemplate->setCd_template( $cd );\n\t}", "public function addTemplate()\n\t{\n\t\t/* Check permission */\n\t\t\\IPS\\Dispatcher::i()->checkAcpPermission( 'template_add_edit' );\n\t\t\n\t\t$type = \\IPS\\Request::i()->type;\n\t\t\n\t\t/* Build form */\n\t\t$form = new \\IPS\\Helpers\\Form();\n\t\t$form->hiddenValues['type'] = $type;\n\t\t\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'template_title', NULL, TRUE, array( 'regex' => '/^([A-Z_][A-Z0-9_]+?)$/i' ), function ( $val ) {\n\t\t\t/* PHP Keywords cannot be used as template names - so make sure the full template name is not in the list */\n\t\t\t$keywords = array( 'abstract', 'and', 'array', 'as', 'break', 'callable', 'case', 'catch', 'class', 'clone', 'const', 'continue', 'declare', 'default', 'die', 'do', 'echo', 'else', 'elseif', 'empty', 'enddeclare', 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', 'eval', 'exit', 'extends', 'final', 'for', 'foreach', 'function', 'global', 'goto', 'if', 'implements', 'include', 'include_once', 'instanceof', 'insteadof', 'interface', 'isset', 'list', 'namespace', 'new', 'or', 'print', 'private', 'protected', 'public', 'require', 'require_once', 'return', 'static', 'switch', 'throw', 'trait', 'try', 'unset', 'use', 'var', 'while', 'xor' );\n\t\t\t\n\t\t\tif ( \\in_array( $val, $keywords ) )\n\t\t\t{\n\t\t\t\tthrow new \\DomainException( \\IPS\\Member::loggedIn()->language()->addToStack( 'template_reserved_word', FALSE, array( 'htmlsprintf' => array( \\IPS\\Member::loggedIn()->language()->formatList( $keywords ) ) ) ) );\n\t\t\t}\n\t\t} ) );\n\n\t\t/* Very specific */\n\t\tif ( $type === 'database' )\n\t\t{\n\t\t\t$groups = array(); /* I was sorely tempted to put 'Radiohead', 'Beatles' in there */\n\t\t\tforeach( \\IPS\\cms\\Databases::$templateGroups as $key => $group )\n\t\t\t{\n\t\t\t\t$groups[ $key ] = \\IPS\\Member::loggedIn()->language()->addToStack( 'cms_new_db_template_group_' . $key );\n\t\t\t}\n\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Select( 'database_template_type', NULL, FALSE, array(\n\t\t\t\t'options' => $groups\n\t\t\t) ) );\n\n\t\t\t$databases = array( 0 => \\IPS\\Member::loggedIn()->language()->addToStack('cms_new_db_assign_to_db_none' ) );\n\t\t\tforeach( \\IPS\\cms\\Databases::databases() as $obj )\n\t\t\t{\n\t\t\t\t$databases[ $obj->id ] = $obj->_title;\n\t\t\t}\n\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Select( 'database_assign_to', NULL, FALSE, array(\n\t\t\t\t'options' => $databases\n\t\t\t) ) );\n\t\t}\n\t\telse if ( $type === 'block' )\n\t\t{\n\t\t\t$plugins = array();\n\t\t\tforeach ( \\IPS\\Db::i()->select( \"*\", 'core_widgets', array( 'embeddable=1') ) as $widget )\n\t\t\t{\n\t\t\t\t/* Skip disabled applications */\n\t\t\t\tif ( !\\in_array( $widget['app'], array_keys( \\IPS\\Application::enabledApplications() ) ) )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$plugins[ \\IPS\\Application::load( $widget['app'] )->_title ][ $widget['app'] . '__' . $widget['key'] ] = \\IPS\\Member::loggedIn()->language()->addToStack( 'block_' . $widget['key'] );\n\t\t\t\t}\n\t\t\t\tcatch ( \\OutOfRangeException $e ) { }\n\t\t\t}\n\t\t\t\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Select( 'block_template_plugin_import', NULL, FALSE, array(\n\t\t\t\t\t'options' => $plugins\n\t\t\t) ) );\n\t\t\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Node( 'block_template_theme_import', NULL, TRUE, array(\n\t\t\t\t'class' => '\\IPS\\Theme'\n\t\t\t) ) );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Page, css, js */\n\t\t\tswitch( $type )\n\t\t\t{\n\t\t\t\tdefault:\n\t\t\t\t\t$flag = \\IPS\\cms\\Theme::RETURN_ONLY_TEMPLATE;\n\t\t\t\tbreak;\n\t\t\t\tcase 'page':\n\t\t\t\t\t$flag = \\IPS\\cms\\Theme::RETURN_PAGE;\n\t\t\t\tbreak;\n\t\t\t\tcase 'js':\n\t\t\t\t\t$flag = \\IPS\\cms\\Theme::RETURN_ONLY_JS;\n\t\t\t\tbreak;\n\t\t\t\tcase 'css':\n\t\t\t\t\t$flag = \\IPS\\cms\\Theme::RETURN_ONLY_CSS;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$templates = \\IPS\\cms\\Theme::i()->getRawTemplates( array(), array(), array(), $flag | \\IPS\\cms\\Theme::RETURN_ALL_NO_CONTENT );\n\n\t\t\t$groups = array();\n\n\t\t\tif ( isset( $templates['cms'][ $type ] ) )\n\t\t\t{\n\t\t\t\tforeach( $templates['cms'][ $type ] as $group => $data )\n\t\t\t\t{\n\t\t\t\t\t$groups[ $group ] = \\IPS\\cms\\Templates::readableGroupName( $group );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! \\count( $groups ) )\n\t\t\t{\n\t\t\t\t$groups[ $type ] = \\IPS\\cms\\Templates::readableGroupName( $type );\n\t\t\t}\n\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Radio( 'theme_template_group_type', 'existing', FALSE, array(\n\t\t\t\t 'options' => array( 'existing' => 'theme_template_group_o_existing',\n\t\t\t\t 'new'\t => 'theme_template_group_o_new' ),\n\t\t\t\t 'toggles' => array( 'existing' => array( 'group_existing' ),\n\t\t\t\t 'new' => array( 'group_new' ) )\n\t\t\t ) ) );\n\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'template_group_new', NULL, FALSE, array( 'regex' => '/^([a-z_][a-z0-9_]+?)?$/' ), NULL, NULL, NULL, 'group_new' ) );\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Select( 'template_group_existing', NULL, FALSE, array( 'options' => $groups ), NULL, NULL, NULL, 'group_existing' ) );\n\t\t}\n\n\t\tif ( ! \\IPS\\Request::i()->isAjax() AND $type !== 'database' )\n\t\t{\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\TextArea( 'template_content', NULL ) );\n\t\t}\n\t\n\t\tif ( $values = $form->values() )\n\t\t{\n\t\t\t$type = \\IPS\\Request::i()->type;\n\n\t\t\tif ( $type == 'database' )\n\t\t\t{\n\t\t\t\t/* We need to copy templates */\n\t\t\t\t$group = \\IPS\\cms\\Databases::$templateGroups[ $values['database_template_type' ] ];\n\t\t\t\t$templates = iterator_to_array( \\IPS\\Db::i()->select( '*', 'cms_templates', array( 'template_location=? AND template_group=? AND template_user_edited=0 AND template_user_created=0', 'database', $group ) ) );\n\n\t\t\t\tforeach( $templates as $template )\n\t\t\t\t{\n\t\t\t\t\tunset( $template['template_id'] );\n\t\t\t\t\t$template['template_original_group'] = $template['template_group'];\n\t\t\t\t\t$template['template_group'] = str_replace( '-', '_', \\IPS\\Http\\Url\\Friendly::seoTitle( $values['template_title'] ) );\n\n\t\t\t\t\t$save = array();\n\t\t\t\t\tforeach( $template as $k => $v )\n\t\t\t\t\t{\n\t\t\t\t\t\t$k = \\mb_substr( $k, 9 );\n\t\t\t\t\t\t$save[ $k ] = $v;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Make sure template tags call the correct group */\n\t\t\t\t\tif ( mb_stristr( $save['content'], '{template' ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tpreg_match_all( '/\\{([a-z]+?=([\\'\"]).+?\\\\2 ?+)}/', $save['content'], $matches, PREG_SET_ORDER );\n\n\t\t\t\t\t\t/* Work out the plugin and the values to pass */\n\t\t\t\t\t\tforeach( $matches as $index => $array )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpreg_match_all( '/(.+?)=' . $array[ 2 ] . '(.+?)' . $array[ 2 ] . '\\s?/', $array[ 1 ], $submatches );\n\n\t\t\t\t\t\t\t$plugin = array_shift( $submatches[ 1 ] );\n\t\t\t\t\t\t\tif ( $plugin == 'template' )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$value = array_shift( $submatches[ 2 ] );\n\t\t\t\t\t\t\t\t$options = array();\n\n\t\t\t\t\t\t\t\tforeach ( $submatches[ 1 ] as $k => $v )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$options[ $v ] = $submatches[ 2 ][ $k ];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ( isset( $options['app'] ) and $options['app'] == 'cms' and isset( $options['location'] ) and $options['location'] == 'database' and isset( $options['group'] ) and $options['group'] == $template['template_original_group'] )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$options['group'] = $template['template_group'];\n\n\t\t\t\t\t\t\t\t\t$replace = '{template=\"' . $value . '\" app=\"' . $options['app'] . '\" location=\"' . $options['location'] . '\" group=\"' . $options['group'] . '\" params=\"' . ( isset($options['params']) ? $options['params'] : NULL ) . '\"}';\n\n\t\t\t\t\t\t\t\t\t$save['content'] = str_replace( $matches[$index][0], $replace, $save['content'] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$newTemplate = \\IPS\\cms\\Templates::add( $save );\n\t\t\t\t}\n\n\t\t\t\tif ( $values['database_assign_to'] )\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$db = \\IPS\\cms\\Databases::load( $values['database_assign_to'] );\n\t\t\t\t\t\t$key = 'template_' . $values['database_template_type'];\n\t\t\t\t\t\t$db->$key = $template['template_group'];\n\t\t\t\t\t\t$db->save();\n\t\t\t\t\t}\n\t\t\t\t\tcatch( \\OutOfRangeException $ex ) { }\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( $type === 'block' )\n\t\t\t{\n\t\t\t\t$save = array(\n\t\t\t\t\t'title'\t => str_replace( '-', '_', \\IPS\\Http\\Url\\Friendly::seoTitle( $values['template_title'] ) ),\n\t\t\t\t\t'params' => isset( $values['template_params'] ) ? $values['template_params'] : null,\n\t\t\t\t\t'location' => $type\n\t\t\t\t);\n\n\t\t\t\t/* Get template */\n\t\t\t\tlist( $widgetApp, $widgetKey ) = explode( '__', $values['block_template_plugin_import'] );\n\n\t\t\t\t/* Find it from the normal template system */\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Application::load( $widgetApp ), $widgetKey, mt_rand(), array() );\n\n\t\t\t\t$location = $plugin->getTemplateLocation();\n\n\t\t\t\t$theme = ( \\IPS\\IN_DEV ) ? \\IPS\\Theme::master() : $values['block_template_theme_import'];\n\t\t\t\t$templateBits = $theme->getRawTemplates( $location['app'], $location['location'], $location['group'], \\IPS\\Theme::RETURN_ALL );\n\t\t\t\t$templateBit = $templateBits[ $location['app'] ][ $location['location'] ][ $location['group'] ][ $location['name'] ];\n\n\t\t\t\t$save['content'] = $templateBit['template_content'];\n\t\t\t\t$save['params'] = $templateBit['template_data'];\n\t\t\t\t$save['group'] = $widgetKey;\n\t\t\t\t$newTemplate = \\IPS\\cms\\Templates::add( $save );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$save = array( 'title' => $values['template_title'] );\n\n\t\t\t\t/* Page, css, js */\n\t\t\t\tif ( $type == 'js' or $type == 'css' )\n\t\t\t\t{\n\t\t\t\t\t$fileExt = ( $type == 'js' ) ? '.js' : ( $type == 'css' ? '.css' : NULL );\n\t\t\t\t\tif ( $fileExt AND ! preg_match( '#' . preg_quote( $fileExt, '#' ) . '$#', $values['template_title'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$values['template_title'] .= $fileExt;\n\t\t\t\t\t}\n\n\t\t\t\t\t$save['title'] = $values['template_title'];\n\t\t\t\t\t$save['type'] = $type;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $type === 'page' AND $values['theme_template_group_type'] == 'existing' AND $values['template_group_existing'] == 'custom_wrappers' )\n\t\t\t\t{\n\t\t\t\t\t$save['params'] = '$html=NULL, $title=NULL';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $type === 'page' AND $values['theme_template_group_type'] == 'existing' AND $values['template_group_existing'] == 'page_builder' )\n\t\t\t\t{\n\t\t\t\t\t$save['params'] = '$page, $widgets';\n\t\t\t\t}\n\n\t\t\t\t$save['group'] = ( $values['theme_template_group_type'] == 'existing' ) ? $values['template_group_existing'] : $values['template_group_new'];\n\n\t\t\t\tif ( isset( $values['template_content'] ) )\n\t\t\t\t{\n\t\t\t\t\t$save['content'] = $values['template_content'];\n\t\t\t\t}\n\n\t\t\t\t$save['location'] = $type;\n\n\t\t\t\t$newTemplate = \\IPS\\cms\\Templates::add( $save );\n\t\t\t}\n\n\t\t\t/* Done */\n\t\t\tif( \\IPS\\Request::i()->isAjax() )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->json( array(\n\t\t\t\t\t'id'\t\t=> $newTemplate->id,\n\t\t\t\t\t'title'\t\t=> $newTemplate->title,\n\t\t\t\t\t'params'\t=> $newTemplate->params,\n\t\t\t\t\t'desc'\t\t=> $newTemplate->description,\n\t\t\t\t\t'container'\t=> $newTemplate->container,\n\t\t\t\t\t'location'\t=> $newTemplate->location\n\t\t\t\t)\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->redirect( \\IPS\\Http\\Url::internal( 'app=cms&module=pages&controller=templates' ), 'saved' );\n\t\t\t}\n\t\t}\n\t\n\t\t/* Display */\n\t\t$title = \\strip_tags( \\IPS\\Member::loggedIn()->language()->get( 'content_template_add_template_' . $type ) );\n\t\t\\IPS\\Output::i()->output = \\IPS\\Theme::i()->getTemplate( 'global', 'core' )->block( $title, $form, FALSE );\n\t\t\\IPS\\Output::i()->title = $title;\n\t}", "public function store()\n {\n DB::table('templates')->insert(\n ['tname' => request('tname'), 'content' => request('content')]\n );\n\n // redirect\n // Session::flash('message', 'Successfully added the template!');\n return Redirect::to('/templates');\n }", "public function saveTemplate ()\n {\n // Recovering template data object\n $template = json_decode(Input::get('template'));\n\n //Defining custom validator to work with $template JSON object and not a Request object\n $validator = Validator::make((array)$template, [\n 'name_template' => array('required', 'regex:/^[a-zA-ZáéíóúÁÉÍÓÚñÑ1-9][a-zA-ZáéíóúÁÉÍÓÚñÑ1-9 ]{3,50}$/'),\n 'html' => array('required'),//,'regex:/((<script>){1}.*(<\\/script>){1})/'\n 'icon' => array('required'),\n 'gridster' => array('required')\n ]);\n\n // Returning fail message if validation fails\n if ($validator->fails()) {\n return response()->json([\n 'status' => 'fail'\n ], 200);\n }\n // Saving template if validation success\n else {\n // If the html have any script tag, delete it\n $html = $template->html;\n if ($html . contains(\"&lt;script&gt;\")) {\n $html = preg_replace('/((&lt;script&gt;){1}.*(&lt;\\/script&gt;){1})/', \"\", $html);\n }\n\n // Save data at database\n Ezz_template::create(array(\n 'name_template' => $template -> name_template,\n 'html' => $html,\n 'html_edit' => $template -> html_edit,\n 'icon' => $template -> icon,\n 'gridster' => $template -> gridster\n ));\n\n // Returning success message\n return response()->json([\n 'status' => 'success'\n ], 200);\n }\n }", "public function store()\n {\n $this->authorize('store', 'Template');\n\n $this->validate($this->request, [\n 'display_name' => 'required|string|min:1|max:255',\n 'category' => 'required|string|min:1|max:255',\n 'template' => 'required|file|mimes:zip',\n 'thumbnail' => 'required|file|image'\n ]);\n\n $params = $this->request->except('template');\n $params['template'] = $this->request->file('template');\n $params['thumbnail'] = $this->request->file('thumbnail');\n\n if ($this->templateLoader->exists($params['display_name'])) {\n return $this->error(['display_name' => 'Template with this name already exists.']);\n }\n\n $this->repository->create($params);\n\n return $this->success([\n 'template' => $this->templateLoader->load($params['display_name'])\n ]);\n }", "public function CreateTemplateForm($tname,$thtml,$ttext) {\r\n\t\t$tname = $this->dbconn->real_escape_string($tname);\r\n\t\t$thtml = $this->dbconn->real_escape_string($thtml);\r\n\t\t$ttext = $this->dbconn->real_escape_string($ttext);\r\n\r\n\t\t$sql = \"insert into templates (t_name, t_html, t_text) values (\\\"$tname\\\",\\\"$thtml\\\",\\\"$ttext\\\")\";\r\n\t\treturn $this->dbconn->query($sql);\r\n\t}", "function createTableToTemplates(){\n\n\tglobal $mysqli,$templatesTableName;\n\n\t$create=\"CREATE TABLE IF NOT EXISTS `$templatesTableName` (\n\t `id` int(8) NOT NULL AUTO_INCREMENT,\n\t `clienteName` varchar(100) NOT NULL,\n\t `method` text NOT NULL,\n\t `created` TIMESTAMP,\n\t PRIMARY KEY (`id`)\n\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1\";\t\n\n\tif (!$mysqli->query($create)) {\n\t\tshowErrors();\n\t}\n\treturn true;\n}", "public function new_template()\n\t{\n\t\tee()->load->library('table');\n\t\tee()->cp->add_to_head('<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css\">');\n\t\tee()->cp->add_to_head('<link rel=\"stylesheet\" href=\"'.$this->theme_url.'css/app.css\" type=\"text/css\" media=\"screen\">');\n\t\tee()->cp->add_to_foot('<script type=\"text/javascript\">var $token = 1;</script>');\n\t\tee()->cp->add_to_foot('<script src=\"'.$this->theme_url.'js/app.js\" type=\"text/javascript\" charset=\"utf-8\"></script>');\n\t\tee()->cp->add_to_foot('<script src=\"'.$this->theme_url.'js/draganddrop.js\" type=\"text/javascript\" charset=\"utf-8\"></script>');\n\n\t\t$this->_data['action_url'] = ee('CP/URL')->make('addons/settings/json_ld/savetemplate');\n\n\t\t$this->_data['templates'] = ee()->jsonld->templates();\n\n\t\t// Get types\n\t\t$this->_data['types'] = ee()->jsonld->types();\n\n\t\treturn ee('View')->make('json_ld:new')->render($this->_data);\n\n\t}", "public function resourceTemplateCreate(Event $event){\n\n $request = $event->getParam('request');\n $operation = $request->getOperation();\n $em = $this->getServiceLocator()->get('Omeka\\EntityManager');\n\n\n if ($operation == 'create') {\n $resource_template = $event->getParam('entity');\n $teams = $em->getRepository('Teams\\Entity\\Team');\n foreach ($request->getContent()['o-module-teams:Team'] as $team_id):\n $team = $teams->findOneBy(['id'=>$team_id]);\n $trt = new TeamResourceTemplate($team,$resource_template);\n $em->persist($trt);\n endforeach;\n $em->flush();\n }\n\n }", "public function store()\n\t{\n\t\t$data = Input::all();\n\t\t$userId = Auth::id();\n\t\t\n\t\t$action = $data['action'];\n\n\t\tif($action == \"save\"){\n\t\t\t//Save template as a new record.\n\t\t\t$nb = UserTemplate::all()->where('user', $userId)->count() + 1;\n\n\t\t\t$temp = new Template;\n\t\t\t$temp->category = $data['cat'];\n\t\t\t$temp->templateName = 'Custom Template #'.$nb;\n\t\t\t$temp->isFavorite = '0';\n\t\t\t$temp->isPredefined = '0';\n\t\t\t$temp->html = $data['html'];\n\t\t\t$temp->css = $data['css'];\n\t\t\t$temp->save();\n\n\t\t\t$ut = new UserTemplate;\n\t\t\t$ut->user = $userId;\n\t\t\t$ut->template = $temp->templateId;\n\t\t\t$ut->save();\n\t\t}\n\t\telse{\n\t\t\t//Edit existing template.\n\t\t\t$temp = Template::find($data['id']);\n\t\t\t$temp->html = $data['html'];\n\t\t\t$temp->save();\n\t\t}\n\n\t\treturn url('/templates');\n\n\t\t// \treturn url('/upload', ['id' => $temp->templateId]);\n\t}", "function insert_template()\n {\n $parameter_array = $this->get_parameter_array();\n \n parent::insert('sssis', $parameter_array);\n }", "public function addTemplate($name, $template)\n\t{\n\t\tglobal $conf;\n\t\t$error = 0;\n\t\t$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'printer_receipt_template';\n\t\t$sql .= ' (name, template, entity) VALUES (\"'.$this->db->escape($name).'\"';\n\t\t$sql .= ', \"'.$this->db->escape($template).'\", '.$conf->entity.')';\n\t\t$resql = $this->db->query($sql);\n\t\tif (!$resql) {\n\t\t\t$error++;\n\t\t\t$this->errors[] = $this->db->lasterror;\n\t\t}\n\t\treturn $error;\n\t}", "public function create()\n\t{\n\t\treturn View::make('file_templates.create')\n\t\t\t\t\t->with('title','Create New Template')\n\t\t\t\t\t->with('activeLink','system_manager');\n\t}", "public function run()\n\t{\n\t\t\\DB::table('pdf_templates')->delete();\n \n\t\t\\DB::table('pdf_templates')->insert(array (\n\t\t\t0 => \n\t\t\tarray (\n\t\t\t\t'id' => 1,\n\t\t\t\t'name' => 'Danh sách công ty',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:19:19',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:23',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t1 => \n\t\t\tarray (\n\t\t\t\t'id' => 2,\n\t\t\t\t'name' => 'Danh sách sản phẩm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Danh S&aacute;ch Sản Phẩm</strong></span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n\n<p>&nbsp;</p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:22:28',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:59',\n\t\t\t\t'oriental' => 'landscape',\n\t\t\t),\n\t\t\t2 => \n\t\t\tarray (\n\t\t\t\t'id' => 3,\n\t\t\t\t'name' => 'Đơn trả nhà cung cấp',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Đơn&nbsp;Trả&nbsp;H&agrave;ng&nbsp;Số {{$id}}</strong></span><br />\n<span style=\"font-size:18px\"><strong>Ng&agrave;y: {{$date}}</strong></span></p>\n\n<p><span style=\"font-size:18px\"><strong>T&ecirc;n nh&agrave; cung cấp:</strong> {{$company_name}} - <strong>ĐC:</strong> {{$address}} - <strong>ĐT:</strong> {{$phone}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\">&nbsp;</td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Nợ cũ</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Toa mới</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Tổng cộng</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$no_cu}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$toa_moi}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$tong_cong}}</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"text-align: center;\">&nbsp;</div>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người nhận h&agrave;ng</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người thu tiền</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người lập</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Trưởng đơn vị</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><br />\n<br />\n<br />\n<br />\n<span style=\"font-size:16px\"><strong>Phan Thị Khuyến Hạnh</strong></span></td>\n</tr>\n</tbody>\n</table>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:36:03',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:54',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t3 => \n\t\t\tarray (\n\t\t\t\t'id' => 4,\n\t\t\t\t'name' => 'Đơn mua hàng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Đơn Mua H&agrave;ng Số {{$id}}</strong></span><br />\n<span style=\"font-size:18px\"><strong>Ng&agrave;y: {{$date}}</strong></span></p>\n\n<p><span style=\"font-size:18px\"><strong>T&ecirc;n nh&agrave; cung cấp:</strong> {{$company_name}} - <strong>ĐC:</strong> {{$address}} - <strong>ĐT:</strong> {{$phone}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\">&nbsp;</td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Nợ cũ</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Toa mới</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Tổng cộng</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$no_cu}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$toa_moi}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$tong_cong}}</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"text-align: center;\">&nbsp;</div>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người nhận h&agrave;ng</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người thu tiền</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người lập</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Trưởng đơn vị</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><br />\n<br />\n<br />\n<br />\n<span style=\"font-size:16px\"><strong>Phan Thị Khuyến Hạnh</strong></span></td>\n</tr>\n</tbody>\n</table>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:36:27',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:43',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t4 => \n\t\t\tarray (\n\t\t\t\t'id' => 5,\n\t\t\t\t'name' => 'Đơn hàng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Đơn H&agrave;ng {{$id}}</strong></span><br />\n<span style=\"font-size:18px\"><strong>Ng&agrave;y: {{$date}}</strong></span></p>\n\n<p><span style=\"font-size:18px\"><strong>T&ecirc;n nh&agrave; cung cấp:</strong> {{$company_name}} - <strong>ĐC:</strong> {{$address}} - <strong>ĐT:</strong> {{$phone}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\">&nbsp;</td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Nợ cũ</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Toa mới</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Tổng cộng</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$no_cu}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$toa_moi}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$tong_cong}}</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"text-align: center;\">&nbsp;</div>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người nhận h&agrave;ng</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người thu tiền</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người lập</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Trưởng đơn vị</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><br />\n<br />\n<br />\n<br />\n<span style=\"font-size:16px\"><strong>Phan Thị Khuyến Hạnh</strong></span></td>\n</tr>\n</tbody>\n</table>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:36:43',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:16',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t5 => \n\t\t\tarray (\n\t\t\t\t'id' => 6,\n\t\t\t\t'name' => 'Đơn hàng đại lý trả',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Đơn H&agrave;ng Đại L&yacute; Trả&nbsp;{{$id}}</strong></span><br />\n<span style=\"font-size:18px\"><strong>Ng&agrave;y: {{$date}}</strong></span></p>\n\n<p><span style=\"font-size:18px\"><strong>T&ecirc;n nh&agrave; cung cấp:</strong> {{$company_name}} - <strong>ĐC:</strong> {{$address}} - <strong>ĐT:</strong> {{$phone}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\">&nbsp;</td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Nợ cũ</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Toa mới</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Tổng cộng</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$no_cu}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$toa_moi}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$tong_cong}}</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"text-align: center;\">&nbsp;</div>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người nhận h&agrave;ng</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người thu tiền</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người lập</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Trưởng đơn vị</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><br />\n<br />\n<br />\n<br />\n<span style=\"font-size:16px\"><strong>Phan Thị Khuyến Hạnh</strong></span></td>\n</tr>\n</tbody>\n</table>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:37:01',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:25',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t6 => \n\t\t\tarray (\n\t\t\t\t'id' => 7,\n\t\t\t\t'name' => 'Danh sách đại lý trả',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Danh S&aacute;ch Đại L&yacute; Trả</strong></span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:37:52',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:32',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t7 => \n\t\t\tarray (\n\t\t\t\t'id' => 8,\n\t\t\t\t'name' => 'Danh sách đơn hàng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Danh S&aacute;ch Đơn H&agrave;ng</strong></span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:38:01',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:43',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t8 => \n\t\t\tarray (\n\t\t\t\t'id' => 9,\n\t\t\t\t'name' => 'Danh sách mua hàng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Danh S&aacute;ch Mua&nbsp;H&agrave;ng</strong></span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:38:13',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:50',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t9 => \n\t\t\tarray (\n\t\t\t\t'id' => 10,\n\t\t\t\t'name' => 'Danh sách trả NCC',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Danh S&aacute;ch Trả H&agrave;ng NCC</strong></span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:38:21',\n\t\t\t\t'updated_at' => '2015-08-07 16:39:09',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t10 => \n\t\t\tarray (\n\t\t\t\t'id' => 11,\n\t\t\t\t'name' => 'Công nợ NCC',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>C&ocirc;ng nợ&nbsp;nh&agrave; cung cấp {{$company_name}}</strong><br />\nTh&aacute;ng {{$month}} Năm {{$year}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:50:13',\n\t\t\t\t'updated_at' => '2015-08-07 16:37:55',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t11 => \n\t\t\tarray (\n\t\t\t\t'id' => 12,\n\t\t\t\t'name' => 'Công nợ NCC tháng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">C&ocirc;ng nợ&nbsp;nh&agrave; cung cấp&nbsp;th&aacute;ng {{$month}} năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:50:45',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:11',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t12 => \n\t\t\tarray (\n\t\t\t\t'id' => 13,\n\t\t\t\t'name' => 'Công nợ NCC năm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">C&ocirc;ng nợ&nbsp;nh&agrave; cung cấp năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:50:52',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:03',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t13 => \n\t\t\tarray (\n\t\t\t\t'id' => 14,\n\t\t\t\t'name' => 'Công nợ KH năm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">C&ocirc;ng nợ&nbsp;kh&aacute;ch h&agrave;ng&nbsp;năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:05',\n\t\t\t\t'updated_at' => '2015-08-07 16:37:17',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t14 => \n\t\t\tarray (\n\t\t\t\t'id' => 15,\n\t\t\t\t'name' => 'Công nợ KH tháng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">C&ocirc;ng nợ&nbsp;kh&aacute;ch h&agrave;ng&nbsp;th&aacute;ng {{$month}} năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:09',\n\t\t\t\t'updated_at' => '2015-08-07 16:37:43',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t15 => \n\t\t\tarray (\n\t\t\t\t'id' => 16,\n\t\t\t\t'name' => 'Công nợ KH',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>C&ocirc;ng nợ&nbsp;kh&aacute;ch h&agrave;ng&nbsp;{{$company_name}}</strong><br />\nTh&aacute;ng {{$month}} Năm {{$year}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:14',\n\t\t\t\t'updated_at' => '2015-08-07 16:37:02',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t16 => \n\t\t\tarray (\n\t\t\t\t'id' => 17,\n\t\t\t\t'name' => 'Doanh thu KH',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Doanh thu kh&aacute;ch h&agrave;ng&nbsp;{{$company_name}}</strong><br />\nTh&aacute;ng {{$month}} Năm {{$year}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:44',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:09',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t17 => \n\t\t\tarray (\n\t\t\t\t'id' => 18,\n\t\t\t\t'name' => 'Doanh thu KH tháng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.com/http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">Doanh số&nbsp;nh&agrave; cung cấp&nbsp;th&aacute;ng {{$month}} năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:50',\n\t\t\t\t'updated_at' => '2015-07-31 15:32:08',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t18 => \n\t\t\tarray (\n\t\t\t\t'id' => 19,\n\t\t\t\t'name' => 'Doanh thu KH năm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.com/http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">Doanh thu kh&aacute;ch h&agrave;ng&nbsp;năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:56',\n\t\t\t\t'updated_at' => '2015-07-31 08:57:29',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t19 => \n\t\t\tarray (\n\t\t\t\t'id' => 20,\n\t\t\t\t'name' => 'Doanh số nhân viên',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Doanh số nh&acirc;n vi&ecirc;n&nbsp;{{$user_name}}</strong><br />\nTh&aacute;ng {{$month}} Năm {{$year}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:52:08',\n\t\t\t\t'updated_at' => '2015-08-07 16:39:50',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t20 => \n\t\t\tarray (\n\t\t\t\t'id' => 21,\n\t\t\t\t'name' => 'Doanh số sản phẩm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">Doanh số sản phẩm&nbsp;th&aacute;ng {{$month}} năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:52:15',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:02',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t21 => \n\t\t\tarray (\n\t\t\t\t'id' => 22,\n\t\t\t\t'name' => 'Doanh số NCC',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Doanh số nh&agrave; cung cấp&nbsp;{{$company_name}}</strong><br />\nTh&aacute;ng {{$month}} Năm {{$year}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '2015-08-07 16:39:19',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t22 => \n\t\t\tarray (\n\t\t\t\t'id' => 23,\n\t\t\t\t'name' => 'Doanh số NCC tháng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">Doanh số&nbsp;nh&agrave; cung cấp&nbsp;th&aacute;ng {{$month}} năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '2015-08-07 16:39:43',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t23 => \n\t\t\tarray (\n\t\t\t\t'id' => 24,\n\t\t\t\t'name' => 'Doanh số NCC năm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">Doanh số nh&agrave; cung cấp&nbsp;năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '2015-08-07 16:39:35',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t));\n\t}", "public function createDataSetTemplate()\n\t{\n\t\tif (!$this->system->user->hasAdminPermissions('data_set_templates', 'create_data_set_template')) {\n\t\t\treturn Redirect::route('admin.data-set-templates');\n\t\t}\n\t\tif ($this->input) {\n\t\t\t$data_set_template = \\DataSetTemplatesHelper::extractDataSetTemplatesFromInput($this->input)->first();\n\t\t\tif (DataSetTemplatesRepository::write($data_set_template)) {\n\t\t\t\t$this->system->messages->add(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'success' => array(\n\t\t\t\t\t\t\t'You successfully created the Data Set Template \"' . $data_set_template->name() . '\".',\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)->flash();\n\t\t\t\treturn Redirect::route('admin.data-set-templates');\n\t\t\t}\n\t\t\t$this->system->messages->add(DataSetTemplatesRepository::messages()->toArray());\n\t\t} else {\n\t\t\t$data_set_template = DataSetTemplatesRepository::newModel();\n\t\t}\n\t\t$messages = $this->system->messages->get();\n\t\treturn View::make(\n\t\t\t'data::data_set_templates.create',\n\t\t\tcompact('messages', 'data_set_template')\n\t\t);\n\t}", "public function save()\n\t{\n\t\t$db = App\\Db::getInstance();\n\t\t$templateId = $this->getId();\n\t\t$share = static::getShareFromArray($this->get('share'));\n\t\tif (empty($templateId)) {\n\t\t\t$db->createCommand()\n\t\t\t\t->insert('vtiger_trees_templates', ['name' => $this->get('name'), 'module' => $this->get('module'), 'share' => $share])\n\t\t\t\t->execute();\n\t\t\t$this->set('templateid', $db->getLastInsertID('vtiger_trees_templates_templateid_seq'));\n\t\t\tforeach ($this->get('tree') as $tree) {\n\t\t\t\t$this->insertData($tree, 0, '');\n\t\t\t}\n\t\t} else {\n\t\t\t$db->createCommand()\n\t\t\t\t->update('vtiger_trees_templates', ['name' => $this->get('name'), 'module' => $this->get('module'), 'share' => $share], ['templateid' => $templateId])\n\t\t\t\t->execute();\n\t\t\t$db->createCommand()->delete('vtiger_trees_templates_data', ['templateid' => $templateId])\n\t\t\t\t->execute();\n\t\t\tforeach ($this->get('tree') as $tree) {\n\t\t\t\t$this->insertData($tree, 0, '');\n\t\t\t}\n\t\t}\n\t\tif ($this->get('replace')) {\n\t\t\t$this->replaceValue($this->get('replace'), $templateId);\n\t\t}\n\t\t$this->clearCache();\n\t}", "public function actionCreate()\n {\n $model = new NotificationsTemplate();\n\n if ($model->load(\\Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'key' => $model->key]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function store_email_template(Request $request)\n\t{\n\t\t\n\t\t\n\t\t$arr_rules = $arr_data = array();\n\t\t$status = false;\n\n\t\t$arr_rules['page_title'] \t= \"required\";\n\t\t$arr_rules['meta_title'] \t= \"required\";\n\t\t$arr_rules['meta_keyword'] = \"required\";\n\t\t$arr_rules['meta_description'] = \"required\";\n\t\t$arr_rules['content'] \t \t= \"required\";\n\t\n\t\t$validator = Validator::make($request->all(),$arr_rules);\n\n\t\tif($validator->fails()) \n\t\t{\n\t\t\treturn redirect()->back()->withErrors($validator)->withInput();\n\t\t}\n\n\n\t\t$arr_data['page_title'] \t\t\t\t= $request->input('page_title', null);\t\n\t\t$arr_data['meta_title']\t \t\t\t= $request->input('meta_title', null);\t\n\t\t$arr_data['meta_keyword']\t \t\t\t= $request->input('meta_keyword', null);\t\n\t\t$arr_data['meta_description']\t \t= $request->input('meta_description', null);\t\n\t\t$arr_data['page_description']\t \t= $request->input('content', null);\t\n\n\t\t$title_slug \t\t\t\t\t\t\t= strtolower(trim($arr_data[\"page_title\"]));\n\t\t$slug \t\t\t\t\t\t\t\t= str_slug($title_slug);\n\n\t\t$arr_data['slug'] \t\t\t\t\t\t=\t$slug;\n\n\n\t\t$status = $this->BaseModel->create($arr_data);\n\n\t\tif($status)\n\t\t{\n\t\t\tSession::flash('success', 'Template added successfully.');\n\t\t\treturn redirect($this->module_url_path);\n\t\t}\n\n\t\tSession::flash('error', 'Error while adding Template.');\n\t\treturn redirect($this->module_url_path);\n\t}", "public function createPageUsingTemplateObject()\n\t{\n\t\tglobal $tpl, $lng, $ilCtrl;\n\n\t\t$form = $this->initTemplateSelectionForm();\n\t\tif ($form->checkInput())\n\t\t{\n\t\t\t$a_page = $_POST[\"page\"];\n\t\t\t$this->object->createWikiPage($a_page, (int) $_POST[\"page_templ\"]);\n\n\t\t\t// redirect to newly created page\n\t\t\t$ilCtrl->setParameterByClass(\"ilwikipagegui\", \"page\", ilWikiUtil::makeUrlTitle(($a_page)));\n\t\t\t$ilCtrl->redirectByClass(\"ilwikipagegui\", \"edit\");\n\n\t\t\tilUtil::sendSuccess($lng->txt(\"msg_obj_modified\"), true);\n\t\t\t$ilCtrl->redirect($this, \"\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form->setValuesByPost();\n\t\t\t$tpl->setContent($form->getHtml());\n\t\t}\n\t}", "public function createTemplate(object $parameters, object $data, object $headers): object\n {\n $this->checkParameters(['template'], $data);\n $this->checkParameters(['name', 'active', 'data'], $data->template);\n\n // Save template into DB\n $template = new Template();\n $template->fill((array)$data->template);\n $template->save();\n\n $data->template = $template;\n\n return $data;\n }", "public function create(Request $request)\n {\n EmailTemplate::create($request->all());\n return redirect('email/template/view');\n }", "public function create()\n {\n $json = [\n 'status' => false,\n 'message' => 'You cannot create post',\n ];\n\n if($this->isUserAuth()){\n $template = new Template();\n\n $template->data['post_id'] = 0;\n\n $json = [\n 'status' => true,\n 'html' => $template->fetch('add_post_form'),\n ];\n }\n\n $this->jsonAnswer($json);\n }", "public function template();", "public function createTemplate(Request $request)\n {\n if(!$request->_name || !$request->_subject || !$request->_email_template)\n {\n return 'no main content';\n }\n\n // save the email template\n // create the email object\n $passID = Email::makeNewEmail($this->user, $request, false);\n\n return redirect('/use/'.base64_encode($passID->id));\n }", "public function actionCreate()\n {\n $model = new PrintTemplate();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', __('Your changes have been saved successfully.'));\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n $model->validate(['margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'wrapper']);\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function store(StoreFormRequest $request)\n {\n\n $template = new Template([\n 'nome' => $request->get('nome'),\n 'descricao' => $request->get('descricao'),\n 'altura'=> $request->get('altura'),\n 'largura'=> $request->get('largura')\n ]);\n \n $template->save();\n return redirect('/template')->with('success', 'Template cadastrado com sucesso!');\n }", "public function run()\n\t{\n\t\tModel::unguard();\n\t\t$data = [\n\t\t\t'slug' => 'slug',\n\t\t\t'title' => 'title', \n\t\t\t'subject' => 'subject',\n\t\t\t'body' => 'body',\n\t\t\t'descriptions' => 'descriptions',\n\t\t];\n\n\t\t $this->emailtemplatemanagement->create($data);\n\t}", "public function store() {\n $template = Template::create(Request::all());\n return $template;\n }", "public function actionCreate()\n {\n $model = $searchModel = new Templates();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $dataProvider->pagination->pageSize = 20;\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->created_by = Yii::$app->user->id;\n $model->created_at = $model->updated_at = time();\n $companyId = Company::getCompanyIdBySubdomain();\n\n if ($companyId == 'main') {\n $model->company_id = 0;\n } else {\n $model->company_id = $companyId;\n }\n\n if ($model->save()) {\n if (Templates::find()->where(['id' => $model->id])->exists())\n return $this->redirect(['view', 'id' => $model->id]);\n else\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('index', [\n 'firstRecord' => $model,\n 'disabledAttribute' => false,\n 'dataProvider' => $dataProvider,\n 'filteredColumns' => [],\n 'searchModel' => $searchModel,\n ]);\n }", "public function create()\n {\n return View::make('admin::admin.templates.create')\n ->with('title','Create a new templates');\n }", "public function store(TemplateRequest $request)\n {\n $this->template->store($request);\n }", "public function run()\n {\n \\Illuminate\\Support\\Facades\\DB::table('payroll_templates')->insert([\n [\n\n 'name' => 'Default',\n 'notes' => 'Default Payroll Template',\n 'picture' => 'default_payroll_template',\n ],\n\n ]);\n }", "function saveTemplate($msg, $account){\n\t\tglobal $db;\n\t\t$statement = $db->prepare('INSERT INTO msg_template (msg, accountID) VALUES (:msg, :account)');\n\t\t$statement->execute(array(':msg' =>$msg, ':account'=>$account));\n\t}", "public function store()\n {\n $input = Input::all();\n $validation = Validator::make($input, Template::$rules);\n\n if ($validation->passes())\n {\n $title = Input::get('title');\n $dir = Input::get('directory');\n if(File::isDirectory($this->fe_path.$dir)){\n File::deleteDirectory($this->fe_path.$dir);\n }\n File::makeDirectory($this->fe_path.$dir);\n File::makeDirectory($this->fe_path.$dir.'/layouts');\n $this->template->create($input);\n\n return Redirect::route('admin.templates.index');\n }\n\n return Redirect::route('admin.templates.create')\n ->withInput()\n ->withErrors($validation)\n ->with('message', 'There were validation errors.');\n }", "public function resavetemplate()\n\t{\n\t\t// Get form data\n\t\t$template_id = ee()->input->get_post('json-ld-template-id');\n\t\t$template_name = ee()->input->get_post('template_name');\n\t\t$template = ee()->input->get_post('json-ld-template-final');\n\n\t\t// Write it to database\n\t\t$data = [\n\t\t\t'template_name' => $template_name,\n\t\t\t'template_text' => $template\n\t\t];\n\n\t\tee()->db->update('exp_json_ld_templates', $data, ['id' => $template_id]);\n\n\t\t// return index view\n\t\treturn $this->index();\n\t}", "public function setTemplate($val){ return $this->setField('template',$val); }", "public function addToTemplate($request, $user)\n {\n DB::table(Task::table)->where(Task::title, $request->title)\n ->where(Task::creator_user_id, $user->id)\n ->where(Task::is_template, true)->delete();\n\n $request->is_template = true;\n $templateTask = $this->addTask($request, $user);\n $templateTask->save();\n\n $this->addTaskStatusLog($templateTask, $user);\n\n if ($request->file) {\n $requestCollectionObj = $this->getRequestCollectionObject($request->file('file'));\n $taskFileArray = $this->taskFileUpload($requestCollectionObj, $templateTask, $request->org_slug);\n TaskFile::insert($taskFileArray);\n }\n\n //existing template files\n if ($request->existingFiles) {\n $requestCollectionObj = $this->getRequestCollectionObject($request->existingFiles);\n $taskFileArray = $this->templateFileUpload($requestCollectionObj, $templateTask, $request->org_slug);\n TaskFile::insert($taskFileArray);\n\n }\n\n if ($request->checklist) {\n $requestCollectionObj = $this->getRequestCollectionObject($request->checklist);\n $checklistArray = $this->addCheckList($requestCollectionObj, $templateTask, $user);\n TaskChecklists::insert($checklistArray);\n }\n\n if ($request->participants) {\n $requestCollectionObj = $this->getRequestCollectionObject($request->participants);\n $participantListArray = $this->addParticipants($requestCollectionObj, $templateTask, $user);\n TaskParticipants::insert($participantListArray);\n } /*else {\n $requestCollectionObj = $this->getRequestCollectionObject($user->slug);\n $participantListArray = $this->addParticipants($requestCollectionObj, $templateTask, $user);\n TaskParticipants::insert($participantListArray);\n }*/\n\n if ($request->repeatable) {\n $requestCollectionObj = $this->getRequestCollectionObject($request->repeatable);\n $this->repeatable($requestCollectionObj, $templateTask, $user);\n }\n }", "public function store(Template $template, TemplateRequest $templateRequest)\n {\n $template->create($templateRequest->all());\n\n return redirect()->route('template.index', compact('compaign'));//->with('me');\n }", "public function create()\n {\n $templates = Template::orderBy('order')->get();\n return view('params::activeTemplate.new', ['templates' => $templates]);\n }", "public function create()\n {\n // I skip using this create function because I use a modal form for inserting data using modal in index view via index function.\n }", "public function store(Request $request) {\n $data = $request->validate([\n 'description' => 'required|max:100',\n 'category_id' => 'required',\n 'amount' => 'required',\n 'date' => 'required',\n 'time' => 'required',\n ]);\n\n $template = new Template();\n $template->user_id = Auth::id();\n $template->description = $data['description'];\n $template->amount = $data['amount'];\n $template->datetime = $data['date'] . ' ' . $data['time'] . ':00';\n $template->category_id = $data['category_id'];\n $template->save();\n\n return redirect(route('template.index'));\n }", "public function create() {\r\n require $this->views_folder . 'create.php';\r\n }", "public function saveTemplate($onlyIfUpdated = false) {}", "public function create()\n {\n return view('templates.create');\n }", "public function create()\n {\n return view('templates.create');\n }", "public function create()\n {\n return view('ContractTemplate.create');\n }", "function savetemplate($tempname,$gridcount,$rowdata,$coldata,$widthdata,$heightdata)\n\t{\n\t $smarty = new Smarty;\n\t $createDateTime = date(\"Y-m-d H:i:s\");\n\t \n\t //Getting the value of Auto-Incremented field\n\t $sql = \"SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_NAME = 'tb_template' AND TABLE_SCHEMA = '\".DATABASE.\"'\";\n\t $result = mysql_query($sql);\n\t $row=mysql_fetch_assoc($result);\n\t $tempid = $row['AUTO_INCREMENT']; \n\t \n\t //Creating Template Data\n\t $sql1=\"insert into tb_template values('','\".$tempname.\"','\".$gridcount.\"','\".$createDateTime.\"','1')\";\n\t mysql_query($sql1);\n\t \n\t\t//Creating the Grid data\n\t\t for($x=1;$x<=$gridcount;$x++)\n\t\t {\n\t\t $sql3=\"insert into tb_grids values('','\".$tempid.\"','\".$rowdata[$x].\"','\".$coldata[$x].\"','\".$heightdata[$x].\"','\".$widthdata[$x].\"','\".$createDateTime.\"','1')\";\n\t\t mysql_query($sql3);\n\t\t }\n\t\t \n\t//If the process was successfull\t \n\theader('Location: /thrill.adminpanel/index.php?action=showsuccess');\n\t}", "public function create()\n\t{\n\t\t$image = $this->uploadImage();\n if ($image) {\n $this->data('image', $image);\n }\n\t\t$this->data([\n\t\t\t'story_title' => $this->request->post('story_title'),\n\t\t\t'story_name' => $this->request->post('story_name'),\n\t\t\t'details' => $this->request->post('details'),\n\t\t\t'status' => $this->request->post('status'),\n\t\t\t'created_at' => date('Y-m-d H:i:s'),\n\t\t])->insert($this->table);\n\t}", "public function AddTemplate($template, $name=NULL){\n if(!isset($name)){\n $name = 'Tid'.(sizeof($this->template)+1);\n }\n $this->template[$name] = $template; // $this->envir->loadTemplate($template);\n if(sizeof($this->template)==1){\n $this->mystart_template = $name;\n }\n return $name;\n }", "protected function _createEntity()\n\t\t{\n\t\t\t// Form template name.\n\t\t\t$separator = '__';\n\t\t\t$template = $type = $this->_createForm->type->getValue();\n\t\t\t$subject = $this->_createForm->subject->getValue();\n\t\t\tif ( $platformId = $this->_createForm->platform_id->getValue() ) {\n\t\t\t\t$platform = Table::_( 'platforms' )->get( $platformId );\n\t\t\t\t$template = $platform->name . $separator . $template;\n\t\t\t}\n\t\t\tif ( $pluginId = $this->_createForm->plugin_id->getValue() ) {\n\t\t\t\t$filter = new D_Filter_PluginDirectory();\n\t\t\t\t$plugin = Table::_( 'plugins' )->get( $pluginId );\n\t\t\t\t$template = str_replace( '-', '_', $filter->filter( $plugin->name ) ) . $separator . $template;\n\t\t\t}\n\t\t\t$template .= '.phtml';\n\t\t\t// Write a file.\n\t\t\t$directory = $this->_getTypeDirectory( $type );\n\t\t\tif ( !file_exists( $directory . $template ) ) {\n\t\t\t\tfile_put_contents(\n\t\t\t\t\t$directory . $template,\n\t\t\t\t\t$this->_createForm->content->getValue()\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Save a subject.\n\t\t\t$settingId = Model::_( 'settings' )->setting( $template . '[email subject]' );\n\t\t\tModel::_( 'settings' )->string( $settingId, $subject );\n\t\t}", "public function create()\n {\n $data = array();\n $data['title'] = $_POST['title'];\n $data['content'] = $_POST['content'];\n $data['time'] = $_POST['time'];\n \n $this->model->create($data);\n header('location:'. URL .'index');\n }", "protected function createTemplateModel()\n {\n return new TemplateModel();\n }", "function mail_template_save($name, $locale, $subject, $body)\n{\n $db = Database::getInstance();\n $template = mail_template_load($name, $locale);\n\n if ($template && $template['locale'] == $locale) {\n // Update existing mail template\n $db->query(\n (\"UPDATE {mailtemplate} \"\n . \"SET subject = :subject, body = :body \"\n . \"WHERE templateid = :id\"),\n array(\n ':id' => $template['templateid'],\n ':subject' => $subject,\n ':body' => $body,\n )\n );\n } else {\n // Insert a new mail template\n $db->query(\n (\"INSERT INTO {mailtemplate} (name, locale, subject, body) \"\n . \"VALUES (:name, :locale, :subject, :body)\"),\n array(\n ':name' => $name,\n ':locale' => $locale,\n ':subject' => $subject,\n ':body' => $body,\n )\n );\n }\n}", "public function add_template($data)\r\n {\r\n $this->db->insert('tblemailtemplates', $data);\r\n $insert_id = $this->db->insert_id();\r\n if ($insert_id) {\r\n return $insert_id;\r\n }\r\n\r\n return false;\r\n }", "protected function createNew() {\n $this->db->insert($this->tableName, $this->mapToDatabase());\n $this->id = $this->db->insert_id();\n }", "public function actionCreate() {}", "public function actionCreate() {}", "public static function create($templateName){\n\t\tif (DB_READ_ONLY_MODE==1) return true;\t\n\t\t\n\t\t$templateName = generate::cleanFileName($templateName);\n\t\t$destination = TEMPLATES_PATH.$templateName.'/';\n\t\t\n\t\t$counter = 2;\n\t\twhile (is_dir($destination)) {\n\n\t\t\t$destination = TEMPLATES_PATH.$templateName.\"-{$counter}/\";\n\t\t\t$counter = $counter+1;\n\t\t}\t\t\n\t\t\n\t\tif(!is_dir($destination)){\n\t\t\tbaseFile::createDir($destination);\n\t\t\tforeach (self::$baseFolders as $folder){\n\t\t\t\tbaseFile::createDir($destination.$folder);\n\t\t\t}\n\t\t\tforeach (self::$baseTpl as $tpl){\n\t\t\t\tbaseFile::saveFile($destination.$tpl, '');\n\t\t\t}\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function actionCreateFromTemplate($templateId = null)\n {\n $model = new WidgetContent();\n\n try {\n if ($model->load($_POST) && $model->save()) {\n return $this->redirect(Url::previous());\n } elseif (!\\Yii::$app->request->isPost) {\n $model->load($_GET);\n }\n } catch (\\Exception $e) {\n $msg = (isset($e->errorInfo[2])) ? $e->errorInfo[2] : $e->getMessage();\n $model->addError('_exception', $msg);\n }\n\n return $this->render('create', ['model' => $model]);\n }", "public function initTemplate() {}", "public function setTemplate(string $template_name);", "public function create()\n\t{\n\t\t$this->auth->restrict('Preguntas.Content.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_preguntas())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\tlog_activity($this->current_user->id, lang('preguntas_act_create_record') .': '. $insert_id .' : '. $this->input->ip_address(), 'preguntas');\n\n\t\t\t\tTemplate::set_message(lang('preguntas_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/content/preguntas');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('preguntas_create_failure') . $this->preguntas_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('preguntas', 'preguntas.js');\n\n\t\tTemplate::set('toolbar_title', lang('preguntas_create') . ' Preguntas');\n\t\tTemplate::set('categorias', $this->categorias_model->formato_dropdown());\n\t\tTemplate::set('preguntas_tipo', $this->preguntas_tipo_model->formato_dropdown());\n\t\tTemplate::set('preguntas_grupos', $this->preguntas_grupos_model->formato_dropdown());\n\t\tTemplate::render();\n\t}", "public static function setTemplate($name) {\n $settings = self::getSettings();\n \n $settings->template = $name;\n $settings->save();\n }", "protected function create() {\n $this->db->insertRow($this->table_name, $this->update);\n storeDbMsg($this->db,\"New \" . $this->form_ID . \" successfully created!\");\n }", "function template($template=\"simple\"){\n\n\t\t// THE PHYSICAL TEMPLATE SHOULD BE IN THE RESPECTIVE \n\t\t// TEMPLATE/TYPE/$template.php\n\t\t$this->template = $template;\n\t}", "public function create(array $data)\n {\n if (isset($data['content'])) {\n $data['content'] = base64_encode($data['content']);\n }\n \n if (isset($data['archive'])) {\n $data['archive'] = base64_encode($data['archive']);\n }\n \n $client = new MailWizzApi_Http_Client(array(\n 'method' => MailWizzApi_Http_Client::METHOD_POST,\n 'url' => $this->config->getApiUrl('templates'),\n 'paramsPost' => array(\n 'template' => $data\n ),\n ));\n \n return $response = $client->request();\n }", "public function create(SeedTemplateInterface $seed);", "public function run()\n {\n if (DB::table('templates')->get()->count() == 0) {\n\n DB::table('templates')->insert([\n\n [\n 'name' => 'template1',\n 'fields' => json_encode([\n [\n 'name' => 'section_1_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'section_1_video_image',\n 'type' => 'file'\n ],\n [\n 'name' => 'section_1_video_link',\n 'type' => 'text'\n ],\n [\n 'name' => 'section_2_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'images',\n 'type' => 'file'\n ]\n ]),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'name' => 'template2',\n 'fields' => json_encode([\n [\n 'name' => 'link',\n 'type' => 'text'\n ],\n [\n 'name' => 'section_1_image',\n 'type' => 'file'\n ],\n [\n 'name' => 'section_1_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'section_2_image',\n 'type' => 'file'\n ],\n [\n 'name' => 'section_2_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'report_text',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'report_owner',\n 'type' => 'text'\n ],\n [\n 'name' => 'report_owner_image',\n 'type' => 'file'\n ],\n [\n 'name' => 'gif',\n 'type' => 'file'\n ]\n ]),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'name' => 'template3',\n 'fields' => json_encode([\n\n [\n 'name' => 'section_1_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'section_1_image',\n 'type' => 'file'\n ],\n [\n 'name' => 'section_2_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'section_2_image',\n 'type' => 'file'\n ]\n ]),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'name' => 'template4',\n 'fields' => json_encode([\n\n [\n 'name' => 'link',\n 'type' => 'text'\n ],\n [\n 'name' => 'section_1_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'section_1_images',\n 'type' => 'file'\n ],\n [\n 'name' => 'section_2_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'section_2_images',\n 'type' => 'file'\n ],\n ]),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'name' => 'template5',\n 'fields' => json_encode([\n\n [\n 'name' => 'section_1_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'link',\n 'type' => 'text'\n ],\n [\n 'name' => 'section_1_images',\n 'type' => 'file'\n ],\n [\n 'name' => 'section_2_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'section_2_image',\n 'type' => 'file'\n ],\n ]),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'name' => 'template6',\n 'fields' => json_encode([\n [\n 'name' => 'images',\n 'type' => 'file'\n ]\n ]),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'name' => 'template7',\n 'fields' => json_encode([\n [\n 'name' => 'link',\n 'type' => 'text'\n ],\n [\n 'name' => 'section_1_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'section_1_image',\n 'type' => 'file'\n ],\n\n [\n 'name' => 'section_2_image',\n 'type' => 'file'\n ],\n [\n 'name' => 'section_3_description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'section_3_images',\n 'type' => 'file'\n ],\n [\n 'name' => 'section_4_images',\n 'type' => 'file'\n ],\n ]),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'name' => 'template8',\n 'fields' => json_encode([\n [\n 'name' => 'project_video',\n 'type' => 'file'\n ],\n [\n 'name' => 'description',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'images',\n 'type' => 'file'\n ],\n ]),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n ]);\n\n } else {\n echo \"\\e[31mTable is not empty, therefore NOT \";\n }\n\n }", "public function create()\n {\n\n $email_id = date('Y-m-d_H-i-s') . '.' . $this->template;\n $email_data = [\n 'title' => $this->template, \n 'data' => serialize($this->data), \n 'email' => $this->to,\n 'id' => $email_id,\n 'date' => date('Y-m-d H:i:s')\n ];\n\n Storage::putYAML('statamify/emails/' . $email_id, $email_data);\n\n }", "public function create()\n {\n $this->view->load('tacgias/create');\n }", "public function execute()\n {\n $request = $this->getRequest();\n $id = $this->getRequest()->getParam('id');\n\n $template = $this->_initTemplate('id');\n if (!$template->getId() && $id) {\n $this->messageManager->addErrorMessage(__('This email template no longer exists.'));\n $this->_redirect('adminhtml/*/');\n return;\n }\n\n try {\n $template->setTemplateSubject(\n $request->getParam('template_subject')\n )->setTemplateCode(\n $request->getParam('template_code')\n )->setTemplateText(\n $request->getParam('template_text')\n )->setTemplateStyles(\n $request->getParam('template_styles')\n )->setModifiedAt(\n $this->_objectManager->get(\\Magento\\Framework\\Stdlib\\DateTime\\DateTime::class)->gmtDate()\n )->setOrigTemplateCode(\n $request->getParam('orig_template_code')\n )->setOrigTemplateVariables(\n $request->getParam('orig_template_variables')\n );\n\n if (!$template->getId()) {\n $template->setTemplateType(TemplateTypesInterface::TYPE_HTML);\n }\n\n if ($request->getParam('_change_type_flag')) {\n $template->setTemplateType(TemplateTypesInterface::TYPE_TEXT);\n $template->setTemplateStyles('');\n }\n\n $template->save();\n $this->_objectManager->get(\\Magento\\Backend\\Model\\Session::class)->setFormData(false);\n $this->messageManager->addSuccessMessage(__('You saved the email template.'));\n $this->_redirect('adminhtml/*');\n } catch (\\Exception $e) {\n $this->_objectManager->get(\n \\Magento\\Backend\\Model\\Session::class\n )->setData(\n 'email_template_form_data',\n $request->getParams()\n );\n $this->messageManager->addErrorMessage($e->getMessage());\n $this->_forward('new');\n }\n }", "public function setTemplate(string $template);", "private function prepareTemplate() {\r\n $template = $this->iTemplateFactory->createTemplate();\r\n $template->_control = $this->linkGenerator;\r\n $this->setTemplate($template);\r\n }", "public function create()\n {\n //\n return $this->render('create');\n\n }", "public function add_email_template(){\t\n\t\t\t$user_id = $this->session->userdata('id');\n\t\t\t$role = $this->session->userdata('role');\n\t\t\t$name = $this->input->post('template_name');\n\t\t\t$subject = $this->input->post('template_subject');\n\t\t\t$content = htmlentities($this->input->post('content'));\n\t\t\tif( !empty($user_id) && ($role=='super_admin')):\t\t\t\n\t\t\t$data=array('name'=>$name,\n\t\t\t\t\t\t'subject'=>$subject,\n\t\t\t\t\t\t'content'=>htmlentities($this->input->post('content')),\n\t\t\t\t\t\t'user_id'=>$user_id,\n\t\t\t\t\t\t);\t\t\t\t\t\t\n\t\t\t$response = $this->InteractModal->register_user($data, 'templates' );\n\t\t\tredirect(base_url('Interact/user_all_email_template' ));\n\t\t\telse:\n\t\t\t\tredirect(base_url('Interact/login' ));\n\t\t\tendif;\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "public function setTemplate($template);", "public function setTemplate($template);", "public function store(Request $request){\n //Validate the Request\n $this->validate($request, [\n 'cssTemplateName' => 'required',\n 'cssTemplateActive' => 'required',\n 'cssTemplateContent' => 'required'\n ]);\n //Take input from the request\n $name = $request->input('cssTemplateName');\n $active = $request->input('cssTemplateActive');\n if($active == 1){//deactivate all other templates if this one was made active\n foreach(CssTemplate::all() as $currentCss){\n $currentCss->active = 0;\n $currentCss->save();\n }\n }\n $cssContent = $request->input('cssTemplateContent');\n //Create a new Css Template with that input\n CssTemplate::create(['name' => $name, 'active' => $active, 'cssContent' => $cssContent,\n 'createdBy' => Auth::id()]);\n return redirect('manage/templates');\n }", "public function createTemplate($displaytext, $name, $ostypeid,$volumeid='') {\n\t\t$data = array (\n\t\t\t\t\"apiKey\" => $this->apiKey,\n\t\t\t\t\"command\" => \"createTemplate\",\n\t\t\t\t\"response\" => \"json\",\n\t\t\t\t\"displaytext\" => $displaytext,\n\t\t\t\t\"name\" => $name,\n\t\t\t\t\"ostypeid\" => $ostypeid,\n\t\t \"passwordenabled\"=>'true',\n\t\t \"ispublic\"=>'true',\n\t\t \"volumeid\"=>$volumeid\n\t\t);\n\t\t$url = $this->getSignatureUrl ( $data );\n\t\treturn $this->curlGet ( $url );\n\t}", "public function addTemplate( $template )\n {\n \n $this->templates[] = $template;\n \n }", "public function create()\n\t{\n\t\t\n\t\t//\n\t}" ]
[ "0.7890813", "0.7311464", "0.70460373", "0.70460373", "0.6995139", "0.6991865", "0.69612586", "0.6884655", "0.6783113", "0.67503625", "0.6654896", "0.6636771", "0.6626456", "0.6605686", "0.65616757", "0.6547796", "0.65275747", "0.65047336", "0.6499517", "0.6474132", "0.6451871", "0.6446961", "0.6438287", "0.640041", "0.6371846", "0.6369787", "0.6359428", "0.63567674", "0.6336076", "0.63167596", "0.63044536", "0.62826973", "0.62762773", "0.6259566", "0.62554383", "0.6254542", "0.6242439", "0.6215481", "0.6178263", "0.6174138", "0.61697114", "0.6158986", "0.61512995", "0.6147639", "0.61460066", "0.6139092", "0.6134506", "0.6124801", "0.6108711", "0.61082363", "0.61072826", "0.6104108", "0.6094079", "0.60892844", "0.60829073", "0.6068239", "0.6061854", "0.6024813", "0.6024813", "0.5998002", "0.59735733", "0.5965637", "0.59647256", "0.5957944", "0.5951352", "0.595043", "0.5947532", "0.5941746", "0.5924515", "0.59015614", "0.59015614", "0.58953714", "0.5889588", "0.58856106", "0.58799154", "0.58781666", "0.587724", "0.5857116", "0.58503497", "0.58470166", "0.58468795", "0.58444464", "0.5842038", "0.58412707", "0.58296406", "0.5824678", "0.5822402", "0.5802484", "0.57830095", "0.5780188", "0.5780188", "0.5780188", "0.5780188", "0.577155", "0.577155", "0.575922", "0.575922", "0.5758394", "0.57525516", "0.5746468", "0.5743577" ]
0.0
-1
Set relations for templates
public function with($relations);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected\tfunction\tsetRelations() {}", "protected\tfunction\tsetRelations() {}", "public function setRelations() {}", "protected static function _relations() {\n\n\t}", "public function setFlexFormRelations() {}", "private function _set_relationships()\n {\n if(empty($this->_relationships))\n {\n $options = array('has_one','has_many','has_many_pivot');\n foreach($options as $option)\n {\n if(isset($this->{$option}) && !empty($this->{$option}))\n {\n foreach($this->{$option} as $key => $relation)\n {\n $foreign_model = (is_array($relation)) ? $relation[0] : $relation;\n $foreign_model_name = strtolower($foreign_model);\n $this->load->model($foreign_model_name);\n $foreign_table = $this->{$foreign_model_name}->table;\n if($option=='has_many_pivot')\n {\n $tables = array($this->table, $foreign_table);\n sort($tables);\n $pivot_table = $tables[0].'_'.$tables[1];\n $foreign_key = (is_array($relation)) ? $relation[1] : $this->{$foreign_model_name}->primary;\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n else\n {\n $foreign_key = (is_array($relation)) ? $relation[1] : singular($this->table) . '_id';\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n $this->_relationships[$key] = array('relation' => $option, 'relation_key' => $key, 'foreign_model' => $foreign_model_name, 'foreign_table' => $foreign_table, 'foreign_key' => $foreign_key, 'local_key' => $local_key);\n ($option == 'has_many_pivot') ? ($this->_relationships[$key]['pivot_table'] = $pivot_table) : FALSE;\n\n }\n }\n }\n }\n }", "public function initialize()\n {\n $this->belongsTo(\n 'companies_id',\n 'Canvas\\Models\\Companies',\n 'id',\n ['alias' => 'company']\n );\n\n $this->belongsTo(\n 'apps_id',\n 'Canvas\\Models\\Apps',\n 'id',\n ['alias' => 'app']\n );\n\n $this->belongsTo(\n 'users_id',\n 'Canvas\\Models\\Users',\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'system_modules_id',\n 'Canvas\\Models\\SystemModules',\n 'id',\n ['alias' => 'systemModule']\n );\n\n $this->setSource('email_templates_variables');\n }", "private function populateTranslations()\n {\n //translations\n $aRelated = $this->owner->getRelatedRecords();\n if (isset($aRelated[$this->relation]) && $aRelated[$this->relation] != null) {\n if (is_array($aRelated[$this->relation])) {\n foreach ($aRelated[$this->relation] as $model) {\n $this->_models[$model->getAttribute($this->languageField)] = $model;\n }\n } else {\n $model = $aRelated[$this->relation];\n $this->_models[$model->getAttribute($this->languageField)] = $model;\n }\n }\n }", "protected function setTemplatePaths() {}", "public function initialize()\n {\n $this->belongsTo('cd_template', 'App\\Models\\MktTemplates', 'cd_template', array('alias' => 'MktTemplates'));\n $this->customInitialize();\n }", "public function setRelations(Collection $relations);", "protected function setTemplateVariables() {}", "public function install()\n {\n $tables = $this->getTables();\n foreach($tables as $table) {\n ORM::registerTableOnFly($table);\n }\n $tables['pages']->bindTable('template', 'id', 'templates', OrmTable::MANY_TO_ONE, false, true);\n $pagesBind = $this->tables['pages']->bindTable('parent', 'id', 'pages', OrmTable::MANY_TO_ONE, false, true);\n $pagesBind->setCustomLeftField(\"parentPage\");\n\n $pageToIncludeBind = $tables['pages']->bindTable('id', 'page', 'includes', OrmTable::ONE_TO_MANY, true, true);\n $pageToIncludeBind->setCustomLeftField(\"includes\");\n\n\n //@TODO includes table must be binded to blocks, blocks to templates. Templates need no bind to includes.\n $templateToIncludeBind = $tables['templates']->bindTable('id', 'template', 'includes', OrmTable::ONE_TO_MANY, true, true);\n $templateToIncludeBind->setCustomLeftField(\"includes\");\n\n $templateToBlockBind = $tables['templates']->bindTable('id', 'template', 'blocks', OrmTable::ONE_TO_MANY, true, true);\n $templateToBlockBind->setCustomLeftField(\"blocks\");\n\n foreach($tables as $table) {\n ORM::createTable($table);\n }\n $this->addBaseDataToDatabase();\n }", "abstract function relations();", "public function setTemplates($viewer, $relationName = false, $singleName = false)\n {\n $templates = $this->getCategorizationTemplates($relationName, $singleName);\n $templates['type'] = 'Layout';\n $viewer->setTemplateFile('Layout', ThemeResourceLoader::inst()->findTemplate(\n $templates,\n SSViewer::get_themes()\n ));\n }", "public function getTemplates4()\n {\n return $this->hasMany(Template::className(), ['name_id' => 'id']);\n }", "public function buildRelations()\n {\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':preg_t_pregunta',\n 1 => ':tpre_tipo',\n ),\n), null, 'CASCADE', 'Preguntas', false);\n }", "public function getTemplates()\n {\n return $this->hasMany(Template::className(), ['atk_id' => 'id']);\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 function getTemplates1()\n {\n return $this->hasMany(Template::className(), ['cost_id' => 'id']);\n }", "private function set_templates() {\r\n $this->templates = array();\r\n\r\n foreach ( (array) $this->variations as $variation ) {\r\n $variation = strlen( $variation ) > 0 ? '-' . $variation : '';\r\n $this->templates[] = $this->base . $variation;\r\n }\r\n }", "public function resetRelations()\n\t{\n\t\t$this->relations = array();\n\t}", "public function initialize()\n {\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->setSource('users_associated_company');\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n\t{\n $this->addRelation('Genero', 'Genero', RelationMap::MANY_TO_ONE, array('id_genero' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tematica', 'Tematica', RelationMap::MANY_TO_ONE, array('id_tematica' => 'id', ), null, 'CASCADE');\n $this->addRelation('Autor', 'Autor', RelationMap::MANY_TO_ONE, array('id_autor' => 'id', ), null, 'CASCADE');\n $this->addRelation('Materia', 'Materia', RelationMap::MANY_TO_ONE, array('id_materia' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tipopublicacion', 'Tipopublicacion', RelationMap::MANY_TO_ONE, array('id_tipopublicacion' => 'id', ), null, 'CASCADE');\n\t}", "public function getTemplates2()\n {\n return $this->hasMany(Template::className(), ['description_id' => 'id']);\n }", "protected function setTags()\n {\n $this->authBasedTag();\n $this->nameBasedTag($this->relatedEntities);\n }", "private function prepareTemplate() {\r\n $template = $this->iTemplateFactory->createTemplate();\r\n $template->_control = $this->linkGenerator;\r\n $this->setTemplate($template);\r\n }", "public function buildRelations()\n\t{\n $this->addRelation('Organisatie', 'Organisatie', RelationMap::MANY_TO_ONE, array('organisatie_id' => 'id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'persoon_id', ), null, null);\n\t}", "public function initialize() {\n $this->setSource('article');\n\n $this->belongsTo('author_id', Article::class, 'author_id', [\n 'alias' => 'author',\n 'reusable' => true,\n ]);\n\n $this->hasMany('article_id', ArticleTag::class, 'article_id', [\n 'alias' => 'tagRelation',\n ]);\n\n $this->hasMany('article_id', Comment::class, 'article_id', [\n 'alias' => 'comments',\n ]);\n }", "public function buildRelations()\n {\n $this->addRelation('Users', 'Users', RelationMap::ONE_TO_MANY, array('r_user_type_id' => 'r_user_type_id', ), null, null, 'Userss');\n }", "public function register_instances() {\n\n\t\t\t$relations = $this->data->get_raw();\n\t\t\t$has_hierarchy = false;\n\n\t\t\t$relations = apply_filters( 'jet-engine/relations/registered-relation', $relations );\n\n\t\t\tif ( empty( $relations ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tforeach ( $relations as $relation ) {\n\n\t\t\t\t$post_type_1 = $relation['post_type_1'];\n\t\t\t\t$post_type_2 = $relation['post_type_2'];\n\t\t\t\t$type = explode( '_to_', $relation['type'] );\n\t\t\t\t$type_1 = $type[0];\n\t\t\t\t$type_2 = $type[1];\n\t\t\t\t$meta_key = $this->get_relation_hash( $post_type_1, $post_type_2 );\n\t\t\t\t$control_1 = isset( $relation['post_type_1_control'] ) ? $relation['post_type_1_control'] : 'true';\n\t\t\t\t$control_2 = isset( $relation['post_type_2_control'] ) ? $relation['post_type_2_control'] : 'true';\n\t\t\t\t$control_1 = filter_var( $control_1, FILTER_VALIDATE_BOOLEAN );\n\t\t\t\t$control_2 = filter_var( $control_2, FILTER_VALIDATE_BOOLEAN );\n\n\t\t\t\t// Allow single relation for post type 1 - post type 2 pair\n\t\t\t\tif ( ! empty( $this->_active_relations[ $meta_key ] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( ! class_exists( 'Jet_Engine_CPT_Meta' ) ) {\n\t\t\t\t\trequire_once jet_engine()->plugin_path( 'includes/components/meta-boxes/post.php' );\n\t\t\t\t}\n\n\t\t\t\t$obj_1 = get_post_type_object( $post_type_1 );\n\t\t\t\t$obj_2 = get_post_type_object( $post_type_2 );\n\n\t\t\t\tif ( ! $obj_1 || ! $obj_2 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( is_admin() ) {\n\n\t\t\t\t\t$title_1 = sprintf( __( 'Related %s', 'jet-engine' ), $obj_2->labels->name );\n\t\t\t\t\t$title_2 = sprintf( __( 'Related %s', 'jet-engine' ), $obj_1->labels->name );\n\n\t\t\t\t\tif ( $control_1 ) {\n\n\t\t\t\t\t\tif ( 'one' === $type_1 && 'many' === $type_2 ) {\n\t\t\t\t\t\t\t$multiple_1 = 'true';\n\t\t\t\t\t\t} elseif ( 'many' === $type_1 ) {\n\t\t\t\t\t\t\t$multiple_1 = 'true';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$multiple_1 = 'false';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$meta_field_1 = array(\n\t\t\t\t\t\t\t'name' => $meta_key,\n\t\t\t\t\t\t\t'type' => 'posts',\n\t\t\t\t\t\t\t'element' => 'control',\n\t\t\t\t\t\t\t'title' => sprintf( __( 'Select %s', 'jet-engine' ), $obj_2->labels->name ),\n\t\t\t\t\t\t\t'is_multiple' => $multiple_1,\n\t\t\t\t\t\t\t'search_post_type' => $post_type_2,\n\t\t\t\t\t\t\t'description' => sprintf( __( 'Set Child %s', 'jet-engine' ), $obj_2->labels->name ),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tnew Jet_Engine_CPT_Meta( $post_type_1, array( $meta_field_1 ), $title_1, 'side', 'default' );\n\n\t\t\t\t\t\tif ( jet_engine()->meta_boxes ) {\n\t\t\t\t\t\t\t$meta_field_1['title'] = $title_1;\n\t\t\t\t\t\t\tjet_engine()->meta_boxes->store_fields( $post_type_1, array( $meta_field_1 ), 'post_type' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $control_2 ) {\n\n\t\t\t\t\t\tif ( 'one' === $type_1 && 'many' === $type_2 ) {\n\t\t\t\t\t\t\t$multiple_2 = 'false';\n\t\t\t\t\t\t} elseif ( 'many' === $type_2 ) {\n\t\t\t\t\t\t\t$multiple_2 = 'true';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$multiple_2 = 'false';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$meta_field_2 = array(\n\t\t\t\t\t\t\t'name' => $meta_key,\n\t\t\t\t\t\t\t'type' => 'posts',\n\t\t\t\t\t\t\t'element' => 'control',\n\t\t\t\t\t\t\t'title' => sprintf( __( 'Select %s', 'jet-engine' ), $obj_1->labels->name ),\n\t\t\t\t\t\t\t'is_multiple' => $multiple_2,\n\t\t\t\t\t\t\t'search_post_type' => $post_type_1,\n\t\t\t\t\t\t\t'description' => sprintf( __( 'Set Parent %s', 'jet-engine' ), $obj_1->labels->name ),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tnew Jet_Engine_CPT_Meta( $post_type_2, array( $meta_field_2 ), $title_2, 'side', 'default' );\n\n\t\t\t\t\t\tif ( jet_engine()->meta_boxes ) {\n\t\t\t\t\t\t\t$meta_field_2['title'] = $title_2;\n\t\t\t\t\t\t\tjet_engine()->meta_boxes->store_fields( $post_type_2, array( $meta_field_2 ), 'post_type' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$relation['label_1'] = $obj_1->labels->name;\n\t\t\t\t$relation['label_2'] = $obj_2->labels->name;\n\n\t\t\t\t$this->add_relation_to_post_types( $meta_key, $relation );\n\n\t\t\t\t$this->_active_relations[ $meta_key ] = $relation;\n\n\t\t\t\tif ( ! empty( $relation['parent_relation'] ) ) {\n\t\t\t\t\t$has_hierarchy = true;\n\t\t\t\t}\n\n\t\t\t\tadd_filter( 'cx_post_meta/pre_process_key/' . $meta_key, array( $this, 'process_meta' ), 10, 3 );\n\t\t\t\tadd_filter( 'cx_post_meta/pre_get_meta/' . $meta_key, array( $this, 'get_meta' ), 10, 5 );\n\n\t\t\t}\n\n\t\t\tif ( $has_hierarchy ) {\n\t\t\t\t$this->hierarchy->create_hierarchy( $this->_active_relations );\n\t\t\t}\n\n\t\t}", "public function initialize()\n {\n // \n $this->setSource(\"img_gallery\");\n $this->belongsTo('imageid', 'WC\\Models\\Image', 'id', ['alias' => 'Image']);\n $this->belongsTo('galleryid', 'WC\\Models\\Gallery', 'id', ['alias' => 'Gallery']);\n }", "public function defineRelations()\n\t{\n\t\treturn array();\n\t}", "function creasit_relation_post_types() {\n p2p_register_connection_type( array(\n 'name' => 'posts_to_pages',\n 'from' => 'page',\n 'to' => 'post',\n 'title' => array(\n 'from' => __( 'Actualités liées', 'solution' ),\n ),\n ) );\n\n p2p_register_connection_type( array(\n 'name' => 'pages_to_pages',\n 'from' => 'page',\n 'to' => 'page',\n 'title' => array(\n 'from' => __( 'Pages liées', 'solution' ),\n ),\n 'admin_box' => array(\n 'show' => 'from',\n )\n ) );\n}", "protected function _setTemplateMeta(){\n $this->template->project_name = $this->config['project']['name'] ;\n $this->template->title = $this->config['view']['title'] ;\n $this->template->keywords = $this->config['view']['keywords'];\n $this->template->description = $this->config['view']['description'];\n }", "protected function relations()\n {\n $this->belongsTo(\n 'language_iso',\n ModelLanguage::class,\n 'iso',\n [\n 'alias' => 'Language',\n 'foreignKey' => true\n ]\n );\n }", "public function setupAssociations() \n {\n \n }", "public function initialize()\n {\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->belongsTo(\n 'apps_id',\n Apps::class,\n 'id',\n ['alias' => 'app']\n );\n\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->setSource('users_associated_apps');\n }", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function setLinkedObjects()\n\t{\n\t\treturn array(\n\t\t\t'view' => new View( $this->m_view_id, TRUE )\n\t\t);\n\t}", "public function buildRelations()\n\t{\n $this->addRelation('CuadreCaja', 'CuadreCaja', RelationMap::MANY_TO_ONE, array('id_cuadre_caja' => 'id_cuadre_caja', ), 'RESTRICT', null);\n $this->addRelation('PersonaRelatedByIdPersona', 'Persona', RelationMap::MANY_TO_ONE, array('id_persona' => 'id_persona', ), 'RESTRICT', null);\n $this->addRelation('PersonaRelatedByIdAutoriza', 'Persona', RelationMap::MANY_TO_ONE, array('id_autoriza' => 'id_persona', ), 'RESTRICT', null);\n\t}", "public function getTemplates0()\n {\n return $this->hasMany(Template::className(), ['background_id' => 'id']);\n }", "public function buildRelations()\n\t{\n $this->addRelation('SftOrganismo', 'SftOrganismo', RelationMap::ONE_TO_MANY, array('id' => 'id_pais', ), 'SET NULL', 'CASCADE');\n $this->addRelation('SftPersona', 'SftPersona', RelationMap::ONE_TO_MANY, array('id' => 'id_paisdocidentificacion', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('GenPaisI18n', 'GenPaisI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', 'CASCADE');\n\t}", "public function initialize() {\n $this->setSource('tag');\n\n $this->hasMany('tag_id', ArticleTag::class, 'tag_id', [\n 'alias' => 'articles',\n ]);\n }", "public function Setup_Templates_List() : void\n {\n $this->Templates = apply_filters(\"WP_Plugin_virtual_pages_templates\",[\n ...array('page.php', 'index.php' ), ...(array) $this->Template]);\n }", "public function buildRelations()\n {\n $this->addRelation('Moneda', 'Moneda', RelationMap::MANY_TO_ONE, array('moneda_id' => 'id', ), null, null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), null, null);\n $this->addRelation('Negocio', 'Negocio', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'Negocios');\n $this->addRelation('DireccionRequerimiento', 'DireccionRequerimiento', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'DireccionRequerimientos');\n }", "public function buildRelations()\n\t{\n $this->addRelation('Tbnecesespecial', 'Tbnecesespecial', RelationMap::MANY_TO_ONE, array('id_neces_especial' => 'id_neces_especial', ), null, null);\n $this->addRelation('Tbcidade', 'Tbcidade', RelationMap::MANY_TO_ONE, array('naturalidade' => 'id_cidade', ), null, null);\n $this->addRelation('Tbpais', 'Tbpais', RelationMap::MANY_TO_ONE, array('nacionalidade' => 'id_pais', ), null, null);\n $this->addRelation('TblogradouroRelatedByCep', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep' => 'cep', ), null, null);\n $this->addRelation('Tbcursoversao', 'Tbcursoversao', RelationMap::MANY_TO_ONE, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbtipoingresso', 'Tbtipoingresso', RelationMap::MANY_TO_ONE, array('id_tipo_ingresso' => 'id_tipo_ingresso', ), null, null);\n $this->addRelation('Tbalunosituacao', 'Tbalunosituacao', RelationMap::MANY_TO_ONE, array('id_situacao' => 'id_situacao', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdDestino', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_destino' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById2grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_2grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById3grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_3grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdTrabalho', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_trabalho' => 'id_inst_externa', ), null, null);\n $this->addRelation('TblogradouroRelatedByCepTrabalho', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep_trabalho' => 'cep', ), null, null);\n $this->addRelation('Tbpolos', 'Tbpolos', RelationMap::MANY_TO_ONE, array('id_polo' => 'id_polo', ), null, null);\n $this->addRelation('Tbalunoracacor', 'Tbalunoracacor', RelationMap::MANY_TO_ONE, array('id_raca' => 'id_raca', ), null, null);\n $this->addRelation('Tbpendencia', 'Tbpendencia', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunodiploma', 'Tbalunodiploma', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosenha', 'Tbalunosenha', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosolicitacao', 'Tbalunosolicitacao', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbbanca', 'Tbbanca', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbfila', 'Tbfila', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbhistorico', 'Tbhistorico', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('TbturmaAluno', 'TbturmaAluno', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n\t}", "public function buildRelations()\n {\n $this->addRelation('Biblio', '\\\\Slims\\\\Models\\\\Bibliography\\\\Biblio\\\\Biblio', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':biblio_id',\n 1 => ':biblio_id',\n ),\n), null, null, null, false);\n $this->addRelation('User', '\\\\Slims\\\\Models\\\\System\\\\User\\\\User', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':uid',\n 1 => ':user_id',\n ),\n), null, null, null, false);\n $this->addRelation('Colltype', '\\\\Slims\\\\Models\\\\Masterfile\\\\Colltype\\\\Colltype', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':coll_type_id',\n 1 => ':coll_type_id',\n ),\n), null, null, null, false);\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('LnkUserProfil', 'LnkUserProfil', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'LnkUserProfils');\n\t\t$this->addRelation('TblAdherent', 'TblAdherent', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'TblAdherents');\n\t}", "protected function getRelations()\n\t{\n\t\treturn ['widgets'];\n\t}", "public function buildRelations()\n {\n $this->addRelation(\n 'Group',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Group',\n RelationMap::MANY_TO_ONE,\n array('group_id' => 'id',),\n null,\n null\n );\n $this->addRelation(\n 'Batch',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Batch',\n RelationMap::MANY_TO_ONE,\n array('batch_id' => 'id',),\n null,\n null\n );\n }", "protected function setVarToTemplates()\n {\n $this->templates->set_tpl($this->varName, $this->checkNewCommondaty());\n }", "public function initTemplate($t)\n\t{\n\t\t//$t->assign('exercise_sets',Dase_DBO_ExerciseSet::getAll($this->db));\n\t}", "public function buildRelations()\n {\n $this->addRelation('Website', '\\\\CE\\\\Model\\\\Website', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('WebsiteRouting', '\\\\CE\\\\Model\\\\WebsiteRouting', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_routing_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n }", "public function export_addFilesFromRelations() {}", "public function buildRelations()\n {\n $this->addRelation('Alert', 'Alert', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'Alerts');\n $this->addRelation('ContentsTags', 'ContentsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'ContentsTagss');\n $this->addRelation('AdsTags', 'AdsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'AdsTagss');\n $this->addRelation('Content', 'Content', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Contents');\n $this->addRelation('Ad', 'Ad', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Ads');\n }", "public function oneToManyRelationPolymorphic(Request $request){\n $userData = User::all();\n\n \n return view('pages.one_to_many_polymorphic', compact('userData'));\n }", "public static function workflowRelations();", "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}", "public function initRelation(array $models, $relation)\n {\n foreach ( $models as $model ) {\n $model->setRelation ( $relation, $this->related->newCollection () );\n }\n return $models;\n }", "public function buildRelations()\n {\n $this->addRelation('Photo', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\Photo', RelationMap::MANY_TO_ONE, array('photo_id' => 'id', ), 'CASCADE', 'CASCADE');\n $this->addRelation('UserRate', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\UserRate', RelationMap::ONE_TO_MANY, array('photo_id' => 'photo_id', ), 'CASCADE', 'CASCADE', 'UserRates');\n $this->addRelation('User', 'wiosloCMS\\\\UserBundle\\\\Model\\\\User', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Users');\n }", "public function getTemplates3()\n {\n return $this->hasMany(Template::className(), ['health_id' => 'id']);\n }", "protected function setupTemplate() {\r\n \r\n }", "public function getTemplates5()\n {\n return $this->hasMany(Template::className(), ['type_id' => 'id']);\n }", "public function relations()\n {\n // class name for the relations automatically generated below.\n return array(\n \n );\n }", "public function buildRelations()\n\t{\n $this->addRelation('Aviso', 'Aviso', RelationMap::MANY_TO_ONE, array('aviso_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), 'RESTRICT', null);\n\t}", "private function copyRelationsTemplateToDestinationDirectory(): void\n {\n $this->pathHelper->copyTemplateDirectoryAndGetPath(\n $this->pathToProjectRoot,\n AbstractGenerator::RELATIONS_TEMPLATE_PATH,\n $this->destinationDirectory\n );\n }", "public function initialize() {\n\n // Relation to DasUsers\n $this->belongsTo('id', 'Aiden\\Models\\DasUsers', 'users_id', ['alias' => 'DasUsers']);\n\n // Relation to Phrases\n $this->hasMany('id', 'Aiden\\Models\\UsersPhrases', 'users_id', [\"alias\" => \"Phrases\"]);\n\n // Relation to Das\n $this->hasManyToMany('id', 'Aiden\\Models\\DasUsers', 'users_id', 'das_id', 'Aiden\\Models\\Das', 'id', ['alias' => 'Das']);\n\n // Relation to Councils\n $this->hasManyToMany('id', 'Aiden\\Models\\UsersCouncils', 'users_id', 'councils_id', 'Aiden\\Models\\Councils', 'id', ['alias' => 'Councils']);\n\n }", "public function buildRelations()\n {\n $this->addRelation('Country', 'Slashworks\\\\AppBundle\\\\Model\\\\Country', RelationMap::MANY_TO_ONE, array('country_id' => 'id', ), null, 'CASCADE');\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'SET NULL', 'CASCADE', 'RemoteApps');\n $this->addRelation('UserCustomerRelation', 'Slashworks\\\\AppBundle\\\\Model\\\\UserCustomerRelation', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'CASCADE', 'UserCustomerRelations');\n }", "public function initRelation(array $models, $relation)\n {\n\n foreach ($models as $model) {\n $model->setRelation($relation, $this->related->newCollection());\n }\n\n return $models;\n }", "public function getRelations();", "public function getRelations();", "public function buildRelations()\n {\n $this->addRelation('Usuario', 'Usuario', RelationMap::ONE_TO_MANY, array('id' => 'plan_id', ), null, null, 'Usuarios');\n }", "public function initialize()\n {\n $this->hasMany('id_tipobeneficio', 'Documentosbeneficios', 'id_tipobeneficio', array('alias' => 'Documentosbeneficios'));\n $this->hasMany('id_tipobeneficio', 'Documentosbeneficios', 'id_tipobeneficio', NULL);\n }", "public function setTemplateSet($templateSet){\n\t\t$this->templateSet = $templateSet;\n\t}", "public function buildRelations()\n {\n $this->addRelation('Contact', 'Contact', RelationMap::MANY_TO_ONE, array('contact_id' => 'id', ), null, null);\n $this->addRelation('State', 'State', RelationMap::MANY_TO_ONE, array('state_id' => 'id', ), null, null);\n $this->addRelation('School', 'School', RelationMap::ONE_TO_MANY, array('id' => 'sponsor_id', ), null, null, 'Schools');\n }", "public function buildRelations()\n {\n $this->addRelation('Label', '\\\\MediaProperty\\\\Label', RelationMap::MANY_TO_ONE, array('label_id' => 'id', ), null, null);\n $this->addRelation('Album', '\\\\MediaItem\\\\Album', RelationMap::ONE_TO_MANY, array('id' => 'artist_id', ), null, null, 'Albums');\n }", "public static function relations()\n {\n return [\n// 'gender' => ['Gender', 'gender'],\n// 'gender' => 'Gender',\n ];\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('Cargo', 'Cargo', RelationMap::MANY_TO_ONE, array('cargo_id' => 'id', ), null, null);\n\t\t$this->addRelation('Departamento', 'Departamento', RelationMap::MANY_TO_ONE, array('departamento_id' => 'id', ), null, null);\n\t\t$this->addRelation('Endereco', 'Endereco', RelationMap::MANY_TO_ONE, array('endereco_id' => 'id', ), null, null);\n\t\t$this->addRelation('Perfil', 'Perfil', RelationMap::MANY_TO_ONE, array('perfil_id' => 'id', ), null, null);\n\t\t$this->addRelation('Auditoria', 'Auditoria', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Auditorias');\n\t\t$this->addRelation('AvaliacaoRespostaForum', 'AvaliacaoRespostaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'AvaliacaoRespostaForums');\n\t\t$this->addRelation('ColetaPesquisa', 'ColetaPesquisa', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'ColetaPesquisas');\n\t\t$this->addRelation('ComentarioNoticia', 'ComentarioNoticia', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'ComentarioNoticias');\n\t\t$this->addRelation('CurtidaForum', 'CurtidaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'CurtidaForums');\n\t\t$this->addRelation('Noticia', 'Noticia', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Noticias');\n\t\t$this->addRelation('Pesquisa', 'Pesquisa', RelationMap::ONE_TO_MANY, array('id' => 'criador_id', ), null, null, 'Pesquisas');\n\t\t$this->addRelation('PesquisaHabilitada', 'PesquisaHabilitada', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'PesquisaHabilitadas');\n\t\t$this->addRelation('Premio', 'Premio', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Premios');\n\t\t$this->addRelation('RespostaForum', 'RespostaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'RespostaForums');\n\t\t$this->addRelation('SolicitacaoResgateRelatedByAprovadorId', 'SolicitacaoResgate', RelationMap::ONE_TO_MANY, array('id' => 'aprovador_id', ), null, null, 'SolicitacaoResgatesRelatedByAprovadorId');\n\t\t$this->addRelation('SolicitacaoResgateRelatedBySolicitanteId', 'SolicitacaoResgate', RelationMap::ONE_TO_MANY, array('id' => 'solicitante_id', ), null, null, 'SolicitacaoResgatesRelatedBySolicitanteId');\n\t}", "private function assignCategoriesAndCities() {\n\t\t$this->view->assign('categories', $this->typeRepository->findAll());\n\t\t$this->view->assign('companies', $this->companyRepository->findAll());\n\t}", "protected function _setTemplateAssets(){\n $styles = array_merge($this->config[($this->is_mobile ? 'mobile_': '' ).'styles'], $this->{($this->is_mobile ? 'mobile_': '' ).'styles'});\n $scripts= array_merge($this->config[($this->is_mobile ? 'mobile_': '' ).'scripts'], $this->{($this->is_mobile ? 'mobile_': '' ).'scripts'});\n foreach($styles as $_style)\n AssetsManager::instance()->addStyle($_style);\n foreach($scripts as $_script)\n AssetsManager::instance()->addScript($_script);\n $this->template->styles = AssetsManager::instance()->getStyles();\n $this->template->scripts = AssetsManager::instance()->getScripts();\n }", "protected function withRelationships()\n {\n if ($this->resource instanceof Model) {\n $this->attachRelations($this->resource);\n }\n }", "public function initialize()\n {\n $this->hasMany('groep_id', 'Gebruikers', 'groep_id', array('alias' => 'Gebruikers'));\n $this->hasMany('groep_id', 'Groep_permissies', 'groep_id', array('alias' => 'Groep_permissies'));\n }", "public function template(): BelongsTo\n {\n return $this->belongsTo(Template::class);\n }", "public function template(): BelongsTo\n {\n return $this->belongsTo(Template::class);\n }" ]
[ "0.7064877", "0.7064877", "0.6968517", "0.60422975", "0.5966083", "0.5935234", "0.5930831", "0.58936536", "0.58139664", "0.5715732", "0.5695804", "0.56883836", "0.56781334", "0.56683797", "0.56543374", "0.5558594", "0.55294317", "0.55130213", "0.55054", "0.546723", "0.5439897", "0.5427764", "0.5425023", "0.54099685", "0.54099685", "0.54099685", "0.54099685", "0.54099685", "0.54099685", "0.54099685", "0.54099685", "0.54099685", "0.5389157", "0.53726923", "0.5366439", "0.5362731", "0.5332478", "0.53274435", "0.5322686", "0.53217065", "0.53068465", "0.5296515", "0.5282289", "0.5280508", "0.5279267", "0.5270651", "0.5255278", "0.5254632", "0.5254632", "0.5254632", "0.5254632", "0.5254632", "0.5254632", "0.5254632", "0.5254632", "0.52448493", "0.5230271", "0.5227781", "0.5226803", "0.522117", "0.52158403", "0.5213301", "0.519956", "0.5197193", "0.5194535", "0.51890594", "0.51847345", "0.51815623", "0.51805615", "0.5167148", "0.5156777", "0.515142", "0.51514184", "0.5150867", "0.51436824", "0.51369333", "0.5136279", "0.5133275", "0.5104067", "0.5102848", "0.50991666", "0.5095323", "0.5082611", "0.50775677", "0.507756", "0.5074589", "0.5068599", "0.5068599", "0.50625813", "0.5059582", "0.50548315", "0.5049717", "0.50390375", "0.503892", "0.5036801", "0.5036307", "0.50318766", "0.50309986", "0.50262415", "0.5025265", "0.5025265" ]
0.0
-1
Find a specific template
public function find($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function locate( $template, $type, $templates )\n {\n // Set template path\n $this->path = $template;\n\n // Set template type\n $this->type = $type;\n\n // Get the current post ID\n $post_id = get_the_ID();\n\n // Get the current post type\n $post_type = get_post_type($post_id);\n\n // Get the current post slug\n $post_slug = get_page_uri($post_id);\n\n\n switch($type)\n {\n case 'page':\n\n // Search for page slug template\n if( $found = $this->find('page/'.$post_slug) ) break;\n\n // Search for page template\n $found = $this->find('page');\n\n break;\n\n case 'frontpage':\n\n // Search for front template\n $found = $this->find('front');\n\n break;\n\n default:\n // Search for template by type\n $found = $this->find($type);\n break;\n }\n\n // Check if we found a template file\n if( ! empty($found) )\n {\n // Update template path\n $this->path = $found;\n\n return $found;\n }\n\n\n return $template;\n }", "public function findTemplate() {\n\n\t\t$templatePath = $this->_template;\n\n\t\tif (empty($templatePath)) {\n\n\t\t\t$templateFolders = array();\n\n\t\t\tif (strlen($tmp = $this->_Model->templatePath)) {\n\t\t\t\t$templateFolders[] = \\Finder::joinPath(APP_ROOT, $tmp);\n\t\t\t}\n\t\t\t// bubble up for template path\n\t\t\telseif (strlen($tmp = $this->_Model->getBubbler()->templatePath)) {\n\t\t\t\t$templateFolders[] = \\Finder::joinPath(APP_ROOT, $tmp);\n\t\t\t}\n\t\t\t// I should add the root page model's template path if exists\n\t\t\t$templateFolders[] = NINJA_ROOT . '/src/ninja/Mod/' . $this->_Module->getModName() . '/template';\n\n\t\t\t$templateFolders = array_unique($templateFolders);\n\n\t\t\t$templateNames = array();\n\t\t\t// I respect what's set in the model, and it should not be invalid\n\t\t\tif (strlen($templateName = $this->_Model->template)) {\n\t\t\t\t$templateNames[]= $templateName;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$Module = $this->_Module;\n\t\t\t\t$modName = $Module->getModName();\n\n\t\t\t\t$a = $Module::moduleNameByClassname(get_class($this->_Model));\n\t\t\t\t$templateNames[] = \\Finder::joinPath($modName, \\Finder::classToPath($a));\n\t\t\t\t$b = $Module::moduleNameByClassname(get_class($this->_Module));\n\t\t\t\t$templateNames[] = \\Finder::joinPath($modName, \\Finder::classToPath($b));\n\t\t\t}\n\n\t\t\t$extension = '.html.mustache';\n\n\t\t\t// for debug\n\t\t\t//echop($templateFolders); echop($templateNames); die;\n\n\t\t\t$templatePath = \\Finder::fileByFolders($templateFolders, $templateNames, $extension);\n\n\t\t}\n\n\t\treturn $templatePath;\n\n\t}", "function get_template($template){\n\n\t\t\t$login_arr = $this->action_parser($this->action,'template') ;\n\n\t\t\t$pos = array_search($template, $login_arr['template']['name']); \n\n\t\t\treturn $login_arr['template']['path'][$pos];\n\n\t\t}", "public function findTemplate($template) {\n if (isset($this->_cache[$template])) {\n return $this->_cache[$template];\n }\n\n $templatePath = '';\n\n try {\n $templatePath = $this->_finder->find($template, 'views');\n } catch (InvalidArgumentException $e) {\n // might be already a resolved path\n if (file_exists($template)) {\n $templatePath = $template;\n } else {\n throw $e;\n }\n } catch (ResourceNotFoundException $e) {\n try {\n $templatePath = parent::findTemplate($template);\n } catch(\\Twig_Error_Loader $twigError) {\n throw new ResourceNotFoundException('Could not find template \"'. $template .'\". (Twig: '. $twigError->getMessage() .')', 404, $e);\n }\n }\n\n $this->_cache[$template] = $templatePath;\n return $templatePath;\n }", "public function locate($template, $type = NULL) {\n\n\t\t\t// Initialize variables\n\n\t\t\t$templates = array ();\n\n\t\t\tif (is_null($type)) {\n\t\t\t\t$type = $this->type;\n\t\t\t}\n\n\t\t\t// If this is the main template (e.g. single.php), note type for other templates\n\n\t\t\tif (did_action('template_redirect') == 1 && is_null($this->type)) {\n\n\t\t\t\t// Get list of bases to wrap this request in\n\n\t\t\t\t$templates = $this->get_bases($template);\n\n\t\t\t\t// Note the original template as the content template\n\n\t\t\t\t$this->main_template = $template;\n\n\t\t\t\t// Note the type for template parts\n\n\t\t\t\t$this->type = basename($template, '.php');\n\n\t\t\t} else {\n\n\t\t\t\t// This is a part template (e.g. templates/sidebar.php)\n\n\t\t\t\tarray_unshift($templates, $template); // Default to whatever template provided\n\n\t\t\t\t// If type is not the default (index), add a more specific template part\n\n\t\t\t\tif ($this->type !== 'index') {\n\t\t\t\t $str = substr($template, 0, -4);\n\t\t\t\t array_unshift($templates, sprintf($str . '-%s.php', $this->type));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Apply filters to templates\n\n\t\t\t$templates = apply_filters('sprout_locate', $templates);\n\t\t\t$templates = apply_filters('sprout_locate_' . $this->type, $templates);\n\n\t\t\t// Return first found template\n\n\t\t\treturn locate_template($templates);\n\t\t\t\n\t\t}", "function template_chooser($template) \n{ \n global $wp_query; \n $post_type = get_query_var('post_type'); \n if( $wp_query->is_search && $post_type == 'formation_post' ) \n {\n return locate_template('recherche-formation.php'); // redirect to recherche-formation.php\n } \n return $template; \n}", "public function loadMatchingTemplate()\n {\n $assignments = self::getAssignments();\n $hlp = $this;\n $matches = array_filter($assignments, function ($data) use ($hlp) {\n return $hlp::matchPagePattern($data['pattern']);\n });\n\n $template = array_pop($matches);\n return $template;\n }", "function ydgdict_search_template( $template ) \n{\n if ( is_tax( 'word_type' ) )\n {\n return locate_template( \"taxonomy-word_type\" );\n }\n else if ( is_post_type_archive ( 'entry' ) ) \n {\n return locate_template( \"archive-entry\" );\n }\n\n return $template;\n}", "public function findTemplate(){\n if($this->hasErrors()) return false;\n $located = false;\n if(!$this->hasErrors()){\n $module_file = trailingslashit($this->location).$this->type.'.php';\n $file = trailingslashit($this->module).trailingslashit($this->location).$this->type.'.php';\n switch(true){\n //Check Stylesheet directory first (Child Theme)\n case file_exists(trailingslashit(get_stylesheet_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file):\n $located = trailingslashit(get_stylesheet_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file;\n break;\n //Check Template directory Second (Parent Theme)\n case file_exists(trailingslashit(get_template_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file):\n $located = trailingslashit(get_template_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file;\n break;\n //Check filtered custom template directory, if it's set.\n case (apply_filters($this->prefix('custom_template_directory_root'), '', $this) !== '' && file_exists(trailingslashit(apply_filters($this->prefix('custom_template_directory_root'), '', $this)).$file)):\n $located = trailingslashit($this->prefix('custom_template_directory_root')).$file;\n break;\n //If nothing else exists, go ahead and get the default\n default:\n $file = trailingslashit(ModuleLoader::getModuleDir($this->module)).$module_file;\n if($this->fileExists($file)) $located = $file;\n break;\n }\n }\n\n return $located;\n }", "function locate_block_template($template, $type, array $templates)\n {\n }", "public function find_template(string $for)\n {\n $template = new MailTemplate();\n return $template->where('for_slug', $for)->first();\n }", "function find_template (){\n $scriptbasename = basename ($_SERVER['PHP_SELF']);\n\n// Disable STS for popups: moved to sts_default module since v4.4\n\n // Check for module that will handle the template (for example module sts_index takes care of index.php templates)\n\t$check_file = 'sts_'.$scriptbasename;\n\t$modules_installed = explode (';', MODULE_STS_INSTALLED);\n\tif (!in_array($check_file, $modules_installed)) $check_file = 'sts_default.php';\n\n include_once (DIR_WS_MODULES.'sts/'.$check_file);\n\t$classname=substr($check_file,0,strlen($check_file)-4);\n\t$this->script=new $classname; // Create an object from the module\n\t\n// If module existes but is disabled, use the default module.\n\tif ($this->script->enabled==false) {\n\t unset ($this->script);\n include_once (DIR_WS_MODULES.'sts/sts_default.php');\n\t $this->script=new sts_default; // Create an object from the module\t \n\t}\n\t\n\t$this->template_file = $this->script->find_template($scriptbasename); // Retrieve the template to use, $scriptbasename added in v4.4\n\treturn $this->template_file ;\n }", "abstract public function templateExists($name);", "function carton_locate_template( $template_name, $template_path = '', $default_path = '' ) {\n\tglobal $carton;\n\n\tif ( ! $template_path ) $template_path = $carton->template_url;\n\tif ( ! $default_path ) $default_path = $carton->plugin_path() . '/templates/';\n\n\t// Look within passed path within the theme - this is priority\n\t$template = locate_template(\n\t\tarray(\n\t\t\ttrailingslashit( $template_path ) . $template_name,\n\t\t\t$template_name\n\t\t)\n\t);\n\n\t// Get default template\n\tif ( ! $template )\n\t\t$template = $default_path . $template_name;\n\n\t// Return what we found\n\treturn apply_filters('carton_locate_template', $template, $template_name, $template_path);\n}", "public function getTemplate( string $source, string $template, $find = false, $value = false ) {\n\t\t$multiple = substr_count(\n\t\t\t$source,\n\t\t\t'{{' . $template\n\t\t);\n\t\t// template not found\n\t\tif ( $multiple == 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// 1 template found and no specific argument=value is needed\n\t\tif ( $multiple == 1 && $find === false ) {\n\t\t\t$startPos = $this->getStartPos(\n\t\t\t\t$source,\n\t\t\t\t'{{' . $template\n\t\t\t);\n\t\t\t$endPos = $this->getEndPos(\n\t\t\t\t$startPos,\n\t\t\t\t$source\n\t\t\t);\n\t\t\tif ( $startPos !== false && $endPos !== false ) {\n\t\t\t\treturn substr(\n\t\t\t\t\t$source,\n\t\t\t\t\t$startPos,\n\t\t\t\t\t( $endPos - $startPos - 1 )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// 1 template found, but we need to check for argument=value\n\t\tif ( $multiple == 1 && $find !== false && $value !== false ) {\n\t\t\t$startPos = $this->getStartPos(\n\t\t\t\t$source,\n\t\t\t\t'{{' . $template\n\t\t\t);\n\t\t\t$endPos = $this->getEndPos(\n\t\t\t\t$startPos,\n\t\t\t\t$source\n\t\t\t);\n\t\t\tif ( $startPos !== false && $endPos !== false ) {\n\t\t\t\tif ( $this->checkTemplateValue(\n\t\t\t\t\t\t$source,\n\t\t\t\t\t\t$startPos,\n\t\t\t\t\t\t$endPos,\n\t\t\t\t\t\t$find,\n\t\t\t\t\t\t$value\n\t\t\t\t\t) !== false ) {\n\t\t\t\t\treturn substr(\n\t\t\t\t\t\t$source,\n\t\t\t\t\t\t$startPos,\n\t\t\t\t\t\t( $endPos - $startPos - 1 )\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// We have multiple templates on the page, but no identifier\n\t\tif ( $multiple > 1 && $find === false ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// We have multiple templates on the page and we have an identifier\n\t\tif ( $multiple > 1 && $find !== false && $value !== false ) {\n\t\t\t$offset = 0;\n\t\t\tfor ( $t = 0; $t < $multiple; $t++ ) {\n\t\t\t\t$startPos = $this->getStartPos(\n\t\t\t\t\t$source,\n\t\t\t\t\t'{{' . $template,\n\t\t\t\t\t$offset\n\t\t\t\t);\n\t\t\t\t$endPos = $this->getEndPos(\n\t\t\t\t\t$startPos,\n\t\t\t\t\t$source\n\t\t\t\t);\n\t\t\t\tif ( $startPos !== false && $endPos !== false ) {\n\t\t\t\t\tif ( $this->checkTemplateValue(\n\t\t\t\t\t\t\t$source,\n\t\t\t\t\t\t\t$startPos,\n\t\t\t\t\t\t\t$endPos,\n\t\t\t\t\t\t\t$find,\n\t\t\t\t\t\t\t$value\n\t\t\t\t\t\t) !== false ) {\n\t\t\t\t\t\treturn substr(\n\t\t\t\t\t\t\t$source,\n\t\t\t\t\t\t\t$startPos,\n\t\t\t\t\t\t\t( $endPos - $startPos - 1 )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$offset = $endPos;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "abstract public function getTemplate();", "function locate_template($template_names, $load = \\false, $load_once = \\true, $args = array())\n {\n }", "public function single( $template )\n {\n // Get the current post ID\n $post_id = get_the_ID();\n\n // Get the post type\n $type = get_post_type($post_id);\n\n // Check for template that matches post type\n if( $type && $found = locate_template( 'templates/single/' . $type . '.php' ) )\n {\n return $found;\n }\n\n // Check for single post template\n if( $found = locate_template('templates/single.php') )\n {\n return $found;\n }\n\n return $template;\n }", "function locate_template( $template, $template_name, $template_path ){\r\n\r\n\t\tswitch( $template_name ){\r\n\r\n\t\t\tcase 'form-fields/term-checklist-field.php':\r\n\t\t\t\twp_enqueue_script( 'jmfe-term-checklist-field' );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tif( file_exists( WPJM_FIELD_EDITOR_PLUGIN_DIR . '/templates/' . $template_name ) ){\r\n\t\t\t\t\t$template = WPJM_FIELD_EDITOR_PLUGIN_DIR . '/templates/' . $template_name;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn $template;\r\n\t}", "function get_template($template)\n {\n $login_arr = $this->action_parser($this->action, 'template');\n $pos = array_search($template, $login_arr['template']['name']);\n return $login_arr['template']['path'][$pos];\n }", "function get_template()\n {\n }", "function get_template($template)\n {\n\n $login_arr = $this->action_parser($this->action, 'template');\n\n $pos = array_search($template, $login_arr['template']['name']);\n\n return $login_arr['template']['path'][$pos];\n }", "function mm_template_chooser( $template ) {\n global $wp_query;\n $post_type = get_query_var('post_type');\n if ( $wp_query->is_search && $post_type == 'photos' ) {\n return locate_template('search-photos.php');\n } elseif ( is_tax( 'albums' ) || is_tax( 'keywords' ) ) {\n $template = get_query_template( 'archive-photos' );\n }\n return $template;\n}", "function templateToUse() {\n\t\t// loop until templateType = name | custom\n\t\t$templateType = $this->getTemplateType();\n\t\t$templateCustom = $this->getTemplateCustom();\n\t\t$templateName = $this->getTemplateName();\n\t\t$articleName = $this->getTitleArticle();\n\t\t$articleId = $this->getId();\n\t\t$parent = $this->parent();\n\t\t\n\t\t$i = 0;\n\t\twhile ($templateType != 'name' && $templateType != 'custom' && $parent !== null) {\n\t\t\t$templateType = $parent->getTemplateType();\n\t\t\t$templateCustom = $parent->getTemplateCustom();\n\t\t\t$templateName = $parent->getTemplateName();\n\t\t\t$articleName = $parent->getTitleArticle();\n\t\t\t$articleId = $parent->getId();\n\t\t\t$parent = $parent->parent();\n\t\t}\n\t\t\n\t\t/*\n\t\techo \"<br><br>templateType: \" . $templateType;\n\t\techo \"<br>templateCustom: \" . $templateCustom;\n\t\techo \"<br>templateName: \" . $templateName;\n\t\techo \"<br>articleName: \" . $articleName;\n\t\techo \"<br>articleID: $articleId\";\n\t\t// */\n\t\t\n\t\t$templates = polarbear_getTemplates();\n\t\t\n\t\tpb_pqp_log_speed(\"article templateToUse\");\n\t\t\n\t\tif ($templateType == 'custom') {\n\t\t\treturn $templateCustom;\n\t\t} else if (isset($templates[$templateName])) {\n\t\t\treturn $templates[$templateName]['file'];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "public function findOneByTemplateName($templateName);", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "function rf_locate_template( $template_name, $template_path = '', $default_path = '' )\n{\n if ( ! $template_path ) {\n $template_path = RFFramework()->template_path();\n }\n\n if ( ! $default_path ) {\n $default_path = RFFramework()->path();\n }\n\n // Locate the template within the template structure\n $template = locate_template(\n array(\n trailingslashit( $template_path ) . $template_name\n )\n );\n\n if ( ! $template ) {\n $template = trailingslashit( $default_path ) . $template_name;\n }\n return $template;\n}", "function getTemplate();", "public function view_project_template( $template ) {\n\n global $post;\n\n if ( !isset( $post ) ) return $template;\n\n if ( ! isset( $this->templates[ get_post_meta( $post->ID, '_wp_page_template', true ) ] ) ) {\n return $template;\n } // end if\n\n $template_loader = new Uou_Atmf_Load_Template();\n\n if( is_page_template( 'atmf-search.php' ) ){\n $file = $template_loader->locate_template( 'atmf-search.php' );\n }\n\n\n // $file = plugin_dir_path( __FILE__ ) . 'templates/' . get_post_meta( $post->ID, '_wp_page_template', true );\n\n if( file_exists( $file ) ) {\n return $file;\n } // end if\n\n return $template;\n\n }", "public function findTemplate($template_name) {\n $test_path = $this->wp_theme_root . 'templates/' . $template_name;\n if ( file_exists( $test_path ) ) {\n return $test_path;\n } else {\n $test_path = $this->path. 'templates/' . $template_name;\n if ( file_exists($test_path) ) {\n return $test_path;\n } else {\n throw new Exception( __('Core Template was not found: ') . ' ' . $template_name );\n }\n }\n }", "public function findTemplate($template_name) {\n $test_path = $this->wp_theme_root . 'templates/' . $template_name;\n if ( file_exists( $test_path ) ) {\n return $test_path;\n } else {\n $test_path = $this->path. 'templates/' . $template_name;\n if ( file_exists($test_path) ) {\n return $test_path;\n } else {\n throw new Exception( __('Core Template was not found: ') . ' ' . $template_name );\n }\n }\n }", "function ct_get_template_hierarchy( $template ) {\n \n // Get the template slug\n $template_slug = rtrim( $template, '.php' );//single\n $template = $template_slug . '.php'; //single.php\n\n //logit($template,'$template: ');\n //logit($template_slug,'$template_slug: ');\n\n //$locate = locate_template( array( 'plugin_templates/single.php' ) );\n //$locateString = 'plugin_template/' . $template;\n //logit($locateString,'$locateString: ');\n //logit($locate,'$locate: ');\n \n // Check if a custom template exists in the theme folder, if not, load the plugin template file\n if ( $theme_file = locate_template( array( 'cals_teams_templates/' . $template ) ) ) {\n $file = $theme_file;\n logit($file,'$file: ');\n\n }\n else {\n $file = CT_PLUGIN_BASE_DIR . '/includes/templates/' . $template;\n }\n \n //return apply_filters( 'rc_repl_template_' . $template, $file );\n return $file;\n}", "public function templateExists($template);", "function wac_locate_template( $template_name, $template_path = '', $default_path = '' ) {\n\tglobal $woo_auction;\n\tif(!$template_path){\n\t\t$template_path = $woo_auction->theme_template_path();\n\t}\n\tif(!$default_path){\n\t\t$default_path = $woo_auction->plugin_path() . '/templates/';\n\t}\n\t\n\t// Look within passed path within the theme - this is priority.\n\t$template = locate_template(\n\t\tarray(\n\t\t\ttrailingslashit($template_path) . $template_name,\n\t\t\t$template_name,\n\t\t)\n\t);\n\t\n\t// Get default template/\n\tif (!$template){\n\t\t$template = $default_path . $template_name;\n\t}\n\n\t// Return what we found.\n\treturn apply_filters('wac_locate_template',$template,$template_name,$template_path );\n}", "public function getTemplate ($template) {\n $temps = $this->getTemplates();\n foreach ($temps as $temp) {\n if ($temp['module_name'] == $template) {\n return $temp;\n }\n }\n return false;\n }", "public function findTemplate(string $index): Template\n {\n $template = $this->getByIndex($index);\n\n if ($template instanceof Template) {\n return $template;\n }\n\n // Oops, template not found\n throw TemplateNotFoundException::create($index);\n }", "function ffd_locate_template( $template_name, $template_path = '', $default_path = '' ) {\r\n\tif ( ! $template_path ) {\r\n\t\t$template_path = FFD()->template_path();\r\n\t}\r\n\r\n\tif ( ! $default_path ) {\r\n\t\t$default_path = FFD()->plugin_path() . '/templates/';\r\n\t}\r\n\r\n\t// Look within passed path within the theme - this is priority.\r\n\t$template = locate_template(\r\n\t\tarray(\r\n\t\t\ttrailingslashit( $template_path ) . $template_name,\r\n\t\t\t$template_name,\r\n\t\t)\r\n\t);\r\n\r\n\t// Get default template/.\r\n\tif ( ! $template || FFD_TEMPLATE_DEBUG_MODE ) {\r\n\t\t$template = $default_path . $template_name;\r\n\t}\r\n\r\n\t// Return what we found.\r\n\treturn apply_filters( 'ffd_locate_template', $template, $template_name, $template_path );\r\n}", "function PREFIX_search_page_template( $template ) {\n\tif ( is_search() ) {\n\t\t$new_template = locate_template( array( 'searchpage.php' ) );\n\n\t\tif ( '' != $new_template ) {\n\t\t\treturn $new_template ;\n\t\t}\n\t}\n\n\treturn $template;\n}", "public function search_template() {\n\n\t\tif( empty( $_GET['s'] ) )\n\t\t\treturn;\n\n\t\tif( empty( $_GET['s_type'] ) )\n\t\t\treturn;\n\n\t\tif( 'images' == $_GET['s_type'] && ! isset( $_GET['cgc-search'] ) ) {\n\t\t\t$args = array(\n\t\t\t\t's_post_type' => 'images',\n\t\t\t\t's_type' => 'images',\n\t\t\t\t's' => $_GET['s'],\n\t\t\t\t'cgc-search' => '1'\n\t\t\t);\n\t\t\twp_redirect( add_query_arg( $args, home_url() ) ); exit;\n\t\t}\n\n\t\tif( 'members' != $_GET['s_type'] )\n\t\t\treturn;\n\n\t\t// Check child theme\n\t\tif ( file_exists( trailingslashit( get_stylesheet_directory() ) . 'search-members.php' ) ) {\n\t\t\t$located = trailingslashit( get_stylesheet_directory() ) . 'search-members.php';\n\n\t\t// Check parent theme next\n\t\t} elseif ( file_exists( trailingslashit( get_template_directory() ) . 'search-members.php' ) ) {\n\t\t\t$located = trailingslashit( get_template_directory() ) . 'search-members.php';\n\t\t}\n\t\t//echo $located;\n\t\tif( ! empty( $located ) ) {\n\t\t\t$templates = array( 'search-members.php' );\n\t\t\tlocate_template( $templates, true, true );\n\t\t\texit;\n\t\t}\n\n\t}", "public function getTemplate() {}", "abstract public function getTemplate($tpl);", "function db_get_template ($tpl_name, &$tpl_source, &$smarty_obj) {\n Global $loq;\n $rs = $loq->_adb->Execute(\"select template from \".T_TEMPLATES.\" where templatename='$tpl_id'\");\n if($rs !== false && !$rs->EOF){\n $tpl_source = $rs->fields[0];\n }\n return true;\n}", "function youpztStore_locate_template( $template_name, $template_path = '', $default_path = '' ) {\n if ( ! $template_path ) {\n $template_path =UPSTORE_TEMPLATE_DIR;\n }\n\n if ( ! $default_path ) {\n $default_path =UPSTORE_PLUGIN_DIR.'/templates/';\n }\n\n // Look within passed path within the theme - this is priority.\n $template = locate_template(\n array(\n trailingslashit( $template_path ) . $template_name,\n $template_name\n )\n );\n\n // Get default template/\n if ( ! $template) {\n $template = $default_path . $template_name;\n }\n\n // Return what we found.\n return $template;\n}", "function learn_press_pmpro_locate_template( $name ) {\n\t$file = learn_press_locate_template( $name, 'learnpress-paid-membership-pro', learn_press_template_path() . '/addons/paid-membership-pro/' );\n\t// If template does not exists then look in learnpress/addons/paid-membership-pro in the theme\n\tif ( ! file_exists( $file ) ) {\n\t$file = learn_press_locate_template( $name, learn_press_template_path() . '/addons/paid-membership-pro/', LP_ADDON_PMPRO_PATH . '/templates/' );\n\t}\n\treturn $file;\n}", "function yith_ywraq_locate_template( $path, $var = NULL ) {\n\n if ( function_exists( 'WC' ) ) {\n $woocommerce_base = WC()->template_path();\n }\n elseif ( defined( 'WC_TEMPLATE_PATH' ) ) {\n $woocommerce_base = WC_TEMPLATE_PATH;\n }\n else {\n $woocommerce_base = WC()->plugin_path() . '/templates/';\n }\n\n $template_woocommerce_path = $woocommerce_base . $path;\n $template_path = '/' . $path;\n $plugin_path = YITH_YWRAQ_DIR . 'templates/' . $path;\n\n $located = locate_template( array(\n $template_woocommerce_path, // Search in <theme>/woocommerce/\n $template_path, // Search in <theme>/\n $plugin_path // Search in <plugin>/templates/\n ) );\n\n if ( !$located && file_exists( $plugin_path ) ) {\n return apply_filters( 'yith_ywraq_locate_template', $plugin_path, $path );\n }\n\n return apply_filters( 'yith_ywraq_locate_template', $located, $path );\n }", "function myplugin_woocommerce_locate_template( $template, $template_name, $templates_directory ) {\n\t$original_template = $template;\n\n\tif ( ! $templates_directory ) {\n\t\t$templates_directory = WC()->template_url;\n\t}\n\n // Plugin's custom templates/ directory\n\t$plugin_path = myplugin_get_plugin_path() . '/templates/';\n\n\t// Look within passed path within the theme - this is priority.\n\t$template = locate_template(\n\t\tarray(\n\t\t\t$templates_directory . $template_name,\n\t\t\t$template_name,\n\t\t)\n\t);\n\n\t// Get the template from this plugin under /templates/ directory, if it exists.\n\tif ( ! $template && file_exists( $plugin_path . $template_name ) ) {\n\t\t$template = $plugin_path . $template_name;\n\t}\n\n\t// Use default template if not found a suitable template under plugin's /templates/ directory.\n\tif ( ! $template ) {\n\t\t$template = $original_template;\n\t}\n\n\t// Return what we found.\n\treturn $template;\n}", "public function page( $template )\n {\n // Get the current post ID\n $post_id = get_the_ID();\n\n // Get the current post slug\n $slug = get_page_uri($post_id);\n\n // Check pages directory for page\n if( $found = locate_template('templates/page/' . $slug . '.php') )\n {\n return $found;\n }\n\n // Check for generic page template\n if( $found = locate_template('templates/page.php') )\n {\n return $found;\n }\n\n // Use wp default location\n return $template;\n\n }", "function st_get_template($file,$data = array()){\r $file = ST_DIR.'/templates/'.$file;\r if(file_exists($file)){\r include($file); return true;\r }\r return false;\r}", "function emp_locate_template( $template_name, $load=false, $args = array() ) {\n\t//First we check if there are overriding tempates in the child or parent theme\n\t$located = locate_template(array('plugins/events-manager-pro/'.$template_name));\n\tif( !$located ){\n\t\t$dir_location = plugin_dir_path(__FILE__);\n\t\tif ( file_exists( $dir_location.'templates/'.$template_name) ) {\n\t\t\t$located = $dir_location.'templates/'.$template_name;\n\t\t}\n\t}\n\t$located = apply_filters('emp_locate_template', $located, $template_name, $load, $args);\n\tif( $located && $load ){\n\t\tif( is_array($args) ) extract($args);\n\t\tinclude($located);\n\t}\n\treturn $located;\n}", "function bok_locate_template( $template_names, $load = false, $require_once = true, $template_vars ) {\n\t// No file found yet\n\t$located = false;\n\n\t// Try to find a template file\n\tforeach ( (array) $template_names as $template_name ) {\n\n\t\t// Continue if template is empty\n\t\tif ( empty( $template_name ) )\n\t\t\tcontinue;\n\n\t\t// Trim off any slashes from the template name\n\t\t$template_name = ltrim( $template_name, '/' );\n\n\t\t// Check child theme first\n\t\tif ( file_exists( trailingslashit( get_stylesheet_directory() ) . 'multi-rating/' . $template_name ) ) {\n\t\t\t$located = trailingslashit( get_stylesheet_directory() ) . 'multi-rating/' . $template_name;\n\t\t\tbreak;\n\n\t\t\t// Check parent theme next\n\t\t} elseif ( file_exists( trailingslashit( get_template_directory() ) . 'multi-rating/' . $template_name ) ) {\n\t\t\t$located = trailingslashit( get_template_directory() ) . 'multi-rating/' . $template_name;\n\t\t\tbreak;\n\n\t\t\t// Check theme compatibility last\n\t\t} elseif ( file_exists( trailingslashit( bok_get_templates_dir() ) . $template_name ) ) {\n\t\t\t$located = trailingslashit( bok_get_templates_dir() ) . $template_name;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ( ( true == $load ) && ! empty( $located ) ) {\n\t\tbok_load_template( $located, $require_once, $template_vars );\n\t}\n\n\treturn $located;\n}", "function youpztStore_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\n if ( $args && is_array( $args ) ) {\n extract( $args );\n }\n\n $located = youpztStore_locate_template( $template_name, $template_path, $default_path );\n\n if ( ! file_exists( $located ) ) {\n //_doing_it_wrong( __FUNCTION__, sprintf( '<code>%s</code> does not exist.', $located ), '2.1' );\n return;\n }\n\n // Allow 3rd party plugin filter template file from their plugin.\n $located = apply_filters('youpztStore_get_template', $located, $template_name, $args, $template_path, $default_path );\n\n include( $located );\n\n}", "public function templateExists(string $template_name);", "function emscvupload_locate_template( $template_names, $load = false, $require_once = true, $atts=array() ) {\n\tglobal $emscvupload_template_folder;\n\n\t// No file found yet\n\t$located = false;\n\n\t// Try to find a template file\n\tforeach ( (array) $template_names as $template_name ) {\n\n\t\t// Continue if template is empty\n\t\tif ( empty( $template_name ) )\n\t\t\tcontinue;\n\n\t\t// Trim off any slashes from the template name\n\t\t$template_name = ltrim( $template_name, '/' );\n\n\t\t// Check child theme first\n\t\tif ( file_exists( trailingslashit( get_stylesheet_directory() ) . $emscvupload_template_folder . $template_name ) ) {\n\t\t\t$located = trailingslashit( get_stylesheet_directory() ) . $emscvupload_template_folder . $template_name;\n\t\t\tbreak;\n\n\t\t// Check parent theme next\n\t\t} elseif ( file_exists( trailingslashit( get_template_directory() ) . $emscvupload_template_folder . $template_name ) ) {\n\t\t\t$located = trailingslashit( get_template_directory() ) . $emscvupload_template_folder . $template_name;\n\t\t\tbreak;\n\n\t\t// Check theme compatibility last\n\t\t} elseif ( file_exists( trailingslashit( emscvupload_get_templates_dir() ) . $template_name ) ) {\n\t\t\t$located = trailingslashit( emscvupload_get_templates_dir() ) . $template_name;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ( ( true == $load ) && ! empty( $located ) )\n\t\temscvupload_load_template( $located, $require_once, $atts );\n\n\treturn $located;\n}", "public function get_template()\n {\n }", "public function get_template()\n {\n }", "function catch_plugin_template($template) {\n\t\n // If tp-file.php is the set template\n if( is_page_template('cg-search.php') )\n \t{\n // Update path(must be path, use WP_PLUGIN_DIR and not WP_PLUGIN_URL) \n $template = WP_PLUGIN_DIR . '/hyp3rl0cal-wordpress-plugin/cg-search.php';\n \t}\n \t\n // If tp-file.php is the set template\n if( is_page_template('cg-directory.php') )\n \t{\n // Update path(must be path, use WP_PLUGIN_DIR and not WP_PLUGIN_URL) \n $template = WP_PLUGIN_DIR . '/hyp3rl0cal-wordpress-plugin/cg-directory.php';\n \t} \t\n \n // Return\n return $template;\n}", "public function testFindTemplates()\n {\n\n }", "function templates_example()\n{\n /* Get post object by its template */\n $post = \\ActiTemplate\\Template::getTemplatePageObject('page-contact.php');\n\n /* Get post ID by its template */\n $postID = \\ActiTemplate\\Template::getTemplatePageId('page-contact.php');\n\n /* Get post url by its template */\n $url = \\ActiTemplate\\Template::getTemplatePageUrl('page-contact.php');\n}", "private function locate_template( $name ) {\n\t\t$file = plugin_dir_path( $this->plugin->file ) . 'templates/' . $name . '.php';\n\n\t\tif ( is_readable( $file ) ) {\n\t\t\treturn $file;\n\t\t}\n\t}", "private function fetchTemplate($template)\n {\n $resolver = $this->getResolver();\n $content = $resolver->resolve($template);\n\n if (! $content) {\n throw new Exception\\TemplateNotFoundException('Template by name \"' . $template . '\" not found');\n }\n\n return $content;\n }", "function my_single_template($single) {\n global $wp_query, $post;\n\n /**\n * Checks for single template by category\n * Check by category slug and ID\n */\n foreach((array)get_the_category() as $cat) :\n\n if(file_exists(TEMPLATEPATH . '/single-' . $cat->slug . '.php'))\n return TEMPLATEPATH . '/single-' . $cat->slug . '.php';\n\n endforeach;\n\n return $single;\n\n}", "function dg_choose_template( $template ) {\n\n\tif ( !is_admin() && is_home() ) {\n\t\t\n\t\t$new_template = locate_template( array( 'single.php' ) );\n\t\t\n\t\tif ( !empty( $new_template ) ) {\n\t\t\treturn $new_template;\n\t\t}\n\t}\n\n\treturn $template;\n}", "function bp_gtm_load_template_filter($found_template, $templates) {\n global $bp;\n\n if ($bp->current_action == $bp->gtm->slug || $bp->current_component == $bp->gtm->slug) {\n foreach ((array) $templates as $template) {\n $path = is_child_theme() ? TEMPLATEPATH : STYLESHEETPATH; // different path to themes files\n if (file_exists($path . '/' . $template)) {\n $filtered_templates[] = $path . '/' . $template;\n } else if (file_exists(STYLESHEETPATH . '/gtm/' . $template)) {\n $filtered_templates[] = STYLESHEETPATH . '/gtm/' . $template;\n } else {\n if (($position = strpos($template, '/')) !== false)\n $template = substr($template, $position + 1);\n $filtered_templates[] = plugin_dir_path(__FILE__) . 'templates/gtm/' . $template;\n }\n }\n $found_template = $filtered_templates[0];\n\n return apply_filters('bp_gtm_load_template_filter', $found_template);\n } else {\n return $found_template;\n }\n}", "function templateFile() {\n return 'CRM/Press/Form/Search/CRM/Muntpunt/PressSearch.tpl';\n }", "function ffd_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\r\n\tif ( ! empty( $args ) && is_array( $args ) ) {\r\n\t\textract( $args ); // @codingStandardsIgnoreLine\r\n\t}\r\n\r\n\t$located = ffd_locate_template( $template_name, $template_path, $default_path );\r\n\r\n\tif ( ! file_exists( $located ) ) {\r\n\t\t/* translators: %s template */\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Allow 3rd party plugin filter template file from their plugin.\r\n\t$located = apply_filters( 'ffd_get_template', $located, $template_name, $args, $template_path, $default_path );\r\n\r\n\tdo_action( 'ffd_before_template_part', $template_name, $template_path, $located, $args );\r\n\r\n\tinclude $located;\r\n\r\n\tdo_action( 'ffd_after_template_part', $template_name, $template_path, $located, $args );\r\n}", "function astra_addon_locate_template( $template_name, $template_path = '', $default_path = '' ) {\n\n\t\tif ( ! $template_path ) {\n\t\t\t$template_path = 'astra-addon/';\n\t\t}\n\n\t\tif ( ! $default_path ) {\n\t\t\t$default_path = ASTRA_EXT_DIR . 'addons/';\n\t\t}\n\n\t\t/**\n\t\t * Look within passed path within the theme - this is priority.\n\t\t *\n\t\t * Note: Avoided directories '/addons/' and '/template/'.\n\t\t *\n\t\t * E.g.\n\t\t *\n\t\t * 1) Override Footer Widgets - Template 1.\n\t\t * Addon: {astra-addon}/addons/advanced-footer/template/layout-1.php\n\t\t * Theme: {child-theme}/astra-addon/advanced-footer/layout-1.php\n\t\t *\n\t\t * 2) Override Blog Pro - Template 2.\n\t\t * Addon: {astra-addon}/addons/blog-pro/template/blog-layout-2.php\n\t\t * Theme: {child-theme}/astra-addon/blog-pro/blog-layout-2.php.\n\t\t */\n\t\t$theme_template_name = str_replace( 'template/', '', $template_name );\n\t\t$template = locate_template(\n\t\t\tarray(\n\t\t\t\ttrailingslashit( $template_path ) . $theme_template_name,\n\t\t\t\t$theme_template_name,\n\t\t\t)\n\t\t);\n\n\t\t// Get default template.\n\t\tif ( ! $template || ASTRA_EXT_TEMPLATE_DEBUG_MODE ) {\n\t\t\t$template = $default_path . $template_name;\n\t\t}\n\n\t\t// Return what we found.\n\t\treturn apply_filters( 'astra_addon_locate_template', $template, $template_name, $template_path );\n\t}", "function LoadTemplate( $name )\n{\n if ( file_exists(\"$name.html\") ) return file_get_contents(\"$name.html\");\n if ( file_exists(\"templates/$name.html\") ) return file_get_contents(\"templates/$name.html\");\n if ( file_exists(\"../templates/$name.html\") ) return file_get_contents(\"../templates/$name.html\");\n}", "public function intendedTemplate() {\n if(isset($this->cache['intendedTemplate'])) return $this->cache['intendedTemplate'];\n return $this->cache['intendedTemplate'] = $this->content()->exists() ? $this->content()->name() : 'default';\n }", "public function resolve($template);", "public function getTemplate($name){\n if(isset($name)){\n return $this->template[$name]; // $this->envir->loadTemplate($template)\n }\n return $this->template[$this->templace_interator++]; // $this->envir->loadTemplate($template)\n }", "public function testFindGlobalTemplates()\n {\n\n }", "public function fetch_template($template)\n\t{\n\t\t$this->EE->load->library('template_helper');\n\t\treturn $this->EE->template_helper->fetch_template($template); \n\t}", "private function findTemplatePath($template, $throw_exception = true)\n {\n assert('is_string($template)');\n\n list($templateModule, $templateName) = $this->findModuleAndTemplateName($template);\n $templateModule = ($templateModule !== null) ? $templateModule : 'default';\n\n // first check the current theme\n if ($this->theme['module'] !== null) {\n // .../module/<themeModule>/themes/<themeName>/<templateModule>/<templateName>\n\n $filename = \\SimpleSAML\\Module::getModuleDir($this->theme['module']).\n '/themes/'.$this->theme['name'].'/'.$templateModule.'/'.$templateName;\n } elseif ($templateModule !== 'default') {\n // .../module/<templateModule>/templates/<templateName>\n $filename = \\SimpleSAML\\Module::getModuleDir($templateModule).'/templates/'.$templateName;\n } else {\n // .../templates/<theme>/<templateName>\n $filename = $this->configuration->getPathValue('templatedir', 'templates/').$templateName;\n }\n\n if (file_exists($filename)) {\n return $filename;\n }\n\n // not found in current theme\n \\SimpleSAML\\Logger::debug(\n $_SERVER['PHP_SELF'].' - Template: Could not find template file ['.$template.'] at ['.\n $filename.'] - now trying the base template'\n );\n\n // try default theme\n if ($templateModule !== 'default') {\n // .../module/<templateModule>/templates/<templateName>\n $filename = \\SimpleSAML\\Module::getModuleDir($templateModule).'/templates/'.$templateName;\n } else {\n // .../templates/<templateName>\n $filename = $this->configuration->getPathValue('templatedir', 'templates/').'/'.$templateName;\n }\n\n if (file_exists($filename)) {\n return $filename;\n }\n\n // not found in default template\n if ($throw_exception) {\n // log error and throw exception\n $error = 'Template: Could not find template file ['.$template.'] at ['.$filename.']';\n \\SimpleSAML\\Logger::critical($_SERVER['PHP_SELF'].' - '.$error);\n\n throw new Exception($error);\n } else {\n // missing template expected, return NULL\n return null;\n }\n }", "function get_template($id, $type)\n{\n\t$query = \"SELECT template from users WHERE id='$id'\";\n\t$result = mysql_query($query) or die('Hiba a lekérdezésben: ' . mysql_error());\n\t$user = mysql_fetch_array($result, MYSQL_ASSOC);\n\tmysql_free_result($result);\n\t\n\t$less = explode(\"<post>\", $user['template']);\n\tif ($type == \"header\")\n\t\treturn $less[0];\n\telse\n\t{\n\t\t$less = explode(\"</post>\", $less[1]);\n\t\tif ($type == \"footer\")\n\t\t\t\treturn $less[1];\n\t\telse\n\t\t\treturn $less[0]; // post\n\t}\n}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "public function hasTemplate() {}", "public function template_include() {\n\n\t\treturn locate_template( array( 'page.php', 'single.php', 'index.php' ) );\n\t}", "function deals_get_template($template_name, $require_once = true) {\n\tif (file_exists( STYLESHEETPATH . '/' . DEALS_TEMPLATE . $template_name )) load_template( STYLESHEETPATH . '/' . DEALS_TEMPLATE . $template_name, $require_once ); \n\telseif (file_exists( STYLESHEETPATH . '/' . $template_name )) load_template( STYLESHEETPATH . '/' . $template_name , $require_once); \n\telse load_template( DEALS_TEMPLATE_DIR . $template_name , $require_once);\n}", "abstract public function getTemplateFile();", "function carton_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\n\tglobal $carton;\n\n\tif ( $args && is_array($args) )\n\t\textract( $args );\n\n\t$located = carton_locate_template( $template_name, $template_path, $default_path );\n\n\tdo_action( 'carton_before_template_part', $template_name, $template_path, $located );\n\n\tinclude( $located );\n\n\tdo_action( 'carton_after_template_part', $template_name, $template_path, $located );\n}", "function rf_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\n if ( ! empty( $args ) && is_array( $args ) ) {\n extract( $args );\n }\n\n $located = rf_locate_template( $template_name, $template_path, $default_path );\n\n if ( ! file_exists( $located ) ) {\n _doing_it_wrong( __FUNCTION__, sprintf( __( '%s does not exist.', 'woocommerce' ), '<code>' . $located . '</code>' ), '2.1' );\n return;\n }\n\n // Allow 3rd party plugin filter template file from their plugin.\n $located = apply_filters( 'rf_get_template', $located, $template_name, $args, $template_path, $default_path );\n include( $located );\n}", "public function locateTemplate(OutputInterface $output): string;", "function getTemplate($fileName)\n{\n // variable $file equals $fileName\n // $fileName is given value when function is called getTemplate(page1_template.html)\n // file_get_contents = reads entire file into a string\n $file = file_get_contents($fileName);\n // IF we point to the file\n if($file ) {\n // returns the contents of the file.\n return $file;\n }\n // ELSE (the file is not pointing to the correct place)\n else {\n // print the message \"File not found\" and exit the script ( die() ).\n die(\"File not found\");\n }\n\n}", "function voyage_mikado_load_search_template() {\n\t\tglobal $voyage_mikado_IconCollections;\n\n\t\t$search_type = voyage_mikado_options()->getOptionValue('search_type');\n\n\t\t$search_icon = '';\n\t\tif(voyage_mikado_options()->getOptionValue('search_icon_pack') !== '') {\n\t\t\t$search_icon = $voyage_mikado_IconCollections->getSearchIcon(voyage_mikado_options()->getOptionValue('search_icon_pack'), true);\n\t\t}\n\n\t\t$parameters = array(\n\t\t\t'search_in_grid' => voyage_mikado_options()->getOptionValue('search_in_grid') == 'yes' ? true : false,\n\t\t\t'search_icon' => $search_icon,\n\t\t);\n\n\t\tvoyage_mikado_get_module_template_part('templates/types/'.$search_type, 'search', '', $parameters);\n\n\t}", "public function locate_template( $template, $template_name, $template_path ) {\n\n\t\t// Only keep looking if no custom theme template was found or if\n \t\t// a default WooCommerce template was found.\n \t\tif ( ! $template || SV_WC_Helper::str_starts_with( $template, WC()->plugin_path() ) ) {\n\n \t\t\t// Set the path to our templates directory\n \t\t\t$plugin_path = wc_product_reviews_pro()->get_plugin_path() . '/templates/';\n\n \t\t\t// If a template is found, make it so\n \t\t\tif ( is_readable( $plugin_path . $template_name ) ) {\n \t\t\t\t$template = $plugin_path . $template_name;\n \t\t\t}\n \t\t}\n\n\t\treturn $template;\n\t}", "public function get_search_template( $search_template ) {\n\n\t\tif ( get_query_var( 'post_type' ) === $this->post_type ) {\n\t\t\t$search_template = $this->path . '/' . $this->archive_file;\n\t\t}\n\n\t\treturn $search_template;\n\n\t}", "function astra_locate_template( $template_name, $template_path = '', $default_path = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound\n\t_deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_locate_template()' );\n\treturn astra_addon_locate_template( $template_name, $template_path = '', $default_path = '' );\n}", "function smarty_resource_text_get_template($tpl_name, &$tpl_source, &$smarty_obj) {\n\t$tpl_source = $tpl_name;\n\treturn true;\n}" ]
[ "0.72728074", "0.72377205", "0.6886425", "0.6819081", "0.6818397", "0.68077385", "0.6726459", "0.6682207", "0.6650232", "0.66247827", "0.65811116", "0.65474373", "0.65290385", "0.6516493", "0.65045923", "0.64993376", "0.6484759", "0.64760053", "0.644285", "0.64335823", "0.64230275", "0.6420238", "0.64142954", "0.6407243", "0.6399298", "0.6389656", "0.6389656", "0.6389656", "0.6389656", "0.6389656", "0.6389656", "0.6385563", "0.63540024", "0.6350929", "0.6324644", "0.6324644", "0.6318947", "0.6311015", "0.6303457", "0.630079", "0.6284873", "0.6272282", "0.6235074", "0.62187207", "0.62122405", "0.6192619", "0.6175329", "0.61383384", "0.61235625", "0.6099808", "0.60689735", "0.6038353", "0.6037972", "0.6014914", "0.59997034", "0.59899026", "0.59790456", "0.59735733", "0.59608066", "0.5959801", "0.5952306", "0.5952226", "0.5942096", "0.59391236", "0.59162575", "0.5909121", "0.5872276", "0.58648217", "0.58403146", "0.5839184", "0.58321106", "0.5830955", "0.5823519", "0.5814357", "0.5801076", "0.57993376", "0.5798804", "0.5797106", "0.5779236", "0.5776842", "0.57758594", "0.57758594", "0.57754517", "0.57754517", "0.5773455", "0.5773455", "0.5773455", "0.5773455", "0.57684547", "0.5763463", "0.5760589", "0.5757335", "0.57506585", "0.5746191", "0.5741244", "0.5740477", "0.5737852", "0.5730881", "0.5717742", "0.57162005", "0.56992304" ]
0.0
-1
Get all templates from DB
public function getTemplatesFromDB();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllTemplates(){ //return all templates in database to the select to choose from templates\n return TemplatesResource::collection(TemplateProject::all());\n }", "public function getTemplates(){\n\t\n\t\tif( empty($this->_templates) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 't.tmpl_id AS value, t.tmpl_name AS text' );\n\t\t\t$query->from( '#__zbrochure_templates AS t' );\n\t\t\t$query->where( 't.tmpl_published = 1' );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_templates = $this->_db->loadObjectList();\n\n\t\t}\n\t\t\n\t\treturn $this->_templates;\n\t\n\t}", "function getTemplates() {\n\n // Lets load the data if it doesn't already exist\n if (empty($this->_data)) {\n\n // constructs the query\n $query = ' SELECT * '\n . ' FROM #__templateck';\n\n // retrieves the data\n $this->_data = $this->_getList($query);\n }\n\n return $this->_data;\n }", "function ListTemplates()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $Config;\r\n\t\t\t\r\n\t\t\t$sql = \"select * from templates order by TemplateDisplayName asc\" ; \r\n\t\t\treturn $this->get_results($sql);\t\t\r\n\t }", "public function index() {\n $templates = Template::all();\n return $templates;\n }", "public function getAllSMSTemplates()\n {\n $selectTempsql = 'SELECT temp_id, temp_name FROM ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $selectTempsql .= ' WHERE 1 Order By temp_name ASC';\n $templateRes = Db::getInstance()->ExecuteS($selectTempsql);\n return $templateRes;\n }", "public function getAllTemplates() {\n $pages = Templates::templates()->get();\n\n return response()->json($pages);\n }", "public function get_templates()\n {\n $template = new MailTemplate();\n return $template->findAll();\n }", "public function getAllSlideTemplates() {\n return $this->container->get('doctrine')\n ->getRepository('Os2DisplayCoreBundle:SlideTemplate')\n ->findAll();\n }", "function getAllPageTemplates() {\n global $wpdb;\n return $wpdb->get_col(\"SELECT DISTINCT meta_value FROM wp_postmeta WHERE meta_key = '_wp_page_template'\"); \n }", "function customcert_get_templates() {\n global $DB;\n\n return $DB->get_records_menu('customcert_template', array(), 'name ASC', 'id, name');\n}", "public function getTemplates()\n {\n return $this->hasMany(Template::className(), ['atk_id' => 'id']);\n }", "public function getTemplates()\n {\n $finder = Finder::create()\n ->files()\n ->name('*.sql')\n ->in($this->rootDir.'/../templates')\n ;\n\n $templates = [];\n\n /** @var SplFileInfo $file */\n foreach ($finder as $file) {\n $templates[] = $file->getRelativePathname();\n }\n\n return $templates;\n }", "protected function getTemplates()\r\n\t{\r\n\t\t$templates = array();\r\n\t\tforeach ($this->getProjectDao()->getAllModelTemplates() as $template)\r\n\t\t\t$templates[$template->ID] = $template->Template;\r\n\t\treturn $templates;\r\n\t}", "public function fetchAll()\n {\n $templateTypeTable = new Api_Model_DbTable_TemplateType();\n\n $rowset = $templateTypeTable->fetchAll(null, 'name');\n\n $templateTypes = new Set();\n foreach ($rowset as $row) {\n $templateType = Type::factory($row);\n\n $templateTypes->addItem($templateType);\n }\n\n return $templateTypes;\n }", "public function GetSavedTemplates() {\n\t\t$templates = &drupal_static(__FUNCTION__, NULL, $this->reset);\n\n\t\tif (!isset($templates)) {\n\t\t\t$templates = db_select('{'.ACQUIA_COMPOSER_TEMPLATES_TABLE.'}', 'ac')\n\t\t\t\t->fields('ac')\n\t\t\t\t->execute()\n\t\t\t\t->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t\tif (!count($templates)) {\n\t\t\t\t$templates = array();\n\t\t\t}\n\t\t}\n\t\treturn $templates;\n\t}", "function templates()\n {\n return [];\n }", "public function getTemplates() {\n $pages = Templates::templates()->paginate(Templates::getPageSize());\n\n return response()->json($pages);\n }", "function fetch_templates( $module_id = false ) // fetch templates for module or all or global\n\t{\n\t\tif( $module_id ) {\n\t\t\t$this->db->where( 'module_id', $module_id );\n\t\t}\n\t\t$query=$this->db->get( 'templates' );\n\t\t$this->db->flush_cache();\n\t\treturn $query->result_array();\n\t}", "public function getTemplates (){\n $dir = conf::pathHtdocs() . \"/templates\";\n $templates = file::getFileList($dir, array('dir_only' => true));\n\n $ary = array ();\n foreach ($templates as $val){\n $info = $this->getSingleTemplate($val);\n if (empty($info)) {\n continue;\n }\n $ary[] = $info;\n }\n return $ary;\n }", "private function find_templates () {\r\n\t\t$results = array();\r\n\r\n\t\t$files = WooDojo_Utils::glob_php( '*.php', GLOB_MARK, $this->templates_dir );\r\n\r\n\t\tif ( is_array( $files ) && count( $files ) > 0 ) {\r\n\t\t\tforeach ( $files as $k => $v ) {\r\n\t\t\t\t$data = $this->get_template_data( $v );\r\n\t\t\t\tif ( is_object( $data ) && isset( $data->title ) ) {\r\n\t\t\t\t\t$results[$v] = $data->title;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $results;\r\n\t}", "public function getCreatedTemplates ()\n {\n // Get all the templates\n $table = DB::select('select id_template, name_template, created_at, icon from ezz_templates');\n return response()->json([\n 'templates' => $table\n ], 200);\n }", "public function getTemplateList() {\n\t\t$aArgs = func_get_args();\n\t\t$aRet = call_user_func_array( array( $this, 'getTemplates' ), $aArgs );\n\t\treturn implode( '|', $aRet );\n\t}", "public function getAllScreenTemplates() {\n return $this->container->get('doctrine')\n ->getRepository('Os2DisplayCoreBundle:ScreenTemplate')\n ->findAll();\n }", "public function getTemplates0()\n {\n return $this->hasMany(Template::className(), ['background_id' => 'id']);\n }", "function getPrintTemplates(){\r\n require $this->sRessourcesFile;\r\n if (in_array(\"print_templates\", $this->aSelectedFields)){\r\n $aParams['sSchemaVmap'] = array('value' => $this->aProperties['schema_vmap'], 'type' => 'schema_name');\r\n $aParams['group_id'] = array('value' => $this->aValues['my_vitis_id'], 'type' => 'number');\r\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getGroupPrintTemplates'], $aParams);\r\n\t\t$sListPrintTemplateId = \"\";\r\n\t\t$aListPrintTemplateName = array();\r\n\t\twhile($aLigne=$this->oConnection->oBd->ligneSuivante ($oPDOresult)) {\r\n\t\t\tif ($sListPrintTemplateId == \"\"){\r\n\t\t\t\t$sListPrintTemplateId = $aLigne[\"printtemplate_id\"];\r\n\t\t\t}else{\r\n\t\t\t\t$sListPrintTemplateId .= \"|\".$aLigne[\"printtemplate_id\"];\r\n\t\t\t}\r\n $aListPrintTemplateName[] = $aLigne[\"name\"];\r\n\t\t}\r\n\t\t$oPDOresult=$this->oConnection->oBd->fermeResultat();\r\n $this->aFields['print_templates'] = $sListPrintTemplateId;\r\n $this->aFields['print_templates_label'] = implode(',', $aListPrintTemplateName);\r\n }\r\n }", "public function allEmailTemplateForDataTable()\n {\n return $this->emailTemplateRepository->getAllEmailTemplateForDataTable();\n }", "public function selectgetTemplate()\n {\n $queryString=\"SELECT * FROM Templates WHERE Active ='1' \";\n $this->result = @$this->dbConnection->query($queryString);\n\n if(!$this->result)\n {\n die('Could not retrieve records from the CMS Database: ' .\n $this->dbConnection->error);\n }\n\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "function getAllTemplates($active=null, $account){\n\t\tglobal $db;\n\t\tif($active != null){\n\t\t\t$statement = $db->prepare('SELECT ID, msg, DATE_FORMAT(created, \"%Y-%m-%e\") AS created, active FROM msg_template WHERE active=:active AND accountID=:account ORDER BY ID DESC');\n\t\t\t$statement->execute(array(':active'=>$active, ':account'=>$account));\n\t\t}else{\n\t\t\t$statement = $db->prepare('SELECT ID, msg, DATE_FORMAT(created, \"%Y-%m-%e\") AS created, active FROM msg_template WHERE accountID=:account ORDER BY ID DESC');\n\t\t\t$statement->execute(array(':account'=>$account));\n\t\t}\n\t\treturn $statement->fetchAll(PDO::FETCH_ASSOC);\n\t}", "static function getAllSettingsTemplates($a_type)\r\n\t{\r\n\t\tglobal $ilDB;\r\n\r\n\t\t$set = $ilDB->query(\"SELECT * FROM adm_settings_template \".\r\n\t\t\t\" WHERE type = \".$ilDB->quote($a_type, \"text\").\r\n\t\t\t\" ORDER BY title\");\r\n\r\n\t\t$settings_template = array();\r\n\t\twhile ($rec = $ilDB->fetchAssoc($set))\r\n\t\t{\r\n\t\t\t$settings_template[] = $rec;\r\n\t\t}\r\n\r\n\t\treturn $settings_template;\r\n\t}", "function GetTemplates($userid=0)\n\t{\n\t\t$this->GetDb();\n\n\t\t$qry = \"SELECT templateid, name, ownerid FROM \" \n\t\t . SENDSTUDIO_TABLEPREFIX \n\t\t . \"templates\";\n\t\t\n\t\tif ($userid) {\n\t\t\t$qry .= \" AS t, \" . SENDSTUDIO_TABLEPREFIX \n\t\t\t . \" usergroups_access AS a \"\n\t\t\t . \" WHERE \"\n\t\t\t . \" a.resourceid = t.templateid AND \" \n\t\t\t . \" a.resourcetype = 'templates' \";\n\t\t\t$qry .= \" OR t.ownerid='\" . $this->Db->Quote($userid) . \"'\";\n\t\t} else {\n\t\t\tif (!$this->TemplateAdmin()) {\n\t\t\t\t$qry .= \" WHERE ownerid='\" . $this->Db->Quote($this->userid) . \"'\";\n\t\t\t\t\n\t\t\t\tif (!empty($this->access['templates'])) {\n\t\t\t\t\t$qry .= \" OR templateid IN (\" . implode(',', $this->access['templates']) . \")\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$qry .= \" OR isglobal='1'\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$qry .= \" ORDER BY LOWER(name) ASC\";\n\n\t\t$templates = array();\n\t\t$result = $this->Db->Query($qry);\n\t\t\n\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\t$templates[$row['templateid']] = $row['name'];\n\t\t}\n\n\t\treturn $templates;\n\t}", "public function getTemplates4()\n {\n return $this->hasMany(Template::className(), ['name_id' => 'id']);\n }", "public function getTemplates5()\n {\n return $this->hasMany(Template::className(), ['type_id' => 'id']);\n }", "public function get()\n {\n return $this->templates;\n }", "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}", "public static function getTemplatesUsed()\n {\n return static::$allTemplates;\n }", "public function getShowTemplates();", "function get_all_templates () {\n global $dbconnect;\n $query = \"SELECT * FROM emails ORDER BY email_id ASC;\";\n $result = mysql_query($query, $dbconnect);\n confirm_query($result);\n return $result;\n}", "function GetDocumentTemplates()\n\t{\n\t\t$result = $this->sendRequest(\"GetDocumentTemplates\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getTemplates1()\n {\n return $this->hasMany(Template::className(), ['cost_id' => 'id']);\n }", "public function getTemplates()\n {\n $templates = SSViewer::get_templates_by_class(static::class, '', __CLASS__);\n // Prefer any custom template\n if ($this->getTemplate()) {\n array_unshift($templates, $this->getTemplate());\n }\n return $templates;\n }", "public function index()\n\t{\n\t $this->authorize('index', 'Template');\n\n\t $templates = $this->templateLoader->loadAll();\n\n\t $perPage = $this->request->get('per_page', 10);\n\t $page = $this->request->get('page', 1);\n\n\t if ($this->request->has('query')) {\n\t $templates = $templates->filter(function($template) {\n\t return str_contains(strtolower($template['name']), $this->request->get('query'));\n });\n }\n\n if ($orderBy = $this->request->get('order_by', 'updated_at')) {\n $desc = $this->request->get('order_dir', 'desc') === 'desc';\n $templates = $templates->sortBy($orderBy, SORT_REGULAR, $desc);\n }\n\n\t $pagination = new LengthAwarePaginator(\n\t $templates->slice($perPage * ($page - 1), $perPage)->values(),\n count($templates),\n $perPage,\n $page\n );\n\n\t return $this->success(['pagination' => $pagination]);\n\t}", "public function getTemplates3()\n {\n return $this->hasMany(Template::className(), ['health_id' => 'id']);\n }", "public function get_post_templates()\n {\n }", "public function getMailTemplates()\n {\n $arrTemplates = array();\n $objTemplates = Database::getInstance()->execute(\"SELECT id,name,category FROM tl_mail_templates ORDER BY category, name\");\n\n while( $objTemplates->next() )\n {\n if ($objTemplates->category == '')\n {\n $arrTemplates[$objTemplates->id] = $objTemplates->name;\n }\n else\n {\n $arrTemplates[$objTemplates->category][$objTemplates->id] = $objTemplates->name;\n }\n }\n\n return $arrTemplates;\n }", "public function getAllForDropDownList()\n {\n $items = (new Query())\n ->select('emails_templates.id, emails_templates.name')\n ->from(['emails_templates' => 'emails_templates'])\n ->orderBy(['emails_templates.name' => SORT_ASC])\n ->all();\n\n return ArrayHelper::map($items, 'id', 'name');\n }", "public function loadTemplates() {\n // Get database hooks.\n $doctrine = $this->container->get('doctrine');\n $slideTemplateRepository = $doctrine->getRepository('Os2DisplayCoreBundle:SlideTemplate');\n $screenemplateRepository = $doctrine->getRepository('Os2DisplayCoreBundle:ScreenTemplate');\n $entityManager = $doctrine->getManager();\n\n // Get parameters.\n $path = $this->container->get('kernel')->getRootDir() . '/../web/';\n $serverAddress = $this->container->getParameter('absolute_path_to_server');\n\n // Locate templates in /web/bundles/\n $templates = $this->findTemplates($path . 'bundles/');\n\n foreach ($templates['slides'] as $config) {\n $dir = explode('/web/', pathinfo($config, PATHINFO_DIRNAME));\n $this->loadSlideTemplate($config, $slideTemplateRepository, $entityManager, $dir[1], $serverAddress, $path);\n }\n\n foreach ($templates['screens'] as $config) {\n $dir = explode('/web/', pathinfo($config, PATHINFO_DIRNAME));\n $this->loadScreenTemplate($config, $screenemplateRepository, $entityManager, $dir[1], $serverAddress, $path);\n }\n\n // Get all templates from the database, and push update to screens.\n $existingTemplates = $screenemplateRepository->findAll();\n $middlewareService = $this->container->get('os2display.middleware.communication');\n foreach ($existingTemplates as $template) {\n foreach ($template->getScreens() as $screen) {\n $middlewareService->pushScreenUpdate($screen);\n }\n }\n }", "function getTemplates($use_defintion, $template_id = null) {\n\t\t$conditions = array();\n\t\t$find_type = $template_id? 'first' : 'all';\n\t\tswitch($use_defintion) {\n\t\t\tcase 'template edition':\n\t\t\t\t$conditions = array(\n\t\t\t\t\t'OR' => array(\n\t\t\t\t\t\tarray('Template.owner' => 'user', 'Template.owning_entity_id' => AppController::getInstance()->Session->read('Auth.User.id')),\n\t\t\t\t\t\tarray('Template.owner' => 'bank', 'Template.owning_entity_id' => AppController::getInstance()->Session->read('Auth.User.group_id')),\n\t\t\t\t\t\tarray('Template.owner' => 'all')),\t\t\t\n\t\t\t\t\t// Both active and inactive template\n\t\t\t\t\t'Template.flag_system' => false);\n\t\t\t\tif(AppController::getInstance()->Session->read('Auth.User.group_id') == '1') unset($conditions['OR']);\t// Admin can work on all templates\n\t\t\t\tif($template_id) $conditions['Template.id'] = $template_id;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'template use':\n\t\t\t\t$conditions = array(\n\t\t\t\t\t'OR' => array(\n\t\t\t\t\t\tarray('Template.visibility' => 'user', 'Template.visible_entity_id' => AppController::getInstance()->Session->read('Auth.User.id')),\n\t\t\t\t\t\tarray('Template.visibility' => 'bank', 'Template.visible_entity_id' => AppController::getInstance()->Session->read('Auth.User.group_id')),\n\t\t\t\t\t\tarray('Template.visibility' => 'all'),\n\t\t\t\t\t\tarray('Template.flag_system' => true)),\n\t\t\t\t\t'Template.flag_active' => 1);\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tAppController::getInstance()->redirect('/Pages/err_plugin_system_error?method='.__METHOD__.',line='.__LINE__, null, true);\t\n\t\t}\n\t\t\n\t\t$templates = $this->find($find_type, array('conditions' => $conditions));\n\t\tif($templates && $find_type == 'first') {\n\t\t\t$templates['Template']['allow_properties_edition'] = ((AppController::getInstance()->Session->read('Auth.User.group_id') == 1) || (AppController::getInstance()->Session->read('Auth.User.id') == $templates['Template']['created_by']));\n\t\t}\n\t\treturn $templates;\n\t}", "function get_template_data($conditions_array=array(),$rows_per_page=10,$start=0)\n\t{\n\t\t$rows=array();\n\t\t$this->db->order_by('id');\n\t\t$result=$this->db->get_where('red_diy_templates',$conditions_array,$rows_per_page,$start);\n\t\tforeach($result->result_array() as $row)\n\t\t{\n\t\t\t$rows[]=$row;\n\t\t}\n\t\treturn $rows;\n\t}", "public function get_templates($data)\n {\n $res = $this->service->getApi()->getAllTemplates();\n return $res;\n }", "function admin_get_idtemplates()\n{\n global $app;\n\n $idtemplates = $app->bbs->idTemplates();\n $idtypes = $app->calibre->idTypes();\n $ids2add = [];\n foreach ($idtypes as $idtype) {\n if (empty($idtemplates)) {\n array_push($ids2add, $idtype['type']);\n } else {\n $found = false;\n foreach ($idtemplates as $idtemplate) {\n if ($idtype['type'] === $idtemplate->name) {\n $found = true;\n break;\n }\n }\n if (!$found) {\n array_push($ids2add, $idtype['type']);\n }\n }\n }\n foreach ($ids2add as $id2add) {\n $ni = new IdUrlTemplate();\n $ni->name = $id2add;\n $ni->val = '';\n $ni->label = '';\n array_push($idtemplates, $ni);\n }\n $app->getLog()->debug('admin_get_idtemplates ' . var_export($idtemplates, true));\n $app->render('admin_idtemplates.html', [\n 'page' => mkPage(getMessageString('admin_idtemplates'), 0, 2),\n 'templates' => $idtemplates,\n 'isadmin' => is_admin()]);\n}", "public function actionIndex()\n {\n $accountId = $this->getAccountId();\n return MessageTemplate::findAll(['accountId' => $accountId]);\n }", "public static function get_templates($conn, $from = 0, $max = 20, $search = '') \n {\n Ossim_db::check_connection($conn);\n \n $list = array();\n \n $num_rows = 0;\n \n // Filter if am i proadmin\n $perms_where = '';\n $users_allowed = array();\n \n if (self::is_pro() && Acl::am_i_proadmin()) \n {\n if (is_array($_SESSION['_user_vision']['users_to_assign'])) \n {\n foreach ($_SESSION['_user_vision']['users_to_assign'] as $user => $perm) \n {\n if ($perm && $user != self::get_session_user())\n { \n $users_allowed[] = $user; \n }\n }\n }\n \n if (count($users_allowed) > 0) \n {\n $perms_where = \"WHERE (id NOT IN (SELECT DISTINCT template_id FROM users) OR id IN (SELECT DISTINCT template_id FROM users WHERE login IN ('\".implode(\"', '\", $users_allowed).\"')))\";\n } \n else \n {\n $perms_where = \"WHERE id NOT IN (SELECT DISTINCT template_id FROM users)\";\n }\n }\n \n //Search filter\n if($search != '' && preg_match('/where/i', $perms_where)) \n {\n $search = preg_replace('/where/i', 'AND', $search);\n }\n \n $query = \"SELECT SQL_CALC_FOUND_ROWS HEX(id) as id, name FROM acl_templates $perms_where $search LIMIT $from, $max\";\n \n $rs = $conn->Execute($query);\n \n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n {\n $total = $conn->Execute('SELECT FOUND_ROWS() AS counter');\n \n if (!$total->EOF) \n {\n $num_rows = $total->fields['counter'];\n }\n \n while (!$rs->EOF) \n {\n // Get users assigned\n $users = array();\n $query = 'SELECT login FROM users WHERE template_id = UNHEX(?)';\n \n $rs_2 = $conn->Execute($query, array($rs->fields['id']));\n \n if (!$rs_2) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n {\n while (!$rs_2->EOF) \n {\n $users[] = $rs_2->fields['login'];\n \n $rs_2->MoveNext();\n }\n }\n \n // Get sections allowed\n $total = $conn->Execute(\"SELECT count(*) AS total FROM acl_perm WHERE type = 'MENU' AND description != '' AND enabled = 1\");\n \n $conf = $GLOBALS['CONF'];\n $av_features = ($conf->get_conf('advanced_features') == 1) ? TRUE : FALSE;\n \n \n // av_features = 1 Enable advanced features\n // 50 = Analysis -> Detection -> Anomalies\n // 80 = Configuration -> Network Discovery\n \n if (!$total->EOF)\n {\n $total_perms = $total->fields['total'];\n $total_perms = ($av_features == TRUE) ? $total_perms : $total_perms-2;\n }\n \n $total_perms = ($total_perms < 1) ? 1 : $total_perms;\n \n $total = $conn->Execute(\"SELECT count(*) AS num FROM acl_templates_perms WHERE ac_templates_id = UNHEX(?)\", array($rs->fields['id']));\n \n if (!$total->EOF) \n {\n $count_perms = $total->fields['num'];\n $count_perms = ($count_perms > $total_perms) ? $total_perms : $count_perms;\n }\n \n $perc = round($count_perms * 100 / $total_perms);\n \n $list[] = array(\n \"id\" => $rs->fields['id'],\n \"name\" => $rs->fields['name'],\n \"users\" => implode(', ', $users),\n \"percent\" => $perc\n );\n \n $rs->MoveNext();\n }\n }\n \n return array($list, $num_rows);\n }", "function scanPmanTemplates()\n {\n $tp = DB_DAtaObject::Factory('core_template');\n \n foreach ($this->modules() as $m){\n //var_dump($m);\n // templates...\n $ar = $this->scanDir(array(\n 'tdir' => \"Pman/$m/templates\",\n 'subdir' => '',\n 'match' => '/\\.(html|txt|abw)$/',\n 'skipdir' => array('images','css','js'),\n \n ));\n // print_r($ar);\n \n foreach($ar as $pg) {\n \n $temp = $tp->syncTemplatePage(array(\n 'base' =>'Pman.'.$m, \n 'template_dir' => \"Pman/$m/templates\",\n 'template' => $pg\n ));\n if ($temp) {\n $ids[] = $temp->id;\n }\n }\n // should clean up old templates..\n // php files..\n $ar = $this->scanDir(array(\n 'tdir' => \"Pman/$m\",\n 'subdir' => '',\n 'match' => '/\\.(php)$/',\n 'skipdir' => array('templates'),\n \n ));\n \n \n foreach($ar as $pg) {\n \n $temp = $tp->syncPhpGetText(array(\n 'base' =>'Pman.'.$m, \n 'template_dir' => \"Pman/$m\",\n 'template' => $pg\n ));\n if ($temp) {\n $ids[] = $temp->id;\n }\n \n }\n \n \n \n \n \n //$tp->syncTemplatePage($pg);\n }\n $del = DB_DataObject::factory('core_template');\n $del->whereAddIn('!id', $ids, 'int');\n $del->whereAddIn('view_name', $this->modules(), 'string');\n $del->whereAddIn('filetype' , array( 'php', 'html' ), 'string');\n $delids = $del->fetchAll('id');\n if ($delids) {\n DB_DataObject::factory('core_template')->query(\n 'update core_template set is_deleted = 1 where id in('. implode(',', $delids). ')'\n );\n }\n \n }", "public function getTemplates2()\n {\n return $this->hasMany(Template::className(), ['description_id' => 'id']);\n }", "public static function all() {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$liste = db::findAll(db::table($table));\n\t\treturn $liste;\n\t}", "public function actionIndex()\n {\n $model = (new Templates())->getFirstRecordModel();\n $searchModel = new Templates();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $dataProvider->pagination->pageSize = 20;\n\n return $this->render('index', [\n 'firstRecord' => $model,\n 'existRecord' => (new ExistRecordModel())->getExistRecordModel(Templates::class),\n 'disabledAttribute' => true,\n 'dataProvider' => $dataProvider,\n 'filteredColumns' => [],\n 'searchModel' => $searchModel,\n ]);\n }", "public function retrieveMessageTemplates()\n {\n return $this->start()->uri(\"/api/message/template\")\n ->get()\n ->go();\n }", "function _get_templates()\n\t{\n\t\t$location = FILESYSTEM_PATH .'modules/customcats/templates/cattemplates/';\n\t\t$filelist=array();\n\t\tif ($handle = opendir($location))\n\t\t{\n\t\t\twhile (false !== ($file = readdir($handle)))\n\t\t\t{\n\t\t\t\tif ($file != \".\" && $file != \"..\" && $file!=\".svn\" && $file!=\"index.htm\")\n\t\t\t\t{\n\t\t\t\t\t$filelist[]=$file;\n\t\t\t\t}\n\t\t\t}\n \t\t\tclosedir($handle);\n\t\t}\n\t\treturn $filelist;\n\t}", "public function retrieveEmailTemplates()\n {\n return $this->start()->uri(\"/api/email/template\")\n ->get()\n ->go();\n }", "public function allTemplates(int $user_id) {\n $query = $this->db->select('sta_quiztemplate.id AS qtid,pathname,dbname,dbpropname,qoname')\n ->from('sta_quiz')->join('sta_quiztemplate','sta_quiztemplate.id=sta_quiz.templid')\n ->where('sta_quiz.valid',1)->where('sta_quiz.userid',$user_id)->where('sta_quiz.end IS NOT NULL')\n ->group_by('sta_quiztemplate.id')->order_by('pathname')->get();\n return $query->result();\n }", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "protected function readTemplatePacks() {\n\t\tif ($this->items) {\n\t\t\t$sql = \"SELECT\t\tpack.*, COUNT(template.templateID) AS templates\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_template_pack pack\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_template template\n\t\t\t\tON\t\t(template.templatePackID = pack.templatePackID)\n\t\t\t\tGROUP BY\tpack.templatePackID\n\t\t\t\tORDER BY\t\".($this->sortField != 'templates' ? 'pack.' : '').$this->sortField.\" \".$this->sortOrder;\n\t\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$this->templatePacks[] = $row;\n\t\t\t}\n\t\t}\n\t}", "public function getTemplates($context = null);", "function getFormTemplates(){\n\t\t$AccessToken = Auth::token();\n\t\t$baseUrl = url . '/api/v1/' . customerAlias . '/' . databaseAlias;\n\t\t$endpoint = '/formtemplates';\n\t\t$request = $baseUrl . $endpoint;\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, array(\n\t\t CURLOPT_HTTPGET => true,\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t\t\t'Authorization: Bearer ' . $AccessToken),\n\t\t CURLOPT_URL => $request,\n\t\t\tCURLOPT_RETURNTRANSFER => 1\n\t\t ));\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $response;\n\t}", "protected function _loadTemplates()\n {\n $this->_tpl = array();\n $dir = Solar_Class::dir($this, 'Data');\n $list = glob($dir . '*.php');\n foreach ($list as $file) {\n \n // strip .php off the end of the file name to get the key\n $key = substr(basename($file), 0, -4);\n \n // load the file template\n $this->_tpl[$key] = file_get_contents($file);\n \n // we need to add the php-open tag ourselves, instead of\n // having it in the template file, becuase the PEAR packager\n // complains about parsing the skeleton code.\n // \n // however, only do this on non-view files.\n if (substr($key, 0, 4) != 'view') {\n $this->_tpl[$key] = \"<?php\\n\" . $this->_tpl[$key];\n }\n }\n }", "public static function msgTemplatesList(){\n $accessToken = WxApi::accessToken();\n $offset = 0;\n $count = 5;\n $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=' . $accessToken;\n $postFields = json_encode(array(\n // \"access_token\" => $accessToken,\n \"offset\" => 0,\n \"count\" => 5,\n ));\n $api = curl_init();\n curl_setopt($api, CURLOPT_URL, $url);\n curl_setopt($api, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($api, CURLOPT_HEADER, false);\n curl_setopt($api, CURLOPT_POST, true);\n curl_setopt($api, CURLOPT_POSTFIELDS, $postFields);\n $listObj = curl_exec($api);\n curl_close($api);\n $listObj = json_decode($listObj);\n if($listObj->errcode != 0){\n return NULL;\n }else{\n return $listObj->list;\n // return json_encode($listObj->list);\n }\n }", "public function allPages()\n {\n $this->get('/', function(Request $request, Response $response) {\n $templates = [];\n foreach(new DirectoryIterator($this->basePath . '/src/views/') as $fileInfo) {\n if ($fileInfo->isFile() && strtolower($fileInfo->getExtension()) === 'twig') {\n $baseName = $fileInfo->getBasename('.twig');\n\n $templates[$baseName] = [\n 'name' => $baseName,\n 'has_data' => file_exists($this->basePath . '/src/data/' . $baseName . '.php'),\n ];\n }\n }\n ksort($templates);\n\n return $this->view->render($response, 'app_pages.twig', ['templates' => $templates, 'css_url' => $cssUrl]);\n })->setName('templates.list');\n\n return $this;\n }", "public function getAll(){\n \n // 1. Establece la conexion con la base de datos y trae todos los generos\n $query = $this->getDb()->prepare(\" SELECT * FROM genero\");\n $query-> execute(); \n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "public function GetTemplatesFromDB(GetTemplatesFromDB $parameters)\n {\n return $this->__soapCall('GetTemplatesFromDB', array($parameters));\n }", "function campaignTemplates() {\n $params = array();\n return $this->callServer(\"campaignTemplates\", $params);\n }", "private function stmtTemplate()\n\t{\n\t\tif($this->stmt_template == NULL) {\n\t\t\t$sql = \"SELECT ustd.id, ustds.width, ustds.height,\n\t\t\t\t\tustds.design_height,\n\t\t\t\t\tIF(ustds.height=0,0,1) AS fixed\n\t\t\t\t\tFROM user_site_template_div ustd\n\t\t\t\t\tJOIN user_site_template_div_size ustds\n\t\t\t\t\tON ustd.id = ustds.div_id\n\t\t\t\t\tAND ustds.site_id = :site_id\n\t\t\t\t\tJOIN user_site_template ust\n\t\t\t\t\tON ustd.template_id = ust.id\n\t\t\t\t\tAND ust.site_id = :site_id\n\t\t\t\t\tWHERE ustd.site_id = :site_id\n\t\t\t\t\tAND ustd.template_id = :template_id\n\t\t\t\t\tAND ustd.parent_id = :parent_id\n\t\t\t\t\tORDER BY ustd.sort_order ASC\";\n\t\t\treturn $this->_db->prepare($sql);\n\t\t} else {\n\t\t\treturn $this->stmt_template;\n\t\t}\n\t}", "public function getTemplates($setId) {\n $select = $this->getDatabase()\n ->select()\n ->from(self::TEMPLATES_TABLE)\n ->where('statisticSetId = ?', $setId);\n\n $data = $select->fetchAll();\n\n $result = array();\n foreach ($data as $item) {\n $result[] = (int)$item['statisticTemplateId'];\n }\n\n return $result;\n }", "public function get_all()\n {\n return $this->findAll();\n // return $this->db->table('settings')->get();\n // return $this->builder->get();\n }", "public static function getTemplate(string $ip)\n {\n return DB::select(\"SELECT id, hotel, data, scheduled, schedule_start_time, schedule_end_time FROM `templates` WHERE hotel IN (SELECT id from hotels WHERE id IN (SELECT hotel FROM nas WHERE nasname = :ip)) AND `activated`='yes' AND `deleted_at` IS NULL \",\n ['ip' => $ip]);\n }", "public function getAllDocumentTemplates($limit, $offset) {\n $query = Doctrine_Query::create()\n ->select('dtt.*, count(dts.id) AS number, dtv.id as document_template_id')\n ->from('DocumentTemplate dtt')\n ->leftJoin('dtt.DocumentTemplateVersion dtv')\n ->leftJoin('dtv.DocumentTemplateSlot dts')\n ->where('dtt.deleted_at IS NULL')\n ->andWhere('dtv.active_version = ?', 1);\n if($limit != -1 AND $offset != -1) {\n $query->limit($limit)\n ->offset($offset);\n }\n return $query->groupBy('dtt.id')\n ->orderBy('dtt.id desc')\n ->execute();\n }", "public function fetchAll() {\n\t\t$queryBuilder = $this->db->createQueryBuilder();\n\t\t$queryBuilder\n\t\t\t->select('*')\n\t\t\t->from($this->table_name, 't1')\n\t\t;\n\t\t$result = $queryBuilder->execute()->fetchAll();\n\n\t\treturn $result;\n\t}", "protected function getTemplatesRequest(){\n\t\t\n\t\t//If the user is logged in\n\t\tif($this->getModel()->checkLogin(true))\n\t\t{\n\t\t\t// Set the state and tell plugins.\n\t\t\t$this->setState('GETTING_TEMPLATES_LIST');\n\t\t\t$this->notifyObservers();\n\t\t\t\n\t\t\t//Gets template data\n\t\t\t$data = $this->getModel()->getFeaturedTemplates();\n\t\t\t\n\t\t\t//Show data\n\t\t\t$this->getView()->showInstallableTemplates($data);\n\t\t}\n\t}", "function bmlt_fetch_templates ()\n {\n global $g_server;\n \n $ret = null;\n \n $retData = array();\n $retLongData = array();\n \n try // Catch any thrown exceptions.\n {\n $sql = \"SELECT * FROM `\".$g_server->GetMeetingTableName_obj().\"_data` WHERE `meetingid_bigint` = 0\";\n $row_result = c_comdef_dbsingleton::preparedQuery ( $sql, array() );\n \n if ( is_array ( $row_result ) && count ( $row_result ) > 0 )\n {\n foreach ( $row_result as $row )\n {\n $retData[$row['key']]['field_prompt'] = $row['field_prompt'];\n $retData[$row['key']]['lang_enum'] = $row['lang_enum'];\n $retData[$row['key']]['visibility'] = $row['visibility'];\n $retData[$row['key']]['data_string'] = $row['data_string'];\n $retData[$row['key']]['data_bigint'] = $row['data_bigint'];\n $retData[$row['key']]['data_double'] = $row['data_double'];\n }\n }\n \n $sql = \"SELECT * FROM `\".$g_server->GetMeetingTableName_obj().\"_longdata` WHERE `meetingid_bigint` = 0\";\n $row_result = c_comdef_dbsingleton::preparedQuery ( $sql, array() );\n \n if ( is_array ( $row_result ) && count ( $row_result ) > 0 )\n {\n foreach ( $row_result as $row )\n {\n $retLongData[$row['key']]['field_prompt'] = $row['field_prompt'];\n $retLongData[$row['key']]['lang_enum'] = $row['lang_enum'];\n $retLongData[$row['key']]['visibility'] = $row['visibility'];\n if ( array_key_exists ( $row, 'data_longtext' ) )\n {\n $retLongData[$row['key']]['data_longtext'] = $row['data_longtext'];\n }\n elseif ( array_key_exists ( $row, 'data_blob' ) )\n {\n $retLongData[$row['key']]['data_blob'] = $row['data_blob'];\n }\n }\n }\n }\n catch ( Exception $e )\n {\n die ( '<pre>'.htmlspecialchars ( print_r ( $e, true ) ).'</pre>' );\n }\n \n if ( is_array ( $retData ) && count ( $retData ) )\n {\n $ret['data'] = $retData;\n }\n \n if ( is_array ( $retLongData ) && count ( $retLongData ) )\n {\n $ret['longdata'] = $retLongData;\n }\n \n return $ret;\n }", "public function index()\n {\n $templates = $this->templates->paginate('name');\n\n return view('templates.index', compact('templates'));\n }", "static public function listTemplates($type)\n {\n $templates = array();\n\n $_templates = Horde::loadConfiguration('templates.php', '_templates', 'whups');\n foreach ($_templates as $name => $info) {\n if ($info['type'] == $type) {\n $templates[$name] = $info['name'];\n }\n }\n\n return $templates;\n }", "public function allPosts($template)\n {\n $req = [\n \"data\" => [\n 'ID AS \"{{ id }}\"',\n 'title AS \"{{ title }}\"',\n 'content AS \"{{ content }}\"',\n 'SUBSTR(content,1 , 1000) AS \"{{ content }}\"',\n 'DATE_FORMAT(published, \\'%d/%m/%Y\\') AS \"{{ published }}\"',\n 'DATE_FORMAT(modified, \\'%d/%m/%Y\\') AS \"{{ modified }}\"'\n ],\n \"from\" => \"posts\"\n ];\n\n\n $data = Model::select($req);\n $count = count($data[\"data\"]);\n for ($i = 0; $i < $count; $i++) {\n global $prefixeFront;\n $data[\"data\"][$i][\"{{ url }}\"] = $prefixeFront . \"chapitre/\" . $data[\"data\"][$i][\"{{ id }}\"];\n }\n $html = View::makeLoopHtml($data[\"data\"], $template);\n\n return $html;\n }", "public function viewProvider()\n {\n $config = $this->getMartyConfig();\n $templateDir = $config['templateDir'];\n $templates = [];\n $it = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($templateDir));\n /** @var \\SplFileInfo $file */\n foreach ($it as $file) {\n if ($file->isFile() && $file->getExtension() == 'tpl') {\n $templateName = substr($file->getPathname(), strlen($templateDir) + 1);\n $templateId = str_replace(['/', '.tpl'], ['.', ''], $templateName);\n $templates[$templateId] = [$templateName];\n }\n }\n\n return $templates;\n }", "public static function getAll()\n {\n try {\n $db = static::getDB();\n $stmt = $db->query('SELECT id, title, content FROM posts ORDER BY created_at');\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n return $results;\n \n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }", "public function getAll()\n {\n return $this->prepare(DB::findAll($this->table));\n }", "static function getTemplates($id) {\n return EmailmarketingTemplates::includedInCampaign($id);\n }", "public function get_custom_templates()\n {\n }", "public function get_all ();", "public function getAll()\n\t{\n\t\t$args = array('order' => 't.id');\n \t$records = $this->record->findAll($args);\n \treturn $this->model->populateModels($records, 'id');\n\t}", "public function allDatabaseEntrysForTablePagesAction() {\r\n\t\ttry {\r\n\t\t\t$searchPhrase = (string) $this->getModuleData('tx_extracache_manager_searchPhraseForTablePages');\r\n\t\t\t$sqlWhere = $this->createSqlWhereClauseForDbRecords($searchPhrase, array('tstamp','crdate','starttime','endtime')) . Tx_Extracache_System_Persistence_Typo3DbBackend::getSqlWherePartForPagesWithCacheCleanerStrategy();\r\n\t\t\t$this->getView()->assign ( 'allDatabaseEntrysForTablePages', $this->getCacheDatabaseEntryRepositoryForTablePages()->query ( '(tx_extracache_cleanerstrategies!=\\'\\' OR tx_extracache_events!=\\'\\') AND '.$sqlWhere ) );\r\n\t\t\treturn $this->getView()->render ( 'allDatabaseEntrysForTablePages' );\r\n\t\t} catch (Exception $e) {\r\n\t\t\treturn $this->showErrorMessage($e);\r\n\t\t}\r\n\t}", "public function getTemplate() {}", "public function get_available_templates($contextid) {\n\n $fs = get_file_storage();\n $files = $fs->get_area_files($contextid, 'mod_surveypro', SURVEYPRO_TEMPLATEFILEAREA, 0, 'sortorder', false);\n if (empty($files)) {\n return array();\n }\n\n $templates = array();\n foreach ($files as $file) {\n $templates[] = $file;\n }\n\n return $templates;\n }", "public function getTemplatesList($hint, $uacc_uid=''){\r\n\r\n\t\t$list = array();\r\n\r\n\t\tif($uacc_uid != '')\r\n\t\t\t$query = $this->db->select(\"template_id,name,html_body\")->like(\"name\", $hint)->where(array(\"created_by\"=>$uacc_uid,\"deleted\"=>0))->order_by(\"name\", \"asc\")->get(\"sc_templates\");\r\n\t\telse\r\n\t\t\t$query = $this->db->select(\"template_id,name,html_body\")->like(\"name\", $hint)->where(array(\"deleted\"=>0))->order_by(\"name\", \"asc\")->get(\"sc_templates\");\r\n\r\n\t if ($query->num_rows() > 0){\r\n\t\t\tforeach($query->result() as $row){\r\n\r\n\t\t\t\t$list[] = array(\"name\"=>$row->name, \"label\"=>$row->name, \"id\"=>$row->template_id);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $list;\r\n\t}" ]
[ "0.8262818", "0.7802904", "0.7788046", "0.7597968", "0.73624873", "0.7150043", "0.70923656", "0.7080438", "0.70491445", "0.7039374", "0.70229", "0.70114887", "0.7009191", "0.69464266", "0.6906768", "0.68943524", "0.6741189", "0.6728478", "0.67074895", "0.6686109", "0.66610825", "0.6650865", "0.66347086", "0.6626556", "0.6615125", "0.65892076", "0.657038", "0.65014386", "0.64879924", "0.64879924", "0.6432394", "0.64304817", "0.6411471", "0.6394144", "0.6345815", "0.63443786", "0.63142836", "0.6309844", "0.6297995", "0.6275031", "0.62663305", "0.62635446", "0.62438685", "0.6227862", "0.6161491", "0.6153295", "0.61451983", "0.61347115", "0.6132331", "0.61320275", "0.61271405", "0.6124512", "0.61092794", "0.6089298", "0.60779977", "0.6056364", "0.60402423", "0.6026066", "0.5993994", "0.59916276", "0.5990031", "0.5978052", "0.5966466", "0.5959011", "0.5959011", "0.5959011", "0.5959011", "0.5959011", "0.5959011", "0.5953253", "0.594905", "0.5937973", "0.59174424", "0.5904248", "0.58944756", "0.58812577", "0.58775854", "0.5848494", "0.58477664", "0.5838287", "0.5834936", "0.58320504", "0.58277273", "0.58272225", "0.5818077", "0.581552", "0.58115363", "0.5806931", "0.5805699", "0.5801188", "0.5798205", "0.57936877", "0.5792226", "0.5784402", "0.57836246", "0.57743967", "0.57720107", "0.5769766", "0.576585", "0.57577866" ]
0.8624964
0
Set the current template
public function setTemplate(string $template_name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTemplate($template);", "function setTemplate($value) {\n $this->template = $value;\n }", "private function setTemplate(){\n if (isset($this->data['template']) && !empty($this->data['template'])){\n $template = APP_ROOT.'/app/templates/'.trim($this->data['template']).'.tpl';\n if (file_exists($template)){\n $this->template = $template;\n return;\n }\n }\n //default\n $this->template = APP_ROOT.'/app/templates/default.tpl';\n }", "public function setTemplate($template) {\n \n\n \t$this->display($template);\n }", "public function setTemplate($template);", "public function setTemplate($template);", "public function setTemplate( $template )\n\t{\n\t\t// Search for the template layout.\n\t\tif ( 'MAIN' == $this->context_name )\n\t\t{\n\t\t\t$found\t= false;\n\t\t\t$path\t= dirname( $template );\n\n\n\t\t\tfor ( $i = 0; !$found && $i < 3; $i++ )\n\t\t\t{\n\t\t\t\tif ( file_exists( TEMPLATE_PATH . $path . '/layout' . TEMPLATE_EXTENSION ) )\n\t\t\t\t{\n\t\t\t\t\t$found = true;\n\t\t\t\t\t$path = $path . '/layout' . TEMPLATE_EXTENSION;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$path\t= dirname( $path );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $found )\n\t\t\t{\n\t\t\t\t$this->layout\t= $this->twig->loadTemplate( $path );\n\t\t\t}\n\t\t}\n\t\t$this->current_context['template'] = $this->twig->loadTemplate( $template );\n\t}", "function setTemplate($template) {\n $this->template = $template;\n }", "public function setTemplate(string $template);", "public function setTemplate($value);", "function set_template($template_name) {\n\t\t$this->template = $template_name;\n\t}", "public function setTemplate($template)\n {\n // store instance of template\n\t\t$this->_template = $template;\n }", "public function setView($template);", "public function setTemplate($template)\n\t{\n\t\t$this->template = $template;\n\t\t$this->pageInitialized = false;\n\t}", "public function setTemplate($template = '')\n {\n $this->template = ROOT . DS . $this->configuration->get('app.name') . DS . 'view' . DS . $this->action . DS . $template . '.phtml';\n }", "function _setTemplate($template = null) {\n if (empty($template)) {\n $backtrace = debug_backtrace();\n if (empty($backtrace[1]['function'])) {\n return $this->template = null;\n }\n $parent = $backtrace[1]['function'];\n $method = '';\n if ($parent == '__call') {\n $method = str_replace('send', '', $backtrace[2]['function']);\n } else {\n $method = $backtrace[1]['function'];\n }\n $template = Inflector::underscore($method);\n }\n $this->template = sprintf('%s%s%s',\n $this->_templateFolder(),\n DS,\n $template\n );\n }", "public function setTemplate($tpl_name){\n \tif($this->isAllowedToChangeTemplate()){\n \t\t$this->template = $tpl_name;\n \t\t$this->baseReplaces['tpl_folder'] = $this->getTemplateDir();\n \t\t$GLOBALS['tpl']['activeTemplate'] = $tpl_name;\n \t}\n }", "function qa_set_template($template)\n{\n\tglobal $qa_template;\n\t$qa_template = $template;\n}", "public function setTemplate($val){ return $this->setField('template',$val); }", "public function setTemplate($p);", "public static function setTemplate($template)\n {\n self::$template = $template;\n }", "public function setTemplate($template)\n {\n if(is_array($template)){\n $this->current_template = $this->igt_template;\n $this->setValue($template);\n }\n\n }", "public function setTemplate($template)\n {\n $this->template = $template;\n }", "public function setTemplate($template)\n {\n $this->template = $template;\n }", "protected function setDefaultTemplate()\n {\n $defaultTemplate = $this->config->getKey('default_template');\n $this->setTemplate($defaultTemplate);\n }", "protected function _setTemplateMeta(){\n $this->template->project_name = $this->config['project']['name'] ;\n $this->template->title = $this->config['view']['title'] ;\n $this->template->keywords = $this->config['view']['keywords'];\n $this->template->description = $this->config['view']['description'];\n }", "function setXTemplate($newXTemplate) {\n $this->xTemplate = $newXTemplate;\n}", "abstract protected function setTemplate($item);", "public function setTemplate($file);", "public function setTemplate()\n {\n $root = &XCube_Root::getSingleton();\n $language = $root->mContext->getXoopsConfig('language');\n $this->mMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/user/language/' . $language . '/mail_template/');\n $this->mMailer->setTemplate('register.tpl');\n }", "function template($template=\"simple\"){\n\n\t\t// THE PHYSICAL TEMPLATE SHOULD BE IN THE RESPECTIVE \n\t\t// TEMPLATE/TYPE/$template.php\n\t\t$this->template = $template;\n\t}", "protected function setPageTemplate($template)\r\n {\r\n $this->pageTemplate = $template;\r\n }", "protected function setTemplateVariables() {}", "protected function setVarToTemplates()\n {\n $this->templates->set_tpl($this->varName, $this->checkNewCommondaty());\n }", "public static function setTemplate($name) {\n $settings = self::getSettings();\n \n $settings->template = $name;\n $settings->save();\n }", "public function setTemplate($template)\n {\n if (!($template instanceof KTemplateAbstract)) {\n if (is_string($template) && strpos($template, '.') === false) {\n $identifier = clone $this->getIdentifier();\n $identifier->path = array('template');\n $identifier->name = $template;\n } else {\n $identifier = $this->getIdentifier($template);\n }\n\n if ($identifier->path[0] != 'template') {\n throw new KViewException('Identifier: '.$identifier.' is not a template identifier');\n }\n\n register_default(array('identifier' => $identifier, 'prefix' => $this, 'name' => array('Template'.ucfirst($this->getName()), 'TemplateDefault')));\n\n $template = $identifier;\n }\n\n $this->_template = $template;\n\n return $this;\n }", "function zenTemplate( $template ) {\n $this->_template = $template;\n $this->_get();\n }", "function testSetTemplate()\n {\n $result = $this->tpl->setTemplate('A template', false, false);\n if (PEAR::isError($result)) {\n $this->assertTrue(false, 'Error setting template: '. $result->getMessage());\n }\n $this->assertEquals('A template', $this->tpl->get());\n }", "function set_template( $template_file = 'template.php' )\n {\n // make sure that $template_file has .php extension\n $template_file = substr( $template_file, -4 ) == '.php' ? $template_file : ( $template_file . \".php\" );\n\n $this->template = \"../../{$this->settings->root_folder}/themes/{$this->settings->theme}/{$template_file}\";\n }", "public static function setTemplate(PageTemplate $template) {\n\t\tself::getInstance()->setPageTemplate($template);\n\t}", "public function setTemplate($path)\n {\n $this->templatePages = $this->setSourceFile($path);\n }", "protected function setupTemplate() {\r\n \r\n }", "public function set_template($template)\n\t{\n\t\t// On regarde si une modification du template existe\n\t\t$updated_template = dirname($template) . '/' . get_file_data(basename($template), 'filename') . '.updated';\n\t\tif (file_exists($updated_template))\n\t\t{\n\t\t\t$template = $updated_template;\n\t\t}\n\n\t\tif (!file_exists($template))\n\t\t{\n\t\t\ttrigger_error('Le template ' . $template . ' n\\'existe pas', FSB_ERROR);\n\t\t}\n\t\t\n\t\t// Recuperation du contenu du template\n\t\t$this->body = file_get_contents($template);\n\t}", "public function setTemplate($template_string){\n\t\t$this->template = $template_string;\n\t}", "public function setTemplate($template)\n {\n if (sfToolkit::isPathAbsolute($template))\n {\n print \">>>1\";\n $this->directory = dirname($template);\n $this->template = basename($template);\n }\n else\n {\n print \">>>2\";\n $this->directory = $this->context->getConfiguration()->getTemplateDir($this->moduleName, $template);\n $this->template = $template;\n }\n }", "public function set_template($p_template)\n {\n global $g_dirs;\n $this->m_template_file = $g_dirs[\"class\"] . DS . \"modules\" . DS . \"jdisc\" . DS . \"templates\" . DS . \"content\" . DS . \"bottom\" . DS . \"content\" . DS . $p_template;\n\n return $this;\n }", "private function setVarToTemplate()\n\t{\n\t\t$this->view->set('grid', $this->gridState);\n\n\t\t// Set variable with shot message to template\n\t\t$this->view->set('shotMessage', $this->shotMessage);\n\n\t\t// Set variable with final message to template\n\t\t$this->view->set('finalMessage', $this->finalMessage);\n\n\t\t// Set variable with grid row count to template\n\t\t$this->view->set('gridRowCount', $this->gridRow);\n\n\t\t// Set variable with grid colum count to template\n\t\t$this->view->set('gridColCount', $this->gridCol);\n\t}", "public function setTemplate($nomtmp) {\r\n $filevue = \"application/templates/\" . $nomtmp . \".template.php\";\r\n if (file_exists($filevue)) {\r\n $this->template = $nomtmp;\r\n } else {\r\n die(\"template $filevue inexistante \");\r\n }\r\n }", "public function setTemplateType($value);", "public static function setUpSiteTemplate($template){\n \t//get fontController and then get plugin instance\n \t$front = Zend_Controller_Front::getInstance();\n\t\t$st = $front->getPlugin('Hotspot_Plugin_ViewSetup');\n\t\t//set template number\n\t\t$st->setRenderLayout($template);\n }", "public final function setTemplateBefore($template){\n\t\tself::$_templateBefore[get_class($this)] = $template;\n\t}", "static public function setCurrentTpl($tpl)\r\n\t{\r\n\t\t$origin = __CLASS__.'::'.__FUNCTION__; $db = true;\t\t\r\n\t\t$ret = true;\r\n\t\t$enabled_modules = sfConfig::get('sf_enabled_modules');\r\n\t\tif (in_array('switch', $enabled_modules) ) { \r\n\t\t\t// this allows for setting the current tpl \"permanently\" (for all sessions accessing the site)\r\n\t\t\t$pt_switcher_config_file = sfConfig::get('sf_plugins_dir').DS.'ptTplSwitcherPlugin'.DS.'config'.DS.'app.yml';\r\n\t\t\t$config = sfYaml::load($pt_switcher_config_file);\r\n\t\t\t$config['all']['ptTplSwitcher']['tplCurrent'] = $tpl;\r\n\t\t\t$yaml = sfYaml::dump($config);\r\n\t\t\t$ret = file_put_contents($pt_switcher_config_file, $yaml);\r\n\t\t}\r\n\t\tsfConfig::set('app_ptTplSwitcher_tplCurrent', $tpl);\r\n\t\t// if ($db) { var_dump($origin, $tpl); }\r\n\t\treturn $ret;\r\n\t}", "public final function setTemplateAfter($template){\n\t\tself::$_templateAfter[get_class($this)] = $template;\n\t}", "function set_template($group) {\n if (isset($this->config[$group])) {\n $this->template = $this->config[$group];\n } else {\n show_error('The \"' . $group . '\" template group does not exist. Provide a valid group name or add the group first.');\n }\n $this->initialize($this->template);\n }", "private function configureTemplate(){\n\t\t$template = $this->getTemplate();\n\t\t$template->setPageSubtitle($this->getModule()->getDisplayedName());\n\t}", "function setupTemplate() {\r\n\t\tparent::setupTemplate();\r\n\t\tLocale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_OJS_AUTHOR, LOCALE_COMPONENT_OJS_MANAGER));\r\n\t\t$templateMgr =& TemplateManager::getManager();\r\n\t\t$isEditor = Validation::isEditor();\r\n\t\t\r\n\t\tif (Request::getRequestedPage() == 'editor') {\r\n\t\t\t$templateMgr->assign('helpTopicId', 'editorial.editorsRole');\r\n\t\t\r\n\t\t} else {\r\n\t\t\t$templateMgr->assign('helpTopicId', 'editorial.sectionEditorsRole');\r\n\t\t}\r\n\t\t\r\n\t\t$roleSymbolic = $isEditor ? 'editor' : 'sectionEditor';\r\n\t\t$roleKey = $isEditor ? 'user.role.coordinator' : 'user.role.sectionEditor';\r\n\t\t$pageHierarchy = array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'user'), $roleKey), array(Request::url(null, $roleSymbolic, 'submissionsReport'), 'editor.reports.reportGenerator'));\r\n\t\t\r\n\t\t$templateMgr->assign('pageHierarchy', $pageHierarchy);\r\n\t}", "public static function assignTemplate($key,$t) {\r\n\t\tself::assign($key,self::fetch($t));\r\n\t}", "protected function _SetQuizModeTemplate()\n {\n $templateFile = trim($this->_quizConfig['templates'][$this->_quizMode]);\n\n if (is_file($GLOBALS['config']['root_tpl'] . $templateFile)) {\n $this->_sessObj->quizTemplatePath = $GLOBALS['config']['root_tpl'] . $templateFile;\n }\n }", "private function prepareTemplate() {\r\n $template = $this->iTemplateFactory->createTemplate();\r\n $template->_control = $this->linkGenerator;\r\n $this->setTemplate($template);\r\n }", "protected function setPageTemplate(PageTemplate $template) {\n\t\t$container = $template->initialize($this);\n\t\tif ($container !== null) {\n\t\t\t$this->_body = $container;\n\t\t}\n\t}", "public function setTemplate($template) {\n\t\t$this->template = $template;\n\n\t\treturn NULL;\n\t}", "public function initTemplate() {}", "function set($name, $value)\n {\n $this->_template->set($name, $value);\n }", "protected function setLayoutTemplate($template)\r\n {\r\n $this->layoutTemplate = $template;\r\n }", "public function setTemplate($path = NULL, $data = array())\n {\n ($path) ? $this->_template['path'] = VPATH . $path . EXT : $this->_template['path'] = VPATH . $this->_template['path'] . EXT;\n $this->_template['data'] = $data;\n return $this;\n }", "public function setTemplateSet($templateSet){\n\t\t$this->templateSet = $templateSet;\n\t}", "public function setTpl($tpl)\n {\n $this->tpl = $tpl;\n }", "function setXTemplatePath($value) {\n $this->xTemplatePath= $value;\n}", "protected function setTemplatePaths() {}", "public function initContent()\n {\n parent::initContent();\n\n $this->setTemplate(_PS_THEME_DIR_.'<%= name %>.tpl');\n }", "public function testTemplate() {\n $this->template->set('users');\n $this->template->view('TestTwo');\n }", "public function ClassTemplate(){\n\t\t$this->template = new Template;\n\t}", "public function update() {\n $this->view = $this->template->getView();\n $this->layout = $this->template->getLayout();\n }", "private function initializeTemplate() {\n\t\t$this->doc = t3lib_div::makeInstance('bigDoc');\n\t\t$this->doc->backPath = $GLOBALS['BACK_PATH'];\n\t\t$this->doc->docType = 'xhtml_strict';\n\t\t$this->doc->styleSheetFile2\n\t\t\t= '../typo3conf/ext/realty/BackEnd/BackEnd.css';\n\n\t\t$this->template\n\t\t\t= tx_oelib_TemplateRegistry::getInstance()->getByFileName(\n\t\t\t\t'EXT:realty/BackEnd/mod_template.html'\n\t\t);\n\t}", "protected function _setPageViewTemplate()\n {\n\n $fishpigWordpressModuleVersion = Mage::getConfig()->getNode('modules/Fishpig_Wordpress/version');\n\n if ($fishpigWordpressModuleVersion > 4) {\n parent::_setPageViewTemplate();\n } else {\n $page = $this->_initPage();\n\n $template = $page->getMetaValue('_wp_page_template');\n\n // This is the folder in Magento template\n $path = 'page/';\n\n //preg_match('/([^\\/]*)\\.php$/', $template, $match);\n //$filename = $path . $match[1] . '.phtml';\n // The extension is replaced with .phtml,\n // meaning that the directory structure is preserved.\n // (page-templates/templ.php will become $path . page-templates/templ.phtml)\n $filename = $path . str_replace('.php', '.phtml', $template);\n\n // This is to use Magento fallback system\n $params = array('_relative' => false);\n $area = $this->getLayout()->getBlock('root')->getArea();\n\n if ($area) {\n $params['_area'] = $area;\n }\n\n $templateName = Mage::getDesign()->getTemplateFilename($filename, $params);\n\n // If no other matches are found, Magento will eventually give a path in base/default, even if that template doesn't exist\n if (file_exists($templateName)) {\n $this->getLayout()->getBlock('root')->setTemplate($filename);\n }\n\n return $this;\n }\n }", "public function template()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/template', [\n\t\t\t'templates_availables' => $this->templates_availables,\n\t\t]);\n\t}", "public function set($n,$v){\n\t\t$this->Template->set($n, $v);\n\t}", "public function setTemplate($tpl)\n {\n if(isset($tpl) && !empty($tpl))\n {\n $this->template = $tpl;\n $this->css->setTemplate($tpl);\n $this->js->setTemplate($tpl);\n }\n }", "public function setTemplate($newvalue)\n {\n $oldvalue = $this->template;\n if ($newvalue instanceof Template)\n $this->template = $newvalue;\n\n // normally $recordSet->setTemplate is called before\n // $recordSet->rewind, so $recordSet->list should be null\n if (is_array($this->list))\n foreach($list as $record)\n $record->setTemplate($newvalue);\n\n return $oldvalue;\n }", "protected function content_template() {\n\t}", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template() {}", "protected function content_template() {}", "public function template($template)\n {\n $this->template = $template;\n\n return $this;\n }", "public function setProfileTemplate ($template = null){\n $db = new db();\n $db->connect();\n if (isset($template)){\n $this->profileTemplate = $template;\n }\n\n $ini_file = conf::pathHtdocs() . \"/templates/$this->profileTemplate/$this->profileTemplate.ini\";\n $ini_file_dist = $ini_file . \"-dist\";\n\n if (conf::isCli()) {\n if (file_exists($ini_file_dist)){\n copy($ini_file_dist, $ini_file);\n }\n }\n $values = array('template' => $this->profileTemplate);\n return $db->update('settings', $values, 1); \n }", "public static function use_parent_template() {\n add_action('save_post', array('core_admin', 'switch_page_template'));\n }", "public function change_template() {\n\t\t\t$elements = getRequest('element');\n\t\t\tif(!is_array($elements)) {\n\t\t\t\t$elements = array($elements);\n\t\t\t}\n\n\t\t\t$element = $this->expectElement(\"element\");\n\t\t\t$templateId = getRequest('template-id');\n\n\t\t\tif (!is_null($templateId)) {\n\t\t\t\tforeach($elements as $elementId) {\n\t\t\t\t\t$element = $this->expectElement($elementId, false, true);\n\n\t\t\t\t\tif ($element instanceof umiHierarchyElement) {\n\t\t\t\t\t\t$element->setTplId($templateId);\n\t\t\t\t\t\t$element->commit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new publicAdminException(getLabel('error-expect-element'));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->setDataType(\"list\");\n\t\t\t\t$this->setActionType(\"view\");\n\t\t\t\t$data = $this->prepareData($elements, \"pages\");\n\t\t\t\t$this->setData($data);\n\n\t\t\t\treturn $this->doData();\n\t\t\t} else {\n\t\t\t\tthrow new publicAdminException(getLabel('error-expect-action'));\n\t\t\t}\n\t\t}", "function CI_Template() {\n $this->_ci_ob_level = ob_get_level();\n\t\t\n // Copy an instance of CI so we can use the entire framework.\n $this->CI = & get_instance();\n\n // Load the template config file and setup our master template and regions\n include(APPPATH . 'config/template' . EXT);\n if (isset($template)) {\n $this->config = $template;\n $this->set_template($template['active_template']);\n }\n }", "public function setTemplatePath($tpl) {\n\t\tparent::setTemplatePath($tpl);\n\t}", "protected function content_template()\n\t{\n\t\t//\n\t}", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }" ]
[ "0.7883507", "0.7669823", "0.7662215", "0.75787175", "0.75251883", "0.75251883", "0.7485281", "0.7469354", "0.7379844", "0.733009", "0.73219424", "0.72819096", "0.7260786", "0.72444814", "0.7234831", "0.72237295", "0.71667314", "0.71018815", "0.7084825", "0.7080313", "0.70738465", "0.70392305", "0.6973915", "0.6973915", "0.6955467", "0.6927301", "0.69153666", "0.6840548", "0.68238014", "0.6793962", "0.6772795", "0.67698586", "0.67563736", "0.6713482", "0.6711567", "0.66518116", "0.6616733", "0.6614666", "0.6605287", "0.65758145", "0.65640247", "0.65502125", "0.65458024", "0.6536378", "0.6533941", "0.64885384", "0.648327", "0.6461589", "0.6453563", "0.64476615", "0.6445762", "0.6433327", "0.6399423", "0.6382904", "0.6346855", "0.63367885", "0.6335803", "0.63314545", "0.63096225", "0.6306774", "0.628586", "0.6267474", "0.62651974", "0.62596124", "0.6254129", "0.6245656", "0.6225802", "0.6182386", "0.61797047", "0.6174691", "0.61722976", "0.6166857", "0.6158136", "0.61579305", "0.614952", "0.61417717", "0.611966", "0.6114057", "0.61118597", "0.61110896", "0.6110975", "0.6110975", "0.6110975", "0.6110975", "0.6110975", "0.6110975", "0.6096142", "0.6096142", "0.60954547", "0.60875195", "0.6080057", "0.60728335", "0.60625875", "0.6055152", "0.605329", "0.60477567", "0.60477567", "0.60477567", "0.60477567", "0.60477567" ]
0.70421153
21
Get the current template name in use
public function getTemplate();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTemplateName() {\n\t\treturn $this->templateName;\n\t}", "function get_current_template_name() {\n\tglobal $wp_query;\n \n // Page\n\n if(is_page()) {\n return basename(get_page_template(), \".php\");\n }\n\n // Single post\n\n elseif (is_single()) {\n $post_id = $wp_query->get_queried_object_id();\n\t\t$post = $wp_query->get_queried_object();\n\t\t$post_type = $post->post_type;\n\n if ( isset( $post->post_type ) ) {\n // If a regular/default post then assign the name as single.\n if($post->post_type === 'post') {\n return 'single';\n }\n // Else use the post type name.\n else {\n return 'single-' . sanitize_html_class( $post->post_type );\n }\n }\n }\n\n // Search\n\n elseif ( is_search() ) {\n\t\treturn 'search';\n\t}\n}", "public function getTemplateName()\n {\n return $this->_sThisTemplate;\n }", "public function get_template_name(){\n\n return str_replace(\"_\",\"\",str_replace(\"_page\", \"\", get_class($this))) . \".tpl\";\n }", "public function getTemplateName()\n {\n return $this->templateName;\n }", "protected function _getTemplateName()\n {\n $tag = $this->getTemplateTag();\n $lang = app()->getLocale();\n $fallbackLang = config('app.fallback_locale');\n\n $name = \"mail_{$tag}_{$lang}\";\n\n if (empty(setting($name))) return \"mail_{$tag}_{$fallbackLang}\";\n\n return $name;\n }", "protected function _getTplName()\n {\n // assign template name\n $sTplName = oxRegistry::getConfig()->getRequestParameter('tpl');\n\n if ($sTplName) {\n // security fix so that you cant access files from outside template dir\n $sTplName = basename($sTplName);\n\n //checking if it is template name, not content id\n if (!getStr()->preg_match(\"/\\.tpl$/\", $sTplName)) {\n $sTplName = null;\n } else {\n $sTplName = 'message/' . $sTplName;\n }\n }\n\n return $sTplName;\n }", "function get_template_name($instance) {\n return 'template';\n }", "public function getTemplateName()\n {\n return isset($this->TemplateName) ? $this->TemplateName : null;\n }", "private function getTemplate(): string\n {\n $sTemplate = $this->getViewPath() . static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= $this->getCurrentClassName() . DIRECTORY_SEPARATOR;\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n }\n }\n\n return $sTemplate;\n }", "public function render()\n {\n return $this->getTemplateName();\n }", "public function template() {\n\n // check for a cached template name\n if(isset($this->cache['template'])) return $this->cache['template'];\n\n // get the template name\n $templateName = $this->intendedTemplate();\n\n if($this->kirby->registry->get('template', $templateName)) {\n return $this->cache['template'] = $templateName; \n } else {\n return $this->cache['template'] = 'default';\n }\n\n }", "public function intendedTemplate() {\n if(isset($this->cache['intendedTemplate'])) return $this->cache['intendedTemplate'];\n return $this->cache['intendedTemplate'] = $this->content()->exists() ? $this->content()->name() : 'default';\n }", "function get_template_name( $instance ) {\n\t\t\treturn isset($instance['template']) ? $instance['template'] : 'base';\n\t\t}", "public function getInspectTemplateName()\n {\n return $this->inspect_template_name;\n }", "public function getTemplateName()\n {\n }", "public function getReidentifyTemplateName()\n {\n return $this->reidentify_template_name;\n }", "final public function getTemplate() {\n\t\treturn '';\n\t}", "public function getTemplateName(): string;", "public function forTemplate() {\n\t\treturn $this->ActionName;\n\t}", "public function getTemplateName()\n {\n // TODO: Implement getTemplateName() method.\n return 'Tem';\n }", "public function getNewTemplateName()\n {\n return isset($this->NewTemplateName) ? $this->NewTemplateName : null;\n }", "protected function getTemplateFilename() {\n if (isset($this->extra['template-file'])) {\n return $this->extra['template-file'];\n }\n return 'settings.local.php.twig';\n }", "public function getFullName(){\n\t\treturn $this->templateSet->getFullName() . '/' . $this->name . $this->suffix;\n\t}", "abstract public function getTemplateName();", "function get_template_name( $instance ) {\n\t\treturn 'base';\n\t}", "function get_template_name( $instance ) {\n\t\treturn 'base';\n\t}", "function get_template_name( $instance ) {\n\t\treturn $instance['tpl'] ? $instance['tpl'] : 'base';\n\t}", "public function get_utemplate_name() {\n $fs = get_file_storage();\n $xmlfile = $fs->get_file_by_id($this->utemplateid);\n\n return $xmlfile->get_filename();\n }", "protected function getTemplate()\r\n {\r\n $request = Registry::getInstance()->get('Request');\r\n\r\n return implode(\r\n DIRECTORY_SEPARATOR,\r\n array(\r\n APPLICATION_PATH,\r\n $this->templatePath,\r\n $request->getControllerName(),\r\n $request->getActionName() . $this->templateExtention\r\n )\r\n );\r\n }", "public function template()\n {\n if ($this->template === null) {\n return 'charcoal/app/handler/layout';\n }\n\n return $this->template;\n }", "public function getTemplate(){\n\t\treturn $this->CustomTemplate ? $this->CustomTemplate : $this->config()->get('default_template');\n\t}", "function get_template_name( $instance ) {\n if ( !empty( $instance['layout'] ) ) {\n return $instance['layout'];\n } else {\n return 'base';\n }\n }", "protected function getName()\n {\n return $this->getRequest()->args('name') ?: $this->profile->code . '_' . $this->tpl['name'];\n }", "public function getName()\r\n\t{\r\n\t\treturn GeekPoint_AdminDAVi_Directory_Root::ADMIN_TEMPLATES;\r\n\t}", "protected function template_name() {\r\n return 'transportation/route_planner';\r\n }", "public function getTemplatePathname() : string {\n\t\treturn $this->templateBasePath . '/linklist-group.mustache';\n\t}", "public static function getTemplate() {\n $settings = self::getSettings();\n \n return $settings->template;\n }", "protected function GetTemplate()\n\t{\n\t\tif ($this->Plain())\n\t\t\treturn 'blobplain.tpl';\n\t\treturn 'blob.tpl';\n\t}", "public function getName()\n {\n return $this->view;\n }", "public function getName()\n {\n return $this->view;\n }", "public function getName() {\n\t\treturn $this->current_name;\n\t}", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function templatePrefix()\n\t{\n\t\treturn '';\n\t}", "public function get_chosen_template_name($template) {\n\t\treturn self::$template = $template;\n\t}", "protected function template() {\n\t\treturn '';\n\t}", "protected function filename()\n {\n return 'emailtemplate_' . time();\n }", "function getTemplateFilename($t)\n{\n\treturn ARC_TEMPLATE_FS . $t . '.php';\n}", "function get_template_name($instance)\n {\n return isset($instance['style']) ? $instance['style'] : 'base';\n }", "public static function getTemplatePage()\n {\n return self::$templatePage;\n }", "public function getTemplateName()\n\t{\n\t\treturn 'uitypes/Modules.tpl';\n\t}", "protected function getName()\n {\n return $this->slimInstance->router()->getCurrentRoute()->getName();\n }", "protected function template()\n\t{\n\t\treturn Phpfox::getLib('template');\t\n\t}", "protected function currentTemplateHandle(){\n if( $this->_currentTemplateHandle === null ){\n $blockObj = $this->getBlockObject();\n $this->_currentTemplateHandle = ( is_object($blockObj) ) ? (string) $blockObj->getBlockFilename() : null;\n }\n return $this->_currentTemplateHandle;\n }", "public function getTemplateName (string $type, string $name) : string\n {\n return $this->registry->getComponent($type, $name)->getTemplatePath();\n }", "public function getFormTemplate(): string\n {\n return static::FORM_TEMPLATE;\n }", "function get_template_name( $instance ) {\n\n\t\tswitch ( $instance['box_style'] ) {\n\t\t\tcase 'simple':\n\t\t\t\t$template = 'simple';\n\t\t\t\tbreak;\n\t\t\tcase 'iconbox':\n\t\t\t\t$template = 'iconbox';\n\t\t\t\tbreak;\n\t\t\tcase 'image':\n\t\t\t\t$template = 'image';\n\t\t\t\tbreak;\n\t\t\tcase 'list':\n\t\t\t\t$template = 'list';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$template = 'base';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $template;\n\t}", "public function get_current_template( $echo = false ) {\n\t\tif( !isset( $GLOBALS['template'] ) ){\n\t\t\treturn false;\n\t\t}\n\n\t\tif( $echo ){\n\t\t\techo basename( $GLOBALS['template'] );\n\t\t} else {\n\t\t\treturn basename( $GLOBALS['template'] );\n\t\t}\n\t}", "protected function resolveViewTemplateName(): string\n {\n $controllerName = ltrim($this->request->getControllerName(), '\\\\');\n $namespaceParts = explode('\\\\', $controllerName);\n $controllerClassName = array_pop($namespaceParts);\n\n // Get rid of module name\n array_shift($namespaceParts);\n\n if (strtolower($namespaceParts[0]) == 'mvc') {\n array_shift($namespaceParts);\n }\n\n if (strtolower($namespaceParts[0]) == 'controller') {\n array_shift($namespaceParts);\n }\n\n $controllerClassName = str_replace('Controller', '', $controllerClassName);\n\n return\n $this->getTemplateDir() . implode(DIRECTORY_SEPARATOR, [\n '',\n 'Templates',\n implode('\\\\', $namespaceParts),\n ucfirst($controllerClassName),\n ucfirst($this->request->getControllerActionName())\n ]) . '.phtml';\n }", "public function path()\n {\n try {\n return ($this->engine->getResolveTemplatePath())($this->name);\n } catch (TemplateNotFound $e) {\n return $e->paths()[0];\n }\n }", "public function getControlTemplateUID()\n {\n return $this->name.'_TPL_UID';\n }", "public function getTemplate () {\r\n\t\treturn $this->_template;\r\n\t}", "protected function GetTemplate()\n\t{\n\t\treturn 'heads.tpl';\n\t}", "public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}", "public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}", "protected function getTemplatePathAndFilename() {}", "public function getMainTpl(){\n return $this->templates['main'];\n }", "public function getTemplateUrl() {\n\t\t\t\n\t\t\treturn DMURL::getCurrentBaseUrl() . 'templates/' . $this->_template;\n\t\t\t\n\t\t}", "public function getTemplatePathAndFilename() {}", "public function getCurrentContext()\n\t{\n\t\treturn $this->context_name;\n\t}", "function get_template()\n {\n }", "public function get_template() {\n return $this->_template;\n }", "protected function getCurrentParsedTemplate() {}", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "function dt_get_current_page_name() {\n\n\tif ( isset($GLOBALS['pagenow']) && is_admin() ) {\n\n\t\treturn $GLOBALS['pagenow'];\n\t} else {\n\n\t\treturn false;\n\t}\n}", "function getTemplate()\r\n\t{\r\n\t\tglobal $config;\r\n\t\tglobal $section;\r\n\t\t\r\n\t\t$style = $_REQUEST[\"_style\"];\r\n\t\t$site = $this->Site();\r\n\t\tif(!$site) Site::getSite();\r\n\t\t\r\n\t\t$templateFile = \"\";\r\n\t\t\r\n\t\tswitch($style)\r\n\t\t{\r\n\t\tcase 'print':\r\n\t\t\t$templateFile = $site->print_template;\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'popup':\r\n\t\t\t$templateFile = $site->popup_template;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 'mobile':\r\n\t\t\t$templateFile = $site->mobile_template;\r\n\t\t\t\r\n\t\tcase 'nude':\r\n\t\t\treturn \"{description}\";\r\n\t\t}\r\n\r\n\t\tif ($section)\r\n\t\t{\r\n\t\t\tif (!$templateFile) $templateFile = $section->getTemplateFile($this->identifier);\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif (!$templateFile) $templateFile = $this->template;\r\n\t\tif (!$templateFile) $templateFile = $site->default_template;\r\n\t\t\r\n\t\t$templateFile = ComponentManager::fireEvent(\"OverrideTemplate\", $templateFile);\r\n\t\t\r\n\t\t$template = file_get_contents(\"{$config['homedir']}/templates/{$templateFile}\");\r\n\r\n\t\treturn $template;\r\n\t}", "function care_get_current_template( $echo = false ) {\n if( !isset( $GLOBALS['care_current_theme_template'] ) )\n return false;\n if( $echo )\n echo $GLOBALS['care_current_theme_template'];\n else\n return $GLOBALS['care_current_theme_template'];\n}", "protected function get_template() {\n\t\treturn 'post';\n\t}", "public function get_main_template() {\n\n\t\t\treturn $this->main_template;\n\n\t\t}", "public function getTemplate() \n {\n return $_SESSION['template'];\n \n }", "function dt_get_template_name( $post_id = 0, $force_in_loop = false ) {\n\tglobal $post;\n\n\t// work in admin\n\tif ( is_admin() && !$force_in_loop ) {\n\n\t\tif ( isset($_GET['post']) ) {\n\n\t\t\t$post_id = $_GET['post'];\n\t\t} elseif( isset($_POST['post_ID']) ) {\n\n\t\t\t$post_id = $_POST['post_ID'];\n\t\t}\n\t}\n\n\t// work in the loop\n\tif ( !$post_id && isset($post->ID) ) {\n\t\t$post_id = $post->ID;\n\t}\n\n\treturn get_post_meta( absint($post_id), '_wp_page_template', true );\n}", "public function getTemplate() {}", "public function getTemplate()\n\t{\n\t\treturn $this->_template;\n\t}", "function getTemplateString($templateName) {\n if ($templateName) { //fetch template string !DOCUMENT!\n $templateString=$this->cObj->fileResource($templateName);\n $template=$this->cObj->getSubpart($templateString, '###'.strtoupper($this->cObj->data['xtemplate']).'###');\n return $template;\n }\n return '';\n }", "function getTemplateFile ()\n\t{\n\t\t//\n\t\t// Allow the template to override a specific file. If this file exist\n\t\t// (the file in the template directory), it will be loaded, otherwise\n\t\t// the default (in the plugin directory) will be loaded\n\t\t//\n\t\t$renderer = 'templates/'.$this->getTemplate ().'/'.$this->getRenderer ();\n\t\tif (!(file_exists ($renderer)))\n\t\t{\n\t\t\t$renderer = 'framework/view/'.$this->getRenderer ();\n\t\t}\n\t\treturn $renderer;\n\t}", "public function get_contextname() {\n return $this->contextname;\n }" ]
[ "0.83295673", "0.831259", "0.81922513", "0.8134848", "0.8124862", "0.7983114", "0.7759594", "0.77121305", "0.7693696", "0.76320994", "0.76021445", "0.7563171", "0.75602627", "0.74978226", "0.74807787", "0.74727434", "0.7463537", "0.7458871", "0.7453495", "0.73288584", "0.7315773", "0.7308003", "0.72949857", "0.72868466", "0.7286824", "0.72850215", "0.72850215", "0.7267628", "0.7259281", "0.71748865", "0.713968", "0.71378577", "0.7091792", "0.70890105", "0.6947793", "0.6939329", "0.69347495", "0.692382", "0.691404", "0.69008005", "0.69008005", "0.68956196", "0.6876448", "0.6876448", "0.6876448", "0.6876448", "0.68649906", "0.6829749", "0.6812606", "0.6811804", "0.68045264", "0.6763418", "0.67631024", "0.6751543", "0.674427", "0.67375165", "0.67365104", "0.6730256", "0.6715935", "0.67148924", "0.67102265", "0.6705126", "0.670445", "0.66922516", "0.6690514", "0.6690199", "0.66835964", "0.66835964", "0.66800934", "0.6678834", "0.66643715", "0.6652516", "0.66516596", "0.66468376", "0.66339487", "0.6633803", "0.663214", "0.663214", "0.663214", "0.663214", "0.663214", "0.663214", "0.663214", "0.663214", "0.663214", "0.663214", "0.663214", "0.663214", "0.663214", "0.6621531", "0.6611853", "0.66108274", "0.6609986", "0.6606904", "0.6602378", "0.6599643", "0.65975666", "0.6596213", "0.6589423", "0.65840566", "0.6583315" ]
0.0
-1
Compile inky template to html and save it to storage
public function saveViewAsHtml($view, $data);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function compile()\n {\n\n $this->buildPage();\n\n if (defined('DEBUG_MARKUP') && DEBUG_MARKUP) {\n ob_start();\n $checkXml = new DOMDocument();\n\n if ($this instanceof LibTemplateAjax)\n $checkXml->loadXML($this->compiled);\n else\n $checkXml->loadHTML($this->compiled);\n\n $errors = ob_get_contents();\n ob_end_clean();\n\n // nur im fehlerfall loggen\n if ('' !== trim($errors)) {\n\n $this->getResponse()->addWarning('Invalid XML response');\n\n SFiles::write(PATH_GW.'log/tpl_xml_errors.html', $errors.'<pre>'.htmlentities($this->compiled).'</pre>');\n SFiles::write(PATH_GW.'log/tpl_xml_errors_'.date('Y-md-H-i_s').'.html', $errors.'<pre>'.htmlentities($this->compiled).'</pre>');\n }\n }\n\n if ($this->keyCachePage) {\n $this->writeCachedPage($this->keyCachePage , $this->compiled);\n }\n\n $this->output = $this->compiled;\n\n\n }", "protected function compile()\n\t{\n\n\t\t$this->Template->tweetcontainer = $this->html;\n\n\t}", "public function getCompiledHtml();", "private function render_template() {\n\t\t$template = $this->template;\n\n\t\tif ( ! is_readable( $template ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tinclude $template;\n\t}", "public function generateContents()\n {\n ob_start();\n include $this->getTemplateFile();\n $output = ob_get_contents();\n ob_end_clean();\n return $output;\n }", "public function FrontendOutputPostGenerate() {\n\t\t\tfile_put_contents($this->location, $this->template);\n\t\t}", "function php_to_html( $output_dir_path = null, $template_path = null, $output_filename = null ) {\r\n $output_dir_path = $output_dir_path ? $output_dir_path : dirname( __FILE__ ) . '/html';\r\n $template_path = $template_path ? $template_path : dirname( __FILE__ );\r\n\r\n if ( !file_exists( $output_dir_path ) )\r\n mkdir( $output_dir_path );\r\n\r\n foreach ( (array) $this->templates as $template ) {\r\n $filename = $output_filename ? $output_filename : $template;\r\n\r\n ob_start();\r\n\r\n require_once( $template_path . '/' . $template . '.php' );\r\n\r\n if ( ob_get_length() > 0 ) {\r\n $html = ob_get_contents();\r\n }\r\n\r\n ob_end_clean();\r\n\r\n file_put_contents( $output_dir_path . '/' . $filename . '.html', $html );\r\n\r\n if ( !isset( $html ) ) {\r\n echo \"error: file $template_path/$template.php can't be read\";\r\n } else {\r\n echo \"<p>File <em>{$template}.php</em> ouput succesfully at <em>\" . $output_dir_path . \"/{$filename}.html</em></p>\";\r\n }\r\n }\r\n }", "protected function compile()\n {\n if (TL_MODE == 'BE')\n {\n $this->strTemplate = 'be_wildcard';\n $this->Template = new \\BackendTemplate($this->strTemplate);\n }\n\n if (empty(self::$wrappers))\n {\n return;\n }\n\n foreach (array_pop(self::$wrappers) as $key => $value)\n {\n $this->Template->{$key} = $value;\n }\n }", "private function renderTemplate(){\n\t\trequire($this->TemplateFile);\n\t}", "public function output()\n\t{\n\t\t$template_path = THEMES_DIR.PAGE_PATH.'.html';\n\t\tif(!file_exists($template_path)) {\n\t\t\t// or the first file in the first existing path\n\t\t\t$existing_path = $this->first_realpath(THEMES_DIR, PAGE_PATH);\n\t\t\t$tpl_list = $this->list_files(THEMES_DIR . $existing_path, '*.html');\n\t\t\t$template_path = reset($tpl_list);\n\t\t}\n\t\t$content = file_get_contents($template_path);\n\t\t$content = $this->parse($content, false, true, 'template \"'.$template_path.'\"');\n\t\treturn $content;\n\t}", "function ahr_render_tpl( $path, $data = array() ) {\r\n \r\n ob_start();\r\n include( $path );\r\n $output = ob_get_clean();\r\n echo $output;\r\n \r\n}", "protected function compile()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$this->strTemplate = 'be_wildcard';\n\t\t\t$this->Template = new \\BackendTemplate($this->strTemplate);\n\t\t}\n\t}", "public function plantilla(){\n\n include \"views/template.php\";#include(): Se utiliza para invocar el archivo que contiene el código html (es decir, incluye el template que está en la carpeta views)\n }", "public function run ()\n\t{\n\t\t$dump = template::dump ();\n\n\t\t$head = '';\n\t\tforeach ( $dump ['css'] as $file )\n\t\t{\n\t\t\t$head .= $this->twig->render ( 'system/html/web/snippets/css.twig', [ 'file' => $file, 'defer' => substr ( $file, 0, 2 ) == '//' ] );\n\t\t}\n\n\t\tforeach ( $dump ['js'] as $file )\n\t\t{\n\t\t\t$head .= $this->twig->render ( 'system/html/web/snippets/js.twig', [ 'file' => $file, 'defer' => substr ( $file, 0, 2 ) == '//' ] );\n\t\t}\n\n\t\t$body = '';\n\t\tforeach ( $dump ['templates'] as $template )\n\t\t{\n\t\t\t$body .= $this->twig->render ( $template ['path'], $template ['environment'] );\n\t\t}\n\n\t\t// We do not use die incase some modules need to run after the layout have been generated\n\t\techo $this->twig->render ('system/html/web/base.twig', [\n\t\t\t'head' => $head,\n\t\t\t'body' => $body\n\t\t] );\n\t}", "public function renderHTML() \n\t{\n\t\t$viewTemplate = file_get_contents('view_file.html');\n\t\techo $viewTemplate;\n\t}", "public function getHtmlTemplate() {}", "private function buildPage() {\n ob_clean();\n ob_start();\n\n //session_start();\n require_once $this->_template;\n\n $this->_page = ob_get_clean();\n }", "public function write()\n\t{\n\t\t$source = $this->compile();\n\n\t\t// file location\n\t\t$file = $this->template->getEnvironment()->getCache() . '/';\n\t\t$file .= $this->template->getEnvironment()->getCacheFilename($this->filename);\n\n\t\t// attempt to create the directory if needed\n\t\tif(!is_dir(dirname($file)))\n\t\t{\n\t\t\tmkdir(dirname($file), 0777, true);\n\t\t}\n\n\t\t// write to tempfile and rename\n\t\t$tmpFile = tempnam(dirname($file), basename($file));\n\t\tif(@file_put_contents($tmpFile, $source) !== false)\n\t\t{\n\t\t\tif(@rename($tmpFile, $file))\n\t\t\t{\n\t\t\t\tchmod($file, 0644);\n\t\t\t}\n\t\t}\n\t}", "protected function compile()\n {\n $this->addImageToTemplate($this->Template, $this->arrData);\n }", "function fetchHtml()\n {\n $html = '';\n\n if (!empty($this->templateFile)) {\n // vullen smarty template\n global $smarty;\n $template = $smarty->createTemplate($this->templateFile);\n $template->assign('interfaceObject', $this);\n\n $html = $smarty->fetch($template);\n }\n return $html;\n }", "public function generate()\n{\n$user_code=\"{% extends 'resource.twig.c' %}\\n\".$this->user_code;\n\n$buf=$this->gen->renderer->render_string($this->filename,$user_code\n\t,array('resource' =>$this, 'global' => $this->gen));\n$this->gen->file_write($this->dest_filename,$buf);\n}", "public function generateCode() {\n $content = \"\";\n foreach ($this->arrTemplates as $template) {\n if (!file_exists($template)) {\n //Template not found\n continue;\n }\n $content .= file_get_contents($template);\n }\n \n foreach ($this->attributes as $key => $val) {\n $content = str_replace($this->placeHolderStart.$key.$this->placeHolderEnd, $val, $content);\n }\n return $content;\n }", "public function template()\n {\n\n include './views/template.php';\n\n }", "protected function compile() {\n if (TL_MODE == 'BE') {\n $this->genBeOutput();\n } else {\n $this->genFeOutput();\n }\n }", "public function render()\n\t{\n\t\tif ($this->file == null) { // intentionally ==\n\t\t\tthrow new Nette\\InvalidStateException('Template file name was not specified.');\n\t\t}\n\n\t\tif (!$this->getFilters()) {\n\t\t\t$this->onPrepareFilters($this);\n\t\t}\n\n\t\tif ($latte = $this->getLatte()) {\n\t\t\treturn $latte->setLoader(new Latte\\Loaders\\FileLoader)->render($this->file, $this->getParameters());\n\t\t}\n\n\t\t$cache = new Caching\\Cache($storage = $this->getCacheStorage(), 'Nette.FileTemplate');\n\t\tif ($storage instanceof Caching\\Storages\\PhpFileStorage) {\n\t\t\t$storage->hint = str_replace(dirname(dirname($this->file)), '', $this->file);\n\t\t}\n\t\t$cached = $compiled = $cache->load($this->file);\n\n\t\tif ($compiled === null) {\n\t\t\ttry {\n\t\t\t\t$compiled = \"<?php\\n\\n// source file: $this->file\\n\\n?>\" . $this->compile();\n\n\t\t\t} catch (CompileException $e) {\n\t\t\t\tthrow $e->setSource(file_get_contents($this->file), $e->sourceLine, $this->file);\n\t\t\t}\n\n\t\t\t$cache->save($this->file, $compiled, array(\n\t\t\t\tCaching\\Cache::FILES => $this->file,\n\t\t\t\tCaching\\Cache::CONSTS => 'Nette\\Framework::REVISION',\n\t\t\t));\n\t\t\t$cached = $cache->load($this->file);\n\t\t}\n\n\t\t$isFile = $cached !== null && $storage instanceof Caching\\Storages\\PhpFileStorage;\n\t\tself::load($isFile ? $cached['file'] : $compiled, $this->getParameters(), $isFile);\n\t}", "protected function compile()\n\t{\n\t\t$lexer = new Lexer($this->template->getEnvironment());\n\t\t$stream = $lexer->tokenize(file_get_contents($this->filename), basename($this->filename));\n\n\t\t// unique class based on the filename\n\t\t// @todo fix problem with '-' in classes\n\t\t$class = $this->template->getEnvironment()->getCacheFilename($this->filename);\n\t\t$class = 'S' . substr($class, 0, -8) . '_Template';\n\n\t\t// writer object which contains the parsed PHP code\n\t\t$writer = new Writer();\n\t\t$writer->write(\"<?php\\n\");\n\t\t$writer->write(\"\\n\");\n\t\t$writer->write('namespace Spoon\\Template;' . \"\\n\");\n\t\t$writer->write(\"\\n\");\n\t\t$writer->write('/* ' . $this->filename . ' */' . \"\\n\");\n\t\t$writer->write(\"class $class extends Renderer\\n\");\n\t\t$writer->write(\"{\\n\");\n\t\t$writer->indent();\n\t\t$writer->write('protected function display(array $context)' . \"\\n\");\n\t\t$writer->write(\"{\\n\");\n\t\t$writer->indent();\n\n\t\t$tags = $this->template->getEnvironment()->getTags();\n\n\t\t$token = $stream->getCurrent();\n\t\twhile(!$stream->isEof())\n\t\t{\n\t\t\tswitch($token->getType())\n\t\t\t{\n\t\t\t\tcase Token::TEXT:\n\t\t\t\t\t$text = new TextNode($stream, $this->template->getEnvironment());\n\t\t\t\t\t$text->compile($writer);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Token::VAR_START:\n\t\t\t\t\t$stream->next();\n\t\t\t\t\t$variable = new VariableNode($stream, $this->template->getEnvironment());\n\t\t\t\t\t$variable->compile($writer);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Token::BLOCK_START:\n\t\t\t\t\t$token = $stream->next();\n\n\t\t\t\t\t// validate tag existence\n\t\t\t\t\tif(!isset($tags[$token->getValue()]))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new SyntaxError(\n\t\t\t\t\t\t\tsprintf('There is no such template tag \"%s\"', $token->getValue()),\n\t\t\t\t\t\t\t$token->getLine(),\n\t\t\t\t\t\t\t$this->filename\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$node = new $tags[$token->getValue()]($stream, $this->template->getEnvironment());\n\t\t\t\t\t$node->compile($writer);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif($token->getType() !== Token::EOF)\n\t\t\t{\n\t\t\t\t$token = $stream->next();\n\t\t\t}\n\n\t\t\telse break;\n\t\t}\n\n\t\t$writer->outdent();\n\t\t$writer->write(\"}\\n\");\n\t\t$writer->outdent();\n\t\t$writer->write(\"}\\n\");\n\t\treturn $writer->getSource();\n\t}", "private function makeHTML($path) {\n $output = shell_exec(\"sudo /var/www/sphinx/./myMake.sh \" . $path . \" html\");\n //$output = shell_exec(\"sudo sphinx-build -b html $path/source/ $path/build/html\");\n //dd($output);\n $this->addNewNews(0, 0, 3, \"Erstellt HTML\");\n }", "function make($filename, $data){\n\n extract($data);\n //turn on output buffering\n ob_start(); //this is to store the data in an internal buffer and not the browser\n\n //include the template\n include(__DIR__ .'/../../resources/views/emails/' .$filename .'.php');\n\n //to get the contents out of the file\n\n $content = ob_get_contents();\n\n //erase the content and turn off output buffering\n ob_end_clean();\n\n return $content;\n}", "public function output(): string\n {\n $data = $this->data;\n\n // Render data\n ob_start();\n include $this->templateFile;\n $rendered = ob_get_clean();\n return $rendered;\n }", "protected function saveHtml()\n {\n $this->fsio->put($this->page->getTarget(), $this->html);\n }", "public function render() {\n $template = $this->template;\n $template->setFile(__DIR__ . '/QuestionControl.latte');\n $this->template->question = $this->questions->getById($this->questionId);\n $template->render();\n }", "public function render()\n {\n \n $v = $this->vars;\n \n ob_start();\n foreach( $this->templates as $template )\n {\n if( Fs::exists( GAIA_PATH.'modules/'.$template.'.tpl' ) )\n include GAIA_PATH.'modules/'.$template.'.tpl';\n elseif( Fs::exists( GAIA_PATH.'wbf/'.$template.'.tpl' ) )\n include GAIA_PATH.'wbf/'.$template.'.tpl';\n else \n echo 'Missing Template '.$template.NL;\n }\n \n $maincontent = ob_get_contents();\n ob_end_clean();\n \n $this->renderedContent = $maincontent;\n\n return $this->renderedContent;\n\n }", "private function export() {\r\n $this->app->setTemplateData(array(\"content\" => $this->content, \"content-title\" => \"Oudermisbehandeling\", \"content-sub-title\" => $this->title, \"title\" => \"Ecareplan ~ Oudermisbehandeling - \" . $this->title, \"headscript\" => $this->script));\r\n }", "private function generate() {\r\n\t\t$frontend = $this->getFrontend();\r\n\t\t// Clone the Template rendering object since we don't want to influence the processing:\r\n\t\t/** @var $template \\TYPO3\\CMS\\Core\\TypoScript\\TemplateService */\r\n\t\t$template = clone $frontend->tmpl;\r\n\t\t$template->start ( $frontend->sys_page->getRootLine($this->getTemplatePageId($frontend)));\r\n\r\n\t\t$keysToBeCached = array('config.', 'includeLibs.', 'lib.', 'plugin.', 'tt_content', 'tt_content.');\r\n\t\t/** @var $event Tx_Extracache_System_Event_Events_Event */\r\n\t\t$event = GeneralUtility::makeInstance('Tx_Extracache_System_Event_Events_Event', self::EVENT_Generate, $this, $keysToBeCached);\r\n\t\t$this->getEventDispatcher()->triggerEvent($event);\r\n\r\n\t\t$cache = array();\r\n\t\tforeach ($event->getInfos() as $keyToBeCached) {\r\n\t\t\t$cache[$keyToBeCached] = $template->setup[$keyToBeCached];\r\n\t\t}\r\n\r\n\t\t$this->persistCache($cache);\r\n\r\n\t\treturn $cache;\r\n\t}", "function render_template($template, $settings) {\n $text = file_get_contents($template); \n $text = transform_text($text, $settings);\n return $text;\n }", "protected function compile()\n {\n // Backend mode\n if (TL_MODE == 'BE') {\n return $this->compileBackend('### Showcase Overview ###');\n }\n\n // Add folder navigation\n \\Input::setGet('showcase', \\Input::get('showcase'));\n\n if (!empty(\\Input::get('showcase'))) {\n return '';\n }\n\n // Add isotope JS library\n $GLOBALS['TL_JAVASCRIPT'][] = Environment::get('path').'/bundles/comoloshowcase/js/isotope.pkgd.min.js|static';\n $GLOBALS['TL_JAVASCRIPT'][] = Environment::get('path').'/bundles/comoloshowcase/js/isotope-script.js|static';\n\n $this->Template->categories = ShowcaseCategoryModel::findBy('pid', $this->showcase, ['order' => 'sorting ASC']);\n $this->Template->strShowcases = $this->parseShowcases();\n }", "public function plantilla(){\n //el include se utiliza para invocar el archivo que tiene el codigo html\n include \"View/template.php\";\n }", "public function renderTemplate();", "public function buildHTML() {\n\n\t\t// Load the header\n\t\tinclude 'templates/header.php';\n\n\t\t// Load the content\n\t\t$this->contentHTML();\n\n\t\t// Load the footer\n\t\tinclude 'templates/footer.php';\n\n\t}", "public function template();", "public function render() {\n\t\t$this->template->setFile(__DIR__ . '/templates/' . $this->templateName);\n\n\t\t$this->template->richTexts = $this->getRichTextNames();\n\t\t$this->template->config = $this->configuration;\n\n\t\t$this->template->render();\n\t}", "function build() \n {\n $this->engine->build($this->template, $this->config);\n return $this->engine->getBuildedTemplate();\n }", "protected function compile(): void\n {\n if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) {\n $this->strTemplate = 'be_wildcard';\n $this->Template = new BackendTemplate($this->strTemplate);\n }\n\n $this->Template->tabsElement = $this->tabs_element;\n }", "public function output() {\n\n if (!file_exists($this->view)) {\n \treturn \"Voeg eerst een template toe ($this->view).<br />\";\n }\n $output = file_get_contents($this->view);\n \n foreach ($this->variabeles as $key => $variable) {\n \t$tagToReplace = \"[@$key]\";\n \t$output = str_replace($tagToReplace, $variable, $output);\n }\n\n return $output;\n }", "public function asTemplate(): string\n {\n return $this->dom->saveHTML();\n }", "protected function initTemplate()\n {\n /** @var WorldState $state */\n /** @var ExecHelper $exec */\n $tplPhp = <<<EOS\nWorld. From: <?=\\$state->name?>\n\nExec URL: <?=\\$exec->url( 'someExec', ['a'=>1] )?><?php \\$formBody = \"<input type=\\\"text\\\" name=\\\"someInput\\\" value=\\\"2\\\">\\n\"?>\n\nExec Form:\n<?=\\$exec->wrapForm( 'otherExec', 'POST', \\$formBody ) ?>\nEOS;\n $this->template = new PhpTemplate( $this, null, $tplPhp );\n }", "public function compile($path)\n {\n $file = $this->files->get($path);\n $contents = Template::compile($file);\n\n if (!is_null($this->cachePath))\n {\n $compiledPath = $this->getCompiledPath($path);\n\n $this->files->put($compiledPath, $contents);\n }\n }", "function templateLoader($html_file){\n\t\t$this->html_file=$html_file;\n\t\t$this->html_result=file_get_contents($this->html_file);\n\t}", "function oz_eval_template ($templatefile) {\r\n\t//Check if template already present in file system and that it's up to date.\r\n\t//If it is, then reuse it using include.\r\n\t$src = file_get_contents($templatefile);\r\n\t$php = '';\r\n\t$i = 0;\r\n\t$n = strlen($src);\r\n\twhile ($i<$n) {\r\n\t\t$i2 = strpos($src,'{{',$i);\r\n\t\tif ($i2===FALSE) {$php .= substr($src,$i,$n-$i);break;}\r\n\t\t$i3 = strpos($src,'}}',$i2+2);\r\n\t\tif ($i3===FALSE) {$php .= substr($src,$i,$n-$i);break;}\r\n\t\tif ($i2>$i) $php.=substr($src,$i,$i2-$i);\r\n\t\t$key = substr($src,$i2+2,$i3-$i2-2);\r\n\t\t$php.='<?php echo oz_text(\\''.$key.'\\'); ?>';\r\n\t\t$i = $i3+2;\r\n\t}\r\n\treturn eval(\" \\r\\n?>\".$php.\"<?php \\r\\n\");\r\n}", "function render_template($template_path,$template_data)\n{\n\t// Stores output buffer\n\t$html = '';\n\t// Start output buffering\n\tob_start();\n\trequire($template_path);\n\t$html = ob_get_clean();\n\n\t// Return generated (buffered) HTML\n\treturn $html;\t\t\n}", "public function __viewTemplate()\n {\n $this->_context[2] = 'single';\n $this->addStylesheetToHead(self::$assets_base_url . 'editor.css');\n $this->addStylesheetToHead(self::$assets_base_url . 'highlighters/highlight-xsl.css');\n $this->addScriptToHead(self::$assets_base_url . 'editor.js');\n $this->addScriptToHead(self::$assets_base_url . 'highlighters/highlight-xsl.js');\n $name = $this->_context[1];\n $filename = $name . '.xsl';\n $title = $filename;\n $this->setTitle(__(('%1$s &ndash; %2$s &ndash; %3$s'), array($title, __('Pages'), __('Symphony'))));\n //$this->setPageType('table');\n $this->Body->setAttribute('spellcheck', 'false');\n $this->appendSubheading($title);\n $breadcrumbs = array(\n Widget::Anchor(__('Pages'), SYMPHONY_URL . '/blueprints/pages/'),\n new XMLElement('span', __(Helpers::capitalizeWords($name)))\n );\n $this->insertBreadcrumbs($breadcrumbs);\n \n $this->insertAction(\n Widget::Anchor(\n __('Edit Page'), \n SYMPHONY_URL . '/blueprints/pages/edit/' . PageManager::fetchIDFromHandle($name) . '/',\n __('Edit Page Configuration'),\n 'button'\n )\n );\n\n $this->Form->setAttribute('class', 'columns');\n $this->Form->setAttribute('action', SYMPHONY_URL . '/blueprints/pages/' . $name . '/');\n\n $fieldset = new XMLElement('fieldset');\n $fieldset->appendChild(Widget::Input('fields[name]', $filename, 'hidden'));\n $fieldset->appendChild($label);\n //$fieldset->appendChild((isset($this->_errors['name']) ? Widget::Error($label, $this->_errors['name']) : $label));\n\n $label = Widget::Label(__('Body'));\n $label->appendChild(\n Widget::Textarea(\n 'fields[body]',\n 30,\n 100,\n $filename ? htmlentities(file_get_contents(WORKSPACE . '/pages/' . $filename), ENT_COMPAT, 'UTF-8') : '',\n array('id' => 'text-area', 'class' => 'code hidden')\n )\n );\n //$fieldset->appendChild((isset($this->_errors['body']) ? Widget::Error($label, $this->_errors['body']) : $label));\n\n $fieldset->appendChild($label);\n $this->Form->appendChild($fieldset);\n\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n new XMLElement('p', __('Saving')),\n array('id' => 'saving-popup')\n )\n );\n //$this->_context = array('edit', 'pages', 'single');\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n Widget::Input(\n 'action[save]',\n __('Save Changes'),\n 'submit',\n array('class' => 'button', 'accesskey' => 's')\n ),\n array('class' => 'actions')\n )\n );\n }", "public function renderLoadsHtml()\n {\n $steps = json_decode(file_get_contents($this->file), true);\n if (empty($_GET['operation'])) {\n $namespaces = $this->loadNamespaces($steps);\n\n $template = new Template();\n $template->assign('id', $this->id);\n $template->assign('file', realpath($this->file));\n $template->assign('section', 'sequence');\n $template->assign('resource', $this->getResourcePath());\n $template->assign('steps', json_encode($steps));\n $template->assign('namespaces', json_encode($namespaces));\n\n echo $template->fetch('sequence');\n } else {\n switch($_GET['operation']) {\n case 'delete':\n $steps = $this->remove($steps, $_GET['step']);\n }\n file_put_contents($this->file, json_encode($steps, JSON_PRETTY_PRINT));\n $namespaces = $this->loadNamespaces($steps);\n\n echo json_encode(['steps' => $steps, 'namespaces' => $namespaces]);\n }\n }", "public function render()\n\t{\n\t $templateFile = $this->template;\n\t $templateContents = $this->getTemplateContents($templateFile);\n\n\t $layout = $this->getTemplateLayout($templateContents);\n $arguments = $this->getTemplateArguments($templateContents);\n\n\t return $this->renderLayout(\n \t\t$layout, \n \t\tfunction () use ($templateFile) {\n\t\t $template = new Template($templateFile);\n\t\t return $template->render();\n\t \t},\n \t\t$arguments\n \t);\n\t}", "protected function writeMarkdownTemplate(): void\n {\n $path = $this->viewPath(\n str_replace('.', '/', $this->getView()).'.blade.php'\n );\n\n if (! $this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0755, true);\n }\n\n if ($file = file_get_contents(__DIR__.'/stubs/markdown.stub')) {\n $this->files->put($path, $file);\n }\n }", "public function index()\n {\n\n\t $template = storage_path('app/public/temp1.docx');\n\n \tif(file_exists($template)){\n \t\t$templateProcessor = new TemplateProcessor($template);\n\n $testData = array(\n array('List'=>'list 1'),\n array('List'=>'list 2'),\n array('List'=>'List 3')\n );\n\n\n\n // \t\t$testData = array(\n\t\t\t// array('Name'=>'Test Name 1', 'Value'=>123.45),\n\t\t\t// array('Name'=>'Test Name 2', 'Value'=>223.45),\n\t\t\t// array('Name'=>'Test Name 3', 'Value'=>323.45),\n\t\t\t// array('Name'=>'Test Name End', 'Value'=>423.45),\n\t\t\t// );\n\n // \t\t$t=$templateProcessor->cloneBlock('CLONEME', 3,true,true,$testData);\n\n // $t=$templateProcessor->cloneBlock('LI', 3,true,true,$testData);\n // $php = new PhpWord();\n \t\t// dd($t);\n \n $templateProcessor->setValue('Name','John Doe');\n \t\t$file=$templateProcessor->saveAs(public_path('w/h.docx'));\n dd($file);\n\n \t}\n \n\n \t\n }", "function getEditorTemplate($variables){\r\n \r\n if(!isset($variables[\"pxeditid\"])){\r\n $variables[\"pxeditid\"] = 'demo';\r\n }\r\n \r\n \\ob_start();\r\n while(list($key, $val) = each($variables)){\r\n $$key = $val;\r\n }\r\n \r\n include __DIR__ . \"/../../../template/editor.tpl.php\";\r\n $html = \\ob_get_clean();\r\n $html = preg_replace('~>\\s+<~', '><', $html);\r\n\r\n return $html;\r\n }", "public function plantilla(){\n # se usa este include para incluir la vista que contiene el codigo html\n include \"view/template.php\";\n\n }", "public function savetemplate()\n\t{\n\t\t// Get form data\n\t\t$template_name = ee()->input->get_post('template_name');\n\t\t$template = ee()->input->get_post('json-ld-template-final');\n\n\t\t// Write it to database\n\t\t$data = [\n\t\t\t'template_name' => $template_name,\n\t\t\t'template_text' => $template\n\t\t];\n\n\t\tee()->db->insert('exp_json_ld_templates', $data);\n\n\t\t// return index view\n\t\treturn $this->index();\n\t}", "static function leerTemplate($template) \n {\n if (!file_exists($template))\n return '';\n ob_start();\n include $template;\n $template = ob_get_contents();\n ob_end_clean();\n return $template;\n }", "function run()\n{\n include config('template_path').'/template.php';\n}", "public function loadTemplate()\n\t\t{\n\t\t}", "protected function content_template() {}", "protected function content_template() {}", "public function compile()\n\t{\n\t\tif ($this->dirty() and $this->compile)\n\t\t{\n\t\t\t$compiler = new Compiler($this, $this->app);\n\t\t\t$this->contents = $compiler->run();\n\t\t}\n\t}", "public function export_utemplate() {\n global $CFG;\n\n $fs = get_file_storage();\n $xmlfile = $fs->get_file_by_id($this->utemplateid);\n $filename = $xmlfile->get_filename();\n $content = $xmlfile->get_content();\n\n // echo '<textarea rows=\"10\" cols=\"100\">'.$content.'</textarea>';\n\n $templatename = clean_filename('temptemplate-' . gmdate(\"Ymd_Hi\"));\n $exportsubdir = \"mod_surveypro/templateexport\";\n make_temp_directory($exportsubdir);\n $exportdir = \"$CFG->tempdir/$exportsubdir\";\n $exportfile = $exportdir.'/'.$templatename;\n if (!preg_match('~\\.xml$~', $exportfile)) {\n $exportfile .= '.xml';\n }\n $this->templatename = basename($exportfile);\n\n $this->trigger_event('usertemplate_exported');\n\n header(\"Content-Type: application/download\\n\");\n header(\"Content-Disposition: attachment; filename=\\\"$filename\\\"\");\n header('Expires: 0');\n header('Cache-Control: must-revalidate,post-check=0,pre-check=0');\n header('Pragma: public');\n $xmlfile = fopen($exportdir.'/'.$this->templatename, 'w');\n print $content;\n fclose($xmlfile);\n unlink($exportdir.'/'.$this->templatename);\n }", "protected function compile()\n\t{\n\t\t$this->Template->anchor = standardize($this->headline) . '-' . $this->id;\n\t}", "function Template()\r\n\t{\r\n\t\t$this->out = \"\";\r\n\t\t$this->objs = array();\r\n\t\t$this->vars = array();\r\n\t\t$this->data = &$data;\r\n\t\t$this->use_getvar = false;\r\n\t}", "public function run()\n\t{\n\t\techo vsprintf($this->template,$this->_contents);\n\t}", "protected function buildContents() : string {\n\n\t\t\t$insertions = [];\n\n\t\t\t# Process blocks\n\n\t\t\tforeach ($this->blocks as $name => $block) {\n\n\t\t\t\t$insertions['{ block:' . $name . ' / }'] = $block->getContents();\n\t\t\t}\n\n\t\t\t# Process loops\n\n\t\t\tforeach ($this->loops as $name => $loop) {\n\n\t\t\t\t$insertions['{ for:' . $name . ' / }'] = $loop->getContents();\n\t\t\t}\n\n\t\t\t# Process widgets\n\n\t\t\tforeach ($this->widgets as $name) {\n\n\t\t\t\t$widget = Template::getWidget($name);\n\n\t\t\t\t$contents = ((false !== $widget) ? $widget->getContents() : '');\n\n\t\t\t\t$insertions['{ widget:' . $name . ' / }'] = $contents;\n\t\t\t}\n\n\t\t\t# Process variables\n\n\t\t\tforeach ($this->variables as $name => $value) {\n\n\t\t\t\t$value = ((false === $value) ? Template::getGlobal($name) : $value);\n\n\t\t\t\t$insertions['$' . $name . '$'] = Str::formatOutput($value);\n\t\t\t}\n\n\t\t\t# Process phrases\n\n\t\t\tforeach ($this->phrases as $name => $value) {\n\n\t\t\t\t$value = Language::get($name);\n\n\t\t\t\t$insertions['%' . $name . '%'] = Str::formatOutput($value);\n\t\t\t}\n\n\t\t\t# Process insertions\n\n\t\t\t$contents = str_replace(array_keys($insertions), array_values($insertions), $this->contents);\n\n\t\t\t# ------------------------\n\n\t\t\treturn $contents;\n\t\t}", "function tbt_ws_template_test(){\r\n\t\r\n\t// get template number and page A or B\r\n\t$tm_number=$_POST['tm_nb'];\r\n\t$tm_page=$_POST['tm_pg'];\r\n\t\r\n\t// get name of the files\r\n\t$ws_page=get_home_path().\"_main/_web_st/templates/\".$tm_number.\"/page_\".$tm_page.\".html\";\r\n\t$css_page=get_home_path().\"_main/_web_st/templates/\".$tm_number.\"/ws_css.css\";\r\n\t$js_page=get_home_path().\"_main/_web_st/templates/\".$tm_number.\"/ws_js.js\";\r\n\t\r\n\t// header files only on one page\r\n\t$html_head_code=($tm_page==\"a\")?\"<style type='text/css'>\".file_get_contents($css_page).\"</style><script type='text/javascript'>\".file_get_contents($js_page).\"</script>\":\"\";\r\n\t// get files's content and put all together\r\n\t$html_code=$html_head_code.file_get_contents($ws_page);\r\n\r\n\t// page sets\r\n\tswitch ($tm_page){\r\n\t\tcase \"a\":\r\n\t\t\t$html_code=str_replace( \"[event_code]\",tbt_ws_event(), $html_code);\r\n\t\tbreak;\r\n\t\tcase \"b\":\r\n\t\t\t$h1_head=\"company\";\r\n\t\t\t$h4_head=\"servizi informatici\";\r\n\t\t\t$phone=\"888888\";\r\n\t\t\t$email=\"[email protected]\";\r\n\t\t\t$address=\"V. E.de Nicola 14<br>46028 - Sermide\";\r\n\t\t\t$open_hours=\"lun/ver 8:30-12:30 15:00-18:00<br>sab 8:30-12:30 \";\r\n\t\t\t$adress_coords=\"45.0011737,11.2948665\";\r\n\r\n\t\t\t// insert data\r\n\t\t\t$html_code=str_replace( \"[address_coords]\",$address_coords, $html_code);\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tbreak;\r\n\r\n\t}\r\n\t\r\n\t\r\n\techo $html_code;\r\n\tdie();\r\n}", "public function generate()\n {\n # Build teh Header\n $this->buildHeader();\n\n # Switch the Views\n switch ($this->view) {\n case 'day':\n $this->buildBodyDay();\n break;\n case 'week':\n $this->buildBodyWeek();\n break;\n default:\n $this->buildBody();\n break;\n }\n # return thr string\n return $this->html;\n }", "protected function latteView()\n {\n $latte = new Engine();\n \n try {\n $latte->render(__DIR__ . '/../View/' . $this->view . '.latte', $this->latteParameters);\n } catch (\\RuntimeException $exception) {\n //File not found\n echo '[Error] Work in progress.';\n }\n }", "public function compile($path = null)\n {\n if ($path) {\n $this->setPath($path);\n }\n\n $templateTokens = $this->tokenize($this->getFileSource($this->getPath()));\n\n $this->root = new Document(null, $templateTokens, $this);\n\n if($this->isExpired($path)) {\n $this->files->put($this->getCompiledPath($this->getPath()), serialize($this->root));\n }\n }", "function renderTemplate($tID, $values, $blocks){\n\t\t $GLOBALS['extra_css'] = array_unique($GLOBALS['extra_css']);\n\t\t $GLOBALS['extra_js'] = array_unique($GLOBALS['extra_js']);\n\t\t //get the template\n\t\t $this->baseReplaces['extra_css'] = $this->renderCss($GLOBALS['extra_css']);\n $this->baseReplaces['extra_js'] = $this->renderJs($GLOBALS['extra_js']);\n\t\t\t\n $this->baseReplaces['working_dir'] = $GLOBALS['working_dir']; // add as late as possible because connector will set it very late\n// \t\t\techo $GLOBALS['working_dir'];\n $values = array_merge($values, $this->baseReplaces);\n\t\t\t\n\t\t\t\n\t\t\t//do the parsing\n\t\t\tif(!isset($this->fh)) $this->fh = $this->sp->fh;\n\n\t\t\tif($this->settings->render_cache_level == 1){\n\t\t\t\tif(!isset($this->phpTemplateCache[$tID])) {\n\t\t\t\t\t$cacheName = str_replace('/', '_', $tID);\n\t\t\t\t\t$cacheName = explode('.', $cacheName);\n\t\t\t\t\t$cacheName = $this->fh->getPath($this->settings->render_cache_folder.'/'.$cacheName[0].'.php');\n\t\t\t\t\tif(!file_exists($cacheName)){\n\t\t\t\t\t\t$tpl = $this->getRawTemplate($tID);\n\t\t\t\t\t\t$ca = fopen($cacheName, 'w');\n\t\t\t\t\t\t$tpl = str_replace('\\'', '\\\\\\'', $tpl);\n\t\t\t\t\t\t$tpl = $this->replaceValues($tpl, array());\n\t\t\t\t\t\t$tpl = $this->replaceDynamics($tpl, array(), $tID);\n\t\t\t\t\t\t$tpl = $this->parseServiceTags($tpl);\n\t\t\t\t\t\t/*fwrite($ca, '<?php $this->phpTemplateCache[\\''.$tID.'\\'] = create_function(\\'$values, $blocks\\', \\'return \\\\\\''.addcslashes($tpl, '\\'\\\\').'\\\\\\';\\');?>');*/\n\t\t\t\t\t\tfwrite($ca, '<?php use at\\foundation\\core; $this->phpTemplateCache[\\''.$tID.'\\'] = \\'render_'.str_replace('/', '_', $tID).'\\'; function render_'.str_replace('/', '_', $tID).'($values, $blocks){ return \\''.$tpl.'\\';}?>');\n\t\t\t\t\t\tfclose($ca);\n\t\t\t\t\t}\n\t\t\t\t\trequire_once($cacheName);\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$tpl = call_user_func($this->phpTemplateCache[$tID], $values, $blocks);\t\n\t\t\t} else {\n\t\t\t\t$tpl = $this->getRawTemplate($tID);\n\t\t\t\t$tpl = $this->replaceValues($tpl, $values);\n\t\t\t\t$tpl = $this->replaceDynamics($tpl, $blocks, $tID);\n\t\t\t\t$tpl = $this->cleanDynamics($tpl);\n\t\t\t\t$tpl = $this->parseServiceTags($tpl);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $tpl;\n\t\t}", "public function htmlOutput()\n {\n $arrayOfLattes = glob('template/*.latte');\n if ($arrayOfLattes === false) {\n return 'No templates found.';\n }\n $found = []; // translations found in latte templates\n foreach ($arrayOfLattes as $file) {\n $tempFileContents = file_get_contents($file);\n Assert::string($tempFileContents);\n preg_match_all('~\\{=(\"([^\"]+)\"|\\'([^\\']+)\\')\\|translate\\}~i', $tempFileContents, $matches);\n $found = array_merge($found, $matches[2]);\n }\n $found = array_unique($found);\n $output = '<h1><i class=\"fa fa-globe\"></i> ' . $this->tableAdmin->translate('Translations')\n . '</h1><div id=\"agenda-translations\">'\n . '<form action=\"\" method=\"post\" onsubmit=\"return confirm(\\''\n . $this->tableAdmin->translate('Are you sure?') . '\\')\">'\n . Tools::htmlInput('translations', '', 1, array('type' => 'hidden'))\n . Tools::htmlInput('token', '', end($_SESSION['token']), 'hidden')\n . Tools::htmlInput('old_name', '', '', array('type' => 'hidden', 'id' => 'old_name'))\n . '<table class=\"table table-striped\"><thead><tr><th style=\"width:'\n . intval(100 / (count($this->tableAdmin->TRANSLATIONS) + 1)) . '%\">'\n . Tools::htmlInput('one', '', false, 'radio') . '</th>';\n $translations = $keys = [];\n $localisation = new L10n($this->prefixUiL10n, $this->tableAdmin->TRANSLATIONS);\n foreach ($this->tableAdmin->TRANSLATIONS as $key => $value) {\n $output .= \"<th>$value</th>\";\n $translations[$key] = $localisation->readLocalisation($key);\n $keys = array_merge($keys, array_keys($translations[$key]));\n }\n $output .= '</tr></thead><tbody>' . PHP_EOL;\n $keys = array_unique($keys);\n natcasesort($keys);\n foreach ($keys as $key) {\n $output .= '<tr><th>'\n . Tools::htmlInput('one', '', $key, array('type' => 'radio', 'class' => 'translation')) . ' '\n . Tools::h((string) $key) . '</th>';\n foreach ($this->tableAdmin->TRANSLATIONS as $code => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"tr[$code][$key]\",\n '',\n Tools::set($translations[$code][$key], ''),\n ['class' => 'form-control form-control-sm', 'title' => \"$code: $key\"]\n ) . '</td>';\n }\n $output .= '</tr>' . PHP_EOL;\n if ($key = array_search($key, $found)) {\n unset($found[$key]);\n }\n }\n $output .= '<tr><td>' . Tools::htmlInput(\n 'new[0]',\n '',\n '',\n ['class' => 'form-control form-control-sm', 'title' => $this->tableAdmin->translate('New record')]\n ) . '</td>';\n foreach ($this->tableAdmin->TRANSLATIONS as $key => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"new[$key]\",\n '',\n '',\n ['class' => 'form-control form-control-sm',\n 'title' => $this->tableAdmin->translate('New record') . ' (' . $value . ')']\n ) . '</td>';\n }\n $output .= '</tr></tbody></table>\n <button name=\"translations\" type=\"submit\" class=\"btn btn-secondary\"><i class=\"fa fa-save\"></i> '\n . $this->tableAdmin->translate('Save') . '</button>\n <button name=\"delete\" type=\"submit\" class=\"btn btn-secondary\" value=\"1\"><i class=\"fa fa-dot-circle\"></i>\n <i class=\"fa fa-trash\"></i> ' . $this->tableAdmin->translate('Delete') . '</button>\n <fieldset class=\"d-inline-block position-relative\"><div class=\"input-group\" id=\"rename-fieldset\">'\n . '<div class=\"input-group-prepend\">\n <button class=\"btn btn-secondary\" type=\"submit\"><i class=\"fa fa-dot-circle\"></i> '\n . '<i class=\"fa fa-i-cursor\"></i> ' . $this->tableAdmin->translate('Rename') . '</button>\n </div>'\n . Tools::htmlInput('new_name', '', '', ['class' => 'form-control', 'id' => 'new_name'])\n . '</div></fieldset>\n </form></div>' . PHP_EOL;\n $output .= count($found)\n ? ('<h2 class=\"mt-4\">' . $this->tableAdmin->translate('Missing translations in templates') . '</h2><ul>')\n : '';\n foreach ($found as $value) {\n $output .= '<li><code>' . Tools::h($value) . '</code></li>' . PHP_EOL;\n }\n $output .= count($found) ? '</ul>' : '';\n return $output;\n }", "protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore \n\t\t$this->content_template();\n\t}", "function transformFile($filePath)\n{\n return transformDOM(loadTemplateFile($filePath));\n}", "private static function html()\n {\n $files = ['Html', 'Form'];\n $folder = static::$root.'Html'.'/';\n\n self::call($files, $folder);\n }", "private function initializeTemplate() {\n\t\t$this->doc = t3lib_div::makeInstance('bigDoc');\n\t\t$this->doc->backPath = $GLOBALS['BACK_PATH'];\n\t\t$this->doc->docType = 'xhtml_strict';\n\t\t$this->doc->styleSheetFile2\n\t\t\t= '../typo3conf/ext/realty/BackEnd/BackEnd.css';\n\n\t\t$this->template\n\t\t\t= tx_oelib_TemplateRegistry::getInstance()->getByFileName(\n\t\t\t\t'EXT:realty/BackEnd/mod_template.html'\n\t\t);\n\t}", "public function compile($path)\n {\n $contents = $this->compileString($this->files->get($path));\n\n if (!is_null($this->cachePath)) {\n $this->files->put(\n $this->getCompiledPath($path),\n $this->compress ? $this->html_compress($contents) : $contents\n );\n }\n }", "function __toString(){\n\n $contenu = file_get_contents($this->template.\"/index.twig\");\n \n //foreach($this->personnalisations as $key=>$value){\n // $contenu = str_replace(\"{{ $key }}\",$value, $contenu);\n //}\n\n //on a pas besoin de sortir du dossier classes car il prend le html a la source\n\n return $contenu;\n\n }", "function outputHTML($mode=1,$save=\"invoice.html\"){\n\t// PARAM $mode : 1 = show in browser\n\t// 2 = force download (provide the file name in $save)\n\t// 3 = save on server (provide the absolute path and file name in $save)\n\t// $save : output filename\n\n\t\t// LOAD TEMPLATE FILE\n\t\t$file = $this->path_template . \"HTML\" . DIRECTORY_SEPARATOR . $this->template . \".php\";\n\t\tif (!file_exists($file)) { die(\"$file not found.\"); }\n\t\t$this->data = \"\";\n\t\trequire $file;\n\n\t\t// OUTPUT\n\t\tswitch ($mode) {\n\t\t\t// OUTPUT ON SCREEN\n\t\t\tdefault: case 1:\n\t\t\t\techo $this->data;\n\t\t\t\tbreak;\n\n\t\t\t// FORCE DOWNLOAD\n\t\t\tcase 2:\n\t\t\t\t$this->outputDown($save, strlen($this->data));\n\t\t\t\techo $this->data;\n\t\t\t\tbreak;\n\n\t\t\t// SAVE TO FILE ON SERVER\n\t\t\tcase 3:\n\t\t\t\t$stream = @fopen($save, 'w');\n\t\t\t\tif (!$stream) {\n\t\t\t\t die(\"Error opening the file \" . $save);\n\t\t\t\t} else {\n\t\t\t\t fwrite($stream, $this->data);\n\t\t\t\t if (!fclose($stream)) { die(\"Error closing \".$save); }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function generate()\r\n {\r\n $loader = new ContentLoader($this->_viewVariables);\r\n $loader->initContent($this->_contentViewPath);\r\n $this->_layout = $loader->initLayout($this->_layoutPath);\r\n echo $this->_layout;\r\n }", "protected function compile()\n\t{\n#\t\t$objArchive = new \\ZipWriter('system/tmp/'. $strTmp);\n\t\tif(\\Input::Get('download') && FE_USER_LOGGED_IN)\n\t\t{\n\t\t\t$objDownload = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE id=?\")->execute(\\Input::Get('download'));\n\t\t\t$objFile = \\FilesModel::findByUuid($objDownload->fileSRC);\n\n\t\t\t$this->sendFileToBrowser($objFile->path);\n\t\t}\n\n\t\t$objPage = \\PageModel::findById($GLOBALS['objPage']->id);\n\t\t$strUrl = $this->generateFrontendUrl($objPage->row(), '/download/%s');\n\n\t\t$objCategory = $this->Database->prepare(\"SELECT * FROM tl_download_category WHERE alias=?\")->execute(\\Input::Get('category'));\n\t\t$objArchiv = $this->Database->prepare(\"SELECT * FROM tl_download_archiv WHERE id=?\")->execute($objCategory->pid);\n\n\t\t$objData = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE pid=? && published=1 ORDER BY sorting ASC\")->execute($objCategory->id);\n\t\twhile($objData->next())\n\t\t{\n\t\t\t$objItem = (object) $objData->row();\n\n#\t\t\t$objItem->archiv = $objArchiv->title;\n#\n#\t\t\tif($objCategory->singleSRC)\n#\t\t\t{\n#\t\t\t\t$objItem->archivIcon = \\FilesModel::findByUuid($objCategory->singleSRC)->path;\n#\t\t\t}\n#\n#\t\t\t$objItem->category = $objCategory->title;\n#\t\t\t$objItem->singleSRC = deserialize($objItem->singleSRC);\n#\n#\t\t\t$arrImages = array();\n#\t\t\tif(is_array($objItem->singleSRC))\n#\t\t\t{\n#\t\t\t\tforeach($objItem->singleSRC as $image)\n#\t\t\t\t{\n#\t\t\t\t\t$arrImages[] = (object) array\n#\t\t\t\t\t(\n#\t\t\t\t\t\t'css' => '',\n#\t\t\t\t\t\t'path' => \\FilesModel::findByUuid($image)->path\n#\t\t\t\t\t);\n#\t\t\t\t}\n#\n#\t\t\t\t$arrImages[0]->css = 'first';\n#\t\t\t}\n#\n#\n#\t\t\tif(FE_USER_LOGGED_IN)\n#\t\t\t{\n#\t\t\t\t$objItem->url = sprintf($strUrl, $objItem->id);\n#\t\t\t\t$objItem->css = 'active';\n#\t\t\t\t$objItem->preview = $arrImages;\n#\t\t\t}\n#\t\t\telse\n#\t\t\t{\n#\t\t\t\t$objItem->css = 'inactive';\n#\t\t\t\t$objItem->preview = array($arrImages[0]);\n#\n#\t\t\t}\n\n\t\t\t$arrData[] = $objItem;\n\t\t}\n\n#\t\tif(!count($arrDaata)) { $arrData = array(); }\n\n\t\t$this->Template->items = $arrData;\n\t}", "protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore\n\t\t$this->content_template();\n\t}", "public static function run()\r\n\t{\r\n\t\t$finder = new Finder;\r\n\r\n\t\t$dir = base_path() . Config::get('jst::source_dir');\r\n\r\n\t\tif (!file_exists($dir)) {\r\n\t\t\tthrow new \\Exception('The source directory does not exist. Please check your configuration.');\r\n\t\t}\r\n\r\n\t\t$jst = array();\r\n\r\n\t\t$files = iterator_to_array($finder->files()->in($dir), false);\r\n\t\t\r\n\t\t$template_func = '_.template';\r\n \r\n\t\t$js = '';\r\n\t\t$js .= \"var JST = JST || {};\\n\";\r\n\r\n\t\tif (count($files)) {\r\n\t\t\tforeach ($files as $file) {\r\n\t\t\t\t$contents = str_replace(array(\"\\n\",\"'\"), array('\\n',\"\\'\"), $file->getContents());\r\n\t\t\t\t\t\r\n\t\t\t\t$js .= sprintf(\"JST['%s/%s'] = %s('%s');\\n\", Config::get('jst::source_prefix'), $file->getRelativePathname(), $template_func, $contents);\t\t\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$output_filename = base_path() . Config::get('jst::dest_dir') . '/' . Config::get('jst::output_filename');\r\n\t\t\r\n\t\tif (!file_put_contents($output_filename, $js)) {\r\n\t\t\tthrow new \\Exception(\"Could not write JST file to $output_filename. Check the permissions, perhaps?\");\r\n\t\t}\r\n\r\n\t}", "public function render() {\n\t\tob_start();\n\n\t\t$this->resolve_template();\n\n\t\treturn ob_get_clean();\n\t}", "protected function render_template()\n {\n }", "protected function render_template()\n {\n }", "protected function render_template()\n {\n }", "protected function render_template()\n {\n }", "public function Render(){\r\n\t\treturn str_replace(\r\n\t\t\tarray(\r\n\t\t\t\t'{{OUTPUT}}',\r\n\t\t\t\t'{{JS}}',\r\n\t\t\t\t'{{CSS}}',\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t// The structure\r\n\t\t\t\t$this->root_entity->Render(),\r\n\t\t\t\t// Javascript\r\n\t\t\t\tfile_get_contents( realpath( dirname( __FILE__ ) . '/../js/explorer.js' ) ),\r\n\t\t\t\t// CSS\r\n\t\t\t\tfile_get_contents( realpath( dirname( __FILE__ ) . '/../css/explorer.css' ) )\r\n\t\t\t),\r\n\t\t\t// The HTML template\r\n\t\t\tfile_get_contents( realpath( dirname( __FILE__ ) . '/../html/template.html' ) )\r\n\t\t);\r\n\t}", "function Template()\r\n\t{\t\t\r\n\t\tglobal $_REQUEST;\t\t\r\n\t\t$theme = $this->theme;\r\n\t\t/*** Get Template By Page Id ***/\r\n\t\t$file = $this->get_template();\r\n\t\t\r\n\t\tif($_SETTINGS['debug'] == 1){\r\n\t\t\techo \"TEMPLATE: \".$file.\" <Br>\";\r\n\t\t}\r\n\t\t\r\n\t\t$websitepath = $this->website_path;\r\n\t\t//die(\"FILE: $file\");\r\n\t\t//exit();\r\n\t\tinclude''.$_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$file.'';\r\n\t}", "function compile_html () {\n\t //here go the subtags & attributes\n \n //see if we can make a coffee script compiler\n \n if (file_exists (dirname(__FILE__).\"/coffeescript/Init.php\")) {\n require_once dirname(__FILE__).\"/coffeescript/Init.php\";\n Coffeescript\\Init::load();\n $this->content = CoffeeScript\\Compiler::compile($this->get_content(), array(\"filename\"=>\"test.coffee\", \"bare\" => true));\n }\n else {\n $this->content = $this->get_content(); \n }\n \n \n $html = \"\"; \n\t $attributes = \"\";\n $this->openingtag = $this->get_openingtag();\n $this->closingtag = $this->get_closingtag();\n $this->attributes = $this->get_attributes();\n $this->childrenElements = $this->get_childrenElements();\n \n\t foreach ($this->attributes as $aid => $avalue) {\n\t foreach ($avalue as $vkey => $value) {\n\t $attributes .= \" {$vkey}=\\\"{$value}\\\"\";\n\t\t}\n\t }\n\t \n\t if ( strpos($this->openingtag, \"[content]\") !== false ) {\n\t $openingtag = str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $openingtag = str_replace (\"[content]\", $this->content, $openingtag );\n\t $html .= $openingtag;\n\t } \n\t else {\n\t $html .= str_replace (\"[attributes]\", $attributes, $this->openingtag);\n\t $html .= $this->content;\n\t }\n\t \n\t foreach ($this->childrenElements as $childid => $element) {\n\t $html .= $element->compile_html();\n\t }\n\t \n\t \n\t if ($this->closingtag != \"\") { \n\t $html .= str_replace (\"[attributes]\", $attributes, $this->closingtag);\n\t }\n\t \n\t return $html;\n }", "function output($template) {\n\n\t\tglobal $polarbear_u, $polarbear_a;\n\t\t$isOk = false;\n\n\t\tif ($this->isPublished()) {\n\t\t\t$isOk = true;\n\t\t} else if ($this->getStatus()==\"preview\" && is_object($polarbear_u) && $polarbear_u->isAdmin()) {\n\t\t\t$isOk = true;\n\t\t}\n\t\t\n\t\tif ($isOk == false) {\n\t\t\treturn '';\n\t\t}\n\t\t$dwoo = new Dwoo();\n\t\t$dwoo->setCompileDir(POLARBEAR_STORAGEPATH . 'dwoo');\n\t\t$data = new Dwoo_Data(); \n\t\t$tpl = new Dwoo_Template_String($template);\n\n\t\t// add variables\n\t\t$data->assign('id', $this->getId());\n\t\t$data->assign('titleArticle', htmlspecialchars($this->getTitleArticle(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('titleArticleRaw', $this->getTitleArticle());\n\t\t$data->assign('titlePage', htmlspecialchars($this->getTitlePage(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('titleNav', htmlspecialchars($this->getTitleNav(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('href', $this->href());\n\t\t$data->assign('hrefFull', $this->hrefFull());\n\t\t$data->assign('fullPageTitle', $this->fullPageTitle());\n\t\t$data->assign('teaser', $this->getTeaser());\n\t\t$data->assign('teaserNoTags', strip_tags($this->getTeaser()));\n\t\t$data->assign('hasTeaser', $this->hasTeaser());\n\t\t$data->assign('body', $this->getBody());\n\t\t$data->assign('bodyNoTags', strip_tags($this->getBody()));\n\t\t$data->assign('hasBody', $this->hasBody());\n\t\t$data->assign('datePublish', $this->getDatePublish());\n\t\t$data->assign('dateChanged', $this->getDateChanged());\n\t\t$data->assign('metaDescription', trim($this->getMetaDescription()));\n\t\t$data->assign('metaKeywords', trim($this->getMetaKeywords()));\n\n\t\tif ($this->getStatus()==\"preview\") {\n\t\t\t// no edit icons in preview mode\n\t\t} else {\n\t\t\t$data->assign('edit', $this->getEditString());\n\t\t\t$data->assign('editPrio', $this->getEditPrioString());\n\t\t\t$data->assign('editAdd', $this->getEditAddString());\n\t\t\t$data->assign('editAddChild', $this->getEditAddChildString());\n\t\t}\n\n\t\t$SEOMetaTags = \"\";\n\t\tif (trim($this->getMetaDescription())) {\n\t\t\t$SEOMetaTags .= '<meta name=\"description\" content=\"' . htmlspecialchars(trim($this->getMetaDescription()), ENT_COMPAT, \"UTF-8\") . '\" />';\n\t\t}\n\t\tif (trim($this->getMetaKeywords())) {\n\t\t\t$SEOMetaTags .= '<meta name=\"keywords\" content=\"' . htmlspecialchars(trim($this->getMetaKeywords()), ENT_COMPAT, \"UTF-8\") . '\" />';\n\t\t}\n\t\t$data->assign('SEOMetaTags', $SEOMetaTags);\n\n\t\t// $isCurrentArticle, good for using i lists\n\t\t$isCurrentArticle = false;\n\t\tif ($polarbear_a && $polarbear_a->getId() == $this->getId()) {\n\t\t\t$isCurrentArticle = true;\n\t\t}\n\t\t$data->assign('isCurrentArticle', $isCurrentArticle);\n\t\t\n\n\t\t// fetch parent so vi easily can check if current article is child of some article\n\t\t// todo: since these are the same as for the current article maybe we could make a wrapper for it.. somehow\n\t\t$parentA = PolarBear_Article::getInstance($this->parentID);\n\t\t$data->assign('parentId', $parentA->getId());\n\t\t$data->assign('parentTitleArticle', htmlspecialchars($parentA->getTitleArticle(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('parentTitlePage', htmlspecialchars($parentA->getTitlePage(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('parentTitleNav', htmlspecialchars($parentA->getTitleNav(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('parentHref', $parentA->href());\n\t\t$data->assign('parentHrefFull', $parentA->href());\n\t\t$data->assign('parentFullPageTitle', $parentA->fullPageTitle());\n\t\t$data->assign('parentTeaser', $parentA->getTeaser());\n\t\t$data->assign('parentHasTeaser', $parentA->hasTeaser());\n\t\t$data->assign('parentBody', $parentA->getBody());\n\t\t$data->assign('parentHasBody', $parentA->hasBody());\n\t\t$data->assign('parentDatePublish', $parentA->getDatePublish());\n\t\t$data->assign('parentDateChanged', $parentA->getDateChanged());\n\t\t$data->assign('parentMetaDescription', $parentA->getMetaDescription());\n\t\t$data->assign('parentMetaKeywords', $parentA->getMetaKeywords());\n\n\t\t$fieldValues = $this->fieldValues();\n\t\t$data->assign('fields', $fieldValues);\n\t\t\n\t\t$out = $dwoo->get($tpl, $data);\n\t\t$out = pb_event_fire(\"article_output\", array(\"article\" => $this, \"output\" => $out));\n\t\t$out = $out[\"output\"];\n\n\t\t#pb_pqp_log_speed(\"article output()\");\n\n\t\treturn $out;\n\t}", "public function build() {\n $pref = new Pref(\"system\");\n $this->setMainTemplate($pref->template);\n\n\n if ($this->data['url']['application'] == \"admin\")\n $tpl = new Template(PATH_SITEADMIN_TEMPLATES);\n else\n $tpl = new Template(PATH_TEMPLATES);\n if (!USER_ID && !$this->isAllowed())\n header(\"location: \" . page(\"user\", \"login\"));\n\n if (!USER_ID && $this->isAllowed())\n $tpl->login = true;\n else\n $tpl->login = false;\n $tpl->loadFile(\"template.php\");\n $tpl->data = $this->data;\n $tpl->build();\n }", "public function pagina(){\r\n include\"vies/template.php\";\r\n }", "public function run()\n {\n \\App\\Model\\TemplateLib::create([\n 'name' => 'FNK Test',\n 'stylesheet' => 'body {background:white};',\n 'javascript' => '',\n 'code_header' => $this->codeHeader,\n 'code_footer' => $this->codeFooter,\n 'code_index' => $this->codeIndex,\n 'code_search' => '<h1>saya di search</h1>',\n 'code_category' => '<h1>saya di category</h1>',\n 'code_page' => $this->codePage,\n 'code_post' => $this->codePost,\n 'code_about' => '<h1>saya di about</h1>',\n 'code_404' => '<h1>saya di 404</h1>',\n ]);\n }", "static function saveTemplate ($id,$name,$include,$interface,$html=\"\",$js=\"\",$css=\"\") {\n if (!Common::isEmpty($js) || !Common::isEmpty($css)) {\n $templatePath = \"template/\".Common::hash($id,false,false);\n file_put_contents(ResourcesModel::getResourcePath($templatePath, \"template.js\"), $js);\n file_put_contents(ResourcesModel::getResourcePath($templatePath, \"template.css\"), $css);\n }\n $id = Database::escape($id);\n $name = Database::escape($name);\n $include = Database::escape($include);\n $interface = Database::escape($interface);\n $html = Database::escape($html);\n $js = Database::escape($js);\n $css = Database::escape($css);\n Database::query(\"update t_template set template = '$include', name = '$name', interface = '$interface', html = '$html', js = '$js', css = '$css' where id = '$id'\");\n }", "function generateHtml($content)\n{\n $htmlFile = \"index.html\"; // generated html file name\n $f = fopen($htmlFile, 'w');\n\n// the html code injected to the html file\n\n $htmlData = \"\n<!doctype html>\n<html>\n<head><meta charset='utf-8'>\n<title>Address book</title>\n</head>\n<body>\n$content \n</body>\n</html>\n\";\n fwrite($f, $htmlData);\n fclose($f);\n}", "public function __toString()\n {\n $viewData = $this->variables;\n $templates = Context::getInstance()->getTemplates();\n if ($this->template != false) {\n $renderedTemplate = $templates->render($this->template, $viewData);\n $viewData['contents'] = $renderedTemplate;\n }\n if ($this->layout != false) {\n return $templates->render($this->layout, $viewData);\n }\n }" ]
[ "0.6645639", "0.6425443", "0.6419203", "0.634101", "0.6283008", "0.6145413", "0.612081", "0.61168337", "0.6092495", "0.6079933", "0.605958", "0.6041908", "0.6037524", "0.6027686", "0.60155994", "0.60021335", "0.5986662", "0.5959242", "0.5937195", "0.58969676", "0.5884751", "0.5874908", "0.58305216", "0.5829066", "0.5827496", "0.5815737", "0.5810912", "0.58059317", "0.58053434", "0.57970184", "0.5788246", "0.5783782", "0.57711315", "0.5755975", "0.5735942", "0.573462", "0.5734012", "0.57190174", "0.5718594", "0.5712124", "0.5695796", "0.56879586", "0.56824625", "0.5670815", "0.56669164", "0.56659865", "0.56510717", "0.5634806", "0.56333894", "0.56307936", "0.5608824", "0.5606862", "0.5605432", "0.5604782", "0.5597422", "0.5596362", "0.5596222", "0.55952865", "0.55900025", "0.55848426", "0.557995", "0.5566271", "0.5566271", "0.55538756", "0.5553834", "0.5551554", "0.55489844", "0.5545458", "0.5544195", "0.55425483", "0.55261296", "0.55232376", "0.55135745", "0.5509346", "0.55090314", "0.54992115", "0.54964787", "0.54943687", "0.549052", "0.5489468", "0.5486093", "0.54838884", "0.54795784", "0.5479112", "0.5478862", "0.54745466", "0.5473627", "0.5473414", "0.54731303", "0.54731303", "0.54731303", "0.54721737", "0.5461421", "0.5453935", "0.5452039", "0.5447045", "0.5443716", "0.54429024", "0.544234", "0.54423374", "0.5438258" ]
0.0
-1
Copy images to storage
public function copyImages();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function copyImages()\n {\n $media = [\n 'slider-woman-on-the-beach.jpg'\n ];\n\n $this->mediaMigration->copyMediaFiles($media, self::MIGRATION_MODULE, 'scandiweb/slider/s/l');\n }", "private function copyToStorage(Image $image) {\n \t$attrs = $image->attributesToArray();\n\t $this->command->info(\"Copying '{$attrs['path']}' to public folder\");\n \t$filePath = dirname(__FILE__).\"/Images/{$attrs['path']}\";\n \tStorage::put(\"public/images/{$attrs['id']}/{$attrs['path']}\", file_get_contents($filePath));\n }", "protected function copyImagesDirectory()\n\t{\n\t\t$params = $this->getParams();\n\n\t\tif ($params->path != '') {\n\t\t\t$date = JFactory::getDate()->toFormat('%Y%m%d');\n\n\t\t\t$src = JPATH_SITE.DS.'images';\n\t\t\t$dest = JPATH_SITE.DS.'images-backup-'.$date;\n\t\t\tJFolder::move($src, $dest);\n\n\t\t\t$src = $params->path.DS.'images';\n\t\t\t$dest = JPATH_SITE.DS.'images';\n\t\t\tJFolder::copy($src, $dest);\n\t\t}\n\t}", "public function archiveImages() {\n try {\n $destination = storage_path('archive/images/' . date('Y') . '/' . date('m') . '/' . date('d'));\n $directory = storage_path('video/images');\n $this->filesystem->copyDirectory($directory, $destination);\n\n } catch (\\Exception $e) {\n throw new ArchiveException('Error archive images: ' . $e->getTraceAsString());\n }\n }", "function storeImages()\n {\n }", "public function save()\n {\n $dir = $this->pathTmpImage;\n\n $files = scandir($dir);\n\n foreach ($files as $file) {\n if ($file == $_POST['image']) { \n copy($this->pathTmpImage . $file, $this->pathResult . $file);\n }\n }\n\n //$this->dbInsert($_POST['image']);\n\n unlink($this->pathTmpImage . $_POST['image']);\n }", "function __reimportPhotos(){\n\t\t$this->Asset->disablePermissionable();\n\t\t$this->Asset->recursive=0;\n\t\t$json = $this->Asset->find('all', array('fields'=>'json_src'));\n\t\t$json =Set::extract($json, '/Asset/json_src');\n\t\tforeach ($json as $row) {\n\t\t\t$imgSrc = json_decode($row);\n\t\t\t$src = \"Summer2009/\".basename($imgSrc->orig);\n\t\t\t$dest = $imgSrc->preview;\n\t\t\t$src_baseurl = Configure::read('path.local.preview');\n\t\t\t$dest_baseurl = Configure::read('stageroot.basepath');\n\t\t\t$shell_cmd[] =\"cp {$src_baseurl}/{$src} {$dest_baseurl}/{$dest}\";\n\t\t\t//\t\t\tmkdir(dirname(Configure::read('stageroot.basepath').\"/{$dest}\"), 0777, $recursive=true);\n\t\t\t//\t\t\tcopy( Configure::read('path.local.preview').\"/{$src}\", Configure::read('stageroot.basepath').\"/{$dest}\");\n\t\t}\n\t\tdebug($shell_cmd);\n\t}", "private function generate()\n {\n $originalImages = Storage::files(env('PHOTO_PATH'));\n\n foreach ($originalImages as $originalImage) {\n $pieces = explode('/', $originalImage);\n\n $exp = explode('.', end($pieces));\n\n $extension = end($exp);\n\n array_pop($exp);\n\n $imageId = implode('.', $exp);\n\n $photos = [];\n\n foreach ($this->dimensions as $key => $dimension) {\n $fileName = env('PHOTO_PATH_RESIZE') . \"{$imageId}_{$key}.$extension\";\n\n if (! Storage::exists($fileName)) {\n $img = Image::make(Storage::get($originalImage));\n $img->resize($dimension['width'], $dimension['height']);\n\n Storage::put($fileName, (string)$img->encode(), 'public');\n\n if (Storage::exists($fileName)) {\n $photos[$key] = asset(Storage::url($fileName));\n }\n }\n }\n\n /**\n * Save on Storage\n */\n if (count($photos)) {\n $photo = new Photo();\n $photo->name = $imageId;\n $photo->photos = $photos;\n $photo->photos = $photos;\n $photo->save();\n }\n }\n }", "protected function combineImages() {}", "function movesiteimages()\n\t{\n\t\n\t\tglobal $option, $mainframe;\n\n\t\t//we'll need access to the file system and we'll use the Joomla way to be all safe.\n\t\tjimport('joomla.filesystem.file');\n\t\n\t\t// define where the images are and where we want to put them\n\n\t\t$searchpath = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"masters\" ;\n\t\t$destpath = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_cirriculum\". DS . \"tmp\" ;\n\n\t\t//read all the image files and put them in an array.\n\t\t$img_files = JFolder::files($searchpath, '.*');\n\n\t\t//Now we need some stuff from the JFile:: class to move all files into the new folder\n\t\tforeach ($img_files as $file) {\n\t\t\tJFile::move($searchpath. DS . $file, $destpath . DS. $file);\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=' . $option, 'All images have moved into the site folder' );\n\t\n\t}", "protected function importLayoutImages_processCopiedImages(){\n\t\t\n\t\t\n\t\tforeach($this->arrImportImages as $key=>$arrImage){\n\t\t\t\n\t\t\t//get image ID\n\t\t\t$imageID = $this->insertAttachmentByImage($arrImage);\n\t\t\tif(empty($imageID))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t//update image id\n\t\t\t$arrImage[\"imageid\"] = $imageID;\n\t\t\t$this->arrImportImages[$key] = $arrImage;\n\t\t}\n\t\t\n\t}", "function _putimages() {\n parent::_putimages();\n $this->_putformxobjects();\n }", "function images_add_folder($image_data_url,$folder_name)\r\n{\r\n\t \r\n\t\r\n\t foreach($image_data_url as $file)\r\n {\r\n //get image contents\r\n $image = file_get_contents($file);\r\n\t\t\t\t\t $f_name=explode (\"?\",$file);\r\n\t\t\t\t $image_url=explode('/',$f_name[0]);\r\n $only_name=$image_url[count($image_url)-1];\r\n //put image contents\r\n file_put_contents($folder_name.\"/\".$only_name, $image);\r\n\t\t\t }\r\n}", "public function uploadImage($images)\n {\n foreach ($images as $image) {\n $extension = $image->getClientOriginalExtension();\n $file = $image->move('storage/', uniqid('img_') . '.' . $extension);\n $image = new ClinicImage(['path' => $file->getPathname()]);\n $this->images()->save($image);\n }\n }", "public function saveImage(Request $request){\n $x = explode('/', __DIR__);\n $path = [];\n for($i = 0; $i < count($x); $i++){\n if($x[$i] != 'app')\n array_push($path, $x[$i]);\n else\n break;\n }\n array_push($path, 'public', 'images', 'temp'. $request->ip(). '.jpg');\n $path = implode('/', $path);\n if(!file_exists($path)){\n fopen($path, 'w');\n }\n copy($request->image, $path);\n return response()->json(['code' => 200, 'message' => 'success', 'response' => $path])->header('Cache-control', 'no-cache');\n\n }", "public function processImages()\n \t{\n $this->save();\n if (! $this->errorMessage)\n \t\t parent::uploadImages('image', 'RecipeImage', \"recipeID\");\n \n \t}", "function upload_image2($images) {\n\n $image_urls = array();\n\n foreach ($images as $image) {\n $src_url = $image['src'];\n $dst_url = $image['dst'];\n $type = $image['image_type'];\n\n if($stored_url = upload_image($dst_url, $src_url)) {\n $image_urls[$type] = $stored_url;\n }\n }\n return $image_urls;\n}", "public static function PutImagesOnAnother($srcContainer,$srcImages,$dest,$alpha=false)\r\n {\r\n if(!is_array($srcImages)||empty($srcImages)|| $srcContainer=='' || $dest=='')\r\n return \"Check PutImagesOnAnother Function arguments\";\r\n // we will get the image type from extension. no hard work\r\n $ext=FileExtension($srcContainer);\r\n $background=Graphics::CreateImage($srcContainer); //this will be used as background \r\n if($background===-1)\r\n return \"<br> Image extension not supported ($ext).\";\r\n $containerWidth=ImageSX($background);\r\n $containerHeight=ImageSY($background);\r\n $container=ImageCreateTrueColor($containerWidth,$containerHeight); \r\n if($container===false)\r\n return \"<br> Image processing error on server.\";\r\n $black=ImageColorAllocate($container,255,255,255);\r\n imagefill($container,0,0,$black);\r\n ImageCopy($container,$background,0,0,0,0,$containerWidth,$containerHeight);\r\n\r\n imagealphablending($container,$alpha);\r\n $error='';\r\n foreach($srcImages as $aSrcImg)\r\n {\r\n if(!file_exists($aSrcImg['src']))\r\n {\r\n $error.=\"<br> image not found\".$aSrcImg['src'];\r\n continue;\r\n }\r\n\r\n $content=Graphics::CreateImage($aSrcImg['src']);\r\n if($content===-1)\r\n {\r\n $error.=\"<br> Image extension not supported ($ext).\".$aSrcImg['src'];\r\n continue;\r\n }\r\n if(!$content)\r\n {\r\n $error.=\"<br> Image processing error on server.\".$aSrcImg['src'];\r\n continue;\r\n }\r\n //all is well\r\n //x,y top of the img src to put on\r\n $x=0; //where to put?\r\n $y=0;\r\n $contentWidth=ImageSX($content);\r\n $contentHeight=ImageSY($content);\r\n //calculating position of top-left\r\n if(isset($aSrcImg['isCenter']) && $aSrcImg['isCenter']==true)\r\n {\r\n $x=Floor($containerWidth/2);\r\n $y=Floor($containerHeight/2);\r\n }\r\n else //do with x, y\r\n { \r\n if(isset($aSrcImg['x']))\r\n $x=$aSrcImg['x'];\r\n if(isset($aSrcImg['y']))\r\n $y=$aSrcImg['y'];\r\n }\r\n imagealphablending($content,$alpha); \r\n ImageCopy($container,$content,$x,$y,0,0,$contentWidth,$contentHeight);\r\n //ImageCopyMerge($container,$content,$x,$y,0,0,$contentWidth,$contentHeight,100);\r\n ImageDestroy($content);\r\n }\r\n if(Graphics::SaveImage($container,$dest,$ext))\r\n $error.=\"<br> Image Saved at $dest\";\r\n else $error.=\"<br> Image was not saved\";\r\n if($error=='')\r\n return true;\r\n return $error;\r\n\r\n\r\n }", "public function setImages(){\n\t\t// imagen destacada\n $this->thumbail_img = $this->getThumbnailImg();\n // imagenes\n $this->images = $this->getImages();\n\t}", "public function run()\n {\n Image::truncate();\n $data = [];\n for ($i = 1; $i <= 13; $i++) {\n $data[] = ['media_id' => 'pd-cover-' . $i . '.jpg'];\n $data[] = ['media_id' => 'pd-info-' . $i . '.jpg'];\n }\n\n Image::insert($data);\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'img' => 'required',\n ]);\n $file = $request->file('img');\n // $file = $request->file('img')->store('public/files');\n $img = Image::make($file)->fit(1096,1096);\n \n // paste another image \n $frame = Frame::latest()->value('frame');\n\n $theFrame = Storage::get($frame);\n \n $img->insert($theFrame);\n return $img->response('jpg');\n \n \n }", "public function run()\n {\n // Laptops\n for ($i = 1; $i <= 2000; $i++) {\n Image::create([\n 'product_id' => $i,\n 'file' => '1 - Copy (' . $i . ').jpg',\n ]);\n }\n\n }", "protected function saveImage()\n {\n if ( $this->initialImage != $this->image )\n {\n $this->deleteOldImage();\n\n $imageHandler= new CImageHandler();\n $imageHandler->load( $this->getTempFolder( TRUE ) . $this->image );\n $imageHandler->save($this->getImagesFolder( TRUE ) . $imageHandler->getBaseFileName() );\n\n $settings = $this->getThumbsSettings();\n\n if ( !empty( $settings ) )\n {\n $imageHandler= new CImageHandler();\n $imageHandler->load( $this->getTempFolder( TRUE ) . $this->image );\n\n foreach( $settings as $prefix => $dimensions )\n {\n list( $width, $height ) = $dimensions;\n $imageHandler\n ->thumb( $width, $height )\n ->save( $this->getImagesFolder( TRUE ) . $prefix . $imageHandler->getBaseFileName() );\n }\n }\n\n @unlink( $this->getTempFolder( TRUE ) . $this->image );\n }\n }", "public function copyFiles($destination);", "private function copyResources()\n {\n $sResourcesDirectory = $this->getViewRootDirectory();\n $sResourcesDirectory = substr($sResourcesDirectory, 0, strrpos($sResourcesDirectory, 'View'));\n $sResourcesDirectory .= 'Resources' . DIRECTORY_SEPARATOR;\n\n // copy css\n foreach (glob($sResourcesDirectory . 'css/*') as $sResourceFile) {\n $sCopyPath = WWW_PATH . substr($sResourceFile, strlen($sResourcesDirectory));\n Directory::create(dirname($sCopyPath));\n copy($sResourceFile, $sCopyPath);\n }\n\n // copy js\n foreach (glob($sResourcesDirectory . 'js/*') as $sResourceFile) {\n $sCopyPath = WWW_PATH . substr($sResourceFile, strlen($sResourcesDirectory));\n Directory::create(dirname($sCopyPath));\n copy($sResourceFile, $sCopyPath);\n }\n }", "public function set_images($files){\n\t\t$image_dir = \"{$GLOBALS['core_path']}/user_content/item_images/{$this->id}\";\n\t\t\n\t\tif (!file_exists($image_dir)){\n\t\t\tmkdir($image_dir, 0750);\n\t\t}\n\t\t\n\t\tforeach (glob(\"{$image_dir}/*.png\") as $existing){\n\t\t\tunlink($existing);\n\t\t}\n\t\t\n\t\tforeach ($files as $key => $image_file){\n\t\t\t$image = imagecreatefromstring(file_get_contents($image_file));\n\t\t\t\t\n\t\t\t$preview = self::resize_image($image, item_image::PREVIEW_WIDTH, item_image::PREVIEW_HEIGHT);\n\t\t\t$cover = self::resize_image($image, item_image::COVER_WIDTH, item_image::COVER_HEIGHT);\n\t\t\t$thumb = self::resize_image($image, item_image::THUMB_WIDTH, item_image::THUMB_HEIGHT);\n\t\t\t\t\n\t\t\timagepng($preview, \"{$image_dir}/{$key}_preview.png\", 9);\n\t\t\timagepng($cover, \"{$image_dir}/{$key}_cover.png\", 9);\n\t\t\timagepng($thumb, \"{$image_dir}/{$key}_thumb.png\", 9);\n\t\t\timagepng($image, \"{$image_dir}/{$key}_full.png\", 9);\n\t\t\t\t\n\t\t\timagedestroy($preview);\n\t\t\timagedestroy($cover);\n\t\t\timagedestroy($image);\n\t\t\timagedestroy($thumb);\n\t\t\t\t\n\t\t\tunlink($image_file);\n\t\t}\n\t}", "protected function _copyTempProductImages($tempImages) {\n\n $tempPath = config('front.temp_path');\n $productPath = config('front.product_path') . store()->id . '/';\n $images = [];\n\n if (count($tempImages)) {\n\n foreach ($tempImages as $k => $image) {\n\n $imageSize = [];\n\n if (check_file($tempPath . $image) && count($this->_productImgSizes)) {\n\n foreach ($this->_productImgSizes as $size) {\n\n $nameBySize = str_replace(_const('TOBEREPLACED'), \"_{$size}\", $image);\n if (copy($tempPath . $nameBySize, $productPath . $nameBySize)) {\n $imageSize[$size] = $nameBySize;\n }\n\n delete_file($tempPath . $nameBySize);\n }\n\n delete_file($tempPath . $image);\n }\n\n if (count($imageSize)) {\n $images[$k] = $imageSize;\n }\n }\n }\n\n return new Collection($images);\n }", "public function copy_image($image_id=null, $foreign_key=null) {\n\t // test function\n\t $this->Image->image_clone($image_id, $foreign_key);\n\t exit;\n }", "public function syncImages() {\r\n\r\n /** @var Mage_Catalog_Helper_Product_Flat $helper */\r\n $process = Mage::helper('catalog/product_flat')->getProcess();\r\n $status = $process->getStatus();\r\n $process->setStatus(Mage_Index_Model_Process::STATUS_RUNNING);\r\n\r\n // Fetch attribute set id by attribute set name\r\n /** @var $collection Mage_Catalog_Model_Resource_Product_Collection */\r\n $attributeSetId = Mage::getModel('eav/entity_attribute_set')\r\n ->load('Oodji', 'attribute_set_name')\r\n ->getAttributeSetId();\r\n\r\n $website = Mage::getResourceModel('core/website_collection')\r\n ->addFieldToFilter('code', 'oodji')\r\n ->getFirstItem();\r\n\r\n $storeId = Mage::app()->getStore(Mage::app()->getWebsite($website)->getDefaultGroup()->getDefaultStoreId())->getId();\r\n\r\n // Load product model collection filtered by attribute set id\r\n $products = Mage::getResourceModel('catalog/product_collection')\r\n ->setStoreId($storeId)\r\n ->addAttributeToSelect('name')\r\n ->addAttributeToSelect('sku')\r\n ->addAttributeToFilter('type_id', 'configurable')\r\n ->addFieldToFilter('attribute_set_id', $attributeSetId)\r\n ->addFieldToFilter('status', 2);\r\n\r\n $process->setStatus($status);\r\n\r\n // Process your product collection as per your bussiness logic\r\n /** @var Agere_PhotoGrabber_Helper_Grabber $grab */\r\n $grab = Mage::helper('photoGrabber/grabber');\r\n\r\n foreach($products as $product){\r\n $grab->searchProduct($product->getSku());\r\n }\r\n }", "private static function purgeImages() {\n self::purgeFiles(self::getInterimImageFolder(), self::$interim_image_expiry);\n }", "public function createImage()\n {\n $name = basename($this->absoluteUrl);\n if ($this->fileExists($this->absoluteUrl) && !in_array($name, $this->notAllowedNames)) {\n $mime = @exif_imagetype($this->absoluteUrl);\n if ($mime == IMAGETYPE_JPEG || $mime == IMAGETYPE_PNG || $mime == IMAGETYPE_GIF) {\n if (!file_exists($this->imageDirectory)) {\n mkdir($this->imageDirectory, 0700);\n }\n\n copy($this->absoluteUrl, $this->imageDirectory . DIRECTORY_SEPARATOR . $name);\n }\n }\n }", "public function test_images_are_stored_in_remote_storage_service()\n {\n $image_file = UploadedFile::fake()->image('selfie.png');\n \n $image_storage = $this->app->make(ImageStoreService::class);\n\n $response = $image_storage->store($image_file);\n\n $this->assertArrayHasKey('status', $response->json());\n $this->assertEquals('success', $response->json()['status']);\n $this->assertArrayHasKey('message', $response->json());\n $this->assertEquals('Image saved successfully.', $response->json()['message']);\n $this->assertArrayHasKey('url', $response->json());\n }", "private function fetchImages() {\n\t\ttry {\n\t\t\t\n\t\t\t$images = $this->getParam('fetcher',true);\n\t\t\t$images = explode(chr(13), $images);\n\t\t\tif (sizeof($images > 0)) {\n\n\t\t\t\tif (sizeof($images)==1 && $images[0]=='') {\n\t\t\t\t\tthrow new VCDInvalidInputException('Invalid input!');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Check if the screenshots folder already exist\n\t\t\t\t$destFolder = VCDDB_BASE.DIRECTORY_SEPARATOR.ALBUMS.$this->itemObj->getID().DIRECTORY_SEPARATOR;\n\t\t\t\tif (!$this->itemObj->hasScreenshots()) {\n\t\t\t\t\tif (!fs_is_dir($destFolder)) {\n\t\t\t\t\t\tfs_mkdir($destFolder, 0755);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($images as $image) {\n\t\t\t\t\tVCDUtils::grabImage(trim($image), false, $destFolder);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (!MovieServices::getScreenshots($this->itemObj->getID())) {\n\t\t\t\t\tMovieServices::markVcdWithScreenshots($this->itemObj->getID());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $ex) {\n\t\t\tVCDException::display($ex,true);\n\t\t}\n\t}", "public function fileStore($data)\n {\n $url = array();\n foreach ($data as $img) {\n $image = $img;\n $imageName = $image->getClientOriginalName();\n $image->move(storage_path('products/images'), $imageName);\n array_push($imageName,$url);\n // $imageUpload = new ImageUpload();\n // $imageUpload->filename = $imageName;\n // $imageUpload->save();\n }\n\n return $url;\n }", "public static function putImages($model, $images, $path, $type, $quantity)\n {\n $images = (array) $images;\n $number = $model->media()->get()->count();\n $difference = null;\n $limitedImgs = null;\n\n if($number < $quantity)\n {\n $difference = $quantity - $number;\n // dd($images);\n $limitedImgs = array_slice($images,0,$difference);\n\n foreach ($limitedImgs as $key => $image) \n {\n $img = Image::make($image->getRealPath());\n\n $img->resize(800, null, function ($constraint) {\n $constraint->aspectRatio();\n });\n $image_name = $key. '-' .time().'.'.$image->getClientOriginalExtension();\n\n /*\n ** check if directory exists\n ** if not, create it\n */\n $directory = public_path('/uploads/'. $path);\n if (!file_exists($directory)) \n {\n File::makeDirectory($directory, $mode = 0777, true, true); \n }\n if($directory)\n {\n /*\n ** Save image\n */\n $img->save(public_path('/uploads/'. $path . '/' .$image_name));\n }\n\n $model->media()->create([\n 'id' => (string) Uuid::generate(4),\n 'media_key' => $type,\n 'media_value' => $image_name,\n ]);\n }\n\n // $cover = $model->media()->where('image_key', 'cover')->first();\n\n // if(!$cover)\n // {\n // $model->media()->first()->update(['image_key' => 'cover']);\n // }\n \n }\n else{\n \\Session::flash('msg', trans('session.you_uploaded_max_img_number'));\n return back();\n }\n \n }", "public function storeImages(Request $request){\n $request->validate([\n 'file' => 'required|image|max:5120',\n 'producto' => 'required|exists:productos,id',\n ]);\n\n $images = $request->file('file')->store('public/imagenes');\n\n $url = Storage::url($images);\n $producto = $request->producto;\n\n Image::create([\n 'url' => $url,\n 'producto_id' => $producto\n ]);\n }", "function migrate_multisite_files_copy($source, $dest) \n{ \n\tglobal $files_copied;\n\t\n if (is_file($source)) { \n \t\n \t$dest_dir;\n \tif (is_dir($dest)) {\n\t \t$dest_dir = $dest;\n \t}\n \telse {\n\t \t$dest_dir = dirname($dest);\n \t}\n\n \t// ensure destination exists\n if (!file_exists($dest_dir)) { \n wp_mkdir_p($dest_dir); \n } \n \n //echo \"copy $source -> $dest<br />\";\n copy($source, $dest);\n $files_copied++;\n \n } elseif(is_dir($source)) { \n \n \t// if source is a directory, create corresponding \n \t// directory structure at destination location\n if ($dest[strlen($dest)-1]=='/') { \n if ('/' != $source[strlen($source)-1]) { \n $dest=path_join($dest , basename($source)); \n } \n }\n \n $dirHandle=opendir($source); \n while($file=readdir($dirHandle)) \n { \n if($file!=\".\" && $file!=\"..\") \n { \n \t// recursively copy each file\n $new_dest = path_join($dest , $file);\n $new_source = path_join($source , $file);\n \n //echo \"$new_source -> $new_dest<br />\"; \n migrate_multisite_files_copy($new_source, $new_dest); \n } \n } \n closedir($dirHandle); \n } \n}", "function import_osimages(){\n\t\techo $this->Azure->importOSImages();\n\t}", "public function run()\n {\n //\n DB::table('images')->insert([\n 'image_id' => '000117ade10eed8a3640b44a22de45ae',\n 'storage' => 'filesystem',\n 'image_name' => 'product-224.jpg',\n 'ident' => '/dd/6f/a8/3b64f08b8ffd0d91bcc34ad946f6d8972d2c435a.jpg',\n 'url' => 'public/images/dd/6f/a8/3b64f08b8ffd0d91bcc34ad946f6d8972d2c435a.jpg',\n 'l_ident' => '/2b/93/18/1e822e4dabd72328af949c7f8de4144b38296b44.jpg',\n 'l_url' => 'public/images/2b/93/18/1e822e4dabd72328af949c7f8de4144b38296b44.jpg',\n 'm_ident' => '/f5/5b/c0/c342e554895cf5983c744691a7cc6da1c61e0950.jpg',\n 'm_url' => 'public/images/f5/5b/c0/c342e554895cf5983c744691a7cc6da1c61e0950.jpg',\n 's_ident' => '/8d/93/c4/30bd17d4f0b91c5286eebbc6f4996610688af861.jpg',\n 's_url' => 'public/images/8d/93/c4/30bd17d4f0b91c5286eebbc6f4996610688af861.jpg',\n 'width' => 1204,\n 'height' => 800,\n 'watermark' => 1,\n 'last_modified' =>1442456037\n ]);\n }", "public function UploadPhotos(UploadRequest $request, $id)\n {\n\n $school = School::findOrFail($id);\n\n //Store image directory to the database\n foreach ($request->photos as $photo) {\n $imageName = $photo->getClientOriginalName();\n\n //remove non numbers characters\n $newname = preg_replace('~\\D~', '', $imageName);\n\n $newimagename = $newname . '.' .\"jpg\";\n \n\n\n //save image ImageData to DB\n // $newimagename = $photo->store('school_photos/'.$school->center_number.'/', $newimagename );\n SchoolPhoto::create([\n 'school_id' => $school->id,\n 'filename' => $newname\n ]);\n\n\n //Save the Image to Public Folder\n $photo->move(\n base_path() . '/public/school_photos/'.$school->center_number.'/', $newimagename\n );\n }\n\n\n\n}", "function merge_images($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct){\n $result = imagecreatetruecolor($src_w, $src_h);\n imagecopy($result, $dst_im, 0, 0, $dst_x, $dst_y, $src_w, $src_h);\n imagecopy($result, $src_im, 0, 0, $src_x, $src_y, $src_w, $src_h);\n imagecopymerge($dst_im, $result, $dst_x, $dst_y, 0, 0, $src_w, $src_h, $pct);\n}", "public function uploadImages($journal)\n {\n\n $img_nr = 0;\n foreach ($journal['images'] as $image_url => $image) {\n\n $date = $journal['date'];\n $ext = pathinfo($image_url, PATHINFO_EXTENSION);\n // had to add .jpg since the client will add the extension automatically for some unknown reason\n $source_path = $image['large'].'.jpg';\n $dropbox_path = \"/$date/\".$date . '-'. ++$img_nr . '-childcare.' . $ext;\n\n $this->client->upload($source_path, $dropbox_path, ['autorename' => true]);\n\n }\n \n }", "private function makeImages($key, $file_name) {\n\t\t$uri = $this->download($key, $file_name);\n\t\t$this->makeThumbnail($uri, $file_name);\n\t\t$this->makeFull($uri, $file_name);\n\t\t//Delete original File.\n\t\t\\File::delete($uri);\n\t\t//Add to total of imported items.\n\t\t$this->s3->total++;\n\t}", "function save_image_local_dir($image_url){\n $day = date('d');\n $month_m = date('M');\n $year = date('Y');\n $pathname = 'snippet-images/'.$year.'/'.$month_m.'/'.$month_m.'-'.$day;\n $ext = get_file_extension($image_url);\n if(!is_dir($pathname)){\n mkdir($pathname);\n }\n $rand_num = md5(mt_rand());\n $rand = md5($image_url);\n \n @$raw_image = file_get_contents($image_url);\n $path = $pathname. '/' .$rand_num .'.'. $ext;\n $dest = $pathname. '/'. $rand . '.'.$ext;\n \n if($raw_image)\n {\n file_put_contents($path,$raw_image);\n $file = check_and_compress($path,$dest);\n $image_address = \"snippets/\".$file;\n return $image_address;\n }\n else\n {\n return $image_url;\n }\n }", "public function copyOtherFiles(): void;", "function imageMaint() {\n\t\n //$path = realpath(APPPATH).'/libraries/IMagick_Image.php';\n//require_once($path);\n////$path2 = realpath($_SERVER['DOCUMENT_ROOT']).'/images/';\n//$path2 = realpath($_SERVER['DOCUMENT_ROOT']).'/images/LL9138TR_frisbeeRed/';\n//$util = new ImageUtil();\n////$util->imageToDir($path2);\n////$util->cleanUp($path2);\n//$util->removeDir($path2);\n//print $util->log();\n//exit;\n }", "function copy_image_resize_to_folder($source_file, $destination_folder, $filename, $max_width, $max_height)\n{\n $image_info = getimagesize($source_file);\n $source_pic_width = $image_info[0];\n $source_pic_height = $image_info[1];\n\n $x_ratio = $max_width / $source_pic_width;\n $y_ratio = $max_height / $source_pic_height;\n\n if (($source_pic_width <= $max_width) && ($source_pic_height <= $max_height)) {\n $tn_width = $source_pic_width;\n $tn_height = $source_pic_height;\n } elseif (($x_ratio * $source_pic_height) < $max_height) {\n $tn_height = ceil($x_ratio * $source_pic_height);\n $tn_width = $max_width;\n } else {\n $tn_width = ceil($y_ratio * $source_pic_width);\n $tn_height = $max_height;\n }\n \n if (!is_dir($destination_folder)) {\n mkdir($destination_folder, 0755);\n }\n\n switch ($image_info['mime']) {\n case 'image/gif':\n if (imagetypes() & IMG_GIF) {\n $src = imageCreateFromGIF($source_file);\n $destination_folder.=\"$filename.gif\";\n $namafile = \"$filename.gif\";\n }\n break;\n\n case 'image/jpeg':\n if (imagetypes() & IMG_JPG) {\n $src = imageCreateFromJPEG($source_file);\n $destination_folder.=\"$filename.jpg\";\n $namafile = \"$filename.jpg\";\n }\n break;\n\n case 'image/pjpeg':\n if (imagetypes() & IMG_JPG) {\n $src = imageCreateFromJPEG($source_file);\n $destination_folder.=\"$filename.jpg\";\n $namafile = \"$filename.jpg\";\n }\n break;\n\n case 'image/png':\n if (imagetypes() & IMG_PNG) {\n $src = imageCreateFromPNG($source_file);\n $destination_folder.=\"$filename.png\";\n $namafile = \"$filename.png\";\n }\n break;\n\n case 'image/wbmp':\n if (imagetypes() & IMG_WBMP) {\n $src = imageCreateFromWBMP($source_file);\n $destination_folder.=\"$filename.bmp\";\n $namafile = \"$filename.bmp\";\n }\n break;\n }\n \n $tmp = imagecreatetruecolor($tn_width, $tn_height);\n imagecopyresampled($tmp, $src, 0, 0, 0, 0, $tn_width, $tn_height, $source_pic_width, $source_pic_height);\n\n //**** 100 is the quality settings, values range from 0-100.\n switch ($image_info['mime']) {\n case 'image/jpeg':\n imagejpeg($tmp, $destination_folder, 100);\n break;\n\n case 'image/gif':\n imagegif($tmp, $destination_folder, 100);\n break;\n\n case 'image/png':\n imagepng($tmp, $destination_folder);\n break;\n\n default:\n imagejpeg($tmp, $destination_folder, 100);\n break;\n }\n\n return ($namafile);\n}", "private function prepareFileData() {\n // If the images should not be saved, stop.\n if (!$this->postSaveImagesAsMedia) return;\n\n $postImageSelectors = $this->bot->getSetting(SettingKey::POST_IMAGE_SELECTORS);\n\n // If the user wants to save all images inside the post content, manually add \"img\" selector to the post image\n // selectors.\n if($this->postSaveAllImagesInContent) {\n if(!$postImageSelectors) $postImageSelectors = [];\n\n $postImageSelectors[] = [\n SettingInnerKey::SELECTOR => \"img\",\n SettingInnerKey::ATTRIBUTE => \"src\"\n ];\n }\n\n // Get all content combined\n $allContent = $this->getAllContent();\n\n // If there is no content, we cannot find any images. So, stop.\n if(empty($allContent)) return;\n\n $combinedContent = \"\";\n foreach($allContent as $content) {\n $combinedContent .= $content[\"data\"];\n }\n\n // Create a crawler for the combined content and search for URLs\n $sourceCrawler = $this->bot->createDummyCrawler($combinedContent);\n\n // Prepare the image data\n $this->attachmentMediaFiles = array_merge(\n $this->attachmentMediaFiles,\n $this->prepareFileDataWithSelectors($sourceCrawler, $postImageSelectors)\n );\n }", "function do_export_images()\n\t{\n\t\t$skin_dir = $this->ipsclass->input['skin_dirs'];\n\n\t\tif ( ! @file_exists( CACHE_PATH.'style_images/'.$skin_dir ) )\n\t\t{\n\t\t\t$this->ipsclass->main_msg = \"Невозможно найти выбранную директорию, проверьте настройки и попробуйте еще раз\";\n\t\t\t$this->show_export_page();\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get xml mah-do-dah\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\trequire_once( KERNEL_PATH.'class_xmlarchive.php' );\n\n\t\t$xmlarchive = new class_xmlarchive( KERNEL_PATH );\n\n\t\t$xmlarchive->strip_path = CACHE_PATH.'style_images/'.$skin_dir;\n\n\t\t$xmlarchive->xml_add_directory( CACHE_PATH.'style_images/'.$skin_dir );\n\n\t\t$xmlarchive->xml_create_archive();\n\n\t\t$contents = $xmlarchive->xml_get_contents();\n\n\t\t$this->ipsclass->admin->show_download( $contents, 'ipb_images-'.$skin_dir.'.xml' );\n\t}", "public function run()\n {\n DB::table('images')->insert([\n [\n \"img\"=> \"/storage/img/ubuntu.svg\",\n ],\n [\n \"img\"=> \"/storage/img/windows.jpg\",\n ],\n [\n \"img\"=> \"/storage/img/android.png\",\n ],\n\n ]);\n }", "public function save()\n {\n\n $photo = $this->flyer->addPhoto($this->makePhoto());\n\n\n // move the photo to the images folder\n $this->file->move($photo->baseDir(), $photo->name);\n\n\n// Image::make($this->path)\n// ->fit(200)\n// ->save($this->thumbnail_path);\n\n // generate a thumbnail\n $this->thumbnail->make($photo->path, $photo->thumbnail_path);\n }", "public function resetExtensionCopyStorage() {}", "public function run()\n {\n foreach ($this->getImages() as $image) {\n Image::create($image);\n }\n }", "function my_merge_image ($first_img_path, $second_img_path){\n $width = 1024;\n $height = 512;\n\n //Create new img from file with true color\n $first_img_path = imagecreatefrompng($first_img_path);\n $im = imagecreatetruecolor($width, $height);\n\n // copy and resize part of an img from the path and \"paste\" them side by side\n imagecopyresampled($im, $first_img_path, 0, 0, 0, 0, 1024, 1024, 1024, 1024);\n $second_img_path = imagecreatefrompng($second_img_path);\n imagecopyresampled($im, $second_img_path, 512, 0, 0, 0, 1024, 1024, 1024, 1024);\n\n //save png img from the given img ($im)\n //imagepng($im, \"final_img.png\");\n}", "private function assetPublisher() {\n $assetOrigin = $this->getDir().$this->getPathConfig().'/assets';\n if ($this->fs->exists($assetOrigin)) {\n $assetDest = $this->getPublicPath($this->getPathConfig());\n $this->fs->copyDirectory($assetOrigin,$assetDest);\n }\n }", "private function readImages()\r\n {\r\n if(file_exists($this->location) && is_readable($this->location))\r\n {\r\n $images = array();\r\n\r\n foreach(array_diff(scandir($this->location), array('.', '..')) as $file)\r\n {\r\n if($this->isValidImageType($file))\r\n {\r\n $type = strtolower(pathinfo($file, PATHINFO_EXTENSION));\r\n\r\n if(!in_array($type, $this->extensions))\r\n {\r\n $this->extensions[] = $type;\r\n }\r\n\r\n $images[] = new Image($this->location . '/' . $file);\r\n }\r\n }\r\n\r\n usort($images, function($a, $b) {\r\n return $a->getWidth() > $b->getWidth();\r\n });\r\n\r\n $this->images = $images;\r\n }\r\n }", "public function testCopyCopiesStorageProperly()\n {\n $data = 'contents';\n mkdir(self::$temp.DS.'text');\n file_put_contents(self::$temp.DS.'text'.DS.'foo.txt', $data);\n\n Storage::copy(self::$temp.DS.'text'.DS.'foo.txt', self::$temp.DS.'text'.DS.'foo2.txt');\n\n $this->assertTrue(is_file(self::$temp.DS.'text'.DS.'foo2.txt'));\n $this->assertTrue($data === file_get_contents(self::$temp.DS.'text'.DS.'foo2.txt'));\n }", "public function saveImageForProduct($images)\n {\n $productModel = Mage::getModel('catalog/product');\n $eanField = Mage::getStoreConfig('stockbase_options/login/stockbase_ean_field');\n $accessToken = Mage::getStoreConfig('stockbase_options/token/access');\n $tempFolder = Mage::getBaseDir('media') . DS . 'tmp';\n $io = new Varien_Io_File();\n $addedProducts = array();\n\n foreach ($images as $image) {\n $product = $productModel->loadByAttribute($eanField, $image->EAN);\n $io->checkAndCreateFolder($tempFolder);\n $filePath = $tempFolder . Mage::getSingleton('core/url')->parseUrl($image->{'Url'})->getPath();\n\n // Continue looping, if we dont have product, we have nothing.\n if (!$product) {\n continue;\n }\n\n $client = new Varien_Http_Client($image->{'Url'});\n $client->setMethod(Varien_Http_Client::GET);\n $client->setHeaders('Authentication', $accessToken);\n $protectedImage = $client->request()->getBody();\n\n if ($io->isWriteable($tempFolder)) {\n $io->write($filePath, $protectedImage);\n }\n\n // Verify written file exsist\n if ($io->fileExists($filePath)) {\n if ($product->getMediaGallery() == null) {\n $product->setMediaGallery(array('images' => array(), 'values' => array()));\n }\n $product->addImageToMediaGallery(\n $filePath,\n array('image', 'small_image', 'thumbnail'),\n false,\n false\n );\n $product->{'save'}();\n }\n }\n\n return true;\n }", "public function store(Request $request)\n {\n /* $path =&gt;*/ public_path().'\\public';\n $file = $request->file('file');\necho 3434;\n foreach ($file as $f) {\n $filename = str_random(200) .'.' . $f->getClientOriginalExtension() ?: 'png';\n $img = ImageInt::make($f);\n $img->resize(600,600)->save(/*$path .*/ $filename);\n Image::create(['title' => $request->title, 'img' => $filename]);\n }\n\n return redirect()->route('images.index');\n }", "private function imageStorage($image) {\n // $imgName = time() . '.' . $image->getClientOriginalExtension();\n $imgName = time() . '.' . 'jpg'; //temporary solution\n $localStoragePath = public_path('images');\n\n $img = Image::make($image);\n //treats the image and save it on the right path\n $img->encode('jpg', 75)->resize(500, 500)->save($localStoragePath . '/' . $imgName);\n\n //gets the path to save it\n if(env('APP_ENV') == 'local') {\n $path = public_path('images');\n } else {\n //path to url\n $path = env('APP_URL') . '/images';\n //AWS S3 save\n Storage::disk('s3')->put($imgName, $img);\n\n return Storage::disk('s3')->url($imgName);\n\n }\n\n return $path . '/' . $imgName;\n }", "protected function _moveToImageDir()\n\t{\n\t\t$path = $this->getFilePath();\n\t\t$this->_uploadedFile->moveTo($path);\n\t\tchmod($path, 0644);\n\t}", "private function _saveUploadedImage($id)\n {\n $uploads = $this->request->getUploadedFiles();\n $images = array();\n\n foreach ($uploads as $file) {\n $uniqueName = $file->getKey() . '-' . $id;\n $key = 'events/' . $uniqueName;\n\n switch ($file->getRealType()) {\n case 'image/jpeg':\n $image = imagecreatefromjpeg($file->getRealPath());\n break;\n case 'image/png':\n $image = imagecreatefrompng($file->getRealPath());\n break;\n default:\n $image = null;\n }\n\n if ($image) {\n $tmp = tempnam(null, null);\n imagejpeg($image, $tmp, 75);\n imagedestroy($image);\n\n $client = S3Client::factory(array(\n 'key' => $this->config->amazon->AWSAccessKeyId,\n 'secret' => $this->config->amazon->AWSSecretKey,\n 'region' => 'us-west-2'\n ));\n $bucket = 'findmyrice';\n\n $result = $client->putObject(array(\n 'Bucket' => $bucket,\n 'Key' => $key,\n 'ACL'=> 'public-read',\n 'SourceFile' => $tmp,\n 'ContentType' => 'image/jpeg'\n ));\n\n unlink($tmp);\n\n if ($result) {\n $images[$file->getKey()] = $result['ObjectURL'];\n }\n }\n }\n return $images;\n }", "public function run()\n {\n $imageArray = array(\n 'cover/default.png', 'cover/avengers-infinity-war.jpg', 'cover/coco.jpg',\n 'cover/deadpool-2.jpg', 'cover/fantastic-beasts.jpg', 'cover/oceans-.jpg',\n 'cover/the-greatest-showman.jpg', 'cover/incredibles-2.jpg', 'cover/ant-man-and-the-wasp.jpg'\n );\n foreach($imageArray as $i){\n $image = new Image();\n $image->path = $i;\n $image->save();\n }\n }", "protected function moveImages(Request $request)\n {\n $posterFilename = $this->getPosterFilename($request);\n $posterFilepath = public_path('img') . DIRECTORY_SEPARATOR . 'posters'\n . DIRECTORY_SEPARATOR . $posterFilename;\n\n // If posterUrl is present then the image needs to be downloaded from the URL\n if(!empty($request->posterUrl)) {\n file_put_contents($posterFilepath, file_get_contents($request->posterUrl));\n // Resize the image with ImageMagick\n exec(\"convert $posterFilepath -resize 230x345\\! $posterFilepath\");\n }\n\n // If no posterUrl, then the uploaded image needs to be stored\n if(empty($request->posterUrl)) {\n $request->poster->storeAs('posters', $posterFilename, 'images');\n }\n\n $this->setPermissions($posterFilepath);\n\n /*\n * Handle jumbotron image, if any.\n */\n if($request->hasFile('jumbotron')) {\n $jumbotronFilename = $this->getJumbotronFilename($request);\n\n $request->jumbotron->storeAs('jumbotron', $jumbotronFilename, 'images');\n\n $this->setPermissions(\n public_path('img') . DIRECTORY_SEPARATOR . 'jumbotron'\n . DIRECTORY_SEPARATOR . $jumbotronFilename\n );\n }\n }", "public function upload()\n {\n if (null === $this->getImg()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getImg()->move(\n self::SERVER_PATH_TO_PRESS_IMAGE_FOLDER,\n $this->getImg()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->imageUrl = $this->getImg()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setImg(null);\n }", "public function setImage() {\n\t\t$target_dir = UPROOT;\n\t\t$target_name = basename($_FILES['image']['name']);\n\t\t$tmp_name = $_FILES['image']['tmp_name'];\n\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\t\t//just in case file already exist ill append time and date\n\t\t$timeStamp = date(\"Y-m-d_H:i:s\");\n\t\t//checking if file with the same name already exists\n\t\t$append = $this->clean($timeStamp);\n\t\tif (file_exists($target_file)) {\n\t\t\t//renaming the new file by exploding it\n\t\t\t$fileName = explode('.', $target_name);\n\t\t\t$target_name = $fileName[0] . '.' . $append . '.' . $fileName[1];\n\t\t\t//reassign the folder path\n\t\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\n\t\t}\n\t\t$imageFileType = strtolower(pathinfo($target_file, PATHINFO_EXTENSION));\n\t\t$check = getimagesize($tmp_name);\n\t\t$size = $_FILES[\"image\"][\"size\"];\n\t\t$img = [\n\t\t\t'name' => $target_name,\n\t\t\t'fileType' => $imageFileType,\n\t\t\t'tmp_name' => $tmp_name,\n\t\t\t'target_file' => $target_file,\n\t\t\t'check' => $check,\n\t\t\t'size' => $size,\n\t\t];\n\t\treturn $img;\n\t}", "public function run()\n {\n DB::table('images')->insert([\n [\n //'id' => 1,\n 'camera_id' => 1 ,\n 'storage_id' => 1,\n 'data' => 'Image 1',\n 'significance' => 75,\n 'resolution' => '1600 x 1200'\n ],\n [\n //'id' => 2,\n 'camera_id' => 2 ,\n 'storage_id' => 2,\n 'data' => 'Image 2',\n 'significance' => 55,\n 'resolution' => '3840 x 2160'\n ],\n [\n //'id' => 1,\n 'camera_id' => 3 ,\n 'storage_id' => 6,\n 'data' => 'Image 3',\n 'significance' => 60,\n 'resolution' => '4096 x 2160'\n ],\n [\n //'id' => 2,\n 'camera_id' => 4 ,\n 'storage_id' => 3,\n 'data' => 'Image 4',\n 'significance' => 32,\n 'resolution' => '1280 x 720'\n ]\n ]);\n }", "private function savePhoto()\n {\n $image = Image::make($this->filePath);\n\n File::exists($this->sanghaPhotosPath()) or File::makeDirectory($this->sanghaPhotosPath());\n\n $image->resize(400, null, function ($constraint) {\n $constraint->aspectRatio();\n $constraint->upsize();\n })\n ->save($this->sanghaPhotosPath() . $this->fileName)\n ->resize(200, null, function ($constraint) {\n $constraint->aspectRatio();\n })\n ->save($this->sanghaPhotosPath() . 'tn_' . $this->fileName);\n\n }", "public function store(Request $request)\n {\n $files = $request->file('images');\nforeach ($files as $image) {\n // if ($image) {\n $imageName = rand(11111, 99999) . '.' . $image-> getClientOriginalExtension();\n $image->move(public_path('multipic'), $imageName);\n // return $imageName;\n\n Multipics::insert([\n 'image'=>$imageName,\n // 'created_at'=>Carbon::now(),\n\n ]);\n \n\n\n}\n return back()->with('success','Images created successfully!');\n \n // }\n}", "function saveImage($idPublicacion, $instancia) {\r\n require_once 'class/funciones.php';\r\n \r\n // 01 session de imagenes\r\n $dataSession['productos'] = (isset($_SESSION['productos']) && count($_SESSION['productos']) > 0) ? $_SESSION['productos'] : false;\r\n \r\n // 02 recorrido de estas ('productos')\r\n $dataInsert = array();\r\n if(isset($dataSession['productos']) && count($dataSession['productos']) > 0 && $dataSession['productos'] != false) {\r\n foreach ($dataSession['productos'] as $array) {\r\n $targetFile = realpath(__DIR__ .\"/images/productos/\") .'/'. $array['img_tmp']['name'];\r\n \r\n if (!copy($array['img_tmp']['path'], $targetFile)) { echo \"failed to copy image\"; exit; }\r\n \r\n $dataInsert['publicacionID'] = $idPublicacion;\r\n $dataInsert['nombre'] = $array['img_tmp']['name'];\r\n $dataInsert['fecha_registro'] = date(\"Y-m-d h:i:s\");\r\n $dataInsert['estado'] = 1;\r\n \r\n $instancia->insertImagesByPublicacion($dataInsert);\r\n // 02.1 crear thumbnail\r\n $updir = realpath(__DIR__ .\"/images/productos/\") . \"/\";\r\n $dirLocation = realpath(__DIR__ .\"/images/productos/thumb\") . \"/\"; \r\n $extension = getFileExtension($array['img_tmp']['name']);\r\n $id = str_replace($extension, '', $array['img_tmp']['name']);\r\n makeThumbnails($updir, $extension, $id, $dirLocation);\r\n \r\n }\r\n }\r\n // 03 limpiar imagenes en session\r\n if (isset($_SESSION['productos'])) { unset($_SESSION['productos']); } \r\n}", "private function storeImages(&$model, $request)\n {\n if ($request->file('preview_picture')) {\n $imageName = $model->id . '_prev_' . time() . '.' . $request->file('preview_picture')->getClientOriginalExtension();\n $request->file('preview_picture')->move(base_path() . '/public/uploads/', $imageName);\n $model->preview_picture = $imageName;\n $model->save();\n }\n if ($request->file('detail_picture')) {\n $imageName = $model->id . '_detail_' . time() . '.' . $request->file('detail_picture')->getClientOriginalExtension();\n $request->file('detail_picture')->move(base_path() . '/public/uploads/', $imageName);\n $model->detail_picture = $imageName;\n $model->save();\n }\n }", "function mob_images() {\n\tupdate_option( 'thumbnail_size_w', 360 );\n\tupdate_option( 'thumbnail_size_h', 220 );\n\tupdate_option( 'thumbnail_crop', 1 );\n\n\tupdate_option( 'medium_size_w', 654 );\n\tupdate_option( 'medium_size_h', 9999 );\n\tupdate_option( 'medium_crop', 0 );\n\n\tupdate_option( 'medium_large_size_w', 0 );\n\tupdate_option( 'medium_large_size_h', 0 );\n\n\tupdate_option( 'large_size_w', 850 );\n\tupdate_option( 'large_size_h', 400 );\n\tupdate_option( 'large_crop', 1 );\n\n\tadd_image_size( 'archive-blog', 360, 170, true );\t\n}", "public function store(Request $request)\n {\n // 取得create資料,存取圖片\n // $fileName = Storage::disk('public')->put('/images/product', $request->file('img'));\n // dd($request->file('imgs')[0]);\n // for ($a = 1; $a <= 3; $a++) {\n // 取得create資料,存取圖片\n // $fileName2 = Storage::disk('public')->put('/images/product', $request->file('imgs')[$a]);\n // 將create的資料放進 $product\n // $product = Product::create($request->all());\n // 將檔案路徑換掉\n // /storage/ --> ?\n // $product->imgs = '/storage/' . $fileName2;\n // 儲存\n\n // $product->save();\n // }\n\n // 一張圖片 (自己)\n // 取得create資料,存取圖片\n // $fileName = Storage::disk('public')->put('/images/product', $request->file('img'));\n // 將create的資料放進 $product\n // $product = Product::create($request->all());\n // 將檔案路徑換掉\n // /storage/ --> ?\n // $product->img = '/storage/' . $fileName;\n // 儲存\n\n // $product->save();\n\n // 22222一張圖片\n\n // 在 Product Model裡面撈出 create 所有的資料\n $product = Product::create($request->all());\n // 判斷是否有圖片\n if ($request->hasFile('img')) {\n // (將檔案存在 public裡面的storage\n // 裡面的/images/product資料夾裡面,取得create資料,存取圖片)\n $fileName = Storage::disk('public')->put('/images/product', $request->file('img'));\n // 將圖片路徑換掉\n $product->img = Storage::url($fileName);\n $product->save();\n }\n // else {\n // $product->img = '';\n // $product->save();\n // }\n\n // 多張圖片 (array資料)\n if ($request->hasFile('imgs')) {\n\n foreach ($request->imgs as $img) {\n\n $filePath = Storage::disk('public')->put('/images/product', $img);\n // 在表格裡面儲存資料\n ProductImg::create([\n 'product_id' => $product->id,\n 'url' => Storage::url($filePath),\n ]);\n $product->save();\n }\n }\n // else {\n // $product->img = '';\n // $product->save();\n // }\n\n\n return redirect('/admin/product');\n }", "public function storeProjectMainImage($project){\n if(request()->has('image')){\n $project->update(['image'=>request()->image->store('uploads', 'public')]);\n $image = Image::make(public_path('storage/'. $project->image))->fit(700,700);\n $image->save();\n }\n }", "protected function save()\n {\n switch ($this->image_info['mime']) {\n \n case 'image/gif':\n imagegif($this->image, $this->getPath(true));\n break;\n \n case 'image/jpeg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/jpg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/png':\n imagepng($this->image, $this->getPath(true), round($this->quality / 10));\n break;\n \n default:\n $_errors[] = $this->image_info['mime'] . ' images are not supported';\n return $this->errorHandler();\n break;\n }\n \n chmod($this->getPath(true), 0777);\n }", "protected function sync()\n {\n $this->image =& $this->temp;\n unset($this->temp);\n }", "function mergeImages($files) {\n global $TMPFILES;\n global $MIN_IMAGE_WIDTH, $TMP_PATH; // from config\n $res = array();\n $TMPFILES []= $TMP_PATH . '/' . substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, 16);\n $res['tmpFileName'] = end($TMPFILES);\n\n // load images\n $width = 2147483647;\n foreach ($files as $key => &$file) {\n $imgData = loadImage($file['tmpFileName']);\n if (empty($imgData)) {\n throw new Exception(\"Bad image.\");\n }\n $file = array_merge($file, $imgData);\n $file['width'] = $file['imageInfo'][0];\n $file['height'] = $file['imageInfo'][1];\n if ($width > $file['width']) {\n $width = $file['width'];\n }\n }\n if ($width < $MIN_IMAGE_WIDTH) {\n $width = $MIN_IMAGE_WIDTH;\n }\n $height = 0;\n foreach ($files as $key => &$file) {\n $file['newWidth'] = $width;\n if ($file['width']) {\n $file['newHeight'] = ($width / $file['width']) * $file['height'];\n $height += $file['newHeight'];\n }\n }\n $height += count($files) - 1;\n $dstImage = imagecreatetruecolor($width, $height);\n imagefill($dstImage, 0, 0, 0xFFFFFF);\n $hgh=0;\n foreach ($files as $key => &$file) {\n imagecopyresampled($dstImage, $file['image'], 0, $hgh, 0, 0, $width, $file['newHeight'], $file['width'], $file['height']);\n $hgh += $file['newHeight'] + 1;\n imagedestroy($file['image']);\n deleteFile($file['tmpFileName']);\n }\n\n imagepng($dstImage, $res['tmpFileName']);\n $res['contentType'] = 'image/png';\n $res['hash'] = hash_file('sha256', $res['tmpFileName']);\n $res['srcPathInfo'] = pathinfo(basename($src));\n $res['ext'] = 'png';\n $res['imgType'] = 3;\n imagedestroy($dstImage);\n return $res;\n}", "function addimages($companyname, $imageName, $imageTmpName)\n{\n //connecting to database\n include ('dbconnect.php');\n\n //initailazing the variable\n $directory = \"images/\";\n \n //inbuilt function to move uploaded images to the dirctory\n $result = move_uploaded_file($imageTmpName, $directory.$imageName);\n\n if ($result)\n { \n //query to insert names of images into images table\n $query = \"INSERT INTO images (images, companyid) \n VALUES('$imageName',(SELECT id FROM company WHERE companyname = '$companyname'))\";\n mysqli_query($conn, $query);\n }\n}", "function store_images($source_id, $type) {\n\t\t$image = File::where('type', $type)->where('source_id', $source_id)->first();\n\n\t\tif ($image) {\n\t\t\treturn $image->image_name;\n\t\t}\n\t\treturn getEmptyStoreImage();\n\t}", "public function saveImagePublicFolder($imageBase64) {\n $data = explode(',', $imageBase64);\n $imageData = $data[1];\n $generate_recommended_file_name_data = 'temporary://temp_file.jpg';\n $generate_recommended_file_name = \\Drupal::service('file_system')->realpath($generate_recommended_file_name_data);\n $bin = base64_decode($imageData);\n // Load GD resource from binary data\n $im = imageCreateFromString($bin);\n if (!$im) {\n die('Base64 value is not a valid image');\n }\n // Specify the location where you want to save the image\n $img_file = \\Drupal::service('file_system')->realpath('temporary://' . rand() . '.png');\n imagepng($im, $img_file, 0);\n $cmd = \"convert $img_file $generate_recommended_file_name\";\n exec($cmd, $op);\n sleep(5);\n $fileContent = file_get_contents($generate_recommended_file_name);\n $directory = \"public://\";\n $destination = $directory . 'temp_file.jpg';\n \\Drupal::service('file_system')->prepareDirectory($directory, \\Drupal\\Core\\File\\FileSystemInterface::CREATE_DIRECTORY);\n try {\n $file = file_save_data($fileContent, $destination, FILE_EXISTS_RENAME);\n $destdir = \\Drupal::service('stream_wrapper_manager')->getViaUri('temporary://')->getUri();\n $file_name = $file->getFilename();\n $file_path = $destdir . '/' . $file_name;\n if ($file = file_copy($file, $file_path, FILE_EXISTS_REPLACE)) {\n $url = drupal_realpath($file_path);\n $config = \\Drupal::config('s3fs.settings')->get();\n $s3 = s3fsService::getAmazonS3Client($config);\n $key = 's3fs-public/social_media/' . $file_name;\n $result = $s3->putObject(['Bucket' => $config['bucket'], 'Key' => $key, 'SourceFile' => $url, 'ACL' => 'public-read', ]);\n unlink($url);\n return $s3->getObjectUrl($config['bucket'], $key);\n } else {\n die(\"Could not copy \" . $file_path . \" in \" . $destdir);\n }\n }\n catch(Exception $e) {\n echo 'Message: ' . $e->getMessage();\n }\n }", "public function storeLocalSource($localCopy, $destination)\n\t{\n\t\t$maxCachedImageSize = $this->getCachedCloudImageSize();\n\n\t\t// Resize if constrained by maxCachedImageSizes setting\n\t\tif ($maxCachedImageSize > 0 && ImageHelper::isImageManipulatable($localCopy))\n\t\t{\n\n\t\t\t$image = craft()->images->loadImage($localCopy);\n\n\t\t\tif ($image instanceof Image)\n\t\t\t{\n\t\t\t\t$image->setQuality(100);\n\t\t\t}\n\n\t\t\t$image->scaleToFit($maxCachedImageSize, $maxCachedImageSize)->saveAs($destination);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($localCopy != $destination)\n\t\t\t{\n\t\t\t\tIOHelper::copyFile($localCopy, $destination);\n\t\t\t}\n\t\t}\n\t}", "function makesitesmages()\n\t{\n\n\t\tglobal $option, $mainframe;\n\n\t\t//First we'll nee access to the file system and we'll use the Joomla way to be all safe.\n\t\tjimport('joomla.filesystem.file');\n\t\t$uploads_path = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"masters\" ;\n\t\t$site_path = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"site\" ;\n\n\t\t// this is the width in px that we're telling GD to scale to, where's imagemagik when you need it.\n\t\t$new_w = 235;\n\t\t// where our source images live b/c GD needs to read them\n\t\t$cfg_fullsizepics_path = $uploads_path;\n\t\t//where we're sending them when we are done\n\t\t$cfg_thumb_path = $site_path;\n\t\t// we need one more path for this to work\n\t\t$filepath = $uploads_path ;\n\t\t// the directory\n\t\t$dir = dir($filepath);\n\n\t\t//check folders\n\t\t\t\n\t\twhile($entry=$dir->read()) {\n\t\t\t//check the files\n\t\t\tif($entry == \".\" || $entry == \"..\") {\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\n\t\t\t$fp = @fopen(\"$filepath/$entry\",\"r\");\n\n\t\t\t$photo_filename = \"$entry\";\n\n\t\t\t$image_stats = GetImageSize($cfg_fullsizepics_path.\"/\".$entry);\n\n\t\t\t$imagewidth = $image_stats[0];\n\n\t\t\t$imageheight = $image_stats[1];\n\n\t\t\t$img_type = $image_stats[2];\n\n\t\t\t$ratio = ($imagewidth / $new_w);\n\n\t\t\t$new_h = round($imageheight / $ratio);\n\n\t\t\tif (!file_exists($cfg_thumb_path.\"/\".$entry)) {\n\n\t\t\t\tif ($img_type==\"2\") {\n\n\t\t\t\t\t$src_img = imagecreatefromjpeg($cfg_fullsizepics_path.\"/\".$entry);\n\n\t\t\t\t\t$dst_img = imagecreatetruecolor($new_w,$new_h);\n\n\t\t\t\t\timagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));\n\n\t\t\t\t\timagejpeg($dst_img, \"$cfg_thumb_path\".\"/$entry\", 100);\n\t\t\t\t\t\t\n\t\t\t\t\timagedestroy($dst_img);\n\n\t\t\t\t} elseif ($img_type==\"3\") {\n\n\t\t\t\t\t$src_img=ImageCreateFrompng($cfg_fullsizepics_path.\"/\".$entry);\n\t\t\t\t\t \n\t\t\t\t\t$dst_img=ImageCreateTrueColor($new_w,$new_h);\n\t\t\t\t\t\t\n\t\t\t\t\tImageCopyResampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));\n\n\t\t\t\t\tImagepng($dst_img, \"$cfg_thumb_path\".\"/$entry\",100);\n\n\t\t\t\t\timagedestroy($dst_img);\n\n\t\t\t\t} elseif ($img_type==\"1\") {\n\n\t\t\t\t\t$cfg_thumb_url=$cfg_fullsizepics_url;\n\n\t\t\t\t} \n\n\t\t\t}\n\n\n\t\t\t\t\n\t\t} //the files are now in the /images/content/sketchup/site directory\n\n\n\t\t//$this->setRedirect( 'index.php?option=' . $option.'&task=movesiteimages&controller=items', 'Site Images made' );\n\t\t$this->setRedirect( 'index.php?option=' . $option, 'Site Images made' );\n\t\n\t}", "function saveImage()\n\t{\n\n\t\tif (!$this->ImageStream) {\n\t\t\t$this->printError('image not loaded');\n\t\t}\n\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\t/* store a interlaced gif image */\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagegif($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t/* store a progressive jpeg image (with default quality value)*/\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagejpeg($this->ImageStream, $this->sFileLocation, $this->jpegquality);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t/* store a png image */\n\t\t\t\timagepng($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\n\t\t\t\tif (!file_exists($this->sFileLocation)) {\n\t\t\t\t\t$this->printError('file not stored');\n\t\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n $date = new DateTime('now');\n\n DB::table('images')->insert([\n 'product_id' => 1,\n 'src' => 'product1.jpg',\n 'created_at' => $date,\n 'updated_at' => $date\n ]);\n DB::table('images')->insert([\n 'product_id' => 2,\n 'src' => 'product2.jpg',\n 'created_at' => $date,\n 'updated_at' => $date\n ]);\n DB::table('images')->insert([\n 'product_id' => 3,\n 'src' => 'product3.jpg',\n 'created_at' => $date,\n 'updated_at' => $date\n ]);\n DB::table('images')->insert([\n 'product_id' => 4,\n 'src' => 'product4.jpg',\n 'created_at' => $date,\n 'updated_at' => $date\n ]);\n DB::table('images')->insert([\n 'product_id' => 5,\n 'src' => 'product5.jpg',\n 'created_at' => $date,\n 'updated_at' => $date\n ]);\n DB::table('images')->insert([\n 'product_id' => 6,\n 'src' => 'product6.jpg',\n 'created_at' => $date,\n 'updated_at' => $date\n ]);\n DB::table('images')->insert([\n 'product_id' => 7,\n 'src' => 'product7.jpg',\n 'created_at' => $date,\n 'updated_at' => $date\n ]);\n DB::table('images')->insert([\n 'product_id' => 8,\n 'src' => 'product8.jpg',\n 'created_at' => $date,\n 'updated_at' => $date\n ]);\n DB::table('images')->insert([\n 'product_id' => 9,\n 'src' => 'product9.jpg',\n 'created_at' => $date,\n 'updated_at' => $date\n ]);\n DB::table('images')->insert([\n 'product_id' => 10,\n 'src' => 'product10.jpg',\n 'created_at' => $date,\n 'updated_at' => $date\n ]);\n }", "protected function scaleImages() {}", "function copyAndResize($imgReal_full_path, $imgTarget_name, $imgTarget_dir, $resize = array())\r\n {\r\n $ext = $this->getExtension($imgReal_full_path);\r\n $source_img = $imgReal_full_path;\r\n #$target_img = $imgTarget_dir . $imgTarget_name . $ext;\r\n $target_img = $imgTarget_dir . '/' . $imgTarget_name .'.'. $ext;\r\n \r\n //create dir\r\n $this->createDir($imgTarget_dir.'/');\r\n \r\n //copy real image\r\n copy($source_img, $target_img) or die('Failed to copy :'.$source_img.'--to--'.$target_img);\r\n //copy resized image\r\n $ret_dirresize = $ret_urlresize = array();\r\n foreach($resize as $key=>$size)\r\n {\r\n $crop = strpos($key, \":\") ? $key : '';\r\n $ret_dirresize[$size] = $this->resize_image($target_img, $crop, $size, false);\r\n //$ret_urlresize[$size] = str_replace(MEDIA_DIR, \"http://klimg.com/merdeka.com/cms/\", $ret_dirresize[$size]);\r\n }\r\n\t\t\t\r\n\t\t\t#harus di unremark ulang\r\n //$sourcefile = array_merge($ret_dirresize, array($target_img));\r\n //$this->send_to_server($sourcefile);\r\n \r\n $return = array(\r\n #'nama' => $target_imgName, \r\n 'nama' => $imgTarget_name .'.'. $ext,\r\n 'type' => $ext, \r\n #'path' => $target_dir, \r\n 'path' => $imgTarget_dir.'/',\r\n 'url_resize'=> $ret_urlresize,\r\n 'dir_resize'=> $ret_dirresize,\r\n //'sourcefile'=> $sourcefile,\r\n\t\t\t\t'sourcefile'=> '',\r\n 'source_img'=> $source_img,\r\n 'target_img'=> $target_img\r\n );\r\n \r\n return $return;\r\n }", "public function copyResized() {\n\t\t\n\t\t$output = array();\n\t\t\n\t\t$options = array_merge(\n\t\t\tarray(\n\t\t\t\t'url' => '',\n\t\t\t\t'filename' => '',\n\t\t\t\t'width' => false,\n\t\t\t\t'height' => false,\n\t\t\t\t'crop' => false\n\t\t\t),\n\t\t\t$_POST\n\t\t);\n\t\t\n\t\t$width = $options['width'];\n\t\t$height = $options['height'];\n\t\t\n\t\tif (!((is_numeric($width) || is_bool($width)) && (is_numeric($height) || is_bool($height)))) {\n\t\t\t$output['error'] = Text::get('error_file_size');\n\t\t\treturn $output;\n\t\t}\n\t\t\n\t\tif ($options['filename']) {\n\t\t\n\t\t\t// Get parent directory.\n\t\t\tif ($options['url']) {\n\t\t\t\t$Page = $this->Automad->getPage($options['url']);\n\t\t\t\t$directory = AM_BASE_DIR . AM_DIR_PAGES . $Page->path;\n\t\t\t} else {\n\t\t\t\t$directory = AM_BASE_DIR . AM_DIR_SHARED . '/';\n\t\t\t}\n\t\t\n\t\t\t$file = $directory . $options['filename'];\n\t\t\n\t\t\tCore\\Debug::log($file, 'file');\n\t\t\tCore\\Debug::log($options, 'options');\n\t\t\t\t\n\t\t\tif (file_exists($file)) {\n\t\t\t\t\n\t\t\t\tif (is_writable($directory)) {\n\t\t\t\t\t\n\t\t\t\t\t$img = new Core\\Image(\n\t\t\t\t\t\t$file, \n\t\t\t\t\t\t$width, \n\t\t\t\t\t\t$height,\n\t\t\t\t\t\tboolval($options['crop'])\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$cachedFile = AM_BASE_DIR . $img->file;\n\t\t\t\t\t$resizedFile = preg_replace('/(\\.\\w{3,4})$/', '-' . floor($img->width) . 'x' . floor($img->height) . '$1', $file);\n\t\t\t\t\t\n\t\t\t\t\tif (!$output['error'] = FileSystem::renameMedia($cachedFile, $resizedFile)) {\n\t\t\t\t\t\t$output['success'] = Text::get('success_created') . ' \"' . basename($resizedFile) . '\"';\n\t\t\t\t\t\t$this->clearCache();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$output['error'] = Text::get('error_permission') . ' \"' . $directory . '\"';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$output['error'] = Text::get('error_file_not_found');\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\treturn $output;\n\t\t\n\t}", "function store_avatar($image, $path)\n{\n // Get directory\n $path = check_directory($path);\n\n // Store avatar\n $image_path = Str::random(8) . '-' . $image->getClientOriginalName();\n\n // Create intervention image\n $img = Image::make($image->getRealPath());\n\n // Generate thumbnail\n $img->fit('150', '150')->stream();\n\n // Store thumbnail to disk\n Storage::put($path . '/' . $image_path, $img);\n\n // Return path to image\n return $path . '/' . $image_path;\n}", "function insertUrlImages($image_name){\r\n\t\t\r\n\t}", "function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}", "public function store(Request $request)\n {\n $photos = $request->file('file');\n\n if (!is_array($photos)) {\n $photos = [$photos];\n }\n\n if (!is_dir($this->photos_path)) {\n mkdir($this->photos_path, 0777);\n }\n\n for ($i = 0; $i < count($photos); $i++) {\n $photo = $photos[$i];\n $name = sha1(date('YmdHis') . Str::random(30));\n $save_name = $name . '.' . $photo->getClientOriginalExtension();\n $resize_name = $name . Str::random(2) . '.' . $photo->getClientOriginalExtension();\n\n $resized_image = InterventionImage::make($photo)\n ->encode('jpg', 75)\n ->resize(1000, 750)\n ->crop(1000, 750);\n // ->save($this->photos_path . '/' . $resize_name);\n\n Storage::disk('s3')->put($resize_name,file_get_contents($photo), 'public');\n //$photo->move($this->photos_path, $save_name);\n\n $upload = new Image();\n $upload->file = $save_name;\n $upload->resizedfilename = $resize_name;\n $upload->originalfilename = basename($photo->getClientOriginalName());\n $upload->property_id = $request->input('propertyadd_id');\n $upload->save();\n }\n\n return Response()->json([\n 'message' => 'Image Enrégistrer avec sucès'\n ], 200);\n\n }", "public function upload()\n {\n\n if (null == $this->fichier)\n {\n return;\n }\n\n if ($this->oldFichier)\n {\n // suppression de l'ancienne image\n if (file_exists($this->getUploadRootDir() . '/' . $this->oldFichier))\n {\n unlink($this->getUploadRootDir() . '/' . $this->oldFichier);\n }\n\n\n // suppression des anciens thumbnails\n foreach ($this->thumbnails as $key => $thumbnail)\n {\n if (file_exists($this->getUploadRootDir() . '/' . $key . '-' . $this->oldFichier))\n {\n unlink($this->getUploadRootDir() . '/' . $key . '-' . $this->oldFichier);\n }\n\n }\n }\n\n //$date = new \\DateTime('now');\n\n //$nameImage = $date->format('YmdHis') . '-' . $this->fichier->getClientOriginalName();\n //$extension = $this->fichier->guessExtension();\n //$nameImage = str_replace(' ', '-', $this->alt) . uniqid();\n\n // move (param 1 chemin vers dossier, param 2 nom image)\n\n //$this->name = $nameImage . \".\" . $extension;\n\n $this->fichier->move(\n $this->getUploadRootDir(),\n $this->name\n //$nameImage . \".\" . $extension\n );\n\n //$imagine = new \\Imagine\\Gd\\Imagine();\n\n /*$imagine\n ->open($this->getAbsolutePath())\n ->thumbnail(new \\Imagine\\Image\\Box(350, 160))\n ->save(\n $this->getUploadRootDir().'/' .\n $nameImage . '-thumb-small.' . $extension);*/\n\n $imagine = new \\Imagine\\Gd\\Imagine();\n $imagineOpen = $imagine->open($this->getAbsolutePath());\n\n foreach ($this->thumbnails as $key => $thumbnail)\n {\n $size = new \\Imagine\\Image\\Box($thumbnail[0], $thumbnail[1]);\n $mode = \\Imagine\\Image\\ImageInterface::THUMBNAIL_INSET;\n \n $imagineOpen->thumbnail($size, $mode)\n ->save($this->getUploadRootDir() . '/' . $key . '-' . $this->name);\n }\n }", "private function download()\n {\n $response = $this->httpClient->request('GET', env('PHOTO_ENDPOINT'));\n $content = json_decode($response->getBody()->getContents());\n\n if (! json_last_error() and property_exists($content, 'images')) {\n\n $requests = function ($images) {\n foreach ($images as $image) {\n yield new \\GuzzleHttp\\Psr7\\Request('GET', $image->url);\n }\n };\n\n $pool = new Pool($this->httpClient, $requests($content->images), [\n 'concurrency' => count($content->images),\n 'fulfilled' => function ($response, $index) use ($content) {\n $exp = explode('/', $content->images[$index]->url);\n\n $imageId = end($exp);\n\n $fileName = env('PHOTO_PATH') . $imageId;\n\n if (! Storage::exists($fileName)) {\n Storage::put($fileName, $response->getBody()->getContents(), 'public');\n }\n },\n 'rejected' => function ($reason, $index) {\n die('fail');\n },\n ]);\n\n $promise = $pool->promise();\n $promise->wait();\n }\n }", "private function images()\n {\n return File::allFiles(public_path('img/gallery'));\n }", "public function store(Request $request)\n {\n\n $image = time().'.'.$request->img->extension();\n\n $request->img->move(public_path('images'), $image);\n\n\n Image::create([\n 'title'=>$request['title'],\n 'desc'=>$request['desc'],\n 'img'=>$image,\n\n\n ]);\n\n return redirect()->route('image.index')->with('success','successfully done');\n\n }", "function copy_sprites_to_new_dir($base_token, $count_string, $new_sprite_path, $exclude_sprites = array(), $delete_existing = true, $silent_mode = false, $short_mode = false){\n global $migration_kind, $migration_kind_singular, $migration_limit;\n $kind = $migration_kind_singular;\n $kind_plural = $migration_kind;\n if (!$short_mode){\n ob_echo('----------', $silent_mode);\n ob_echo('Processing '.$kind.' sprites for \"'.$base_token.'\" '.$count_string, $silent_mode);\n }\n ob_flush();\n if (!strstr($new_sprite_path, MMRPG_CONFIG_ROOTDIR)){ $new_sprite_path = MMRPG_CONFIG_ROOTDIR.ltrim($new_sprite_path, '/'); }\n $base_sprite_path = MMRPG_CONFIG_ROOTDIR.'images/'.$kind_plural.'/'.$base_token.'/';\n //ob_echo('-- $base_sprite_path = '.clean_path($base_sprite_path), $silent_mode);\n if (!file_exists($base_sprite_path)){\n $base_sprite_path = MMRPG_CONFIG_ROOTDIR.'images/xxx_'.$kind_plural.'/'.$base_token.'/';\n //ob_echo('-- $base_sprite_path(2) = '.clean_path($base_sprite_path), $silent_mode);\n }\n if (!file_exists($base_sprite_path)){\n ob_echo('- '.clean_path($base_sprite_path).' does not exist', $silent_mode);\n return false;\n }\n //ob_echo('-- $new_sprite_path = '.clean_path($new_sprite_path), $silent_mode);\n if ($delete_existing && file_exists($new_sprite_path)){ deleteDir($new_sprite_path); }\n if (!file_exists($new_sprite_path)){ mkdir($new_sprite_path); }\n ob_echo('- copy '.clean_path($base_sprite_path).'* to '.clean_path($new_sprite_path), $silent_mode);\n recurseCopy($base_sprite_path, $new_sprite_path, $exclude_sprites);\n $global_image_directories_copied = $kind.'_image_directories_copied';\n global $$global_image_directories_copied;\n ${$global_image_directories_copied}[] = basename($base_sprite_path);\n return true;\n}", "public function move_photo(){\n move_uploaded_file($this->tmp_path, '/home/a1031316/public_html/uploaded_images/'.$this->name);\n\n }", "private function intern_save ($targetPath = null)\n\t{\n\t\tif ($this->newImage == null) $this->newImage = $this->srcImage;\n\n\t\tif ($targetPath == null) $targetPath = $this->srcPath;\n\t\telse\n\t\t{\n\t\t\tif (Pathfinder::isAbsolute($targetPath)) $targetPath = $targetPath;\n\t\t\t$targetPath = $this->dataRootPath . $this->getRelativePath($targetPath);\n\t\t}\n\n\t\t// create folders if necessary\n\t\t$this->setUpFolder($targetPath);\n\t\t// remove file from folder with same name\n\t\t$this->intern_removePrevious($targetPath);\n\n\t\t// save\n\t\tswitch($this->srcInfo['extension']) {\n\t\t\tcase 'jpg':\n\t\t\tcase 'jpeg':\n\t\t\t\timagejpeg ( $this->newImage, $targetPath);\n\t\t\t\tbreak;\n\t\t\tcase 'png':\n\t\t\t\timagepng ( $this->newImage, $targetPath);\n\t\t\t\tbreak;\n\t\t\tcase 'gif':\n\t\t\t\timagegif ( $this->newImage, $targetPath);\n\t\t}\n\t\t$this->intern_end();\n\t}", "public function getExtensionCopyStorage() {}", "public function run()\n\t{\n\t\t\\DB::table('images')->delete();\n \n\t\t\\DB::table('images')->insert(array (\n\t\t\t0 => \n\t\t\tarray (\n\t\t\t\t'id' => 1,\n\t\t\t\t'path' => 'assets/images/banners/1401991576banner02.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t1 => \n\t\t\tarray (\n\t\t\t\t'id' => 2,\n\t\t\t\t'path' => 'assets/images/banners/1402586478worktraq.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t2 => \n\t\t\tarray (\n\t\t\t\t'id' => 3,\n\t\t\t\t'path' => 'assets/images/banners/1401978378static-digital-slide.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t3 => \n\t\t\tarray (\n\t\t\t\t'id' => 4,\n\t\t\t\t'path' => 'assets/images/banners/1401980310acuity.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t4 => \n\t\t\tarray (\n\t\t\t\t'id' => 5,\n\t\t\t\t'path' => 'assets/images/banners/1401901794banner04.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t5 => \n\t\t\tarray (\n\t\t\t\t'id' => 6,\n\t\t\t\t'path' => 'assets/images/banners/13953319071369452126busines-cards.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t6 => \n\t\t\tarray (\n\t\t\t\t'id' => 7,\n\t\t\t\t'path' => 'assets/images/banners/1395332049slide-banner.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t7 => \n\t\t\tarray (\n\t\t\t\t'id' => 8,\n\t\t\t\t'path' => 'assets/images/banners/1401901816banner01.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t8 => \n\t\t\tarray (\n\t\t\t\t'id' => 9,\n\t\t\t\t'path' => 'assets/images/banners/1411145938angieslide.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t9 => \n\t\t\tarray (\n\t\t\t\t'id' => 10,\n\t\t\t\t'path' => 'assets/images/banners/1411681755jenni--fall-promo.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t10 => \n\t\t\tarray (\n\t\t\t\t'id' => 11,\n\t\t\t\t'path' => 'assets/images/banners/1433172660sandwich-sale.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t11 => \n\t\t\tarray (\n\t\t\t\t'id' => 12,\n\t\t\t\t'path' => 'assets/images/banners/1420656888adhesivevinyl.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t12 => \n\t\t\tarray (\n\t\t\t\t'id' => 13,\n\t\t\t\t'path' => 'assets/images/banners/1420657264canvas-wrap.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t13 => \n\t\t\tarray (\n\t\t\t\t'id' => 14,\n\t\t\t\t'path' => 'assets/images/banners/1421083269onset-quality-carousel2.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t14 => \n\t\t\tarray (\n\t\t\t\t'id' => 15,\n\t\t\t\t'path' => 'assets/images/banners/1421683568valentines-carouself-1200x500.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t15 => \n\t\t\tarray (\n\t\t\t\t'id' => 16,\n\t\t\t\t'path' => 'assets/images/banners/1423773484home-carousel-sp.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t16 => \n\t\t\tarray (\n\t\t\t\t'id' => 17,\n\t\t\t\t'path' => 'assets/images/banners/1423773234ic-home-banner.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t17 => \n\t\t\tarray (\n\t\t\t\t'id' => 18,\n\t\t\t\t'path' => 'assets/images/banners/1427899984angie-promo-main-banner.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t18 => \n\t\t\tarray (\n\t\t\t\t'id' => 19,\n\t\t\t\t'path' => 'assets/images/banners/1430492093banner-sale-carouself.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t19 => \n\t\t\tarray (\n\t\t\t\t'id' => 20,\n\t\t\t\t'path' => 'assets/images/products/1379344825tabletstand.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t20 => \n\t\t\tarray (\n\t\t\t\t'id' => 21,\n\t\t\t\t'path' => 'assets/images/products/1378502923ipadstand.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t21 => \n\t\t\tarray (\n\t\t\t\t'id' => 22,\n\t\t\t\t'path' => 'assets/images/products/1370031466SMARTDiditalSignage.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t22 => \n\t\t\tarray (\n\t\t\t\t'id' => 23,\n\t\t\t\t'path' => 'assets/images/products/1381258679smartmobile.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t23 => \n\t\t\tarray (\n\t\t\t\t'id' => 24,\n\t\t\t\t'path' => 'assets/images/products/1384883620Angie.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t24 => \n\t\t\tarray (\n\t\t\t\t'id' => 25,\n\t\t\t\t'path' => 'assets/images/products/1384887953IRIS.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t25 => \n\t\t\tarray (\n\t\t\t\t'id' => 26,\n\t\t\t\t'path' => 'assets/images/products/1384887989Kimmi.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t26 => \n\t\t\tarray (\n\t\t\t\t'id' => 27,\n\t\t\t\t'path' => 'assets/images/products/1384888013Jenni.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t27 => \n\t\t\tarray (\n\t\t\t\t'id' => 28,\n\t\t\t\t'path' => 'assets/images/products/1384888037Lily.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t28 => \n\t\t\tarray (\n\t\t\t\t'id' => 29,\n\t\t\t\t'path' => 'assets/images/products/1384888065Tia.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t29 => \n\t\t\tarray (\n\t\t\t\t'id' => 30,\n\t\t\t\t'path' => 'assets/images/products/1422053600pop-up-med.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t30 => \n\t\t\tarray (\n\t\t\t\t'id' => 31,\n\t\t\t\t'path' => 'assets/images/products/1379620194backdrops.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t31 => \n\t\t\tarray (\n\t\t\t\t'id' => 32,\n\t\t\t\t'path' => 'assets/images/products/1381958621saddle.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t32 => \n\t\t\tarray (\n\t\t\t\t'id' => 33,\n\t\t\t\t'path' => 'assets/images/products/1381958923vinyl.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t33 => \n\t\t\tarray (\n\t\t\t\t'id' => 34,\n\t\t\t\t'path' => 'assets/images/products/1422980759boxes-laid-assorted.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t34 => \n\t\t\tarray (\n\t\t\t\t'id' => 35,\n\t\t\t\t'path' => 'assets/images/products/1378392446meshbanner.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t35 => \n\t\t\tarray (\n\t\t\t\t'id' => 36,\n\t\t\t\t'path' => 'assets/images/products/1381944971tricohomesthumb.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t36 => \n\t\t\tarray (\n\t\t\t\t'id' => 37,\n\t\t\t\t'path' => 'assets/images/products/1422055979alloy-box-monochrome.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t37 => \n\t\t\tarray (\n\t\t\t\t'id' => 38,\n\t\t\t\t'path' => 'assets/images/products/1381959272canvasthumb.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t38 => \n\t\t\tarray (\n\t\t\t\t'id' => 39,\n\t\t\t\t'path' => 'assets/images/products/1377802135backlits01.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t39 => \n\t\t\tarray (\n\t\t\t\t'id' => 40,\n\t\t\t\t'path' => 'assets/images/products/1378332362walldecal.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t40 => \n\t\t\tarray (\n\t\t\t\t'id' => 41,\n\t\t\t\t'path' => 'assets/images/products/1378335092wallmural2.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t41 => \n\t\t\tarray (\n\t\t\t\t'id' => 42,\n\t\t\t\t'path' => 'assets/images/products/1422056436DSC_0072.JPG',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t42 => \n\t\t\tarray (\n\t\t\t\t'id' => 43,\n\t\t\t\t'path' => 'assets/images/products/1378393437outdoorsigns.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t43 => \n\t\t\tarray (\n\t\t\t\t'id' => 44,\n\t\t\t\t'path' => 'assets/images/products/1382543666sandwichboard.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t44 => \n\t\t\tarray (\n\t\t\t\t'id' => 45,\n\t\t\t\t'path' => 'assets/images/products/1422054441vehicle-decals.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t45 => \n\t\t\tarray (\n\t\t\t\t'id' => 46,\n\t\t\t\t'path' => 'assets/images/products/1378394234pavement1.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t46 => \n\t\t\tarray (\n\t\t\t\t'id' => 47,\n\t\t\t\t'path' => 'assets/images/products/1381958638brochure.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t47 => \n\t\t\tarray (\n\t\t\t\t'id' => 48,\n\t\t\t\t'path' => 'assets/images/products/1380049145standard_postcard.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t48 => \n\t\t\tarray (\n\t\t\t\t'id' => 49,\n\t\t\t\t'path' => 'assets/images/products/1380663462wallcalendars1.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t49 => \n\t\t\tarray (\n\t\t\t\t'id' => 50,\n\t\t\t\t'path' => 'assets/images/products/1378497834postercalendars.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t50 => \n\t\t\tarray (\n\t\t\t\t'id' => 51,\n\t\t\t\t'path' => 'assets/images/products/1381959074albihomesthumb.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t51 => \n\t\t\tarray (\n\t\t\t\t'id' => 52,\n\t\t\t\t'path' => 'assets/images/products/1378495237cut-business-card.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t52 => \n\t\t\tarray (\n\t\t\t\t'id' => 53,\n\t\t\t\t'path' => 'assets/images/products/1381958595standardcards.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t53 => \n\t\t\tarray (\n\t\t\t\t'id' => 54,\n\t\t\t\t'path' => 'assets/images/products/1381958657flatinvitation.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t54 => \n\t\t\tarray (\n\t\t\t\t'id' => 55,\n\t\t\t\t'path' => 'assets/images/products/1381958677foldedinvitation.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t55 => \n\t\t\tarray (\n\t\t\t\t'id' => 56,\n\t\t\t\t'path' => 'assets/images/products/1381958700foldedpostcards.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t56 => \n\t\t\tarray (\n\t\t\t\t'id' => 57,\n\t\t\t\t'path' => 'assets/images/products/1386883344calendar.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t57 => \n\t\t\tarray (\n\t\t\t\t'id' => 58,\n\t\t\t\t'path' => 'assets/images/products/1381179335tentcardsbanner.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t58 => \n\t\t\tarray (\n\t\t\t\t'id' => 59,\n\t\t\t\t'path' => 'assets/images/products/1381180701walldecal.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t59 => \n\t\t\tarray (\n\t\t\t\t'id' => 60,\n\t\t\t\t'path' => 'assets/images/products/1421192420mimi-thumb.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t60 => \n\t\t\tarray (\n\t\t\t\t'id' => 61,\n\t\t\t\t'path' => 'assets/images/products/1426867856corner-view.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t61 => \n\t\t\tarray (\n\t\t\t\t'id' => 62,\n\t\t\t\t'path' => 'assets/images/products/1422989976product-carousel1.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t62 => \n\t\t\tarray (\n\t\t\t\t'id' => 63,\n\t\t\t\t'path' => 'assets/images/products/1381957380flatinvitation.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t63 => \n\t\t\tarray (\n\t\t\t\t'id' => 64,\n\t\t\t\t'path' => 'assets/images/products/1381957703foldedinvitation.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t64 => \n\t\t\tarray (\n\t\t\t\t'id' => 65,\n\t\t\t\t'path' => 'assets/images/products/1381944377tricohomes.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t65 => \n\t\t\tarray (\n\t\t\t\t'id' => 66,\n\t\t\t\t'path' => 'assets/images/products/13830800441381944399cellbridge.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t66 => \n\t\t\tarray (\n\t\t\t\t'id' => 67,\n\t\t\t\t'path' => 'assets/images/products/1411598984wall-decal-Tommy-gun.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t67 => \n\t\t\tarray (\n\t\t\t\t'id' => 68,\n\t\t\t\t'path' => 'assets/images/products/1422050039pop-up.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t68 => \n\t\t\tarray (\n\t\t\t\t'id' => 69,\n\t\t\t\t'path' => 'assets/images/products/13830804401381875730rogersinsurance-edited.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t69 => \n\t\t\tarray (\n\t\t\t\t'id' => 70,\n\t\t\t\t'path' => 'assets/images/products/13868907646353905923_ee101bc15d-edited2.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t70 => \n\t\t\tarray (\n\t\t\t\t'id' => 71,\n\t\t\t\t'path' => 'assets/images/products/1386885885bmo.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t71 => \n\t\t\tarray (\n\t\t\t\t'id' => 72,\n\t\t\t\t'path' => 'assets/images/products/1381429895wallmural-2 750 x 430.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t72 => \n\t\t\tarray (\n\t\t\t\t'id' => 73,\n\t\t\t\t'path' => 'assets/images/products/1430501001vinyl-banner-large.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t73 => \n\t\t\tarray (\n\t\t\t\t'id' => 74,\n\t\t\t\t'path' => 'assets/images/products/1382561893awardwindows.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t74 => \n\t\t\tarray (\n\t\t\t\t'id' => 75,\n\t\t\t\t'path' => 'assets/images/products/1381428990die-cut.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t75 => \n\t\t\tarray (\n\t\t\t\t'id' => 76,\n\t\t\t\t'path' => 'assets/images/products/1381956537brochure.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t76 => \n\t\t\tarray (\n\t\t\t\t'id' => 77,\n\t\t\t\t'path' => 'assets/images/products/1422055884alloy-box-paintings.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t77 => \n\t\t\tarray (\n\t\t\t\t'id' => 78,\n\t\t\t\t'path' => 'assets/images/products/13844485861381952538albihomes.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t78 => \n\t\t\tarray (\n\t\t\t\t'id' => 79,\n\t\t\t\t'path' => 'assets/images/products/1380234083smartmobiledev1.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t79 => \n\t\t\tarray (\n\t\t\t\t'id' => 80,\n\t\t\t\t'path' => 'assets/images/products/1421191769mim-base.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t80 => \n\t\t\tarray (\n\t\t\t\t'id' => 81,\n\t\t\t\t'path' => 'assets/images/products/1430501384olympic-banner.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t81 => \n\t\t\tarray (\n\t\t\t\t'id' => 82,\n\t\t\t\t'path' => 'assets/images/products/13847927331382561676waterscape-edited.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t82 => \n\t\t\tarray (\n\t\t\t\t'id' => 83,\n\t\t\t\t'path' => 'assets/images/products/13847928771382561640universitysign-edited.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t83 => \n\t\t\tarray (\n\t\t\t\t'id' => 84,\n\t\t\t\t'path' => 'assets/images/products/1382561567sandwichboard1.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t84 => \n\t\t\tarray (\n\t\t\t\t'id' => 85,\n\t\t\t\t'path' => 'assets/images/products/1382561535santespa.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t85 => \n\t\t\tarray (\n\t\t\t\t'id' => 86,\n\t\t\t\t'path' => 'assets/images/products/13844503931381429654draft-edited.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t86 => \n\t\t\tarray (\n\t\t\t\t'id' => 87,\n\t\t\t\t'path' => 'assets/images/products/13844500971381958186foldedpostcards-edited.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t87 => \n\t\t\tarray (\n\t\t\t\t'id' => 88,\n\t\t\t\t'path' => 'assets/images/products/13844491201381428744milan-edited.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t88 => \n\t\t\tarray (\n\t\t\t\t'id' => 89,\n\t\t\t\t'path' => 'assets/images/products/1383689286angie-web-2.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t89 => \n\t\t\tarray (\n\t\t\t\t'id' => 90,\n\t\t\t\t'path' => 'assets/images/products/1383677308iris-web.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t90 => \n\t\t\tarray (\n\t\t\t\t'id' => 91,\n\t\t\t\t'path' => 'assets/images/products/1383609470kimmi-web.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t91 => \n\t\t\tarray (\n\t\t\t\t'id' => 92,\n\t\t\t\t'path' => 'assets/images/products/1411576316webpage-jenni2.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t92 => \n\t\t\tarray (\n\t\t\t\t'id' => 93,\n\t\t\t\t'path' => 'assets/images/products/1383688018tia-web.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t93 => \n\t\t\tarray (\n\t\t\t\t'id' => 94,\n\t\t\t\t'path' => 'assets/images/products/1383688136lily-web.png',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t94 => \n\t\t\tarray (\n\t\t\t\t'id' => 95,\n\t\t\t\t'path' => 'assets/images/products/1381956362saddle1.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t95 => \n\t\t\tarray (\n\t\t\t\t'id' => 96,\n\t\t\t\t'path' => 'assets/images/products/1386886548856547329e440f3eff1f77193833d4f4-edited.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t96 => \n\t\t\tarray (\n\t\t\t\t'id' => 97,\n\t\t\t\t'path' => 'assets/images/products/1381429371illumina.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t97 => \n\t\t\tarray (\n\t\t\t\t'id' => 98,\n\t\t\t\t'path' => 'assets/images/products/1381952877olympicpark.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t98 => \n\t\t\tarray (\n\t\t\t\t'id' => 99,\n\t\t\t\t'path' => 'assets/images/products/1381429237tentcards.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t99 => \n\t\t\tarray (\n\t\t\t\t'id' => 100,\n\t\t\t\t'path' => 'assets/images/products/1386691576calendar.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t100 => \n\t\t\tarray (\n\t\t\t\t'id' => 101,\n\t\t\t\t'path' => 'assets/images/products/1379535395tabletstand.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t101 => \n\t\t\tarray (\n\t\t\t\t'id' => 102,\n\t\t\t\t'path' => 'assets/images/products/1381429093postercalendar.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t102 => \n\t\t\tarray (\n\t\t\t\t'id' => 103,\n\t\t\t\t'path' => 'assets/images/products/1381429054wallcalendar.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t103 => \n\t\t\tarray (\n\t\t\t\t'id' => 104,\n\t\t\t\t'path' => 'assets/images/products/1381956957standardcard.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t104 => \n\t\t\tarray (\n\t\t\t\t'id' => 105,\n\t\t\t\t'path' => 'assets/images/products/1386887756Untitled-3.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t105 => \n\t\t\tarray (\n\t\t\t\t'id' => 106,\n\t\t\t\t'path' => 'assets/images/products/1381428933meshbanner.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t106 => \n\t\t\tarray (\n\t\t\t\t'id' => 107,\n\t\t\t\t'path' => 'assets/images/products/1386707800canvaswrap.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t107 => \n\t\t\tarray (\n\t\t\t\t'id' => 108,\n\t\t\t\t'path' => 'assets/images/products/1381953048albihomes.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t108 => \n\t\t\tarray (\n\t\t\t\t'id' => 109,\n\t\t\t\t'path' => 'assets/images/products/1386977236background.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t109 => \n\t\t\tarray (\n\t\t\t\t'id' => 110,\n\t\t\t\t'path' => 'assets/images/products/13843577351381419905menu-panel.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t110 => \n\t\t\tarray (\n\t\t\t\t'id' => 111,\n\t\t\t\t'path' => 'assets/images/products/1412633646jenni--fall-promo.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t111 => \n\t\t\tarray (\n\t\t\t\t'id' => 112,\n\t\t\t\t'path' => 'assets/images/products/13844498461382562037worleyparsons-edited2.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t112 => \n\t\t\tarray (\n\t\t\t\t'id' => 113,\n\t\t\t\t'path' => 'assets/images/products/13833437981382562189van-houtte-menu.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t113 => \n\t\t\tarray (\n\t\t\t\t'id' => 114,\n\t\t\t\t'path' => 'assets/images/products/1382562231westech.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t114 => \n\t\t\tarray (\n\t\t\t\t'id' => 115,\n\t\t\t\t'path' => 'assets/images/products/1382627057vehiclegraphics.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t115 => \n\t\t\tarray (\n\t\t\t\t'id' => 116,\n\t\t\t\t'path' => 'assets/images/products/1382631001douglashomes.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t116 => \n\t\t\tarray (\n\t\t\t\t'id' => 117,\n\t\t\t\t'path' => 'assets/images/products/1382971735mortgagestogo.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t117 => \n\t\t\tarray (\n\t\t\t\t'id' => 118,\n\t\t\t\t'path' => 'assets/images/products/1384293069ALLOY-BOX.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t118 => \n\t\t\tarray (\n\t\t\t\t'id' => 119,\n\t\t\t\t'path' => 'assets/images/products/1384451680Untitled-2.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t119 => \n\t\t\tarray (\n\t\t\t\t'id' => 120,\n\t\t\t\t'path' => 'assets/images/products/1384797984kimmi.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t120 => \n\t\t\tarray (\n\t\t\t\t'id' => 121,\n\t\t\t\t'path' => 'assets/images/products/13844548598a28653a167a5975d0327f5101dda10c-edited.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t121 => \n\t\t\tarray (\n\t\t\t\t'id' => 122,\n\t\t\t\t'path' => 'assets/images/products/1384456721LILY.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t122 => \n\t\t\tarray (\n\t\t\t\t'id' => 123,\n\t\t\t\t'path' => 'assets/images/products/1384539764c606985530a891409d94dc55d6973a7b-edited.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t123 => \n\t\t\tarray (\n\t\t\t\t'id' => 124,\n\t\t\t\t'path' => 'assets/images/products/1384545795picture.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t124 => \n\t\t\tarray (\n\t\t\t\t'id' => 125,\n\t\t\t\t'path' => 'assets/images/products/1384548119toyota.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t125 => \n\t\t\tarray (\n\t\t\t\t'id' => 126,\n\t\t\t\t'path' => 'assets/images/products/1386697641MilanDisplay.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t126 => \n\t\t\tarray (\n\t\t\t\t'id' => 127,\n\t\t\t\t'path' => 'assets/images/products/1386887231floordecal.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t127 => \n\t\t\tarray (\n\t\t\t\t'id' => 128,\n\t\t\t\t'path' => 'assets/images/products/1426869817hbl-3d-mockup-web.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t128 => \n\t\t\tarray (\n\t\t\t\t'id' => 129,\n\t\t\t\t'path' => 'assets/images/products/1426869669gloss-matter-web.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t129 => \n\t\t\tarray (\n\t\t\t\t'id' => 130,\n\t\t\t\t'path' => 'assets/images/products/1426869782corner-view.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t130 => \n\t\t\tarray (\n\t\t\t\t'id' => 131,\n\t\t\t\t'path' => 'assets/images/products/1422054814urban-systems.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t131 => \n\t\t\tarray (\n\t\t\t\t'id' => 132,\n\t\t\t\t'path' => 'assets/images/products/1422055947alloy-box-monochrome.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t132 => \n\t\t\tarray (\n\t\t\t\t'id' => 133,\n\t\t\t\t'path' => 'assets/images/products/1422980918boxes-pile-assorted.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t133 => \n\t\t\tarray (\n\t\t\t\t'id' => 134,\n\t\t\t\t'path' => 'assets/images/products/1422980964boxes-laid-assorted.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t134 => \n\t\t\tarray (\n\t\t\t\t'id' => 135,\n\t\t\t\t'path' => 'assets/images/products/1422990440product-carousel2.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t135 => \n\t\t\tarray (\n\t\t\t\t'id' => 136,\n\t\t\t\t'path' => 'assets/images/products/1422990557product-carousel1.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t136 => \n\t\t\tarray (\n\t\t\t\t'id' => 137,\n\t\t\t\t'path' => 'assets/images/products/1422990578smart-plaque-edge.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t137 => \n\t\t\tarray (\n\t\t\t\t'id' => 138,\n\t\t\t\t'path' => 'assets/images/products/1423266030triangles-dont-bind-yourself-web.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t138 => \n\t\t\tarray (\n\t\t\t\t'id' => 139,\n\t\t\t\t'path' => 'assets/images/products/1423266291style-web.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t139 => \n\t\t\tarray (\n\t\t\t\t'id' => 140,\n\t\t\t\t'path' => 'assets/images/products/1423684661flat.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t140 => \n\t\t\tarray (\n\t\t\t\t'id' => 141,\n\t\t\t\t'path' => 'assets/images/products/1423761301carousel-small.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t141 => \n\t\t\tarray (\n\t\t\t\t'id' => 142,\n\t\t\t\t'path' => 'assets/images/products/1423773867bodyshop.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t142 => \n\t\t\tarray (\n\t\t\t\t'id' => 143,\n\t\t\t\t'path' => 'assets/images/products/1423784688swimming-sign.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t143 => \n\t\t\tarray (\n\t\t\t\t'id' => 144,\n\t\t\t\t'path' => 'assets/images/products/1431711231mesh-product-banner.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t144 => \n\t\t\tarray (\n\t\t\t\t'id' => 145,\n\t\t\t\t'path' => 'assets/images/products/1431722773vinyl-banner-wscr.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t145 => \n\t\t\tarray (\n\t\t\t\t'id' => 146,\n\t\t\t\t'path' => 'assets/images/products/1435162103floor-tubs.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t146 => \n\t\t\tarray (\n\t\t\t\t'id' => 147,\n\t\t\t\t'path' => 'assets/images/products/1435162844window-hours.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t147 => \n\t\t\tarray (\n\t\t\t\t'id' => 148,\n\t\t\t\t'path' => 'assets/images/products/1435163036window-toyota.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t148 => \n\t\t\tarray (\n\t\t\t\t'id' => 149,\n\t\t\t\t'path' => 'assets/images/products/1435163251wall-graphic.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t149 => \n\t\t\tarray (\n\t\t\t\t'id' => 150,\n\t\t\t\t'path' => 'assets/images/products/1435163359wall-brick-tommys.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t150 => \n\t\t\tarray (\n\t\t\t\t'id' => 151,\n\t\t\t\t'path' => 'assets/images/products/1435163430window-etch-wide.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t151 => \n\t\t\tarray (\n\t\t\t\t'id' => 152,\n\t\t\t\t'path' => 'assets/images/products/1435262171window-privacy-perforated.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t152 => \n\t\t\tarray (\n\t\t\t\t'id' => 153,\n\t\t\t\t'path' => 'assets/images/products/1435262657window-privacy-slats.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t153 => \n\t\t\tarray (\n\t\t\t\t'id' => 154,\n\t\t\t\t'path' => 'assets/images/banners/banner607-07-15.09-07-15.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t154 => \n\t\t\tarray (\n\t\t\t\t'id' => 155,\n\t\t\t\t'path' => 'assets/images/banners/banner507-07-15.09-07-15.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t155 => \n\t\t\tarray (\n\t\t\t\t'id' => 156,\n\t\t\t\t'path' => 'assets/images/banners/banner407-07-15.09-07-15.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t156 => \n\t\t\tarray (\n\t\t\t\t'id' => 157,\n\t\t\t\t'path' => 'assets/images/banners/banner307-07-15.09-07-15.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t157 => \n\t\t\tarray (\n\t\t\t\t'id' => 158,\n\t\t\t\t'path' => 'assets/images/banners/banner207-07-15.09-07-15.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t158 => \n\t\t\tarray (\n\t\t\t\t'id' => 159,\n\t\t\t\t'path' => 'assets/images/banners/banner107-07-15.09-07-15.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t159 => \n\t\t\tarray (\n\t\t\t\t'id' => 160,\n\t\t\t\t'path' => 'assets/images/product-options/lustre-print10-07-15.14-07-15.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t160 => \n\t\t\tarray (\n\t\t\t\t'id' => 161,\n\t\t\t\t'path' => 'assets/images/product-offers/about-us-5.23-07-15.jpg',\n\t\t\t\t'store' => 'local',\n\t\t\t\t'file_id' => NULL,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t));\n\t}" ]
[ "0.74411803", "0.7068767", "0.6778374", "0.6717099", "0.6654278", "0.6540883", "0.63669074", "0.6115651", "0.59764445", "0.59682953", "0.58841497", "0.5808245", "0.58032787", "0.5763859", "0.5722151", "0.57065827", "0.56740564", "0.55958104", "0.55422777", "0.55406654", "0.55352354", "0.55340946", "0.5523544", "0.5512501", "0.5499868", "0.54940134", "0.54931664", "0.54701453", "0.5465405", "0.5462297", "0.54589236", "0.54548466", "0.5447361", "0.54359585", "0.5433372", "0.54322386", "0.5421597", "0.54142", "0.53803635", "0.5368525", "0.53683794", "0.53678215", "0.5355107", "0.5351304", "0.5343185", "0.5342396", "0.53398466", "0.5333844", "0.53231376", "0.5314128", "0.5298475", "0.52977014", "0.52954805", "0.5288707", "0.52862984", "0.5283064", "0.5282288", "0.52799517", "0.52725714", "0.52712184", "0.5270334", "0.5262594", "0.52609724", "0.52457845", "0.52414614", "0.52406603", "0.5235798", "0.52352047", "0.52307457", "0.52269113", "0.52248305", "0.5219549", "0.5202075", "0.5199817", "0.51808923", "0.5177981", "0.51764226", "0.5170464", "0.5165627", "0.51638263", "0.5162452", "0.5161261", "0.51607686", "0.5160328", "0.51547754", "0.5153072", "0.5152906", "0.5150578", "0.5149877", "0.5149237", "0.5148862", "0.51485056", "0.5146427", "0.5136742", "0.5131722", "0.51275396", "0.51200074", "0.51172245", "0.511271", "0.5111169" ]
0.822315
0
Check if the template file exists
public function templateExists(string $template_name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function templateFileExists() {\r\n\t\treturn isset($this->strTemplateFile);\r\n\t}", "function tidyt_template_exists($template){\n if(!file_exists($template))\n return false;\n\n return true;\n}", "public function templateExists(): bool\n {\n return isset($this->templatePath);\n }", "function template_exists($template)\n {\n return (bool)$this->get_template_path($template);\n }", "public function templateExists(string $templateFile = null): bool;", "public function exists()\n {\n try {\n ($this->engine->getResolveTemplatePath())($this->name);\n return true;\n } catch (TemplateNotFound $e) {\n return false;\n }\n }", "public function testTemplateFileExists1()\n {\n $tpl = $this->smarty->createTemplate('helloworld.tpl');\n $this->assertTrue($tpl->source->exists);\n }", "public function testTemplateFileNotExists1()\n {\n $tpl = $this->smarty->createTemplate('notthere.tpl');\n $this->assertFalse($tpl->source->exists);\n }", "public function templateExists($template);", "function TemplateExists($tpl_file)\n {\n return $this->_smarty->template_exists($tpl_file);\n }", "public function hasTemplate() {}", "function templateTypeExists($templateType) {\n\t\t\t\t\t$templateType = preg_replace('/^_[A-Z0-9\\/]+/i','',$templateType);\n\t\t\t\t\tif (!empty($templateType)) {\n\t\t\t\t\t\t$paths = \\Bonita\\Main::getPaths();\n\t\t\t\t\t\tforeach($paths as $basepath) {\n\t\t\t\t\t\t\t$path = $basepath . '/templates/'.$templateType.'/';\n\t\t\t\t\t\t\tif (file_exists($path)) return true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "abstract public function templateExists($name);", "public function hasTemplatePath()\r\n\t{\r\n\t\treturn !empty($this->templatePath);\r\n\t}", "public function templateFileExists($templateFile) {\r\n\t\treturn is_file($templateFile) && is_readable($templateFile);\r\n\t}", "public static function exists(string $template) : bool\n {\n return file_exists(self::templatePath($template));\n }", "public function TemplateExists($template_name)\n {\n return file_exists($this->tpl->dir . \"/\" . $this->patch . $template_name . \".tpl\");\n }", "function read_template_file (){\n\n\t// Generate an error if the template file does not exist and return 'false'.\n if (! file_exists($this->template_file)) {\n print 'Template file does not exist: ['.$this->template_file.']';\n\t return false;\n }\n\t// We use templates and the template file exists\n\t// Capture the template, this way we can use php code inside templates\n\t\n\t$this->start_capture (); // Start capture to buffer\n\trequire $this->template_file; // Includes the template, this way php code can be used in templates\n\t$this->stop_capture ('template_html');\n\treturn true;\n }", "public function exists()\n {\n try {\n $result = $this->soapClient->templateExists(['filename' => $this->getName() ]);\n\n return ( bool ) $result->TemplateExistsResult;\n } catch ( SoapException $ex ) {\n throw new StatusException('Error while verifying the existence of a remote template' , $ex);\n }\n }", "function st_get_template($file,$data = array()){\r $file = ST_DIR.'/templates/'.$file;\r if(file_exists($file)){\r include($file); return true;\r }\r return false;\r}", "function checkTemplate($cacheRowFile){\n if(inDeveloperMode() || !empty($_SESSION['developerMode'])){\n return false;\n }\n return file_exists($cacheRowFile);\n }", "public function testExists()\n {\n $parser = $this->createMock('Symfony\\Component\\Templating\\TemplateNameParserInterface');\n $locator = $this->createMock('Symfony\\Component\\Config\\FileLocatorInterface');\n $locator\n ->expects($this->once())\n ->method('locate')\n ->will($this->returnValue($template = __DIR__.'/../../Resources/views/layout.twig'))\n ;\n $loader = new FilesystemLoader($locator, $parser);\n return $this->assertTrue($loader->exists($template));\n }", "private function _view_file_exists()\n {\n $route = Rails::application()->dispatcher()->router()->route();\n # Build a simple path for the view file, as there's no support for\n # stuff like modules.\n # Note that the extension is PHP, there's no support for different\n # request formats.\n $base_path = Rails::config('views_path');\n $view_path = $base_path . '/' . $route->path() . '.php';\n return is_file($view_path);\n }", "public function testCompiledTemplateFileExits()\n {\n $tpl = $this->smarty->createTemplate('helloworld.tpl');\n $this->assertTrue(file_exists($tpl->compiled->filepath));\n }", "public function HasTemplate() {\r\n return true;\r\n }", "function skcw_check_directory($template) {\n\tif (is_dir($template) && is_readable($template)) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "private static function viewCheckFileExists(): void\n {\n /**\n * The template file is required, so, if it doesn't exist, an exception is thrown.\n */\n if (self::$viewTemplateFile->fileNotExists()) {\n throw new Exception(self::TEMPLATE_FILE_NOT_FOUND[1], self::TEMPLATE_FILE_NOT_FOUND[0], [self::$viewTemplateFile->get()]);\n }\n\n /**\n * The view file isn't required if the 'viewPath' parameter wasn't defined in the route\n * configuration. In this case, if the file doesn't exist in the view directory, the\n * $viewPath property will be set as null. However, if there is a 'viewPath' parameter\n * defined, then an exception will be thrown if the file doesn't exist.\n */\n if (self::$viewPath->fileNotExists()) {\n if (empty(self::$routeController->getViewPath())) {\n self::$viewPath->set(null);\n } else {\n throw new Exception(self::VIEW_FILE_NOT_FOUND[1], self::VIEW_FILE_NOT_FOUND[0], [self::$viewPath->get()]);\n }\n }\n }", "public function templateExists($template)\n {\n return $this->sm->templateExists($template);\n }", "public function exists($templateName)\n {\n $file = $this->getTemplateFile($templateName);\n return file_exists($file);\n }", "public function templateExists($name)\n {\n return $this->engine->templateExists($name);\n }", "public function templateExists($name)\n {\n return $this->engine->templateExists($name);\n }", "public function is_exist_file() {\r\n\t\treturn file_exists( $this->get_path( 'file' ) );\r\n\t}", "public function hasTemplate() {\n return $this->intendedTemplate() == $this->template();\n }", "public function testExists()\n {\n $parser = $this->getMock('Symfony\\Component\\Templating\\TemplateNameParserInterface');\n $locator = $this->getMock('Symfony\\Component\\Config\\FileLocatorInterface');\n $locator\n ->expects($this->once())\n ->method('locate')\n ->will($this->returnValue($template = __DIR__.'/../DependencyInjection/Fixtures/Resources/views/layout.html.hbs'))\n ;\n $loader = new FilesystemLoader($locator, $parser);\n\n $this->assertTrue($loader->exists($template));\n }", "public function verifyTemplate($view_name)\n {\n if (!file_exists('view/' . $view_name . '.tpl.php')) {\n echo \"No such controller\";\n exit;\n }\n }", "public function hasTemplate($aliasOrTemplatePath);", "public function exists()\n {\n return file_exists($this->path('layout.php'));\n }", "public function loadTemplate(){\n\t\t$tpl = $this->template;\n\t\t$file = $this->path . DIRECTORY_SEPARATOR . $tpl . '.tmpl.php';\n\t\t$exists = file_exists($file);\n\t\t// Wenn Template vorhanden\n\t\tif( $exists ){\n\n\t\t\tob_start();\n\t\t\tinclude $file;\n\t\t\t$output = ob_get_contents();\n\t\t\tob_end_clean();\n\n\t\t\treturn $output;\n\t\t}else{\n\t\t\treturn 'Datei nicht gefunden!';\n\t\t}\n\t}", "public function isExists(){\n\t\treturn file_exists($this->getFullName());\n\t}", "private function checkFile()\n {\n $absDir = DIRREQ.$this->dir;\n if (file_exists($absDir.$this->file.'.php')) {\n $this->page = $absDir.$this->file.'.php';\n } elseif (file_exists($absDir.'index.php')) {\n $this->page = $absDir.'index.php';\n } else {\n $this->page = DIRREQ.'views/404.php'; \n }\n }", "static function exist($view, $context = NULL)\n {\n $file = static::find($view, $context);\n return $file ? file_exists($file) : FALSE;\n }", "function cs_subtemplate_exists($mod, $action)\r\n{\r\n global $cs_main;\r\n\r\n $cs_main['def_theme'] = empty($cs_main['def_theme']) ? 'base' : $cs_main['def_theme'];\r\n\r\n $target = 'themes/' . $cs_main['def_theme'] . '/' . $mod . '/' . $action . '.tpl';\r\n if ($cs_main['def_theme'] != 'base' and !file_exists($target))\r\n {\r\n $target = 'themes/base/' . $mod . '/' . $action . '.tpl';\r\n }\r\n if (!file_exists($target))\r\n {\r\n return false;\r\n }\r\n return true;\r\n}", "function getTemplate($fileName)\n{\n // variable $file equals $fileName\n // $fileName is given value when function is called getTemplate(page1_template.html)\n // file_get_contents = reads entire file into a string\n $file = file_get_contents($fileName);\n // IF we point to the file\n if($file ) {\n // returns the contents of the file.\n return $file;\n }\n // ELSE (the file is not pointing to the correct place)\n else {\n // print the message \"File not found\" and exit the script ( die() ).\n die(\"File not found\");\n }\n\n}", "function LoadTemplate( $name )\n{\n if ( file_exists(\"$name.html\") ) return file_get_contents(\"$name.html\");\n if ( file_exists(\"templates/$name.html\") ) return file_get_contents(\"templates/$name.html\");\n if ( file_exists(\"../templates/$name.html\") ) return file_get_contents(\"../templates/$name.html\");\n}", "private static function viewCheckTemplateFile(): void\n {\n if (empty($viewTemplateFile = self::$routeController->getTemplateFile())) {\n throw new Exception(self::UNDEFINED_TEMPLATE_FILE[1], self::UNDEFINED_TEMPLATE_FILE[0]);\n }\n\n self::$viewTemplateFile = new TypeString($viewTemplateFile);\n }", "public static function fileDoesNotExist()\n {\n return self::logicalNot(self::fileExists());\n }", "public function loadTemplate(){\n if($this->hasErrors()) return false;\n $template = $this->findTemplate();\n $this->updateBuffer();\n do_action($this->prefix('before_include_template'), $this);\n include($template);\n do_action($this->prefix('after_include_template'), $this);\n $this->updateBuffer();\n\n return self::$buffer === false ? $this->hasErrors() == false && $template !== false : $this->updateBuffer();\n }", "function exists() {\n\t\treturn is_file($this->path);\n\t}", "public function fileExists() {\r\n return file_exists($this->pathname);\r\n }", "function ifExists()\n\t {\n\t\t $file= CTRL.DS.$this->url[0].'.php';\n\t\t \n\t\t\n\t\t if(!file_exists($file))\n\t\t {\n\t\t\t $this->error(\"File does not exist \");\n\t\t\t echo\"<a href='\".DIR.\"index'>Back</a>\";\n\t\t\t exit();\n\t\t\t\n\t\t }\n\t\t\n\t }", "public function resolve_template() {\n\n\t\t/**\n\t\t * Returns the available template paths for column settings\n\t\t *\n\t\t * @param array $paths Template paths\n\t\t * @param string $template Current template path\n\t\t */\n\t\t$paths = apply_filters( 'ac/view/templates', [ AC()->get_dir() . 'templates' ], $this->template );\n\n\t\tforeach ( $paths as $path ) {\n\t\t\t$file = $path . '/' . $this->template . '.php';\n\n\t\t\tif ( is_readable( $file ) ) {\n\t\t\t\tinclude $file;\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "private function riddleFileExists()\n\t\t{\n\n\t\t\tif (FileSystem::exists(Settings::setting('riddle_location')) == false)\n\t\t\t{\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "public function file_exists($file);", "function getFileExists() {\n\t\treturn file_exists($this->getFilename());\n\t}", "function exists()\n {\n return is_file($this->getPath());\n }", "public function exists(){\n\t\t$fichName = $this->getPath();\n\t\treturn file_exists($fichName);\n\t}", "private function _load_template()\n\t\t{\n\t\t\t//check for a custom template\n\t\t\t$template_file = 'views/'.$this->template_file.'.tpl';\n\n\n\t\t\tif(file_exists($template_file) && is_readable($template_file))\n\t\t\t{\n\t\t\t\t$path = $template_file;\n\t\t\t}\n\t\t\telse if(file_exists($default_file = 'views/error/index.php') && is_readable($default_file))\n\t\t\t{\n\t\t\t\t$path = $default_file;\n\t\t\t}\n\n\t\t\t//If the default template is missing, throw an error\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Exception(\"No default template found\");\n\t\t\t}\n\n\n\t\t\t//Load the contents of the file and return them\n\t\t\t$this->_template = file_get_contents($path);\n\n\t\t}", "public function exists()\n {\n $this->exists = false;\n\n if (is_array($this->temp_files)\n && count($this->temp_files) > 0\n ) {\n $this->exists = true;\n }\n\n return;\n }", "private function check_cache()\n\t{\n\t\t$cache_file = Kohana::config($this->type.'.cache_folder').'/'.md5($this->file).EXT;\n\t\t$this->skip = FALSE;\n\t\t\n\t\tif (is_file($cache_file))\n\t\t{\n\t\t\t// touch file. helps determine if template was modified\n\t\t\ttouch($cache_file);\n\t\t\t// check if template has been mofilemtime($cache_file)dified and is newer than cache\n\t\t\t// allow $cache_time difference\n\t\t\tif ((filemtime($this->file)) > (filemtime($cache_file)+$this->cache_time))\n\t\t\t\t$this->skip = TRUE;\n\t\t}\n\t\t\n\t\treturn $cache_file;\n\t}", "public function check() {\n\t\treturn file_exists($this->getFilePath());\n\t}", "private function fileExists()\n {\n return $this->files->exists($this->path) ? new Exception(\"The class exists!\") : false;\n }", "public function findTemplate($template_name) {\n $test_path = $this->wp_theme_root . 'templates/' . $template_name;\n if ( file_exists( $test_path ) ) {\n return $test_path;\n } else {\n $test_path = $this->path. 'templates/' . $template_name;\n if ( file_exists($test_path) ) {\n return $test_path;\n } else {\n throw new Exception( __('Core Template was not found: ') . ' ' . $template_name );\n }\n }\n }", "public function findTemplate($template_name) {\n $test_path = $this->wp_theme_root . 'templates/' . $template_name;\n if ( file_exists( $test_path ) ) {\n return $test_path;\n } else {\n $test_path = $this->path. 'templates/' . $template_name;\n if ( file_exists($test_path) ) {\n return $test_path;\n } else {\n throw new Exception( __('Core Template was not found: ') . ' ' . $template_name );\n }\n }\n }", "function checkTemplatePage()\t{\n\t\t\n\t\t// Get the record\n\t\t$template = t3lib_BEfunc::getRecord('pages', $this->templateUid);\n\n\t\tif($template['doktype'] != '71') {\n\t\t\treturn false;\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function isExist(){\n\t\t\tif(file_exists($this->_nameFile)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function findTemplate(){\n if($this->hasErrors()) return false;\n $located = false;\n if(!$this->hasErrors()){\n $module_file = trailingslashit($this->location).$this->type.'.php';\n $file = trailingslashit($this->module).trailingslashit($this->location).$this->type.'.php';\n switch(true){\n //Check Stylesheet directory first (Child Theme)\n case file_exists(trailingslashit(get_stylesheet_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file):\n $located = trailingslashit(get_stylesheet_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file;\n break;\n //Check Template directory Second (Parent Theme)\n case file_exists(trailingslashit(get_template_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file):\n $located = trailingslashit(get_template_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file;\n break;\n //Check filtered custom template directory, if it's set.\n case (apply_filters($this->prefix('custom_template_directory_root'), '', $this) !== '' && file_exists(trailingslashit(apply_filters($this->prefix('custom_template_directory_root'), '', $this)).$file)):\n $located = trailingslashit($this->prefix('custom_template_directory_root')).$file;\n break;\n //If nothing else exists, go ahead and get the default\n default:\n $file = trailingslashit(ModuleLoader::getModuleDir($this->module)).$module_file;\n if($this->fileExists($file)) $located = $file;\n break;\n }\n }\n\n return $located;\n }", "public function exists(string $template = \"\"): bool\n {\n if (!$template) {\n if (!$this->template) {\n throw new RuntimeException(\"No template specified\");\n }\n\n $template = $this->template;\n }\n\n $exists = $this->resolve($template);\n\n return $exists !== false;\n }", "public function exists()\n\t{\n\t\treturn is_file($this->_path);\n\t}", "public function getTemplateFile()\r\n {\r\n $templateRootPath = $this->getTemplateRootPath();\r\n\r\n // Returns the template file in the template root path if it exists\r\n $templateFile = $templateRootPath . '/' . $this->templateFile;\r\n if (@is_file(Environment::getPublicPath() . '/' . $templateFile) === true) {\r\n return $templateFile;\r\n } else {\r\n // Returns the file in the default template root path\r\n $defaultTemplateRootPath = $this->getDefaultTemplateRootPath();\r\n $templateFile = $defaultTemplateRootPath . '/' . $this->templateFile;\r\n if (@is_file(Environment::getPublicPath() . '/' . $templateFile) === true) {\r\n return $templateFile;\r\n } else {\r\n throw new Exception('The file \"' . htmlspecialchars(Environment::getPublicPath() . '/' . $templateFile) . '\" does not exist');\r\n }\r\n }\r\n }", "private function check_exists()\n\t{\n\t\t// so this is sufficient to test for existence in accordance with\n\t\t// File::check_exists()\n\t\t// However, getFileInfo() is slow, since it involves a DB query,\n\t\t// so we'll cache the result in $this->exists and test that first...\n\t\tif ( $this->exists )\n\t\t\treturn true;\n\t\telse $this->getFileInfo();\n\t}", "public function setTemplate($file_name)\n {\n\n if (!$this->lock)\n {\n\n if (is_string($file_name))\n {\n $file = str_replace\n ('.:', NULL, get_include_path() . DIRECTORY_SEPARATOR . 'saferlanes/templates/' . $file_name . \".php\");\n if (file_exists($file))\n {\n\n $this->template = $file;\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n return FALSE;\n }\n }\n return FALSE;\n\n }", "public function exists($template)\n {\n return $this->plates->exists($template);\n }", "public function exists()\n {\n return file_exists($this->path);\n }", "public function exists($file) {\n\t\treturn false;\n\t}", "private function copyFromTemplateIfNeeded() {\n\t\t$templatePath = __DIR__ . '/../conf/config.template.php';\n\t\tif (!file_exists($this->filePath)) {\n\t\t\tcopy($templatePath, $this->filePath) or LegacyLogger::log('ERROR', 'StartUp', \"could not create config file: {$this->filePath}\");\n\t\t}\n\t}", "public function loadTemplate() {\n if ( current_filter() !== 'template_redirect' ) {\n return FALSE;\n }\n if ( $this->preLoad() ) {\n return $this->loadFile( $this->getTemplate(), TRUE );\n }\n\n return FALSE;\n }", "private function render_template() {\n\t\t$template = $this->template;\n\n\t\tif ( ! is_readable( $template ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tinclude $template;\n\t}", "public function exists() {\n\n return file_exists($this->path);\n }", "function has_page_template($page_template, $pageid=null)\n{\n\t$template = get_template_of_page($pageid);\n\tif($template == $page_template)\n\t{\n\t\treturn TRUE;\n\t}\n\treturn FALSE;\n}", "public function _stpl_exists($stpl_name = '', $force_storage = '')\n {\n // Exists in cache\n if ( ! $force_storage && isset($this->driver->CACHE[$stpl_name])) {\n return true;\n }\n return (bool) $this->_get_template_file($stpl_name, $force_storage, 1);\n }", "private function viewFileExists($viewPath)\n {\n return $this->file->exists($viewPath);\n }", "public function getTemplateSource($_template)\n {\n if (file_exists($_template->getTemplateFilepath())) {\n $_template->template_source = file_get_contents($_template->getTemplateFilepath());\n return true;\n } else {\n return false;\n }\n }", "public function exists()\n {\n return file_exists($this->getPath());\n }", "public static function missing() {\n\t\t// -- Construct the 404 error template path\n\t\t$file = APP_ROOT . 'errors' . DS . Error::$not_found . EXT_PHP;\n\n\t\t// -- Check if the 404 error template exists. \n\t\t// -- If it does, require it to the screen. \n\t\t// -- Otherwise, display a simple text message.\n\t\tif( file_exists( $file ) ) {\n\t\t\trequire_once $file;\n\t\t} else {\n\t\t\techo Error::$not_found . ' : Internal Error!';\n\t\t}\n\n\t\texit;\n\t}", "public function fileExists($name);", "public function exists(): bool\n {\n return file_exists($this->path);\n }", "public function exists($file) {\n\t}", "function getTemplate($fileName) {\n\n $file = file_get_contents($fileName);\n\n if ($file) {\n\n return $file;\n }\n else {\n echo (\"File not found: \" . $fileName);\n }\n}", "public function exists(): bool\n {\n return is_file($this->path);\n }", "public function getTemplateFile();", "public function localFileExists()\n {\n return file_exists($this->GetRealPath());\n }", "function exists()\n {\n return false;\n }", "protected function getTemplatePathAndFilename() {}", "function deals_get_template($template_name, $require_once = true) {\n\tif (file_exists( STYLESHEETPATH . '/' . DEALS_TEMPLATE . $template_name )) load_template( STYLESHEETPATH . '/' . DEALS_TEMPLATE . $template_name, $require_once ); \n\telseif (file_exists( STYLESHEETPATH . '/' . $template_name )) load_template( STYLESHEETPATH . '/' . $template_name , $require_once); \n\telse load_template( DEALS_TEMPLATE_DIR . $template_name , $require_once);\n}", "public static function twig_files_not_found_notification() {\n\t\techo '<div class=\"error\"><p><b>Warning:</b> TwigPress cannot find the Twig autoloader.php file. This is required!</p></div>';\n\t}", "abstract public function getTemplateFile();", "public function isFileExists()\n {\n $fileNameWithPath = $this->dir . '/' . $this->fileName;\n if(!is_file($fileNameWithPath)) {\n return false;\n }\n\n return true;\n }", "public function testThrowsExceptionWhenNoTemplateIsFound()\n {\n $this->setExpectedException(\n 'Asar\\Template\\Exception\\TemplateFileNotFound',\n \"No template file found in '/foo/Namespace/Representation/' for resource 'FooResource' with method 'PUT' and type 'json'.\"\n );\n $this->commonFindingTemplate(array(\n 'resourceName' => $this->resourceName,\n 'options' => array('type' => 'json', 'method' => 'PUT', 'status' => 200),\n 'foundFiles' => array()\n ));\n }", "protected function _processTpl() {\n $sResult = '';\n if (file_exists($this->_sTplName)) {\n ob_start();\n require_once $this->_sTplName;\n $sResult = ob_get_clean();\n }\n\n return $sResult;\n }", "public function _stpl_path_exists($file_name)\n {\n return file_exists($file_name);\n }" ]
[ "0.83062357", "0.8212553", "0.8185755", "0.81230104", "0.79498065", "0.78983283", "0.78868645", "0.7864358", "0.7802618", "0.7774709", "0.764139", "0.75449395", "0.75107086", "0.7459876", "0.74591666", "0.7390866", "0.73579377", "0.7337966", "0.73356795", "0.7304454", "0.72702825", "0.72692955", "0.7052955", "0.6994018", "0.6976012", "0.69312966", "0.69226897", "0.6878824", "0.6851591", "0.68386763", "0.68386763", "0.68245006", "0.68192273", "0.6770995", "0.6757288", "0.6753411", "0.67479557", "0.66866094", "0.6642443", "0.66271704", "0.65877265", "0.6565394", "0.655044", "0.6535647", "0.6525599", "0.6516732", "0.651414", "0.6505301", "0.6494573", "0.64894044", "0.6464777", "0.64487785", "0.6447796", "0.6446056", "0.64077777", "0.6399837", "0.63970923", "0.6392997", "0.63630223", "0.635917", "0.63577366", "0.6357725", "0.6357725", "0.6354613", "0.6336528", "0.6333128", "0.6306825", "0.6305292", "0.628386", "0.6277912", "0.6277657", "0.6275667", "0.62751126", "0.62638927", "0.62588197", "0.62467414", "0.62420005", "0.6229699", "0.6228626", "0.6224347", "0.6223591", "0.6211302", "0.62088263", "0.61916137", "0.61873704", "0.6162025", "0.6154415", "0.6150732", "0.61446166", "0.61432153", "0.6138594", "0.6138499", "0.61369425", "0.61276233", "0.61234033", "0.61209244", "0.6097538", "0.6093185", "0.609148", "0.608825" ]
0.77714336
10
Get base layouts from disk
public function getLayouts();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 $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 }", "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 }", "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 getThemeLayouts();", "private function __layoutContent()\n {\n return VIEWS . DS . 'Layout' . DS . 'base.php';\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}", "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 formatLayoutTemplateFiles()\n\t{\n\t\t$path = $this->getLayoutPath();\n\t\treturn ($path ? array($path . \"/@layout.latte\") : parent::formatLayoutTemplateFiles());\n\t}", "public function getThemeLayout();", "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 static function getDefaultLayoutPath(): string\n {\n return Path::packageCurrent(['resources/layouts']);\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 }", "public function get_layouts ()\n {\n return $this->_layouts;\n }", "public function getLayout();", "function quest_read_layout_file( $file ) {\n\t\tWP_Filesystem();\n\t\tglobal $wp_filesystem;\n\t\treturn $wp_filesystem->get_contents( $file );\n\t}", "function getLayout() {return $this->readLayout();}", "public function getLayout() {\n\n return $this->asset_array['default']['layout']['name'];\n }", "public function getLayoutRootPaths() {}", "protected function getLayout($id='default'){\n\t\tinclude($this->layoutsPath.'/'.$id.'.php');\n\t}", "public function formatLayoutTemplateFiles()\n {\n $name = str_replace(':', '.', $this->getName());\n\n $arr = array();\n do {\n $arr[] =\n $this->context->parameters[\"appDir\"] . \"/templates/[email protected]\";\n } while ($name = substr($name, 0, strrpos($name, '.')));\n $arr[] = $this->context->parameters[\"appDir\"] . \"/templates/@layout.latte\";\n\n return array_merge($arr, parent::formatLayoutTemplateFiles());\n }", "public function layouts()\n\t{\n return array('table');\n\t}", "protected function _loadControllerLayouts()\n {\n $layout = Mage::app()->getLayout();\n $update = $layout->getUpdate();\n // load default handle\n $update->addHandle('default');\n // load store handle\n $update->addHandle('STORE_'.Mage::app()->getStore()->getCode());\n // load theme handle\n $package = Mage::getSingleton('core/design_package');\n $update->addHandle(\n 'THEME_'.$package->getArea().'_'.$package->getPackageName().'_'.$package->getTheme('layout')\n );\n // load action handle\n $fullActionName = Mage::app()->getRequest()->getRequestedRouteName() . '_' .\n Mage::app()->getRequest()->getRequestedControllerName() . '_' .\n Mage::app()->getRequest()->getRequestedActionName();\n $update->addHandle(strtolower($fullActionName));\n\n //load updates\n Mage::dispatchEvent(\n 'controller_action_layout_load_before',\n array('action' => Mage::app()->getFrontController()->getAction(), 'layout' => $layout)\n );\n $update->load();\n //generate xml\n $layout->generateXml();\n //generate layout blocks\n $layout->generateBlocks();\n\n return $layout;\n }", "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 }", "public function getLayouts()\r\n {\r\n return $this->layouts;\r\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 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(): string;", "public function getLayouts(): ?array;", "protected function getLayout() {\n\t\treturn $this->getFrontcontroller()->getResource('layout');\n\t}", "public function getThemeLayouts()\n {\n return $this->layouts;\n }", "public function getViewLayout(): array\n {\n return $this->template;\n }", "public function getLayoutDirectory()\n\t{\n\t\treturn ORION_APP_DIR . '/' . strtolower($this->application->getName()) . '/layouts';\n\t}", "public function testDeclaredLayoutsDisabledBase() {\n $theme['foo_base'] = $this->mockTheme([], FALSE, TRUE, []);\n $theme['foo'] = $this->mockTheme([\n 'foo_base' => $theme['foo_base'],\n ], TRUE, TRUE, [\n 'foo' => ['title' => 'Foo'],\n ]);\n $themes = $this->getThemes($theme);\n $this->assertEqual([\n 'foo' => ['name' => 'foo', 'title' => 'Foo', 'fields' => []],\n ], $themes->declaredLayouts());\n }", "public function getSkinStylesheetDirectories() {}", "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 }", "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 }", "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}", "function wp_get_layout_definitions()\n {\n }", "public function getLayoutPath()\n {\n if ($this->_layoutPath === null) {\n $this->_layoutPath = realpath($this->getBasePath() . DIRECTORY_SEPARATOR . 'layouts');\n }\n return $this->_layoutPath;\n }", "protected function createDefaultBackendLayout() {}", "public function autoLayout() \n {\n $path = 'layouts/'.$_SESSION['language'].'/'.$this->params['controller_id'].'.php';\n\n if (file_exists($path))\n {\n return $path;\n }\n else \n {\n $path = 'layouts/polyglot/'.$this->params['controller_id'].'.php';\n\n if (file_exists($path))\n {\n return $path;\n }\n else\n {\n return false;\n }\n }\n\t}", "function publisher_get_header_layout() {\n\n\t\t// Return from cache\n\t\tif ( publisher_get_global( 'header-layout' ) ) {\n\t\t\treturn publisher_get_global( 'header-layout' );\n\t\t}\n\n\t\t$layout = 'default';\n\n\t\tif ( publisher_is_valid_tax() ) {\n\t\t\t$layout = bf_get_term_meta( 'header_layout' );\n\t\t} elseif ( publisher_is_valid_cpt() ) {\n\n\n\t\t\t$layout = bf_get_post_meta( 'header_layout' );\n\t\t\t// default -> Retrieve from parent category\n\t\t\tif ( $layout === 'default' ) {\n\n\t\t\t\t$main_term = publisher_get_post_primary_cat();\n\n\t\t\t\tif ( ! is_wp_error( $main_term ) && is_object( $main_term ) && bf_get_term_meta( 'override_in_posts', $main_term ) ) {\n\t\t\t\t\t$layout = bf_get_term_meta( 'header_layout', $main_term );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( $layout === 'default' ) {\n\t\t\t$layout = publisher_get_option( 'header_layout' );\n\t\t}\n\n\t\t// Cache\n\t\tpublisher_set_global( 'header-layout', $layout );\n\n\t\treturn $layout;\n\n\t}", "public function getViews(){\n\n if($this->safe($this->views)){\n //extract vlozi obsah z promenne do pohledu\n extract($this->data);\n extract($this->data, EXTR_PREFIX_ALL, \"\");\n require \"Views/\" . $this->views . \".phtml\";\n }\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}", "private function getLayoutFile($file) {\n\t\treturn SNUG_VIEWS . '_layout_' . $file . '.haml';\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}", "function defaultTemplate(){\n $this->addLocations(); // add addon files to pathfinder\n return array($this->template_file);\n }", "public function getLayout()\n {\n return 'layouts/layout-full-width.tpl';\n }", "public function getPageLayout() {}", "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 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 static function getDefaultLayoutConfiguration() {\r\n\t\treturn array (\r\n\t\t\t'layoutKey' => null,\r\n\t\t\t'layoutCss' => null,\r\n\t\t\t'columns' => 2,\r\n\t\t\t'containerMeasure' => '%',\r\n\t\t\t'containerWidth' => 100,\r\n\t\t\t'columnMeasure' => '%',\r\n\t\t\t'columnWidth' => null,\r\n\t\t\t'columnMargin' => null,\r\n\t\t\t'columnPadding' => null,\r\n\t\t\t'disableImageShrink' => null,\r\n\t\t\t'disableStyles' => null\r\n\t\t);\r\n\t}", "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 formatTemplateFiles()\n\t{\n\t\t$ret = parent::formatTemplateFiles();\n\t\t$name = $this->getName();\n\t\t$presenter = str_replace(\":\", \"/\", $this->name);\n\n\t\t$path = $this->getLayoutPath();\n\t\tif ($path) {\n\t\t\t$ret = array_merge(array(\n\t\t\t\t\"$path/$presenter/$this->view.latte\",\n\t\t\t\t\"$path/$presenter.$this->view.latte\",\n\t\t\t), $ret);\n\t\t}\n\t\treturn $ret;\n\t}", "public function readCollectionOfPossibleTemplatesToBeInstalledFromFileSystem(){\n\t\t$rootTemplateFoldersToBeMapped = array();\n\t\t$rootTemplateFoldersToBeMapped = $this->searchFolderForTemplatesToBeMapped($this->absoluteRootTemplatesBasePath);\n\t\t//Get all Extension Templates below Root Folders\n\t\t$templateFoldersToBeMapped = array();\n\t\tforeach($rootTemplateFoldersToBeMapped as $rootTemplateFolder) {\n\t\t\t$extensionTempateFoldersToBeMappedFromThisRootTemplate = $this->searchFolderForTemplatesToBeMapped($this->absoluteRootTemplatesBasePath . $rootTemplateFolder . '/' . $this->subFolderNameForExtensionTemplateStructure . '/');\n\n\t\t\tforeach($extensionTempateFoldersToBeMappedFromThisRootTemplate as $extensionTempateFoldersToBeMappedFromThisRootTemplate) {\n\t\t\t\t$templateFoldersToBeMapped[] = $rootTemplateFolder . '/' . $this->subFolderNameForExtensionTemplateStructure . '/' . $extensionTempateFoldersToBeMappedFromThisRootTemplate;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//merge extension and root template folders\n\t\t$templateFoldersToBeMapped = array_merge(\n\t\t\t$rootTemplateFoldersToBeMapped, \n\t\t\t$templateFoldersToBeMapped\n\t\t);\n\t\t\n\t\treturn $templateFoldersToBeMapped;\n\t}", "public function getLayoutRootPath() {}", "private function getDirectories()\n {\n $this->load();\n\n $this->data['themeDirectory'] = 'catalog/view/theme/default/';\n $customizedFile = $this->data['themeDirectory'] . 'stylesheet/mundipagg/mundipagg_customized.css';\n\n if (file_exists($customizedFile)) {\n $this->data['customizedFile'] = $customizedFile;\n }\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}", "public function get_layout($id)\n\t{\n\t\treturn $this->get_single($id);\n\t}", "function _get_block_templates_paths($base_directory)\n {\n }", "public function getLayout() {\n\t\treturn isset($this->cache->layout) ? $this->cache->layout : 'warnfight';\n\t}", "private static function get_layout($path, $content){\n\t\tif(is_file($path)) include($path);\n\t\telse echo(\"Please Define this layout path: $path\");\n\t}", "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}", "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 static function getTemplateLayout()\n {\n return self::$templateLayout;\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 }", "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}", "function layout_path($layout = '')\n { \n return extension_path(\"layouts\").($layout ? DS.$layout : $layout);\n }", "public function getLayoutFile($controller,$layoutName)\n\t{\n\t\t$moduleViewPath=$basePath=$this->getViewPath();\n\t\t$module=$controller->getModule();\n\t\tif(empty($layoutName))\n\t\t{\n\t\t\twhile($module!==null)\n\t\t\t{\n\t\t\t\tif($module->layout===false)\n\t\t\t\t\treturn false;\n\t\t\t\tif(!empty($module->layout))\n\t\t\t\t\tbreak;\n\t\t\t\t$module=$module->getParentModule();\n\t\t\t}\n\t\t\tif($module===null)\n\t\t\t\t$layoutName=Yii::app()->layout;\n\t\t\telse\n\t\t\t{\n\t\t\t\t$layoutName=$module->layout;\n\t\t\t\t$moduleViewPath.='/'.$module->getId();\n\t\t\t}\n\t\t}\n\t\telseif($module!==null)\n\t\t\t$moduleViewPath.='/'.$module->getId();\n\n\t\treturn $controller->resolveViewFile($layoutName,$moduleViewPath.'/layouts',$basePath,$moduleViewPath);\n\t}", "public function getFilesBase();", "public function getThemeBlocks();", "public function loadLayout($default = true)\n {\n $model = Bootstrap::getModel('page/design_json');\n $model->setJsonDesign();\n $layoutHandle = $this->getHandle();\n $this->block = $model->buildBlocks($layoutHandle, $default);\n return $this->block;\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}", "public static function getLayout()\n {\n return self::$layout;\n }", "public function getLayout()\n {\n if ($this->__layout) {\n return $this->__layout;\n }\n\n $this->__layout = new ViewEntity();\n\n $layoutName = 'layout/layout';\n $layoutPath = $this->__defaultScriptPath;\n\n $yaceConfig = $this->__config->get('yace');\n if ($yaceConfig) {\n // Check layout_name configuration\n $test = $yaceConfig->get('layout_name');\n if (!$test) {\n $layoutName = $test;\n }\n\n // Check layout path configuration\n $test = $yaceConfig->get('layout_path');\n if (!$test) {\n $layoutPath = $test;\n }\n }\n\n $this->__layout->setViewName($layoutName)\n ->setScriptPath($layoutPath);\n\n return $this->__layout;\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}", "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 }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "function loadLayout($get_where=\"\",$layoutPath=\"layout/\",$layoutFile=\"layout.php\") {\n\t\tglobal $__;\n\t\t$__['main'] = $__['pathPage'].$get_where;\n include $layoutPath.$layoutFile;\n\t}", "public function GetViewsDir ();", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getLayout()\n {\n $layout = new Zend_Layout(dirname(__FILE__));\n $layout->setLayout('log-email');\n return $layout;\n }", "function method_layout($request)\n{\n global $_PREFS,$_STORAGE;\n \n $log = LoggerManager::getLogger('swim.method.layout');\n checkSecurity($request, false, true);\n \n $path = $_PREFS->getPref('storage.site.templates').'/'.$request->getPath();\n $path = findDisplayableFile($path);\n if ($path != null)\n {\n $type = determineContentType($path);\n $cachetime = filemtime($path);\n if (isTemplateFile($path))\n {\n $smarty = createSmarty($request, $type);\n $log->debug('Starting display.');\n $result = $smarty->fetch($path);\n if (!RequestCache::isCacheDefined())\n RequestCache::setCacheInfo(max($cachetime, $_STORAGE->singleQuery('SELECT MAX(published) FROM VariantVersion;')));\n setContentType($type);\n print($result);\n $log->debug('Display complete.');\n }\n else\n {\n setContentType($type);\n RequestCache::setCacheInfo($cachetime);\n include($path);\n }\n }\n else\n displayNotFound($request);\n}", "public function getSchema()\r\n {\r\n // if existed (like post): begiresh va be view pass bede\r\n // if not (like blog,index): default schema template\r\n // include schema.view\r\n }", "public static function renderLayout()\n {\n return self::$layout;\n }", "public function getLayoutCache(){\n\t\tif(isset(self::$_cacheLayout[get_class($this)])){\n\t\t\treturn self::$_cacheLayout[get_class($this)];\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public function getPackageList()\r\n {\r\n $directory = Mage::getBaseDir('design') . DS . 'frontend';\r\n return $this->_listDirectories($directory);\r\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 getLayout(){\n\n return $this->layout;\n\n }", "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 }", "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}", "function getThemes(){\n\t$result = array();\n\t\n\t$handle = @opendir(ROOT_PATH . 'themes');\n\t\n\twhile (false !== ($f = readdir($handle))){\n\t\tif ($f != \".\" && $f != \"..\" && $f != \"CVS\" && $f != \"index.html\" && !preg_match(\"`[.]`\", $f)){\n\t\t\tif( is_file(ROOT_PATH . 'themes' . DS . $f . DS . 'layout.tpl') ){\n\t\t\t\t$result[] = $f;\n\t\t\t}\n }\n\t}\n closedir($handle);\n\n return $result;\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}" ]
[ "0.73719394", "0.7041701", "0.6821285", "0.6519811", "0.64342403", "0.62710553", "0.6141716", "0.6125933", "0.6093813", "0.6000271", "0.5949763", "0.5933483", "0.58708304", "0.58612305", "0.58532274", "0.58215857", "0.58154225", "0.57714736", "0.57636", "0.5717954", "0.5713808", "0.5701714", "0.56741196", "0.5670768", "0.5656703", "0.56207496", "0.56089437", "0.55878717", "0.5560384", "0.55500925", "0.55462795", "0.5538901", "0.55274254", "0.5508519", "0.5491237", "0.54868585", "0.54705304", "0.5463402", "0.54543847", "0.5443313", "0.54169077", "0.53953", "0.53915536", "0.53871745", "0.53825265", "0.5369972", "0.5364584", "0.5335595", "0.532924", "0.5324743", "0.53150433", "0.5309392", "0.53044885", "0.52982074", "0.5297811", "0.5289672", "0.52786225", "0.52668035", "0.5261441", "0.52543265", "0.52463347", "0.52345043", "0.52169514", "0.52082914", "0.5207169", "0.51957226", "0.5182348", "0.51749545", "0.5168433", "0.5165286", "0.5165252", "0.5157391", "0.51572883", "0.5149452", "0.5138029", "0.51355547", "0.5107453", "0.51010066", "0.50984114", "0.50969464", "0.5095613", "0.5095582", "0.5092497", "0.5092497", "0.5092497", "0.5092497", "0.5092497", "0.5092497", "0.50909215", "0.5090753", "0.50799686", "0.50742346", "0.5049287", "0.50488245", "0.5040926", "0.50390226", "0.5035733", "0.50340885", "0.5033155", "0.50278133" ]
0.6428824
5
Get the validation rules for storing a new template
public function getValidationRulesStore(): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function storeRules()\n {\n return [\n 'name' => 'required',\n 'photo' => 'required',\n 'is_public' => 'required|boolean',\n 'coordinates' => ['required', new Coordinate()],\n ];\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}", "private function getRules()\n {\n return array(\n 'name' => new Pattern\\Name,\n 'height' => new Pattern\\Height,\n 'lat' => array(\n 'required' => true,\n 'rules' => array('Latitude')\n ),\n 'lng' => array(\n 'required' => true,\n 'rules' => array('Longitude')\n ),\n 'api_key' => array(\n 'required' => true,\n 'rules' => array(\n 'NotEmpty' => array(\n 'message' => 'Google API key can not be empty'\n )\n )\n ),\n 'style' => array(\n 'required' => false,\n 'rules' => array('Json')\n )\n );\n }", "private function storeRules()\n {\n return [\n 'data.type' => 'required|in:events',\n 'data.attributes.name' => 'required|max:50|min:5',\n 'data.attributes.description' => 'required|max:255',\n 'data.attributes.date' => 'required|date',\n 'data.relationships.users' => 'required_with:data.relationships',\n 'data.relationships.users.data.*.type' => 'required_with:data.relationships|in:users',\n 'data.relationships.users.data.*.id' => 'required_with:data.relationships|numeric'\n ];\n }", "abstract protected function getValidationRules();", "public static function validationRulesNew()\n {\n return [\n 'name' => 'required|unique:faucets,name|min:5',\n 'url' => 'required|unique:faucets,url',\n 'interval_minutes' => 'required|integer',\n 'min_payout' => 'required|numeric',\n 'max_payout' => 'required|numeric',\n 'faucet_payment_processors[]' => 'each:exists,faucet_payment_processors, id',\n 'has_ref_program' => 'required|boolean',\n 'ref_payout_percent' => 'required|numeric|min:0',\n 'comments' => 'string',\n 'is_paused' => 'required|boolean',\n 'meta_title' => 'string|max:70',\n 'meta_description' => 'string|max:160',\n 'meta_keywords' => 'string|max:255'\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 createRules()\n {\n return [\n 'name' => 'sometimes|required|min:3|regex:/^([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ_-])+((\\s*)+([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ_-]*)*)+$/|max:40',\n 'lastname' => 'sometimes|required|regex:/^([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ_-])+((\\s*)+([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ_-]*)*)+$/|min:3|max:40',\n 'username' => 'required|string|max:40|min:6|unique:users,username',\n 'email' => 'required|unique:users,email',\n 'password' => 'required|min:6',\n 'type' => 'required|in:admin,coordinador,docente,secretaria',\n ];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function getRules()\n {\n // Set the validation rules.\n $rules = [\n 'party_id' => 'integer|required|exists:pgsql.core.parties,id',\n 'bank_id' => 'integer|required|exists:pgsql.core.banks,id',\n 'currency_id' => 'integer|required|exists:pgsql.core.currencies,id',\n 'first_name' => 'string|required|max:50',\n 'last_name' => 'string|required|max:50',\n 'last_name' => 'string|nullable|max:255',\n 'type' => 'string|nullable|in:savings,current',\n 'class' => 'string|nullable|in:personal,business',\n ];\n\n // Add the account number check if it's a new record.\n if (!$this->exists) {\n $rules['account_number'] = 'string|required|max:100|unique:pgsql.core.bank_accounts,account_number,NULL,id,bank_id,' . $this->bank_id;\n }\n\n return $rules;\n }", "protected function createRules()\n {\n return [\n 'token' => ['required', 'string'],\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 getValidationCreateRules(): array\n {\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 getRules()\n {\n return [\n 'title' => ['requiredFill', 'trim', 'htmlSpecialChars', 'len100'],\n 'content' => ['requiredFill', 'htmlSpecialChars'],\n 'categoryId' => ['requiredFill', 'isInteger'],\n ];\n }", "public function getCreateRules()\n {\n return [];\n }", "public function rules() {\n\t\t$action_method = $this->route()->getActionMethod();\n\t\t$rules = [\n\t\t\t'name' => 'required',\n\t\t\t'description' => 'required',\n\t\t\t'file_category_id' => 'required',\n\t\t];\n\n\t\tif ( $action_method === 'store' ) {\n\t\t\t$rules['file_upload'] = 'required';\n\t\t}\n\n\t\treturn $rules;\n\t}", "public function getRules() {\n return [\n 'complex_id' => 'required|exists:complexes,id',\n 'name' => 'required',\n 'description' => 'required',\n 'price' => 'required',\n 'price_type' => 'required',\n 'price_unit' => 'required',\n ];\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\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 get_validation_rules() {\n\t\t$field = $this->field;\n\t\t$id = self::get_property( 'element_id', $field );\n\t\t$is_required = $this->is_required( $field );\n\t\t$post_image = self::get_property( 'post_image', $field, '' );\n\t\t$post_type = self::get_property( 'post_type', $field, 'post' );\n\t\t$post_image_enabled = ! empty( $post_image );\n\t\t$rules = '';\n\n\t\tif ( $is_required && $post_image_enabled ) {\n\t\t\t$rules .= '\"' . $this->get_id( $field ) . '-post-image\": {';\n\t\t\tif ( $is_required ) {\n\t\t\t\t$rules .= '\"required\": true,';\n\t\t\t}\n\t\t\t$rules .= '},';\n\t\t}\n\t\t$category_list = forminator_post_categories( $post_type );\n\t\tif( ! empty( $category_list ) ) {\n\t\t\tforeach ( $category_list as $category ) {\n\t\t\t\t$post_category_enabled = self::get_property( $category['value'], $field, '' );\n\t\t\t\tif ( $is_required && $post_category_enabled ) {\n\t\t\t\t\t$rules .= '\"' . $this->get_id( $field ) . '-' . $category['value'] . '[]\": {';\n\t\t\t\t\tif ( $is_required ) {\n\t\t\t\t\t\t$rules .= '\"required\": true,';\n\t\t\t\t\t}\n\t\t\t\t\t$rules .= '},';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn apply_filters( 'forminator_field_postdata_validation_rules', $rules, $id, $field );\n\t}", "public function rules()\n {\n $formRules = [\n \"name\"=>[\n \"required\",\n Rule::unique('categories')->ignore($this->id)\n ],\n $formRules['file_upload'] = [\n \"mimes:jpg,bmp,png\"\n ],\n 'email' => [\n \"required\",\n \"email\",\n function($attribute, $value, $fail){\n if(!strpos($value, \"@fpt.edu.vn\")){\n $fail(\"$attribute phải là đuôi @fpt.edu.vn\");\n }\n }\n ],\n 'password' => \"required\",\n \n\n ];\n if($this->id == null ){\n $formRules['file_upload'][]=\"required\";\n }\n return $formRules;\n }", "protected function postSMSTemplateValidation()\n {\n if (Tools::isSubmit('saveTemplate') || Tools::isSubmit('editTemplate')) {\n if (!Tools::getValue('TEMPLATE_NAME')) :\n $this->postsmsTemplateErrors[] = $this->l('Temaplate name is required.');\n elseif (!Tools::getValue('TEMPLATE_BODY')) :\n $this->postsmsTemplateErrors[] = $this->l('Temaplate body is required.');\n endif;\n }\n return $this->postsmsTemplateErrors;\n }", "abstract public function getValidationRules(): array;", "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 createRules(){\n return [\n 'email' => 'required|string|max:50',\n 'password' => 'required|string',\n ];\n }", "private function validationRules()\n {\n return [\n 'newPassword' => [\n new PasswordRule($this->newPasswordConfirmation),\n ],\n 'currentPassword' => [\n 'required',\n new PasswordCheckRule($this->user),\n ],\n ];\n }", "public function getValidationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = [\n 'title' => 'required|min:5|max:255|unique:posts',\n 'body' => 'required|min:5',\n 'body_preview' => 'required|min:5',\n 'category' => 'nullable|sometimes|exists:categories,id',\n 'image' => 'nullable|sometimes|image|dimensions:min_width=1280,min_height=1024'\n ];\n\n // validate tags form field only if present\n if ($this->request->get('tags')) {\n foreach ($this->request->get('tags') as $key => $val) {\n $rules[\"tags.{$key}\"] = 'exists:tags,id';\n }\n }\n\n return $rules;\n }", "private function getValidation() {\n return [\n 'title' => 'required|min:4|max:50',\n 'poster' => 'required|max:255',\n 'price' => 'required',\n 'start_date' => 'required',\n ];\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function validationRules()\n {\n return [];\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\t{\n\t\t$rules = [\n\t\t\t'price' => 'required',\n\t\t\t'currency' => 'required',\n\t\t\t'name' => 'required|min:10|max:120',\n\t\t\t'content' => 'required|min:10',\n\t\t\t'gearbox' => 'required',\n\t\t\t'year' => 'required|min:2',\n\t\t\t'colour' => 'required|min:2',\n\t\t\t/*'g-recaptcha-response' => 'required|recaptcha',*/\n\t\t];\n\n\t\treturn $rules;\n\t}", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function rules(): array\n {\n $rules = new ValidationRules();\n\n return [\n 'title' => \"required|min:{$rules->string_min}|max:{$rules->string_max}\",\n 'description' => \"max:{$rules->string_max}\",\n 'division_id' => 'required|exists:divisions,id',\n 'emails' => 'required',\n 'tags' => 'required',\n 'short_content' => \"required|min:{$rules->string_min}\",\n 'full_content' => \"required|min:{$rules->string_min}\",\n 'position' => \"integer|min:{$rules->position_min}|max:{$rules->position_max}\"\n ];\n }", "protected function get_validation_rules()\n {\n }", "protected function storeValidations()\n {\n return [\n 'username' => 'required|unique:users|max:18|alpha_num',\n 'name' => 'required|max:50',\n 'email' => 'required|email|unique:users|max:100',\n 'status' => 'required|integer',\n 'roles' => 'nullable|array',\n ];\n }", "public function validationRules()\n {\n return [];\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function rules()\n {\n $rules = [\n 'first_name' => 'required|string|between:3,255',\n 'last_name' => 'required|string|between:3,255',\n 'avatar' => 'sometimes|mimes:png,jpg,jpeg|max:1024',\n 'email' => 'not_present',\n 'type' => 'not_present',\n 'status' => 'not_present',\n 'branches' => 'not_present',\n 'is_main_admin' => 'not_present',\n ];\n\n if ($this->has('current_password') && $this->current_password) {\n $rules['current_password'] = 'required|pass_check';\n $rules['new_password'] = 'required|alpha_num_pwd|confirmed';\n $rules['new_password_confirmation'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $locale = defaultLanguage();\n $rules = [];\n\n if(isset($this->image)) {\n $rules['image'] = 'required|image|mimes:jpeg,png,jpg,gif,svg';\n }\n\n $rules['country_id'] = 'required';\n $rules['state.'.$locale.'.title'] = 'required|unique:state_translations,title,'.$this->state_id.',state_id,deleted_at,NULL';\n $rules['state.'.$locale.'.description'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n /*$custom = \\DB::table('custom_fields')->select('id', 'name', 'required')->get()->toArray();\n $customRules = [];\n\n foreach ($custom as $item) {\n $customRules['custom_fields_data.'.$item->name.'_'.$item->id] = ($item->required == 'yes') ? 'required' : '';\n }*/\n\n $mainRules = [\n 'email' => 'required|email|unique:users',\n 'password' => 'required',\n 'name' => 'required'\n ];\n\n return $mainRules;\n }", "public function rules()\n {\n return [\n \"name\" => \"required|min:4|max:100\",\n \"resource_date\" => \"required|date|after:{$this->after()}|before:{$this->before()}\",\n \"number\" => \"numeric|max:10\",\n \"course_id\" => \"required|exists:courses,id\",\n \"teacher_id\" => \"exists:teachers,id\",\n \"type_id\" => \"required|exists:types,id\",\n \"description\" => \"max:255\",\n \"file\" => \"required|max:10000|mimes:{$this->file_extensions()}\",\n ];\n }", "public static function getRules() {\n return [\n 'title' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'author' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'description' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'price' => FILTER_VALIDATE_FLOAT,\n 'year' => [\n 'filter' => FILTER_VALIDATE_INT,\n 'options' => [\n 'min_range' => 1800,\n 'max_range' => date(\"Y\")\n ]\n ]\n ];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n $flowRepository = new FlowRepository();\n if ($this->has('step_run_id') && intval($this->step_run_id)) {\n //通过 预提交\n $this->step = $flowRepository->getCurrentStep($this->step_run_id);\n } else {\n //发起 预提交\n $this->step = $flowRepository->getFlowFirstStep($this->flow_id);\n }\n\n $basicRules = [\n 'flow_id'=>[\n Rule::exists('flows','id')->where('is_active',1)\n ],\n 'step_run_id' => [\n Rule::exists('step_run', 'id')->where('flow_id', $this->flow_id)\n ],\n 'form_data' => [\n 'present',\n 'array',\n ],\n ];\n $fieldsRules = app('validation')->makeStepFormValidationRules($this->step,$this);\n return array_collapse([$basicRules, $fieldsRules]);\n }", "public function rules()\n {\n $rules = [];\n $rules['name'] = ['string', 'max_db_string'];\n $rules['email'] = ['email', 'max_db_string'];\n if ($this->exists) $rules['email'][] = Rule::unique(self::class)->ignore($this);\n else $rules['email'][] = Rule::unique(self::class);\n $rules['password'] = ['string', 'min:8', 'max_db_string'];\n return $rules;\n }", "public function rules()\n {\n $locale = defaultLanguage();\n $rules = [];\n $state = State::where('country_id', $this->country)->get()->toArray();\n\n $rules['institution.'.$locale.'.title'] = 'required';\n $rules['institution.'.$locale.'.description'] = 'required';\n $rules['type_id'] = 'required';\n $rules['country_id'] = 'required';\n $rules['city_id'] = 'required';\n $rules['national_ranking'] = 'required';\n $rules['global_ranking'] = 'required';\n $rules['youtube_url'] = 'required|url';\n $rules['image_name'] = 'required';\n\n if ($state) {\n $rules['state_id'] = 'required';\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 createValidation()\n {\n return [\n 'user_id' => ['required'],\n 'todo_name' => ['required', 'string'],\n 'todo_description' => ['required', 'string']\n ];\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|max:255',\n 'last_name' => 'required|string|max:255',\n 'user_type' => 'required|string',\n ];\n if ($this->method() == 'PUT') {\n $rules['email'] = 'required|string|email|max:255|unique:users,email,' . $this->route()->parameter('user');\n $rules['password'] = 'sometimes|string|' .config('rules.password');\n } else {\n $rules['email'] = 'required|string|email|max:255|unique:users';\n $rules['password'] = 'required|string|' .config('rules.password');\n }\n\n return $rules;\n }", "public function rules()\n {\n $id = $this->route($this->table);\n\n $condThumb = 'bail|required|max:1024';\n $condTitle = \"bail|required|between:5,150|unique:$this->table,title\";\n\n //rules for edit\n if (!empty($id)) {\n $condThumb = 'bail|max:1024';\n $condTitle .= \",$id\";\n }\n\n return [\n 'title' => $condTitle,\n 'tag' => 'bail|required',\n 'meta_description' => 'bail|required',\n 'content' => 'bail|required|min:5',\n 'status' => 'bail|in:0,1',\n 'is_highlight' => 'bail|in:0,1',\n 'thumbnail' => $condThumb,\n ];\n }", "public function createRules()\n {\n return [];\n }", "public function rules()\n {\n return [\n 'title' => ['required', 'string', 'max:64'],\n 'contents' => ['required', 'string'],\n 'user_id' => ['required', 'integer', new UserExists],\n 'status_id' => ['required', 'integer', new ValidArticleStatus],\n 'publication_date' => ['sometimes', 'required', 'date']\n ];\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 function rules() {\n $input = \\Input::get();\n $rules['font_size'] = 'required|integer|between:12,24';\n $rules['font_weight'] = (isset($input['font_weight'])) ? 'integer|between:100,700' : '';\n $rules['font_color'] = (isset($input['font_color'])) ? ['regex:/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/'] : '';\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'name' => ['required', new FullName],\n 'cellphone' => 'required | celular',\n ];\n\n // store\n if ($this->method() === \"POST\") {\n $rules['email'] = [\n 'required',\n 'email:filter',\n Rule::unique('patients')\n ];\n\n $rules['cpf'] = [\n 'required',\n 'cpf',\n 'formato_cpf',\n Rule::unique('patients')\n ];\n } // update\n else {\n $rules['email'] = [\n 'required',\n 'email:filter',\n Rule::unique('patients')->ignore($this->request->get('email'), 'email')\n ];\n\n $rules['cpf'] = [\n 'required',\n 'cpf',\n 'formato_cpf',\n Rule::unique('patients')\n ];\n }\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'name' => ['nullable', 'min:3', 'string', 'max:100'],\n 'email' => ['sometimes', 'email:rfc', 'min:8'],\n 'current_password' => ['sometimes', 'nullable', 'min:8', new MatchOldPassword],\n 'new_password' => ['sometimes', 'nullable', 'min:8'],\n 'confirm_new_password' => ['sometimes', 'same:new_password']\n ];\n\n return $rules;\n }", "public function validationRules() {\n\t\treturn [\t \n\t\t\t'nom'=>'required',\n\t\t\t'enonce'=>'required',\n\t\t\t'sur'=>'required'\n\t];\t\n\t}", "public function rules()\n {\n $rules = [];\n\n $rules['title'] = 'required|max:145';\n $rules['meta_title'] = 'required';\n // $rules['post_category_id'] = 'required';\n\n\n return $rules;\n }", "public function rules()\n {\n\t\t$validation = [\n\t\t\t'description' => 'required|max:140|string',\n\t\t\t'points' => 'required|numeric',\n\t\t\t'deadline'=> 'required',\n 'for_newcomer' => 'boolean'\n\t\t];\n\t\tif(isset($this->challengeId)) {\n\t\t\t$validation['name'] = 'required|unique:challenges,id,'.$this->challengeId;\n\t\t} else {\n\t\t\t$validation['name'] = 'required|unique:challenges';\n\t\t}\n return $validation;\n }", "public function rules() {\n\t\t$validation = [ ];\n\t\tswitch ($this->method ()) {\n\t\t\tcase 'POST' :\n\t\t\t\t$validation = [ \n\t\t\t\t\t\t'name' => 'required|max:255',\n\t\t\t\t\t\t'slug' => 'required|unique:games,slug|max:255',\n\t\t\t\t\t\t'logo' => 'required|image',\n\t\t\t\t\t\t'image' => 'required|image',\n\t\t\t\t\t\t'banner_image' => 'required|image',\n\t\t\t\t];\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'PUT' :\n\t\t\t\t$validation = [\n\t\t\t\t\t\t'name' => 'required|max:255',\n\t\t\t\t\t\t'slug' => 'sometimes|required||max:255|unique:games,id,'. $this->route()->getParameter('gameId'),\n\t\t\t\t];\n\t\t\t\t\n\t\t\t\tif($this->hasFile('logo')) {\n\t\t\t\t\t$validation[\"logo\"] = 'required|image';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->hasFile('image')) {\n\t\t\t\t\t$validation[\"image\"] = 'required|image';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->hasFile('banner_image')) {\n\t\t\t\t\t$validation[\"banner_image\"] = 'required|image';\n\t\t\t\t}\n\t\t\t\n\t\t\tdefault :\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $validation;\n\t}", "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 validation_rules()\n\t{\n\t\t// validation rules for create\n\t\t$this->create_validation_rules = array(\n\t\t\tarray(\n\t \t'field' => 'product_id',\n\t \t'rules' => 'required'\n\t ),\n\t array(\n\t \t'field' => 'user_id',\n\t \t'rules' => 'required'\n\t )\n );\n\n\t}", "public function defineValidationRules()\n {\n return [];\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 $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 getRules()\n\t{\n\t\t$rules['org_id']\t= ['required', 'integer', 'exists:'. app()->make(\\App\\Org::class)->getTable() . ',id'];\n\t\t$rules['name']\t\t= ['required', 'string', Rule::unique($this->getTable())->ignore($this->id)->where(function($q) { $q->where('org_id', '=', $this->org_id ? $this->org_id : -1); } ) ];\n\t\t$rules['code']\t\t= ['required', 'string', Rule::unique($this->getTable())->ignore($this->id)->where(function($q) { $q->where('org_id', '=', $this->org_id ? $this->org_id : -1); } ) ];\n\t\t// $rules['group']\t\t\t\t\t= ['required', 'string', 'in:'.implode(',', SELF::GROUP)];\n\t\t$rules['group']\t\t\t\t\t= ['required', 'string'];\n\t\t$rules['description']\t\t\t= ['nullable', 'string'];\n\t\t$rules['threshold']\t\t\t\t= ['nullable', 'numeric', 'min:0'];\n\t\t$rules['unit']\t\t\t\t\t= ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n return array(\n array('label', 'required'),\n array('label, type_id, template_name', 'safe')\n );\n }", "public function rules()\n {\n $pageId = $this->getPageIdFromRouteParameter();\n $pageTable = config('pages.table.name.page', 'page');\n\n return [\n 'slug' => \"max:255|unique:$pageTable,slug,$pageId\",\n 'name' => 'max:255|required',\n 'title' => 'max:255',\n ];\n }", "public function 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 $id = $this->route()->parameter('news');\n\n $regex = '/^.*\\.('.implode('|', config('image.allowed_image_extension')).')$/';\n\n $rules = [\n 'status' => 'required|boolean',\n 'slug' => 'unique:news,slug,'.$id.',id',\n 'position' => 'required|integer',\n 'image' => ['regex:'.$regex],\n 'publish_at' => 'date_format:d-m-Y',\n ];\n\n $languageRules = [\n 'name' => 'required',\n ];\n\n foreach (config('app.locales') as $locale) {\n foreach ($languageRules as $name => $rule) {\n $rules[$locale.'.'.$name] = $rule;\n }\n }\n\n return $rules;\n }", "public function rules()\n {\n $method = $this->method();\n switch ($method){\n case 'PUT':\n case 'PATCH':\n $rule_thumb_img = 'url';\n break;\n default:\n $rule_thumb_img = 'required|url';\n }\n return [\n 'title' => 'required|min:6|max:255',\n 'category_id' => 'array',\n 'category_id.*' => 'numeric',\n 'thumb_img' => $rule_thumb_img,\n 'published' => 'required|numeric'\n ];\n }", "public function rules() {\n // dd($this->all());\n $rules = [\n 'idSection' => 'required',\n 'workflowName' => 'required|between:2,50|regex:/^[\\pL\\s\\-()]+$/u'\n ];\n if(count($this->designations) == 0){\n $rules += ['designation'=>'required'];\n }\n return $rules;\n }", "public function rules()\n {\n $this->formObject();\n\n return $this->formObject()->rulesForStoring();\n }", "public function rules()\n {\n $rules = [\n 'title' => 'required|max:200',\n 'text' => 'required',\n 'tags' => 'array',\n ];\n\n //validacia pre pole hodnot\n $count= count($this->input('items'))-1;\n foreach (range(0,$count) as $index) {\n $rules[\"items.$index\"] = 'mimes:txt,pdf,doc,xls';\n }\n return $rules;\n }", "public function rules()\n {\n $rules = array();\n $rules['user_id'] = ['required'] ;\n $rules['value'] = ['required','numeric'] ;\n $rules['date'] = ['required',new GiftCartRule()] ;\n\n return $rules;\n }", "private static function getProductRules() {\n return array(\n 'price' => 'required',\n 'original_price' => 'required',\n 'quantity' => 'required',\n );\n }", "public function rules()\n {\n $rules = [\n 'src_path'=> 'required|string|max:255',\n 'number_id'=> 'required|string|max:255',\n ];\n\n return $rules;\n }", "public function rules()\n {\n $id = $this->route('variable');\n\n return [\n 'type' => 'required|in:'.implode(',', array_keys(Variable::$types)),\n 'key' => 'required|unique:variables,key,'.$id.',id',\n 'name' => 'required',\n 'multilingual' => 'required|boolean',\n ];\n }", "public function rules()\n {\n $states = implode(',', config('constants.listState'));\n\n $rules = [\n 'name' => 'required',\n 'cpf' => 'required|min:14|max:14',\n 'rg' => 'required_if:state,SP',\n 'birth_date' => 'required|date|after_or_equal:'.now()->addYears(-123)->format(\"Y-m-d\"),\n 'phone' => 'required|min:14|max:15',\n 'state' => 'required|in:' . $states\n ];\n\n if(request()->get('state') == 'BA') {\n $rules['birth_date'] = 'required|date|before_or_equal:'.now()->subYears(18)->format(\"Y-m-d\").'|after_or_equal:'.now()->addYears(-123)->format(\"Y-m-d\");\n }\n\n return $rules;\n }", "public function rules()\n {\n return [\n 'name' => 'required',\n\t\t\t'email' => 'required|email',\n\t\t\t'tel' => 'required',\n\t\t\t'content' => 'required',\n ];\n }", "public function rules()\n {\n return [\n 'description' => ['required', 'string', 'max:255'],\n 'source' => ['required','max:10000','mimes:doc,docx,png,jpg,ico,pdf'],\n 'subject' => ['required'],\n 'school' => ['required']\n ];\n }", "public function rules()\n {\n $research = $this->route('research');\n $researchId = $research instanceof Research ? $research->id : null;\n\n $rules = [\n 'title' => 'required',\n 'description' => 'required',\n 'year' => 'required|numeric',\n 'image'=>'image|mimes:png,jpg,jpeg|max:10000'\n ];\n\n return $rules;\n }", "public function rules()\n {\n return [\n 'name' => ['required', 'max:80', 'string'],\n 'lastname' => ['required', 'max:80', 'string'],\n 'email' => ['required', 'email', 'unique:users,email'],\n 'document' => ['required', 'unique:documents,document', 'digits_between:5,50', 'numeric'],\n 'document_type_id' => ['required', 'exists:document_types,type'],\n 'role' => ['required', 'exists:roles,name']\n ];\n }", "public function rules()\n {\n $rules = [\n 'title' => \"required|min:4|max:255\",\n 'summary' => \"required|min:5|max:255\",\n 'slug' => \"nullable|min:3|max:255\",\n 'description' => \"required|min:50|max:1000\",\n 'cover' => \"nullable|image\",\n ];\n\n foreach ($this->request->get('tag') ?? [] as $key => $val) {\n $rules[\"tag.{$key}\"] = Rule::exists('tags', 'id')->where('id', $val);\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'title' => 'required|min:3',\n 'description' => 'required|min: 2',\n 'price' => 'required|numeric',\n 'img' => 'required',\n 'category_id' => 'required'\n ];\n\n if($this->route()->named('products.update')){\n $rules['img'] = '';\n }\n\n return $rules;\n }", "public function rules()\n {\n $validations = array(\n 'time' => 'required|is_valid_esc_time' ,\n 'date' => 'required|is_valid_esc_date:' . $this->input('time'),\n 'coins' => 'required|numeric|min:1|check_coins_balance',\n 'game_type' => 'required'\n );\n \n return $validations;\n }", "public function rules()\n {\n $rules = [\n 'text' => 'required',\n 'url' => 'required_if:custom_url,1',\n 'model_type' => 'required_without:custom_url|in:' . join(',', array_keys(Configuration::$modelTypeClass))\n ];\n\n foreach(Configuration::$modelTypeClass as $type => $class){\n $rules[\"{$type}_id\"] = \"required_if:model_type,{$type}|exists:\" . $class::getTableName() . \",id\";\n }\n\n return $rules;\n }", "public function rules()\r\n {\r\n return [\r\n 'document_type_id' => 'required',\r\n 'date_of_expiry' => 'required|date',\r\n 'title' => 'required',\r\n 'attachments' => 'required|mimes:'.config('config.allowed_upload_file')\r\n ];\r\n }", "public function rules() {\n return array_merge(parent::rules(),\n ['feedback_contents_template' => 'required|validFeedbackContentWithoutObservations']\n );\n }", "public function getValidationRulesUpdate(): array;", "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 static function storeRules($id = null)\n {\n $rules = [\n\t\t\t 'email_temp_subject' => 'string|max:191',\n\t\t\t 'email_temp_message' => 'required|string',\n\t\t\t 'email_place_holder' => 'required|string|max:191',\t\n 'email_temp_status' => 'required|in:0,1',\t\t\t \n ];\n if ( empty( $id ) ) {\n $rules['email_temp_name'] = 'required|string|max:191|unique:email_template';\n } else {\n $rules['email_temp_name'] = 'required|string|max:191|unique:email_template,email_temp_name,'.$id.',email_temp_id';\n }\n return $rules;\n }", "public function rules()\n {\n if($this->atts['apply'] == 'job')\n return [\n 'cv' => 'required|mimes:doc,pdf,docx',\n 'full_name' =>'required',\n 'email' =>'required|email',\n 'contact' => 'required' \n ];\n return [ \n 'full_name' =>'required',\n 'email' =>'required|email',\n 'contact' => 'required' \n ];\n\n }", "public function rules()\n {\n $rules=[\n\n 'country_id'=>['required','exists:countries,id'],\n 'city_id'=>['required','exists:cities,id']\n ];\n foreach (config('translatable.locales') as $locale) {\n\n $rules += $this->isMethod('post') ? [$locale . '.name' => ['required','unique:state_translations,name']]: [$locale . '.name' => ['required', Rule::unique('state_translations', 'name')->ignore($this->state->id,'state_id')]];\n\n }\n\n return $rules;\n }", "public function rules(): array\n {\n return [\n 'country_id' => ['required', 'integer', Rule::exists(Country::class, 'id')],\n 'first_name' => 'required|string|min:1|max:100',\n 'last_name' => 'required|string|min:1|max:100',\n 'hourly_rate' => 'required|numeric',\n 'language_id' => ['required', 'integer', Rule::exists(Language::class, 'id')],\n 'language_grade_id' => ['required', 'integer', Rule::exists(LanguageGrade::class, 'id')],\n 'subject_taught_id' => ['required', 'integer', Rule::exists(Specialty::class, 'id')],\n ];\n }", "public function rules()\n {\n $validate = [\n 'current_password' => [\n 'required',\n new MatchOldPassword\n ],\n 'new_password' => [\n 'required',\n 'min:6'\n ],\n 're_new_password' => [\n 'required',\n 'same:new_password'\n ],\n ];\n\n return $validate;\n }" ]
[ "0.69360214", "0.6770968", "0.66850615", "0.6679349", "0.6650378", "0.6612521", "0.65746075", "0.6534229", "0.64624435", "0.6462079", "0.644864", "0.64410067", "0.64383787", "0.6412144", "0.64084834", "0.64062905", "0.6388644", "0.6372055", "0.63683176", "0.6362413", "0.6344432", "0.63144815", "0.63124", "0.6280259", "0.6279237", "0.62749505", "0.6273592", "0.6262164", "0.6261834", "0.6250995", "0.6241002", "0.6239736", "0.6226846", "0.62152135", "0.6209705", "0.6201376", "0.6188521", "0.61882555", "0.6186816", "0.6181633", "0.6174394", "0.61613554", "0.61543274", "0.6147879", "0.61404663", "0.612946", "0.6111869", "0.61082655", "0.6107701", "0.61071455", "0.61062413", "0.6101083", "0.60973316", "0.6095087", "0.6094081", "0.60918796", "0.60914034", "0.60876656", "0.60824955", "0.6081096", "0.60795826", "0.60766846", "0.606895", "0.6056321", "0.6050463", "0.604924", "0.6047448", "0.60426825", "0.60394853", "0.6034171", "0.603048", "0.60237235", "0.60217893", "0.6013126", "0.6007547", "0.6005841", "0.60047", "0.5996722", "0.599454", "0.59885377", "0.59840024", "0.5983572", "0.59792775", "0.59774375", "0.5977307", "0.59707886", "0.59706944", "0.5967347", "0.5967315", "0.5965974", "0.59650654", "0.5964264", "0.59567124", "0.5954048", "0.59521955", "0.5946783", "0.5946616", "0.59444886", "0.5943625", "0.5942559" ]
0.647067
8
Get validation rules for updating a template
public function getValidationRulesUpdate(): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUpdateRules()\n {\n return [\n \"id\" => \"required\"\n ];\n }", "public function getRulesForUpdate()\r\n\t{\r\n\t \treturn $this->rules_for_update ? $this->rules_for_update : array();\r\n\t}", "abstract protected function getValidationRules();", "public function getValidationUpdateRules(): array\n {\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}", "private function getRules()\n {\n return array(\n 'name' => new Pattern\\Name,\n 'height' => new Pattern\\Height,\n 'lat' => array(\n 'required' => true,\n 'rules' => array('Latitude')\n ),\n 'lng' => array(\n 'required' => true,\n 'rules' => array('Longitude')\n ),\n 'api_key' => array(\n 'required' => true,\n 'rules' => array(\n 'NotEmpty' => array(\n 'message' => 'Google API key can not be empty'\n )\n )\n ),\n 'style' => array(\n 'required' => false,\n 'rules' => array('Json')\n )\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 }", "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 $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 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 }", "protected function updateValidations()\n {\n switch (Input::get('form')) {\n\n case 'user-basic':\n $rules = [\n 'name' => 'required|max:50',\n 'last_name' => 'nullable|max:50',\n 'description' => 'nullable|max:1200',\n ];\n break;\n case 'user-update':\n $rules = [\n 'username' => 'required|max:18|alpha_num',\n 'name' => 'required|max:50',\n 'last_name' => 'nullable|max:50',\n 'email' => 'required|email|max:100',\n 'status' => 'required|integer',\n 'description' => 'nullable|max:1200',\n 'roles' => 'nullable|array',\n ];\n break;\n case 'password-update':\n $rules = [\n 'old_password' => 'required|alpha_dash|max:18',\n 'password' => 'required|alpha_dash|confirmed|different:old_password|max:18',\n 'password_confirmation' => 'required|alpha_dash|max:18',\n ];\n break;\n case 'avatar-update':\n $rules = [\n 'avatar' => 'required|image|max:1024',\n ];\n break;\n default:\n $rules = [];\n }\n return $rules;\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "private function updateRules()\n {\n return [\n 'data.type' => 'required|in:events',\n 'data.attributes.name' => 'max:30|min:5',\n 'data.attributes.description' => 'min:1|max:255',\n 'data.attributes.date' => 'date',\n 'data.relationships.users' => 'required_with:data.relationships',\n 'data.relationships.users.data.*.type' => 'required_with:data.relationships|in:users',\n 'data.relationships.users.data.*.id' => 'required_with:data.relationships|numeric'\n ];\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public static function validationRulesNew()\n {\n return [\n 'name' => 'required|unique:faucets,name|min:5',\n 'url' => 'required|unique:faucets,url',\n 'interval_minutes' => 'required|integer',\n 'min_payout' => 'required|numeric',\n 'max_payout' => 'required|numeric',\n 'faucet_payment_processors[]' => 'each:exists,faucet_payment_processors, id',\n 'has_ref_program' => 'required|boolean',\n 'ref_payout_percent' => 'required|numeric|min:0',\n 'comments' => 'string',\n 'is_paused' => 'required|boolean',\n 'meta_title' => 'string|max:70',\n 'meta_description' => 'string|max:160',\n 'meta_keywords' => 'string|max:255'\n ];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n $rules = [];\n $rules[ 'color' ] = 'required';\n $rules[ 'number' ] = 'required';\n $rules[ 'transmission' ] = 'required|numeric|gt:0';\n $rules[ 'model' ] = 'required|numeric|gt:0';\n $rules[ 'rent_price_per_day' ] = 'required';\n $rules[ 'year' ] = 'required';\n\n $data = $this->validationData();\n \n $method = $this->method();//POST || PUT\n\n //update -> PUT \n if ( $method === \"PUT\" )\n {\n if ( isset( $data[ 'fileuploader-list-file' ] ) && !empty( $data[ 'fileuploader-list-file' ] ) )\n {\n $rules[ 'file.*' ] = 'required|mimes:jpeg,jpg,png|max:1024';\n }\n } else\n {\n $rules[ 'file.*' ] = 'required|mimes:jpeg,jpg,png|max:1024';\n $rules[ 'fileuploader-list-file' ] = 'required';\n }\n\n return $rules;\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "abstract public function getValidationRules(): array;", "public function getValidationRules()\n {\n return [];\n }", "public function updateRules(): array\n {\n return [\n 'Universidad' => 'required|string|min:2|max:20',\n 'carrera' => 'required|string|min:2|max:50',\n ];\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 }", "public function getUpdateValidators()\n {\n $validators = $this->getCreateValidators();\n $validators['author_type_id'] = new sfValidatorDoctrineChoice(array(\n 'model' => Doctrine_Core::getTable('Deadline')->getRelation('AuthorType')->getAlias(),\n 'required' => false,\n ));\n $validators['subreddit_id'] = new sfValidatorDoctrineChoice(array(\n 'model' => Doctrine_Core::getTable('Deadline')->getRelation('Subreddit')->getAlias(),\n 'required' => false,\n ));\n return $validators;\n }", "public function getValidationCreateRules(): array\n {\n }", "public function getRules()\n {\n return $this->validation_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}", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n $id = $this->route()->parameter('widget');\n\n $rules = [\n //'reference' => 'required|min:2|unique:widgets',\n 'module_id' => 'required|numeric',\n 'placement' => 'required',\n 'order_column' => 'required',\n 'order_column_type' => 'required',\n 'type' => 'required',\n 'select_type' => 'required',\n 'number_for_latest' => 'numeric|nullable',\n // 'order' => 'nullable|numeric',\n 'is_active' => 'required|boolean'\n ];\n\n if (request()->method() == 'POST') {\n $rules['reference'] = 'required|min:2|unique:' . (new Widget())->getTable() . ',reference';\n } else {\n // $rules['reference'] = 'required|min:2|unique:' . (new Widget())->getTable() . ',reference,' . $id . ',id';\n }\n\n foreach (config('translatable.locales') as $k => $locale) {\n $rules[$locale . '.name'] = 'required|min:3';\n // $rules[$locale . '.description'] = 'nullable|min:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $dynamic_rules = [\n 'company_name' => 'required|string|min:1|max:255',\n 'company_email' => 'nullable|email|max:400',\n 'company_website' => 'nullable|url|max:200',\n 'company_logo_upload' => 'nullable|image',\n ];\n\n if ($this->routeIs(\"*.update\")) {\n return array_merge($dynamic_rules, [\n 'company_name' => 'filled|string|min:1|max:255',\n ]);\n }\n\n return $dynamic_rules;\n }", "public static function getUpdateRules($id) \n {\n $_rules = self::$rules;\n $_rules['email'] = 'email|required|unique:users,email,'.(int)$id;\n\n return $_rules;\n }", "public function get_validation_rules() {\n\t\t$field = $this->field;\n\t\t$id = self::get_property( 'element_id', $field );\n\t\t$is_required = $this->is_required( $field );\n\t\t$post_image = self::get_property( 'post_image', $field, '' );\n\t\t$post_type = self::get_property( 'post_type', $field, 'post' );\n\t\t$post_image_enabled = ! empty( $post_image );\n\t\t$rules = '';\n\n\t\tif ( $is_required && $post_image_enabled ) {\n\t\t\t$rules .= '\"' . $this->get_id( $field ) . '-post-image\": {';\n\t\t\tif ( $is_required ) {\n\t\t\t\t$rules .= '\"required\": true,';\n\t\t\t}\n\t\t\t$rules .= '},';\n\t\t}\n\t\t$category_list = forminator_post_categories( $post_type );\n\t\tif( ! empty( $category_list ) ) {\n\t\t\tforeach ( $category_list as $category ) {\n\t\t\t\t$post_category_enabled = self::get_property( $category['value'], $field, '' );\n\t\t\t\tif ( $is_required && $post_category_enabled ) {\n\t\t\t\t\t$rules .= '\"' . $this->get_id( $field ) . '-' . $category['value'] . '[]\": {';\n\t\t\t\t\tif ( $is_required ) {\n\t\t\t\t\t\t$rules .= '\"required\": true,';\n\t\t\t\t\t}\n\t\t\t\t\t$rules .= '},';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn apply_filters( 'forminator_field_postdata_validation_rules', $rules, $id, $field );\n\t}", "private function validationRules()\n {\n return [\n 'newPassword' => [\n new PasswordRule($this->newPasswordConfirmation),\n ],\n 'currentPassword' => [\n 'required',\n new PasswordCheckRule($this->user),\n ],\n ];\n }", "public function getRules() {\n return [\n 'complex_id' => 'required|exists:complexes,id',\n 'name' => 'required',\n 'description' => 'required',\n 'price' => 'required',\n 'price_type' => 'required',\n 'price_unit' => 'required',\n ];\n }", "public function rules()\n\t{\n\t\tif($projects = $this->projects){\n\n\t\t\t// Validate on updating\n\t\t}\n\n\t\treturn $this->rules;\n\t}", "public function getRules()\n {\n return [\n 'title' => ['requiredFill', 'trim', 'htmlSpecialChars', 'len100'],\n 'content' => ['requiredFill', 'htmlSpecialChars'],\n 'categoryId' => ['requiredFill', 'isInteger'],\n ];\n }", "public function rules()\n {\n $rules = [\n // 'status' => 'required',\n ];\n\n $languages = Language::where('status', 1)->sorted()->get();\n foreach ($languages as $language) {\n $rules[$language->locale. '.title'] = 'required';\n $rules[$language->locale. '.description'] = 'required';\n }\n\n if ($this->isMethod('PATCH')) {\n $rules['photo'] = 'image';\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 rules()\n {\n $rules = [\n 'name' => 'required|string|max:255',\n 'last_name' => 'required|string|max:255',\n 'user_type' => 'required|string',\n ];\n if ($this->method() == 'PUT') {\n $rules['email'] = 'required|string|email|max:255|unique:users,email,' . $this->route()->parameter('user');\n $rules['password'] = 'sometimes|string|' .config('rules.password');\n } else {\n $rules['email'] = 'required|string|email|max:255|unique:users';\n $rules['password'] = 'required|string|' .config('rules.password');\n }\n\n return $rules;\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 }", "public function validationRules()\n {\n return [];\n }", "public function validationRules()\n {\n return [];\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 }", "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 $rules = [\n 'enabled' => 'required',\n 'order' => 'required|numeric',\n 'last_modified_by' => 'required'\n ];\n\n\n if ($this->isMethod('PUT')) {\n $region = $this->segment(4) ? Region::find($this->segment(4)) : NULL;\n\n if ($region) {\n $rules['region_name'] = ['required', 'max:60', 'min:2', Rule::unique('regions')->ignore($region->id)];\n }\n } else {\n $rules['region_name'] = 'required|unique:regions|max:60|min:2';\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->input(\"_method\") == \"PUT\")\n return [\n \"first_name\" => \"required|min:5\",\n \"last_name\" => \"required|min:5\",\n \"update_email\" => \"required|email|sometimes:unique:users\",\n \"password\" => \"sometimes|required|min:8\",\n \"password_verify\" => \"sometimes|required|same:password\"\n ];\n\n return [\n \"first_name\" => \"required|min:4\",\n \"last_name\" => \"required|min:4\",\n \"email\" => \"required|email|unique:users\",\n \"password\" => \"sometimes|required|min:8\",\n \"password_verify\" => \"sometimes|required|same:password\"\n ];\n\n }", "public function rules()\n {\n $rules = [\n 'title' => 'required|min:3',\n 'description' => 'required|min: 2',\n 'price' => 'required|numeric',\n 'img' => 'required',\n 'category_id' => 'required'\n ];\n\n if($this->route()->named('products.update')){\n $rules['img'] = '';\n }\n\n return $rules;\n }", "public function rules()\n {\n $method = $this->method();\n switch ($method){\n case 'PUT':\n case 'PATCH':\n $rule_thumb_img = 'url';\n break;\n default:\n $rule_thumb_img = 'required|url';\n }\n return [\n 'title' => 'required|min:6|max:255',\n 'category_id' => 'array',\n 'category_id.*' => 'numeric',\n 'thumb_img' => $rule_thumb_img,\n 'published' => 'required|numeric'\n ];\n }", "public function rules()\n {\n $new_user = $this->route()->getName() != \"admin-users.update\";\n\n return [\n 'name' => 'required|max:50|min:2',\n 'email' => 'required' . ($new_user ? '|unique:users' : ''),\n 'password' => ($new_user ? 'required|' : '') . 'min:2'\n ];\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 $rule = [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'birthday' =>'required|before:today',\n 'email' => 'required|regex:/(.+)@(.+)\\.(.+)/i|email|unique:customers',\n 'phone' =>'required|regex:/(0)[0-9]/|digits_between:10,15',\n ];\n \n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n \n $rule['email'] = 'required|regex:/(.+)@(.+)\\.(.+)/i|unique:customers,email,'.$this->customer['id'];\n }\n\n return $rule;\n \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 getRules()\n {\n // Set the validation rules.\n $rules = [\n 'party_id' => 'integer|required|exists:pgsql.core.parties,id',\n 'bank_id' => 'integer|required|exists:pgsql.core.banks,id',\n 'currency_id' => 'integer|required|exists:pgsql.core.currencies,id',\n 'first_name' => 'string|required|max:50',\n 'last_name' => 'string|required|max:50',\n 'last_name' => 'string|nullable|max:255',\n 'type' => 'string|nullable|in:savings,current',\n 'class' => 'string|nullable|in:personal,business',\n ];\n\n // Add the account number check if it's a new record.\n if (!$this->exists) {\n $rules['account_number'] = 'string|required|max:100|unique:pgsql.core.bank_accounts,account_number,NULL,id,bank_id,' . $this->bank_id;\n }\n\n return $rules;\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 }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'email' => 'required|unique:users',\n 'password' => 'required|min:8',\n ];\n\n if ($this->method() === 'PUT') {\n $rules['email'] = 'required|unique:users,id,'.$this->id;\n $rules['password'] = 'min:8';\n }\n\n return $rules;\n }", "public function validation_rules() {\r\n\t\t$class = __CLASS__;\r\n\t\treturn $class::_object()->validates;\r\n }", "public function rules()\n {\n $id = $this->route($this->table);\n\n $condThumb = 'bail|required|max:1024';\n $condTitle = \"bail|required|between:5,150|unique:$this->table,title\";\n\n //rules for edit\n if (!empty($id)) {\n $condThumb = 'bail|max:1024';\n $condTitle .= \",$id\";\n }\n\n return [\n 'title' => $condTitle,\n 'tag' => 'bail|required',\n 'meta_description' => 'bail|required',\n 'content' => 'bail|required|min:5',\n 'status' => 'bail|in:0,1',\n 'is_highlight' => 'bail|in:0,1',\n 'thumbnail' => $condThumb,\n ];\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 rules()\n {\n if ($this->request->get('action') == 'edit') {\n $valid = array(\n\n 'expensive_for' => 'required|',\n 'budget_category_id' => 'required|',\n 'budget_subcategory_id' => 'required|',\n 'expensive_quantity' => 'required|',\n 'expensive_rate' => 'required|',\n 'specifications' => 'required|',\n );\n } else {\n $valid = array(\n 'expensive_for' => 'required|',\n 'budget_category_id' => 'required|',\n 'budget_subcategory_id' => 'required|',\n 'expensive_quantity' => 'required|',\n 'expensive_rate' => 'required|',\n 'specifications' => 'required|',\n );\n }\n return $valid;\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email',\n 'password' => 'required|min:6|confirmed',\n ];\n\n $method = $this->method();\n $route = $this->route(static::$PARAM_ID);\n if ($route) {\n $user_id = $route->id;\n switch ($method) {\n case 'PUT':\n $rules['email'] = \"{$rules['email']},$user_id\";\n break;\n case 'PATCH': {\n $rules['name'] = 'sometimes|max:255';\n $rules['email'] = \"{$rules['email']},$user_id\";\n $rules['password'] = 'sometimes|min:6|confirmed';\n break;\n }\n default: {\n break;\n }\n }\n }\n\n return $rules;\n }", "public function rules() {\n $input = \\Input::get();\n $rules['font_size'] = 'required|integer|between:12,24';\n $rules['font_weight'] = (isset($input['font_weight'])) ? 'integer|between:100,700' : '';\n $rules['font_color'] = (isset($input['font_color'])) ? ['regex:/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/'] : '';\n return $rules;\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\r\n {\r\n switch ($this->method()) {\r\n case 'PUT':\r\n case 'PATCH':\r\n {\r\n return [\r\n 'post_code' =>['required'],\r\n 'building_name_no' => ['required',],\r\n 'street' => ['required',],\r\n 'town' => ['required',],\r\n 'first_name' => 'required',\r\n 'last_name' => 'required|regex:/^[a-zA-Z]+$/u|max:255',\r\n 'email' => 'required|email|unique:users',\r\n 'password' => ['required',],\r\n 'phone_number' => 'required',\r\n\r\n ];\r\n }\r\n default:\r\n break;\r\n }\r\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 $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 $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules() {\n\t\t$action_method = $this->route()->getActionMethod();\n\t\t$rules = [\n\t\t\t'name' => 'required',\n\t\t\t'description' => 'required',\n\t\t\t'file_category_id' => 'required',\n\t\t];\n\n\t\tif ( $action_method === 'store' ) {\n\t\t\t$rules['file_upload'] = 'required';\n\t\t}\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n $rules = [\n 'first_name' => 'required|string|between:3,255',\n 'last_name' => 'required|string|between:3,255',\n 'avatar' => 'sometimes|mimes:png,jpg,jpeg|max:1024',\n 'email' => 'not_present',\n 'type' => 'not_present',\n 'status' => 'not_present',\n 'branches' => 'not_present',\n 'is_main_admin' => 'not_present',\n ];\n\n if ($this->has('current_password') && $this->current_password) {\n $rules['current_password'] = 'required|pass_check';\n $rules['new_password'] = 'required|alpha_num_pwd|confirmed';\n $rules['new_password_confirmation'] = 'required';\n }\n\n return $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 }", "protected function updateValidation()\n {\n return [\n 'todo_name' => ['required', 'string'],\n 'todo_description' => ['required', 'string']\n ];\n }", "public function rules()\n\t{\n\t\t$rules = [\n\t\t\t'price' => 'required',\n\t\t\t'currency' => 'required',\n\t\t\t'name' => 'required|min:10|max:120',\n\t\t\t'content' => 'required|min:10',\n\t\t\t'gearbox' => 'required',\n\t\t\t'year' => 'required|min:2',\n\t\t\t'colour' => 'required|min:2',\n\t\t\t/*'g-recaptcha-response' => 'required|recaptcha',*/\n\t\t];\n\n\t\treturn $rules;\n\t}", "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 {\n $id = $this->request->get('id');\n\n if($this->request->get('statusChange')){\n return [];\n }\n return [\n 'title' => 'required|max:75',\n 'url' => 'max:100|unique:pages,url,'.$id,\n 'meta_title' => 'max:75',\n 'meta_keywords' => 'max:250',\n 'meta_description' => 'max:200',\n ];\n }", "public function getRules()\n\t{\n\t\t$rules['org_id']\t= ['required', 'integer', 'exists:'. app()->make(\\App\\Org::class)->getTable() . ',id'];\n\t\t$rules['name']\t\t= ['required', 'string', Rule::unique($this->getTable())->ignore($this->id)->where(function($q) { $q->where('org_id', '=', $this->org_id ? $this->org_id : -1); } ) ];\n\t\t$rules['code']\t\t= ['required', 'string', Rule::unique($this->getTable())->ignore($this->id)->where(function($q) { $q->where('org_id', '=', $this->org_id ? $this->org_id : -1); } ) ];\n\t\t// $rules['group']\t\t\t\t\t= ['required', 'string', 'in:'.implode(',', SELF::GROUP)];\n\t\t$rules['group']\t\t\t\t\t= ['required', 'string'];\n\t\t$rules['description']\t\t\t= ['nullable', 'string'];\n\t\t$rules['threshold']\t\t\t\t= ['nullable', 'numeric', 'min:0'];\n\t\t$rules['unit']\t\t\t\t\t= ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "private function getValidation() {\n return [\n 'title' => 'required|min:4|max:50',\n 'poster' => 'required|max:255',\n 'price' => 'required',\n 'start_date' => 'required',\n ];\n }", "public function validationRules() {\n\t\treturn [\t \n\t\t\t'nom'=>'required',\n\t\t\t'enonce'=>'required',\n\t\t\t'sur'=>'required'\n\t];\t\n\t}", "public function getValidationRulesJs()\n {\n $rules = $this->Model->validationRulesJS;\n // Hook Filter modifyValidationRulesJS\n $rules = $this->doFilter(\"modifyValidationRulesJS\", $rules);\n return $rules;\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 function defineValidationRules()\n {\n return [];\n }", "public function rules()\n {\n $arrRule = [\n 'timestamp' => 'required'\n ];\n\n if($this->is('api/timestamp/customize')){\n $arrRule = [\n 'customize.timezone' => 'required|timezone',\n 'customize.format' => 'required'\n ];\n }\n return $arrRule;\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 }", "protected static function getEditQuestionRules()\n {\n return parent::getEditQuestionRules();\n }", "public function rules(): array\n {\n $rules = new ValidationRules();\n\n return [\n 'title' => \"required|min:{$rules->string_min}|max:{$rules->string_max}\",\n 'description' => \"max:{$rules->string_max}\",\n 'division_id' => 'required|exists:divisions,id',\n 'emails' => 'required',\n 'tags' => 'required',\n 'short_content' => \"required|min:{$rules->string_min}\",\n 'full_content' => \"required|min:{$rules->string_min}\",\n 'position' => \"integer|min:{$rules->position_min}|max:{$rules->position_max}\"\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 {\n $validate = [\n 'current_password' => [\n 'required',\n new MatchOldPassword\n ],\n 'new_password' => [\n 'required',\n 'min:6'\n ],\n 're_new_password' => [\n 'required',\n 'same:new_password'\n ],\n ];\n\n return $validate;\n }", "public function rules()\n {\n switch(Route::currentRouteName()) {\n case 'permission.store':\n return [\n 'txt_permission_name' => 'required|min:2|unique:t_kms_permission,c_permission_name',\n 'txt_permission_display' => 'required|min:2',\n 'txt_permission_description' => 'required',\n ];\n case 'permission.update':\n return [\n 'txt_permission_name' => 'required|min:2|unique:t_kms_permission,c_permission_name,'.$this->get('txt_permission_id').',c_permission_id',\n 'txt_permission_display' => 'required|min:2',\n 'txt_permission_description' => 'required',\n ];\n default:break;\n }\n }", "public function rules()\n {\n $request = Request::all();\n switch ($this->method()) {\n case 'POST': //create\n if (Request::has('id')) { //更新\n return [\n 'title' => 'bail|required|string|max:30',\n 'api' => 'nullable|unique:auth_rules,api,' . $request['id'] . '|string|max:200',\n 'pid' => 'required|array',\n ];\n } else {\n return [\n 'title' => 'bail|required|string|max:30',\n 'api' => 'nullable|unique:auth_rules|string|max:200',\n 'pid' => 'required|array',\n ];\n }\n case 'GET':\n default:\n {\n return [];\n }\n }\n }", "public static function getFormValidationRules(): array {\n return [\n 'title' => ['required', 'string', 'max:' . AppConstants::INDEXED_STRINGS_MAXIMUM_LENGTH, 'min:' . AppConstants::STRINGS_MINIMUM_LENGTH],\n 'startDate' => ['required', 'date', 'after_or_equal:today'],\n 'endDate' => ['required', 'date', 'after_or_equal:startDate'],\n 'price' => ['required', 'numeric', 'max:' . AppConstants::INTEGER_MAXIMUM_VALUE],\n // 'major_id' => ['required', 'exists:majors,id'],\n 'city_id' => ['required', 'exists:cities,id'],\n 'cityExistImportance' => ['required', 'in:' . implode(\",\", CompanyTask::CITY_EXIST_IMPORTANCE)],\n// 'major' => ['nullable', 'string', 'max:' . AppConstants::STRINGS_MAXIMUM_LENGTH, 'min:' . AppConstants::STRINGS_MINIMUM_LENGTH],\n 'price' => ['required', 'numeric', 'gte:50'],\n 'pricePaymentType' => ['required', 'in:' . implode(\",\", CompanyTask::PRICE_PAYMENT_TYPE)],\n 'type' => ['required', 'in:' . implode(\",\", CompanyTask::TYPE)],\n // 'workHoursCount' => ['required_if:type,==,part_time' . ((request()->all('workHoursCount') !== null) ? \", 'numeric', 'gte:1', 'lte:24'\" : \"\")],\n 'workHoursFrom' => ['required_if:type,==,part_time' . ((request()->all('workHoursFrom') !== null) ? \", 'date_format:H:i:s a'\" : \"\")],\n 'workHoursTo' => ['required_if:type,==,part_time' . ((request()->all('workHoursTo') !== null) ? \", 'date_format:H:i:s a', 'after:workHoursFrom'\" : \"\")],\n 'workDaysCount' => ['required_if:type,==,part_time' . ((request()->all('workDaysCount') !== null) ? ', in:' . implode(',', range(1, 5)) : '')],\n 'location' => ['required_if:type,==,part_time' . ((request()->all('location') !== null) ? ', string' : '')],\n 'requiredNumberOfUsers' => ['nullable', 'numeric', 'gte:1', 'max:' . AppConstants::SMALL_INTEGER_MAXIMUM_VALUE],\n 'briefDescription' => ['required', 'string', 'max:' . AppConstants::TEXT_MAXIMUM_LENGTH, 'min:' . AppConstants::STRINGS_MINIMUM_LENGTH],\n 'fullDescription' => ['required', 'string', 'max:' . AppConstants::TEXT_MAXIMUM_LENGTH, 'min:' . AppConstants::STRINGS_MINIMUM_LENGTH],\n 'language' => ['required', 'array', 'min:1', 'in:' . implode(\",\", CompanyTask::LANGUAGE)],\n// 'language.*' => ['required', 'string', 'in:' . implode(\",\", CompanyTask::LANGUAGE)],\n 'willTakeCertificate' => ['required', 'in:' . implode(\",\", array_keys(\\App\\AppConstants::getYesNoOptions()))],\n 'majors' => 'required|array|min:1',\n 'majors.*' => 'exists:majors,id',\n ];\n }", "public function rules()\n {\n $locale = defaultLanguage();\n $rules = [];\n $state = State::where('country_id', $this->country)->get()->toArray();\n\n $rules['institution.'.$locale.'.title'] = 'required';\n $rules['institution.'.$locale.'.description'] = 'required';\n $rules['type_id'] = 'required';\n $rules['country_id'] = 'required';\n $rules['city_id'] = 'required';\n $rules['national_ranking'] = 'required';\n $rules['global_ranking'] = 'required';\n $rules['youtube_url'] = 'required|url';\n $rules['image_name'] = 'required';\n\n if ($state) {\n $rules['state_id'] = 'required';\n }\n return $rules;\n }", "public function rules()\n {\n $flowRepository = new FlowRepository();\n if ($this->has('step_run_id') && intval($this->step_run_id)) {\n //通过 预提交\n $this->step = $flowRepository->getCurrentStep($this->step_run_id);\n } else {\n //发起 预提交\n $this->step = $flowRepository->getFlowFirstStep($this->flow_id);\n }\n\n $basicRules = [\n 'flow_id'=>[\n Rule::exists('flows','id')->where('is_active',1)\n ],\n 'step_run_id' => [\n Rule::exists('step_run', 'id')->where('flow_id', $this->flow_id)\n ],\n 'form_data' => [\n 'present',\n 'array',\n ],\n ];\n $fieldsRules = app('validation')->makeStepFormValidationRules($this->step,$this);\n return array_collapse([$basicRules, $fieldsRules]);\n }", "private function getValidationRules(): array\n {\n return [\n 'year_month' => new Assert\\DateTime(\n [\n 'format' => 'Y-m',\n 'message' => 'Unexpected $yearMonth value. `Y-m` format is expected.',\n ]\n ),\n 'months_count' => new Assert\\Range(\n [\n 'min' => 1,\n 'max' => 12,\n 'minMessage' => 'Months count must be at least {{ limit }}',\n 'maxMessage' => 'Months count must not be greater than {{ limit }}',\n ]\n ),\n ];\n }", "protected function validationRules(): array\n {\n return [\n 'publicId' => 'required',\n 'paymentType' => 'required|numeric|between:1,8',\n 'payments' => 'required'\n ];\n }", "public static function getRules() {\n return [\n 'title' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'author' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'description' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'price' => FILTER_VALIDATE_FLOAT,\n 'year' => [\n 'filter' => FILTER_VALIDATE_INT,\n 'options' => [\n 'min_range' => 1800,\n 'max_range' => date(\"Y\")\n ]\n ]\n ];\n }", "public function rules()\n {\n $states = implode(',', config('constants.listState'));\n\n $rules = [\n 'name' => 'required',\n 'cpf' => 'required|min:14|max:14',\n 'rg' => 'required_if:state,SP',\n 'birth_date' => 'required|date|after_or_equal:'.now()->addYears(-123)->format(\"Y-m-d\"),\n 'phone' => 'required|min:14|max:15',\n 'state' => 'required|in:' . $states\n ];\n\n if(request()->get('state') == 'BA') {\n $rules['birth_date'] = 'required|date|before_or_equal:'.now()->subYears(18)->format(\"Y-m-d\").'|after_or_equal:'.now()->addYears(-123)->format(\"Y-m-d\");\n }\n\n return $rules;\n }", "public function rules() {\n return array_merge(parent::rules(),\n ['feedback_contents_template' => 'required|validFeedbackContentWithoutObservations']\n );\n }", "public function rules()\n {\n switch ($this->method()) {\n // Hander Post \n case 'POST':\n return [\n 'name'=>'required',\n 'email'=>'required|email|unique:user,email',\n 'password'=>'required',\n 'Ag_password'=>'same:password',\n 'phone'=>'required|regex:/[0-9]{9}/',\n 'address'=>'required',\n 'image'=>'image|mimes:jpeg,png,gif|max:7000',\n 'birth_day'=>'date|before:today'\n ];\n break;\n // Hander Put \n case 'PUT':\n return [\n 'email'=>'required|email|unique:user,email,'.$this->id,\n 'name'=>'required',\n 'phone'=>'required|regex:/[0-9]{9}/',\n 'address'=>'required',\n 'birth_day'=>'date|before:today',\n 'repPassword'=>'same:newPassword',\n 'oldPassword'=> new checkPasswordUpdate()\n ];\n break;\n }\n }", "public function rules()\r\n {\r\n \r\n $validation = [\r\n \"name\" => \"required|min:4|max:50\",\r\n \"email\" => \"required|email|unique:users,email\",\r\n \"password\" =>\r\n 'required|confirmed|min:8',\r\n \"phone\" => 'required|min:10|numeric',\r\n \"qualification\" => \"required\",\r\n \"blood_group\" => \"required\",\r\n\r\n ];\r\n\r\n if ($this->isMethod(\"put\")) {\r\n $validation = [\r\n \"name\" => \"required|alpha_num|min:4|max:50\",\r\n \"password\" =>\r\n 'nullable|confirmed|min:8',\r\n 'phone' => 'required|min:10|numeric', \r\n \"qualification\" => \"required\",\r\n \"blood_group\" => \"required\", \r\n ];\r\n }\r\n\r\n return $validation;\r\n }", "public function rules()\n {\n\t\t$item = $this->route('id');\n\t\treturn [\n\t\t\t'name' => ['required'],\n\t\t\t'description' => ['required', 'max:255'],\n\t\t\t'stock' => ['required', 'integer', 'min:0'],\n ];\n }" ]
[ "0.73560274", "0.7029944", "0.6998964", "0.69760776", "0.695345", "0.67695546", "0.67648745", "0.6729979", "0.6683829", "0.66539997", "0.6649985", "0.66413826", "0.66347283", "0.6589461", "0.6586514", "0.65696627", "0.65399384", "0.6539754", "0.65358686", "0.65288645", "0.6527938", "0.6526238", "0.6508364", "0.64971584", "0.6475383", "0.6465412", "0.64476067", "0.6440161", "0.6436494", "0.6422712", "0.6413915", "0.6407132", "0.64053965", "0.63826066", "0.63815457", "0.6375738", "0.6374749", "0.6370659", "0.6367219", "0.6364382", "0.6363148", "0.63520235", "0.6346199", "0.63372624", "0.63350916", "0.63326454", "0.63253623", "0.63216937", "0.6305124", "0.63039774", "0.629625", "0.6280018", "0.62780935", "0.6272014", "0.62644285", "0.626161", "0.626131", "0.6258355", "0.6257456", "0.6256023", "0.6251966", "0.62498295", "0.6231229", "0.62124264", "0.6202128", "0.62001055", "0.6196864", "0.61889875", "0.61844707", "0.61828655", "0.61822426", "0.6180629", "0.6178665", "0.61727446", "0.61698234", "0.61673677", "0.61642087", "0.6159404", "0.6158701", "0.61585563", "0.61544394", "0.61543626", "0.6146788", "0.6146105", "0.6141742", "0.6137905", "0.61336935", "0.6131015", "0.6130065", "0.61300254", "0.6127338", "0.61264056", "0.61211133", "0.6120598", "0.61200243", "0.61160576", "0.6114171", "0.6113835", "0.6107589", "0.6105849" ]
0.73301095
1
End Action controllers for generating enlistment report Start Action controllers for generating attendance report generate_voc_program_attendance_report function. commit 10/11/2018
public function generate_voc_program_attendance_report(){ $this->crud->credibilityAuth(array('Administrator','Registrar')); // get inputs $condition= array('vocational_program'=>$this->input->post('vocational_program'),'batch_year'=> $this->input->post('batch_year_id')); $range1 = $this->input->post('date_range1'); $range2 = $this->input->post('date_range2'); // get necessary report data $voc_program= $this->vocational_program_model->getVocationalPrograms('s',array('voc_program_id'=>$condition['vocational_program'])); $students = $this->admin_model->getStudentsBasicInfo($condition,'a'); $attendance = $this->admin_model->getStudentAttendanceByVocationalProgram($students,$range1,$range2,$condition['batch_year']); $att_record = $this->admin_model->getStudentDailyAttendanceRecord($students,$range1,$range2,$condition['batch_year']); $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date'); // generate report data in pdf or csv format from admin_report_model if((!empty($condition['vocational_program']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){ if(!empty($attendance)){ if($this->input->post('export_csv')){ $this->admin_report_model->generateStudentAttendanceByVocationalProgramCsv($attendance,$att_record,$att_dates,$voc_program,$range1,$range2); exit; }else if($this->input->post('export_pdf')){ $this->admin_report_model->generateVocProgramAttendanceReportPdf($attendance,$voc_program,$range1,$range2); } } $this->session->set_flashdata('warning', 'No reports found!.'); redirect('attendance_report'); } $this->session->set_flashdata('danger', 'Invalid input.'); redirect('attendance_report'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generate_subject_code_attendance_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar','Faculty'));\n // get inputs\n $con = array('subject_code'=>$this->input->post('subject_code'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $students = $this->admin_model->getStudentsBasicInfo($con,'a');\n $attendance = $this->admin_model->getStudentAttendanceBySubjectCode($range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_record = $this->admin_model->getStudentSubjectCodeAttendanceRecord($students,$range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($con['subject_code']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance) && !empty($att_record)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentAttendanceBySubjectCodeCsv($attendance,$att_record,$att_dates,$con,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateSubjectCodeAttendanceReportPdf($attendance,$con,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n }else{\n $this->session->set_flashdata('danger', 'Invalid input.');\n }\n redirect('attendance_report');\n }", "public function generate_subject_code_remarks_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar','Faculty'));\n // get inputs\n $con = array('subject_code'=>$this->input->post('subject_code'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $students = $this->admin_model->getStudentsBasicInfo($con,'a');\n $attendance = $this->admin_model->getStudentAttendanceBySubjectCode($range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_record = $this->admin_model->getStudentSubjectCodeAttendanceRecord($students,$range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($con['subject_code']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance) && !empty($att_record)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentRemarksReportBySubjectCodeCsv($attendance,$att_record,$att_dates,$con,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateSubjectCodeAttendanceReportPdf($attendance,$con,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n }else{\n $this->session->set_flashdata('danger', 'Invalid input.');\n }\n redirect('attendance_report');\n }", "public function pcAttendance_report() {\n BackendMenu::setContext('Olabs.Oims', 'reports', 'pcattendance_report');\n $this->searchFormWidget = $this->createAttendanceSearchFormWidget();\n $this->pageTitle = 'Petty Contractor Attendance Report';\n $reports = array();\n\n $oimsSetting = \\Olabs\\Oims\\Models\\Settings::instance();\n\n $searchForm = $this->searchFormWidget;\n\n $this->vars['search'] = false;\n $this->vars['msg'] = false;\n $this->vars['searchFormWidget'] = $searchForm;\n $this->vars['reports'] = $reports;\n\n $this->vars['oimsSetting'] = $oimsSetting;\n }", "function generateMeetingAttendanceReport($args) {\r\n\t\tparent::validate();\r\n\t\t$this->setupTemplate();\r\n\t\t$ercMembers = Request::getUserVar('ercMembers');\r\n\t\t\r\n\t\t$fromDate = Request::getUserDateVar('dateFrom', 1, 1);\r\n\t\tif ($fromDate != null) $fromDate = date('Y-m-d H:i:s', $fromDate);\r\n\t\t$toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);\r\n\t\tif ($toDate != null) $toDate = date('Y-m-d H:i:s', $toDate);\r\n\t\t$meetingDao = DAORegistry::getDAO('MeetingDAO');\r\n\t\t$userDao = DAORegistry::getDAO('UserDAO');\r\n\t\t\r\n\t\theader('content-type: text/comma-separated-values');\r\n\t\theader('content-disposition: attachment; filename=meetingAttendanceReport-' . date('Ymd') . '.csv');\r\n\t\t\r\n\t\t$columns = array(\r\n\t\t'lastname' => Locale::translate('user.lastName'),\r\n\t\t'firstname' => Locale::translate('user.firstName'),\r\n\t\t'middlename' => Locale::translate('user.middleName'),\r\n\t\t'meeting_date' => Locale::translate('editor.reports.meetingDate'),\r\n\t\t'present' => Locale::translate('editor.reports.isPresent'),\r\n\t\t'reason_for_absence' => Locale::translate('editor.reports.reason')\r\n\t\t);\r\n\t\t$yesNoArray = array('present');\r\n\t\t$yesnoMessages = array( 0 => Locale::translate('common.no'), 1 => Locale::translate('common.yes'));\r\n\t\t$fp = fopen('php://output', 'wt');\r\n\t\tString::fputcsv($fp, array_values($columns));\r\n\t\t\r\n\t\tforeach ($ercMembers as $member) {\r\n\t\t\t$user = $userDao->getUser($member);\r\n\t\t\tlist($meetingsIterator) = $meetingDao->getMeetingReportByReviewerId($member, $fromDate, $toDate);\r\n\t\t\r\n\t\t\t$meetings = array();\r\n\t\t\twhile ($row =& $meetingsIterator->next()) {\r\n\t\t\t\tforeach ($columns as $index => $junk) {\r\n\t\t\t\t\tif (in_array($index, $yesNoArray)) {\r\n\t\t\t\t\t\t$columns[$index] = $yesnoMessages[$row[$index]];\r\n\t\t\t\t\t} elseif ($index == \"lastname\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getLastName();\r\n\t\t\t\t\t} elseif ($index == \"firstname\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getFirstName();\r\n\t\t\t\t\t} elseif ($index == \"middlename\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getMiddleName();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$columns[$index] = $row[$index];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString::fputcsv($fp, $columns);\r\n\t\t\t\tunset($row);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfclose($fp);\r\n\t}", "public function mark_attendance($message = NULL) {\n $data['sideMenuData'] = fetch_non_main_page_content();\n $tenant_id = $this->tenant_id;\n $course_id = $this->input->post('course_id');\n $class_id = $this->input->post('class_id');\n $subsidy = $this->input->post('subsidy');\n $sort_by = $this->input->get('b');\n $sort_order = $this->input->get('o');\n $class_details = $this->class->get_class_by_id($tenant_id, $course_id, $class_id);\n \n $from_date = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);///added by shubhranshu\n $to_date = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);//added by shubhranshu\n $week_start_date = parse_date($this->input->post('week_start'), CLIENT_DATE_FORMAT);//added by shubhranshu\n //echo print_r($from_date);print_r($to_date);print_r($week_start_date);exit;\n \n $week = $this->input->post('week');\n $export = $this->input->post('export');\n $export1 = $this->input->post('export1');\n $this->load->helper('attendance_helper');\n if (!empty($export)) \n {\n $class_details = $this->class->get_class_details_for_report($tenant_id, $course_id, $class_id);\n $class_start = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);\n $class_end = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);\n if (empty($class_start))\n $class_start = new DateTime();\n if (empty($class_end))\n $class_end = new DateTime();\n $class_schedule = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $class_schedule_data = array();\n foreach ($class_schedule as $row) {\n $session_arr = array('S1' => '1', 'BRK' => '3', 'S2' => '2');\n $class_schedule_data[date('d/m/y', strtotime($row['class_date']))][$session_arr[$row['session_type_id']]] = date('h:i A', strtotime($row['session_start_time']));\n }\n \n if ($export == 'xls') \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $this->load->helper('export_helper');\n export_attendance($results, $class_details, $class_start, $class_end, $class_schedule_data);\n } \n else \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $tenant_details = $this->classtraineemodel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n\t\t$mark_count = $this->classtraineemodel->get_rows_count($course_id,$class_id);\n \n if ($export == 'xls_week'){\n $this->load->helper('export_helper');\n return generate_class_attendance_sheet_xls($results, $class_details, $class_start, $class_end, $tenant_details, $class_schedule_data);\n }\n $this->load->helper('pdf_reports_helper');\n if ($export == 'pdf') {\n //return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data, $mark_count);\n //print_r($results);exit;\n return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data,$mark_count); // removed mark count by shubhranshu\n \n } else if ($export == 'pdf_week') {\n return generate_class_attendance_sheet_pdf($results, $class_details, $tenant_details, $class_schedule_data);\n }\n }\n \n } \n else \n {\n if($export1=='lock')\n { \n $lock_msg=$this->classtraineemodel->lock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\", \"Succesfully Locked.\");\n }else{\n $this->session ->set_flashdata(\"error\",\"Something went wrong while locking.\");\n }\n }else if($export1=='unlock'){\n $lock_msg=$this->classtraineemodel->unlock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\",\"Succesfully Unocked\");\n }else{\n $this->session->set_flashdata(\"error\",\"Somthing went wrong while Unlocking !\");\n \n }\n }\n \n \n $data = get_data_for_renderring_attendance($tenant_id, $course_id, $class_id, $subsidy, $from_date, $to_date, $week_start_date, $week, $sort_by, $sort_order,'');\n \n $data['class_schedule'] = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $att = $this->classtraineemodel->get_attendance_lock_status($tenant_id,$course_id, $class_id);\n $data['lock_status']=$att->lock_status;\n $data['class_start_datetime']=$att->class_start_datetime;\n\t\t\t$data['user'] = $this->user;\n\t\t\t$data['controllerurl'] = 'class_trainee/mark_attendance';\n $data['page_title'] = 'Class Trainee Enrollment - Mark Attendance';\n $data['main_content'] = 'classtrainee/markattendance';\n //$data['week_start'] = $from_date;\n //$data['sideMenuData'] = $this->sideMenu;\n if (!empty($message))\n $data['message'] = $message;\n $this->load->view('layout', $data);\n }\n }", "function attendance_report() {\n if ($this->session->userdata('parent_login') != 1)\n redirect(base_url(), 'refresh');\n $student_id = $student_id = $this->session->userdata('parent_id');\n if ($this->input->post('month') != '' && $this->input->post('year') != '') {\n $page_data['month'] = $this->input->post('month');\n $page_data['year'] = $this->input->post('year');\n } else {\n $page_data['month'] = '';\n $page_data['year'] = '';\n }\n $page_data['student'] = $this->db->get_where('student', array('student_id' => $student_id))->row()->name;\n $page_data['student_id'] = $student_id;\n $page_data['page_name'] = 'attendance_report';\n $image = $this->db->get_where('student', array('student_id' => $student_id))->row()->image;\n $image_url = $this->crud_model->get_image_url('student', $image);\n $page_data['parent_page_title'] = \"<img src='$image_url'\" . 'class=\"img-circle\"' . 'width=\"40\"' . \"/>\" . $page_data['student'];\n $page_data['page_title'] = $page_data['student'];\n $this->load->view('backend/index', $page_data);\n }", "public function generate()\n {\n $reportType = Input::get('report_type');\n $from = Input::get('from');\n $to = Input::get('to');\n $disciplineId = Input::get('discipline');\n $info = explode(',', Input::get('info'));\n $id = $info[1];\n $type = $info[0];\n $license = array_key_exists(2, $info) ? $info[2] : '0';\n\n $from = empty($from) ? null : date('Y-m-d', strtotime($from));\n $to = empty($to) ? null : date('Y-m-d', strtotime($to));\n \n if (! $reportType) {\n Flash::danger('Please select a <strong>Report Type</strong>.');\n return Redirect::route('reports.index')->withInput();\n }\n\n if (empty($from)) {\n Flash::danger('Please enter a <strong>From Date</strong> to generate report.');\n return Redirect::route('reports.index')->withInput();\n }\n\n // all route params\n $routeParams = [$disciplineId, $type, $id, $license, $from, $to];\n\n switch ($reportType) {\n case 'site_summary':\n return Redirect::route('reports.site_summary', $routeParams);\n break;\n\n case 'scheduled_exams':\n return Redirect::route('reports.scheduled_exams', $routeParams);\n break;\n\n case 'retake_summary':\n return Redirect::route('reports.retake_summary', $routeParams);\n break;\n\n case 'skills_detail':\n return Redirect::route('reports.skills_detail', $routeParams);\n break;\n\n case 'knowledge_detail':\n return Redirect::route('reports.knowledge_detail', $routeParams);\n break;\n\n case 'pass_fail':\n // if admin / agency / staff show a page to select facility and instructor\n /*if(Auth::user()->ability(['Admin', 'Staff', 'Agency'], []))\n {\n return Redirect::route('reports.select_facility', [$from, $to]);\n }*/\n\n // Otherwise just show the regular pass/fail report\n return Redirect::route('reports.pass_fail', $routeParams);\n break;\n\n default:\n Flash::warning('This report type is not yet supported.', 'Warning');\n return Redirect::route('reports.index');\n\n }\n }", "function meetingAttendanceReport($args, &$request){\r\n\t\timport ('classes.meeting.form.MeetingAttendanceReportForm');\r\n\t\tparent::validate();\r\n\t\t$this->setupTemplate();\r\n\t\t$meetingAttendanceReportForm= new MeetingAttendanceReportForm($args, $request);\r\n\t\t$isSubmit = Request::getUserVar('generateMeetingAttendance') != null ? true : false;\r\n\t\t\r\n\t\tif ($isSubmit) {\r\n\t\t\t$meetingAttendanceReportForm->readInputData();\r\n\t\t\tif($meetingAttendanceReportForm->validate()){\t\r\n\t\t\t\t\t$this->generateMeetingAttendanceReport($args);\r\n\t\t\t}else{\r\n\t\t\t\tif ($meetingAttendanceReportForm->isLocaleResubmit()) {\r\n\t\t\t\t\t$meetingAttendanceReportForm->readInputData();\r\n\t\t\t\t}\r\n\t\t\t\t$meetingAttendanceReportForm->display($args);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t$meetingAttendanceReportForm->display($args);\r\n\t\t}\r\n\t}", "public function attendance(){\n\t\t\t$data['title'] = 'Students Attendences Course name '; \n\n\t\t\t$course_code = $_GET['course_code'];\n\t\t\t\n\t\t\t$ids = $this->register_model->ids($course_code);\n\n\t\t\t$course_id;\n\t\t\tforeach ($ids as $id) {\n\t\t\t\t\t$course_id = $id['id'];\n\t\t\t\t\t$data['course_name'] = $id['course_name'];\n\t\t\t}\t\t\t\n\t\t\t$data['courses'] = $this->register_model->get_attendance($course_id);\n\n\t\t\t$this->load->view('admin/header1');\n\t\t\t$this->load->view('admin/attendance', $data);\n\t\t\t$this->load->view('admin/footer');\n\t\t}", "public function attendance_sheet_export_to_pdf($action, $attendance_id, $student_id = 0, $course_id = '')\n {\n $attendance = new Attendance();\n $courseInfo = CourseManager::get_course_information($course_id);\n $attendance->set_course_id($courseInfo['code']);\n $groupId = isset($_REQUEST['group_id']) ? $_REQUEST['group_id'] : null;\n $data_array = array();\n $data_array['attendance_id'] = $attendance_id;\n $data_array['users_in_course'] = $attendance->get_users_rel_course($attendance_id, $groupId);\n\n $filter_type = 'today';\n\n if (!empty($_REQUEST['filter'])) {\n $filter_type = $_REQUEST['filter'];\n }\n\n $my_calendar_id = null;\n if (is_numeric($filter_type)) {\n $my_calendar_id = $filter_type;\n $filter_type = 'calendar_id';\n }\n\n $data_array['attendant_calendar'] = $attendance->get_attendance_calendar(\n $attendance_id,\n $filter_type,\n $my_calendar_id,\n $groupId\n );\n\n if (api_is_allowed_to_edit(null, true) || api_is_drh()) {\n $data_array['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);\n } else {\n if (!empty($student_id)) {\n $user_id = intval($student_id);\n } else {\n $user_id = api_get_user_id();\n }\n $data_array['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, $user_id, $groupId);\n $data_array['faults'] = $attendance->get_faults_of_user($user_id, $attendance_id, $groupId);\n $data_array['user_id'] = $user_id;\n }\n\n $data_array['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id($attendance_id);\n\n // Set headers pdf.\n $courseCategory = CourseManager::get_course_category($courseInfo['category_code']);\n $teacherInfo = CourseManager::get_teacher_list_from_course_code($courseInfo['code']);\n $teacherName = null;\n foreach ($teacherInfo as $teacherData) {\n if ($teacherName != null) {\n $teacherName = $teacherName.\" / \";\n }\n $teacherName .= api_get_person_name($teacherData['firstname'], $teacherData['lastname']);\n }\n\n // Get data table\n $data_table = array();\n $head_table = array('#', get_lang('Name'));\n foreach ($data_array['attendant_calendar'] as $class_day) {\n $head_table[] =\n api_format_date($class_day['date_time'], DATE_FORMAT_NUMBER_NO_YEAR).' '.\n api_format_date($class_day['date_time'], TIME_NO_SEC_FORMAT);\n }\n $data_table[] = $head_table;\n $data_attendant_calendar = $data_array['attendant_calendar'];\n $data_users_presence = $data_array['users_presence'];\n $count = 1;\n\n if (!empty($data_array['users_in_course'])) {\n foreach ($data_array['users_in_course'] as $user) {\n $cols = 1;\n $result = array();\n $result['count'] = $count;\n $result['full_name'] = api_get_person_name($user['firstname'], $user['lastname']);\n foreach ($data_array['attendant_calendar'] as $class_day) {\n if ($class_day['done_attendance'] == 1) {\n if ($data_users_presence[$user['user_id']][$class_day['id']]['presence'] == 1) {\n $result[$class_day['id']] = get_lang('UserAttendedSymbol');\n } else {\n $result[$class_day['id']] = '<span style=\"color:red\">'.get_lang('UserNotAttendedSymbol').'</span>';\n }\n } else {\n $result[$class_day['id']] = ' ';\n }\n $cols++;\n }\n $count++;\n $data_table[] = $result;\n }\n }\n $max_cols_per_page = 12; //10 dates + 2 name and number\n $max_dates_per_page = $max_dates_per_page_original = $max_cols_per_page - 2;//10\n $rows = count($data_table);\n\n if ($cols > $max_cols_per_page) {\n $number_tables = round(($cols-2)/$max_dates_per_page);\n $headers = $data_table[0];\n $all = array();\n $tables = array();\n $changed = 1;\n\n for ($i= 0; $i <= $rows; $i++) {\n $row = isset($data_table[$i]) ? $data_table[$i] : null;\n $key = 1;\n $max_dates_per_page = 10;\n $item = isset($data_table[$i]) ? $data_table[$i] : null;\n $count_j = 0;\n\n if (!empty($item)) {\n foreach ($item as $value) {\n if ($count_j >= $max_dates_per_page) {\n $key++;\n $max_dates_per_page = $max_dates_per_page_original*$key;\n //magic hack\n $tables[$key][$i][] = $tables[1][$i][0];\n $tables[$key][$i][] = $tables[1][$i][1];\n }\n $tables[$key][$i][] = $value;\n $count_j++;\n }\n }\n }\n\n $content = null;\n if (!empty($tables)) {\n foreach ($tables as $sub_table) {\n $content .= Export::convert_array_to_html($sub_table).'<br /><br />';\n }\n }\n } else {\n $content = Export::convert_array_to_html(\n $data_table,\n array('header_attributes' => array('align' => 'center'))\n );\n }\n\n $params = array(\n 'filename' => get_lang('Attendance').'-'.api_get_local_time(),\n 'pdf_title' => $courseInfo['title'],\n 'course_code' => $courseInfo['code'],\n 'add_signatures' => true,\n 'orientation' => 'landscape',\n 'pdf_teachers' => $teacherName,\n 'pdf_course_category' => $courseCategory['name'],\n 'format' => 'A4-L',\n 'orientation' => 'L'\n );\n\n Export::export_html_to_pdf($content, $params);\n exit;\n }", "function report() {\n if ($this->session->userdata('role') == 550 || $this->session->userdata('role') == 551) {\n if (!empty($_POST)) {\n if (isset($_POST['type'])) {\n $data['accompagnatore'] = $this->input->post('txtAccompagnatore');\n $data['collaboratore'] = $this->input->post('txtCollaboratore');\n $data['prodotto'] = $this->input->post('txtProdotto');\n $data['codice_prodotto'] = $this->input->post('txtCodiceProdotto');\n $data['passeggero'] = $this->input->post('txtPasseggero');\n $data['tipologia_passeggero'] = $this->input->post('selTipologiaPasseggero');\n $data['glf'] = $this->input->post('selGlf');\n\n $getData = array('accompagnatore' => $data['accompagnatore'], 'collaboratore' => $data['collaboratore'], 'prodotto' => $data['prodotto'], 'codice_prodotto' => $data['codice_prodotto'], 'passeggero' => $data['passeggero'], 'tipologia_passeggero' => $data['tipologia_passeggero'], 'glf' => $data['glf']);\n\n $resultData = $this->webservicemodel->getReportData($getData);\n if ($resultData) {\n $exportData = array();\n foreach ($resultData as $record) {\n $total_due = $record[\"costo_base\"] + $record[\"importo_tasse_volo\"] + $record[\"importo_aeroporto_aggiuntivo\"] + $record[\"supplementi\"];\n $balance = round(( $total_due - $record[\"pagamenti\"]), 2);\n\n $exportRecord = array(\n 'Accompagnatore' => $record['accompagnatore'],\n 'Collaboratore' => $record['collaboratore'],\n 'Prodotto' => $record['prodotto'],\n 'Codice Prodotto' => $record['codice_prodotto'],\n 'Passeggero' => $record['passeggero'],\n 'Tipologia Passeggero' => $record['tipologia_passeggero'],\n 'Total Due' => $total_due,\n 'Balance' => $balance\n );\n array_push($exportData, $exportRecord);\n }\n $this->load->library('export');\n $this->export->to_excel($exportData, 'webservicereport');\n } else\n redirect('webservice');\n }\n else {\n $data['title'] = 'plus-ed.com | Webservice data report';\n $data['breadcrumb1'] = 'Webservice management';\n $data['breadcrumb2'] = 'Webservice data report';\n $data['accompagnatore'] = $this->input->post('txtAccompagnatore');\n $data['collaboratore'] = $this->input->post('txtCollaboratore');\n $data['prodotto'] = $this->input->post('txtProdotto');\n $data['codice_prodotto'] = $this->input->post('txtCodiceProdotto');\n $data['passeggero'] = $this->input->post('txtPasseggero');\n $data['tipologia_passeggero'] = $this->input->post('selTipologiaPasseggero');\n $data['glf'] = $this->input->post('selGlf');\n\n $getData = array('accompagnatore' => $data['accompagnatore'], 'collaboratore' => $data['collaboratore'], 'prodotto' => $data['prodotto'], 'codice_prodotto' => $data['codice_prodotto'], 'passeggero' => $data['passeggero'], 'tipologia_passeggero' => $data['tipologia_passeggero'], 'glf' => $data['glf']);\n\n// $data['report_data'] = $this->webservicemodel->getReportData($getData);\n\n if (APP_THEME == \"OLD\")\n $this->load->view('plused_webservice_report_data', $data);\n else { // if(APP_THEME == \"LTE\")\n $data['pageHeader'] = $data['breadcrumb2'];\n $data['optionalDescription'] = \"\";\n $this->ltelayout->view('lte/reimbursement/webservice_report_data', $data);\n }\n }\n } else {\n $data['title'] = 'plus-ed.com | Webservice data report';\n $data['breadcrumb1'] = 'Webservice management';\n $data['breadcrumb2'] = 'Webservice data report';\n\n $data['tipologia_passeggero'] = $this->webservicemodel->getDistinctDataByField('tipologia_passeggero');\n $data['glf'] = $this->webservicemodel->getDistinctDataByField('glf');\n $data['accompagnatore'] = $this->webservicemodel->getDistinctDataByField('accompagnatore');\n $data['collaboratore'] = $this->webservicemodel->getDistinctDataByField('collaboratore');\n $data['codice_prodotto'] = $this->webservicemodel->getDistinctDataByField('codice_prodotto');\n\n if (APP_THEME == \"OLD\")\n $this->load->view('plused_webservice_report', $data);\n else { // if(APP_THEME == \"LTE\")\n $data['pageHeader'] = $data['breadcrumb2'];\n $data['optionalDescription'] = \"\";\n $this->ltelayout->view('lte/reimbursement/webservice_report', $data);\n }\n }\n } else {\n redirect('backoffice', 'refresh');\n }\n }", "function AfterAdd(&$values,&$keys,$inline,&$pageObject)\n{\n\n\t\tglobal $conn;\n\n$attend_id=$values['attend_id'];\n\n//select shecdule ID from timetable\n$sql_at= \"SELECT scheduleID,courseID,date,(end_time-start_time) AS hour FROM schedule_timetable WHERE id='$attend_id'\";\n$query_at=db_query($sql_at,$conn);\n$row_at=db_fetch_array($query_at);\n\n$scheduleID=$row_at['scheduleID'];\n\n//select related schedule id from schedule\n$sql_at2= \"SELECT programID,batchID,groupID FROM schedule WHERE scheduleID='$scheduleID'\";\n$query_at2=db_query($sql_at2,$conn);\n$row_at2=db_fetch_array($query_at2);\n\n$program=$row_at2['programID'];\n$batch=$row_at2['batchID'];\n$class=$row_at2['groupID'];\n\n//update program , batch, class to student_attendance table\n$date=$row_at['date'];\n$hour=$row_at['hour'];\n$course=$row_at['courseID'];\n$id=$keys['id'];\n$sql_up= \"Update student_attendance set programID ='$program', batchID='$batch',class='$class',course='$course',date='$date',hour='$hour' where id='$id'\";\n$query_up=db_exec($sql_up,$conn);\n\n//query the total hour for this module\n$sql_th= \"SELECT total_hour FROM program_course WHERE programID='$program' && CourseID=$course\";\n$query_th=db_query($sql_th,$conn);\n$row_th=db_fetch_array($query_th);\n\n$totalhour=$row_th['total_hour'];\n//the percentage wight of absentee ( $hour/$totalhour)\n$weight_absent=($hour/$totalhour*100);\n\n//query current attendance status for this student, program , module\n$studentID=$values['StudentID'];\n$sql_at3=\"SELECT Attendance FROM student_course WHERE StudentID=$studentID AND programID=$program AND CourseID=$course AND Exam_Remark IS NULL\";\n$query_at3=db_query($sql_at3,$conn);\n$row_at3=db_fetch_array($query_at3);\n\n$current_attendance=$row_at3['Attendance'];\n//update student_course attendance\n\n$net_attendance=$current_attendance-$weight_absent;\n\n$sql_ups= \"Update student_course SET Attendance='$net_attendance' where StudentID='$studentID' && programID='$program' && CourseID=$course AND Exam_Remark IS NULL\";\n$query_ups=db_exec($sql_ups,$conn);\n;\t\t\n}", "public function feVisitReportAction(){\n\n\t\t\t\t$params = $this->getRequest()->getParams(); \n\t\t\t\t$db = $this->db;\n\t\t\t\t$secretkey = $this->secretkey; \n\t\t\t\t$appkey\t= isset($params['appkey'])?$params['appkey']:\"\";\n\t\t\t\t$LoginID\t= isset($params['LoginID'])?$params['LoginID']:\"\";\n\t\t\t\t$device_id\t= isset($params['device_id'])?$params['device_id']:\"\";\n\t\t\t\t$farmer_code\t= isset($params['farmer_code'])?$params['farmer_code']:\"\";\n\t\t\t\t$comment\t= isset($params['comment'])?$params['comment']:\"\";\n\t\t\t\t$sink_date_time \t= isset($params['sink_date_time'])?$params['sink_date_time']:\"\";\n\n\n\t\t\t\t$error_code = 1;\n\t\t\t\t$succes = FALSE; \n\t\t\t\ttry{\n\t\t\t\t\t$db->beginTransaction();\n\t\t\t\t\tif($secretkey != $appkey){\n\t\t\t\t\t\tthrow new Exception(\"Invalid request.\");\n\t\t\t\t\t}\t\n\t\t\t\t\tif(!$LoginID || !$device_id){\n\t\t\t\t\t\tthrow new Exception(\"Required parameter missing.\");\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t$user = new Application_Model_Users();\n\t\t\t\t\t$alldata = $user->getUserDataByLoginId($LoginID);\n\t\t\t\t\tif(!empty($alldata['LoginID']) != $LoginID){\n\t\t\t\t\t\tthrow new Exception('Invalid login id.');\n\t\t\t\t\t} \n\t\t\t\t\tif(!empty($alldata['DeviceID'])){\t\t\t\n\t\t\t\t\t\tif($alldata['DeviceID'] != $device_id){\n\t\t\t\t\t\t\t$error_code = 3;\n\t\t\t\t\t\t\tthrow new Exception('You are not athorized for this device.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tif(strtolower($alldata['StaffStatus']) != 'ac'){\n\t\t\t\t\t\t$error_code = 3;\n\t\t\t\t\t\tthrow new Exception('Your account is not active.');\n\t\t\t\t\t}\t\n\n\t\t\t\t\tif($alldata['App_Access_Status'] == 2){\n\t\t\t\t\t\t$error_code = 2;\n\t\t\t\t\t\tthrow new Exception('This account deactivated by admin.');\n\t\t\t\t\t}\n\n\t\t\t\t\t$farmerMaster = new Application_Model_Farmermasters();\n\t\t\t\t\t$allFarmerData = $farmerMaster->getFarmerDetailsByFarmerCode($farmer_code); \t\n\t\t\t\t\t$farmerID = $allFarmerData['id'];\n\t\t\t\t\t$farmerCode = $allFarmerData['FarmerCode'];\n\n\n\t\t\t\t\t$fe_report = array(); \n\n\t\t\t\t\t$fe_report['comment'] = $comment;\n\n\t\t\t\t\t$fe_report['farmer_code'] = $farmer_code;\n\t\t\t\t\t$fe_report['farmer_id'] = $farmerID;\n\t\t\t\t\t$fe_report['fe_code'] = $LoginID;\n\t\t\t\t\t$fe_report['sink_date_time'] = $sink_date_time;\n\t\t\t\t\t$fe_report['created'] = $this->currdate; \n\t\t\t\t\t$db->insert('logi_fevisit_report', $fe_report);\n\n\t\t\t\t\t$landdetailId = $db->lastInsertId();\n\n\t\t\t\t\t$db->commit();\n\t\t\t\t\t$succes = TRUE;\t \n\t\t\t\t}\n\n\t\t\t\tcatch(Exception $e){\n //Rollback transaction\n\t\t\t\t\t$db->rollBack();\n\t\t\t\t\t$error= $e->getMessage();\n\t\t\t\t}\n\n\t\t\t\tif($succes == TRUE ){\n\t\t\t\t\techo json_encode(array(\"error_code\"=>'0', 'response_string'=>'Fe report Detail Inserted successfully.', 'fe_report_id'=>$landdetailId));\n\t\t\t\t\texit;\n\n\t\t\t\t}\n\n\t\t\t\telse{\n\t\t\t\t\techo json_encode(array(\"error_code\"=>$error_code, 'response_string'=>$error));\n\t\t\t\t\texit;\n\t\t\t\t}\n\n\t\t\t}", "public function tms_report() {\n $data['sideMenuData'] = fetch_non_main_page_content();\n if (!empty($_POST)) {\n\n\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n if ($_POST['payStatus'] == '1') {\n $payment_status = \"PAID','PARTPAID\";\n $displayText = \"Total Amount Received for Paid invoices :\";\n $export_url = '?payStatus=1';\n } else if ($_POST['payStatus'] == '2') {\n $payment_status = \"NOTPAID','PARTPAID\";\n $displayText = \"Total Amount Due for unpaid invoices :\";\n $export_url = '?payStatus=2';\n }\n $data['text'] = $displayText;\n $year = $_POST['yearVal'];\n $month = $_POST['monthVal'];\n $training_score1 = $_POST['trainingStatus'];\n $export_url .='&yearVal=' . $year . '&monthVal=' . $month;\n if ($training_score1 == '1') {\n $training_score = 'C';\n } else if ($training_score1 == '2') {\n $training_score = \"NYC','2NYC\";\n } else if ($training_score1 == '3') {\n $training_score = 'ABS';\n } else if ($training_score1 == '4') {\n $training_score = \"C','NYC','2NYC\";\n }\n\n $export_url .= '&trainingStatus=' . $training_score1;\n $temp_data = array();\n if ($_POST['payStatus'] == '1') {\n $data['result'] = $this->reportsModel->tms_paid_report($tenant_id, $payment_status, $year, $month, $training_score);\n } else if ($_POST['payStatus'] == '2') {\n $data['result'] = $this->reportsModel->tms_unpaid_report($tenant_id, $payment_status, $year, $month, $training_score);\n }\n }\n $data['page_title'] = 'TMS Reports';\n $data['export_url'] = $export_url;\n $data['main_content'] = 'reports/tms_report';\n $this->load->view('layout', $data);\n }", "public function actionReport()\n\t{\n\t\t$model = new AutoChores();\n\t\t$results = array();\n\t\t$errors = array();\n\t\t$isPrint = 0;\n\t\t//exit;\n\t\tif(isset($_REQUEST['go'])){\n\t\t if(!isset($_REQUEST['go']))\n \t\t $isPrint = 1;\n\t\t\tif(empty($_REQUEST['from_date'])){\n\t\t\t\t$errors[\"from_date\"] = \"Invalid From Date\";\n\t\t\t}\n\t\t\tif(empty($_REQUEST['to_date'])){\n\t\t\t\t$errors[\"to_date\"] = \"Invalid To Date\";\n\t\t\t}\n\t\t\tif(empty($_REQUEST['farm'])){\n\t\t\t\t$errors[\"farm\"] = \"Invalid Farm & Herd\";\n\t\t\t}else {\n\t\t\t\t$qtxt =\"SELECT farm_herd FROM herd_setup WHERE farm_herd = '\".$_REQUEST['farm'].\"' \";\n\t\t\t\t$command =Yii::app()->db->createCommand($qtxt);\n\t\t\t\t$res =$command->queryColumn();\n\n\t\t\t\tif($_REQUEST['farm'] != 'A' && (!isset($res[0]) || $res[0] != $_REQUEST['farm']))\n\t\t\t\t\t$errors[\"farm\"] = \"Invalid Farm & Herd\";\n\t\t\t}\n\t\t\tif(count($errors) == 0) {\n\t\t\t\t$results1 = $this->dateRange($_REQUEST['from_date'], $_REQUEST['to_date'],'+1 day','m/d/Y');\n\t\t\t\tforeach ($results1 as $result) {\n\t\t\t\t\t$qtxt = \"SELECT * FROM chores WHERE date = '\".$result.\"' \";\n\t\t\t\t\tif($_REQUEST['farm'] != 'A')\n\t\t\t\t\t\t$qtxt .= \" AND farm_herd = '\".$_REQUEST['farm'].\"' \";\n\t\t\t\t\t$command =Yii::app()->db->createCommand($qtxt);\n\t\t\t\t\t$res =$command->queryAll();\n\t\t\t\t\t//$results[$result] = $res;\n\n\t\t\t\t\t//D\n\t\t\t\t\t$qtxt = \"SELECT * FROM auto_chores WHERE generated_by = 'D' AND disabled = 'N' \";\n\t\t\t\t\tif($_REQUEST['farm'] != 'A')\n\t\t\t\t\t\t$qtxt .= \" AND (farm_herd = '\".$_REQUEST['farm'].\"' OR generated_by = 'A') \";\n\n\t\t\t\t\t$qtxt1 = \" ADDDATE(date_asof, days_after) = '\".$result.\"' \";\n\t\t\t\t\t$qtxt2 = \" ADDDATE(date_asof, (days_after+(times_occur*days_between))) = '\".$result.\"' AND times_occur >= 2\";\n\t\t\t\t\t$qtxt .= \" AND ((\".$qtxt1.\") OR (\".$qtxt2.\")) \";\n\n\n\t\t\t\t\t$command =Yii::app()->db->createCommand($qtxt);\n\t\t\t\t\t$res1 =$command->queryAll();\n\t\t\t\t\t$results[$result] = array_merge($res,$res1);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$model->addErrors($errors);\n\t\t\t}\n\t\t}\n\n\n\t\t$this->render('report',array(\n\t\t\t\t'model'=>$model,\n\t\t\t\t'results'=>$results,\n\t\t 'isPrint'=>$isPrint,\n\n\t\t));\n\t}", "public function actionOutputIndex()\n {\n\t\tset_time_limit(0);\n $searchModel = new AttendanceCheckinReportsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\t\t\n\t\t\n\t\t$sort = Yii::$app->request->queryParams['sort']?Yii::$app->request->queryParams['sort']:'signdate';\n\t\t\n\t\tif($sort{0}==\"-\"){\n\t\t\t$orderBy = substr($sort,1).\" desc\";\n\t\t}else{\n\t\t\t$orderBy = \" {$sort} ASC\";\n\t\t}\n\t\t$result = $dataProvider->query->orderBy($orderBy)->asArray()->all();\n\t\t// var_dump($result);exit;\n $arr = [];\n $ic = 1; \n foreach($result as $r) {\n\t\t\t$r['signtime1'] = $r[\"signtime1\"]==\"0000-00-00 00:00:00\"?\"\":$r[\"signtime1\"];\n\t\t\t$r['signtime2'] = $r[\"signtime2\"]==\"0000-00-00 00:00:00\"?\"\":$r[\"signtime2\"];\n\t\t\t\n\t\t\t\n\t\t\t$r['signstatus'] = $r['signstatus_valid']?:$r['signstatus'];\n\t\t\t$r['latetime'] = $r['latetime']-$r['latetime_valid'];\n\t\t\t$r['overtime'] = $r['overtime_valid'];\n $arr[] = $r;\n }\n\t\t$header = [\n 'id' => 'ID',\n 'personnel_id' => '员工ID',\n 'employeeid' => '工号',\n 'username' => '员工姓名',\n 'signdate' => '签到日期',\n 'dayofweek' => '星期几',\n 'signtime1' => '上班签到',\n 'signtime2' => '下班签到',\n 'timediff' => '工作时长',\n 'signstatus' => '签到状态',\n 'latetime' => '迟到分钟',\n 'overtime' => '加班时长',\n 'memo' => '备注',\n ];\n\t\t$columns = array_keys($header);\n\t\t\n\t\t \n \\moonland\\phpexcel\\Excel::export([\n\t\t\t'isMultipleSheet' => true,\n\t\t\t'models' => [\n\t\t\t\t'考勤报表' => $arr, \n\t\t\t],\n\t\t\t'columns' => [\n\t\t\t\t'考勤报表' => $columns,\n\t\t\t], \n\t\t\t'headers' => [\n\t\t\t\t'考勤报表' => $header, \n\t\t\t],\n ]);\n }", "public function genattpdf($getatt){\n\t\t$data['getatt']=$getatt;\n\t\t\tforeach($getatt as $row){\n\t\t\t\t$asmid=$row->ca_asmid;\n\t\t\t\t$centerid=$row->ca_centername;\n\t\t\t\t$cname = $this->commodel->get_listspfic1('admissionstudent_enterenceexamcenter','eec_name','eec_id',$centerid)->eec_name;\n\t\t\t\t$year=date('Y');\n \t \t// move file to directory code for photo\n\t\t\t\t$desired_dir = 'uploads/SLCMS/enterenceadmin_student/'.$year;\n \t// Create directory if it does not exist\n \tif(is_dir($desired_dir)==false){\n \t\tmkdir(\"$desired_dir\", 0700);\n \t}\n\n \t \t$desired_dir = 'uploads/SLCMS/enterenceadmin_student/'.$year.'/attendence';\n \t// Create directory if it does not exist\n \tif(is_dir($desired_dir)==false){\n \t\tmkdir(\"$desired_dir\", 0700);\n \t\t }\n\n\t\t\t\t$this->acadyear = $this->usermodel->getcurrentAcadYear();\n\t\t\t\t\t\t\n\t\t\t\t//add pdf code to store and view pdf file\n\t\t\t\t$temp = $this->load->view('enterenceadmin/attendencepdf', $data, TRUE);\n\t\t\t\t//$pth='uploads/SLCMS/enterenceadmin_student/'.$year.'/attendence/'.$cname.'.pdf';\n\t\t\t\t$pth='uploads/SLCMS/enterenceadmin_student/'.$year.'/attendence/'.$centerid.'.pdf';\n\t\t\t\t$this->commodel->genpdf($temp,$pth);\n\t\t\t\t$master = array(\n\t\t \t\t'ca_attendencesheetstatus' => 'Y',\n\t \t \t\t);\n \t\t\t\t$this->commodel->updaterec('admissionstudent_centerallocation', $master,'ca_asmid',$asmid);\n\t\t\t\t$this->logger->write_logmessage(\"update\", \"Attendence sheet status update yes in admissionstudent_centerallocation\");\n \t\t$this->logger->write_dblogmessage(\"update\", \"Attendence sheet status update yes in admissionstudent_centerallocation\" );\n\t\t\t}\n\t}", "public function indexAction()\n {\n\t\t$this->verifySessionRights();\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$employee=$this->getConnectedEmployee();\n\t\t$this->setActivity($employee->getName().\" \".$employee->getFirstname().\"'s Agenda is consulted by this user\");\n\t\t$aTimes = $this->getAgendaTime();\n\t\t$aDates = $this->getDatesOfWeek();\t\n\t\t$aDkey = array_keys($aDates);\n\t\t$aAgenda = $this->generateAgenda($employee,$aTimes,$aDates);\n\t\t$aFormatdate = $this->formatDate($aDates);\n//print_r($aAgenda);\n/*\necho $aAgenda[4]['endpm'];\necho \"<br>\".$this->getCreatingTsHour();\nif(isset($aAgenda[4]['endpm']) and $this->getCreatingTsHour()>0 and $this->getCreatingTsHour()<$aAgenda[4]['endpm']) \n\techo \"yes\";\nelse \n\techo \"No\";\nexit(0);\n*/\n \treturn $this->render('BoHomeBundle:Agenda:index.html.twig', array(\n \t\t'employee' => $employee,\n\t\t\t'agenda'=>$aAgenda,\n\t\t\t'datekeys'=>$aDkey,\n\t\t\t'dates'=>$aDates,\n\t\t\t'cth'=>$this->getCreatingTsHour(),//cth is the time when the teacher can do the timesheet \n\t\t\t'higham'=>$this->getHighEndAm($aAgenda),\n\t\t\t'formatdates'=>$aFormatdate,\n\t\t\t'ttkeys'=>array_keys($aTimes),\n\t\t\t'today'=> new \\DateTime(date(\"d-m-Y\")),\n\t\t\t'times'=>$aTimes,\n\t\t\t'pm'=>\"tabeau-bord\",\n\t\t\t'sm'=>\"agenda\",\n \t));\n }", "public function reportDatewiseAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportDatewiseAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "public function index(){\t\n\t\t// set the page title\n\t\t$this->set('title_for_layout', 'Approve Waive Off Request- HRIS - BigOffice');\n\t\t\n\t\t// get employee list\t\t\n\t\t$emp_list = $this->HrAttWaive->get_team($this->Session->read('USER.Login.id'),'L');\n\t\t$format_list = $this->Functions->format_dropdown($emp_list, 'u','id','first_name', 'last_name');\t\t\n\t\t$this->set('empList', $format_list);\n\t\t\n\t\n\t\t// when the form is submitted for search\n\t\tif($this->request->is('post')){\n\t\t\t$url_vars = $this->Functions->create_url(array('keyword','emp_id','from','to'),'HrAttWaive'); \n\t\t\t$this->redirect('/hrattwaive/?'.$url_vars);\t\t\t\n\t\t}\t\t\t\t\t\n\t\t\n\t\tif($this->params->query['keyword'] != ''){\n\t\t\t$keyCond = array(\"MATCH (reason) AGAINST ('\".$this->params->query['keyword'].\"' IN BOOLEAN MODE)\"); \n\t\t}\n\t\tif($this->params->query['emp_id'] != ''){\n\t\t\t$empCond = array('HrAttWaive.app_users_id' => $this->params->query['emp_id']); \n\t\t}\n\t\t// for date search\n\t\tif($this->params->query['from'] != '' || $this->params->query['to'] != ''){\n\t\t\t$from = $this->Functions->format_date_save($this->params->query['from']);\n\t\t\t$to = $this->Functions->format_date_save($this->params->query['to']);\t\t\t\n\t\t\t$dateCond = array('HrAttWaive.created_date between ? and ?' => array($from, $to)); \n\t\t}\n\t\t\n\t\t\n\t\t// fetch the attendance data\t\t\n\t\t$this->paginate = array('fields' => array('id', 'created_date',\t\"date_format(HrAttWaive.date, '%Y-%m') as month\",\n\t\t\"date_format(HrAttWaive.date, '%M, %Y') as month_display\", 'HrEmployee.first_name', 'HrEmployee.last_name','status','approve_date', 'HrEmployee.id', 'count(*) no_req'),\n\t\t'limit' => 10,'conditions' => array($keyCond, \n\t\t$empCond, $dateCond, 'is_draft' => 'N'), 'group' => array('HrEmployee.id',\"date_format(HrAttWaive.date, '%Y-%m')\"),\n\t\t'order' => array('HrAttWaive.created_date' => 'desc'));\n\t\t$data = $this->paginate('HrAttWaive');\n\t\t\n\t\t$this->set('att_data', $data);\n\t\t\n\t\t\n\t\n\t\tif(empty($data)){\n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>You have no waive-off request to approve', 'default', array('class' => 'alert alert'));\t\n\t\t}\n\t\t\n\t\t\n\t}", "public function invoice_audit_trail_export_PDF() {\n //Read page parameter to display report\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n $invoice_id = $this->input->get('invoice_id');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $company_id = $this->input->get('company_id');\n\n $tenant_details = $this->classTraineeModel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $query = $this->reportsModel->get_invoice_audit_trail($tenant_id, NULL, NULL, $field, $order_by, $payment_status, $start_date, $end_date, $invoice_id, $company_id);\n $this->load->helper('pdf_reports_helper');\n return invoice_audit_trail_report_PDF($query, $tenant_details);\n }", "public function makeReport()\n {\n }", "function admin_export_patients($id=NULL) // template for new classes\r\n {\r\n $data['offline_mode']\t\t=\t$this->config->item('offline_mode');\r\n $data['debug_mode']\t\t =\t$this->config->item('debug_mode');\r\n\t\t$data['user_rights'] = $this->mthirra->get_user_rights($_SESSION['username']);\r\n $data['home_clinic'] = $_SESSION['location_id'];\r\n\t\t$data['title'] = \"Export Patients\";\r\n\t\t$data['form_purpose'] = \t\"new_export\";\r\n $data['now_id'] = time();\r\n\t\t$data['unsynched_list'] = $this->madmin_rdb->get_unsynched_patients($data['home_clinic']);\r\n\t\t$data['synched_list'] = $this->madmin_rdb->get_unsynched_patients($data['home_clinic'],TRUE);\r\n\t\t$this->load->vars($data);\r\n\t\tif ($_SESSION['thirra_mode'] == \"ehr_mobile\"){\r\n $new_header = \"ehr/header_xhtml-mobile10\";\r\n $new_banner = \"ehr/banner_emr_wap\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_wap\";\r\n $new_body = \"ehr/emr_newpage_wap\";\r\n $new_footer = \"ehr/footer_emr_wap\";\r\n\t\t} else {\r\n //$new_header = \"ehr/header_xhtml1-strict\";\r\n $new_header = \"ehr/header_xhtml1-transitional\";\r\n $new_banner = \"ehr/banner_ehr_html\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_html\";\r\n $new_body = \"ehr/ehr_admin_export_patients_html\";\r\n $new_footer = \"ehr/footer_emr_html\";\r\n\t\t}\r\n if($data['user_rights']['section_admin'] < 100){\r\n $new_body = \"ehr/ehr_access_denied_html\";\r\n }\r\n\t\t$this->load->view($new_header);\t\t\t\r\n\t\t$this->load->view($new_banner);\t\t\t\r\n\t\t$this->load->view($new_sidebar);\t\t\t\r\n\t\t$this->load->view($new_body);\t\t\t\r\n\t\t$this->load->view($new_footer);\t\t\t\r\n }", "public function reportTodayAttendent()\n {\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n return view('report.reportTodayAttendent')->with('shift',$shift)->with('dept',$dept);\n }", "public function dtexamattemptreport()\n {\n $condition = \"\";\n $search_type = $this->input->post('search_type');\n $date_type = $this->input->post('date_type');\n $date_from = $this->input->post('date_from');\n $date_to = $this->input->post('date_to');\n $data['searchlist'] = $this->customlib->get_searchtype();\n $data['date_type'] = $this->customlib->date_type();\n\n $data['date_typeid'] = '';\n if (isset($search_type) && $search_type != '') {\n $dates = $this->customlib->get_betweendate($search_type);\n $data['search_type'] = $search_type;\n } else {\n $dates = $this->customlib->get_betweendate('this_year');\n $data['search_type'] = '';\n }\n\n $start_date = date('Y-m-d', strtotime($dates['from_date']));\n $end_date = date('Y-m-d', strtotime($dates['to_date']));\n\n $data['label'] = date($this->customlib->getSchoolDateFormat(), strtotime($start_date)) . \" \" . $this->lang->line('to') . \" \" . date($this->customlib->getSchoolDateFormat(), strtotime($end_date));\n\n if (isset($_POST['date_type']) && $_POST['date_type'] != '') {\n\n $data['date_typeid'] = $_POST['date_type'];\n\n if ($search_type == 'exam_from_date') {\n\n $condition .= \" and date_format(onlineexam.exam_from,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n\n } elseif ($date_type == 'exam_to_date') {\n $condition .= \" and date_format(onlineexam.exam_to,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n }\n\n } else {\n\n $condition .= \" and date_format(onlineexam.created_at,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n\n }\n\n $result = $this->onlineexam_model->onlineexamatteptreport($condition);\n $sch_setting = $this->sch_setting_detail;\n $resultlist = json_decode($result);\n $dt_data = array();\n\n if (!empty($resultlist->data)) {\n foreach ($resultlist->data as $resultlist_key => $student_value) {\n\n $exams = explode(',', $student_value->exams);\n\n $exam_name = '';\n $exam_from = '';\n $exam_to = '';\n $exam_duration = '';\n $exam_publish = \"\";\n $exam_resultpublish = \"\";\n $exam_publishprint = \"\";\n $exam_resultpublishprint = \"\";\n foreach ($exams as $exams_key => $exams_value) {\n $exam_details = explode('@', $exams_value);\n\n if (count($exam_details) == 9) {\n\n $exam_name .= $exam_details[1];\n $exam_from .= date($this->customlib->getSchoolDateFormat(), $this->customlib->dateYYYYMMDDtoStrtotime($exam_details[3]));\n $exam_to .= date($this->customlib->getSchoolDateFormat(), $this->customlib->dateYYYYMMDDtoStrtotime($exam_details[4]));\n $exam_duration .= $exam_details[5];\n $exam_publish .= ($exam_details[7] == 1) ? \"<i class='fa fa-check-square-o'></i>\" : \"<i class='fa fa-exclamation-circle'></i>\";\n $exam_resultpublish .= ($exam_details[8] == 1) ? \"<i class='fa fa-check-square-o'></i>\" : \"<i class='fa fa-exclamation-circle'></i>\";\n\n $exam_publishprint .= ($exam_details[7] == 1) ? \"<span style='display:none'>Yes</span>\" : \"<span style='display:none'>No</span>\";\n $exam_resultpublishprint .= ($exam_details[8] == 1) ? \"<span style='display:none'>Yes</span>\" : \"<span style='display:none'>No</span>\";\n\n $exam_name .= '<br>';\n $exam_from .= \"<br>\";\n $exam_to .= \"<br>\";\n $exam_duration .= \"<br>\";\n $exam_publish .= \"<br>\";\n $exam_resultpublish .= \"<br>\";\n $exam_publishprint .= \"<br>\";\n $exam_resultpublishprint .= \"<br>\";\n }\n }\n\n $row = array();\n $row[] = $this->customlib->getFullName($student_value->firstname, $student_value->middlename, $student_value->lastname, $sch_setting->middlename, $sch_setting->lastname);\n $row[] = $student_value->admission_no;\n\n $row[] = $student_value->class;\n $row[] = $student_value->section;\n $row[] = $exam_name;\n $row[] = $exam_from;\n $row[] = $exam_to;\n $row[] = $exam_duration;\n $row[] = $exam_publish . $exam_publishprint;\n $row[] = $exam_resultpublish . $exam_resultpublishprint;\n\n $dt_data[] = $row;\n }\n\n }\n $json_data = array(\n \"draw\" => intval($resultlist->draw),\n \"recordsTotal\" => intval($resultlist->recordsTotal),\n \"recordsFiltered\" => intval($resultlist->recordsFiltered),\n \"data\" => $dt_data,\n );\n echo json_encode($json_data);\n }", "function action_report($low, $high) {\n\n $range_l = '';\n $range_h = '';\n\n if(strcmp($low, '1000-01-01 00:00:00') == 0) {\n $range_l = \"site's beginning\";\n } else {\n $range_l = $low;\n }\n\n if(strcmp($high, '9999-12-31 23:59:59') == 0) {\n $range_h = \"now\";\n } else {\n $range_h = $high;\n }\n\n $freq_patient = user_freq($low, $high, \"Patient\");\n $freq_nurse = user_freq($low, $high, \"Nurse\");\n $freq_doctor = user_freq($low, $high, \"Doctor\");\n $freq_admin = user_freq($low, $high, \"Admin\");\n\n $total_patient = total_action_user($low, $high, \"Patient\");\n $total_nurse = total_action_user($low, $high, \"Nurse\");\n $total_doctor = total_action_user($low, $high, \"Doctor\");\n $total_admin = total_action_user($low, $high, \"Admin\");\n\n $freq_login = action_freq($low, $high, \"Logged In\");\n $freq_logout = action_freq($low, $high, \"Logged Out\");\n $freq_newuser = action_freq($low, $high, \"Created New User\");\n $freq_modrec = action_freq($low, $high, \"Modified Record\");\n $freq_apmt = action_freq($low, $high, \"Scheduled Appointment\");\n $freq_prescript = action_freq($low, $high, \"Prescription Written\");\n\n $total_login = total_action_action($low, $high, \"Logged In\");\n $total_logout = total_action_action($low, $high, \"Logged Out\");\n $total_newuser = total_action_action($low, $high, \"Created New User\");\n $total_modrec = total_action_action($low, $high, \"Modified Record\");\n $total_apmt = total_action_action($low, $high, \"Scheduled Appointment\");\n $total_prescript = total_action_action($low, $high, \"Prescription Written\");\n\n echo \"<h2>Activity report for interval from \".$range_l.\" to \".$range_h.\"</h2><br>\";\n \n echo \"<h3>Average Daily Actions per User Type</h3>\";\n echo \"<table><tr><th>Patients</th><th>Nurses</th><th>Doctors</th><th>Admin</th></tr>\";\n echo \"<tr><td><center>\".$freq_patient.\"</center></td><td><center>\".$freq_nurse.\"</center></td><td><center>\".$freq_doctor.\"</center></td><td><center>\".$freq_admin.\"</center></td></tr></table>\";\n\n echo \"<h3>Total number of Actions per User Type</h3>\";\n echo \"<table><tr><th>Patients</th><th>Nurses</th><th>Doctors</th><th>Admin</th></tr>\";\n echo \"<tr><td><center>\".$total_patient.\"</center></td><td><center>\".$total_nurse.\"</center></td><td><center>\".$total_doctor.\"</center></td><td><center>\".$total_admin.\"</center></td></tr></table>\";\n\n echo \"<h3>Average Daily Actions per Action Type</h3>\";\n echo \"<table><tr><td>Logins: \".$freq_login.\" </td><td>Logouts: \".$freq_logout.\" </td></tr>\";\n echo \"<tr><td>New Users Created: \".$freq_newuser.\" </td><td>Records Modified: \".$freq_modrec.\" </td></tr>\";\n echo \"<tr><td>Appointments Scheduled: \".$freq_apmt.\"</td><td>Prescriptions Written: \".$freq_prescript.\"</td></tr></table>\";\n\n echo \"<h3>Total number of Actions per Action Type</h3>\";\n echo \"<table><tr><td>Logins: \".$total_login.\" </td><td>Logouts: \".$total_logout.\" </td></tr>\";\n echo \"<tr><td>New Users Created: \".$total_newuser.\" </td><td>Records Modified: \".$total_modrec.\" </td></tr>\";\n echo \"<tr><td>Appointments Scheduled: \".$total_apmt.\"</td><td>Prescriptions Written: \".$total_prescript.\"</td></tr></table>\";\n\n\n }", "public function overAllSummaryReportView(Request $request)\n {\n $from_date = trim($request->from); \n $from = date (\"Y-m-d\", strtotime($from_date));\n $explode = explode('-',$from);\n $from_year = $explode[0];\n $get_current_day = date(\"l\",strtotime($from));\n $current_year = date('Y');\n if($get_current_day =='Saturday'){\n $current_day = 1 ;\n }\n if($get_current_day =='Sunday'){\n $current_day = 2 ;\n }\n if($get_current_day =='Monday'){\n $current_day = 3 ;\n }\n if($get_current_day =='Tuesday'){\n $current_day = 4 ;\n }\n if($get_current_day =='Wednesday'){\n $current_day = 5 ;\n }\n if($get_current_day =='Thursday'){\n $current_day = 6 ;\n }\n if($get_current_day =='Friday'){\n $current_day = 7 ;\n }\n if($from > $this->rcdate1){\n echo 'f1';\n exit();\n }\n // get door holiday\n $holiday_count = DB::table('holiday')->where('door_holiday',0)->where('holiday_date',$from)->count();\n if($holiday_count > 0){\n echo 'f2';\n exit();\n }\n if($from_year != $current_year){\n echo 'f3';\n exit();\n }\n // attendent holiday count\n $attendent_holiday_count = DB::table('holiday')->where('attendent_holiday',0)->where('holiday_date',$from)->count();\n // total staff\n $total_staff_count = DB::table('users')->where('trasfer_status',0)->whereNotIn('type',[10])->count();\n // total teacher count \n $total_teacher_count = DB::table('users')->where('trasfer_status',0)->where('type',3)->count();\n // total staff enter into the campus\n $total_staff_enter_into_campus = DB::table('tbl_door_log')->where('type',1)->whereNotIn('user_type',[10])->where('enter_date',$from)->distinct('user_id')->count('user_id');\n\n // total staff leave\n $total_staff_leave_count = DB::table('tbl_leave')->where('final_request_from',$from)->where('status',1)->count();\n $total_teacher_leave_count = DB::table('tbl_leave')\n ->join('users', 'users.id', '=', 'tbl_leave.user_id')\n ->select('tbl_leave.*')\n ->where('users.type', 3)\n ->where('final_request_from',$from)\n ->where('status',1)\n ->count();\n $total_teacher_attendent_in_class = DB::table('teacher_attendent')->where('created_at',$from)->where('status',1)->where('type',3)->distinct('teacherId')->count('teacherId');\n // total class of this day\n $total_class_count = DB::table('routine')\n ->join('semister', 'routine.semister_id', '=', 'semister.id')\n ->select('routine.*')\n ->where('routine.year', $from_year)\n ->where('routine.day', $current_day)\n ->where('semister.status',1)\n ->count();\n\n // total teacher attendent class\n $teacher_taken_total_class_class = DB::table('teacher_attendent')->where('created_at',$from)->where('status',1)->where('type',3)->count();\n #--------------------------------- student section------------------------------------#\n $total_student_count = DB::table('student')\n ->join('semister', 'student.semister_id', '=', 'semister.id')\n ->select('student.*')\n ->where('student.year', $from_year)\n ->where('student.status', 0)\n ->where('semister.status',1)\n ->count();\n $total_student_enter_into_campus = DB::table('tbl_door_log')->where('type',2)->where('enter_date',$from)->distinct('student_id')->count('student_id');\n $total_student_enter_into_class = DB::table('student_attendent')->where('created_at',$from)->distinct('studentId')->count('studentId');\n // total hours class of this day\n $total_class_hour_in_routine = DB::table('routine')\n ->join('semister', 'routine.semister_id', '=', 'semister.id')\n ->select('routine.*')\n ->where('routine.year', $from_year)\n ->where('routine.day', $current_day)\n ->where('semister.status',1)\n ->get();\n // total hours class held\n $total_hours_class_held_query = DB::table('teacher_attendent')->where('created_at',$from)->where('status',1)->where('type',3)->get(); \n\n return view('view_report.overAllSummaryReportView')\n ->with('total_staff_count',$total_staff_count)\n ->with('total_teacher_count',$total_teacher_count)\n ->with('total_staff_enter_into_campus',$total_staff_enter_into_campus)\n ->with('total_staff_leave_count',$total_staff_leave_count)\n ->with('total_teacher_leave_count',$total_teacher_leave_count)\n ->with('total_teacher_attendent_in_class',$total_teacher_attendent_in_class)\n ->with('total_class_count',$total_class_count)\n ->with('teacher_taken_total_class_class',$teacher_taken_total_class_class)\n ->with('from',$from)\n ->with('attendent_holiday_count',$attendent_holiday_count)\n ->with('total_student_count',$total_student_count)\n ->with('total_student_enter_into_campus',$total_student_enter_into_campus)\n ->with('total_student_enter_into_class',$total_student_enter_into_class)\n ->with('total_class_hour_in_routine',$total_class_hour_in_routine)\n ->with('total_hours_class_held_query',$total_hours_class_held_query)\n ;\n }", "public function actionOutputStatistical()\n {\n\t\tset_time_limit(0);\n $searchModel = new AttendanceCheckinReportsSearch();\n $dataProvider = $searchModel->statistictalSearch(Yii::$app->request->queryParams);\n\t\t \n\t\t$sort = Yii::$app->request->queryParams['sort']?Yii::$app->request->queryParams['sort']:'signdate';\n\t\t\n\t\tif($sort{0}==\"-\"){\n\t\t\t$orderBy = substr($sort,1).\" desc\";\n\t\t}else{\n\t\t\t$orderBy = \" {$sort} ASC\";\n\t\t}\n\t\t$result = $dataProvider->query->orderBy($orderBy)->asArray()->all();\n $arr = []; \n foreach($result as $r) {\n $arr[] = $r;\n }\n\t\t$header = [\n 'year' => '年', \n 'month' => '月', \n 'personnel_id' => '员工ID', \n 'username' => '员工姓名', \n 'overtime' => '当月加班时长(计算)', \n 'overtime_valid' => '当月加班时长(有效)', \n ];\n\t\t$columns = array_keys($header);\n \\moonland\\phpexcel\\Excel::export([\n 'isMultipleSheet' => true,\n\t\t\t'models' => [\n\t\t\t\t'考勤统计' => $arr, \n\t\t\t],\n\t\t\t'columns' => [\n\t\t\t\t'考勤统计' => $columns,\n\t\t\t], \n\t\t\t'headers' => [\n\t\t\t\t'考勤统计' => $header, \n\t\t\t],\n ]);\n }", "public function basicreport()\n\t{\n\t\t\n\t\t$disp_msg = $this->session->flashdata('disp_msg');\n\t\t\n\t\t\n\t\t$search_filters = array();\n\t\t$search_results = array();\n\t\t\n\t\t$search_query = \"SELECT * FROM postpatch_schedule WHERE 1=1 \";\n\t\t\n\t\tif (!empty($_POST)) {\n\t\t\tif(!empty($_POST['dpa_flexinet_id']) && count($_POST['dpa_flexinet_id'])>0) {\n\t\t\t\t$dpavals = implode(\"' , '\", $_POST['dpa_flexinet_id']);\n\t\t\t\t$search_query .= \" AND dpa_flexinet IN ('\".$dpavals.\"') \";\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($_POST['verificationstatus']) && count($_POST['verificationstatus'])>0) {\n\t\t\t\t$verfstatusvals = implode(\"' , '\", $_POST['verificationstatus']);\n\t\t\t\t$search_query .= \" AND verificationstatus IN ('\".$verfstatusvals.\"') \";\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($_POST['scheduledate']) && count($_POST['scheduledate'])>0) {\n\t\t\t\t$scdvals = implode(\"' , '\", $_POST['scheduledate']);\n\t\t\t\t$search_query .= \" AND scheduledate IN ('\".$scdvals.\"') \";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$search_query_res = $this->commonclass->execute_rawquery($search_query);\n\t\t$search_results = $search_query_res->result_array();\n\t\t\n\t\t$dpa_emps = $this->commonclass->retrive_records('postpatch_schedule', ' DISTINCT(dpa_flexinet) as dpa_flexinet ', \"\",array(\"dpa_flexinet\" => \"ASC\"),'');\n\t\tif (count($dpa_emps)>0) {\n\t\t\tforeach($dpa_emps as $onedpa) {\n\t\t\t\t$search_filters['dpa'][] = $onedpa['dpa_flexinet'];\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\t$verf_status_res = $this->commonclass->retrive_records('postpatch_schedule', ' DISTINCT(verificationstatus) as verificationstatus ', \"\",array(\"dpa_flexinet\" => \"ASC\"),'');\n\t\tif (count($verf_status_res)>0) {\n\t\t\tforeach($verf_status_res as $oneverif) {\n\t\t\t\t$search_filters['verf_status'][] = $oneverif['verificationstatus'];\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$scheduledate_res = $this->commonclass->retrive_records('postpatch_schedule', ' DISTINCT(scheduledate) as scheduledate ', \"\",array(\"dpa_flexinet\" => \"ASC\"),'');\n\t\tif (count($scheduledate_res)>0) {\n\t\t\tforeach($scheduledate_res as $oneverif1) {\n\t\t\t\t$search_filters['scheduledates'][$oneverif1['scheduledate']] = ($oneverif1['scheduledate'] != \"0000-00-00\") ? $this->commonclass->dateformat1($oneverif1['scheduledate']) : \"00/00/0000\";\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t## ____________ Data sending to the template starts ____________ ##\n\t\t$data['disp_msg'] = $disp_msg; # display messages\n\t\t$data['search_filters'] = $search_filters; # search_filters\n\t\t$data['search_results'] = $search_results; # search_filters\n\t\t//$data['postpatch_uploads'] = $postpatch_uploads; # postpatch_schedule\n\t\t\n\t\t## ____________ Data sending to the template ends here ____________ ##\n\t\t\n\t\t$this->load->view('layout/'.$this->sel_theam_path.'/header', $data); # html view page\n\t\t$this->load->view('admin/report1-page', $data); # html view page\n\t\t$this->load->view('layout/'.$this->sel_theam_path.'/footer', $data); # html view page\n\t}", "public function reportDatewiseClassWiseAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportDatewiseClassWiseAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "function generateAttendance($args, $request) {\r\n\t\t$meetingId = isset($args[0]) ? $args[0]: 0;\r\n\t\t$this->validate($meetingId, MINUTES_STATUS_ATTENDANCE);\r\n\t\t$this->setupTemplate(true, $meetingId);\r\n\t\t$meeting =& $this->meeting;\r\n\r\n\t\t$journal =& Request::getJournal();\r\n\t\timport('classes.meeting.form.AttendanceForm');\r\n\t\t$attendanceForm = new AttendanceForm($meetingId, $journal->getId());\r\n\t\t$submitted = Request::getUserVar(\"submitAttendance\") != null ? true : false;\r\n\r\n\t\tif($submitted) {\r\n\t\t\t$attendanceForm->readInputData();\r\n\t\t\tif($attendanceForm->validate()) {\r\n\t\t\t\t$attendanceForm->execute();\r\n\t\t\t\t$attendanceForm->savePdf();\r\n\t\t\t\tRequest::redirect(null, null, 'manageMinutes', $meetingId);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif ($attendanceForm->isLocaleResubmit()) {\r\n\t\t\t\t\t$attendanceForm->readInputData();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$attendanceForm->initData();\r\n\t\t\t\t}\r\n\t\t\t\t$attendanceForm->display();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$attendanceForm->display();\r\n\t\t}\r\n\t}", "function runReport (){\n\t\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($this->params['form']=='allData'){\n\t\t\t\tindex();\n\t\t\t}else {\n\t\t\t\tindex();\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t}", "function runReport (){\n\t\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($this->params['form']=='allData'){\n\t\t\t\tindex();\n\t\t\t}else {\n\t\t\t\tindex();\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t}", "public function crystal_report_view()\n\t{\n\t\t$this->data['crystal_report']=$this->reports_personnel_schedule_model->crystal_report_view();\n\t\t$this->load->view('employee_portal/report_personnel/schedule/crystal_report',$this->data);\n\t}", "function sendExport() {\n\tglobal $orgcode;\n\tglobal $filename;\n\tglobal $firstdate;\n\tglobal $lastdate;\n\t$headers = [\n\t\t\"ORGCODE\",\t//0\n\t\t\"PARTICIP\",\n\t\t\"ENROLL\",\n\t\t\"PAYER\",\n\t\t\"STATE\",\n\t\t\"GLUCTEST\",\t//5\n\t\t\"GDM\",\n\t\t\"RISKTEST\",\n\t\t\"AGE\",\n\t\t\"ETHNIC\",\n\t\t\"AIAN\",\t\t//10\n\t\t\"ASIAN\",\n\t\t\"BLACK\",\n\t\t\"NHOPI\",\n\t\t\"WHITE\",\n\t\t\"SEX\",\t\t//15\n\t\t\"HEIGHT\",\n\t\t\"EDU\",\n\t\t\"DMODE\",\n\t\t\"SESSID\",\n\t\t\"SESSTYPE\",\t//20\n\t\t\"DATE\",\n\t\t\"WEIGHT\",\n\t\t\"PA\"\n\t];\n\t\n\t$data = [$headers];\n\t$noncompliant = [$headers];\n\t$today = new DateTime(\"NOW\");\n\t\n\t// get all participant data\n\t$records = \\REDCap::getData(PROJECT_ID);\n\t$project = new \\Project(PROJECT_ID);\n\t\n\t// get year value for when these records were created or first logged update\n\t$recordCreationDates = [];\n\t$sql = \"SELECT pk, ts FROM redcap_log_event WHERE project_id=\" . PROJECT_ID . \" and pk in (\" . implode(array_keys($records), \", \") . \") and (description=\\\"Create record\\\" OR description=\\\"Update record\\\") ORDER BY pk ASC, ts ASC\";\n\t$query = db_query($sql);\n\twhile ($row = db_fetch_assoc($query)) {\n\t\tif (!isset($recordCreationDates[$row['pk']])) {\n\t\t\t$recordCreationDates[$row['pk']] = substr($row['ts'], 2, 2);\n\t\t}\n\t}\n\t\n\t// regex for getting labels for project fields (like state, sess_type, etc)\n\t$labelPattern = \"/(\\d+),?\\s?(.+?)(?=\\x{005c}\\x{006E}|$)/\";\n\t\n\tforeach ($records as $rid => $record) {\n\t\t$eid = array_keys($record)[0];\n\t\t\n\t\t// skip if orgcode set and not match\n\t\tif (isset($orgcode) and $orgcode != $record[$eid]['orgcode']) {\n\t\t\tcontinue;\n\t\t}\n\t\t\n\t\t// skip if have diabietes\n\t\tif ($record[$eid]['have_diabetes'] == 1 or $record[$eid]['enter_roster'] == 0) continue;\n\t\t\n\t\t$line = array_fill(0, 23, null);\n\t\t$line[0] = $record[$eid]['orgcode'];\n\t\t\n\t\t// determine participant ID\n\t\t$participantID = $recordCreationDates[$rid];\n\t\tpreg_match_all($labelPattern, $project->metadata['participant_id_group']['element_enum'], $matches);\n\t\t$participantID .= trim($matches[2][$record[$eid]['participant_id_group'] - 1]);\n\t\t$participantID .= $record[$eid]['participant_id_group'];\n\t\tpreg_match_all(\"/\\d+/\", $record[$eid]['participant_employee_id'], $matches);\n\t\t$participantID .= $matches[0][0];\n\t\t\n\t\t$line[1] = $participantID;\n\t\t$line[2] = $record[$eid]['program_referral'] === null ? 10 : $record[$eid]['program_referral'];\n\t\t$line[3] = $record[$eid]['payer'] === null ? 9 : $record[$eid]['payer'];\n\t\tpreg_match_all($labelPattern, $project->metadata['state']['element_enum'], $matches);\n\t\tpreg_match(\"/- ([A-Z]{2})(?:\\s|$)/\", $matches[2][$record[$eid]['state'] - 1], $matches);\n\t\t$line[4] = $matches[1];\n\t\t$line[5] = $record[$eid]['gluctest'] == 1 ? 1 : 2;\n\t\t$line[6] = $record[$eid]['gdm'] == 1 ? 1 : 2;\n\t\t$line[7] = $record[$eid]['risktest'] == 1 ? 1 : 2;\n\t\t$dob = new DateTime($record[$eid]['dob']);\n\t\t$line[8] = $dob->diff($today)->format('%y');\n\t\t$line[9] = $record[$eid]['ethnicity'] == null ? 9 : $record[$eid]['ethnicity'];\n\t\t$line[10] = $record[$eid]['race'][1] == 1 ? 1 : 2;\n\t\t$line[11] = $record[$eid]['race'][2] == 1 ? 1 : 2;\n\t\t$line[12] = $record[$eid]['race'][3] == 1 ? 1 : 2;\n\t\t$line[13] = $record[$eid]['race'][4] == 1 ? 1 : 2;\n\t\t$line[14] = $record[$eid]['race'][5] == 1 ? 1 : 2;\n\t\t$line[15] = $record[$eid]['sex'] == null ? 9 : $record[$eid]['sex'];\n\t\tpreg_match_all($labelPattern, $project->metadata['height']['element_enum'], $matches);\n\t\tpreg_match_all(\"/[0-9]{1,2}/\", $matches[2][$record[$eid]['height'] - 1], $matches);\n\t\t$line[16] = @((int) $matches[0][0] * 12 + (int) $matches[0][1]);\n\t\t$line[17] = $record[$eid]['education'] == null ? 9 : $record[$eid]['education'];\n\t\t\n\t\t$instanceSum = 0;\n\t\tforeach ($record['repeat_instances'][$eid]['sessionscoaching_log'] as $i => $instance) {\n\t\t\t// only add data that's within last 6 months!\n\t\t\t$sess_date = $instance[\"sess_actual_date\"];\n\t\t\tif (empty($sess_date)) {\n\t\t\t\t$sess_date = $instance[\"sess_scheduled_date\"];\n\t\t\t}\n\t\t\t\n\t\t\t$thisdate = strtotime($sess_date);\n\t\t\tif (empty($sess_date) or (!empty($firstdate) and $firstdate > $thisdate) or (!empty($lastdate) and $lastdate < $thisdate)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$instanceSum++;\n\t\t\t$line_copy = $line;\n\t\t\t$line_copy[18] = $instance['sess_mode'];\n\t\t\t$line_copy[19] = $instance['sess_id'];\n\t\t\tif ($instance[\"sess_month\"] >= 7) {\n\t\t\t\t$line_copy[19] = 99;\n\t\t\t\t$line_copy[20] = \"CM\";\n\t\t\t}\n\t\t\tif ($instance[\"sess_month\"] >= 7)\n\t\t\t\t$line_copy[20] = \"OM\";\n\t\t\tpreg_match_all($labelPattern, $project->metadata['sess_type']['element_enum'], $matches);\n\t\t\tpreg_match_all(\"/\\(([A-Z]|[A-Z][A-Z])\\)/\", $matches[2][$instance['sess_type'] - 1], $matches);\n\t\t\t$line_copy[20] = $matches[1][0];\n\t\t\t$line_copy[21] = $sess_date == null ? null : date(\"m/d/Y\", strtotime($sess_date));\n\t\t\t$line_copy[22] = $instance['sess_weight'];\n\t\t\t$line_copy[23] = $instance['sess_pa'];\n\t\t\t\n\t\t\t$session_attended = false;\n\t\t\tif ($instance[\"sess_attended\"] or $instance['sess_weight'] or $instance['sess_pa'])\n\t\t\t\t$session_attended = true;\n\t\t\t\n\t\t\tvalidateLine($line_copy, $session_attended);\n\t\t\t\n\t\t\t// if session is marked as attended but weight and/or pa values not included, use 999\n\t\t\tif ($instance[\"sess_attended\"] and empty($line_copy[22]))\n\t\t\t\t$line_copy[22] = 999;\n\t\t\tif ($instance[\"sess_attended\"] and empty($line_copy[23]))\n\t\t\t\t$line_copy[23] = 999;\n\t\t\t\n\t\t\t// if error messages were appended...\n\t\t\tif (isset($line_copy[24]) and isset($_GET['noncompliant'])) {\n\t\t\t\t$noncompliant[] = $line_copy;\n\t\t\t}\n\t\t\t\n\t\t\t// no errors and no non-compliant param\n\t\t\tif (!isset($line_copy[24]) and !isset($_GET['noncompliant'])) {\n\t\t\t\t$data[] = $line_copy;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// send participant records with no session data to noncompliant set\n\t\tif ($instanceSum == 0)\n\t\t\t$noncompliant[] = $line;\n\t}\n\t\n\theader('Content-Type: text/csv');\n\theader(\"Content-Disposition: attachment; filename=\\\"$filename\\\"\");\n\t$fp = fopen('php://output', 'wb');\n\t\n\t// non-compliance report\n\tif (isset($_GET['noncompliant'])) {\n\t\t$data = $noncompliant;\n\t}\n\t\n\tforeach ($data as $line) {\n\t\tfputcsv($fp, $line, ',');\n\t}\n\tfclose($fp);\n}", "public function view_attendance() { \r\n date_default_timezone_set(\"Asia/Manila\");\r\n $date= date(\"Y-m-d\");\r\n $year = date('Y', strtotime($date));\r\n $month = date('m', strtotime($date));\r\n $datenow = $year .\"-\". $month;\r\n $set_data = $this->session->userdata('userlogin'); //session data\r\n $data = array('clientID' => $set_data['clientID']\r\n ); \r\n $firstDay = mktime(0,0,0,$month, 1, $year);\r\n $timestamp = $firstDay;\r\n $weekDays = array();\r\n for ($i = 0; $i < 31; $i++) {\r\n $weekDays[] = strftime('%a', $timestamp);\r\n $timestamp = strtotime('+1 day', $timestamp);\r\n } \r\n $records['clientprofile']=$this->Client_Model->clientprofile($data);\r\n $records['weekDays']=$weekDays;\r\n $records['useradmin']=$this->User_Model->usertype();\r\n $records['employeeatendance']=$this->Attendance_Model->viewattendanceemployee($set_data['clientID'], $datenow);\r\n $this->load->view('attendanceemployee', $records);\r\n }", "function genrate_assessmenthistory_pdf($columnsValues,$data,$vehicletype,$allconstants,$profile,$toDate=null,$fromDate=null,$vehiclelicno=null) {\n\t\n\t\t$columnwidtharrays = array(9,15,15,14,15,14,13,12,13,27,12,17,13);\n\t\t\n\t\t$heightdynamic = 8;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vehicletype) && !empty($vehicletype)) || \n\t\t(isset($vehiclelicno) && !empty($vehiclelicno))){\n\n\t\t\t$x= $this->GetX();\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+125);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($vehicletype) && !empty($vehicletype))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Type :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vehicletype) && !empty($vehicletype))\n\t\t\t$this->MultiCell(39, 8, $allconstants[$vehicletype],0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t\t$x= $this->GetX();\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Register No. : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(164, 8, $vehiclelicno,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(164, 8, '',0,'','L',true);\n\t\t\t$this->Ln(2);\n\t\t\t//vehiclelicno\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n\t\t\n\t\t$c=0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\n\t\t if( $c == 0 || $c == 8 || $c == 10 || $c == 11 || $c == 12 ){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 16, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\t\t\n\t\t\n\t\t$this->SetFont('Arial', '', 6);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t foreach ($data as $val) {\n\t\t \n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $dt_created_date =\tdate('d M Y', strtotime($val['AssessmentVehicleDetail']['dt_created_date']));\n\t\t $vc_assessment_no =\t$val['AssessmentVehicleDetail']['vc_assessment_no'];\n\t\t $vc_vehicle_lic_no =\t$val['AssessmentVehicleDetail']['vc_vehicle_lic_no'];\n\t\t $vc_vehicle_reg_no = \t$val['AssessmentVehicleDetail']['vc_vehicle_reg_no'];\n\t\t $vc_prtype_name =\t$val['VehicleDetail']['VEHICLETYPE']['vc_prtype_name'];\n\t\t\t$vc_pay_frequency = \t$val['AssessmentVehicleDetail']['vc_pay_frequency'];\n\t\t $vc_prev_end_om =\tnumber_format($val['AssessmentVehicleDetail']['vc_prev_end_om']);\n\t\t $vc_end_om =\tnumber_format($val['AssessmentVehicleDetail']['vc_end_om']);\n\t\t $vc_km_travelled = \t\tnumber_format($val['AssessmentVehicleDetail']['vc_km_travelled']);\n\t\t $vc_rate = \t\t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_rate'],2,'.',',');\n\t\t $vc_payable = \t\t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_payable'],2,'.',',');\n\t\t $vc_status =\t\t$allconstants[$val['AssessmentVehicleMaster']['vc_status']];\n\n\t\t\t$font_size = 6;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$alignvalue='C';\n\t\t\t\n\t\t\t$col[] = array('text' => $i+1, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_created_date, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $vc_assessment_no, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_lic_no, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_reg_no, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prtype_name, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_pay_frequency, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prev_end_om, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_end_om, 'width' =>$columnwidtharrays[8], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_km_travelled, 'width' =>$columnwidtharrays[9], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_rate, 'width' =>$columnwidtharrays[10], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_payable, 'width' =>$columnwidtharrays[11], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_status, 'width' =>$columnwidtharrays[12], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}", "function report()\n {\n if ($this->acl->otentikasi2($this->title) == TRUE){\n $cur = $this->input->post('ccurrency');\n $start = $this->input->post('start');\n $end = $this->input->post('end');\n\n $data['currency'] = $cur;\n $data['start'] = tglin($start);\n $data['end'] = tglin($end);\n $data['rundate'] = tglin(date('Y-m-d'));\n $data['log'] = $this->decodedd->log;\n\n // Property Details\n $data['company'] = $this->properti['name'];\n\n $result = null;\n foreach ($this->model->report($cur,$start,$end)->result() as $res) {\n $result[] = array (\"id\"=>$res->id, \"no\"=>$res->no, \"notes\"=>$res->notes, \"dates\"=>tglin($res->dates), \n \"currency\"=>$res->currency, \"from\"=>$this->get_acc($res->from), \"to\"=>$this->get_acc($res->to), \n \"posted\"=>$res->approved, \"amount\"=>$res->amount);\n }\n $data['result'] = $result; $this->output = $data;\n }else { $this->reject_token(); }\n $this->response('content');\n }", "public function index(\\Silex\\Application $app, Request $request)\n {\n $cat = $request->get('cat');\n $idioma = $request->get('idioma');\n $start = $request->get('start');\n $end = $request->get('end');\n\t\t$reportname = $request->get('reportname');\n\n $yr = empty( $request->get('yr') ) ? date(\"Y\") : $request->get('yr');\n\n $app['yr'] = $yr;\n\n $sqlmode = $app['orm.em']->getConnection()->prepare('SET sql_mode=0');\n $sqlmode->execute();\n\n $report = array();\n /*************************************/\n if ($start != 'default' and $end != 'default') {\n if ($idioma=='pr') {\n $usuarios = $app['orm.em']->getConnection()->prepare(\"SELECT * FROM importuserpr WHERE Categoria='\".$cat.\"' AND Fecha BETWEEN '\".$start.\"' AND '\".$end.\"' GROUP BY Nome\");\n $usuarios->execute();\n $report = $usuarios->fetchAll();\n } else {\n $usuarios = $app['orm.em']->getConnection()->prepare(\"SELECT * FROM importuser WHERE Categoria='\".$cat.\"' AND Fecha BETWEEN '\".$start.\"' AND '\".$end.\"' GROUP BY Nombre \");\n $usuarios->execute();\n $report = $usuarios->fetchAll();\n }\n }\n /*************************************/\n return $app['twig']->render('reportcat.html.twig', array(\n 'cat'=>$cat,\n 'idioma'=>$idioma,\n 'start'=>$start,\n 'end'=>$end,\n 'report' => $report, \n\t\t\t 'reportname' => $reportname\n ));\n }", "public function reportPeriodicStudentAbsentListView(Request $request)\n {\n $year = trim($request->year) ;\n $shift = trim($request->shift);\n $dept = trim($request->dept);\n $semister = trim($request->semister);\n $section = trim($request->section);\n $date_form = trim($request->from); \n $from = date (\"Y-m-d\", strtotime($date_form));\n $date_to = trim($request->to); \n $date_too = trim($request->to);\n $to = date (\"Y-m-d\", strtotime($date_to));\n $sorting_type = trim($request->sorting_type);\n $attendent_days = trim($request->attendent_days);\n\n $count_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereBetween('holiday_date', [$from, $to])->count();\n // total day caluclation\n $date1 = date_create($from);\n $date2 = date_create($to);\n //difference between two dates\n $diff = date_diff($date1,$date2);\n $total_day = $diff->format(\"%a\")+1;\n if($sorting_type == '1'){\n $result = DB::table('student_attendent')\n ->join('students','student_attendent.studentId','=','students.id')\n ->join('student','students.id','=','student.studentID')\n ->select('student_attendent.*','student.roll','student.registration', DB::raw(\"COUNT( DISTINCT student_attendent.created_at) AS count\"))\n ->where('student_attendent.year',$year)\n ->where('student_attendent.shift_id',$shift)\n ->where('student_attendent.dept_id',$dept)\n ->where('student_attendent.semister_id',$semister)\n ->where('student_attendent.section_id',$section)\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereBetween('student_attendent.created_at', [$from, $to])\n ->groupBy('student_attendent.studentId')\n ->orderBy('student_attendent.studentId','ASC')\n ->get();\n }elseif($sorting_type == '2'){\n $result = DB::table('student_attendent')\n ->join('students','student_attendent.studentId','=','students.id')\n ->join('student','students.id','=','student.studentID')\n ->select('student_attendent.*','student.roll','student.registration', DB::raw(\"COUNT( DISTINCT student_attendent.created_at) AS count\"))\n ->where('student_attendent.year',$year)\n ->where('student_attendent.shift_id',$shift)\n ->where('student_attendent.dept_id',$dept)\n ->where('student_attendent.semister_id',$semister)\n ->where('student_attendent.section_id',$section)\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereBetween('student_attendent.created_at', [$from, $to])\n ->groupBy('student_attendent.studentId')\n ->orderBy('count','ASC')\n ->orderBy('student_attendent.studentId','ASC')\n ->get();\n }elseif($sorting_type == '3'){\n $result = DB::table('student_attendent')\n ->join('students','student_attendent.studentId','=','students.id')\n ->join('student','students.id','=','student.studentID')\n ->select('student_attendent.*','student.roll','student.registration', DB::raw(\"COUNT( DISTINCT student_attendent.created_at) AS count\"))\n ->where('student_attendent.year',$year)\n ->where('student_attendent.shift_id',$shift)\n ->where('student_attendent.dept_id',$dept)\n ->where('student_attendent.semister_id',$semister)\n ->where('student_attendent.section_id',$section)\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereBetween('student_attendent.created_at', [$from, $to])\n ->groupBy('student_attendent.studentId')\n ->orderBy('count','ASC')\n ->orderBy('student_attendent.studentId','ASC')\n ->get();\n }\n\n foreach($result as $value) {\n //do something\n $attentdent_id[] = $value->studentId;\n}\n$absent_result = DB::table('students')\n ->join('student', 'students.id', '=', 'student.studentID')\n ->select('student.*', 'students.studentName','students.studentMobile','students.studentImage','student.registration')\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereNotIn('student.studentID',$attentdent_id)\n ->orderBy('student.roll','asc')\n ->get();\n\n $shift_name = DB::table('shift')->where('id',$shift)->first();\n $dept_name = DB::table('department')->where('id',$dept)->first();\n $semister_name = DB::table('semister')->where('id',$semister)->first();\n $section_name = DB::table('section')->where('id',$section)->first();\n return view('view_report.reportPeriodicStudentAbsentListView')->with('result',$result)->with('count_holiday',$count_holiday)->with('total_day',$total_day)->with('from',$from)->with('to',$to)->with('year',$year)->with('shift_name',$shift_name)->with('dept_name',$dept_name)->with('semister_name',$semister_name)->with('section_name',$section_name)->with('shift',$shift)->with('dept',$dept)->with('semister',$semister)->with('section',$section)->with('date_form',$date_form)->with('date_to',$date_to)->with('absent_result',$absent_result)->with('attendent_days',$attendent_days)->with('sorting_type',$sorting_type); \n\n }", "public function report($typeId = null, $reportDate = null, $numOfDays = null, $classId = null, $sectionId = null)\n\t{\t\t\t\n\t\t$year = substr($reportDate, 0, 4);\n\t\t$month = substr($reportDate, 5, 7);\t\t\n\n\t\t$classData = $this->model_classes->fetchClassData($classId);\n\t\t$sectionData = $this->model_section->fetchSectionByClassSection($classId, $sectionId);\n\n\t\t\t// student\t\t\t\n\t\t\t$div = '<div class=\"well\">\n\t\t\t\t<center>\n\t\t\t\t\t<h4> Ngành học: '.$classData['class_name'].'<br> Lớp học : '.$sectionData['section_name'].'<h4>\n\t\t\t\t\t<h4> Năm : '.$year.' - Month :'.$month.'<h4>\t\t\n\t\t\t\t\t<small>\t\n\t\t\t\t\t\t1 : Tiết 1-2 ( 7h00-8h45) <br />\t\t\t\t\n\t\t\t\t\t\t2 : Tiết 3-4 (9h-10h45) <br />\n\t\t\t\t\t\t3 : Tiết 5-6 (13h - 14h45)<br />\n\t\t\t\t\t\t4 : Tiết 7-8 (15h-16h45)<br />\n\t\t\t\t\t\t\t5 : Tiết 9-10 (17h00 - 18h45)<br />\n\t\t\t\t\t</small>\n\t\t\t\t</center>\n\t\t\t</div>\n\n\t\t\t<div style=\"overflow-x:auto;\">\t\t\t\n\t\t\t<table class=\"table table-bordered\" style=\"width:100%;\">\t\t\t\n\t\t\t\t<tbody style=\"width:100%;\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"width:25%;\">Môn học</td>\n\t\t\t\t\t\t';\t\t\n\t\t\t\t\t\t// loop for days\n\t\t\t\t\t\tfor($i = 1; $i <= $numOfDays; $i++) {\n\t\t\t\t\t\t\t$div .= '\n\t\t\t\t\t\t\t\t<td style=\"width:10%;\">'.$i.'</td>';\t\n\t\t\t\t\t\t} // /for\n\t\t\t\t\t$div .= '</tr>';\n\t\t\t\t\t\t\n\t\t\t\t\t$subjectInfo = $this->model_subject->fetchSubjectDataByClass($classId);\n\n\t\t\t\t\tforeach ($subjectInfo as $key => $value) {\n\t\t\t\t\t\t$subjectName = $value['name'];\n\t\t\t\t\t\t$div .= '\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>'.$subjectName.'</td>';\n\n\t\t\t\t\t\t\tfor($i = 1; $i <= $numOfDays; $i++) {\n\t\t\t\t\t\t\t\t// $attendanceData = $this->model_attendance->getAttendance($i, $reportDate, $value['student_id'], $typeId, $classId, $sectionId);\n\t\t\t\t\t\t\t\t$scheduleData = $this->model_schedule->getAttendance($i, $reportDate, $value['subject_id'], $sectionId);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$div .= '<td>';\n\t\t\t\t\t\t\t\tforeach ($scheduleData as $scheduleKey => $scheduleValue) {\n\n\t\t\t\t\t\t\t\t\tif($scheduleValue['schedule_type'] == 1) {\n\t\t\t\t\t\t\t\t\t\t// Có mặt\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-success\">1</span>';\t\n\t\t\t\t\t\t\t\t\t} else if($scheduleValue['schedule_type'] == 2) {\n\t\t\t\t\t\t\t\t\t\t// Vắng\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-primary\">2</span>';\t\n\t\t\t\t\t\t\t\t\t} else if($scheduleValue['schedule_type'] == 3) {\n\t\t\t\t\t\t\t\t\t\t// Trễ\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-warning\">3</span>';\t\n\t\t\t\t\t\t\t\t\t} else if($scheduleValue['schedule_type'] == 4) {\n\t\t\t\t\t\t\t\t\t\t// Trễ\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-warning\">4</span>';\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Không xác định\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-danger\">5</span>';\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$div .= $scheduleStatus;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$div .= '\n\t\t\t\t\t\t\t\t\t</td>';\t\n\t\t\t\t\t\t\t\t} // /for\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t$div .= '</tr>';\t\t\n\t\t\t\t\t} // /foreach\n\t\t\t\t$div .= '</tbody>\n\t\t\t\t</table>\n\t\t\t<div>';\t\t\t\n\t\t\techo $div;\n\t\t\n\n\t\t\n\t}", "public function report() {\n $data = [];\n if ($this->input->post('submit')) {\n $report_data['from_date'] = $this->input->post('form_from_date');\n $report_data['to_date'] = $this->input->post('form_to_date');\n if ($this->input->post('form_summarized')) {\n $data['summarized_report'] = $this->account_model->getSummarizedReport($report_data);\n } else {\n $data['report'] = $this->account_model->getReport($report_data);\n }\n } else {\n if ($this->session->has_userdata('financialyear')) {\n $data['financialyear'] = $this->session->userdata('financialyear');\n }\n }\n $this->view('report', $data);\n }", "public function actionGeneratorall() {\n //$sql = \"select hoscode from chospital_amp where already = 1\";\n $sql = \"select hoscode from chospital_amp where already = 1\";\n $hosData = $this->query_all_db2($sql);\n\n //find cumulative table from mas_mapp_main table with comment value 2\n $sql = \"select * from mas_mapp_main\";\n $cuTable = $this->query_all_db2($sql);\n\n foreach ($cuTable as $cData) {\n $table = $cData['MAIN_TABLE'];\n $sql = \"truncate $table\";\n $this->exec_sql($sql, 2);\n }\n\n foreach ($hosData as $hData) {\n $db_name = 'jhcisdb_' . $hData['hoscode'];\n $db = 'db' . $hData['hoscode'];\n \n $sql = \"call create_f43_table()\";\n $this->exec_sql_db($sql, $db);\n \n foreach ($cuTable as $cData) {\n $table = $cData['MAIN_TABLE'];\n $DATE_START = $cData['DATESTART'];\n $DATE_END = $cData['DATEEND'];\n $mapp_sql = trim($cData['MAPP_QUERY']);\n\n if ($table == 'f43_dental') {\n $sql = \"call cal_table_dental_tmp('$table')\";\n $this->exec_sql_db($sql, $db);\n }else if($table == 'f43_appointment'){\n $sql = \"call cal_table_appointment_tmp('$table')\";\n $this->exec_sql_db($sql, $db);\n }else {\n //generate data from jhcis version to f43 version\n $sql = \"call cal_table_tmp_newver1(\\\"\" . $table . \"\\\",\\\"(\" . $mapp_sql . \")\\\",\\\"\" . $DATE_START . \"\\\",\\\"\" . $DATE_END . \"\\\")\";\n $this->exec_sql_db($sql, $db);\n }\n\n //insert f43 from jhcis database to 43f_generate database\n $sql = \"call replace_into_table('$db_name','$table')\";\n $this->exec_sql($sql, 2);\n\n //drop f43 table in jhcis database\n //$sql = \"call cal_table_tmp_drop('$table','$db_name')\";\n //$this->exec_sql($sql, 2);\n }\n }\n\n return 'All';\n }", "function glReport() {\n if ($this->session->userdata('role') == 550 || $this->session->userdata('role') == 551) {\n if (!empty($_POST)) {\n if (isset($_POST['type'])) {\n if ($_POST['type'] == \"pdf\") {\n $collaboratore = $this->input->post('txtCollaboratore');\n $accompagnatore = $this->input->post('txtAccompagnatore');\n\n $glExportReportData = $this->_getGlReportData($collaboratore, $accompagnatore);\n $data['report_table_data'] = $glExportReportData['report_table_data'];\n\n $pdfFileName = \"Webservice_Report\";\n $reportHTML = $this->load->view(\"webservice_report_view\", $data, TRUE);\n downloadhtmltopdf($reportHTML, $pdfFileName);\n } else {\n $collaboratore = $this->input->post('txtCollaboratore');\n $accompagnatore = $this->input->post('txtAccompagnatore');\n\n $glExportReportData = $this->_getGlReportData($collaboratore, $accompagnatore);\n $report_data = $glExportReportData['report_table_data'];\n $grand_total = $passeggero_start = $passeggero_si_start = 0;\n $exportData = array();\n $prev_codice_prodotto = '';\n foreach ($report_data as $rdata) {\n $passeggero_start = ( $prev_codice_prodotto != $rdata['codice_prodotto'] ) ? 0 : $passeggero_start;\n $passeggero_si_start = ( $prev_codice_prodotto != $rdata['codice_prodotto'] ) ? 0 : $passeggero_si_start;\n\n if ($rdata['codice_prodotto'] != 'Total') {\n if ($rdata['pax'] > 1 && ( $rdata['type'] == 'Reimbursement' || $rdata['type'] == 'Presentation' )) {\n $passeggero_arr = $this->webservicemodel->getPasseggero($rdata['collaboratore'], $rdata['accompagnatore'], $rdata['codice_prodotto']);\n $passeggero = explode(\",\", $passeggero_arr['passeggero']);\n for ($i = 0; $i < $rdata['pax']; $i++) {\n $pax = 1;\n $total = $rdata['amount_per_pax'] * $pax;\n $grand_total = $grand_total + $total;\n $pass = isset($passeggero[$passeggero_start])?$passeggero[$passeggero_start]:'';\n $exportData[] = array(\n 'Collaboratore' => $rdata['collaboratore'],\n 'Accompagnatore' => $rdata['accompagnatore'],\n 'Campus' => $rdata['campus'],\n 'Product Code' => $rdata['codice_prodotto'],\n 'Pax Name' => $pass,\n 'Type' => $rdata['type'],\n 'Group' => $rdata['group'],\n 'Pax' => $pax,\n 'Amount Per Pax' => $rdata['amount_per_pax'],\n 'Total' => $total\n );\n $passeggero_start++;\n }\n } else if ($rdata['type'] == 'GLF') {\n $passeggero_arr = $this->webservicemodel->getPasseggeroSi($rdata['collaboratore'], $rdata['accompagnatore'], $rdata['codice_prodotto']);\n $passeggero = explode(\",\", $passeggero_arr['passeggero']);\n\n $total = $rdata['amount_per_pax'] * $rdata['pax'];\n $grand_total = $grand_total + $total;\n\n $exportData[] = array(\n 'Collaboratore' => $rdata['collaboratore'],\n 'Accompagnatore' => $rdata['accompagnatore'],\n 'Campus' => $rdata['campus'],\n 'Product Code' => $rdata['codice_prodotto'],\n 'Pax Name' => $passeggero[$passeggero_si_start],\n 'Type' => $rdata['type'],\n 'Group' => $rdata['group'],\n 'Pax' => $rdata['pax'],\n 'Amount Per Pax' => $rdata['amount_per_pax'],\n 'Total' => $rdata['total_reimbursement']\n );\n $passeggero_si_start++;\n } else {\n $total = $rdata['amount_per_pax'] * $rdata['pax'];\n $grand_total = $grand_total + $total;\n\n $exportData[] = array(\n 'Collaboratore' => $rdata['collaboratore'],\n 'Accompagnatore' => $rdata['accompagnatore'],\n 'Campus' => $rdata['campus'],\n 'Product Code' => $rdata['codice_prodotto'],\n 'Pax Name' => ( $rdata['type'] == 'Reimbursement' || $rdata['type'] == 'Presentation' ) ? $rdata['passeggero'] : \"\",\n 'Type' => $rdata['type'],\n 'Group' => $rdata['group'],\n 'Pax' => $rdata['pax'],\n 'Amount Per Pax' => $rdata['amount_per_pax'],\n 'Total' => $rdata['total_reimbursement']\n );\n }\n }\n $prev_codice_prodotto = $rdata['codice_prodotto'];\n }\n if (!empty($exportData)) {\n // Empty row before total\n $exportData[] = array(\n 'Collaboratore' => '',\n 'Accompagnatore' => '',\n 'Campus' => '',\n 'Product Code' => '',\n 'Pax Name' => '',\n 'Type' => '',\n 'Group' => '',\n 'Pax' => '',\n 'Amount Per Pax' => '',\n 'Total' => ''\n );\n\n $exportData[] = array(\n 'Collaboratore' => 'Total',\n 'Accompagnatore' => '',\n 'Campus' => '',\n 'Product Code' => '',\n 'Pax Name' => '',\n 'Type' => '',\n 'Group' => '',\n 'Pax' => '',\n 'Amount Per Pax' => '',\n 'Total' => $grand_total\n );\n }\n\n $this->load->library('export');\n $this->export->exportUsingPhpExcel($exportData, 'webserviceglreport');\n }\n } else {\n $data['title'] = 'plus-ed.com | Export by GL';\n $data['breadcrumb1'] = 'Webservice management';\n $data['breadcrumb2'] = 'Export by GL';\n\n $data['collaboratore'] = $this->input->post('txtCollaboratore');\n $data['accompagnatore'] = $this->input->post('txtAccompagnatore');\n\n $glReportData = $this->_getGlReportData($data['collaboratore'], $data['accompagnatore']);\n $data['reportData'] = $glReportData['report_data'];\n $data['report_table_data'] = $glReportData['report_table_data'];\n $data['report_analysis_data'] = $glReportData['report_analysis_data'];\n\n if (APP_THEME == \"OLD\")\n $this->load->view('plused_webservice_gl_report_data', $data);\n else { // if(APP_THEME == \"LTE\")\n $data['pageHeader'] = $data['breadcrumb2'];\n $data['optionalDescription'] = \"\";\n\t\t\t\t\t\t//echo \"<pre>\";print_r($data);die;\n $this->ltelayout->view('lte/reimbursement/webservice_gl_report_data', $data);\n }\n }\n } else {\n $data['title'] = 'plus-ed.com | Export by GL';\n $data['breadcrumb1'] = 'Webservice management';\n $data['breadcrumb2'] = 'Export by GL';\n\n $data['accompagnatore'] = $this->webservicemodel->getDistinctDataByField('accompagnatore');\n $data['collaboratore'] = $this->webservicemodel->getDistinctDataByField('collaboratore');\n\n if (APP_THEME == \"OLD\")\n $this->load->view('plused_webservice_gl_report', $data);\n else { // if(APP_THEME == \"LTE\")\n $data['pageHeader'] = $data['breadcrumb2'];\n $data['optionalDescription'] = \"\";\n $this->ltelayout->view('lte/reimbursement/webservice_gl_report', $data);\n }\n }\n } else {\n redirect('backoffice', 'refresh');\n }\n }", "public function achievementsReport() {\n if (userLogedIn()) {\n if(check_access('achievementsReport')){\n $fromDate = date(\"Y-m-d\", strtotime(\"first day of this month\"));\n if (isset($_POST['fromDate'])) {\n $date = explode('/', $this->input->post('repDate'));\n $day = $date[1];\n $month = $date[0];\n $year = $date[2];\n $fromDate = $year . '-' . $month . '-' . $day;\n }\n $data['get_target'] = $this->admin_model->get_target($fromDate);\n \n $date = explode('-', $fromDate);\n $day = $date[2];\n $month = $date[1];\n $year = $date[0];\n $fromDate = $month . '/' . $day . '/' . $year;\n $data['fromDate'] = $fromDate;\n \n $this->load->view(\"admin/achievementsReport\", $data);\n \n }\n \n \n else{\n $url=$this->router->fetch_class().'/'.$this->router->fetch_method(); \n // echo $url;\n myLoader('No Access', 'home/login');\n }\n } else {\n $this->load->view('admin/login');\n }\n }", "public static function exportGiudeReport()\n {\n /**\n * TODO\n */\n }", "public function index(){\n\t \t@$this->loadModel(\"Dashboard\");\n global $session;\n $dashData = array();\n $dashData = $this->model->getDashboardStat();\n $this->view->oticketcount = $dashData['otcount'];\n $this->view->aticketcount = $dashData['atcount'];\n $this->view->oschedule = $dashData['oschedule'];\n $this->view->oworksheet = $dashData['oworksheet'];\n $this->view->clients = $dashData['clients'];\n $this->view->pendings = $dashData['openPend'];\n $this->view->cproducts = $dashData['cproducts'];\n $lastmonth = (int)date(\"n\")-1;\n $curmonth = date(\"n\");\n\n $this->view->monthreport = $this->model->getMonthlyReportFinance(\" Month(datecreated) ='\".$curmonth.\"' AND Year(datecreated)='\".date(\"Y\").\"'\");\n $this->view->lastmonthreport = $this->model->getLastMonthlyReportFinance(\" Month(datecreated) ='\".$lastmonth.\"' AND Year(datecreated)='\".date(\"Y\").\"'\");\n $this->view->thisquarter = $this->model->getThisQuaterReportFinance(\" Quarter(datecreated) ='\".self::date_quarter().\"' AND Year(datecreated)='\".date(\"Y\").\"'\");\n global $session;\n \n if($session->empright == \"Super Admin\"){\n\t\t $this->view->render(\"dashboard/index\");\n\t\t }elseif($session->empright == \"Customer Support Services\" || $session->empright == \"Customer Support Service\"){\n\t\t $this->view->render(\"support/index\");\n\t\t \n\t\t }elseif($session->empright == \"Customer Support Engineer\" || $session->empright == \"Customer Service Engineer\"){\n @$this->loadModel(\"Itdepartment\");\n global $session;\n $datan =\"\";\n $uri = new Url(\"\");\n //$empworkdata = $this->model->getWorkSheetEmployee($id,\"\");\n \n $ptasks = Worksheet::find_by_sql(\"SELECT * FROM work_sheet_form WHERE cse_emp_id =\".$_SESSION['emp_ident'] );\n // print_r($ptasks);\n //$empworkdata['worksheet'];\n $x=1;\n $datan .=\"<table width='100%'>\n <thead><tr>\n \t<th>S/N</th><th>Prod ID</th><th>Status</th><th>Emp ID</th><th>Issue</th><th>Date Generated </th><th></th><th></th>\n </tr>\n </thead>\n <tbody>\";\n if($ptasks){\n \n foreach($ptasks as $task){\n $datan .= \"<tr><td>$x</td><td>$task->prod_id</td><td>$task->status </td><td>$task->cse_emp_id</td><td>$task->problem</td><td>$task->sheet_date</td><td><a href='\".$uri->link(\"itdepartment/worksheetdetail/\".$task->id.\"\").\"'>View Detail</a></td><td></td></tr>\";\n $x++;\n }\n }else{\n $datan .=\"<tr><td colspan='8'></td></tr>\";\n } \n $datan .=\"</tbody></table>\";\n \n $mysched =\"<div id='transalert'>\"; $mysched .=(isset($_SESSION['message']) && !empty($_SESSION['message'])) ? $_SESSION['message'] : \"\"; $mysched .=\"</div>\";\n \n $psched = Schedule::find_by_sql(\"SELECT * FROM schedule WHERE status !='Closed' AND emp_id =\".$_SESSION['emp_ident'].\" ORDER BY id DESC\" );\n //print_r($psched);\n //$empworkdata['worksheet'];\n $x=1;\n $mysched .=\"<table width='100%'>\n <thead><tr>\n \t<th>S/N</th><th>Machine</th><th>Issue</th><th>Location</th><th>Task Type</th><th>Task Date </th><th></th><th></th><th></th>\n </tr>\n </thead>\n <tbody>\";\n if($psched){\n \n foreach($psched as $task){\n $mysched .= \"<tr><td>$x</td><td>$task->prod_name</td><td>$task->issue </td>\"; \n $machine = Cproduct::find_by_id($task->prod_id);\n \n $mysched .= \"<td>$machine->install_address $machine->install_city</td><td>$task->maint_type</td><td>$task->s_date</td><td>\";\n \n if($task->status == \"Open\"){\n $mysched .=\"<a scheddata='{$task->id}' class='acceptTask' href='#'>Accept Task</a>\";\n }\n if($task->status == \"In Progress\"){\n $mysched .=\"<a href='\".$uri->link(\"itdepartment/worksheetupdateEmp/\".$task->id.\"\").\"'>Get Work Sheet</a>\";\n }\n \n $mysched .=\"\n \n <div id='myModal{$task->id}' class='reveal-modal'>\n <h2>Accept Task </h2>\n <p class='lead'>Click on the button below to accept task! </p>\n <form action='?url=itdepartment/doAcceptTask' method='post'>\n <input type='hidden' value='{$task->id}' name='mtaskid' id='mtaskid' />\n <p><a href='#' data-reveal-id='secondModal' class='secondary button acceptTast' >Accept</a></p>\n </form>\n <a class='close-reveal-modal'>&#215;</a>\n</div>\n\n\n \n \n </td><td></td><td></td></tr>\";\n $x++;\n }\n }else{\n $mysched .=\"<tr><td colspan='8'>There is no task currently</td></tr>\";\n } \n $mysched .=\"</tbody></table>\";\n \n $this->view->oldtask = $datan;\n $this->view->schedule = $mysched;\n $this->view->mee = $this->model->getEmployee($_SESSION['emp_ident']);\n $this->view->render(\"itdepartment/staffaccount\");\n\t\t }else{\n\t\t $this->view->render(\"login/index\",true);\n\t\t }\n\t\t\n\t}", "public function actionIndex()\n { \n $mac=get_client_mac(get_client_ip());\n $employeeModel=Employee::findIdentityByMacAddress($mac);\n \n if($employeeModel!=null){\n if ($employeeModel->Active==0){\n print_r (\"InActive Employee.. Contact Admin\");\n return;\n }\n $model = new AttendanceIn();\n date_default_timezone_set('Asia/Calcutta');\n $model=AttendanceIn::findIdentityByUniqueKeys($employeeModel->id,date(\"Y-m-d\"));\n $month_off=MonthOff::find()->select([\"Dates\"])->where(['BranchId'=>$employeeModel->Branch])->andWhere(['Month'=>date('m')])->andWhere(['Year'=>date(\"Y\")])->all();\n if($month_off)\n $month_off=array_map('intval',explode(',',$month_off[0]['Dates'],-1));\n if($model==null){\n $model= new AttendanceIn();\n $model->EmployeeId=$employeeModel->id;\n $model->Date=date(\"Y-m-d\");\n $model->Time=date(\"H:i:s\");\n $timeSlotModel=TimeSlots::findOne(['id'=>$employeeModel->TimeSlot]);\n if(strcmp($model->Time,$timeSlotModel->Grace)<0){\n if(in_array(date('d'), $month_off)){\n if(!$leaveHistory=LeaveHistory::findOne(['EmployeeId'=>$employeeModel->id, 'LeaveType'=>4])){\n $leaveHistory =new LeaveHistory();\n $leaveHistory->id=$employeeModel->id;\n $leaveHistory->Type=4;\n $leaveHistory->LeaveCount=0;\n $leaveHistory->MaxLeave=0.5;\n }\n else{\n $leaveHistory->MaxLeave+=0.5;\n }\n $leaveHistory->save();\n $model->FirstHalf=\"WP\";\n }\n else\n $model->FirstHalf=\"P\";\n \n }\n else if (strcmp($model->Time,$timeSlotModel->Grace)>0 && strcmp($model->Time,$timeSlotModel->DeadOut)<0){\n if($employeeModel->DeadOutCount>=$timeSlotModel->MaxDeadOutCount)\n $model->FirstHalf=\"A\";\n else{\n $employeeModel->DeadOutCount+=1;\n $employeeModel->save();\n $model->Remark=$employeeModel->DeadOutCount.\" Late Count\";\n if(in_array(date('d'), $month_off)){\n if(!$leaveHistory=LeaveHistory::findOne(['EmployeeId'=>$employeeModel->id, 'LeaveType'=>4])){\n $leaveHistory =new LeaveHistory();\n $leaveHistory->id=$employeeModel->id;\n $leaveHistory->Type=4;\n $leaveHistory->LeaveCount=0;\n $leaveHistory->MaxLeave=0.5;\n }\n else{\n $leaveHistory->MaxLeave+=0.5;\n }\n $leaveHistory->save();\n $model->FirstHalf=\"WP\";\n }\n else\n $model->FirstHalf=\"P\";\n }\n }\n else{\n $model->FirstHalf=\"A\";\n }\n if($model->validate() && $model->save()){\n return $this->renderPartial('attendance-in-success', [\n 'employeeModel'=>$employeeModel,\n 'model'=>$model,\n ]);\n }\n else{\n print_r(\"Error Occured\");\n return;\n }\n }\n return AttendanceInController::actionOut();\n\n }\n else{\n print_r(\"<h1><p style='color:red;background-color:pink;border-color:#c3e6cb;'>No Such Device/Employee Registered</p></h1>\");\n return;\n }\n \n }", "function genrate_inspectorassessmenthistory_pdf($columnsValues,$data,$allconstants,$profile,$toDate=null,$fromDate=null,$vc_customer_name,$vehiclelicno=null) {\n\t\n\t\t$columnwidtharrays = array(7,15,15,15,14,16,\n\t\t 12,13,12,12,21,11,\n\t\t\t\t\t\t\t\t 15,12);\n\t\t\n\t\t$heightdynamic = 8;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vc_customer_name) && !empty($vc_customer_name)) ){\n\n\t\t\t$x = $this->GetX();\t\t\t\n\t\t\t$y = $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\t\t\t\n\t\t\t$this->SetX($x+125);\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(25, 8, 'Customer Name :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(39, 8, ucfirst($vc_customer_name),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t\t$x = $this->GetX();\t\t\t\n\t\t\t$y = $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Register No.: ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(164, 8, $vehiclelicno,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(164, 8, '',0,'','L',true);\n\t\t\t\n\t\t\t//$vehiclelicno\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t}\n\t}\n\t\t\n\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\n\t\t$c=0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\n\t\t\tif($c==10){\n\t\t\t\n\t\t\t\t$this->SetFont('Arial', 'B', 5);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif( $c == 9 || $c == 11 || $c == 13 || $c == 12){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 16, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\t\t\n\t\t\n\t\t$this->SetFont('Arial', '', 5);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\tforeach ($data as $val) {\n\t\t\n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $vc_customer_name = \tucfirst($val['AssessmentVehicleMaster']['vc_customer_name']);\n\t\t $dt_created_date=\t\tdate('d M Y', strtotime($val['AssessmentVehicleDetail']['dt_created_date']));\n\t\t $vc_assessment_no=\t\t$val['AssessmentVehicleDetail']['vc_assessment_no'];\n\t\t $vc_vehicle_lic_no= \t$val['AssessmentVehicleDetail']['vc_vehicle_lic_no'];\n\t\t $vc_vehicle_reg_no=\t\t$val['AssessmentVehicleDetail']['vc_vehicle_reg_no'];\n\t\t\t$vc_prtype_name = \t\t$val['VehicleDetail']['VEHICLETYPE']['vc_prtype_name'];\n\t\t $vc_pay_frequency = \t$val['AssessmentVehicleDetail']['vc_pay_frequency'];\n\t\t $vc_prev_end_om = \t\tnumber_format($val['AssessmentVehicleDetail']['vc_prev_end_om']);\n\t\t $vc_end_om = \t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_end_om']);\n\t\t $vc_km_travelled = \t\tnumber_format($val['AssessmentVehicleDetail']['vc_km_travelled']);\n\t\t $vc_rate =\t\t\t \tnumber_format($val['AssessmentVehicleDetail']['vc_rate'],2,'.',',');\n\t\t $vc_payable =\t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_payable'],2,'.',',');\n\t\t $vc_status =\t\t\t$allconstants[$val['AssessmentVehicleMaster']['vc_status']];\n\n\t\t\t$font_size = 6;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$alignvalue='C';\n\t\t\t\n\t\t\t$col[] = array('text' => $i+1, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_customer_name, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $dt_created_date, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_assessment_no, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_lic_no, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_reg_no, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prtype_name, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_pay_frequency, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prev_end_om, 'width' =>$columnwidtharrays[8], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_end_om, 'width' =>$columnwidtharrays[9], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_km_travelled, 'width' =>$columnwidtharrays[10], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$col[] = array('text' => $vc_rate, 'width' =>$columnwidtharrays[11], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_payable, 'width' =>$columnwidtharrays[12], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_status, 'width' =>$columnwidtharrays[13], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t}\n\t\n\t}", "public function actionGenerateAllocations()\n {\n $res=ReportQueryManager::updateQuesSummary();\n\n if($res):\n $res1 = AllocationManager::updateCurrentAllocations();\n \n if (\\Yii::$app->request->isAjax):\n if($res1):\n $message = 'Allocations has been successfully inserted.';\n else:\n $message = 'Something went wrong with updates. Please confirm whether the data has not been updated for the year before';\n endif;\n $response = Yii::$app->response;\n // $response->format = \\yii\\web\\Response::FORMAT_JSON; -- only used if text out put is reqd\n $response->data = $message;\n $response->statusCode = 200;\n return $this->renderPartial('alloc-sum-status',['response'=>$response]);\n else:\n throw new BadRequestHttpException;\n endif;\n\n else:\n throw new \\yii\\web\\ServerErrorHttpException('The summary creation was unsuccessful. Hence no allocations generated');\n endif;\n }", "abstract public function buildReport();", "public function export_tms_report() {\n set_time_limit(0);\n ini_set(\"memory_limit\", \"-1\");\n if (!empty($_GET)) {\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n if ($_GET['payStatus'] == '1') {\n $payment_status = \"PAID','PARTPAID\";\n } else if ($_GET['payStatus'] == '2') {\n $payment_status = \"NOTPAID','PARTPAID\";\n }\n $data['text'] = $displayText;\n $year = $_GET['yearVal'];\n $month = $_GET['monthVal'];\n $training_score1 = $_GET['trainingStatus'];\n\n if ($training_score1 == '1') {\n $training_score = 'C';\n } else if ($training_score1 == '2') {\n $training_score = \"NYC','2NYC\";\n } else if ($training_score1 == '3') {\n $training_score = 'ABS';\n } else if ($training_score1 == '4') {\n $training_score = \"C','NYC','2NYC\";\n }\n\n\n if ($_GET['payStatus'] == '1') {\n $result = $this->reportsModel->tms_paid_report($tenant_id, $payment_status, $year, $month, $training_score);\n } else if ($_GET['payStatus'] == '2') {\n $result = $this->reportsModel->tms_unpaid_report($tenant_id, $payment_status, $year, $month, $training_score);\n }\n }\n\n $this->load->helper('export_helper');\n export_tms_report_page($result);\n }", "public function reportDatewiseAttendentView(Request $request)\n {\n $year = trim($request->year) ;\n $shift = trim($request->shift);\n $dept = trim($request->dept);\n $semister = trim($request->semister);\n $section = trim($request->section);\n $date_form = trim($request->from); \n $from = date (\"Y-m-d\", strtotime($date_form));\n $date_to = trim($request->to); \n $to = date (\"Y-m-d\", strtotime($date_to));\n $result = DB::table('student')->where('year',$year)->where('shift_id',$shift)->where('dept_id', $dept )->where('semister_id',$semister)->where('section_id',$section)->orderBy('roll','asc')->get();\n // count holiday\n $count_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereBetween('holiday_date', [$from, $to])->count();\n // total day caluclation\n $date1 = date_create($from);\n $date2 = date_create($to);\n //difference between two dates\n $diff = date_diff($date1,$date2);\n $total_day = $diff->format(\"%a\")+1;\n $shift_name = DB::table('shift')->where('id',$shift)->first();\n $dept_name = DB::table('department')->where('id',$dept)->first();\n $semister_name = DB::table('semister')->where('id',$semister)->first();\n $section_name = DB::table('section')->where('id',$section)->first();\n return view('report.reportDatewiseAttendentView')->with('result',$result)->with('count_holiday',$count_holiday)->with('total_day',$total_day)->with('from',$from)->with('to',$to)->with('year',$year)->with('shift_name',$shift_name)->with('dept_name',$dept_name)->with('semister_name',$semister_name)->with('section_name',$section_name)->with('shift',$shift)->with('dept',$dept)->with('semister',$semister)->with('section',$section)->with('date_form',$date_form)->with('date_to',$date_to); \n\n }", "public function Attendance(){\t\t\n\t\tif($this->IsLoggedIn('cashier')){\t\t\t\n\t\t\t$data = $this->GetDataForCashier(\"Attendance\");\t\t\t\n\t\t\t$data['experts'] = $this->GetExperts();\t\n\t\t\t$data['attendance_today']=$this->CashierModel->CalculateAttendance();\t\t\t\n\t\t\n\t\t\t$data['sidebar_collapsed'] = \"true\";\n\t\t\t// $this->PrettyPrintArray($data);\n\t\t\t// exit;\n\t\t\t$this->load->view('cashier/cashier_attendance_view', $data);\t\n\t\t}\n\t\telse{\n\t\t\t$data['title'] = \"Login\";\n\t\t\t$this->load->view('cashier/cashier_login_view',$data);\n\t\t}\n\t\t\n\n\t}", "public function prepare_report($emp, $month, $year){\n\n // echo $emp.' '.$month.' '.$year;\n\t\t$start = date('Y-m-d', strtotime(\"$year-$month-01\")); \n\t $end = date('Y-m-t', strtotime($start));\n\t\t$data['attendance'] = calculate_attendance($emp,$start,$end);\n\t\t\n\t\t//array_walk($data['attendance'], function(&$key, $b) { ucwords(str_replace('_', ' ', $key)) }); \n\t\t$data['at_labels'] = json_encode(['Present','Absent','Half Day','Uninformed Leave','Sandwich Leave','Late Login']); \n\t\t$data['at_values'] = json_encode(array_values($data['attendance'])); \n\t\t\n\t\t$project_data = Project::join('project_assignation','projects.id','project_assignation.project_id')\n\t\t\t\t\t\t\t\t->join('users','project_assignation.employee_id','users.id')\n\t\t\t\t\t\t\t\t->join('eods','eods.user_id','users.id')\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t ->select('projects.project_name','projects.id', DB::Raw('SUM(eods.today_hours) as pr_time'))\n\n\t\t\t\t\t\t\t\t->where('users.id', $emp)\n\t\t\t\t\t\t\t\t->whereMonth('eods.date', $month)\t\n\t\t\t\t\t\t\t\t->whereYear('eods.date', $year)\t \t \t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t->whereRaw('eods.project_id = projects.id')\n\t\t\t\t\t\t\t\t->groupBy('projects.project_name','projects.id')\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t->get(); \n\n\n\t \n\t\t\n\t\t\t$sum = array_sum(array_column($project_data->toArray(),'pr_time')); \n\n\t\t\t$data['projects'] = $project_data;\n\t\t\tforeach($project_data as $project){\n\t\t\t\t$labels[] = $project->project_name;\n\t\t\t\t$cdata[] = number_format(($project->pr_time*100) / $sum, 2); \n\t\t\t\t//$sdata[] = array('label'=> $project->project_name,'data'=>number_format(($project->pr_time*100) / $sum, 2),'backgroundColor'=>'green','borderColor'=>'red') ;\n\t\t\t\t$sdata[] = array('label'=>$project->project_name,'y'=>number_format(($project->pr_time*100) / $sum, 2));\n\t\t\t}\n\t\t\t\n\n\t\t\tif(!empty($labels) && !empty($cdata)){\n\t\t $data['labels'] = json_encode($labels);\n\t\t $data['cdata'] = json_encode($cdata);\n\t\t $data['sdata'] = json_encode($sdata); \n\t\t\t} \n\t\t\t//print_r($data['sdata']);\n\n\t\t return $data; \n\t}", "public function show_report_service()\n { \n $this->load->model(\"swm/frontend/M_swm_attend\", \"msa\");\n $rs_service_data = $this->msa->get_time_us_attend(getNowDate(),getNowDate());//startDate, endDate, startAge, endAge, state\n $data['rs_service_data'] = $rs_service_data->result();\n $this->output(\"swm/frontend/v_report_service\", $data, true);\n }", "public function hrEmpLeaveReport(Request $request, $type=null){\n $data['post_data'] = $request->all();\n //$userInfo = $this->getEmployeeInfo( null,3883);\n if ($type == 'pdf' && $request->users !=''){\n //$userInfo = $this->getEmployeeInfo( null, $request->users);\n\n $year = $request->year?$request->year:date(\"Y\");\n\n $data['user_id'] = $request->users;\n $data['year'] = $year;\n $data['leave_policys'] = self::getLeavePolicy($year,$request->users);\n\n $data['report_title'] = 'Leave Report - '. $year;\n $data['filename'] = 'leave_report_pdf';\n $data['orientation'] = \"P\";\n $data['branch_address'] = getUserInfoFromId(Auth::user()->id)->address;\n $data['signatures']=['Prepared by','Checked by','Approved by'];\n $view='HR.leave_report.leave_report_pdf';\n PdfHelper::exportPdf($view,$data);\n }else if(!empty($data['post_data'])){\n $data['emp_info'] = employeeInfo($request->users);\n $data['leave_summery'] = $this->getEmployeeLeaveInfo($request->users,'');\n }\n\n return view('HR.leave_report.leave_report', $data);\n\n }", "public function Generate_Report()\n\t{\n\t\t//\n\t\t// criteria start_date YYYYMMDD\n\t\t// criteria end_date YYYYMMDD\n\t\t// company_id\n\t\t//\n\t\ttry\n\t\t{\n\t\t\t$this->search_query = new Transaction_History_Report_Query($this->server);\n\n\t\t\t$data = new stdClass();\n\n\t\t\t// Save the report criteria\n\t\t\t$data->search_criteria = array(\n\t\t\t 'specific_date_MM' => $this->request->specific_date_month,\n\t\t\t 'specific_date_DD' => $this->request->specific_date_day,\n\t\t\t 'specific_date_YYYY' => $this->request->specific_date_year,\n\t\t\t 'company_id' => $this->request->company_id,\n\t\t\t 'loan_type' => $this->request->loan_type\n\t\t\t);\n\n\t\t\t$_SESSION['reports']['transaction_history']['report_data'] = new stdClass();\n\t\t\t$_SESSION['reports']['transaction_history']['report_data']->search_criteria = $data->search_criteria;\n\t\t\t$_SESSION['reports']['transaction_history']['url_data'] = array('name' => 'Transaction History', 'link' => '/?module=reporting&mode=transaction_history');\n\n\t\t\t// Start date\n\t\t\t$start_date_YYYY = $this->request->specific_date_year;\n\t\t\t$start_date_MM\t = $this->request->specific_date_month;\n\t\t\t$start_date_DD\t = $this->request->specific_date_day;\n\t\t\tif(!checkdate($start_date_MM, $start_date_DD, $start_date_YYYY))\n\t\t\t{\n\t\t\t\t//return with no data\n\t\t\t\t$data->search_message = \"Start Date invalid or not specified.\";\n\t\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$start_date_YYYYMMDD = 10000 * $start_date_YYYY\t+ 100 * $start_date_MM + $start_date_DD;\n\n\t\t\t$data->search_results = $this->search_query->Fetch_Transaction_History_Data( $start_date_YYYYMMDD,\n\t\t\t\t $this->request->loan_type,\n\t\t\t\t $this->request->company_id);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$data->search_message = \"Unable to execute report. Reporting server may be unavailable.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\t\t// we need to prevent client from displaying too large of a result set, otherwise\n\t\t// the PHP memory limit could be exceeded;\n\t\tif(!empty($data->search_results) && count($data->search_results) > $this->max_display_rows)\n\t\t{\n\t\t\t$data->search_message = \"Your report would have more than \" . $this->max_display_rows . \" lines to display. Please narrow the date range.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Sort if necessary\n\t\t$data = $this->Sort_Data($data);\n\n\t\tECash::getTransport()->Add_Levels(\"report_results\");\n\t\tECash::getTransport()->Set_Data($data);\n\t\t$_SESSION['reports']['transaction_history']['report_data'] = $data;\n\t}", "public function index(Request $request)\n {\n switch ($request->action) {\n case \"attendance\":\n $roleName = \"admin\";\n\n $resultUser = User::whereHas('roles', function ($query) use ($roleName) {\n $query->where('name', '!=', $roleName);\n })->get();\n\n $resultAttendance = Attendance::all();\n\n // return view('employee.report', compact('resultUser', 'resultAttendance'));\n\n $pdf = PDF::loadView('employee.report', compact('resultUser', 'resultAttendance'));\n return $pdf->stream(date('d-M-Y') . '_laporan-absensi.pdf');\n break;\n\n case \"finance\":\n // code\n break;\n\n case \"item\":\n // code\n break;\n\n case \"transaction\":\n // code\n break;\n\n default:\n return redirect()->route('dashboard');\n break;\n }\n }", "public function reportMonthlyAttendentView(Request $request)\n {\n $year = trim($request->year) ;\n $shift = trim($request->shift);\n $dept = trim($request->dept);\n $semister = trim($request->semister);\n $section = trim($request->section);\n $month = trim($request->month);\n // get student\n $result = DB::table('student')->where('year',$year)->where('shift_id',$shift)->where('dept_id', $dept )->where('semister_id',$semister)->where('section_id',$section)->orderBy('roll','asc')->get();\n // get holiday\n $from = $year.'-'.$month.'-01';\n $to = $year.'-'.$month.'-31';\n $count_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereBetween('holiday_date', [$from, $to])->count();\n $month_total_day =cal_days_in_month(CAL_GREGORIAN,$month,$year);\n \n $shift_name = DB::table('shift')->where('id',$shift)->first();\n $dept_name = DB::table('department')->where('id',$dept)->first();\n $semister_name = DB::table('semister')->where('id',$semister)->first();\n $section_name = DB::table('section')->where('id',$section)->first();\n\n return view('report.reportMonthlyAttendentView')->with('result',$result)->with('count_holiday',$count_holiday)->with('month_total_day',$month_total_day)->with('from',$from)->with('to',$to)->with('month',$month)->with('year',$year)->with('shift_name',$shift_name)->with('dept_name',$dept_name)->with('semister_name',$semister_name)->with('section_name',$section_name)->with('section',$section)->with('semister',$semister)->with('dept',$dept)->with('shift',$shift); \n }", "public function infectionReport(){\n\n\t \t$ageRanges = array('0-5'=>'Under 5 years', \n\t \t\t\t\t\t'5-14'=>'5 years and over but under 14 years', \n\t \t\t\t\t\t'14-120'=>'14 years and above');\t//\tAge ranges - will definitely change in configurations\n\t\t$gender = array(Patient::MALE, Patient::FEMALE); \t//\tArray for gender - male/female\n\t\t$ranges = array('Low', 'Normal', 'High');\n\t\t$accredited = array();\n\n\t\t//\tFetch form filters\n\t\t$date = date('Y-m-d');\n\t\t$from = Input::get('start');\n\t\tif(!$from) $from = date('Y-m-01');\n\t\t$to = Input::get('end');\n\t\tif(!$to) $to = $date;\n\t\t\n\t\t$toPlusOne = date_add(new DateTime($to), date_interval_create_from_date_string('1 day'));\n\n\t\t$testCategory = Input::get('test_category');\n\n\t\t$infectionData = Test::getInfectionData($from, $toPlusOne, $testCategory);\t// array for counts data for each test type and age range\n\t\t\n\t\treturn View::make('reports.infection.index')\n\t\t\t\t\t->with('gender', $gender)\n\t\t\t\t\t->with('ageRanges', $ageRanges)\n\t\t\t\t\t->with('ranges', $ranges)\n\t\t\t\t\t->with('infectionData', $infectionData)\n\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t->withInput(Input::all());\n\t}", "public function Get_Special_Report($semester,$year,$dept_id)\n {\n global $FILE_PATH;\n $semester_id = $this->DEADLINE->Search_Semester_id($semester,$year);\n if($semester_id)\n {\n $temp_course = $this->COURSE->Get_Dept_Course($dept_id,$semester_id);\n $dept_course = array();\n if(!isset($temp_course['status']))\n {\n for($i=0;$i<count($temp_course);$i++)\n {\n array_push($dept_course,$temp_course[$i]['id']);\n }\n }\n $DATA = array();\n $DATA['info'] = array();\n $DATA['download'] = $this->DOWNLOAD_URL.\"?course=all&type=report&dept=\".$dept_id.\"&info=special&semester=\".$semester.\"&year=\".$year;\n $sql = \"SELECT DISTINCT `course_id` FROM `course_hire_special_instructor` WHERE `status` = '1' AND `semester_id` = \".$semester_id;\n $result_course = $this->DB->Query($sql);\n if($result_course)\n {\n for($i=0;$i<count($result_course);$i++)\n {\n if(!in_array($result_course[$i]['course_id'],$dept_course))\n {\n continue;\n }\n $sql = \"SELECT si.`instructor_id`,si.`prefix`,si.`firstname`,si.`lastname`,si.`cv` FROM `course_hire_special_instructor` ci ,`special_instructor` si \";\n $sql.= \"WHERE ci.`instructor_id` = si.`instructor_id` AND ci.`course_id` = '\".$result_course[$i]['course_id'].\"' AND ci.`status` = '1' AND ci.`semester_id` = \".$semester_id;\n $result_instructor = $this->DB->Query($sql);\n $data = array();\n $data['id'] = $result_course[$i]['course_id'];\n $data['name'] = $this->COURSE->Get_Course_Name($data['id']);\n $data['special'] = array();\n if($result_instructor)\n {\n for($j=0;$j<count($result_instructor);$j++)\n {\n $instructor['id'] = $result_instructor[$j]['instructor_id'];\n $instructor['name'] = $result_instructor[$j]['prefix'].' '.$result_instructor[$j]['firstname'].' '.$result_instructor[$j]['lastname'];\n $instructor['cv'] = $this->PERSON->Get_CV($instructor['id']);\n $instructor['pdf'] = $this->VIEW_URL.\"?course=\".$data['id'].\"&id=\".$instructor['id'].\"&type=complete&info=special&semester=\".$semester.\"&year=\".$year;\n array_push($data['special'],$instructor);\n }\n }\n array_push($DATA['info'],$data);\n }\n }\n if(count($DATA['info']) == 0)\n {\n $return['status'] = 'error';\n $return['msg'] = 'ไม่พบข้อมูล';\n return $return;\n }\n else\n {\n return $DATA;\n }\n }\n else\n {\n $return['status'] = 'error';\n $return['msg'] = 'ไม่พบข้อมูล';\n return $return;\n }\n }", "function generate_report_modelwise($id, $field, $from, $to) {\n switch ($field) {\n case 'tl':\n $fieldName = 'Team_Lead';\n break;\n case 'dse':\n $fieldName = 'DSE';\n break;\n case 'asm':\n $fieldName = 'ASM_SM';\n break;\n case '6':\n $fieldName = 'Team_Lead';\n break;\n case '7':\n $fieldName = 'DSE';\n break;\n case '5':\n $fieldName = 'ASM_SM';\n break;\n }\n $empID = $id;\n $this->db->where('Inv_Dt >=', $from);\n $data = $this->db->get_where('rtl_daily_rep', array($fieldName => $id))->result_array();\n $countArr = array();\n\n foreach ($data as $k => $d) {\n if ($d['Model'] != 'Total_Target') {\n $id = $d['Model'];\n $countVar = 0;\n foreach ($data as $key => $var) {\n if ($id == $var['Model']) {\n $countVar++;\n }\n\n $countArr[strtoupper((string) $d['Model'])]['achieved'] = $countVar;\n $countArr[strtoupper((string) $d['Model'])]['target'] = 0;\n }\n }\n }\n\n $select = array(\n 'target_table_id',\n 'target_table_emp_id',\n 'employe_table_employe_name',\n 'target_table_product',\n 'target_table_product_qty',\n 'target_table_exp_date'\n );\n $toNxt = new DateTime($to);\n $toNxt->modify('+1 day');\n $to = date_format($toNxt,\"Y-m-d\");\n $col = 'target_table_emp_id';\n $Where = (\"DATE (target_table_create) BETWEEN '$from' AND '$to' AND $col = $empID\");\n $this->db->where('target_table_target_level',$field);\n if($field == 6)\n $data['tl'] = $this->db->join('employe_table', 'employe_table.employe_table_employe_id = target_table_emp_id')\n ->select($select)\n ->get_where('target_table', $Where)\n ->result_array();\n if($field == 7)\n $data['dse'] = $this->db->join('employe_table', 'employe_table.employe_table_employe_id = target_table_emp_id')\n ->select($select)\n ->get_where('target_table', $Where)\n ->result_array();\n if($field == 5)\n $data['asm'] = $this->db->join('employe_table', 'employe_table.employe_table_employe_id = target_table_emp_id')\n ->select($select)\n ->get_where('target_table', $Where)\n ->result_array();\n\n switch ($field) {\n case 'tl':\n foreach ($data['tl'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['tl'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n\n break;\n case 'dse':\n foreach ($data['dse'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['dse'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n\n break;\n case 'asm':\n foreach ($data['asm'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['asm'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n break;\n case 6:\n foreach ($data['tl'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['tl'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n\n break;\n case 7:\n foreach ($data['dse'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['dse'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n\n break;\n case 5:\n foreach ($data['asm'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['asm'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n\n break;\n }\n\n\n\n return $countArr;\n }", "public function actionInquiryReport()\n {\n $s_date='';\n $e_date='';\n $export = Yii::$app->request->get('export');\n $search = Yii::$app->request->get('search');\n if(isset($export) && !isset($search)) {\n $this->InquiryExport();\n }\n else{\n if (isset(Yii::$app->request->queryParams['BookingSearch']['start_date']))\n $s_date = Yii::$app->request->queryParams['BookingSearch']['start_date'];\n if (isset(Yii::$app->request->queryParams['BookingSearch']['end_date']))\n $e_date = Yii::$app->request->queryParams['BookingSearch']['end_date'];\n if($s_date=='')\n $s_date = date(\"M-d-Y\");\n if($e_date=='')\n $e_date = date(\"M-d-Y\");\n $searchModel = new RecordInquirySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('inquiry_index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 's_date' => $s_date,\n 'e_date' => $e_date,\n ]);\n }\n\n }", "public function paynow1($scheduleid){\n //die(var_dump($this->usertype));\n $user_details = $this->pay_mdl->get_user_details($this->usertype, $this->user_id);\n \n $excep_param = array(\n 'usertype' => $user_details['usertype'],\n 'colid'=> $user_details['colid'],\n 'deptid' => $user_details['deptid'],\n 'progid' => ($user_details['usertype'] == 'applicant')? $user_details['prog1'] : $user_details['progid'],\n 'type' => ($user_details['usertype'] == 'applicant')? $user_details['type'] : \"\",\n 'coi'=>($user_details['usertype'] == 'applicant')? $user_details['coi'] : \"\",\n 'stid' => $user_details['stid'],\n 'level' => ($user_details['usertype'] == 'student')? $user_details['level'] : \"\",\n );\n $excep = $this->pay_mdl->get_user_exceptions($excep_param, $scheduleid)['rs'];\n \n //set pay history parameter\n $pay_hist_param = array(\n \"scheduleid\" => $scheduleid,\n \"userid\" => $user_details['userid'],\n \"status\" => \"'APPROVED'\"\n );\n $my_pay_hist = $this->pay_mdl->gets('my_pay_history', $pay_hist_param );\n \n $data['my_paying'] = '';\n \n \n switch ($this->usertype) {\n case 'applicant':\n \n\n break;\n case 'student':\n $hist_perc = array();\n $tot = 0;\n $total_paid = 0;\n\n\n // Set User session parameters\n if(!$this->main->get('level')){\n\n $student_details = $this->pay_mdl->gets('student_details', $this->main->item('user_id'));\n\n $this->main->set('level', $student_details['level'] );\n $this->main->set('colid', $student_details['colid'] );\n $this->main->set('deptid', $student_details['deptid'] );\n $this->main->set('progid', $student_details['progid'] );\n $this->main->set('usertype', $student_details['usertype']);\n }\n\n\n //set pay history parameter\n $pay_hist_param = array(\n \"scheduleid\" => $scheduleid,\n \"userid\" => $this->main->item('user_id'),\n \"status\" => \"'APPROVED'\"\n );\n $my_pay_hist = $this->pay_mdl->gets('my_pay_history', $pay_hist_param );\n\n\n\n // get the total sum of last payment and percentage \n if(!empty($my_pay_hist)){\n\n foreach($my_pay_hist as $key => $val){\n\n $hist_perc[$key] = $my_pay_hist[$key]['percentage'];\n\n $tot = $tot + $my_pay_hist[$key]['percentage'];\n $total_paid = $total_paid + $my_pay_hist[$key]['amt'];\n } \n }\n\n // Get pay schedule base on the session_parameters\n $session_param = array( \n \"scheduleid\" => $scheduleid,\n \"level\" => $this->main->get('level'),\n \"colid\" => $this->main->get('colid'),\n \"deptid\" => $this->main->get('deptid'),\n \"progid\" => $this->main->get('progid'),\n \"usertype\" => $this->main->get('usertype')\n );\n\n\n\n $schedule = $this->pay_mdl->gets('pay_schedule', $session_param);\n\n //var_dump($schedule);\n\n /*\n * check if schedule have exceptions\n */\n if($schedule['exceptions'] == 'Yes'){\n\n $excep = $this->pay_mdl->gets('my_pay_exception', $session_param);\n\n if(is_array($excep) && !empty($excep)){\n\n foreach($excep as $key => $value){\n\n if($excep[$key]['unittype'] == 'programme'){\n\n $to_pay = array();\n array_push($to_pay, $excep[$key]);\n\n break;\n\n }elseif($excep[$key]['unittype'] == 'department'){\n\n $to_pay = array();\n array_push($to_pay, $excep[$key]);\n\n break;\n\n }elseif($excep[$key]['unittype'] == 'college'){\n\n $to_pay = array();\n array_push($to_pay, $excep[$key]);\n\n break; \n } \n\n }\n\n $my_paying = array(\n \"schedule_id\" => $to_pay[0]['scheduleid'],\n \"schedule_type\" => $to_pay[0]['type'],\n \"exception_id\" => $to_pay[0]['exceptionid'],\n \"session_name\" => $to_pay[0]['sesname'],\n \"paying_amount\" => $to_pay[0]['ex_amount'],\n \"school_id\" => $to_pay[0]['schoolid'],\n \"session_id\" => $this->main->item('cur_session'),\n \"penalty\" => ($schedule['penalty_status'] == 'active')? $schedule['penalty'] : 0,\n \"penalty_status\" => $schedule['penalty_status'],\n \"adm_status\" => $to_pay[0]['admstatus'],\n \"level\" => $to_pay[0]['level'],\n \"payer_type\" => $to_pay[0]['payertype'],\n \"total_percent_paid\" => $tot,\n \"total_paid\" => $total_paid,\n \"revenue_head\" => $schedule['revhead']\n );\n\n if($schedule['penalty_status'] == 'active'){\n\n $my_paying['penalty_percentage'] = (100 - $my_paying['total_percent_paid']);\n $my_paying['paying_amount'] = (($my_paying['paying_amount'] + $schedule['penalty']) - $total_paid);\n\n }else{\n\n $percentage_arr = explode(':', $to_pay[0]['percentage']);\n\n $a = $hist_perc;\n $b = $percentage_arr;\n\n foreach ($a as $key => $value) {\n foreach($b as $k => $v){\n if($value == $v){\n unset($b[$k]);\n break;\n }\n }\n }\n\n $my_paying['percentage'] = $b;\n\n }// End of penalty Check\n\n\n }else{\n\n $to_pay = array();\n array_push($to_pay, $schedule);\n\n $my_paying = array(\n \"schedule_id\" => $to_pay[0]['scheduleid'],\n \"schedule_type\" => $to_pay[0]['type'],\n \"exception_id\" => NULL,\n \"session_name\" => $to_pay[0]['sesname'],\n \"paying_amount\" => $to_pay[0]['amount'],\n \"penalty\" => ($schedule['penalty_status'] == 'active')? $schedule['penalty'] : 0,\n \"penalty_status\" => $schedule['penalty_status'],\n \"school_id\" => $to_pay[0]['schoolid'],\n \"session_id\" => $this->main->item('cur_session'),\n \"adm_status\" => NULL,\n \"level\" => NULL,\n \"payer_type\" => NULL,\n \"total_percent_paid\" => $tot,\n \"revenue_head\" => $schedule['revhead']\n );\n\n\n if($schedule['penalty_status'] == 'active'){\n\n $my_paying['penalty_percentage'] = (100 - $my_paying['total_percent_paid']);\n $my_paying['paying_amount'] = (($my_paying['paying_amount'] + $schedule['penalty']) - $total_paid);\n\n }else{\n\n $percentage_arr = explode(':', $to_pay[0]['percentage']);\n\n $a = $hist_perc;\n $b = $percentage_arr;\n\n foreach ($a as $key => $value) {\n foreach($b as $k => $v){\n if($value == $v){\n unset($b[$k]);\n break;\n }\n }\n }\n\n $my_paying['percentage'] = $b;\n\n }// End of penalty Check\n\n\n } // End of Exception is not Empty\n\n }else{\n\n $to_pay = array();\n array_push($to_pay, $schedule);\n\n $my_paying = array(\n \"schedule_id\" => $to_pay[0]['scheduleid'],\n \"schedule_type\" => $to_pay[0]['type'],\n \"exception_id\" => NULL,\n \"session_name\" => $to_pay[0]['sesname'],\n \"session_id\" => $this->main->item('cur_session'),\n \"paying_amount\" => $to_pay[0]['amount'],\n \"school_id\" => $to_pay[0]['schoolid'],\n \"penalty\" => ($schedule['penalty_status'] == 'active')? $schedule['penalty'] : 0,\n \"penalty_status\" => $schedule['penalty_status'],\n \"adm_status\" => NULL,\n \"level\" => NULL,\n \"payer_type\" => NULL,\n \"total_percent_paid\" => $tot,\n \"revenue_head\" => $schedule['revhead']\n );\n\n if($schedule['penalty_status'] == 'active'){\n\n $my_paying['penalty_percentage'] = (100 - $my_paying['total_percent_paid']);\n $my_paying['paying_amount'] = (($my_paying['paying_amount'] + $schedule['penalty']) - $total_paid);\n\n }else{\n\n $percentage_arr = explode(':', $to_pay[0]['percentage']);\n\n $a = $hist_perc;\n $b = $percentage_arr;\n\n foreach ($a as $key => $value) {\n foreach($b as $k => $v){\n if($value == $v){\n unset($b[$k]);\n break;\n }\n }\n }\n\n $my_paying['percentage'] = $b;\n\n }// End of penalty Check\n\n }//End of schedule Has Exception Check\n\n $data['my_paying'] = $my_paying;\n\n break;\n\n default:\n break;\n } \n \n \n \n \n \n \n \n $page_name = 'paynow';\n \n //build view page for pay Now \n $page_content = $this->load->view($this->folder_name.'/'.$page_name, $data, true);\n $this->page->build($page_content, $this->folder_name, $page_name, $this->page_title ); \n \n \n \n }", "public function index()\n\t{\n \t\t$action = $this->request->getData('action');\n\t\t$userID = $this->request->getData('personID');\n\t\t$deptcode = $this->request->getData('deptcode');\n\t\t$acyear = $this->request->getData('acyear');\n \t\n \t\tif (!empty($action) && in_array($action,['report','noreport'])) {\n \t \t\treturn $this->$action($userID,$deptcode,$acyear);\n \t}\n \telseif (!empty($action) && in_array($action,['admin'])) {//$this->Flash->success('USER: ' . print_r($user,true));\n return $this->$action($userID);\n }\n elseif (!empty($action) && in_array($action,['user_admin'])) {\n return $this->$action($userID);\n }\n elseif (!empty($action) && in_array($action,['save_user'])) {\n $data = $this->request->getData();\n return $this->$action($data);\n }\n elseif (!empty($action) && in_array($action,['delete_user'])) {\n $data = $this->request->getData();\n return $this->$action($data);\n\t\t}\n\t\telseif (!empty($action) && in_array($action, ['download_report'])) {\n return $this->$action();\n }\n elseif(!empty($action) && in_array($action, ['edit_user'])) {\n $user_id = $this->request->getData('user_id');\n return $this->$action($user_id);\n }\n elseif(!empty($action) && in_array($action, ['add_user'])) {\n return $this->$action();\n\t\t}\n\t\telseif (!empty($action) && in_array($action,['department_admin'])) {\n return $this->$action($userID);\n\t\t}\n elseif (!empty($action) && in_array($action,['save_department'])) {\n $data = $this->request->getData();\n return $this->$action($data);\n }\n elseif (!empty($action) && in_array($action,['delete_department'])) {\n $data = $this->request->getData();\n return $this->$action($data);\n }\n elseif(!empty($action) && in_array($action, ['edit_department'])) {\n $dept_code = $this->request->getData('dept_code');\n return $this->$action($dept_code);\n }\n elseif(!empty($action) && in_array($action, ['add_department'])) {\n return $this->$action();\n }\n elseif(!empty($action) && in_array($action, ['download_report'])) {\n return $this->$action();\n }\n\n \t\t// Otherwise continue\n\t\t$user = $this->getOxfordUserAndValidate();\n\t\t$user['is_admin'] = $this->check_secure();\n\t\tif ($this->request->is(['post','put'])) {\n\t\t\t$user = $this->HarassmentUsers->patchEntity($user, $this->request->getData());\n\t\t\t$this->Flash->success('USER: ' . print_r($user,true));\n \n if (!empty($user->action)) {\n //return $this->redirect([ '?' => [ 'a'=>($user->action == 'report'?'report':'noreport'), 'u'=>$user->userID, 'd'=>$user->deptcode, 'y'=>$user->acyear ] ]);\n $action = $user->action;\n \t if (!empty($action) && in_array($action,['report','noreport'])) {\n\t\t\t\t\treturn $this->$action($user->userID, $user->deptcode, $user->acyear);\n\t\t\t\t}\n /*\n if ($user->action == 'report') {\n return $this->redirect([ 'action' => 'report', $user->userID, $user->deptcode, $user->acyear ]);\n } else {\n return $this->redirect([ 'action' => 'noreport', $user->userID, $user->deptcode, $user->acyear ]);\n }\n //*/\n }\n\t\t}\n\t}", "public function actionAttendanceInView()\n {\n $no_days=new Query;\n $no_days->select('Days')->from('months')->where(['id'=>Yii::$app->request->queryParams['AttendanceInSearch'][\"Month\"]]);\n $_no_days = $no_days->all();\n $start=Yii::$app->request->queryParams['AttendanceInSearch'][\"Year\"].\"-\".add_zero(Yii::$app->request->queryParams['AttendanceInSearch'][\"Month\"]).\"-\".\"01\";\n $end=Yii::$app->request->queryParams['AttendanceInSearch'][\"Year\"].\"-\".add_zero(Yii::$app->request->queryParams['AttendanceInSearch'][\"Month\"]).\"-\".\"31\";\n \n $present_days=AttendanceIn::find()->where(['EmployeeId'=>Yii::$app->request->queryParams['AttendanceInSearch'][\"EmployeeId\"]])->andWhere(['and','Date>='.'\"'.$start.'\"','Date<='.'\"'.$end.'\"'])->all();\n $pst_days=[];\n foreach ($present_days as $pd) {\n $pst_days[$pd[\"Date\"]]=['InTime'=>$pd[\"Time\"],'OutTime'=>$pd[\"OutTime\"],\"Resolved\"=>(ChangeRequest::findOne(['RaisedEmpCode'=>Yii::$app->request->queryParams['AttendanceInSearch'][\"EmployeeId\"],'Date'=>$pd[\"Date\"]])[\"Resolved\"]),\"Attendance\"=>$pd['FirstHalf'].\"-\".$pd['SecondHalf'],\"Remark\"=>$pd['Remark']];\n \n }\n/* $attendance_criteria=[];\n foreach(TimeSlots::find()->all() as $ac){\n $attendance_criteria[$ac['id']]=['InTime'=>$ac['InTime'],'OutTime'=>$ac['OutTime'],'Grace'=>$ac['Grace'],'DeadOut'=>$ac['DeadOut'],'MaxDeadOutCount'=>$ac['MaxDeadOutCount']];\n }*/\n $leave_record=[];\n foreach(LeaveRequest::find()->where(['RaisedEmpId'=>Yii::$app->request->queryParams['AttendanceInSearch'][\"EmployeeId\"]])->andWhere(['and','Date>='.'\"'.$start.'\"','Date<='.'\"'.$end.'\"'])->all() as $lq){\n $leave_record[$lq['Date']]=$lq['Resolved'];\n }\n $month_off=MonthOff::find()->select([\"Dates\"])->where(['BranchId'=>Employee::findOne(['id'=>Yii::$app->request->queryParams['AttendanceInSearch'][\"EmployeeId\"]])->Branch])->andWhere(['Month'=>add_zero(Yii::$app->request->queryParams['AttendanceInSearch'][\"Month\"])])->andWhere(['Year'=>add_zero(Yii::$app->request->queryParams['AttendanceInSearch'][\"Year\"])])->all();\n if($month_off)\n $month_off=array_map('intval',explode(',',$month_off[0]['Dates'],-1));\n else\n $month_off=[];\n $searchModel = new AttendanceInSearch();\n return $this->render('attendance-in-view', [\n 'searchModel' => $searchModel,\n 'no_days'=>(int)$_no_days[0][\"Days\"],\n 'present_days'=>$pst_days,\n 'leave_record'=>$leave_record,\n 'month_off'=>$month_off,\n ]);\n }", "function report()\n {\n if ($this->acl->otentikasi2($this->title) == TRUE){\n\n $vendor = $this->input->post('cvendor');\n $cur = $this->input->post('ccurrency');\n \n $start = $this->input->post('start');\n $end = $this->input->post('end');\n $acc = $this->input->post('cacc');\n\n $data['currency'] = strtoupper($cur);\n $data['start'] = tglin($start);\n $data['end'] = tglin($end);\n $data['rundate'] = tglin(date('Y-m-d'));\n $data['log'] = $this->decodedd->log;\n\n// $data['purchase_returns'] = $this->model->report($cur,$vendor,$start,$end,$acc)->result();\n \n $reports = null;\n foreach ($this->model->report($cur,$vendor,$start,$end,$acc)->result() as $res) {\n $reports[] = array (\"id\"=>$res->id, \n \"date\"=> tglin($res->dates),\n \"no\"=> \"PR-00\".$res->no,\n \"account\"=>floatval($res->price),\n \"vendor\"=>$res->prefix.' '.$res->name,\n \"amount\"=>floatval($res->total-$res->tax),\n \"tax\"=>floatval($res->tax),\n \"cost\"=>floatval($res->costs),\n \"balance\"=>floatval($res->total-$res->costs),\n \"status\"=> $this->xstatus($res->status)\n ); \n }\n \n $total = $this->model->total($cur,$vendor,$start,$end,$acc);\n $data['total'] = floatval($total['total'] - $total['tax']);\n $data['tax'] = floatval($total['tax']);\n $data['costs'] = floatval($total['costs']);\n $data['balance'] = floatval($total['total'] + $total['costs']);\n $data['items'] = $reports;\n \n $this->output = $data;\n \n }else { $this->reject_token('Invalid Token or Expired..!'); }\n $this->response('content');\n \n }", "private function reportIt()\n {\n try\n {\n $request = $_POST;\n\n $types = array('videos','video','v','photos','photo','p','collections','collection','cl','users','user','u','groups','group','g');\n\n //check if type sent\n if( !isset($request['type']) || $request['type']==\"\" )\n throw_error_msg(\"type not provided\");\n\n //check valid type\n if(!in_array($request['type'], $types))\n throw_error_msg(\"invalid type\");\n\n //check id \n if( !isset($request['id']) || $request['id']==\"\" )\n throw_error_msg(\"id not provided\"); \n\n //check valid id \n if( !is_numeric($request['id']) )\n throw_error_msg(\"invalid id\");\n\n if( !is_numeric($request['flag_type']) )\n throw_error_msg(\"flag type not provided\"); \n \n $type = strtolower($request['type']);\n $id = $request['id'];\n switch($type)\n {\n case 'v':\n case 'video':\n case 'videos':\n default:\n {\n global $cbvideo; \n $cbvideo->action->report_it($id);\n }\n break;\n\n case 'g':\n case 'group':\n case 'groups':\n {\n global $cbgroup;\n $cbgroup->action->report_it($id);\n }\n break;\n\n case 'u':\n case 'user':\n case 'users':\n {\n global $userquery;\n $userquery->action->report_it($id);\n }\n break;\n\n case 'p':\n case 'photo':\n case 'photos':\n {\n global $cbphoto;\n $cbphoto->action->report_it($id);\n }\n break;\n\n case \"cl\":\n case \"collection\":\n case \"collections\":\n {\n global $cbcollection;\n $cbcollection->action->report_it($id);\n }\n break;\n\n }\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $msg = msg_list();\n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => $msg[0]);\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage()); \n }\n\n }", "public function dailyLog()\n\t{\n\t\t$from = Input::get('start');\n\t\t$to = Input::get('end');\n\t\t$pendingOrAll = Input::get('pending_or_all');\n\t\t$error = '';\n\t\t$accredited = array();\n\t\t//\tCheck radiobutton for pending/all tests is checked and assign the 'true' value\n\t\tif (Input::get('tests') === '1') {\n\t\t $pending='true';\n\t\t}\n\t\t$date = date('Y-m-d');\n\t\tif(!$to){\n\t\t\t$to=$date;\n\t\t}\n\t\t$toPlusOne = date_add(new DateTime($to), date_interval_create_from_date_string('1 day'));\n\t\t$records = Input::get('records');\n\t\t$testCategory = Input::get('section_id');\n\t\t$testType = Input::get('test_type');\n\t\t$labSections = TestCategory::lists('name', 'id');\n\t\tif($testCategory)\n\t\t\t$testTypes = TestCategory::find($testCategory)->testTypes->lists('name', 'id');\n\t\telse\n\t\t\t$testTypes = array(\"\"=>\"\");\n\t\t\n\t\tif($records=='patients'){\n\t\t\tif($from||$to){\n\t\t\t\tif(strtotime($from)>strtotime($to)||strtotime($from)>strtotime($date)||strtotime($to)>strtotime($date)){\n\t\t\t\t\t\t$error = trans('messages.check-date-range');\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$visits = Visit::whereBetween('created_at', array($from, $toPlusOne))->get();\n\t\t\t\t}\n\t\t\t\tif (count($visits) == 0) {\n\t\t\t\t \tSession::flash('message', trans('messages.no-match'));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\t$visits = Visit::where('created_at', 'LIKE', $date.'%')->orderBy('patient_id')->get();\n\t\t\t}\n\t\t\tif(Input::has('word')){\n\t\t\t\t$date = date(\"Ymdhi\");\n\t\t\t\t$fileName = \"daily_visits_log_\".$date.\".doc\";\n\t\t\t\t$headers = array(\n\t\t\t\t \"Content-type\"=>\"text/html\",\n\t\t\t\t \"Content-Disposition\"=>\"attachment;Filename=\".$fileName\n\t\t\t\t);\n\t\t\t\t$content = View::make('reports.daily.exportPatientLog')\n\t\t\t\t\t\t\t\t->with('visits', $visits)\n\t\t\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t\t\t->withInput(Input::all());\n\t\t \treturn Response::make($content,200, $headers);\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn View::make('reports.daily.patient')\n\t\t\t\t\t\t\t\t->with('visits', $visits)\n\t\t\t\t\t\t\t\t->with('error', $error)\n\t\t\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t\t\t->withInput(Input::all());\n\t\t\t}\n\t\t}\n\t\t//Begin specimen rejections\n\t\telse if($records=='rejections')\n\t\t{\n\t\t\t$specimens = Specimen::where('specimen_status_id', '=', Specimen::REJECTED);\n\t\t\t/*Filter by test category*/\n\t\t\tif($testCategory&&!$testType){\n\t\t\t\t$specimens = $specimens->join('tests', 'specimens.id', '=', 'tests.specimen_id')\n\t\t\t\t\t\t\t\t\t ->join('test_types', 'tests.test_type_id', '=', 'test_types.id')\n\t\t\t\t\t\t\t\t\t ->where('test_types.test_category_id', '=', $testCategory);\n\t\t\t}\n\t\t\t/*Filter by test type*/\n\t\t\tif($testCategory&&$testType){\n\t\t\t\t$specimens = $specimens->join('tests', 'specimens.id', '=', 'tests.specimen_id')\n\t\t\t\t \t\t\t\t\t ->where('tests.test_type_id', '=', $testType);\n\t\t\t}\n\n\t\t\t/*Filter by date*/\n\t\t\tif($from||$to){\n\t\t\t\tif(strtotime($from)>strtotime($to)||strtotime($from)>strtotime($date)||strtotime($to)>strtotime($date)){\n\t\t\t\t\t\t$error = trans('messages.check-date-range');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$specimens = $specimens->whereBetween('time_rejected', \n\t\t\t\t\t\tarray($from, $toPlusOne))->get(array('specimens.*'));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$specimens = $specimens->where('time_rejected', 'LIKE', $date.'%')->orderBy('id')\n\t\t\t\t\t\t\t\t\t\t->get(array('specimens.*'));\n\t\t\t}\n\t\t\tif(Input::has('word')){\n\t\t\t\t$date = date(\"Ymdhi\");\n\t\t\t\t$fileName = \"daily_rejected_specimen_\".$date.\".doc\";\n\t\t\t\t$headers = array(\n\t\t\t\t \"Content-type\"=>\"text/html\",\n\t\t\t\t \"Content-Disposition\"=>\"attachment;Filename=\".$fileName\n\t\t\t\t);\n\t\t\t\t$content = View::make('reports.daily.exportSpecimenLog')\n\t\t\t\t\t\t\t\t->with('specimens', $specimens)\n\t\t\t\t\t\t\t\t->with('testCategory', $testCategory)\n\t\t\t\t\t\t\t\t->with('testType', $testType)\n\t\t\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t\t\t->withInput(Input::all());\n\t\t \treturn Response::make($content,200, $headers);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn View::make('reports.daily.specimen')\n\t\t\t\t\t\t\t->with('labSections', $labSections)\n\t\t\t\t\t\t\t->with('testTypes', $testTypes)\n\t\t\t\t\t\t\t->with('specimens', $specimens)\n\t\t\t\t\t\t\t->with('testCategory', $testCategory)\n\t\t\t\t\t\t\t->with('testType', $testType)\n\t\t\t\t\t\t\t->with('error', $error)\n\t\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t\t->withInput(Input::all());\n\t\t\t}\n\t\t}\n\t\t//Begin test records\n\t\telse\n\t\t{\n\t\t\t$tests = Test::whereNotIn('test_status_id', [Test::NOT_RECEIVED]);\n\t\t\t\n\t\t\t/*Filter by test category*/\n\t\t\tif($testCategory&&!$testType){\n\t\t\t\t$tests = $tests->join('test_types', 'tests.test_type_id', '=', 'test_types.id')\n\t\t\t\t\t\t\t ->where('test_types.test_category_id', '=', $testCategory);\n\t\t\t}\n\t\t\t/*Filter by test type*/\n\t\t\tif($testType){\n\t\t\t\t$tests = $tests->where('test_type_id', '=', $testType);\n\t\t\t}\n\t\t\t/*Filter by all tests*/\n\t\t\tif($pendingOrAll=='pending'){\n\t\t\t\t$tests = $tests->whereIn('test_status_id', [Test::PENDING, Test::STARTED]);\n\t\t\t}\n\t\t\telse if($pendingOrAll=='all'){\n\t\t\t\t$tests = $tests->whereIn('test_status_id', \n\t\t\t\t\t[Test::PENDING, Test::STARTED, Test::COMPLETED, Test::VERIFIED]);\n\t\t\t}\n\t\t\t//For Complete tests and the default.\n\t\t\telse{\n\t\t\t\t$tests = $tests->whereIn('test_status_id', [Test::COMPLETED, Test::VERIFIED]);\n\t\t\t}\n\t\t\t/*Get collection of tests*/\n\t\t\t/*Filter by date*/\n\t\t\tif($from||$to){\n\t\t\t\tif(strtotime($from)>strtotime($to)||strtotime($from)>strtotime($date)||strtotime($to)>strtotime($date)){\n\t\t\t\t\t\t$error = trans('messages.check-date-range');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$tests = $tests->whereBetween('time_created', array($from, $toPlusOne))->get(array('tests.*'));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$tests = $tests->where('time_created', 'LIKE', $date.'%')->get(array('tests.*'));\n\t\t\t}\n\t\t\t\t\n\t\t\tif(Input::has('word')){\n\t\t\t\t$date = date(\"Ymdhi\");\n\t\t\t\t$fileName = \"daily_test_records_\".$date.\".doc\";\n\t\t\t\t$headers = array(\n\t\t\t\t \"Content-type\"=>\"text/html\",\n\t\t\t\t \"Content-Disposition\"=>\"attachment;Filename=\".$fileName\n\t\t\t\t);\n\t\t\t\t$content = View::make('reports.daily.exportTestLog')\n\t\t\t\t\t\t\t\t->with('tests', $tests)\n\t\t\t\t\t\t\t\t->with('testCategory', $testCategory)\n\t\t\t\t\t\t\t\t->with('testType', $testType)\n\t\t\t\t\t\t\t\t->with('pendingOrAll', $pendingOrAll)\n\t\t\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t\t\t->withInput(Input::all());\n\t\t \treturn Response::make($content,200, $headers);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn View::make('reports.daily.test')\n\t\t\t\t\t\t\t->with('labSections', $labSections)\n\t\t\t\t\t\t\t->with('testTypes', $testTypes)\n\t\t\t\t\t\t\t->with('tests', $tests)\n\t\t\t\t\t\t\t->with('counts', $tests->count())\n\t\t\t\t\t\t\t->with('testCategory', $testCategory)\n\t\t\t\t\t\t\t->with('testType', $testType)\n\t\t\t\t\t\t\t->with('pendingOrAll', $pendingOrAll)\n\t\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t\t->with('error', $error)\n\t\t\t\t\t\t\t->withInput(Input::all());\n\t\t\t}\n\t\t}\n\t}", "public function tms_report_count() {\n $data['sideMenuData'] = fetch_non_main_page_content();\n if (!empty($_POST)) {\n\n\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n if ($_POST['pStatus'] == '1') {\n $payment_status = \"PAID','PARTPAID\";\n $displayTextCount = \"Total Paid Trainees : \";\n $export_url = '?pStatus=1';\n } else if ($_POST['pStatus'] == '2') {\n $payment_status = \"NOTPAID','PARTPAID\";\n $displayTextCount = \"Total Unpaid Trainees : \";\n $export_url = '?payStatus=2';\n }\n \n $year = $_POST['yVal'];\n $month = $_POST['mVal'];\n \n $training_score1 = $_POST['tStatus'];\n $export_url .='&yearVal=' . $year . '&monthVal=' . $month;\n if ($training_score1 == '1') {\n $training_score = 'C';\n } else if ($training_score1 == '2') {\n $training_score = \"NYC','2NYC\";\n } else if ($training_score1 == '3') {\n $training_score = 'ABS';\n } else if ($training_score1 == '4') {\n $training_score = \"C','NYC','2NYC\";\n }\n\n $export_url .= '&trainingStatus=' . $training_score1;\n $temp_data = array();\n if ($_POST['pStatus'] == '1') {\n $data_res = $this->reportsModel->tms_paid_report_count($tenant_id, $payment_status, $year, $month, $training_score);\n $paidVal1 = $this->calculate_paid($data_res);\n $count=count($data_res);\n $displayTextCount = 'Total Amount Received : ';\n } else if ($_POST['pStatus'] == '2') {\n $data_res = $this->reportsModel->tms_unpaid_report_count($tenant_id, $payment_status, $year, $month, $training_score);\n $amount_due = $data_res[0]->total_amount_due;\n $paidVal1 = $amount_due;\n $count=$data_res[0]->count;\n $displayTextCount = 'Total Amount Pending : ';\n } else if ($_POST['pStatus'] == '3'){\n $payment_status2 = \"PAID','PARTPAID\";\n $payment_status1 = \"NOTPAID','PARTPAID\";\n $data1_res = $this->reportsModel->tms_unpaid_report_count($tenant_id, $payment_status1, $year, $month, $training_score);\n $data2_res = $this->reportsModel->tms_paid_report_count($tenant_id, $payment_status2, $year, $month, $training_score);\n $amount_due = $data1_res[0]->total_amount_due;\n $paid_amout = $this->calculate_paid($data2_res);\n $count = ($data1_res[0]->count)+count($data2_res);\n $displayTextCount = \"Total Paid + Unpaid Amount : \";\n \n $paidVal1 =$amount_due + $paid_amout;\n \n }\n \n }\n \n $data['text1'] = 'Total Trainee: '.$count;\n $data['amount1'] = $displayTextCount.$paidVal1;\n $data['page_title'] = 'TMS Reports';\n $data['export_url'] = $export_url;\n $data['main_content'] = 'reports/tms_report';\n $this->load->view('layout', $data);\n }", "public function indexAction()\r\n {\r\n \tini_set('memory_limit', '64M');\r\n $validFormats = array('weekly');\r\n $format = 'weekly'; // $this->_getParam('format', 'weekly');\r\n \r\n if (!in_array($format, $validFormats)) {\r\n $this->flash('Format not valid');\r\n $this->renderView('error.php');\r\n return;\r\n }\r\n\r\n $reportingOn = 'Dynamic';\r\n \r\n // -1 will mean that by default, just choose all timesheet records\r\n $timesheetid = -1;\r\n\r\n // Okay, so if we were passed in a timesheet, it means we want to view\r\n // the data for that timesheet. However, if that timesheet is locked, \r\n // we want to make sure that the tasks being viewed are ONLY those that\r\n // are found in that locked timesheet.\r\n $timesheet = $this->byId();\r\n\r\n $start = null;\r\n $end = null;\r\n $this->view->showLinks = true;\r\n $cats = array();\r\n\r\n if ($timesheet) {\r\n $this->_setParam('clientid', $timesheet->clientid);\r\n $this->_setParam('projectid', $timesheet->projectid);\r\n if ($timesheet->locked) {\r\n $timesheetid = $timesheet->id;\r\n $reportingOn = $timesheet->title;\r\n } else {\r\n $timesheetid = 0; \r\n $reportingOn = 'Preview: '.$timesheet->title;\r\n }\r\n if (is_array($timesheet->tasktype)) {\r\n \t$cats = $timesheet->tasktype;\r\n } \r\n\r\n $start = date('Y-m-d 00:00:01', strtotime($timesheet->from));\r\n $end = date('Y-m-d 23:59:59', strtotime($timesheet->to)); \r\n $this->view->showLinks = false;\r\n } else if ($this->_getParam('category')){\r\n \t$cats = array($this->_getParam('category'));\r\n }\r\n \r\n \r\n $project = $this->_getParam('projectid') ? $this->byId($this->_getParam('projectid'), 'Project') : null;\r\n\t\t\r\n\t\t$client = null;\r\n\t\tif (!$project) {\r\n \t$client = $this->_getParam('clientid') ? $this->byId($this->_getParam('clientid'), 'Client') : null;\r\n\t\t}\r\n\t\t\r\n $user = $this->_getParam('username') ? $this->userService->getUserByField('username', $this->_getParam('username')) : null;\r\n \r\n\t\t$this->view->user = $user;\r\n\t\t$this->view->project = $project;\r\n\t\t$this->view->client = $client ? $client : ( $project ? $this->byId($project->clientid, 'Client'):null);\r\n\t\t$this->view->category = $this->_getParam('category');\r\n \r\n if (!$start) {\r\n\t // The start date, if not set in the parameters, will be just\r\n\t // the previous monday\r\n\t $start = $this->_getParam('start', $this->calculateDefaultStartDate());\r\n\t // $end = $this->_getParam('end', date('Y-m-d', time()));\r\n\t $end = $this->_getParam('end', date('Y-m-d 23:59:59', strtotime($start) + (6 * 86400)));\r\n }\r\n \r\n // lets normalise the end date to make sure it's of 23:59:59\r\n\t\t$end = date('Y-m-d 23:59:59', strtotime($end));\r\n\r\n $this->view->title = $reportingOn;\r\n \r\n $order = 'endtime desc';\r\n if ($format == 'weekly') {\r\n $order = 'starttime asc';\r\n }\r\n\r\n $this->view->taskInfo = $this->projectService->getTimesheetReport($user, $project, $client, $timesheetid, $start, $end, $cats, $order);\r\n \r\n // get the hierachy for all the tasks in the task info. Make sure to record how 'deep' the hierarchy is too\r\n\t\t$hierarchies = array();\r\n\r\n\t\t$maxHierarchyLength = 0;\r\n\t\tforeach ($this->view->taskInfo as $taskinfo) {\r\n\t\t\tif (!isset($hierarchies[$taskinfo->taskid])) {\r\n\t\t\t\t$task = $this->projectService->getTask($taskinfo->taskid);\r\n\t\t\t\t$taskHierarchy = array();\r\n\t\t\t\tif ($task) {\r\n\t\t\t\t\t$taskHierarchy = $task->getHierarchy();\r\n\t\t\t\t\tif (count($taskHierarchy) > $maxHierarchyLength) {\r\n\t\t\t\t\t\t$maxHierarchyLength = count($taskHierarchy);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$hierarchies[$taskinfo->taskid] = $taskHierarchy;\r\n\t\t\t} \r\n\t\t}\r\n\t\r\n\t\t$this->view->hierarchies = $hierarchies;\r\n\t\t$this->view->maxHierarchyLength = $maxHierarchyLength;\r\n\r\n $this->view->startDate = $start;\r\n $this->view->endDate = $end;\r\n $this->view->params = $this->_getAllParams();\r\n $this->view->dayDivision = za()->getConfig('day_length', 8) / 4; // za()->getConfig('day_division', 2);\r\n $this->view->divisionTolerance = za()->getConfig('division_tolerance', 20);\r\n \r\n $outputformat = $this->_getParam('outputformat');\r\n if ($outputformat == 'csv') {\r\n \t$this->_response->setHeader(\"Content-type\", \"text/csv\");\r\n\t $this->_response->setHeader(\"Content-Disposition\", \"inline; filename=\\\"timesheet.csv\\\"\");\r\n\r\n\t echo $this->renderRawView('timesheet/csv-export.php');\r\n } else {\r\n\t\t\tif ($this->_getParam('_ajax')) {\r\n\t\t\t\t$this->renderRawView('timesheet/'.$format.'-report.php');\r\n\t\t\t} else {\r\n\t\t\t\t$this->renderView('timesheet/'.$format.'-report.php');\r\n\t\t\t}\r\n }\r\n }", "public function vbd_report_other_datewise()\n\t\t{\n\t\t\t$this->load->view('admin/header');\n\t\t\t$this->load->view('admin/nav');\n\t\t\t$data['get_state']=$this->Mod_report->get_state();\n\t\t\t$data['get_institute']=$this->Mod_report->get_institute();\n\t\t\t$this->load->view('reports/vbd_report_other_datewise',$data);\t\t\n\t\t\t$this->load->view('admin/footer');\t\n\n\t\t}", "public function reportMonthlyAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportMonthlyAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "function admin_export_new_patientsdone($id=NULL) // template for new classes\r\n {\r\n $data['offline_mode']\t\t=\t$this->config->item('offline_mode');\r\n $data['debug_mode']\t\t =\t$this->config->item('debug_mode');\r\n\t\t$data['user_rights'] = $this->mthirra->get_user_rights($_SESSION['username']);\r\n\t\t$data['title'] = \"Exported New Patients\";\r\n $data['now_id'] = time();\r\n $export_when = $data['now_id'];\r\n $export_by = $_SESSION['staff_id'];\r\n $data['baseurl'] = base_url();\r\n\r\n $data['exploded_baseurl'] = explode('/', $data['baseurl'], 4);\r\n $data['app_folder'] = substr($data['exploded_baseurl'][3], 0, -1);\r\n $data['DOCUMENT_ROOT'] = $_SERVER['DOCUMENT_ROOT'];\r\n if(substr($data['DOCUMENT_ROOT'],-1) === \"/\"){\r\n // Do nothing\r\n } else {\r\n // Add a slash\r\n $data['DOCUMENT_ROOT'] = $data['DOCUMENT_ROOT'].'/';\r\n }\r\n $data['app_path'] = $data['DOCUMENT_ROOT'].$data['app_folder'];\r\n $data['export_path'] = $data['app_path'].\"-uploads/exports_patient\";\r\n \r\n $version_file_path = $data['app_path'].\"/app_thirra/version.txt\";\r\n $handle = fopen($version_file_path, \"r\");\r\n $app_version = fread($handle, filesize($version_file_path));\r\n fclose($handle);\r\n\r\n if(count($_POST)) {\r\n // User has posted the form\r\n $data['form_purpose'] = $_POST['form_purpose'];\r\n $data['num_rows'] = $_POST['num_rows'];\r\n\t\t\t$xmlstr = \"<?xml version='1.0'?>\";\r\n\t\t\t$xmlstr .= \"\\n<THIRRA_export_patients>\";\r\n $xmlstr .= \"\\n\\t<export_info>\";\r\n $xmlstr .= \"\\n\\t\\t<export_by>$export_by</export_by>\";\r\n $xmlstr .= \"\\n\\t\\t<export_when>$export_when</export_when>\";\r\n $xmlstr .= \"\\n\\t\\t<thirra_version>$app_version</thirra_version>\";\r\n $xmlstr .= \"\\n\\t</export_info>\";\r\n\t\t\t$selected\t\t=\t1;\r\n\t\t\tfor($i=1; $i<=$data['num_rows']; $i++){\r\n\t\t\t\t// Only retrieve if selected by user\r\n\t\t\t\tif(isset($_POST['s'.$i])){\r\n\t\t\t\t\t$data['unsynched_list'][$selected]['number']\t= $i;\r\n\t\t\t\t\t$data['unsynched_list'][$selected]['value']\t= $_POST['s'.$i];\r\n\t\t\t\t\t$data['unsynched_list'][$selected]['patient_info'] \r\n\t\t\t\t\t\t= $this->memr_rdb->get_patient_details($data['unsynched_list'][$selected]['value']);\r\n\t\t\t\t\t$patient_id \t= $data['unsynched_list'][$selected]['patient_info']['patient_id'];\r\n\t\t\t\t\t$patient_name \t= $data['unsynched_list'][$selected]['patient_info']['patient_name'];\r\n\t\t\t\t\t$name_first \t= $data['unsynched_list'][$selected]['patient_info']['name_first'];\r\n\t\t\t\t\t$name_alias \t= $data['unsynched_list'][$selected]['patient_info']['name_alias'];\r\n\t\t\t\t\t$gender \t\t= $data['unsynched_list'][$selected]['patient_info']['gender'];\r\n\t\t\t\t\t$ic_no \t\t\t= $data['unsynched_list'][$selected]['patient_info']['ic_no'];\r\n\t\t\t\t\t$ic_other_type = $data['unsynched_list'][$selected]['patient_info']['ic_other_type'];\r\n\t\t\t\t\t$ic_other_no \t= $data['unsynched_list'][$selected]['patient_info']['ic_other_no'];\r\n\t\t\t\t\t$nationality \t= $data['unsynched_list'][$selected]['patient_info']['nationality'];\r\n\t\t\t\t\t$birth_date \t= $data['unsynched_list'][$selected]['patient_info']['birth_date'];\r\n\t\t\t\t\t$clinic_reference_number = $data['unsynched_list'][$selected]['patient_info']['clinic_reference_number'];\r\n\t\t\t\t\t$pns_pat_id \t= $data['unsynched_list'][$selected]['patient_info']['pns_pat_id'];\r\n\t\t\t\t\t$nhfa_no \t\t= $data['unsynched_list'][$selected]['patient_info']['nhfa_no'];\r\n\t\t\t\t\t$ethnicity \t\t= $data['unsynched_list'][$selected]['patient_info']['ethnicity'];\r\n\t\t\t\t\t$religion \t\t= $data['unsynched_list'][$selected]['patient_info']['religion'];\r\n\t\t\t\t\t$marital_status = $data['unsynched_list'][$selected]['patient_info']['marital_status'];\r\n\t\t\t\t\t$patient_type \t= $data['unsynched_list'][$selected]['patient_info']['patient_type'];\r\n\t\t\t\t\t$blood_group \t= $data['unsynched_list'][$selected]['patient_info']['blood_group'];\r\n\t\t\t\t\t$blood_rhesus \t= $data['unsynched_list'][$selected]['patient_info']['blood_rhesus'];\r\n\t\t\t\t\t$demise_date \t= $data['unsynched_list'][$selected]['patient_info']['demise_date'];\r\n\t\t\t\t\t$demise_time \t= $data['unsynched_list'][$selected]['patient_info']['demise_time'];\r\n\t\t\t\t\t$demise_cause \t= $data['unsynched_list'][$selected]['patient_info']['demise_cause'];\r\n\t\t\t\t\t$clinic_home \t= $data['unsynched_list'][$selected]['patient_info']['clinic_home'];\r\n\t\t\t\t\t$clinic_registered = $data['unsynched_list'][$selected]['patient_info']['clinic_registered'];\r\n\t\t\t\t\t$status = $data['unsynched_list'][$selected]['patient_info']['status'];\r\n\t\t\t\t\t$contact_id \t= $data['unsynched_list'][$selected]['patient_info']['contact_id'];\r\n\t\t\t\t\t$start_date \t= $data['unsynched_list'][$selected]['patient_info']['start_date'];\r\n\t\t\t\t\t$patient_address = $data['unsynched_list'][$selected]['patient_info']['patient_address'];\r\n\t\t\t\t\t$patient_address2 = $data['unsynched_list'][$selected]['patient_info']['patient_address2'];\r\n\t\t\t\t\t$patient_address3 = $data['unsynched_list'][$selected]['patient_info']['patient_address3'];\r\n\t\t\t\t\t$patient_town \t= $data['unsynched_list'][$selected]['patient_info']['patient_town'];\r\n\t\t\t\t\t$patient_postcode = $data['unsynched_list'][$selected]['patient_info']['patient_postcode'];\r\n\t\t\t\t\t$patient_state \t= $data['unsynched_list'][$selected]['patient_info']['patient_state'];\r\n\t\t\t\t\t$patient_country = $data['unsynched_list'][$selected]['patient_info']['patient_country'];\r\n\t\t\t\t\t$tel_home \t\t= $data['unsynched_list'][$selected]['patient_info']['tel_home'];\r\n\t\t\t\t\t$tel_office \t= $data['unsynched_list'][$selected]['patient_info']['tel_office'];\r\n\t\t\t\t\t$tel_mobile \t= $data['unsynched_list'][$selected]['patient_info']['tel_mobile'];\r\n\t\t\t\t\t$fax_no \t\t= $data['unsynched_list'][$selected]['patient_info']['fax_no'];\r\n\t\t\t\t\t$email \t\t\t= $data['unsynched_list'][$selected]['patient_info']['email'];\r\n\t\t\t\t\t$addr_village_id \t= $data['unsynched_list'][$selected]['patient_info']['addr_village_id'];\r\n\t\t\t\t\t$addr_area_id \t= $data['unsynched_list'][$selected]['patient_info']['addr_area_id'];\r\n\t\t\t\t\t$staff_id \t\t= $data['unsynched_list'][$selected]['patient_info']['staff_id'];\r\n\t\t\t\t\t$synch_out \t\t= $data['unsynched_list'][$selected]['patient_info']['synch_out'];\r\n\t\t\t\t\t$synch_remarks \t\t= $data['unsynched_list'][$selected]['patient_info']['synch_remarks'];\r\n\t\t\t\t\t$xmlstr .= \"\\n<patient_info patient_id='$patient_id'>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_id>$patient_id</patient_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_name>$patient_name</patient_name>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<name_first>$name_first</name_first>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<name_alias>$name_alias</name_alias>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<gender>$gender</gender>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<ic_no>$ic_no</ic_no>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<ic_other_type>$ic_other_type</ic_other_type>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<ic_other_no>$ic_other_no</ic_other_no>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<nationality>$nationality</nationality>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<birth_date>$birth_date</birth_date>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<clinic_reference_number>$clinic_reference_number</clinic_reference_number>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<pns_pat_id>$pns_pat_id</pns_pat_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<nhfa_no>$nhfa_no</nhfa_no>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<ethnicity>$ethnicity</ethnicity>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<religion>$religion</religion>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<marital_status>$marital_status</marital_status>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_type>$patient_type</patient_type>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<blood_group>$blood_group</blood_group>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<blood_rhesus>$blood_rhesus</blood_rhesus>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<demise_date>$demise_date</demise_date>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<demise_time>$demise_time</demise_time>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<demise_cause>$demise_cause</demise_cause>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<clinic_home>$clinic_home</clinic_home>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<clinic_registered>$clinic_registered</clinic_registered>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<status>$status</status>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<contact_id>$contact_id</contact_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<start_date>$start_date</start_date>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_address>$patient_address</patient_address>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_address2>$patient_address2</patient_address2>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_address3>$patient_address3</patient_address3>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_town>$patient_town</patient_town>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_postcode>$patient_postcode</patient_postcode>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_state>$patient_state</patient_state>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_country>$patient_country</patient_country>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<tel_home>$tel_home</tel_home>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<tel_office>$tel_office</tel_office>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<tel_mobile>$tel_mobile</tel_mobile>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<fax_no>$fax_no</fax_no>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<email>$email</email>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<addr_village_id>$addr_village_id</addr_village_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<addr_area_id>$addr_area_id</addr_area_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<staff_id>$staff_id</staff_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<synch_out>$synch_out</synch_out>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<synch_remarks>$synch_remarks</synch_remarks>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n</patient_info>\";\r\n\t\t\t\t\t$selected++;\r\n\t\t\t\t} //endif(isset($_POST['s'.$i]))\r\n\t\t\t} //endfor($i=1; $i<=$data['num_rows']; $i++)\r\n\t\t} //endif(count($_POST))\r\n\t\t$data['file_exported']\t\t=\t\"patient_demo-\".date(\"Ymd_Hi\",$data['now_id']).\".xml\";\r\n\t\t$data['xmlstr']\t\t\t\t=\t$xmlstr;\r\n\t\t$xmlstr .= \"\\n</THIRRA_export_patients>\";\r\n\t\t$xml = new SimpleXMLElement($xmlstr);\r\n\r\n\t\t//echo $xml->asXML();\r\n\t\t$write = $xml->asXML($data['export_path'].\"/\".$data['file_exported']);\r\n\r\n\t\t//echo $xml->patient_info[1]->patient_name;\r\n\t\t// ========\r\n\t\t$this->load->vars($data);\r\n\t\tif ($_SESSION['thirra_mode'] == \"ehr_mobile\"){\r\n $new_header = \"ehr/header_xhtml-mobile10\";\r\n $new_banner = \"ehr/banner_emr_wap\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_wap\";\r\n $new_body = \"ehr/emr_newpage_wap\";\r\n $new_footer = \"ehr/footer_emr_wap\";\r\n\t\t} else {\r\n //$new_header = \"ehr/header_xhtml1-strict\";\r\n $new_header = \"ehr/header_xhtml1-transitional\";\r\n $new_banner = \"ehr/banner_ehr_html\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_html\";\r\n $new_body = \"ehr/ehr_admin_export_new_patientsdone_html\";\r\n $new_footer = \"ehr/footer_emr_html\";\r\n\t\t}\r\n if($data['user_rights']['section_admin'] < 100){\r\n $new_body = \"ehr/ehr_access_denied_html\";\r\n }\r\n\t\t$this->load->view($new_header);\t\t\t\r\n\t\t$this->load->view($new_banner);\t\t\t\r\n\t\t$this->load->view($new_sidebar);\t\t\t\r\n\t\t$this->load->view($new_body);\t\t\t\r\n\t\t$this->load->view($new_footer);\t\t\t\r\n }", "public function date_range_report()\n\t{\n\t\t$this->data['crystal_report']=$this->reports_personnel_schedule_model->crystal_report_view();\n\t\t$this->data['company_list'] = $this->reports_personnel_schedule_model->company_list();\n\t\t$this->load->view('employee_portal/report_personnel/schedule/date_range_report',$this->data);\n\t}", "function GenerarReporteOficinas(){\t//consultar estudiantes registrados por municipio\t\n\n\t\t\t$html=\"\";\n\t\t\t$strsql=\"SELECT pasantias.departamento.estado, pasantias.oficina.nombre_oficina, pasantias.departamento.descripcion FROM pasantias.oficina , pasantias.departamento WHERE\n\n \t\t\t\t\toficina.id_departamento = departamento.id_departamento\";\t \n\t\t\t\t \n\t\t\t$rs=pg_query($strsql);\n\t\t\t$num=0;\n\t\t\t$num=pg_num_rows($rs);\n\t\t\n\n\n\t\t\t$html=$html.'<div align=\"center\">\n\t\t\t<h2>Reporte De Especialidades</h2>\n\t\t\t<h3>Total de registros: &nbsp; <i>'.$num.'</i></h3>\n\t\t\t\n\t\t\t<br><br>\n\t\t\t';\n\t\t\t/*$html=$html.'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \n\t\t\t<table style=\"border-spacing: 2px;\" align=\"center\" >\n\t\t\t<tr align=\"center\" bgcolor=\"#011137\" border=\"1\" style=\"color: #000000;\">\n\t\t\t\t<td width=\"100\"><font color=\"#FFFFFF\">Id</font></td>\n\t\t\t\t<td width=\"100\"><font color=\"#FFFFFF\">Nombre</font></td>\n\t\t\t\t\n\t\t\t\t</tr>';*/\n\n\n\t\t\t\t$html=$html.'<div align=\"center\">\t\t\t\n\t\t\t<table border=\"0\" bordercolor=\"#0000CC\" bordercolordark=\"#FF0000\">';\t\n\t\t\t$html=$html.'<tr bgcolor=\"#0B3861\">\n\t\t\t<td><font color=\"#FFFFFF\" size=\"10\"><b> N&oacute;mbre Oficina </b></font></td>\n\t\n\t\t\t<td><font color=\"#FFFFFF\" size=\"10\"><b> Descripción </b></font></td>\n\t\t\t<td><font color=\"#FFFFFF\" size=\"10\"><b> Estado </b></font></td>\n\t\t\t</tr>';\n\n\t\t\t\n\t\t\t\t\n\t\t\t\twhile ($row = pg_fetch_array($rs)){\n\n\t\t\t\t\n\t\t\t\tif($i%2==0){\n\t\t\t\t\t$html= $html.'<tr bgcolor=\"#58ACFA\">';\n\t\t\t\t}else{\n\t\t\t\t\t$html=$html.'<tr>';\n\t\t\t\t}\n\t\t\t\t$html = $html.'<td>';\n\t\t\t\t$html = $html. $row[\"nombre_oficina\"];\n\t\t\t\t$html = $html.'</td><td>';\n\t\t\t\t$html = $html. $row[\"descripcion\"];\n\t\t\t\t$html = $html.'</td><td>';\n\t\t\t\t$html = $html. $row[\"estado\"];\n\t\t\t\t$html = $html.'</td></tr>';\t\t\n\t\t\t\t$i++;\n\t\t\t}\t\t\t\n\t\t\t$html=$html.'</table></div>';\t\t\t\n \t\t return ($html);\n\t\t}", "function GenerarReporteOficinas(){\t//consultar estudiantes registrados por municipio\t\n\n\t\t\t$html=\"\";\n\t\t\t$strsql=\"SELECT pasantias.departamento.estado, pasantias.oficina.nombre_oficina, pasantias.departamento.descripcion FROM pasantias.oficina , pasantias.departamento WHERE\n\n \t\t\t\t\toficina.id_departamento = departamento.id_departamento\";\t \n\t\t\t\t \n\t\t\t$rs=pg_query($strsql);\n\t\t\t$num=0;\n\t\t\t$num=pg_num_rows($rs);\n\t\t\n\n\n\t\t\t$html=$html.'<div align=\"center\">\n\t\t\t<h2>Reporte De Especialidades</h2>\n\t\t\t<h3>Total de registros: &nbsp; <i>'.$num.'</i></h3>\n\t\t\t\n\t\t\t<br><br>\n\t\t\t';\n\t\t\t/*$html=$html.'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \n\t\t\t<table style=\"border-spacing: 2px;\" align=\"center\" >\n\t\t\t<tr align=\"center\" bgcolor=\"#011137\" border=\"1\" style=\"color: #000000;\">\n\t\t\t\t<td width=\"100\"><font color=\"#FFFFFF\">Id</font></td>\n\t\t\t\t<td width=\"100\"><font color=\"#FFFFFF\">Nombre</font></td>\n\t\t\t\t\n\t\t\t\t</tr>';*/\n\n\n\t\t\t\t$html=$html.'<div align=\"center\">\t\t\t\n\t\t\t<table border=\"0\" bordercolor=\"#0000CC\" bordercolordark=\"#FF0000\">';\t\n\t\t\t$html=$html.'<tr bgcolor=\"#0B3861\">\n\t\t\t<td><font color=\"#FFFFFF\" size=\"10\"><b> N&oacute;mbre Oficina </b></font></td>\n\t\n\t\t\t<td><font color=\"#FFFFFF\" size=\"10\"><b> Descripción </b></font></td>\n\t\t\t<td><font color=\"#FFFFFF\" size=\"10\"><b> Estado </b></font></td>\n\t\t\t</tr>';\n\n\t\t\t\n\t\t\t\t\n\t\t\t\twhile ($row = pg_fetch_array($rs)){\n\n\t\t\t\t\n\t\t\t\tif($i%2==0){\n\t\t\t\t\t$html= $html.'<tr bgcolor=\"#58ACFA\">';\n\t\t\t\t}else{\n\t\t\t\t\t$html=$html.'<tr>';\n\t\t\t\t}\n\t\t\t\t$html = $html.'<td>';\n\t\t\t\t$html = $html. $row[\"nombre_oficina\"];\n\t\t\t\t$html = $html.'</td><td>';\n\t\t\t\t$html = $html. $row[\"descripcion\"];\n\t\t\t\t$html = $html.'</td><td>';\n\t\t\t\t$html = $html. $row[\"estado\"];\n\t\t\t\t$html = $html.'</td></tr>';\t\t\n\t\t\t\t$i++;\n\t\t\t}\t\t\t\n\t\t\t$html=$html.'</table></div>';\t\t\t\n \t\t return ($html);\n\t\t}", "public function invoice_audit_trail_export_xls() {\n\n //Read page parameter to display report\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n $invoice_id = $this->input->get('invoice_id');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $company_id = $this->input->get('company_id');\n\n //Build required values to display invoice audit report in table format\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $tabledata = $this->reportsModel->get_invoice_audit_trail($tenant_id, $records_per_page, $offset, $field, $order_by, $payment_status, $start_date, $end_date, $invoice_id, $company_id);\n\n //EXPORT PART\n $this->load->helper('export_helper');\n $count_tabledata = count($tabledata);\n $excel_titles = array('Inv #', 'Inv Dt.', 'Inv Type', 'Taxcode', 'Discount', 'Subsidy', 'GST', 'Net Amt.', 'Prev. Inv. Number', 'Next Inv. Number');\n $excel_data = array();\n for ($i = 0; $i < $count_tabledata; $i++) {\n $paid_arr = array('PAID' => 'Paid', 'PARTPAID' => 'Part Paid', 'NOTPAID' => 'Not Paid');\n $paid_sty_arr = array('PAID' => 'color:green;', 'PARTPAID' => 'color:red;', 'NOTPAID' => 'color:red;');\n if ($tabledata[$i]->enrolment_mode == 'SELF') {\n $taxcode = $tabledata[$i]->tax_code;\n $name = $tabledata[$i]->first_name . ' ' . $tabledata[$i]->last_name;\n $status = $paid_arr[$tabledata[$i]->payment_status];\n } else {\n // Modified by dummy for internal staff enroll on 01 Dec 2014.\n if ($tabledata[$i]->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($tabledata[$i]->company_id);\n $taxcode = $tenant_details->tenant_name;\n $name = $tenant_details->tenant_name;\n } else {\n $taxcode = $tabledata[$i]->comp_regist_num;\n $name = $tabledata[$i]->company_name;\n }\n $status = ($tabledata[$i]->payment_status > 0) ? 'Part Paid/Not Paid' : 'Paid';\n }\n $inv_type1 = $tabledata[$i]->inv_type1 . ' (' . $name . ')';\n $excel_data[$i][] = $tabledata[$i]->invoice_id;\n $excel_data[$i][] = date('d/m/Y', strtotime($tabledata[$i]->inv_date));\n $excel_data[$i][] = $inv_type1;\n $excel_data[$i][] = $this->mask_format($taxcode);\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->total_inv_discnt, 2, '.', '') . ' SGD';\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->total_inv_subsdy, 2, '.', '') . ' SGD';\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->total_gst, 2, '.', '') . ' SGD';\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->total_inv_amount, 2, '.', '') . ' SGD';\n $excel_data[$i][] = $tabledata[$i]->invoice_id;\n $excel_data[$i][] = $tabledata[$i]->regen_inv_id;\n }\n if (empty($start_date) && empty($end_date)) {\n $period = ' for ' . date('F d Y, l');\n } else {\n $period = 'for the period';\n if (!empty($start_date))\n $period .= ' from ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $start_date)->getTimestamp());\n if (!empty($end_date))\n $period .= ' to ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $end_date)->getTimestamp());\n }\n $excel_filename = 'invlice_audit_list.xls';\n $excel_sheetname = 'Invoice Audit Trail';\n $excel_main_heading = 'Accounting Reports - Invoice Audit Trail' . $period;\n export_page_fields($excel_titles, $excel_data, $excel_filename, $excel_sheetname, $excel_main_heading);\n }", "public function finalreportcreate() {\n $supervisaornames = DB::select(\"SELECT name,id \n\t\t FROM panelmembers\n\t\t WHERE id = any (SELECT supervisorId \n\t\t FROM projects\n\t\t WHERE status = 'Approved')\");\n\n /* Get all group ids */\n $groupids = DB::select(\"SELECT groupID \n\t\t FROM research_groups\");\n\n /* Get all student actual id acording to the auto generated id */\n $studentid = DB::select(\"SELECT id,regId \n\t\t FROM students\n\t\t WHERE id = any (SELECT studentId \n\t\t FROM projects\n\t\t WHERE status = 'Approved')\");\n\n /* filtering projects according to the groups */\n $students = DB::select(\"SELECT id,title,studentId,supervisorId \n\t\t FROM projects\n\t\t WHERE status = 'Approved' and groupID = any (SELECT groupID \n\t\t FROM research_groups)\");\n\n $los = DB::table('settings')->first();\n\n return view('supevaluation.finalreportevaluation', compact('students', 'supervisaornames', 'studentid', 'groupids', 'los'));\n }", "function AfterEdit(&$values,$where,&$oldvalues,&$keys,$inline,&$pageObject)\n{\n\n\t\tglobal $conn;\n\n$attend_id=$values['attend_id'];\n\n//select shecdule ID from timetable\n$sql_at= \"SELECT scheduleID,courseID,date,(end_time-start_time) AS hour FROM schedule_timetable WHERE id='$attend_id'\";\n$query_at=db_query($sql_at,$conn);\n$row_at=db_fetch_array($query_at);\n\n$scheduleID=$row_at['scheduleID'];\n\n//select related schedule id from schedule\n$sql_at2= \"SELECT programID,batchID,groupID FROM schedule WHERE scheduleID='$scheduleID'\";\n$query_at2=db_query($sql_at2,$conn);\n$row_at2=db_fetch_array($query_at2);\n\n$program=$row_at2['programID'];\n$batch=$row_at2['batchID'];\n$class=$row_at2['groupID'];\n\n//update program , batch, class to student_attendance table\n$date=$row_at['date'];\n$hour=$row_at['hour'];\n$course=$row_at['courseID'];\n$id=$keys['id'];\n$sql_up= \"Update student_attendance set programID ='$program', batchID='$batch',class='$class',course='$course',date='$date',hour='$hour' where id='$id'\";\n$query_up=db_exec($sql_up,$conn);\n\n//query the total hour for this module\n$sql_th= \"SELECT total_hour FROM program_course WHERE programID='$program' && CourseID=$course\";\n$query_th=db_query($sql_th,$conn);\n$row_th=db_fetch_array($query_th);\n\n$totalhour=$row_th['total_hour'];\n//the percentage wight of absentee ( $hour/$totalhour)\n$weight_absent=($hour/$totalhour*100);\n\n//query current attendance status for this student, program , module\n$studentID=$values['StudentID'];\n$sql_at3=\"SELECT Attendance FROM student_course WHERE StudentID=$studentID AND programID=$program AND CourseID=$course\";\n$query_at3=db_query($sql_at3,$conn);\n$row_at3=db_fetch_array($query_at3);\n\n$current_attendance=$row_at3['Attendance'];\n//update student_course attendance\n\n$net_attendance=$current_attendance-$weight_absent;\n\n$sql_ups= \"Update student_course SET Attendance='$net_attendance' where StudentID='$studentID' && programID='$program' && CourseID=$course\";\n$query_ups=db_exec($sql_ups,$conn);\n;\t\t\n}", "public function actionCollectorReport() {\n /*Get result using model method*/\n $result = [\n ['a', 'b', 'c',],\n [1, 2, 3,],\n ];\n\n $fileName = 'debtorList' . date('Y-m-d');\n $this->createCSV($result, $fileName);\n\n //$subscribers = Subscriber::getSubscribers('collector');\n //$this->actionSendReport($fileName, $subscribers);\n\n }", "public function reportPeriodicStudentPresentListView(Request $request)\n {\n $year = trim($request->year) ;\n $shift = trim($request->shift);\n $dept = trim($request->dept);\n $semister = trim($request->semister);\n $section = trim($request->section);\n $date_form = trim($request->from); \n $from = date (\"Y-m-d\", strtotime($date_form));\n $date_to = trim($request->to); \n $date_too = trim($request->to);\n $to = date (\"Y-m-d\", strtotime($date_to));\n $sorting_type = trim($request->sorting_type);\n $attendent_days = trim($request->attendent_days);\n\n $count_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereBetween('holiday_date', [$from, $to])->count();\n // total day caluclation\n $date1 = date_create($from);\n $date2 = date_create($to);\n //difference between two dates\n $diff = date_diff($date1,$date2);\n $total_day = $diff->format(\"%a\")+1;\n if($sorting_type == '1'){\n $result = DB::table('student_attendent')\n ->join('students','student_attendent.studentId','=','students.id')\n ->join('student','students.id','=','student.studentID')\n ->select('student_attendent.*','student.roll','student.registration', DB::raw(\"COUNT( DISTINCT student_attendent.created_at) AS count\"))\n ->where('student_attendent.year',$year)\n ->where('student_attendent.shift_id',$shift)\n ->where('student_attendent.dept_id',$dept)\n ->where('student_attendent.semister_id',$semister)\n ->where('student_attendent.section_id',$section)\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereBetween('student_attendent.created_at', [$from, $to])\n ->groupBy('student_attendent.studentId')\n ->orderBy('student_attendent.studentId','ASC')\n ->get();\n }elseif($sorting_type == '2'){\n $result = DB::table('student_attendent')\n ->join('students','student_attendent.studentId','=','students.id')\n ->join('student','students.id','=','student.studentID')\n ->select('student_attendent.*','student.roll','student.registration', DB::raw(\"COUNT( DISTINCT student_attendent.created_at) AS count\"))\n ->where('student_attendent.year',$year)\n ->where('student_attendent.shift_id',$shift)\n ->where('student_attendent.dept_id',$dept)\n ->where('student_attendent.semister_id',$semister)\n ->where('student_attendent.section_id',$section)\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereBetween('student_attendent.created_at', [$from, $to])\n ->groupBy('student_attendent.studentId')\n ->orderBy('count','DESC')\n ->orderBy('student_attendent.studentId','ASC')\n ->get();\n }elseif($sorting_type == '3'){\n $result = DB::table('student_attendent')\n ->join('students','student_attendent.studentId','=','students.id')\n ->join('student','students.id','=','student.studentID')\n ->select('student_attendent.*','student.roll','student.registration', DB::raw(\"COUNT( DISTINCT student_attendent.created_at) AS count\"))\n ->where('student_attendent.year',$year)\n ->where('student_attendent.shift_id',$shift)\n ->where('student_attendent.dept_id',$dept)\n ->where('student_attendent.semister_id',$semister)\n ->where('student_attendent.section_id',$section)\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereBetween('student_attendent.created_at', [$from, $to])\n ->groupBy('student_attendent.studentId')\n ->orderBy('count','DESC')\n ->orderBy('student_attendent.studentId','ASC')\n ->get();\n }\n\n foreach($result as $value) {\n //do something\n $attentdent_id[] = $value->studentId;\n}\n$absent_result = DB::table('students')\n ->join('student', 'students.id', '=', 'student.studentID')\n ->select('student.*', 'students.studentName','students.studentMobile','students.studentImage','student.registration')\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereNotIn('student.studentID',$attentdent_id)\n ->orderBy('student.roll','asc')\n ->get();\n\n $shift_name = DB::table('shift')->where('id',$shift)->first();\n $dept_name = DB::table('department')->where('id',$dept)->first();\n $semister_name = DB::table('semister')->where('id',$semister)->first();\n $section_name = DB::table('section')->where('id',$section)->first();\n return view('view_report.reportPeriodicStudentPresentListView')->with('result',$result)->with('count_holiday',$count_holiday)->with('total_day',$total_day)->with('from',$from)->with('to',$to)->with('year',$year)->with('shift_name',$shift_name)->with('dept_name',$dept_name)->with('semister_name',$semister_name)->with('section_name',$section_name)->with('shift',$shift)->with('dept',$dept)->with('semister',$semister)->with('section',$section)->with('date_form',$date_form)->with('date_to',$date_to)->with('absent_result',$absent_result)->with('attendent_days',$attendent_days)->with('sorting_type',$sorting_type); \n\n\n\n }", "public function export_company_generate_invoice($id) \n {\n $tenant_id = $this->tenant_id;\n \n if (empty($id)) \n {\n return show_404();\n }\n// $result = $this->classtraineemodel->get_enroll_invoice($id);\n \n $result = $this->classtraineemodel->get_company_enroll_invoice($id);\n //added by pritam to generate previous invoice number\n $result->previous_inv_id = $this->classtraineemodel->get_enroll_prev_invoice($result->invoice_id);\n \n //sk st\n $discount = $this->classtraineemodel->get_discount($result->pymnt_due_id);\n $result->discount_label = $discount->discount_type;\n $result->discount_rate = $discount->discount_rate;\n //sk ed\n \n //\n $result->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($result->tenant_state), ', ');\n $result->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($result->tenant_country), ', ');\n $result->inv_year = date('Y', strtotime($result->inv_date));\n $result->inv_date = date('d/m/Y', strtotime($result->inv_date));\n $result->discount_label = rtrim($this->course->get_metadata_on_parameter_id($result->discount_type), ', ');\n if ($result->total_gst) {\n $result->gst_label = 'GST ON, ' . rtrim($this->course->get_metadata_on_parameter_id($result->gst_rule), ', ');\n } else {\n $result->gst_label = 'GST OFF';\n }\n $course_manager = $this->course->get_managers($courses->crse_manager);\n $length = stripos($course_manager, ', ');\n $result->course_manager = (!empty($length)) ? substr($course_manager, 0, $length) : $course_manager;\n if ($result->company_id[0] == 'T') {\n $result->company_name = $result->tenant_name;\n $result->company_details->comp_state = $result->tenant_state;\n $result->company_details->comp_cntry = $result->tenant_country;\n $result->company_details->comp_phone = $result->tenant_contact_num;\n $result->company_details->comp_address = $result->tenant_address;\n \n $company_person = $this->company->get_company_user($result->tenant_id, $result->company_id);//sk1\n $result->company_person_name = $company_person[0]->first_name;//sk2\n \n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $result->company_id);\n $result->company_details = $company_details[0];\n $result->company_details->comp_state = rtrim($this->course->get_metadata_on_parameter_id($result->company_details->comp_state), ', ');\n $result->company_details->comp_cntry = rtrim($this->course->get_metadata_on_parameter_id($result->company_details->comp_cntry), ', ');\n\n $result->company_name = $company_details[0]->company_name;\n \n $company_person = $this->company->get_company_user($this->tenant_id, $result->company_id);//skm1\n $result->company_person_name = $company_person[0]->first_name;//skm2\n \n }\n\n $result->total_inv_discnt = round($result->total_inv_discnt, 2);\n $result->total_unit_fees = round($result->total_unit_fees, 2);\n $result->total_inv_subsdy = round($result->total_inv_subsdy, 2);\n $result->gst_rate = round($result->gst_rate, 2);\n\n $result->indi_disc_total = ($result->class_fees * ($result->discount_rate / 100));\n\n $feesdue = $result->total_unit_fees - $result->total_inv_discnt;\n $result->payment_due_details = $this->classtraineemodel->get_company_payment_due_details($id);\n \n $company_received = $this->classtraineemodel->company_payment_recd($result->invoice_id);\n $user_paid = array();\n foreach ($company_received as $k => $v) {\n $user_paid[$v->user_id] = round($v->amount_recd,2);\n }\n $company_refunded = $this->classtraineemodel->company_payment_refund($result->invoice_id);\n $user_refund = array();\n foreach ($company_refunded as $k => $v) {\n $user_refund[$v->user_id] = round($v->refund_amount,2);\n }\n foreach($result->payment_due_details as $key=>$val)\n {\n $received = empty($user_paid[$val->user_id]) ? 0 : $user_paid[$val->user_id];\n $refunded = empty($user_refund[$val->user_id]) ? 0 : $user_refund[$val->user_id];\n $inv_amt+=$val->total_amount_due;\n $received_amt+=$received;\n $refunded_amt+=$refunded;\n if((($val->total_amount_due + $refunded) - $received) <= 0)\n {\n $payment_label = 'PAID';\n }\n else\n { \n \n if($received > 0 && $val->payment_status == 'PARTPAID')\n {\n $payment_label = 'PART PAID';\n \n }else if($refunded > 0)\n { \n $payment_label = 'REFUNDED'; \n } \n else\n { \n if($received == 0)\n {\n $payment_label = 'NOT PAID';\n }\n else if($received > 0)\n {\n $payment_label = 'PART PAID';\n }\n }\n }\n $result->payment_due_details[$key]->payment_label = $payment_label;\n }\n \n $payable_amount=$inv_amt-$received_amt; \n $result->payble_amount=$inv_amt+$refunded_amt-$received_amt;\n\n $this->load->helper('pdf_reports_helper');\n if($tenant_id =='T17'){\n generate_company_pdf_invoice_everest($result);\n }else{\n generate_company_pdf_invoice_all($result);\n }\n \n }", "public function ctrreports()\n {\n //\n $productname = Input::get('productname');\n\t \t$start_date = Input::get('start_date');\n\t\t$end_date = Input::get('end_date');\n\t $product=m_product::where('product_name',$productname)->first();\n\t \n\t \t \n $contracts=t_contract::where('product_id',$product->id)\n\t ->where('pay_date','>',$start_date)\n\t ->where('pay_date','<=',$end_date)->get();\n\t\t$productname='本周'.$productname;\t\t\t\t \n\t if($contracts->count())\n\t {\n\t \t \n\t \t$filename=$product->product_name . time();\n\t \\Excel::create($filename, function($excel) use ($productname, $contracts) {\n $excel->sheet('New sheet', function($sheet) use ($productname, $contracts) {\n $sheet->loadView('ctrreports') \n ->withProductname($productname)\n\t ->withContracts($contracts);\n\n });\n\n })->download('xls'); \n\t\t }\n\t else {\n\t\t\t\n\t\t\treturn Redirect::back()->withInput()->withErrors('本时间段此产品下无合同产生');\n\t }\n\t \n\t \n\t \n \n }", "public function dispAttendence ($class_id,$stud_id)\n\t{\n\t\t\t$year_id = $this->getYear();\n\n\t\t\t$total_days_query = \"SELECT * FROM `edu_attendence` WHERE ac_year='$year_id' AND class_id='$class_id'\";\n\t\t\t$total_days_res = $this->db->query($total_days_query);\n\t\t\t$total_days_result= $total_days_res->result();\n\t\t\t$total_days_count = $total_days_res->num_rows();\n\n\t\t\tif($total_days_res->num_rows()==0){\n\t\t\t\t $response = array(\"status\" => \"error\", \"msg\" => \"Attendance not yet taken!\");\n\t\t\t}else{\n\t\t\t // $total_days = $total_days_count/2;\n\t\t\t $total_days = $total_days_count;\n\n\t\t\t foreach($total_days_result as $rows){\n \t\t\t\t$at_id = $rows->at_id;\n\t\t\t }\n\n \t\t\t$absent_query = \"SELECT * FROM `edu_attendance_history` WHERE class_id='$class_id' AND student_id='$stud_id' AND a_status = 'A' \";\n \t\t\t$absent_res = $this->db->query($absent_query);\n \t\t\t$absent_result= $absent_res->result();\n \t\t\t$absent_count = $absent_res->num_rows();\n\n \t\t\tif($absent_res->num_rows()>0){\n \t\t\t\t//$absent_days = $absent_count/2;\n \t\t\t\t$absent_days = $absent_count;\n \t\t\t} else {\n \t\t\t $absent_days = 0;\n \t\t\t}\n\n \t\t\t$leave_query = \"SELECT * FROM `edu_attendance_history` WHERE class_id='$class_id' AND student_id='$stud_id' AND a_status = 'L' \";\n \t\t\t$leave_res = $this->db->query($leave_query);\n \t\t\t$leave_result= $leave_res->result();\n \t\t\t$leave_count = $leave_res->num_rows();\n\n \t\t\tif($leave_res->num_rows()>0){\n \t\t\t\t //$leave_days = $leave_count/2;\n \t\t\t\t $leave_days = $leave_count;\n \t\t\t} else {\n \t\t\t $leave_days = 0;\n \t\t\t}\n\n \t\t\t$od_query = \"SELECT * FROM `edu_attendance_history` WHERE class_id='$class_id' AND student_id='$stud_id' AND a_status = 'OD' \";\n \t\t\t$od_res = $this->db->query($od_query);\n \t\t\t$od_result= $od_res->result();\n \t\t\t$od_count = $od_res->num_rows();\n\n \t\t\tif($od_res->num_rows()>0){\n \t\t\t\t //$od_days = $od_count/2;\n \t\t\t\t $od_days = $od_count;\n \t\t\t} else {\n \t\t\t $od_days = 0;\n \t\t\t}\n\t\t\t $total_leave = $absent_days+$leave_days+$od_days;\n\t\t\t $present_days = $total_days-$total_leave;\n\n\t\t\t \t$attendence_history = array(\"total_working_days\"=>$total_days, \"absent_days\"=>$absent_days, \"leave_days\"=>$leave_days, \"od_days\"=>$od_days, \"present_days\"=>$present_days);\n\n \t\t\t$attend_query = \"SELECT\n COUNT(B.abs_date) AS abs_count,\n A.at_id,\n B.student_id,\n B.abs_date,\n B.a_status\n FROM\n edu_attendence A,\n edu_attendance_history B\n WHERE\n A.ac_year = '$year_id' AND B.class_id = '$class_id' AND B.student_id = '$stud_id' AND B.attend_id = A.at_id\n GROUP BY\n B.abs_date\";\n \t\t\t$attend_res = $this->db->query($attend_query);\n \t\t\t$attend_result= $attend_res->result();\n \t\t\t$attend_count = $attend_res->num_rows();\n\n \t\t\t if($attend_res->num_rows()==0){\n \t\t\t\t $response = array(\"status\" => \"success\", \"msg\" => \"View Attendence\",\"attendenceHistory\"=>$attendence_history, \"attendenceDetails\"=>$attend_result);\n \t\t\t}else{\n \t\t\t\t$response = array(\"status\" => \"success\", \"msg\" => \"View Attendence\",\"attendenceHistory\"=>$attendence_history, \"attendenceDetails\"=>$attend_result);\n \t\t\t}\n\t\t\t}\n\t\t\treturn $response;\n\t}", "public function reportMonthlyClassWiseAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportMonthlyClassWiseAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "public function actionReporting() {\n $result = array();\n $result['TOTAL_RAISED'] = $this->query(\"SELECT SUM(amount) as count from user_fund_project where status='SUCCESS'\");\n $result['SUCCESSFULLY_FUNDED_CAMPAIGNS'] = $this->query(\"SELECT COUNT(*) as count from project where project_status='success' \");\n $result['CAMPAIGNS_LOVED'] = $this->query(\" SELECT COUNT(distinct project_id) FROM user_love_project\");\n $result['TOTAL_BACKERS'] = $this->query(\" SELECT COUNT(distinct user_id) FROM user_fund_project where status='SUCCESS'\");\n $result['REPEAT_BACKERS'] = $this->query(\" select count(count) as total from (select count(*) as count from user_fund_project where status='success' group by user_id having( count)>1) as a\");\n $result['TOTAL_PLEDGES'] = $this->query(\" SELECT COUNT(*) FROM reward \");\n $result['AVERAGE_PLEDGE_VALUE'] = $this->query(\" SELECT AVG(amount) FROM user_fund_project where status='SUCCESS'\");\n $result['TOTAL_LAUNCHED'] = $this->query(\" SELECT COUNT(*) FROM project WHERE publish_status = 'published' \");\n $result['UNSUCCESSFUL'] = $this->query(\" SELECT COUNT(*) FROM project WHERE project_status = 'failed' \");\n $result['DRAFT'] = $this->query(\" SELECT COUNT(*) FROM project WHERE publish_status = 'draft' \");\n $result['FIXED'] = $this->query(\" SELECT COUNT(*) FROM project WHERE funding_type = 'fixed' \");\n $result['FLEXIBLE'] = $this->query(\" SELECT COUNT(*) FROM project WHERE funding_type = 'flexible' \");\n $result['NO_OF_MEMBERS'] = $this->query(\" SELECT COUNT(*) FROM tribes \");\n $result['ACTIVE_MEMBERS'] = $this->query(\" SELECT COUNT(*) FROM tribes where status = 'ACTIVE' \");\n $result['NO_OF_ABANDONED_CART'] = $this->query(\" SELECT COUNT(*) FROM user_fund_project where status='FAILED'\");\n \n// CHART DATA\n $total_projects = (int)$this->query(\" select count(*) from project \");\n $success_projects = (int)$this->query(\" select count(*) from project where project_status = 'success' \"); \n $result['SUCCESS_FUND_RATE'] =(int)(($success_projects/$total_projects)*100) ; \n $result['FIXED_VS_FLEXIBLE'] = (int)(($result['FIXED']/$result['FLEXIBLE'])*100);\n \n \n $result['MOST_FUNDED_PROJECTS'] = $this->query(\" select SUM(x.amount) as funded,x.project_id,y.title as project \n from user_fund_project as x \n join project as y\n on x.project_id = y.id\n group by x.project_id order by funded desc limit 0,5\",FALSE,TRUE);\n \n $result['MOST_FUNDED_CATEGORIES'] = $this->query(\"select SUM(x.amount) as funded,z.category_id,z.name as category from user_fund_project as x \n join project as y\n on x.project_id = y.id\n join category as z \n on z.category_id = y.category\n group by z.category_id order by funded desc limit 0,5\",FALSE,TRUE);\n \n $result['MOST_POPULAR_REWARD_TYPES'] = $this->query(\"select SUM(x.amount) as funded,y.id,y.reward_types as reward_type from user_fund_project as x \n join reward as y\n on x.reward_id = y.id\n group by y.reward_types order by funded desc limit 0,5\",FALSE,TRUE);\n \n \n// LAST ROW\n $result['TOP_PROJECT_LOCATIONS'] = $this->query(\" select count(*) as locations,city from project where project_status ='success' group by city order by locations desc\",FALSE,TRUE);\n $result['TOP_FUNDING_LOCATION'] = $this->query(\"select SUM(x.amount) as funded,y.id as city_id,y.city as city from user_fund_project as x \n join project as y\n on x.project_id = y.id\n group by y.city order by funded desc\",FALSE,TRUE);\n \n \n //pass array to front end \n $params =array(\n 'reportData'=>$result,\n );\n \n //render page \n $this->render('reporting',$params);\n }", "public function actionScript($startdate = \"2016-12-01\",$enddate = \"2016-12-31\")\n {\n\t\tif(!strtotime($startdate)||!strtotime($enddate)){\n\t\t\t\n\t\t\techo \"日期错误\";\n\t\t\texit;\n\t\t}\n\t\tignore_user_abort(true);\n\t\t$data = \\app\\models\\AttendanceCheckinView::find()->where([\"and\",['>=', 'signdate', $startdate],['<=', 'signdate', $enddate]])->asArray()->all();//->andWhere(\"personnel_id != 0\")\n\t\t$Personnels = \\app\\models\\Personnel::find()->where([\"validflag\"=>\"1\",\"checkin\"=>\"1\"])->asArray()->all();\n\t\t// var_dump($data);exit;\n\t\t// echo \"<pre>\";\n\t\t$result = \\yii\\helpers\\ArrayHelper::index($data, \"personnel_id\", 'signdate');\n\t\t// echo \"<pre>\";\n\t\t// print_r($Personnels);\n\t\t// print_r($result);\n\t\t// exit;\n\t\t// echo date('w');exit;\n\t\t$startdateInt = strtotime($startdate);\n\t\t$enddateInt = strtotime($enddate);\n\t\t$weekArr=[\"0\"=>\"星期日\",\"1\"=>\"星期一\",\"2\"=>\"星期二\",\"3\"=>\"星期三\",\"4\"=>\"星期四\",\"5\"=>\"星期五\",\"6\"=>\"星期六\"];\n\t\tfor($time = $startdateInt;$time<=$enddateInt;$time+=86400){\n\t\t\t// var_dump(date(\"Y-m-d\",$time));\n\t\t\t// echo $time;\n\t\t\t// echo \"<hr/>\";\n\t\t\t// echo $time+86400;\n\t\t\t$Leaves = \\app\\models\\AttendanceLeave::find()->where([\"and\",['>=', 'leaveend', $time],['<', 'leavestart', $time+86400]])->asArray()->all();\n\t\t\t$LeavesDatas = \\yii\\helpers\\ArrayHelper::index($Leaves, \"id\",\"personnel_id\");\n\t\t\t\n\t\t\t$Overtimes = \\app\\models\\AttendanceOvertime::find()->where([\"and\",['>=', 'overtimestart', $time],['<', 'overtimestart', $time+86400]])->asArray()->all();\n\t\t\t$OvertimesDatas = \\yii\\helpers\\ArrayHelper::index($Overtimes, \"id\",\"personnel_id\");\n\t\t \n\t\t\t\n\t\t\t$goouts = \\app\\models\\AttendanceGoout::find()->where([\"gooutdate\"=>date(\"Y-m-d\",$time)])->asArray()->all();\n\t\t\t$gooutDatas = \\yii\\helpers\\ArrayHelper::index($goouts, \"id\",\"personnel_id\");\n\t\t\t\n\t\t\t\n\t\t\t// var_dump($goouts);\n\t\t\t// var_dump($gooutDatas);\n\t\t\t// continue;\n\t\t\t// exit;\n\t\t\t\n\t\t\t$curYear = date(\"Y\",$time);\n\t\t\t$curMonth = date(\"m\",$time);\n\t\t\t$curDate = date(\"Y-m-d\",$time);\n\t\t\t$curDayofWeekKey = date(\"w\",$time);\n\t\t\t$curDayofWeek = $weekArr[$curDayofWeekKey];\n\t\t\tforeach($Personnels as $personnel){\n\t\t\t\t$model =\\app\\models\\AttendanceCheckinReports::find()->where([\"personnel_id\"=>$personnel[\"id\"],\"signdate\"=>$curDate])->one()?:new \\app\\models\\AttendanceCheckinReports();\n\t\t\t\t// var_dump($model);exit;\n\t\t\t\t$model->personnel_id = $personnel['id'];\n\t\t\t\t$model->employeeid = $personnel['employeeid'];\n\t\t\t\t$model->username = $personnel['name'];\n\t\t\t\t$model->signdate = $curDate;\n\t\t\t\t$model->year = $curYear;\n\t\t\t\t$model->month = $curMonth;\n\t\t\t\t$model->dayofweekkey = $curDayofWeekKey;\n\t\t\t\t$model->dayofweek = $curDayofWeek;\n\t\t\t\t\n\t\t\t\t//考勤记录\n\t\t\t\tif(isset($result[$curDate])&&isset($result[$curDate][$personnel['id']])){\n\t\t\t\t\t$userSign= $result[$curDate][$personnel['id']];\n\t\t\t\t\t// var_dump($userSign);exit;\n\t\t\t\t\t$model->signstatus = $userSign[\"daytype\"];\n\t\t\t\t\tif($userSign[\"daytype\"]==\"迟到补齐\"&&$model->signstatus_valid==''){\n\t\t\t\t\t\t$model->signstatus_valid ='迟到';\n\t\t\t\t\t}\n\t\t\t\t\t$model->latetime = $userSign[\"uplate\"]>0?$userSign[\"uplate\"]:0;\n\t\t\t\t\t$model->overtime = $userSign[\"downlate\"]>0?floor($userSign[\"downlate\"]/30)*0.5:0;\n\t\t\t\t\t$model->timediff = $userSign[\"timediff\"]?:0;\n\t\t\t\t\t$model->signtime1 = $userSign[\"upsigntime\"]?date(\"Y-m-d H:i:s\",$userSign[\"upsigntime\"]):'0000-00-00 00:00:00';\n\t\t\t\t\t$model->signtime2 = $userSign[\"downsigntime\"]?date(\"Y-m-d H:i:s\",$userSign[\"downsigntime\"]):'0000-00-00 00:00:00';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//请假记录\n\t\t\t\tif(isset($LeavesDatas[$personnel['id']])){\n\t\t\t\t\t$userLeaves= $LeavesDatas[$personnel['id']];\n\t\t\t\t\t$leaveids=\"\";\n\t\t\t\t\t$leavehour=0;\n\t\t\t\t\t$leavememo=\"\";\n\t\t\t\t\tforeach($userLeaves as $leaveid => $leave){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$timeE = min(strtotime($curDate.\" 18:00:00\"),$leave[\"leaveend\"]);\n\t\t\t\t\t\t$timeS = max(strtotime($curDate.\" 09:00:00\"),$leave[\"leavestart\"]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$difftime=$timeE-$timeS;\n\t\t\t\t\t\t// echo date(\"Y-m-d H:i:s\",$timeS);\n\t\t\t\t\t\t// echo date(\"Y-m-d H:i:s\",$timeE);\n\t\t\t\t\t\t// var_dump($difftime);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$timeAM = strtotime($curDate.\" 12:00:00\");\n\t\t\t\t\t\t$timePM = strtotime($curDate.\" 13:00:00\");\n\t\t\t\t\t\tif($timeS<=$timeAM&&$timeE>=$timePM){\n\t\t\t\t\t\t\t$difftime-=3600;\n\t\t\t\t\t\t}elseif($timeS<=$timeAM&&$timeE>=$timeAM){\n\t\t\t\t\t\t\t$difftime-=($timeE-$timeAM);\n\t\t\t\t\t\t}elseif($timeS<=$timePM&&$timeE>=$timePM){\n\t\t\t\t\t\t\t$difftime-=($timePM-$timeS);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$totalhour =$difftime>0?floor($difftime/60/30)*0.5:0;\n\t\t\t\t\t\t$leaveids.=$leaveids?(\",\". $leave[\"id\"]):$leave[\"id\"];\n\t\t\t\t\t\t$leavehour += $totalhour;\n\t\t\t\t\t\t$leavememo .= $leavememo?\"||,||\":\"\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$leavememo .= \"id:\".$leave[\"id\"].\"\\n时长:\".date(\"Y-m-d H:i\",$timeS).\"~\".date(\"Y-m-d H:i\",$timeE).\"(\".$totalhour.\"小时)\\n说明:\".$leave[\"description\"];\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t$model->leaveids = $leaveids;\n\t\t\t\t\t$model->leavehour = $leavehour;\n\t\t\t\t\t$model->leavememo = $leavememo;\n\t\t\t\t}else{\n\t\t\t\t\t$model->leaveids = \"\";\n\t\t\t\t\t$model->leavehour = 0;\n\t\t\t\t\t$model->leavememo = \"\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//加班记录\n\t\t\t\tif(isset($OvertimesDatas[$personnel['id']])){\n\t\t\t\t\t$userOvertimes= $OvertimesDatas[$personnel['id']];\n\t\t\t\t\t$overtimeids=\"\";\n\t\t\t\t\t$overtimehour=0;\n\t\t\t\t\t$overtimememo=\"\";\n\t\t\t\t\tforeach($userOvertimes as $overtimeid => $overtime){\n\t\t\t\t\t\t$overtimeids.=$overtimeids?(\",\". $overtime[\"id\"]):$overtime[\"id\"];\n\t\t\t\t\t\t$overtimehour += $overtime[\"totalhour\"];\n\t\t\t\t\t\t$overtimememo .= $overtimememo?\"||,||\":\"\";\n\t\t\t\t\t\t$overtimememo .= \"id:\".$overtime[\"id\"].\"\\n时长:\".date(\"Y-m-d H:i\",$overtime['overtimestart']).\"~\".date(\"Y-m-d H:i\",$overtime['overtimeend']).\"(\".$overtime[\"totalhour\"].\"小时)\\n说明:\".$overtime[\"description\"];\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t$model->overtimeids = $overtimeids;\n\t\t\t\t\t$model->overtimehour = $overtimehour;\n\t\t\t\t\t$model->overtimememo = $overtimememo;\n\t\t\t\t}else{\n\t\t\t\t\t$model->overtimeids = '';\n\t\t\t\t\t$model->overtimehour = 0;\n\t\t\t\t\t$model->overtimememo = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//外出记录\n\t\t\t\tif(isset($gooutDatas[$personnel['id']])){\n\t\t\t\t\t$userGoout= $gooutDatas[$personnel['id']];\n\t\t\t\t\t$gooutids=\"\";\n\t\t\t\t\t$goouthour=0;\n\t\t\t\t\t$gooutmemo=\"\";\n\t\t\t\t\tforeach($userGoout as $gooutid => $goout){\n\t\t\t\t\t\t$gooutids.=$gooutids?(\",\". $goout[\"id\"]):$goout[\"id\"];\n\t\t\t\t\t\t$goouthour += $goout[\"totalhour\"];\n\t\t\t\t\t\t$gooutmemo .= $gooutmemo?\"||,||\":\"\";\n\t\t\t\t\t\t$gooutmemo .= \"id:\".$goout[\"id\"].\"\\n时长:\".\"(\".$overtime[\"totalhour\"].\"小时)\\n说明:\".$overtime[\"description\"];\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t$model->gooutids = $gooutids;\n\t\t\t\t\t$model->goouthour = $goouthour;\n\t\t\t\t\t$model->gooutmemo = $gooutmemo;\n\t\t\t\t}else{\n\t\t\t\t\t$model->gooutids = '';\n\t\t\t\t\t$model->goouthour = 0;\n\t\t\t\t\t$model->gooutmemo = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($model->save()){\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tvar_dump($model->errors);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\techo \"从\",$startdate,\"到\",$enddate,\"考勤脚本执行完毕!\";\n }", "function report( $data = array() ) {\n\n/* ... data declarations */\n $teamID = \"\";\n $data['tournDetails'] = array();\n\n/* ... ensure user is properly logged in to the site */\n if (!$this->Model_Account->amILoggedIn()) {\n redirect( \"mainpage/notLoggedIn\", \"refresh\" );\n }\n\n/* ... determine their team affiliation and get the games their team are involved in */\n $data['scheduleHeader'] = \"\";\n if (array_key_exists( 'TeamID', $_SESSION )) {\n $data['scheduleHeader'] = \"Playoff Schedule For \".htmlspecialchars( $this->Model_Team->getTeamName( $_SESSION['TeamID'] ) );\n $teamID = $_SESSION['TeamID'];\n $data['tournDetails'] = $this->Model_Tournament->getTeamSchedule( $teamID );\n }\n \n/* ... define values for template variables to display on page */\n $data['title'] = \"Reporting Playoff Scores - \".$this->config->item( 'siteName' );\n\n/* ... set the name of the page to be displayed */\n $data['main'] = \"schedule/sched_tournScores\";\n\n/* ... set the variable that controls whether we display the form go get the results of a game */\n if (!array_key_exists( 'showResultsForm', $data )) {\n $data['showResultsForm'] = false;\n }\n\n/* ... determine which view for the small left hand contextual navigation menu */\n if (array_key_exists( 'UserId', $_SESSION )) {\n $data['contextNav'] = \"loggedIn\";\n }\n else {\n $data['contextNav'] = \"loggedOut\";\n }\n\n/* ... enable our template variables and then display the template, as we want it shown */ \n $this->load->vars( $data );\n $this->load->view( \"template\" );\n\n/* ... time to go */\n return;\n }", "public function reportStudentDoorAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportStudentDoorAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister); \n }", "function export_report()\n {\n // load csv generator library\n $this->load->library('csvgenerator');\n \n // get current session data \n $session_data = $this->session->userdata('logged_in');\n\n // get filter criteria from post input\n $data = array(\n 'risk_register' => $this->input->post('risk_register'),\n 'user_id' => $this->input->post('general_user'),\n 'project_id' => $session_data['report_project_id']\n );\n\n if ($session_data['role_id'] == 8)\n {\n // get assigned risk register and its ID\n $register_row = $this->project_model->getAssignedRiskRegisterName($data['user_id']);\n $assigned_register_id = $register_row->subproject_id;\n $this->csvgenerator->fetch_data( $user_id, $main_category, $risk_level, $risk_register, $assigned_register_id );\n }\n else\n {\n if($this->csvgenerator->fetch_response_data($data))\n {\n redirect('dashboard/report_response/generate'); \n }\n else\n {\n // error\n $this->session->set_flashdata('negative_msg','Sorry. No report or data for the selected data filter!');\n redirect('dashboard/reports/response_project');\n }\n } \n }", "public function dormitoryReport() {\n $data['dormitory'] = $this->common->getAllData('dormitory');\n $data['dormitoryRoom'] = $this->common->getAllData('dormitory_room');\n $data['dormitory_bed'] = $this->common->getAllData('dormitory_bed');\n $this->load->view('temp/header');\n $this->load->view('dormitoryReport', $data);\n $this->load->view('temp/footer');\n }", "public function generate()\n {\n $start_year = $this->_vars['start_year'];\n $start_month = $this->_vars['start_month'];\n $start_day = $this->_vars['start_day'];\n\n $end_year = $this->_vars['end_year'];\n $end_month = $this->_vars['end_month'];\n $end_day = $this->_vars['end_day'];\n\n $code = '';\n\n if (empty($this->_vars['start']) || empty($this->_vars['end'])) {\n return $this->_vacationCode();\n } elseif ($end_year > $start_year + 1) {\n $code .= $this->_yearCheck($start_year + 1, $end_year - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\"\n . $this->_yearCheck($start_year, $start_year);\n if ($start_month < 12) {\n $code .= $this->_monthCheck($start_month + 1, 12)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, 31)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\\n\"\n . $this->_yearCheck($end_year, $end_year);\n if ($end_month > 1) {\n $code .= $this->_monthCheck(1, $end_month - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($end_month, $end_month)\n . $this->_dayCheck(1, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\";\n } elseif ($end_year == $start_year + 1) {\n $code .= $this->_yearCheck($start_year, $start_year);\n if ($start_month < 12) {\n $code .= $this->_monthCheck($start_month + 1, 12)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, 31)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\\n\"\n . $this->_yearCheck($end_year, $end_year);\n if ($end_month > 1) {\n $code .= $this->_monthCheck(1, $end_month - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($end_month, $end_month)\n . $this->_dayCheck(1, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\";\n } elseif ($end_year == $start_year) {\n $code .= $this->_yearCheck($start_year, $start_year);\n if ($end_month > $start_month) {\n if ($end_month > $start_month + 1) {\n $code .= $this->_monthCheck($start_month + 1, $end_month - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, 31)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n\"\n . $this->_monthCheck($end_month, $end_month)\n . $this->_dayCheck(1, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n\";\n } elseif ($end_month == $start_month) {\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n\";\n }\n $code .= \"}\";\n }\n\n return $code;\n }", "public function exportAction(Request $request) {\n $resource = $this->findOr404($request);\n $details = $resource->getDetails();\n $summary = $resource->getSummary();\n\n $categoryArrangementProgram = (string) $resource->getCategoryArrangementProgram();\n $tacticalObjective = (string) $resource->getTacticalObjective();\n $operationalObjective = (string) $resource->getOperationalObjective();\n\n $styleArrayBordersContent = array(\n 'borders' => array(\n 'allborders' => array(\n 'style' => \\PHPExcel_Style_Border::BORDER_THIN\n )\n ),\n 'font' => array(\n 'bold' => false\n ),\n 'alignment' => array(\n 'horizontal' => \\PHPExcel_Style_Alignment::HORIZONTAL_GENERAL,\n 'vertical' => \\PHPExcel_Style_Alignment::VERTICAL_CENTER,\n 'wrap' => true\n )\n );\n\n $location = '';\n if ($resource->getType() == ArrangementProgram::TYPE_ARRANGEMENT_PROGRAM_TACTIC) {\n $location = (string) $resource->getTacticalObjective()->getGerencia()->getComplejo();\n } else if ($resource->getType() == ArrangementProgram::TYPE_ARRANGEMENT_PROGRAM_OPERATIVE) {\n $location = (string) $resource->getOperationalObjective()->getGerencia()->getComplejo();\n }\n\n $management = (string) $resource->getTacticalObjective()->getGerencia();\n $description = $resource->getDescription() ? : ($this->trans('pequiven.arrangement_program.description_none'));\n\n $responsibles = '';\n\n foreach ($resource->getResponsibles() as $responsible) {\n $responsibles .= $responsible;\n $responsibles .= ',';\n }\n $responsiblesLen = strlen($responsibles);\n if ($responsiblesLen > 0) {\n $responsibles[strlen($responsibles) - 1] = '.';\n }\n $responsibles = ucwords(strtolower($responsibles));\n $path = $this->get('kernel')->locateResource('@PequivenArrangementProgramBundle/Resources/skeleton/programa_de_gestion.xls');\n\n $now = new \\DateTime();\n $objPHPExcel = \\PHPExcel_IOFactory::load($path);\n $objPHPExcel\n ->getProperties()\n ->setCreator(\"SEIP\")\n ->setTitle('SEIP - Programa de gestion')\n ->setCreated()\n ->setLastModifiedBy('SEIP')\n ->setModified()\n ;\n $objPHPExcel\n ->setActiveSheetIndex(0);\n $activeSheet = $objPHPExcel->getActiveSheet();\n\n $activeSheet->getDefaultRowDimension()->setRowHeight();\n //Setear informacion base\n $activeSheet\n ->setCellValue('B5', $categoryArrangementProgram)\n ->setCellValue('F5', $tacticalObjective)\n ->setCellValue('Q5', $operationalObjective)\n ->setCellValue('B7', $location)\n ->setCellValue('F7', $management)\n ->setCellValue('J7', $responsibles)\n ->setCellValue('AA7', $description)\n ;\n\n\n\n $timeline = $resource->getTimeline();\n $countGoals = 1;\n $rowGoal = 11;\n $goals = $timeline->getGoals();\n //Agregar las filas faltantes\n if ($goals->count() > 13) {\n $totalDiff = $goals->count() - 13;\n $activeSheet\n ->insertNewRowBefore(24, $totalDiff);\n }\n //Setear las metas\n foreach ($goals as $goal) {\n $startDate = $goal->getStartDate() ? $goal->getStartDate()->format('Y-m-d') : '';\n $endDate = $goal->getEndDate() ? $goal->getEndDate()->format('Y-m-d') : '';\n\n $responsiblesGoal = '';\n foreach ($goal->getResponsibles() as $responsible) {\n $responsiblesGoal .= '' . $responsible;\n $responsiblesGoal .= \"\\n\";\n }\n $responsiblesLen = strlen($responsiblesGoal);\n if ($responsiblesLen > 0) {\n $responsiblesGoal[strlen($responsiblesGoal) - 1] = '.';\n }\n $responsiblesGoal = ucwords(strtolower($responsiblesGoal));\n\n $weight = $goal->getWeight();\n $goalDetails = $goal->getGoalDetails();\n\n $januaryPlanned = $goalDetails->getJanuaryPlanned() > 0 ? $goalDetails->getJanuaryPlanned() : '';\n $januaryReal = $goalDetails->getJanuaryReal() > 0 ? $goalDetails->getJanuaryReal() : '';\n\n $februaryPlanned = $goalDetails->getFebruaryPlanned() > 0 ? $goalDetails->getFebruaryPlanned() : '';\n $februaryReal = $goalDetails->getFebruaryReal() > 0 ? $goalDetails->getFebruaryReal() : '';\n\n $marchPlanned = $goalDetails->getMarchPlanned() > 0 ? $goalDetails->getMarchPlanned() : '';\n $marchReal = $goalDetails->getMarchReal() > 0 ? $goalDetails->getMarchReal() : '';\n\n $aprilPlanned = $goalDetails->getAprilPlanned() > 0 ? $goalDetails->getAprilPlanned() : '';\n $aprilReal = $goalDetails->getAprilReal() > 0 ? $goalDetails->getAprilReal() : '';\n\n $mayPlanned = $goalDetails->getMayPlanned() > 0 ? $goalDetails->getMayPlanned() : '';\n $mayReal = $goalDetails->getMayReal() > 0 ? $goalDetails->getMayReal() : '';\n\n $junePlanned = $goalDetails->getJunePlanned() > 0 ? $goalDetails->getJunePlanned() : '';\n $juneReal = $goalDetails->getJuneReal() > 0 ? $goalDetails->getJuneReal() : '';\n\n $julyPlanned = $goalDetails->getJulyPlanned() > 0 ? $goalDetails->getJulyPlanned() : '';\n $julyReal = $goalDetails->getJulyReal() > 0 ? $goalDetails->getJulyReal() : '';\n\n $augustPlanned = $goalDetails->getAugustPlanned() > 0 ? $goalDetails->getAugustPlanned() : '';\n $augustReal = $goalDetails->getAugustReal() > 0 ? $goalDetails->getAugustReal() : '';\n\n $septemberPlanned = $goalDetails->getSeptemberPlanned() > 0 ? $goalDetails->getSeptemberPlanned() : '';\n $septemberReal = $goalDetails->getSeptemberReal() > 0 ? $goalDetails->getSeptemberReal() : '';\n\n $octoberPlanned = $goalDetails->getOctoberPlanned() > 0 ? $goalDetails->getOctoberPlanned() : '';\n $octoberReal = $goalDetails->getOctoberReal() > 0 ? $goalDetails->getOctoberReal() : '';\n\n $novemberPlanned = $goalDetails->getNovemberPlanned() > 0 ? $goalDetails->getNovemberPlanned() : '';\n $novemberReal = $goalDetails->getNovemberReal() > 0 ? $goalDetails->getNovemberReal() : '';\n\n $decemberPlanned = $goalDetails->getDecemberPlanned() > 0 ? $goalDetails->getDecemberPlanned() : '';\n $decemberReal = $goalDetails->getDecemberReal() > 0 ? $goalDetails->getDecemberReal() : '';\n\n $goalObservations = $goal->getObservations();\n\n if ($countGoals > 13) {\n $activeSheet->mergeCells(sprintf('C%s:F%s', $rowGoal, $rowGoal));\n $activeSheet->mergeCells(sprintf('AI%s:AL%s', $rowGoal, $rowGoal));\n }\n\n $activeSheet\n ->setCellValue('B' . $rowGoal, $countGoals)\n ->setCellValue('C' . $rowGoal, $goal->getName())\n ->setCellValue('G' . $rowGoal, $startDate)\n ->setCellValue('H' . $rowGoal, $endDate)\n ->setCellValue('I' . $rowGoal, $responsiblesGoal)\n ->setCellValue('J' . $rowGoal, $weight);\n\n //Valores planeado y real de la meta\n $activeSheet\n ->setCellValue('K' . $rowGoal, $januaryPlanned)\n ->setCellValue('L' . $rowGoal, $januaryReal)\n ->setCellValue('M' . $rowGoal, $februaryPlanned)\n ->setCellValue('N' . $rowGoal, $februaryReal)\n ->setCellValue('O' . $rowGoal, $marchPlanned)\n ->setCellValue('P' . $rowGoal, $marchReal)\n ->setCellValue('Q' . $rowGoal, $aprilPlanned)\n ->setCellValue('R' . $rowGoal, $aprilReal)\n ->setCellValue('S' . $rowGoal, $mayPlanned)\n ->setCellValue('T' . $rowGoal, $mayReal)\n ->setCellValue('U' . $rowGoal, $junePlanned)\n ->setCellValue('V' . $rowGoal, $juneReal)\n ->setCellValue('W' . $rowGoal, $julyPlanned)\n ->setCellValue('X' . $rowGoal, $julyReal)\n ->setCellValue('Y' . $rowGoal, $augustPlanned)\n ->setCellValue('Z' . $rowGoal, $augustReal)\n ->setCellValue('AA' . $rowGoal, $septemberPlanned)\n ->setCellValue('AB' . $rowGoal, $septemberReal)\n ->setCellValue('AC' . $rowGoal, $octoberPlanned)\n ->setCellValue('AD' . $rowGoal, $octoberReal)\n ->setCellValue('AE' . $rowGoal, $novemberPlanned)\n ->setCellValue('AF' . $rowGoal, $novemberReal)\n ->setCellValue('AG' . $rowGoal, $decemberPlanned)\n ->setCellValue('AH' . $rowGoal, $decemberReal)\n ->setCellValue('AI' . $rowGoal, $goalObservations)\n ;\n\n $activeSheet\n ->getStyle('I')->getAlignment()->setWrapText(true);\n $activeSheet->getStyle(sprintf('C%s:I%s', $rowGoal, $rowGoal))->applyFromArray($styleArrayBordersContent);\n $activeSheet->getStyle(sprintf('AI%s:AL%s', $rowGoal, $rowGoal))->applyFromArray($styleArrayBordersContent);\n $rowHeight = 50;\n $responsiblesGoalLen = strlen($responsiblesGoal);\n $goalObservationsLen = strlen($goalObservations);\n if ($responsiblesGoalLen > $rowHeight) {\n $rowHeight = $responsiblesGoalLen;\n }\n if ($goalObservationsLen > $responsiblesGoalLen) {\n $rowHeight = $goalObservationsLen;\n }\n $activeSheet->getRowDimension($rowGoal)->setRowHeight($rowHeight);\n $countGoals++;\n $rowGoal++;\n }\n $rowSummary = 24;\n if ($rowGoal > $rowSummary) {\n $rowSummary = $rowGoal;\n }\n $detailsAdvancesPlanned = $summary['detailsAdvancesPlanned'];\n $detailsAdvancesReal = $summary['detailsAdvancesReal'];\n $totalWeight = $summary['weight'];\n //Setear el peso total distribuido\n $activeSheet->setCellValue('J' . $rowSummary, $totalWeight);\n //Setear avances del programa\n $activeSheet\n ->setCellValue('K' . $rowSummary, $detailsAdvancesPlanned['januaryPlanned'])\n ->setCellValue('L' . $rowSummary, $detailsAdvancesReal['januaryReal'])\n ->setCellValue('M' . $rowSummary, $detailsAdvancesPlanned['februaryPlanned'])\n ->setCellValue('N' . $rowSummary, $detailsAdvancesReal['februaryReal'])\n ->setCellValue('O' . $rowSummary, $detailsAdvancesPlanned['marchPlanned'])\n ->setCellValue('P' . $rowSummary, $detailsAdvancesReal['marchReal'])\n ->setCellValue('Q' . $rowSummary, $detailsAdvancesPlanned['aprilPlanned'])\n ->setCellValue('R' . $rowSummary, $detailsAdvancesReal['aprilReal'])\n ->setCellValue('S' . $rowSummary, $detailsAdvancesPlanned['mayPlanned'])\n ->setCellValue('T' . $rowSummary, $detailsAdvancesReal['mayReal'])\n ->setCellValue('U' . $rowSummary, $detailsAdvancesPlanned['junePlanned'])\n ->setCellValue('V' . $rowSummary, $detailsAdvancesReal['juneReal'])\n ->setCellValue('W' . $rowSummary, $detailsAdvancesPlanned['julyPlanned'])\n ->setCellValue('X' . $rowSummary, $detailsAdvancesReal['julyReal'])\n ->setCellValue('Y' . $rowSummary, $detailsAdvancesPlanned['augustPlanned'])\n ->setCellValue('Z' . $rowSummary, $detailsAdvancesReal['augustReal'])\n ->setCellValue('AA' . $rowSummary, $detailsAdvancesPlanned['septemberPlanned'])\n ->setCellValue('AB' . $rowSummary, $detailsAdvancesReal['septemberReal'])\n ->setCellValue('AC' . $rowSummary, $detailsAdvancesPlanned['octoberPlanned'])\n ->setCellValue('AD' . $rowSummary, $detailsAdvancesReal['octoberReal'])\n ->setCellValue('AE' . $rowSummary, $detailsAdvancesPlanned['novemberPlanned'])\n ->setCellValue('AF' . $rowSummary, $detailsAdvancesReal['novemberReal'])\n ->setCellValue('AG' . $rowSummary, $detailsAdvancesPlanned['decemberPlanned'])\n ->setCellValue('AH' . $rowSummary, $detailsAdvancesReal['decemberReal'])\n ;\n\n //Observaciones del programa.\n $rowObservation = $rowSummary + 2;\n $observations = $resource->getObservations();\n $reference = $resource->getRef();\n $observationString = '';\n $count = 0;\n foreach ($observations as $observation) {\n $count++;\n $observationString .= sprintf(\"%d.- %s. \\n\", $count, $observation->getDescription());\n }\n $observationsLen = strlen($observationString);\n if ($observationsLen > 0) {\n $observationString = ucwords(strtolower($observationString));\n } else {\n $observationString = 'Ninguna.';\n }\n\n $activeSheet\n ->setCellValue('B' . $rowObservation, $observationString)\n ->setCellValue('AE' . $rowObservation, $reference);\n\n $activeSheet\n ->getStyle('B')->getAlignment()->setWrapText(true);\n\n $activeSheet->getStyle(sprintf('B%s:AD%s', $rowObservation, $rowObservation))->applyFromArray($styleArrayBordersContent);\n\n //Agregar los detalles del programa de gestion\n $sendToReviewBy = ucwords(strtolower($details->getReviewedBy() ? $details->getReviewedBy() : $this->trans('pequiven.arrangement_program.no_send_to_review_date')));\n $revisionDate = $details->getRevisionDate() ? $details->getRevisionDate()->format($this->getSeipConfiguration()->getGeneralDateFormat()) : $this->trans('pequiven.arrangement_program.no_revison_date');\n\n $approvedBy = ucwords(strtolower($details->getApprovedBy() ? $details->getApprovedBy() : $this->trans('pequiven.arrangement_program.no_approval_date')));\n $approvalDate = $details->getApprovalDate() ? $details->getApprovalDate()->format($this->getSeipConfiguration()->getGeneralDateFormat()) : $this->trans('pequiven.arrangement_program.no_approval_date');\n if ($rowObservation > 26) {\n $rowDetails = $rowObservation + 2;\n } else {\n $rowDetails = 28;\n }\n $activeSheet\n ->setCellValue('B' . $rowDetails, $sendToReviewBy)\n ->setCellValue('I' . $rowDetails, $revisionDate)\n ->setCellValue('L' . $rowDetails, $approvedBy)\n ->setCellValue('AI' . $rowDetails, $approvalDate)\n ;\n $row = $rowDetails + 3;\n $merge = 'B' . $row . ':H' . $row . '';\n $activeSheet->mergeCells($merge);\n $activeSheet->setCellValue(sprintf('B%s', $row), 'NIVEL DE REVISION: 1');\n $activeSheet->setCellValue(sprintf('AI%s', $row), 'C-PG-DM-OI-R-002');\n $activeSheet->getStyle(sprintf('B%s:AI%s', $row, $row))->getFont()->setSize(8);\n\n $activeSheet->calculateColumnWidths();\n $activeSheet->getRowDimension('1');\n\n $activeSheet->getProtection()\n ->setSheet(true)\n ->setPassword('SEIP-PG-P1A-2014')\n ;\n\n $fileName = sprintf('SEIP-Programa-De-Gestion-%s.xls', $now->format('Ymd-His'));\n // Redirect output to a client’s web browser (Excel5)\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"' . $fileName . '\"');\n header('Cache-Control: max-age=0');\n // If you're serving to IE 9, then the following may be needed\n header('Cache-Control: max-age=1');\n\n // If you're serving to IE over SSL, then the following may be needed\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\n header('Cache-Control: cache, must-revalidate'); // HTTP/1.1\n header('Pragma: public'); // HTTP/1.0\n\n $objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n $objWriter->save('php://output');\n exit;\n }", "public function getCDateAttendances_new()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $date = isset($_REQUEST['date']) ? $_REQUEST['date'] : '';\n $datafor = isset($_REQUEST['datafor']) ? $_REQUEST['datafor'] : '';\n $empid = isset($_REQUEST['empid']) ? $_REQUEST['empid'] : ''; \n $zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date =date('Y-m-d',strtotime($date));\n $time = date('H:i:s');\n $data = array();\n $cdate = date('Y-m-d');\n\t $adminstatus = getAdminStatus($empid);\n\t\t$cond = \"\";\n\t\t$cond1 = \"\";\n\t\tif($adminstatus == '2')\n\t\t{ \n\t \t$dptid = getDepartmentIdByEmpID($empid);\n\t\t\t$cond = \" AND Department = $dptid \";\n\t\t\t$cond1 = \" AND Dept_id = $dptid \";\n\t\t\t\n\t\t}\n\t \n\t \n //today attendance\n\t\t if($datafor=='present'){\n\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = ? AND Is_Delete = 0 ) order by `name`\", array($date,$orgid,$orgid));\n $data['present'] = $query->result();\n\t\t\t\n\t\t\t }else if($datafor=='absent'){/*\n //---managing off (weekly and holiday)\n $dt = $date; \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } \n }*/\n\t\t\t//////////today_abs\n\t\t\t\n\t\t\tif($date != date('Y-m-d')){// for other deay's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=2 or AttendanceStatus=6 or AttendanceStatus=7 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array($date,$orgid));\n\t\t\t\t$this->db->close();\n\t\t\t\t$data['absent'] = $query->result();\n\t\t\t}else{ // for today's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? \nand AttendanceStatus in (2,6,7) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0 ) order by `name` \",array($date,$orgid));\n\t\t\t$temp=array();\n $temp = $query->result();\n\t\t\t\n\t\t\t$query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name, '-' as `TimeOut` ,'-' as TimeIn FROM `EmployeeMaster` WHERE `OrganizationId` =? AND Is_Delete=0 $cond AND ARCHIVE =1 AND is_Delete = 0 AND (DOL='0000-00-00' OR DOL>CURDATE()) AND Id NOT IN ( SELECT EmployeeId FROM AttendanceMaster WHERE AttendanceDate = ? AND `OrganizationId` =? ) AND ( SELECT `TimeIn` FROM `ShiftMaster` WHERE `Id` = Shift AND TimeIn < ? )\",array($orgid,$date,$orgid,$time));\n\t\t\t\n\t\t\t\t$data['absent']= array_merge($temp,$query->result());\t\n\t\t\t}\n\t\t\t\n\t}else if($datafor=='latecomings'){\n //////// today_late\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0 ) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['lateComings'] = $query->result();\n\t}else if($datafor=='earlyleavings'){\t\t\n ////////today_early\n /*$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array( $date,$orgid ));\n $data['earlyLeavings'] = $query->result();*/\n\t\t\t\n\t\t $query = $this->db->query(\"select Shift,Id , FirstName , LastName from EmployeeMaster where OrganizationId = $orgid and Id IN (select EmployeeId from AttendanceMaster where OrganizationId = $orgid and AttendanceDate='$date' and TimeIn != '00:00:00' ) AND is_Delete=0 order by FirstName\");\n\t\t $res = array();\n\t\t $cond = '';\n foreach ($query->result() as $row) {\n $ShiftId = $row->Shift;\n $EId = $row->Id;\n $query = $this->db->query(\"select TimeIn,TimeOut,shifttype from ShiftMaster where Id = $ShiftId\");\n if ($data123 = $query->row()) {\n $shiftout = $data123->TimeOut;\n $shiftout1 = $date. ' '.$data123->TimeOut;\n\t\t\t\tif($data123->shifttype==2)\n\t\t\t\t{\n\t\t\t\t\t$nextdate = date('Y-m-d',strtotime($date . \"+1 days\"));\n\t\t\t\t\t $shiftout1 = $nextdate.' '.$data123->TimeOut;\n\t\t\t\t}\n $shift = substr($data123->TimeIn, 0, 5) . ' - ' . substr($data123->TimeOut, 0, 5);\n $ct = date('H:i:s');\n \n if ($cdate == $date)\n $cond = \" and TimeOut !='00:00:00'\";\n $query333 = $this->db->query(\"select SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out from AttendanceMaster where EmployeeId =$EId and if(timeoutdate = '0000-00-00' , TimeOut < '$shiftout' , CONCAT(timeoutdate,' ' ,TimeOut) < '$shiftout1' ) and AttendanceDate='$date' and TimeOut !='00:00:00' \");\n\t\t\t\t\t\n\t\t\t\t\t\n if ($row333 = $query333->row()) {\n $a = new DateTime($row333->TimeOut);\n $b = new DateTime($data123->TimeOut);\n $interval = $a->diff($b);\n $data1['earlyby'] = $interval->format(\"%H:%I\");\n $data1['timeout'] = substr($row333->TimeOut, 0, 5);\n $data1['name'] = $row->FirstName . ' ' . $row->LastName;\n $data1['shift'] = $shift;\n $data1['status'] = $row333->status;\n $data1['TimeIn'] = $row333->TimeIn;\n $data1['TimeOut'] = $row333->TimeOut;\n $data1['CheckOutLoc'] = $row333->CheckOutLoc;\n $data1['checkInLoc'] = $row333->checkInLoc;\n $data1['EntryImage'] = $row333->EntryImage;\n $data1['ExitImage'] = $row333->ExitImage;\n $data1['latit_in'] = $row333->latit_in;\n $data1['longi_in'] = $row333->longi_in;\n $data1['latit_out'] = $row333->latit_out;\n $data1['longi_out'] = $row333->longi_out;\n $data1['date'] = $date;\n $res[] = $data1;\n }\n \n }\n }\n\t\t $data['earlyLeavings'] =\t $res;\n\t\t\t\n\t}\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n \n \n \n echo json_encode($data, JSON_NUMERIC_CHECK);\n \n }", "public function actionMedicalvalidation() {\n\t\tif (\\Yii::$app->SessionCheck->isclientLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t// rendering the layout\n\t\t\t$this->layout = 'main';\n\t\t\t\n\t\t\t$encrypt_component = new EncryptDecryptComponent ();\n\t\t\t$company_detals = array ();\n\t\t\t$company_validation = array ();\n\t\t\t$error_medical_classes = array ();\n\t\t\t$arr_medical_individual_issues = array ();\n\t\t\t$medical_period_issues = array();\n\t\t\t$medical_validation_issues = array();\n\t\t\t$top_ten_employee_id = array();\n\t\t\t\n\t\t\t$get_company_id = \\Yii::$app->request->get ();\n\t\t\t\n\t\t\tif (! empty ( $get_company_id )) {\n\t\t\t\t/**\n\t\t\t\t * Encrypted company ID*\n\t\t\t\t */\n\t\t\t\t$encrypt_company_id = $get_company_id ['c_id'];\n\t\t\t\tif (! empty ( $encrypt_company_id )) {\n\t\t\t\t\t\n\t\t\t\t\t$company_id = $encrypt_component->decryptUser ( $encrypt_company_id ); // Decrypted company Id\n\t\t\t\t\t \n\t\t\t\t\t// / get the company details\n\t\t\t\t\t$company_detals = TblAcaCompanies::find ()->select ( 'company_client_number,company_name' )->where ( 'company_id = :company_id', [ \n\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t] )->one ();\n\t\t\t\t\t\n\t\t\t\t\t// checking if the validation starts for this company\n\t\t\t\t\t\n\t\t\t\t\t$company_validation = TblAcaCompanyValidationStatus::find ()->where ( [ \n\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t'is_initialized' => 1 \n\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t'is_completed' => 0 \n\t\t\t\t\t] )->One ();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * *** getting individual payroll employee validation *******\n\t\t\t\t\t */\n\t\t\t\t\t/**************** pagination ***********************/\t\n\t\t\t\t\t$num_rec_per_page=10;\n\t\t\t\t\n\t\t\t\t\tif (isset($get_company_id['page_id'])) {\n\t\t\t\t\t\t$page = $get_company_id['page_id'];\n\t\t\t\t\t } else {\n\t\t\t\t\t \t$page=1; \n\t\t\t\t\t }\n\t\t\n\t\t\t\t\t$start_from = ($page-1) * $num_rec_per_page;\n\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t\tnow getting the count of total issues \n\t\t\t\t\t**/\t\t\t\t\t\n\t\t\t\t\t$sql = 'SELECT `employee_id` FROM `tbl_aca_medical_validation_log` WHERE `company_id`=' . $company_id . ' GROUP BY employee_id';\n\t\t\t\t\t$medical_validation = \\Yii::$app->db->createCommand ( $sql )->queryAll ();\n\t\t\t\t\t$i=0;\n\t\t\t\t\tforeach($medical_validation as $medical_validation){\n\t\t\t\t\t\t$medical_validation_issues[$i] = $medical_validation['employee_id'];\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$sql = 'SELECT `employee_id` FROM `tbl_aca_medical_enrollment_period_validation_log` WHERE `company_id`=' . $company_id . ' GROUP BY employee_id';\n\t\t\t\t\t$medical_period = \\Yii::$app->db->createCommand ( $sql )->queryAll ();\n\t\t\t\t\t$j=0;\n\t\t\t\t\tforeach($medical_period as $medical_period){\n\t\t\t\t\t\t$medical_period_issues[$j] = $medical_period['employee_id'];\n\t\t\t\t\t\t$j++;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// combining both the issue arrays to combine all the employee ids\t\t\t\t\t\n\t\t\t\t\t$issues_array = array_merge($medical_validation_issues,$medical_period_issues);\n\t\t\t\t\n\t\t\t\t\t// get the unique employee ids\n\t\t\t\t\t$final_employee_ids_array = array_unique($issues_array);\n\t\t\t\t\t$final_employee_ids_array = array_values($final_employee_ids_array);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(count($final_employee_ids_array)> 10){\n\n\t\t\t\t\t\t//pagination\t\t\t\t\t\t\n\t\t\t\t\t\tfor($i=$start_from;$i<($start_from+10);$i++){\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($i<count($final_employee_ids_array)){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//\tif(!empty($final_employee_ids_array[$i])){\n\t\t\t\t\t\t\t\t$top_ten_employee_id[] = $final_employee_ids_array[$i];\n\t\t\t\t\t\t\t//\t}\n\t\t\t\t\t\t\t}else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor($i=0;$i<count($final_employee_ids_array);$i++){\n\t\t\t\t\t\t\t//if(!empty($final_employee_ids_array[$i])){\n\t\t\t\t\t\t\t$top_ten_employee_id[] = $final_employee_ids_array[$i];\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t$medical_details = ArrayHelper::index(TblAcaMedicalData::find ()->where ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $top_ten_employee_id\n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )->asArray()->All (),'employee_id');\n\t\t\t\t\t\t//ArrayHelper::map($array, 'id', 'name')\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t// get the number of issues for individual payroll data\n\t\t\t\t\t$error_individual_medical = ArrayHelper::index(TblAcaMedicalValidationLog::find ()->select(['COUNT(*) AS cnt,employee_id'])->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'<>',\n\t\t\t\t\t\t\t\t'is_validated',\n\t\t\t\t\t\t\t\t1 \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $top_ten_employee_id \n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )->asArray()->All (),'employee_id');\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t// get the number of issues for period payroll data\n\t\t\t\t\t$error_individual_medical_period = ArrayHelper::index(TblAcaMedicalEnrollmentPeriodValidationLog::find ()->select(['COUNT(*) AS cnt,employee_id'])->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'<>',\n\t\t\t\t\t\t\t\t'is_validated',\n\t\t\t\t\t\t\t\t1 \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $top_ten_employee_id \n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )->asArray()->All (),'employee_id');\n\t\t\t\t\t\t\n\t\t\t\t\tif(!empty($medical_details))\t\t\n\t\t\t\t\t{\t\t//print_r($issue_count);\t\t\t\n\t\t\t\t\tforeach($medical_details as $key=>$value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$employee_id = \t$key;\n\t\t\t\t\t\t$medical_issue = '';\n\t\t\t\t\t\t$medical_period_issue = '';\n\t\t\t\t\t\tif(!empty($error_individual_medical[$employee_id]['cnt'])){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$medical_issue = $error_individual_medical[$employee_id]['cnt'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!empty($error_individual_medical_period[$employee_id]['cnt'])){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$medical_period_issue = $error_individual_medical_period[$employee_id]['cnt'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$issue_count = $medical_issue+ $medical_period_issue;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif ($issue_count != 0) {\n\t\t\t\t\t\t\t$hased_medical_employee_id = $encrypt_component->encrytedUser ( $employee_id );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$arr_medical_individual_issues [] = array (\n\t\t\t\t\t\t\t\t//'medical_firstname' => $medical_details->first_name,\n\t\t\t\t\t\t\t\t'medical_firstname' => $value['first_name'],\n\t\t\t\t\t\t\t\t'medical_lastname' => $value['last_name'],\n\t\t\t\t\t\t\t\t'medical_middlename' => $value['middle_name'],\n\t\t\t\t\t\t\t\t'medical_ssn' => $value['ssn'],\n\t\t\t\t\t\t\t\t'issue_count' => $issue_count,\n\t\t\t\t\t\t\t\t'medical_id' => $hased_medical_employee_id ,\n\t\t\t\t\t\t\t\t'company_id' =>$encrypt_company_id\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * *** getting individual payroll employee validation *******\n\t\t\t\t\t */\n\t\t\t\t\t/**************** pagination **********************\n\t\t\t\t\t$num_rec_per_page=10;\n\t\t\t\t\t\n\t\t\t\t\tif (isset($get_company_id['page_id'])) {\n\t\t\t\t\t\t$page = $get_company_id['page_id'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$page=1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$start_from = ($page-1) * $num_rec_per_page;\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t\tnow getting the count of total issues \n\t\t\t\t\t*\n\t\t\t\t\t$medical_validation = TblAcaMedicalValidationLog::find ()->select ( 'employee_id' )->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t] )->All ();\n\t\t\t\t\t\t\n\t\t\t\t\t$arr_validations ['medical_data_validation'] = count($medical_validation);\n\t\t\t\t\t\n\t\t\t\t\t$medical_period = TblAcaMedicalEnrollmentPeriodValidationLog::find ()->select ( 'employee_id' )->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t] )->All ();\n\t\t\t\t\t\t\n\t\t\t\t\t$arr_validations ['medical_data_validation'] += count($medical_period);\n\t\t\t\t\t//print_r($arr_validations ['medical_data_validation']);die();\n\t\t\t\t\t/**\n\t\t\t\t\t * *** getting individual payroll employee validation *******\n\t\t\t\t\t \n\t\t\t\t\tif($arr_validations ['medical_data_validation']>10){\n\t\t\t\t\t\t$error_medical_classes = TblAcaMedicalData::find ()->where ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_validation \n\t\t\t\t\t\t] )->orWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_period \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )\n\t\t\t\t\t\t->offset($start_from)\n\t\t\t\t\t\t->limit($num_rec_per_page)\n\t\t\t\t\t\t\n\t\t\t\t\t\t->All ();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$error_medical_classes = TblAcaMedicalData::find ()->where ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_validation \n\t\t\t\t\t\t] )->orWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_period \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )->All ();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//////// using for pagination\n\t\t\t\t\t$error_medical_classes_count = TblAcaMedicalData::find ()->where ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_validation \n\t\t\t\t\t\t] )->orWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_period \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )->count ();\n\t\t\t\t\t//$searchModel = new TblAcaMedicalErrorSearch();\n\t\t\t\t\t\n\t\t\t\t\t// get the individual payroll employee details\n\t\t\t\t\tforeach ( $error_medical_classes as $error_medical_class ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$medical_details = TblAcaMedicalData::find ()->where ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $error_medical_class->employee_id \n\t\t\t\t\t\t] )->One ();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// get the number of issues for individual medical data\n\t\t\t\t\t\t$error_individual_medical = TblAcaMedicalValidationLog::find ()->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'<>',\n\t\t\t\t\t\t\t\t'is_validated',\n\t\t\t\t\t\t\t\t1 \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $error_medical_class->employee_id \n\t\t\t\t\t\t] )->All ();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// get the number of issues for period medical data\n\t\t\t\t\t\t$error_individual_medical_period = TblAcaMedicalEnrollmentPeriodValidationLog::find ()->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'<>',\n\t\t\t\t\t\t\t\t'is_validated',\n\t\t\t\t\t\t\t\t1 \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $error_medical_class->employee_id \n\t\t\t\t\t\t] )->Count ();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$issue_count = count ( $error_individual_medical );\n\t\t\t\t\t\t$issue_count += $error_individual_medical_period;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($issue_count > 0) {\n\t\t\t\t\t\t\t$hased_medical_employee_id = $encrypt_component->encrytedUser ( $error_medical_class->employee_id );\n\t\t\t\t\t\t\t$arr_medical_individual_issues [] = array (\n\t\t\t\t\t\t\t\t\t//'medical_firstname' => $medical_details->first_name,\n\t\t\t\t\t\t\t\t\t'medical_firstname' => $medical_details->first_name,\n\t\t\t\t\t\t\t\t\t'medical_lastname' => $medical_details->last_name,\n\t\t\t\t\t\t\t\t\t'medical_middlename' => $medical_details->middle_name,\n\t\t\t\t\t\t\t\t\t'medical_ssn' => $medical_details->ssn,\n\t\t\t\t\t\t\t\t\t'issue_count' => $issue_count,\n\t\t\t\t\t\t\t\t\t'medical_id' => $hased_medical_employee_id ,\n\t\t\t\t\t\t\t\t\t'company_id' =>$encrypt_company_id\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t*/\n\t\t\t\t\t//print_r($arr_medical_individual_issues);die();\n\t\t\t\t\t\t//$dataProvider = $searchModel->search($arr_medical_individual_issues); //dataProvider for grid \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($arr_medical_individual_issues)){\n\t\t\treturn $this->render ( 'medicalvalidation', array (\n\t\t\t\t\t'company_detals' => $company_detals,\n\t\t\t\t\t//'dataProvider'=>$dataProvider,\n\t\t\t\t\t//'searchModel'=>$searchModel,\n\t\t\t\t\t'company_validation' => $company_validation,\n\t\t\t\t\t'encoded_company_id' => $_GET ['c_id'],\n\t\t\t\t\t'arr_medical_individual_issues' => $arr_medical_individual_issues,\n\t\t\t\t\t'total_issue_count' => count($final_employee_ids_array),\n\t\t\t\t\t'error_medical_classes_count' => count($final_employee_ids_array)\n\t\t\t) );\n\t\t\t\n\t\t\t}else{\n\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t'/client/validateforms?c_id=' . $encrypt_company_id \n\t\t\t\t\t\t) );\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->clientlogout (); // client logout\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}", "public function export(Request $request)\n {\n //$to_date = Carbon::createFromFormat('Y-m-d H:i:s', $request['to_date']. \"23:59:59\");//date('Y-m-d 23:59:59', strtotime($to_date));\n //$clients = VwClient::select()->whereBetween('created_at',[$from_date, $to_date])->get();\n // $formatted_from_date = date('YMd', strtotime($request['from_date']));\n // $formatted_to_date = date('YMd', strtotime($request['to_date']));\n $report_year = $request['report_year'];\n \n $date = $request['report_year'];\n\n $report1_data = DB::table('vw_kpi_report_potential_clients')->where('target_year', $report_year)->get();\n $report2A_data = DB::table('vw_kpi_report2a')->where('target_year', $report_year)->get();\n $report2B_data = DB::table('vw_kpi_report2b')->where('target_year', $report_year)->get();\n $report2C_data = DB::table('vw_kpi_report2c')->where('target_year', $report_year)->get();\n $report2D_data = DB::table('vw_kpi_report2d')->where('target_year', $report_year)->get();\n $report2E_data = DB::table('vw_kpi_report2e')->where('target_year', $report_year)->get();\n $report2F_data = DB::table('vw_kpi_report2f')->where('target_year', $report_year)->get();\n $report2F1_data = DB::table('vw_kpi_report2f1')->where('target_year', $report_year)->get();\n $report3_data = DB::table('vw_kpi_report3')->where('target_year', $report_year)->get();\n $report4_data = DB::table('vw_kpi_report4')->where('target_year', $report_year)->get();\n \n $file = Excel::create('NB_LOCATORSLIST_'.$report_year.' - '.date('YMd'), function ($excel) use ($report1_data, $report2A_data, $report2B_data, $report2C_data , $report2D_data, $report2E_data, $report2F_data, $report2F1_data, $report3_data, $report4_data, $date) {\n $excel->setTitle('KPI Analysis NB GROUP')\n ->setCreator(auth()->user()->name)\n ->setCompany('Serbisyo Outsourcing Facility Inc.');\n //Create excel sheet\n $excel->sheet('KPI Analysis NB Group', function ($sheet) use ($report1_data, $report2A_data, $report2B_data, $report2C_data, $report2D_data, $report2E_data, $report2F_data, $report2F1_data, $report3_data, $report4_data, $date) {\n $report1_row = 12;\n $report2A_row = 34;\n $report2B_row = 54;\n $report2C_row = 74;\n $report2D_row = 94;\n $report2E_row = 114;\n $report2F_row = 134;\n $report2F1_row = 154;\n $report3_row = 175;\n $report4_row = 196;\n $total_clients = 0;\n $total_target_r1 = 0;\n $total_percentage_r1 = 0;\n $blank_rows = [\n 15, 19, 23, 27,\n 37, 41, 45, 49,\n 57, 61, 65, 69,\n 77, 81, 85, 89,\n 97, 101, 105, 109,\n 117, 121, 125, 129,\n 137, 141, 145, 149,\n 157, 161, 165, 169,\n 178, 182, 186, 190,\n 199, 203, 207, 211\n ];\n $current_quarter = 0;\n\n /** Start Loop report 1 data */\n foreach ($report1_data as $key => $report1) {\n /** Check if current row is in blank rows which are rows for quarter 1,2,3,4 */\n if ($boolean = in_array($report1_row + $key, $blank_rows)) {\n if ($current_quarter == 1) {\n $sheet->setCellValueByColumnAndRow(1, $report1_row + $key, \"Q\" . $current_quarter);\n }\n if ($current_quarter == 2) {\n $sheet->setCellValueByColumnAndRow(1, $report1_row + $key, \"Q\" . $current_quarter);\n }\n if ($current_quarter == 3) {\n $sheet->setCellValueByColumnAndRow(1, $report1_row + $key, \"Q\" . $current_quarter);\n }\n $sheet->setCellValueByColumnAndRow(2, $report1_row + $key, $total_clients);\n $sheet->setCellValueByColumnAndRow(3, $report1_row + $key, $total_target_r1);\n $sheet->setCellValueByColumnAndRow(4, $report1_row + $key, round($total_percentage_r1, 2) . \"%\");\n $sheet->setCellValueByColumnAndRow(5, $report1_row + $key, 100 . \"%\");\n $sheet->setCellValueByColumnAndRow(6, $report1_row + $key, $status);\n\n $report1_row = $report1_row + 1;\n }\n /** start report 1 computation */\n $report1_percentage = $report1->clients_count != null ? (intval($report1->clients_count) / intval($report1->target_increase_potential_client))*100:0;\n $total_clients = $total_clients + $report1->clients_count;\n $total_target_r1 = $total_target_r1 + $report1->target_increase_potential_client;\n $total_percentage_r1 = ($total_clients / $total_target_r1) * 100;\n $current_quarter = $report1->quarter;\n $status = $report1_percentage >= 100 ? \"MET\" : \"UNMET\";\n /** end report 1 computation */\n \n /** start setting value report 1 */\n $sheet->setCellValueByColumnAndRow(1, $report1_row + $key, $report1->target_month); // . $report1_row.\"+\".$key\n $sheet->setCellValueByColumnAndRow(2, $report1_row + $key, $report1->clients_count != null ? $report1->clients_count : 0);\n $sheet->setCellValueByColumnAndRow(3, $report1_row + $key, $report1->target_increase_potential_client); //. \"|\".$bolean\n $sheet->setCellValueByColumnAndRow(4, $report1_row + $key, $report1_percentage . \"%\");\n $sheet->setCellValueByColumnAndRow(5, $report1_row + $key, 100 . \"%\");\n $sheet->setCellValueByColumnAndRow(6, $report1_row + $key, $status);\n /** end setting vaue report 1 */\n }\n /** End Loop Report 1 */\n\n /** Start setting value for quarter 4 report 1 */\n $sheet->setCellValueByColumnAndRow(1, 27, \"Q\" . 4);\n $sheet->setCellValueByColumnAndRow(2, 27, $total_clients);\n $sheet->setCellValueByColumnAndRow(3, 27, $total_target_r1);\n $sheet->setCellValueByColumnAndRow(4, 27, round($total_percentage_r1, 2) . \"%\");\n $sheet->setCellValueByColumnAndRow(5, 27, 100 . \"%\");\n $sheet->setCellValueByColumnAndRow(6, 27, $status);\n \n /**\n * Start Report 2\n *\n */\n $this->generate_report2($sheet, $report2A_data, $report2A_row, $blank_rows, 49);//2A last row for Quarter 4\n $this->generate_report2($sheet, $report2B_data, $report2B_row, $blank_rows, 69);//2B last row for Quarter 4\n $this->generate_report2($sheet, $report2C_data, $report2C_row, $blank_rows, 89); //2C last row for Quarter 4\n $this->generate_report2($sheet, $report2D_data, $report2D_row, $blank_rows, 109);//2D last row for Quarter 4\n $this->generate_report2($sheet, $report2E_data, $report2E_row, $blank_rows, 129);//2E last row for Quarter 4\n $this->generate_report2($sheet, $report2F_data, $report2F_row, $blank_rows, 149);//2F last row for Quarter 4\n $this->generate_report2($sheet, $report2F1_data, $report2F1_row, $blank_rows, 169);//2F1 last row for Quarter 4\n $this->generate_report2($sheet, $report3_data, $report3_row, $blank_rows, 190); //3 last row for Quarter 4\n $this->generate_report2($sheet, $report4_data, $report4_row, $blank_rows, 211);\n\n $sheet->cells('B12:B211', function ($cells) {\n $cells->setFontWeight('bold');\n });\n\n $sheet->mergeCells('A1:J1');\n $sheet->cells('A1:J1', function ($cells) {\n $cells->setAlignment('center');\n $cells->setFontSize(16);\n $cells->setFontWeight('bold');\n });\n $sheet->row('1', array(\n 'FUNCTIONAL QUALITY OBJECTIVE-MONITORING'\n ));\n $sheet->mergeCells('A2:B2');\n $sheet->cell('A2', function ($cell) {\n $cell->setValue('GROUP/SECTION:');\n });\n $sheet->cells('A2:B2', function ($cells) {\n $cells->setFontSize(12);\n $cells->setFontWeight('bold');\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n \n $sheet->mergeCells('C2:J2');\n $sheet->cell('C2', function ($cell) {\n $cell->setValue('NEW BUSINESS');\n });\n $sheet->cells('C2:J2', function ($cells) {\n $cells->setAlignment('center');\n $cells->setFontWeight('bold');\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n \n $sheet->mergeCells('A3:B3');\n $sheet->cell('A3', function ($cell) {\n $cell->setValue('YEAR:');\n });\n\n $sheet->cells('A3:B3', function ($cells) {\n $cells->setFontSize(12);\n $cells->setFontWeight('bold');\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n\n $sheet->mergeCells('C3:D3');\n $sheet->cell('C3', function ($cell) use ($date) {\n $cell->setValue($date);\n //$year = date(\"Y\", strtotime($date['from_date'])) . \"-\" .date(\"Y\", strtotime($date['to_date']));\n // if (date(\"Y\", strtotime($date['from_date'])) == date(\"Y\", strtotime($date['to_date']))) {\n // $cell->setValue(date(\"Y\", strtotime($date['from_date'])));\n // } else {\n // $cell->setValue($year);\n // }\n });\n $sheet->cells('C3:D3', function ($cells) {\n $cells->setFontSize(12);\n $cells->setFontWeight('bold');\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n $cells->setAlignment('center');\n });\n \n \n $sheet->mergeCells('E3:G3');\n $sheet->cell('E3', function ($cell) {\n $cell->setValue('QUARTER');\n });\n $sheet->cells('E3:G3', function ($cells) {\n $cells->setFontSize(12);\n $cells->setFontWeight('bold');\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n \n\n $sheet->mergeCells('H3:J3');\n $sheet->cell('H3', function ($cell) {\n $cell->setValue('4th QUARTER');\n });\n $sheet->cells('H3:J3', function ($cells) {\n $cells->setFontSize(12);\n $cells->setFontWeight('bold');\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n $cells->setAlignment('center');\n });\n \n\n $sheet->mergeCells('A6:B6');\n $sheet->cell('A6', function ($cell) {\n $cell->setValue('PROCESS OWNER:');\n });\n $sheet->setBorder('A6:B6', 'thin');\n $sheet->cells('A6:B6', function ($cells) {\n $cells->setFontSize(12);\n $cells->setFontWeight('bold');\n });\n \n\n $sheet->cell('D6', function ($cell) {\n $cell->setValue('NB GROUP');\n });\n \n $sheet->cells('D6', function ($cells) {\n $cells->setFontSize(12);\n $cells->setFontWeight('bold');\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n $cells->setAlignment('center');\n });\n\n /**\n * Start Sub headers with numbers\n */\n\n $sheet->cell('A8', function ($cell) {\n $cell->setValue('1');\n });\n $sheet->cell('A29', function ($cell) {\n $cell->setValue('2');\n });\n $sheet->cell('A171', function ($cell) {\n $cell->setValue('3');\n });\n $sheet->cell('A192', function ($cell) {\n $cell->setValue('4');\n });\n $sheet->cell('A213', function ($cell) {\n $cell->setValue('5');\n });\n \n $sub_number_arr = [8, 29, 171, 192, 213];\n for ($i = 0; $i < count($sub_number_arr); $i++) {\n $sheet->row($sub_number_arr[$i], function ($row) {\n $row->setAlignment('center');\n $row->setFontColor('#4286f4');\n $row->setFontWeight('bold');\n });\n }\n /** End*/\n /**\n * Start Sub header beside numbering 1. 2. 3.4.5\n */\n $sheet->mergeCells('B8:E8');\n $sheet->cell('B8', function ($cell) {\n $cell->setValue('To increase database of potential clients');\n });\n \n $sheet->mergeCells('B29:J29');\n $sheet->cell('B29', function ($cell) {\n $cell->setValue('To ensure steady growth of client base in all areas regardless of territory and to ensure that proposals made to prospective clients are accepted.');\n });\n\n $sheet->mergeCells('B171:E171');\n $sheet->cell('B171', function ($cell) {\n $cell->setValue('To increase number of Clients by at least one (1) per quarter');\n });\n\n $sheet->mergeCells('B192:G192');\n $sheet->cell('B192', function ($cell) {\n $cell->setValue('To secure a duly-signed Service Contract which is approved by the Client and the Company.');\n });\n\n $sheet->mergeCells('B213:G213');\n $sheet->cell('B213', function ($cell) {\n $cell->setValue('To ensure continual improvement of the process and to provide corrective action to prevent recurrence of a nonconformity raised');\n });\n $sheet->getStyle('B213')->getAlignment()->setWrapText(true);\n \n for ($i = 0; $i < count($sub_number_arr); $i++) {\n $sheet->cells('B'.$sub_number_arr[$i], function ($cells) {\n $cells->setAlignment('center');\n $cells->setFontColor('#4286f4');\n $cells->setFontWeight('bold');\n });\n }\n /**END */\n \n /**\n * Start Sub headers Letters for no.2 A, B, C, D, E, F\n * 2 To ensure steady growth of client base in all areas regardless of territory and to ensure that proposals made to prospective clients are accepted\n */\n $sub_letters_arr = [31, 51, 71, 91, 111, 131, 151];\n \n $sheet->cell('B31', function ($cell) {\n $cell->setValue('A');\n });\n $sheet->cell('B51', function ($cell) {\n $cell->setValue('B');\n });\n $sheet->cell('B71', function ($cell) {\n $cell->setValue('C');\n });\n $sheet->cell('B91', function ($cell) {\n $cell->setValue('D');\n });\n $sheet->cell('B111', function ($cell) {\n $cell->setValue('E');\n });\n $sheet->cell('B131', function ($cell) {\n $cell->setValue('F');\n });\n $sheet->mergeCells('B151:C151');\n $sheet->cell('B151', function ($cell) {\n $cell->setValue('F.1 FOR ANALYSIS ONLY');\n });\n \n for ($i = 0; $i < count($sub_letters_arr); $i++) {\n $sheet->cells('B'.$sub_letters_arr[$i], function ($cells) {\n $cells->setAlignment('left');\n $cells->setFontColor('#4286f4');\n $cells->setFontWeight('bold');\n });\n }\n /** END */\n /**\n * 5.A | 5.B | 5.C | 5.D | 5.E\n */\n\n $sub5_letters_arr = [215, 237, 259, 281, 303];\n \n $sheet->cell('B215', function ($cell) {\n $cell->setValue('A');\n });\n $sheet->cell('B237', function ($cell) {\n $cell->setValue('B');\n });\n $sheet->cell('B259', function ($cell) {\n $cell->setValue('C');\n });\n $sheet->cell('B281', function ($cell) {\n $cell->setValue('D');\n });\n $sheet->cell('B303', function ($cell) {\n $cell->setValue('E');\n });\n \n for ($i = 0; $i < count($sub5_letters_arr); $i++) {\n $sheet->cells('B'.$sub5_letters_arr[$i], function ($cells) {\n $cells->setAlignment('left');\n $cells->setFontColor('#4286f4');\n $cells->setFontWeight('bold');\n });\n }\n /** END */\n\n $sub_row_no2 = [10, 32, 52, 72, 92, 112, 132, 152, 173, 194, 216, 238, 260, 282, 304];\n for ($i = 0; $i < count($sub_row_no2); $i++) {\n $sheet->mergeCells('B'.$sub_row_no2[$i].':'.'F'.$sub_row_no2[$i]);\n \n $sheet->setBorder('B'.$sub_row_no2[$i].':'.'F'.$sub_row_no2[$i], 'thick');\n $sheet->cells('B'.$sub_row_no2[$i].':'.'F'.$sub_row_no2[$i], function ($cells) {\n $cells->setAlignment('center');\n $cells->setValignment('center');\n $cells->setFontWeight('bold');\n });\n $sheet->getStyle('B'.$sub_row_no2[$i])->getAlignment()->setWrapText(true);\n }\n /**Start A header/subheaders */\n $sheet->cell('B10', function ($cell) {\n $cell->setValue('Increase in prospective clients listing vs No. of clients per existing database');\n });\n $sheet->cell('B11', function ($cell) {\n $cell->setValue('Months');\n });\n \n $sheet->cell('C11', function ($cell) {\n $cell->setValue('Increase in prospective clients listing');\n });\n $sheet->getStyle('C11')->getAlignment()->setWrapText(true);\n\n $sheet->cell('D11', function ($cell) {\n $cell->setValue('Target increase in prospective clients listing per existing database');\n $cell->setFontSize(9);\n });\n $sheet->getStyle('D11')->getAlignment()->setWrapText(true); //Wrap text for this cell\n\n $sheet->cell('E11', function ($cell) {\n $cell->setValue('Percentage %');\n });\n\n $sheet->cell('F11', function ($cell) {\n $cell->setValue('Target');\n });\n /**END */\n \n /**\n * START 2.A headers\n */\n $sheet->cell('B32', function ($cell) {\n $cell->setValue('Target No. of Calls vs. No. of Calls made');\n });\n $sub2A_headers_arr = [\n 'B33' => 'Months', 'C33' => 'No. of Calls Made', 'D33'=>'Target No. of Calls Made',\n 'E33' =>'Percentage %', 'F33' => 'Target'\n ];\n foreach ($sub2A_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B33:F33', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /** END */\n /**\n * Start 2.B headers\n */\n $sheet->cell('B52', function ($cell) {\n $cell->setValue('No. of productive calls made vs. Actual No. of proposal sent related to calls made');\n });\n $sub2B_headers_arr = [\n 'B53' => 'Months', 'C53' => 'Actual No. of proposal sent related to calls made', 'D53'=>'No. of Productive Calls',\n 'E53' =>'Percentage %', 'F53' => 'Target'\n ];\n foreach ($sub2B_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B53:F53', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /** END */\n\n /**START 2C header */\n $sheet->cell('B72', function ($cell) {\n $cell->setValue('Actual No. of Proposal sent vs Target Proposal to be sent out');\n });\n $sub2C_headers_arr = [\n 'B73' => 'Months', 'C73' => 'Actual No. of proposal sent', 'D73'=>'Target Proposal to be sent out',\n 'E73' =>'Percentage %', 'F73' => 'Target'\n ];\n foreach ($sub2C_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B73:F73', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n\n /**END */\n\n /**START 2D header*/\n $sheet->cell('B92', function ($cell) {\n $cell->setValue('No. of proposal submitted vs No. of proposals received and accepted');\n });\n $sub2D_headers_arr = [\n 'B93' => 'Months', 'C93' => 'No. of proposals receive and accepted', 'D93'=>'Actual No. of Proposal sent',\n 'E93' =>'Percentage %', 'F93' => 'Target'\n ];\n foreach ($sub2D_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B93:F93', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /**END */\n\n /**START 2E header */\n $sheet->cell('B112', function ($cell) {\n $cell->setValue('No. of proposals received and accepted vs. No. of Follow-up calls made related to accepted and received proposals');\n });\n $sub2E_headers_arr = [\n 'B113' => 'Months', 'C113' => 'No. of follow-up calls made related to submitted proposals', 'D113'=>'No. of Proposals received and accepted',\n 'E113' =>'Percentage %', 'F113' => 'Target'\n ];\n foreach ($sub2E_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B113:F113', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /**END */\n\n /**START 2F */\n $sheet->cell('B132', function ($cell) {\n $cell->setValue('Actual No. of Formal Presentation vs. Target Number of Formal Presentation');\n });\n $sub2F_headers_arr = [\n 'B133' => 'Months', 'C133' => 'Actual No. of Formal Presentation', 'D133'=>'Target Number of Formal Presentation',\n 'E133' =>'Percentage %', 'F133' => 'Target'\n ];\n foreach ($sub2F_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B133:F133', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /**END */\n\n /**START 2F.1 FOR ANALYSIS ONLY */\n $sheet->cell('B152', function ($cell) {\n $cell->setValue('Actual No. of CALL Presentation vs. Actual No. of Formal Presentation');\n });\n $sub2F1_headers_arr = [\n 'B153' => 'Months', 'C153' => 'Actual No. of Call Presentation', 'D153'=>'Actual No. of Formal Presentation',\n 'E153' =>'Percentage %', 'F153' => 'Target'\n ];\n foreach ($sub2F1_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B153:F153', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /**END */\n\n /**START 3. */\n $sheet->cell('B173', function ($cell) {\n $cell->setValue('Number of Newly acquired Client');\n });\n $sub3_headers_arr = [\n 'B174' => 'Months', 'C174' => 'Number of client acquired', 'D174'=>'Target Number of client to be acquired',\n 'E174' =>'Percentage %', 'F174' => 'Target'\n ];\n foreach ($sub3_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B174:F174', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /**END */\n\n /**START 4 */\n $sheet->cell('B194', function ($cell) {\n $cell->setValue('Number of duly-signed contracts vs. number of client acquired');\n });\n $sub4_headers_arr = [\n 'B195' => 'Months', 'C195' => 'Number duly-signed contract/s', 'D195'=>'Number of client acquired',\n 'E195' =>'Percentage %', 'F195' => 'Target'\n ];\n foreach ($sub4_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B195:F195', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /**END */\n\n /**\n * START 5.A headers\n */\n $sheet->cell('B216', function ($cell) {\n $cell->setValue('No. of Nonconformity raised vs. No. of Issued CPIAR for the Conformities raised');\n });\n $sub5A_headers_arr = [\n 'B217' => 'Months', 'C217' => 'No. of Nonconformity raised', 'D217'=>'No. of Issued CPIAR for Nonconformities raised',\n 'E217' =>'Percentage %', 'F217' => 'Target'\n ];\n foreach ($sub5A_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B217:F217', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /** END */\n\n /**\n * START 5.B headers\n */\n $sheet->cell('B238', function ($cell) {\n $cell->setValue('No. of Improvement raised vs. No. of Issued CPIAR for the Observations raised');\n });\n $sub5B_headers_arr = [\n 'B239' => 'Months', 'C239' => 'No. of Improvement raised', 'D239'=>'No. of Issued CPIAR for the Observation raised',\n 'E239' =>'Percentage %', 'F239' => 'Target'\n ];\n foreach ($sub5B_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B239:F239', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /** END */\n\n /**\n * START 5.C headers\n */\n $sheet->cell('B260', function ($cell) {\n $cell->setValue('No. of Nonconformity resolved vs. No. of Issued CPIAR for the Conformities raised');\n });\n $sub5C_headers_arr = [\n 'B261' => 'Months', 'C261' => 'No. of Nonconformity resolved', 'D261'=>'No. of Issued CPIAR for the Nonconformities raised',\n 'E261' =>'Percentage %', 'F261' => 'Target'\n ];\n foreach ($sub5C_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B261:F261', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /** END */\n\n /**\n * START 5.D headers\n */\n $sheet->cell('B282', function ($cell) {\n $cell->setValue('No. of effected improvement vs. No. of Issued CPIAR for the obeservation raised');\n });\n $sub5D_headers_arr = [\n 'B283' => 'Months', 'C283' => 'No. of effected improvement', 'D283'=>'No. of Issued CPIAR for the Observation raised',\n 'E283' =>'Percentage %', 'F283' => 'Target'\n ];\n foreach ($sub5D_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B283:F283', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /** END */\n\n /**\n * START 5.E headers\n */\n $sheet->cell('B304', function ($cell) {\n $cell->setValue('No. of nonrecurring Nonconformity vs. No. of Issued CPIAR for the Nonconformities raise');\n });\n $sub5E_headers_arr = [\n 'B305' => 'Months', 'C305' => 'No. of Nonconformity raised without recurrence', 'D305'=>'No. of Issued CPIAR for the Nonconformities raised',\n 'E305' =>'Percentage %', 'F305' => 'Target'\n ];\n foreach ($sub5E_headers_arr as $cell => $value) {\n $sheet->cell($cell, function ($cell) use ($value) {\n $cell->setValue($value);\n });\n $sheet->getStyle($cell)->getAlignment()->setWrapText(true);\n }\n $sheet->cells('B305:F305', function ($cells) {\n $cells->setFontWeight('bold');\n $cells->setAlignment('center');\n $cells->setValignment('center');\n });\n /** END */\n \n /** Start styling of row of Months, subheaders. */\n $table_col_header = ['B', 'C', 'D', 'E', 'F'];\n $table_header_arr = [11, 33, 53, 73, 93, 113, 133, 153, 174, 195, 217, 239, 261, 283, 305];\n for ($i = 0; $i < count($table_col_header); $i++) {\n for ($j = 0; $j < count($table_header_arr); $j++) {\n $sheet->cells($table_col_header[$i].$table_header_arr[$j], function ($cells) {\n $cells->setBorder('thick', 'thick', 'thin', 'thick');\n });\n }\n }\n \n \n /**\n * Set column header for status\n */\n\n $status_header_arr = [ 10 => 11, 32 => 33, 52 => 53, 72 => 73, 92 => 93, 112 => 113, 132 => 133, 152 => 153, 173 => 174, 194 => 195, 216 => 217, 238 => 239, 260 => 261, 282 => 283, 304 => 305];\n foreach ($status_header_arr as $row1 => $row2) {\n $sheet->mergeCells('G'.$row1.':G'.$row2);\n $sheet->cells('G'.$row1.':G'.$row2, function ($cells) {\n $cells->setAlignment('center');\n $cells->setValignment('center');\n $cells->setFontWeight('bold');\n $cells->setBorder('thick', 'thick', 'thin', 'thick');\n });\n $sheet->mergeCells('H'.$row1.':H'.$row2);\n $sheet->cells('H'.$row1.':H'.$row2, function ($cells) {\n $cells->setAlignment('center');\n $cells->setValignment('center');\n $cells->setFontWeight('bold');\n $cells->setBorder('thick', 'thick', 'thin', 'thick');\n });\n $sheet->mergeCells('I'.$row1.':I'.$row2);\n $sheet->cells('I'.$row1.':I'.$row2, function ($cells) {\n $cells->setAlignment('center');\n $cells->setValignment('center');\n $cells->setFontWeight('bold');\n $cells->setBorder('thick', 'thick', 'thin', 'thick');\n });\n $sheet->mergeCells('J'.$row1.':J'.$row2);\n $sheet->cells('J'.$row1.':J'.$row2, function ($cells) {\n $cells->setAlignment('center');\n $cells->setValignment('center');\n $cells->setFontWeight('bold');\n $cells->setBorder('thick', 'thick', 'thin', 'thick');\n });\n $sheet->cell('G'.$row1, function ($cell) {\n $cell->setValue('Status');\n });\n $sheet->cell('H'.$row1, function ($cell) {\n $cell->setValue('Other details and/or Explanation if below the target');\n });\n $sheet->setSize('H'.$row1, 58.57, 50);\n $sheet->cell('I'.$row1, function ($cell) {\n $cell->setValue('Actions to be Taken (Action Plans)');\n });\n $sheet->setSize('I'.$row1, 37.57, 40);\n $sheet->cell('J'.$row1, function ($cell) {\n $cell->setValue('Commit Date');\n });\n $sheet->setSize('J'.$row1, 20, 30);\n }\n /**\n * Set row attribute for rows\n */\n $sheet->row(11, function ($row) {\n $row->setAlignment('center');\n $row->setValignment('center');\n $row->setFontWeight('bold');\n });\n /**\n * Set alignment/border for row 12 to 23\n * This is the cells that contains data\n * used in foreach\n * */\n \n $column_header = ['B','C','D', 'E', 'F','G','H','I','J'];\n /** Start report 1 cell styling */\n for ($i = 12; $i <= 27; $i++) {\n $sheet->row($i, function ($row) {\n $row->setAlignment('center');\n $row->setValignment('center');\n });\n for ($j = 0; $j < count($column_header); $j++) {\n $sheet->cells($column_header[$j].$i, function ($cells) {\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n }\n }\n /**END */\n /** Start report 2A */\n for ($i = 34; $i <= 49; $i++) {\n $sheet->row($i, function ($row) {\n $row->setAlignment('center');\n $row->setValignment('center');\n });\n for ($j = 0; $j < count($column_header); $j++) {\n $sheet->cells($column_header[$j].$i, function ($cells) {\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n }\n }\n /**END */\n /** Start report 2B */\n for ($i = 54; $i <= 69; $i++) {\n $sheet->row($i, function ($row) {\n $row->setAlignment('center');\n $row->setValignment('center');\n });\n for ($j = 0; $j < count($column_header); $j++) {\n $sheet->cells($column_header[$j].$i, function ($cells) {\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n }\n }\n /**END */\n /** Start report 2C */\n for ($i = 74; $i <= 89; $i++) {\n $sheet->row($i, function ($row) {\n $row->setAlignment('center');\n $row->setValignment('center');\n });\n for ($j = 0; $j < count($column_header); $j++) {\n $sheet->cells($column_header[$j].$i, function ($cells) {\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n }\n }\n /**END */\n /** Start report 2D */\n for ($i = 94; $i <= 109; $i++) {\n $sheet->row($i, function ($row) {\n $row->setAlignment('center');\n $row->setValignment('center');\n });\n for ($j = 0; $j < count($column_header); $j++) {\n $sheet->cells($column_header[$j].$i, function ($cells) {\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n }\n }\n /**END */\n /** Start report 2E */\n for ($i = 114; $i <= 129; $i++) {\n $sheet->row($i, function ($row) {\n $row->setAlignment('center');\n $row->setValignment('center');\n });\n for ($j = 0; $j < count($column_header); $j++) {\n $sheet->cells($column_header[$j].$i, function ($cells) {\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n }\n }\n /**END */\n /** Start report 2F */\n for ($i = 134; $i <= 149; $i++) {\n $sheet->row($i, function ($row) {\n $row->setAlignment('center');\n $row->setValignment('center');\n });\n for ($j = 0; $j < count($column_header); $j++) {\n $sheet->cells($column_header[$j].$i, function ($cells) {\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n }\n }\n /**END */\n /** Start report 2F.1 */\n for ($i = 154; $i <= 169; $i++) {\n $sheet->row($i, function ($row) {\n $row->setAlignment('center');\n $row->setValignment('center');\n });\n for ($j = 0; $j < count($column_header); $j++) {\n $sheet->cells($column_header[$j].$i, function ($cells) {\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n }\n }\n /**END */\n /** Start report 3 */\n for ($i = 175; $i <= 190; $i++) {\n $sheet->row($i, function ($row) {\n $row->setAlignment('center');\n $row->setValignment('center');\n });\n for ($j = 0; $j < count($column_header); $j++) {\n $sheet->cells($column_header[$j].$i, function ($cells) {\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n }\n }\n /**END */\n /** Start report 4 */\n for ($i = 196; $i <= 211; $i++) {\n $sheet->row($i, function ($row) {\n $row->setAlignment('center');\n $row->setValignment('center');\n });\n for ($j = 0; $j < count($column_header); $j++) {\n $sheet->cells($column_header[$j].$i, function ($cells) {\n $cells->setBorder('thin', 'thin', 'thin', 'thin');\n });\n }\n }\n /**END */\n \n /**\n * For report #5 with different format (Quarter and Semister)\n **/\n $rep5_months = (object) [\n 0 => 'JANUARY', 1 => 'FEBRUARY', 2 =>'MARCH', 3 =>'Q1',\n 4 =>'APRIL', 5 =>'MAY', 6 =>'JUNE' , 7 => 'Q2', 8 => 'SEM 1',\n 9 => 'JULY', 10 => 'AUGUST', 11 => 'SEPTEMBER', 12 => 'Q3',\n 13 => 'OCTOBER', 14 => 'NOVEMBER', 15 => 'DECEMBER', 16 => 'Q4', 17 => 'SEM 2'\n // [\n // 'month' => 'JANUARY',\n // 'quarter' => 'Q1',\n // 'semester' => 'SEM 1',\n // ],\n // [\n // 'month' => 'FEBRUARY',\n // 'quarter' => 'Q1',\n // 'semester' => 'SEM 1',\n // ],\n // [\n // 'month' => 'MARCH',\n // 'quarter' => 'Q1',\n // 'semester' => 'SEM 1',\n // ],\n // [\n // 'month'=>'APRIL',\n // 'quarter' => 'Q2',\n // 'semester' => 'SEM 1',\n // ],\n // [\n // 'month'=>'MAY',\n // 'quarter' => 'Q2',\n // 'semester' => 'SEM 1',\n // ],\n // [\n // 'month'=>'JUNE',\n // 'quarter' => 'Q2',\n // 'semester' => 'SEM 1',\n // ],\n // [\n // 'month'=>'JULY',\n // 'quarter' => 'Q3',\n // 'semester' => 'SEM 2',\n // ],\n // [\n // 'month'=>'AUGUST',\n // 'quarter' => 'Q3',\n // 'semester' => 'SEM 2',\n // ],\n // [\n // 'month'=>'SEPTEMBER',\n // 'quarter' => 'Q3',\n // 'semester' => 'SEM 2',\n // ],\n // [\n // 'month'=>'OCTOBER',\n // 'quarter' => 'Q4',\n // 'semester' => 'SEM 2',\n // ],\n // [\n // 'month'=>'NOVEMBER',\n // 'quarter' => 'Q4',\n // 'semester' => 'SEM 2',\n // ],\n // [\n // 'month'=>'DECEMBER',\n // 'quarter' => 'Q4',\n // 'semester' => 'SEM 2',\n // ]\n ];\n\n /**\n * Printing report months\n **/\n $rep5A_row = 218;\n $rep5B_row = 240;\n $rep5C_row = 262;\n $rep5D_row = 284;\n $rep5E_row = 306;\n\n foreach ($rep5_months as $key => $value) {\n //$sheet->setCellValueByColumnAndRow(1, $rep5A_row + $key, $value['month']);\n $r1 = $rep5A_row + $key;\n $r2 = $rep5B_row + $key;\n $r3 = $rep5C_row + $key;\n $r4 = $rep5D_row + $key;\n $r5 = $rep5E_row + $key;\n /** set months for 5.A */\n $sheet->setCellValueByColumnAndRow(1, $r1, $value);\n $sheet->setCellValueByColumnAndRow(2, $r1, 0);\n $sheet->setCellValueByColumnAndRow(4, $r1, '-');\n $sheet->setCellValueByColumnAndRow(5, $r1, '100%');\n $sheet->setCellValueByColumnAndRow(6, $r1, 'MET');\n /** set months for 5.B */\n $sheet->setCellValueByColumnAndRow(1, $r2, $value);\n $sheet->setCellValueByColumnAndRow(2, $r2, 0);\n $sheet->setCellValueByColumnAndRow(4, $r2, '-');\n $sheet->setCellValueByColumnAndRow(5, $r2, '100%');\n $sheet->setCellValueByColumnAndRow(6, $r2, 'MET');\n /** set months for 5.C */\n $sheet->setCellValueByColumnAndRow(1, $r3, $value);\n $sheet->setCellValueByColumnAndRow(2, $r3, 0);\n $sheet->setCellValueByColumnAndRow(4, $r3, '-');\n $sheet->setCellValueByColumnAndRow(5, $r3, '100%');\n $sheet->setCellValueByColumnAndRow(6, $r3, 'MET');\n /** set months for 5.D */\n $sheet->setCellValueByColumnAndRow(1, $r4, $value);\n $sheet->setCellValueByColumnAndRow(2, $r4, 0);\n $sheet->setCellValueByColumnAndRow(4, $r4, '-');\n $sheet->setCellValueByColumnAndRow(5, $r4, '100%');\n $sheet->setCellValueByColumnAndRow(6, $r4, 'MET');\n /** set months for 5.E */\n $sheet->setCellValueByColumnAndRow(1, $r5, $value);\n $sheet->setCellValueByColumnAndRow(2, $r5, 0);\n $sheet->setCellValueByColumnAndRow(4, $r5, '-');\n $sheet->setCellValueByColumnAndRow(5, $r5, '100%');\n $sheet->setCellValueByColumnAndRow(6, $r5, 'MET');\n\n if ($value == 'Q1' || $value == 'Q2' || $value == 'Q3' || $value == 'Q4' || $value == 'SEM 1' || $value == 'SEM 2') {\n $sheet->cells('B'.$r1.':G'.$r1, function ($cells) {\n $cells->setFontWeight('bold');\n });\n $sheet->cells('B'.$r2.':G'.$r2, function ($cells) {\n $cells->setFontWeight('bold');\n });\n $sheet->cells('B'.$r3.':G'.$r3, function ($cells) {\n $cells->setFontWeight('bold');\n });\n $sheet->cells('B'.$r4.':G'.$r4, function ($cells) {\n $cells->setFontWeight('bold');\n });\n $sheet->cells('B'.$r5.':G'.$r5, function ($cells) {\n $cells->setFontWeight('bold');\n });\n }\n /** Set horizontal alignment to center for 5.A to 5.E */\n $sheet->cells('B'.$r1.':J'.$r1, function ($cells) {\n $cells->setAlignment('center');\n });\n $sheet->cells('B'.$r2.':J'.$r2, function ($cells) {\n $cells->setAlignment('center');\n });\n $sheet->cells('B'.$r3.':J'.$r3, function ($cells) {\n $cells->setAlignment('center');\n });\n $sheet->cells('B'.$r4.':J'.$r4, function ($cells) {\n $cells->setAlignment('center');\n });\n $sheet->cells('B'.$r5.':J'.$r5, function ($cells) {\n $cells->setAlignment('center');\n });\n $sheet->setBorder('B'.$r1.':J'.$r1, 'thin');\n $sheet->setBorder('B'.$r2.':J'.$r2, 'thin');\n $sheet->setBorder('B'.$r3.':J'.$r3, 'thin');\n $sheet->setBorder('B'.$r4.':J'.$r4, 'thin');\n $sheet->setBorder('B'.$r5.':J'.$r5, 'thin');\n }\n\n /**\n * END\n **/\n\n /**\n * SET COLUMN WIDTH\n * You can set multiple columns here\n */\n $sheet->setWidth(\n array(\n 'A' => 3.86,\n 'B' => 14.30,\n 'C' => 14,\n 'D' => 18,\n 'E' => 22,\n 'F' => 14,\n 'G' => 17\n )\n );\n /**\n * Set height for multitple rows\n */\n $sheet->setHeight(array(\n 10 => 31.5,\n 112 => 33\n ));\n /**\n * Set single cell size\n */\n // $sheet->setSize(array(\n // 'C6' => array(\n // 'width' => 17.43,\n // 'height' => 500\n // )\n // ));\n /**\n * Set Sheet Protection settings\n * excel itself is not supported in PHPExcel\n * only in PHPSpreadsheet\n */\n $sheet->getProtection()->setPassword('l0cl!$t');\n $sheet->getProtection()->setSheet(true);\n $sheet->getProtection()->setSort(true);\n $sheet->getProtection()->setInsertRows(true);\n $sheet->getProtection()->setFormatCells(true);\n });\n });\n\n $filename = $file->filename;\n $file = $file->string('xlsx');\n\n return [\n 'filename' => $filename,\n 'file' => \"data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,\".base64_encode($file),\n 'year' => $report_year\n ];\n }", "public function emp_report(Request $request){\n\t\t$inputs['month'] = date('m');\n\t\t$inputs['year'] = date('Y');\n\t\t$data['inputs'] = $inputs;\n\t\t$fromDate =$inputs['year'].'-'.$inputs['month'].'-'.'1';\n\t\t$toDate=$inputs['year'].'-'.$inputs['month'].'-'.date('t');\n $range = [$fromDate, $toDate]; \n\t\t//$reviews = ProjectReview::where('user_id',Auth::user()->id)->get();\n\t\t//if(Auth::user()->role == 6){\n $data = $this->prepare_report(Auth::user()->id, date('m'), date('Y'));\n $data['month'] = $inputs['month'];\n\t \t$data['year'] = $inputs['year'];\n\t\t $eod_project = Eod::where('user_id',Auth::user()->id)->whereBetween('date', $range)->distinct('project_id')->pluck('project_id');\n // dd($eod_project);\n\t\t\n\t\t if(!is_null($eod_project))\n\t\t { \n\t\t\t$data['emp_projects'] = Project::whereIn('id',$eod_project)\n\t\t\t //->join('project_reviews','project_reviews.project_id','=','projects.id')\n\t\t\t // ->whereBetween('emp_update_month', $range)\n ->get();\n\t\t }\n\t // }\n\t // if(Auth::user()->role == 4){\n\t // \t $data = $this->prepare_report(Auth::user()->id, date('m'), date('Y'));\n // $data['month'] = $inputs['month'];\n\t // \t$data['year'] = $inputs['year'];\n\t\t // $eod_project = Eod::where('user_id',Auth::user()->id)->whereBetween('date', $range)->distinct('project_id')->pluck('project_id');\n // // dd($eod_project);\n\t\t\n\t\t // if(!is_null($eod_project))\n\t\t // { \n\t\t\t// $data['emp_projects'] = Project::whereIn('id',$eod_project)\n\t\t\t// //->join('project_reviews','project_reviews.project_id','=','projects.id')\n\t\t\t// // ->whereBetween('emp_update_month', $range)\n // ->get();\n\t\t // }\n\t // }\n\t\t\n \t//print_r($data['emp_projects']);die();\n // foreach($data['emp_projects'] as $project)\n // {\n \n // \t $data['projects_review'] = ProjectReview::where('user_id',Auth::user()->id)->where('project_id',$project->project_id)->first();\n // \t // print_r($data['projects_review']);die();\n \t\n // }\n\n \t//print_r($data['projects_review']);\n\t\treturn view('common.reports.emp_report', $data); \n\t}", "public function sales_report(){\n ini_set(\"memory_limit\",\"512M\");\n $data['sideMenuData'] = fetch_non_main_page_content();\n $tenant_id = $this->tenant_id;\n $executive = array('' => 'Select');\n foreach ($this->reportsModel->get_sales_executive($tenant_id)->result() as $item) {\n $executive[$item->user_id] = $item->user_name;\n }\n $data['executive'] = $executive;\n if (!empty($_POST)) {\n $sales_executive_id = $this->input->post('sales_exec');\n $start = $this->input->post('start_date');\n $end = $this->input->post('end_date');\n $all_data = $this->reportsModel->salesrep($tenant_id,$sales_executive_id,$start,$end);\n $data['final_data']=$all_data;\n }\n if($this->input->post('start_date')=='' || $this->input->post('end_date')==''){\n $data['error']='Kindly Select The Date Range!!';\n }\n $data['page_title'] = 'Reports';\n $data['main_content'] = 'reports/sales_reports';\n $this->load->view('layout', $data);\n }" ]
[ "0.76985073", "0.7221716", "0.6984586", "0.6580522", "0.650633", "0.6465776", "0.63977027", "0.63785875", "0.6225617", "0.6208223", "0.61751956", "0.614161", "0.6124895", "0.61182946", "0.6103934", "0.61004525", "0.6095921", "0.6072185", "0.60597414", "0.603011", "0.5998244", "0.5995478", "0.5983425", "0.5981332", "0.59759796", "0.59372586", "0.5935564", "0.5927218", "0.59226745", "0.5922098", "0.590479", "0.59007955", "0.59007955", "0.5900106", "0.58973145", "0.5894927", "0.5888903", "0.58871955", "0.58842313", "0.58732855", "0.5870393", "0.58698887", "0.58634746", "0.58605564", "0.58596253", "0.5855849", "0.58441824", "0.5840623", "0.58375204", "0.58234644", "0.58159536", "0.5808022", "0.58040124", "0.57979953", "0.57958734", "0.5792192", "0.57906234", "0.57846904", "0.57832277", "0.57794446", "0.5776848", "0.57582885", "0.5753782", "0.5749917", "0.57489187", "0.5743475", "0.5737691", "0.57184625", "0.57139385", "0.571009", "0.57100767", "0.57074827", "0.57071704", "0.5702296", "0.56992954", "0.5695036", "0.5691171", "0.5691171", "0.56767", "0.5670721", "0.56659764", "0.5665527", "0.56650114", "0.56637686", "0.5652797", "0.5650575", "0.56386065", "0.5637311", "0.5636435", "0.56361204", "0.5632724", "0.56324667", "0.5628851", "0.5622147", "0.5618109", "0.5611671", "0.5610149", "0.56092715", "0.5608693", "0.56033874" ]
0.8395774
0
generate_subject_code_attendance_report function. commit 10/11/2018
public function generate_subject_code_attendance_report(){ $this->crud->credibilityAuth(array('Administrator','Registrar','Faculty')); // get inputs $con = array('subject_code'=>$this->input->post('subject_code'),'batch_year'=> $this->input->post('batch_year_id')); $range1 = $this->input->post('date_range1'); $range2 = $this->input->post('date_range2'); // get necessary report data $students = $this->admin_model->getStudentsBasicInfo($con,'a'); $attendance = $this->admin_model->getStudentAttendanceBySubjectCode($range1,$range2,$con['subject_code'],$con['batch_year']); $att_record = $this->admin_model->getStudentSubjectCodeAttendanceRecord($students,$range1,$range2,$con['subject_code'],$con['batch_year']); $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date'); // generate report data in pdf or csv format from admin_report_model if((!empty($con['subject_code']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){ if(!empty($attendance) && !empty($att_record)){ if($this->input->post('export_csv')){ $this->admin_report_model->generateStudentAttendanceBySubjectCodeCsv($attendance,$att_record,$att_dates,$con,$range1,$range2); exit; }else if($this->input->post('export_pdf')){ $this->admin_report_model->generateSubjectCodeAttendanceReportPdf($attendance,$con,$range1,$range2); } } $this->session->set_flashdata('warning', 'No reports found!.'); }else{ $this->session->set_flashdata('danger', 'Invalid input.'); } redirect('attendance_report'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generate_subject_code_remarks_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar','Faculty'));\n // get inputs\n $con = array('subject_code'=>$this->input->post('subject_code'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $students = $this->admin_model->getStudentsBasicInfo($con,'a');\n $attendance = $this->admin_model->getStudentAttendanceBySubjectCode($range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_record = $this->admin_model->getStudentSubjectCodeAttendanceRecord($students,$range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($con['subject_code']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance) && !empty($att_record)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentRemarksReportBySubjectCodeCsv($attendance,$att_record,$att_dates,$con,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateSubjectCodeAttendanceReportPdf($attendance,$con,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n }else{\n $this->session->set_flashdata('danger', 'Invalid input.');\n }\n redirect('attendance_report');\n }", "public function generate_voc_program_attendance_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar'));\n // get inputs\n $condition= array('vocational_program'=>$this->input->post('vocational_program'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $voc_program= $this->vocational_program_model->getVocationalPrograms('s',array('voc_program_id'=>$condition['vocational_program']));\n $students = $this->admin_model->getStudentsBasicInfo($condition,'a');\n $attendance = $this->admin_model->getStudentAttendanceByVocationalProgram($students,$range1,$range2,$condition['batch_year']);\n $att_record = $this->admin_model->getStudentDailyAttendanceRecord($students,$range1,$range2,$condition['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($condition['vocational_program']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentAttendanceByVocationalProgramCsv($attendance,$att_record,$att_dates,$voc_program,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateVocProgramAttendanceReportPdf($attendance,$voc_program,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n redirect('attendance_report');\n }\n $this->session->set_flashdata('danger', 'Invalid input.');\n redirect('attendance_report');\n \n }", "public function generate()\n {\n $start_year = $this->_vars['start_year'];\n $start_month = $this->_vars['start_month'];\n $start_day = $this->_vars['start_day'];\n\n $end_year = $this->_vars['end_year'];\n $end_month = $this->_vars['end_month'];\n $end_day = $this->_vars['end_day'];\n\n $code = '';\n\n if (empty($this->_vars['start']) || empty($this->_vars['end'])) {\n return $this->_vacationCode();\n } elseif ($end_year > $start_year + 1) {\n $code .= $this->_yearCheck($start_year + 1, $end_year - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\"\n . $this->_yearCheck($start_year, $start_year);\n if ($start_month < 12) {\n $code .= $this->_monthCheck($start_month + 1, 12)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, 31)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\\n\"\n . $this->_yearCheck($end_year, $end_year);\n if ($end_month > 1) {\n $code .= $this->_monthCheck(1, $end_month - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($end_month, $end_month)\n . $this->_dayCheck(1, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\";\n } elseif ($end_year == $start_year + 1) {\n $code .= $this->_yearCheck($start_year, $start_year);\n if ($start_month < 12) {\n $code .= $this->_monthCheck($start_month + 1, 12)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, 31)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\\n\"\n . $this->_yearCheck($end_year, $end_year);\n if ($end_month > 1) {\n $code .= $this->_monthCheck(1, $end_month - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($end_month, $end_month)\n . $this->_dayCheck(1, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\";\n } elseif ($end_year == $start_year) {\n $code .= $this->_yearCheck($start_year, $start_year);\n if ($end_month > $start_month) {\n if ($end_month > $start_month + 1) {\n $code .= $this->_monthCheck($start_month + 1, $end_month - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, 31)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n\"\n . $this->_monthCheck($end_month, $end_month)\n . $this->_dayCheck(1, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n\";\n } elseif ($end_month == $start_month) {\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n\";\n }\n $code .= \"}\";\n }\n\n return $code;\n }", "function generateMeetingAttendanceReport($args) {\r\n\t\tparent::validate();\r\n\t\t$this->setupTemplate();\r\n\t\t$ercMembers = Request::getUserVar('ercMembers');\r\n\t\t\r\n\t\t$fromDate = Request::getUserDateVar('dateFrom', 1, 1);\r\n\t\tif ($fromDate != null) $fromDate = date('Y-m-d H:i:s', $fromDate);\r\n\t\t$toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);\r\n\t\tif ($toDate != null) $toDate = date('Y-m-d H:i:s', $toDate);\r\n\t\t$meetingDao = DAORegistry::getDAO('MeetingDAO');\r\n\t\t$userDao = DAORegistry::getDAO('UserDAO');\r\n\t\t\r\n\t\theader('content-type: text/comma-separated-values');\r\n\t\theader('content-disposition: attachment; filename=meetingAttendanceReport-' . date('Ymd') . '.csv');\r\n\t\t\r\n\t\t$columns = array(\r\n\t\t'lastname' => Locale::translate('user.lastName'),\r\n\t\t'firstname' => Locale::translate('user.firstName'),\r\n\t\t'middlename' => Locale::translate('user.middleName'),\r\n\t\t'meeting_date' => Locale::translate('editor.reports.meetingDate'),\r\n\t\t'present' => Locale::translate('editor.reports.isPresent'),\r\n\t\t'reason_for_absence' => Locale::translate('editor.reports.reason')\r\n\t\t);\r\n\t\t$yesNoArray = array('present');\r\n\t\t$yesnoMessages = array( 0 => Locale::translate('common.no'), 1 => Locale::translate('common.yes'));\r\n\t\t$fp = fopen('php://output', 'wt');\r\n\t\tString::fputcsv($fp, array_values($columns));\r\n\t\t\r\n\t\tforeach ($ercMembers as $member) {\r\n\t\t\t$user = $userDao->getUser($member);\r\n\t\t\tlist($meetingsIterator) = $meetingDao->getMeetingReportByReviewerId($member, $fromDate, $toDate);\r\n\t\t\r\n\t\t\t$meetings = array();\r\n\t\t\twhile ($row =& $meetingsIterator->next()) {\r\n\t\t\t\tforeach ($columns as $index => $junk) {\r\n\t\t\t\t\tif (in_array($index, $yesNoArray)) {\r\n\t\t\t\t\t\t$columns[$index] = $yesnoMessages[$row[$index]];\r\n\t\t\t\t\t} elseif ($index == \"lastname\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getLastName();\r\n\t\t\t\t\t} elseif ($index == \"firstname\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getFirstName();\r\n\t\t\t\t\t} elseif ($index == \"middlename\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getMiddleName();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$columns[$index] = $row[$index];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString::fputcsv($fp, $columns);\r\n\t\t\t\tunset($row);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfclose($fp);\r\n\t}", "abstract public function buildReport();", "public function genattpdf($getatt){\n\t\t$data['getatt']=$getatt;\n\t\t\tforeach($getatt as $row){\n\t\t\t\t$asmid=$row->ca_asmid;\n\t\t\t\t$centerid=$row->ca_centername;\n\t\t\t\t$cname = $this->commodel->get_listspfic1('admissionstudent_enterenceexamcenter','eec_name','eec_id',$centerid)->eec_name;\n\t\t\t\t$year=date('Y');\n \t \t// move file to directory code for photo\n\t\t\t\t$desired_dir = 'uploads/SLCMS/enterenceadmin_student/'.$year;\n \t// Create directory if it does not exist\n \tif(is_dir($desired_dir)==false){\n \t\tmkdir(\"$desired_dir\", 0700);\n \t}\n\n \t \t$desired_dir = 'uploads/SLCMS/enterenceadmin_student/'.$year.'/attendence';\n \t// Create directory if it does not exist\n \tif(is_dir($desired_dir)==false){\n \t\tmkdir(\"$desired_dir\", 0700);\n \t\t }\n\n\t\t\t\t$this->acadyear = $this->usermodel->getcurrentAcadYear();\n\t\t\t\t\t\t\n\t\t\t\t//add pdf code to store and view pdf file\n\t\t\t\t$temp = $this->load->view('enterenceadmin/attendencepdf', $data, TRUE);\n\t\t\t\t//$pth='uploads/SLCMS/enterenceadmin_student/'.$year.'/attendence/'.$cname.'.pdf';\n\t\t\t\t$pth='uploads/SLCMS/enterenceadmin_student/'.$year.'/attendence/'.$centerid.'.pdf';\n\t\t\t\t$this->commodel->genpdf($temp,$pth);\n\t\t\t\t$master = array(\n\t\t \t\t'ca_attendencesheetstatus' => 'Y',\n\t \t \t\t);\n \t\t\t\t$this->commodel->updaterec('admissionstudent_centerallocation', $master,'ca_asmid',$asmid);\n\t\t\t\t$this->logger->write_logmessage(\"update\", \"Attendence sheet status update yes in admissionstudent_centerallocation\");\n \t\t$this->logger->write_dblogmessage(\"update\", \"Attendence sheet status update yes in admissionstudent_centerallocation\" );\n\t\t\t}\n\t}", "function attendance_report() {\n if ($this->session->userdata('parent_login') != 1)\n redirect(base_url(), 'refresh');\n $student_id = $student_id = $this->session->userdata('parent_id');\n if ($this->input->post('month') != '' && $this->input->post('year') != '') {\n $page_data['month'] = $this->input->post('month');\n $page_data['year'] = $this->input->post('year');\n } else {\n $page_data['month'] = '';\n $page_data['year'] = '';\n }\n $page_data['student'] = $this->db->get_where('student', array('student_id' => $student_id))->row()->name;\n $page_data['student_id'] = $student_id;\n $page_data['page_name'] = 'attendance_report';\n $image = $this->db->get_where('student', array('student_id' => $student_id))->row()->image;\n $image_url = $this->crud_model->get_image_url('student', $image);\n $page_data['parent_page_title'] = \"<img src='$image_url'\" . 'class=\"img-circle\"' . 'width=\"40\"' . \"/>\" . $page_data['student'];\n $page_data['page_title'] = $page_data['student'];\n $this->load->view('backend/index', $page_data);\n }", "public function dtexamattemptreport()\n {\n $condition = \"\";\n $search_type = $this->input->post('search_type');\n $date_type = $this->input->post('date_type');\n $date_from = $this->input->post('date_from');\n $date_to = $this->input->post('date_to');\n $data['searchlist'] = $this->customlib->get_searchtype();\n $data['date_type'] = $this->customlib->date_type();\n\n $data['date_typeid'] = '';\n if (isset($search_type) && $search_type != '') {\n $dates = $this->customlib->get_betweendate($search_type);\n $data['search_type'] = $search_type;\n } else {\n $dates = $this->customlib->get_betweendate('this_year');\n $data['search_type'] = '';\n }\n\n $start_date = date('Y-m-d', strtotime($dates['from_date']));\n $end_date = date('Y-m-d', strtotime($dates['to_date']));\n\n $data['label'] = date($this->customlib->getSchoolDateFormat(), strtotime($start_date)) . \" \" . $this->lang->line('to') . \" \" . date($this->customlib->getSchoolDateFormat(), strtotime($end_date));\n\n if (isset($_POST['date_type']) && $_POST['date_type'] != '') {\n\n $data['date_typeid'] = $_POST['date_type'];\n\n if ($search_type == 'exam_from_date') {\n\n $condition .= \" and date_format(onlineexam.exam_from,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n\n } elseif ($date_type == 'exam_to_date') {\n $condition .= \" and date_format(onlineexam.exam_to,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n }\n\n } else {\n\n $condition .= \" and date_format(onlineexam.created_at,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n\n }\n\n $result = $this->onlineexam_model->onlineexamatteptreport($condition);\n $sch_setting = $this->sch_setting_detail;\n $resultlist = json_decode($result);\n $dt_data = array();\n\n if (!empty($resultlist->data)) {\n foreach ($resultlist->data as $resultlist_key => $student_value) {\n\n $exams = explode(',', $student_value->exams);\n\n $exam_name = '';\n $exam_from = '';\n $exam_to = '';\n $exam_duration = '';\n $exam_publish = \"\";\n $exam_resultpublish = \"\";\n $exam_publishprint = \"\";\n $exam_resultpublishprint = \"\";\n foreach ($exams as $exams_key => $exams_value) {\n $exam_details = explode('@', $exams_value);\n\n if (count($exam_details) == 9) {\n\n $exam_name .= $exam_details[1];\n $exam_from .= date($this->customlib->getSchoolDateFormat(), $this->customlib->dateYYYYMMDDtoStrtotime($exam_details[3]));\n $exam_to .= date($this->customlib->getSchoolDateFormat(), $this->customlib->dateYYYYMMDDtoStrtotime($exam_details[4]));\n $exam_duration .= $exam_details[5];\n $exam_publish .= ($exam_details[7] == 1) ? \"<i class='fa fa-check-square-o'></i>\" : \"<i class='fa fa-exclamation-circle'></i>\";\n $exam_resultpublish .= ($exam_details[8] == 1) ? \"<i class='fa fa-check-square-o'></i>\" : \"<i class='fa fa-exclamation-circle'></i>\";\n\n $exam_publishprint .= ($exam_details[7] == 1) ? \"<span style='display:none'>Yes</span>\" : \"<span style='display:none'>No</span>\";\n $exam_resultpublishprint .= ($exam_details[8] == 1) ? \"<span style='display:none'>Yes</span>\" : \"<span style='display:none'>No</span>\";\n\n $exam_name .= '<br>';\n $exam_from .= \"<br>\";\n $exam_to .= \"<br>\";\n $exam_duration .= \"<br>\";\n $exam_publish .= \"<br>\";\n $exam_resultpublish .= \"<br>\";\n $exam_publishprint .= \"<br>\";\n $exam_resultpublishprint .= \"<br>\";\n }\n }\n\n $row = array();\n $row[] = $this->customlib->getFullName($student_value->firstname, $student_value->middlename, $student_value->lastname, $sch_setting->middlename, $sch_setting->lastname);\n $row[] = $student_value->admission_no;\n\n $row[] = $student_value->class;\n $row[] = $student_value->section;\n $row[] = $exam_name;\n $row[] = $exam_from;\n $row[] = $exam_to;\n $row[] = $exam_duration;\n $row[] = $exam_publish . $exam_publishprint;\n $row[] = $exam_resultpublish . $exam_resultpublishprint;\n\n $dt_data[] = $row;\n }\n\n }\n $json_data = array(\n \"draw\" => intval($resultlist->draw),\n \"recordsTotal\" => intval($resultlist->recordsTotal),\n \"recordsFiltered\" => intval($resultlist->recordsFiltered),\n \"data\" => $dt_data,\n );\n echo json_encode($json_data);\n }", "function generate_weekly_report_txt($c_data=array()){\n\t\t\n\t\tApp::import('Helper','txt');\n\t\t$txt = new txtHelper();\n\t\t$line = array(\"Store number\",\"Terminal\",\"Vendor\",\"Product\",\"Item\",\"Face Value\",\"Billed downloads\",\"Billed returns\",\"Net Billed Downloads\",\"Net Face Value\",\"Net Cost\",\"Net Commission\",\"Merchant\",\"Site\",\"Street\",\"Postcode\",\"City\",\"Duplicate Downloads\",\"All Downloads\",\"Duplicate Returns\",\"All Returns\",\"Net All Downloads\",\"Download Face Value\",\"Download Cost\",\"Download Commission\",\"Return Face Value\",\"Return Cost\",\"Return Commission\",\"From\",\"To\");\n\t\t$txt->addRow($line);\n\t\tif(!empty($c_data)){\n\t\t\tforeach($c_data as $data){\n\t\t\t\n\t\t\t\t$line = array($data['u']['u_id'],'X','X','X',$data['p']['p_id'],'X',$data['0']['total'],'X',$data['0']['total'],'X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X');\n\t\t\t\t$txt->addRow($line);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\techo $txt->render(date(\"d_M_Y_h_i_s\").\"_weekly\");\n\t\texit();\n\t}", "public function report($typeId = null, $reportDate = null, $numOfDays = null, $classId = null, $sectionId = null)\n\t{\t\t\t\n\t\t$year = substr($reportDate, 0, 4);\n\t\t$month = substr($reportDate, 5, 7);\t\t\n\n\t\t$classData = $this->model_classes->fetchClassData($classId);\n\t\t$sectionData = $this->model_section->fetchSectionByClassSection($classId, $sectionId);\n\n\t\t\t// student\t\t\t\n\t\t\t$div = '<div class=\"well\">\n\t\t\t\t<center>\n\t\t\t\t\t<h4> Ngành học: '.$classData['class_name'].'<br> Lớp học : '.$sectionData['section_name'].'<h4>\n\t\t\t\t\t<h4> Năm : '.$year.' - Month :'.$month.'<h4>\t\t\n\t\t\t\t\t<small>\t\n\t\t\t\t\t\t1 : Tiết 1-2 ( 7h00-8h45) <br />\t\t\t\t\n\t\t\t\t\t\t2 : Tiết 3-4 (9h-10h45) <br />\n\t\t\t\t\t\t3 : Tiết 5-6 (13h - 14h45)<br />\n\t\t\t\t\t\t4 : Tiết 7-8 (15h-16h45)<br />\n\t\t\t\t\t\t\t5 : Tiết 9-10 (17h00 - 18h45)<br />\n\t\t\t\t\t</small>\n\t\t\t\t</center>\n\t\t\t</div>\n\n\t\t\t<div style=\"overflow-x:auto;\">\t\t\t\n\t\t\t<table class=\"table table-bordered\" style=\"width:100%;\">\t\t\t\n\t\t\t\t<tbody style=\"width:100%;\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"width:25%;\">Môn học</td>\n\t\t\t\t\t\t';\t\t\n\t\t\t\t\t\t// loop for days\n\t\t\t\t\t\tfor($i = 1; $i <= $numOfDays; $i++) {\n\t\t\t\t\t\t\t$div .= '\n\t\t\t\t\t\t\t\t<td style=\"width:10%;\">'.$i.'</td>';\t\n\t\t\t\t\t\t} // /for\n\t\t\t\t\t$div .= '</tr>';\n\t\t\t\t\t\t\n\t\t\t\t\t$subjectInfo = $this->model_subject->fetchSubjectDataByClass($classId);\n\n\t\t\t\t\tforeach ($subjectInfo as $key => $value) {\n\t\t\t\t\t\t$subjectName = $value['name'];\n\t\t\t\t\t\t$div .= '\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>'.$subjectName.'</td>';\n\n\t\t\t\t\t\t\tfor($i = 1; $i <= $numOfDays; $i++) {\n\t\t\t\t\t\t\t\t// $attendanceData = $this->model_attendance->getAttendance($i, $reportDate, $value['student_id'], $typeId, $classId, $sectionId);\n\t\t\t\t\t\t\t\t$scheduleData = $this->model_schedule->getAttendance($i, $reportDate, $value['subject_id'], $sectionId);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$div .= '<td>';\n\t\t\t\t\t\t\t\tforeach ($scheduleData as $scheduleKey => $scheduleValue) {\n\n\t\t\t\t\t\t\t\t\tif($scheduleValue['schedule_type'] == 1) {\n\t\t\t\t\t\t\t\t\t\t// Có mặt\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-success\">1</span>';\t\n\t\t\t\t\t\t\t\t\t} else if($scheduleValue['schedule_type'] == 2) {\n\t\t\t\t\t\t\t\t\t\t// Vắng\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-primary\">2</span>';\t\n\t\t\t\t\t\t\t\t\t} else if($scheduleValue['schedule_type'] == 3) {\n\t\t\t\t\t\t\t\t\t\t// Trễ\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-warning\">3</span>';\t\n\t\t\t\t\t\t\t\t\t} else if($scheduleValue['schedule_type'] == 4) {\n\t\t\t\t\t\t\t\t\t\t// Trễ\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-warning\">4</span>';\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Không xác định\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-danger\">5</span>';\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$div .= $scheduleStatus;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$div .= '\n\t\t\t\t\t\t\t\t\t</td>';\t\n\t\t\t\t\t\t\t\t} // /for\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t$div .= '</tr>';\t\t\n\t\t\t\t\t} // /foreach\n\t\t\t\t$div .= '</tbody>\n\t\t\t\t</table>\n\t\t\t<div>';\t\t\t\n\t\t\techo $div;\n\t\t\n\n\t\t\n\t}", "public function Get_Special_Report($semester,$year,$dept_id)\n {\n global $FILE_PATH;\n $semester_id = $this->DEADLINE->Search_Semester_id($semester,$year);\n if($semester_id)\n {\n $temp_course = $this->COURSE->Get_Dept_Course($dept_id,$semester_id);\n $dept_course = array();\n if(!isset($temp_course['status']))\n {\n for($i=0;$i<count($temp_course);$i++)\n {\n array_push($dept_course,$temp_course[$i]['id']);\n }\n }\n $DATA = array();\n $DATA['info'] = array();\n $DATA['download'] = $this->DOWNLOAD_URL.\"?course=all&type=report&dept=\".$dept_id.\"&info=special&semester=\".$semester.\"&year=\".$year;\n $sql = \"SELECT DISTINCT `course_id` FROM `course_hire_special_instructor` WHERE `status` = '1' AND `semester_id` = \".$semester_id;\n $result_course = $this->DB->Query($sql);\n if($result_course)\n {\n for($i=0;$i<count($result_course);$i++)\n {\n if(!in_array($result_course[$i]['course_id'],$dept_course))\n {\n continue;\n }\n $sql = \"SELECT si.`instructor_id`,si.`prefix`,si.`firstname`,si.`lastname`,si.`cv` FROM `course_hire_special_instructor` ci ,`special_instructor` si \";\n $sql.= \"WHERE ci.`instructor_id` = si.`instructor_id` AND ci.`course_id` = '\".$result_course[$i]['course_id'].\"' AND ci.`status` = '1' AND ci.`semester_id` = \".$semester_id;\n $result_instructor = $this->DB->Query($sql);\n $data = array();\n $data['id'] = $result_course[$i]['course_id'];\n $data['name'] = $this->COURSE->Get_Course_Name($data['id']);\n $data['special'] = array();\n if($result_instructor)\n {\n for($j=0;$j<count($result_instructor);$j++)\n {\n $instructor['id'] = $result_instructor[$j]['instructor_id'];\n $instructor['name'] = $result_instructor[$j]['prefix'].' '.$result_instructor[$j]['firstname'].' '.$result_instructor[$j]['lastname'];\n $instructor['cv'] = $this->PERSON->Get_CV($instructor['id']);\n $instructor['pdf'] = $this->VIEW_URL.\"?course=\".$data['id'].\"&id=\".$instructor['id'].\"&type=complete&info=special&semester=\".$semester.\"&year=\".$year;\n array_push($data['special'],$instructor);\n }\n }\n array_push($DATA['info'],$data);\n }\n }\n if(count($DATA['info']) == 0)\n {\n $return['status'] = 'error';\n $return['msg'] = 'ไม่พบข้อมูล';\n return $return;\n }\n else\n {\n return $DATA;\n }\n }\n else\n {\n $return['status'] = 'error';\n $return['msg'] = 'ไม่พบข้อมูล';\n return $return;\n }\n }", "function generate_xls(){ \n //Would like to ask for term to generate report for. Can we do this?\n global $CFG, $DB, $USER;\n\n\n\n //find all workers\n $workers = $DB->get_records('block_timetracker_workerinfo');\n\n foreach($workers as $worker){\n //demo courses, et. al.\n if($worker->courseid >= 73 && $worker->courseid <= 76){\n continue;\n }\n\n $earnings = get_earnings_this_term($worker->id,$worker->courseid);\n \n $course = $DB->get_record('course', array('id'=>$worker->courseid));\n echo $course->shortname.','.$worker->lastname.','.$worker->firstname.\n ','.$earnings.','.$worker->maxtermearnings.\"\\n\";\n }\n}", "function php_gen_report($date) {\r\n\r\n $uid = php_get_uid();\r\n $returnStatus['status'] = 'undefined';\r\n\r\n php_database_connect();\r\n\r\n $safe_uid = GetSQLValueString($uid, 'int');\r\n\r\n if (!php_check_convert_resv_date($date, $d, $m, $y)) {\r\n $returnStatus['status'] = 'Date format is incorrect';\r\n return $returnStatus;\r\n }\r\n\r\n //Get the date from the MySQL server.\r\n $query = \"SELECT DATE_FORMAT(NOW(),'%d, %M, %Y %h:%i%p') AS 'current_time'\";\r\n $rs = php_database_query($query);\r\n $timeInfo = mysql_fetch_array($rs);\r\n if (empty($timeInfo)) {\r\n $returnStatus['status'] = 'Cannot get the database server time';\r\n return $returnStatus;\r\n }\r\n\r\n $arrMonth = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');\r\n $strM = $arrMonth[$m];\r\n\r\n $header = '<h2>Reservation Report</h2>';\r\n $header = $header . '<h4>Current Date Time:' . $timeInfo['current_time'] . '</h4>';\r\n $header = $header . '<h4>Selected from:' . $d . ', ' . $strM . ', ' . $y . ' (Maximum 200 records will be shown)</h4>';\r\n\r\n //lookup table to query the output from restID, date, person, special request\r\n #and then lookup the customer name.\r\n $safe_timeslot = GetSQLValueString($y . '-' . $m . '-' . $d, 'date');\r\n\r\n $query = sprintf(\"SELECT id, cust_id, DATE_FORMAT(timeslot, '%%d, %%M, %%Y %%h:%%i%%p') AS datetime_timeslot, person, special_request, HEX(response) AS hex_response FROM resv WHERE rest_id = %s AND DATE(timeslot) >= DATE(%s) ORDER BY timeslot ASC LIMIT 200\", $safe_uid, $safe_timeslot);\r\n $rs = php_database_query($query);\r\n $body = '';\r\n\r\n while ($resvInfo = mysql_fetch_array($rs)) {\r\n $query = sprintf(\"SELECT fullname FROM customer WHERE id = %s\", $resvInfo['cust_id']);\r\n $custResult = php_database_query($query);\r\n $custInfo = mysql_fetch_array($custResult);\r\n if (empty($custInfo)) {\r\n $returnStatus['status'] = 'Cannot get the customer info';\r\n return $returnStatus;\r\n }\r\n\r\n $htmlElement['time'] = $resvInfo['datetime_timeslot'];\r\n $htmlElement['person'] = $resvInfo['person'];\r\n $htmlElement['customer_name'] = $custInfo['fullname'];\r\n $htmlElement['msg'] = $resvInfo['special_request'];\r\n $htmlElement['resv_id'] = $resvInfo['id'];\r\n $htmlElement['response'] = \"undefined\";\r\n\r\n switch (intval($resvInfo['hex_response'])) {\r\n case 0: //pending\r\n $htmlElement['response'] = 'pending';\r\n break;\r\n case 1: //decline\r\n $htmlElement['response'] = 'decline';\r\n break;\r\n case 2: //accept\r\n $htmlElement['response'] = 'accept';\r\n break;\r\n default:\r\n $htmlElement['response'] = 'undefined';\r\n }\r\n\r\n $body = $body . \"<tr><td>\" . $htmlElement['time'] . \"</td><td>\" . $htmlElement['customer_name'] . \"</td><td>\" . $htmlElement['person'] . \"</td><td>\" . $htmlElement['msg'] . \"</td><td>\" . $htmlElement['resv_id'] . \"</td><td>\" . $htmlElement['response'] . \"</td></tr>\\n\";\r\n }\r\n\r\n $body = \"<table><thead><tr><th>Date Time</th><th>Customer Name</th><th>Person</th><th>Special Request</th><th>Resv ID</th><th>Response</th></tr></thead>\\n<tfoot><tr><td colspan=\\\"6\\\">The end</td></tr></tfoot>\\n<tbody>\" . $body . \"</tbody></table>\";\r\n //re-factoring the query string\r\n\r\n $footer = \"\";\r\n\r\n $reportTxt = $header . $body . $footer;\r\n echo $reportTxt;\r\n\r\n $returnStatus['status'] = 'success';\r\n return $returnStatus;\r\n}", "public function reportTeacherDatewiseAttendent()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n return view('report.reportTeacherDatewiseAttendent')->wit;\n }", "function generate_report_modelwise($id, $field, $from, $to) {\n switch ($field) {\n case 'tl':\n $fieldName = 'Team_Lead';\n break;\n case 'dse':\n $fieldName = 'DSE';\n break;\n case 'asm':\n $fieldName = 'ASM_SM';\n break;\n case '6':\n $fieldName = 'Team_Lead';\n break;\n case '7':\n $fieldName = 'DSE';\n break;\n case '5':\n $fieldName = 'ASM_SM';\n break;\n }\n $empID = $id;\n $this->db->where('Inv_Dt >=', $from);\n $data = $this->db->get_where('rtl_daily_rep', array($fieldName => $id))->result_array();\n $countArr = array();\n\n foreach ($data as $k => $d) {\n if ($d['Model'] != 'Total_Target') {\n $id = $d['Model'];\n $countVar = 0;\n foreach ($data as $key => $var) {\n if ($id == $var['Model']) {\n $countVar++;\n }\n\n $countArr[strtoupper((string) $d['Model'])]['achieved'] = $countVar;\n $countArr[strtoupper((string) $d['Model'])]['target'] = 0;\n }\n }\n }\n\n $select = array(\n 'target_table_id',\n 'target_table_emp_id',\n 'employe_table_employe_name',\n 'target_table_product',\n 'target_table_product_qty',\n 'target_table_exp_date'\n );\n $toNxt = new DateTime($to);\n $toNxt->modify('+1 day');\n $to = date_format($toNxt,\"Y-m-d\");\n $col = 'target_table_emp_id';\n $Where = (\"DATE (target_table_create) BETWEEN '$from' AND '$to' AND $col = $empID\");\n $this->db->where('target_table_target_level',$field);\n if($field == 6)\n $data['tl'] = $this->db->join('employe_table', 'employe_table.employe_table_employe_id = target_table_emp_id')\n ->select($select)\n ->get_where('target_table', $Where)\n ->result_array();\n if($field == 7)\n $data['dse'] = $this->db->join('employe_table', 'employe_table.employe_table_employe_id = target_table_emp_id')\n ->select($select)\n ->get_where('target_table', $Where)\n ->result_array();\n if($field == 5)\n $data['asm'] = $this->db->join('employe_table', 'employe_table.employe_table_employe_id = target_table_emp_id')\n ->select($select)\n ->get_where('target_table', $Where)\n ->result_array();\n\n switch ($field) {\n case 'tl':\n foreach ($data['tl'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['tl'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n\n break;\n case 'dse':\n foreach ($data['dse'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['dse'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n\n break;\n case 'asm':\n foreach ($data['asm'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['asm'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n break;\n case 6:\n foreach ($data['tl'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['tl'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n\n break;\n case 7:\n foreach ($data['dse'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['dse'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n\n break;\n case 5:\n foreach ($data['asm'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = 0;\n }\n }\n foreach ($data['asm'] as $k => $d) {\n if ($d['target_table_emp_id'] == $empID && $d['target_table_product'] != 'Total_Target') {\n $countArr[(string) $d['target_table_product']]['target'] = $countArr[(string) $d['target_table_product']]['target'] + $d['target_table_product_qty'];\n if (!array_key_exists('achieved', $countArr[$d['target_table_product']])) {\n $countArr[(string) $d['target_table_product']]['achieved'] = 0;\n }\n }\n }\n\n break;\n }\n\n\n\n return $countArr;\n }", "public function overallSubjectAnalysis($slug)\n {\n \n $user = User::getRecordWithSlug($slug);\n if($isValid = $this->isValidRecord($user))\n return redirect($isValid); \n \n if(!isEligible($slug))\n return back();\n\n $records = array();\n $records = ( new App\\QuizResult())->getOverallSubjectsReport($user);\n if(!$records)\n {\n flash('Ooops..!','No Records available', 'overlay'); \n return back();\n }\n $color_correct = getColor('background',rand(00,9999));\n $color_wrong = getColor('background', rand(00,9999));\n $color_not_attempted = getColor('background', rand(00,9999)); \n $i=0;\n $labels = [];\n $dataset = [];\n $dataset_label = [];\n $bgcolor = [];\n $border_color = [];\n \n $marks_labels = [getPhrase('correct'), getPhrase('wrong'), getPhrase('not_answered')];\n $time_labels = [getPhrase('time_spent_on_correct_answers'), getPhrase('time_spent_on_wrong_answers')];\n\n foreach($records as $record) {\n $record = (object)$record;\n \n //Marks\n $subjects_display[$i]['subject_name'] = $record->subject_name;\n $subjects_display[$i]['correct_answers'] = $record->correct_answers;\n $subjects_display[$i]['wrong_answers'] = $record->wrong_answers;\n $subjects_display[$i]['not_answered'] = $record->not_answered;\n\n // Time\n $subjects_display[$i]['time_spent_on_correct_answers'] = $record->time_spent_on_correct_answers;\n $subjects_display[$i]['time_spent_on_wrong_answers'] = $record->time_spent_on_wrong_answers;\n $subjects_display[$i]['time_to_spend'] = $record->time_to_spend;\n $subjects_display[$i]['time_spent'] = $record->time_spent;\n\n \n $marks_dataset = [$record->correct_answers, $record->wrong_answers, $record->not_answered];\n $time_dataset = [$record->time_spent_on_correct_answers, $record->time_spent_on_wrong_answers];\n $dataset_label = $record->subject_name;\n \n $bgcolor = [$color_correct,$color_wrong,$color_not_attempted];\n \n $border_color = [$color_correct,$color_wrong,$color_not_attempted];\n\n \n $marks_data['type'] = 'pie'; \n //horizontalBar, bar, polarArea, line, doughnut, pie\n $marks_data['title'] = $record->subject_name; \n\n $marks_data['data'] = (object) array(\n 'labels' => $marks_labels,\n 'dataset' => $marks_dataset,\n 'dataset_label' => $dataset_label,\n 'bgcolor' => $bgcolor,\n 'border_color' => $border_color\n );\n \n $data['chart_data'][] = (object)$marks_data;\n\n\n $time_data['type'] = 'bar'; \n //horizontalBar, bar, polarArea, line, doughnut, pie\n $time_data['title'] = $record->subject_name; \n\n $time_data['data'] = (object) array(\n 'labels' => $time_labels,\n 'dataset' => $time_dataset,\n 'dataset_label' => $dataset_label,\n 'bgcolor' => $bgcolor,\n 'border_color' => $border_color\n );\n \n $data['time_data'][] = (object)$time_data;\n\n $i++;\n } \n \n $data['chart_data'][] = (object)$marks_data;\n\n $overall_correct_answers = 0;\n $overall_wrong_answers = 0;\n $overall_not_answered = 0;\n\n $overall_time_spent_correct_answers = 0;\n $overall_time_spent_wrong_answers = 0;\n \n foreach($records as $r)\n {\n $r = (object)$r;\n $overall_correct_answers += $r->correct_answers;\n $overall_wrong_answers += $r->wrong_answers;\n $overall_not_answered += $r->not_answered;\n \n $overall_time_spent_correct_answers += $r->time_spent_on_correct_answers;\n $overall_time_spent_wrong_answers += $r->time_spent_on_wrong_answers;\n }\n\n $overall_marks_dataset = [$overall_correct_answers, $overall_wrong_answers, $overall_not_answered];\n $overall_time_dataset = [$overall_time_spent_correct_answers, $overall_time_spent_wrong_answers];\n\n $overall_marks_data['type'] = 'doughnut'; \n //horizontalBar, bar, polarArea, line, doughnut, pie\n $overall_marks_data['title'] = getPhrase('overall_marks_analysis');\n $overall_marks_data['data'] = (object) array(\n 'labels' => $marks_labels,\n 'dataset' => $overall_marks_dataset,\n 'dataset_label' => getPhrase('overall_marks_analysis'),\n 'bgcolor' => $bgcolor,\n 'border_color' => $border_color\n );\n\n $data['right_bar_path'] = 'student.exams.subject-analysis.right-bar-performance-chart';\n $data['right_bar_data'] = array('right_bar_data' => (object)$overall_marks_data);\n \n $data['overall_data'][] = (object)$overall_marks_data;\n \n $data['subjects_display'] = $records;\n $data['active_class'] = 'analysis';\n $data['title'] = getPhrase('overall_subject_wise_analysis');\n $data['user'] = $user;\n $userid = $user->id;\n $data['layout'] = getLayout();\n\n return view('student.exams.subject-analysis.subject-analysis', $data); \n }", "public function reportDatewiseAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportDatewiseAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "public static function generate()\n {\n $data = array();\n foreach (College::all() as $college) {\n # $current = The current year\n # $should = How many actieve assessors there is needed at the end of the year\n # $count = Count of all the active assessors\n $data[$college->id] = array(\n 'current' => date('Y'),\n 'should' => 1 + round(Assessors::where('fk_college', $college->id)->where('status', 1)->count() / 100 * 110),\n 'count' => Assessors::where('fk_college', $college->id)->where('status', 1)->count()\n );\n }\n return $data;\n }", "function genrate_assessmenthistory_pdf($columnsValues,$data,$vehicletype,$allconstants,$profile,$toDate=null,$fromDate=null,$vehiclelicno=null) {\n\t\n\t\t$columnwidtharrays = array(9,15,15,14,15,14,13,12,13,27,12,17,13);\n\t\t\n\t\t$heightdynamic = 8;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vehicletype) && !empty($vehicletype)) || \n\t\t(isset($vehiclelicno) && !empty($vehiclelicno))){\n\n\t\t\t$x= $this->GetX();\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+125);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($vehicletype) && !empty($vehicletype))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Type :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vehicletype) && !empty($vehicletype))\n\t\t\t$this->MultiCell(39, 8, $allconstants[$vehicletype],0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t\t$x= $this->GetX();\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Register No. : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(164, 8, $vehiclelicno,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(164, 8, '',0,'','L',true);\n\t\t\t$this->Ln(2);\n\t\t\t//vehiclelicno\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n\t\t\n\t\t$c=0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\n\t\t if( $c == 0 || $c == 8 || $c == 10 || $c == 11 || $c == 12 ){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 16, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\t\t\n\t\t\n\t\t$this->SetFont('Arial', '', 6);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t foreach ($data as $val) {\n\t\t \n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $dt_created_date =\tdate('d M Y', strtotime($val['AssessmentVehicleDetail']['dt_created_date']));\n\t\t $vc_assessment_no =\t$val['AssessmentVehicleDetail']['vc_assessment_no'];\n\t\t $vc_vehicle_lic_no =\t$val['AssessmentVehicleDetail']['vc_vehicle_lic_no'];\n\t\t $vc_vehicle_reg_no = \t$val['AssessmentVehicleDetail']['vc_vehicle_reg_no'];\n\t\t $vc_prtype_name =\t$val['VehicleDetail']['VEHICLETYPE']['vc_prtype_name'];\n\t\t\t$vc_pay_frequency = \t$val['AssessmentVehicleDetail']['vc_pay_frequency'];\n\t\t $vc_prev_end_om =\tnumber_format($val['AssessmentVehicleDetail']['vc_prev_end_om']);\n\t\t $vc_end_om =\tnumber_format($val['AssessmentVehicleDetail']['vc_end_om']);\n\t\t $vc_km_travelled = \t\tnumber_format($val['AssessmentVehicleDetail']['vc_km_travelled']);\n\t\t $vc_rate = \t\t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_rate'],2,'.',',');\n\t\t $vc_payable = \t\t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_payable'],2,'.',',');\n\t\t $vc_status =\t\t$allconstants[$val['AssessmentVehicleMaster']['vc_status']];\n\n\t\t\t$font_size = 6;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$alignvalue='C';\n\t\t\t\n\t\t\t$col[] = array('text' => $i+1, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_created_date, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $vc_assessment_no, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_lic_no, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_reg_no, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prtype_name, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_pay_frequency, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prev_end_om, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_end_om, 'width' =>$columnwidtharrays[8], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_km_travelled, 'width' =>$columnwidtharrays[9], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_rate, 'width' =>$columnwidtharrays[10], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_payable, 'width' =>$columnwidtharrays[11], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_status, 'width' =>$columnwidtharrays[12], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function prepare_report($emp, $month, $year){\n\n // echo $emp.' '.$month.' '.$year;\n\t\t$start = date('Y-m-d', strtotime(\"$year-$month-01\")); \n\t $end = date('Y-m-t', strtotime($start));\n\t\t$data['attendance'] = calculate_attendance($emp,$start,$end);\n\t\t\n\t\t//array_walk($data['attendance'], function(&$key, $b) { ucwords(str_replace('_', ' ', $key)) }); \n\t\t$data['at_labels'] = json_encode(['Present','Absent','Half Day','Uninformed Leave','Sandwich Leave','Late Login']); \n\t\t$data['at_values'] = json_encode(array_values($data['attendance'])); \n\t\t\n\t\t$project_data = Project::join('project_assignation','projects.id','project_assignation.project_id')\n\t\t\t\t\t\t\t\t->join('users','project_assignation.employee_id','users.id')\n\t\t\t\t\t\t\t\t->join('eods','eods.user_id','users.id')\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t ->select('projects.project_name','projects.id', DB::Raw('SUM(eods.today_hours) as pr_time'))\n\n\t\t\t\t\t\t\t\t->where('users.id', $emp)\n\t\t\t\t\t\t\t\t->whereMonth('eods.date', $month)\t\n\t\t\t\t\t\t\t\t->whereYear('eods.date', $year)\t \t \t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t->whereRaw('eods.project_id = projects.id')\n\t\t\t\t\t\t\t\t->groupBy('projects.project_name','projects.id')\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t->get(); \n\n\n\t \n\t\t\n\t\t\t$sum = array_sum(array_column($project_data->toArray(),'pr_time')); \n\n\t\t\t$data['projects'] = $project_data;\n\t\t\tforeach($project_data as $project){\n\t\t\t\t$labels[] = $project->project_name;\n\t\t\t\t$cdata[] = number_format(($project->pr_time*100) / $sum, 2); \n\t\t\t\t//$sdata[] = array('label'=> $project->project_name,'data'=>number_format(($project->pr_time*100) / $sum, 2),'backgroundColor'=>'green','borderColor'=>'red') ;\n\t\t\t\t$sdata[] = array('label'=>$project->project_name,'y'=>number_format(($project->pr_time*100) / $sum, 2));\n\t\t\t}\n\t\t\t\n\n\t\t\tif(!empty($labels) && !empty($cdata)){\n\t\t $data['labels'] = json_encode($labels);\n\t\t $data['cdata'] = json_encode($cdata);\n\t\t $data['sdata'] = json_encode($sdata); \n\t\t\t} \n\t\t\t//print_r($data['sdata']);\n\n\t\t return $data; \n\t}", "public function mark_attendance($message = NULL) {\n $data['sideMenuData'] = fetch_non_main_page_content();\n $tenant_id = $this->tenant_id;\n $course_id = $this->input->post('course_id');\n $class_id = $this->input->post('class_id');\n $subsidy = $this->input->post('subsidy');\n $sort_by = $this->input->get('b');\n $sort_order = $this->input->get('o');\n $class_details = $this->class->get_class_by_id($tenant_id, $course_id, $class_id);\n \n $from_date = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);///added by shubhranshu\n $to_date = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);//added by shubhranshu\n $week_start_date = parse_date($this->input->post('week_start'), CLIENT_DATE_FORMAT);//added by shubhranshu\n //echo print_r($from_date);print_r($to_date);print_r($week_start_date);exit;\n \n $week = $this->input->post('week');\n $export = $this->input->post('export');\n $export1 = $this->input->post('export1');\n $this->load->helper('attendance_helper');\n if (!empty($export)) \n {\n $class_details = $this->class->get_class_details_for_report($tenant_id, $course_id, $class_id);\n $class_start = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);\n $class_end = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);\n if (empty($class_start))\n $class_start = new DateTime();\n if (empty($class_end))\n $class_end = new DateTime();\n $class_schedule = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $class_schedule_data = array();\n foreach ($class_schedule as $row) {\n $session_arr = array('S1' => '1', 'BRK' => '3', 'S2' => '2');\n $class_schedule_data[date('d/m/y', strtotime($row['class_date']))][$session_arr[$row['session_type_id']]] = date('h:i A', strtotime($row['session_start_time']));\n }\n \n if ($export == 'xls') \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $this->load->helper('export_helper');\n export_attendance($results, $class_details, $class_start, $class_end, $class_schedule_data);\n } \n else \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $tenant_details = $this->classtraineemodel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n\t\t$mark_count = $this->classtraineemodel->get_rows_count($course_id,$class_id);\n \n if ($export == 'xls_week'){\n $this->load->helper('export_helper');\n return generate_class_attendance_sheet_xls($results, $class_details, $class_start, $class_end, $tenant_details, $class_schedule_data);\n }\n $this->load->helper('pdf_reports_helper');\n if ($export == 'pdf') {\n //return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data, $mark_count);\n //print_r($results);exit;\n return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data,$mark_count); // removed mark count by shubhranshu\n \n } else if ($export == 'pdf_week') {\n return generate_class_attendance_sheet_pdf($results, $class_details, $tenant_details, $class_schedule_data);\n }\n }\n \n } \n else \n {\n if($export1=='lock')\n { \n $lock_msg=$this->classtraineemodel->lock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\", \"Succesfully Locked.\");\n }else{\n $this->session ->set_flashdata(\"error\",\"Something went wrong while locking.\");\n }\n }else if($export1=='unlock'){\n $lock_msg=$this->classtraineemodel->unlock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\",\"Succesfully Unocked\");\n }else{\n $this->session->set_flashdata(\"error\",\"Somthing went wrong while Unlocking !\");\n \n }\n }\n \n \n $data = get_data_for_renderring_attendance($tenant_id, $course_id, $class_id, $subsidy, $from_date, $to_date, $week_start_date, $week, $sort_by, $sort_order,'');\n \n $data['class_schedule'] = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $att = $this->classtraineemodel->get_attendance_lock_status($tenant_id,$course_id, $class_id);\n $data['lock_status']=$att->lock_status;\n $data['class_start_datetime']=$att->class_start_datetime;\n\t\t\t$data['user'] = $this->user;\n\t\t\t$data['controllerurl'] = 'class_trainee/mark_attendance';\n $data['page_title'] = 'Class Trainee Enrollment - Mark Attendance';\n $data['main_content'] = 'classtrainee/markattendance';\n //$data['week_start'] = $from_date;\n //$data['sideMenuData'] = $this->sideMenu;\n if (!empty($message))\n $data['message'] = $message;\n $this->load->view('layout', $data);\n }\n }", "public function reportTeacherMonthlyAttendent()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n return view('report.reportTeacherMonthlyAttendent')->with('year',$year);\n }", "function stp_getSubject($date_to_use='now') {\r\n\r\n\t// Array of Christian Science Bible Lesson subjects \r\n\t$cs_lesson_subjects = array(\r\n\t\t__('God', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Sacrament', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Life', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Truth', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Love', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Spirit', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Soul', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Mind', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Christ Jesus', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Man', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Substance', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Matter', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Reality', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Unreality', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Are Sin, Disease, and Death Real?', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Doctrine of Atonement', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Probation After Death', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Everlasting Punishment', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Adam and Fallen Man', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Mortals and Immortals', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Soul and Body', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Ancient and Modern Necromancy, <i>alias</i> Mesmerism and Hypnotism, Denounced', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('God the Only Cause and Creator', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('God the Preserver of Man', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Is the Universe, Including Man, Evolved by Atomic Force?', 'christian-science-bible-lesson-subjects'),\r\n\t\t__('Christian Science', 'christian-science-bible-lesson-subjects')\r\n\t\t);\r\n\t\r\n\t// repeat the array since lesson subjects are repeated twice a year in the same order\r\n\t$cs_lesson_subjects = array_merge($cs_lesson_subjects, $cs_lesson_subjects);\r\n\r\n\t// Bonus lesson for years with 53 Sundays\r\n\t$cs_lesson_subjects[] = __('Christ Jesus', 'christian-science-bible-lesson-subjects');\r\n\t\r\n\t// Add a blank entry to the front of the array so we're matching week 1 = [1]\r\n\tarray_unshift($cs_lesson_subjects, \"\");\r\n\r\n\t// Get the lesson for the upcoming next Sunday for any given date\r\n // Use strftime('%U, ...) not date(\"W\", ...) in order to get weeks of the year using Sunday as starting day, not Monday\r\n\t$week_num_sun = (int) strftime('%U', strtotime('next Sunday ' . $date_to_use));\r\n\r\n\treturn $cs_lesson_subjects[$week_num_sun];\r\n\r\n}", "function getStudentReport( $datetypeselect, $startdate, $enddate, $classyear,\r\n\t\t\t\t $residenceselect, $ethnic, $userselect, $watched, $redflag, $vip,\r\n\t\t\t\t $acpro, $housingwaitlist, $field1, $field2, $field3 ) {\r\n\t\t\r\n\t\t$userid = $_SESSION['userid'];\r\n\t\t\r\n\t\tif( $datetypeselect == 0 ) $left = \"left\";\r\n\t\t\r\n\t\t\r\n\t\tif( $startdate ) $datestuff .= \" and c.datecreated >= '\".getMySqlDate( $startdate ).\" 00:00:00'\";\r\n\t\tif( $enddate ) $datestuff .= \" and c.datecreated <= '\".getMySqlDate( $enddate ).\" 23:59:59'\";\r\n\t\t\r\n\t\t$query = \"\r\n\t\t\tSELECT x.ID,\r\n\t\t\t concat( x.LAST_NAME, ', ', x.FIRST_NAME, ' ', x.MIDDLE_NAME ) as FullName,\r\n\t\t\t concat( u.LastName, ', ', u.FirstName, ' ', u.MiddleIn ) as AssignedToName,\r\n\t\t\t s.AssignedTo,\r\n\t\t\t x.ENROLL_STATUS,\r\n\t\t\t x.CAMPUS_PHONE,\r\n\t\t\t x.CELL_PHONE,\r\n\t\t\t x.WOOSTER_EMAIL,\r\n\t\t\t x.PRIMARY_EMAIL,\r\n\t\t\t x.CAMPUS_BOX,\r\n\t\t\t x.CLASS_YEAR,\r\n\t\t\t s.AcProbation,\r\n\t\t\t s.HousingWaitList,\r\n\t\t\t s.Field1,\r\n\t\t\t s.Field2,\r\n\t\t\t s.Field3,\r\n\t\t\t s.VIP,\r\n\t\t\t s.RedFlag,\r\n\t\t\t x.HOME_PHONE,\r\n\t\t\t concat( x.HOUSING_BLDG, ' ', x.HOUSING_ROOM ) as HousingAssignment,\r\n\t\t\t x.ETHNIC,\r\n\t\t\t x.ADVISOR\r\n\t\t\tFROM X_PNSY_STUDENT x, students s, users u, contacts c, `contacts-students` cs\r\n\t\t\tWHERE x.ID = s.StudentID AND cs.ContactID = c.ID $datestuff AND cs.StudentID = x.ID\r\n\t\t\tAND s.StudentID IN (SELECT ID FROM X_PNSY_STUDENT WHERE ID = s.StudentID)\r\n\t\t\";\r\n\t\t\r\n\t\tif( $classyear ) $query .= \" and x.CLASS_YEAR = '$classyear'\";\r\n\r\n\t\tif( $residenceselect ) $query .= \" and x.HOUSING_BDLG = '$residenceselect'\";\r\n\t\tif( $userselect ) $query .= \" and s.assignedto = '$userselect'\";\r\n\t\tif( isset($watched) ) $query .= \" and x.ID in (select studentid from studentwatch where userid = '$userid')\";\r\n\t\tif( isset($redflag) ) $query .= \" and s.redflag != ''\";\r\n\t\tif( isset($vip) ) $query .= \" and s.vip != ''\";\r\n\t\tif( isset($acpro) ) $query .= \" and s.acprobation = 1\";\r\n\t\tif( isset($housingwaitlist) ) $query .= \" and s.housingwaitlist = 1\";\r\n\t\tif( isset($field1) ) $query .= \" and s.Field1 = 1\";\r\n\t\tif( isset($field2) ) $query .= \" and s.Field2 = 1\";\r\n\t\tif( isset($field3) ) $query .= \" and s.Field3 = 1\";\r\n\t\t$query .= \" group by x.ID order by x.LAST_NAME\";\r\n\t\t\t\t\r\n\t\t$return = array();\r\n\t\t$result = mysql_query( $query );\r\n\t\twhile( $row = mysql_fetch_assoc( $result ) ) {\r\n\t\t\tarray_push( $return, $row );\r\n\t\t}\r\n\t\t\r\n\t\tforeach( $return as $rowNumber => $row ) {\r\n\t\t\t\r\n\t\t\t// include the number of contacts\r\n\t\t\t$query = \"select count(*) as NumContacts from contacts\r\n\t\t\t\t where id in (\r\n\t\t\t\t \tselect distinct contactid from `contacts-students` cs\r\n\t\t\t\t\twhere cs.studentid = '\".$row['ID'].\"'\r\n\t\t\t\t )\";\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\tif( $numContactsArray = mysql_fetch_assoc( $result ) ) {\r\n\t\t\t\t$return[$rowNumber]['NumContacts'] = $numContactsArray['NumContacts'];\r\n\t\t\t}\r\n\t\t\telse $return[$rowNumber]['NumContacts'] = false;\r\n\t\t\t\r\n\t\t\t// include the number of contacts in the date range\r\n\t\t\t$query = \"select count(*) as NumContactsInRange from contacts\r\n\t\t\t\t where id in (\r\n\t\t\t\t \tselect distinct c.id from contacts c\r\n\t\t\t\t\tjoin `contacts-students` cs\r\n\t\t\t\t\ton cs.contactid = c.id\r\n\t\t\t\t\tand cs.studentid = '\".$row['ID'].\"'$datestuff\r\n\t\t\t\t )\";\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\tif( $numContactsArray = mysql_fetch_assoc( $result ) ) {\r\n\t\t\t\t$return[$rowNumber]['NumContactsInRange'] = $numContactsArray['NumContactsInRange'];\r\n\t\t\t}\r\n\t\t\telse $return[$rowNumber]['NumContactsInRange'] = false;\r\n\t\t\t\r\n\t\t\t// include all the users associated with the contacts\r\n\t\t\t$query = \"select distinct u.ID,\r\n\t\t\t\t\t concat( u.LastName, ', ', u.FirstName, ' ', u.MiddleIn ) as FullName,\r\n\t\t\t\t\t u.Email\r\n\t\t\t\t from users u, `contacts-users` cu, `contacts-students` cs, contacts c\r\n\t\t\t\t where u.id = cu.userid\r\n\t\t\t\t and cu.contactid = cs.contactid\r\n\t\t\t\t and cs.studentid = '\".$row['ID'].\"'\r\n\t\t\t\t and cs.contactid = c.id$datestuff\r\n\t\t\t\t \";\r\n\t\t\t$usersArray = array();\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\twhile( $userrow = mysql_fetch_assoc( $result ) ) {\r\n\t\t\t\tarray_push( $usersArray, $userrow );\r\n\t\t\t}\r\n\t\t\t$return[$rowNumber]['Users'] = $usersArray;\r\n\t\t\t\r\n\t\t\t$return[$rowNumber]['StartDate'] = $startdate;\r\n\t\t\t$return[$rowNumber]['EndDate'] = $startdate;\r\n\t\t}\r\n\t\treturn $return;\r\n\t}", "function genrate_inspectorassessmenthistory_pdf($columnsValues,$data,$allconstants,$profile,$toDate=null,$fromDate=null,$vc_customer_name,$vehiclelicno=null) {\n\t\n\t\t$columnwidtharrays = array(7,15,15,15,14,16,\n\t\t 12,13,12,12,21,11,\n\t\t\t\t\t\t\t\t 15,12);\n\t\t\n\t\t$heightdynamic = 8;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vc_customer_name) && !empty($vc_customer_name)) ){\n\n\t\t\t$x = $this->GetX();\t\t\t\n\t\t\t$y = $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\t\t\t\n\t\t\t$this->SetX($x+125);\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(25, 8, 'Customer Name :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(39, 8, ucfirst($vc_customer_name),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t\t$x = $this->GetX();\t\t\t\n\t\t\t$y = $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Register No.: ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(164, 8, $vehiclelicno,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(164, 8, '',0,'','L',true);\n\t\t\t\n\t\t\t//$vehiclelicno\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t}\n\t}\n\t\t\n\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\n\t\t$c=0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\n\t\t\tif($c==10){\n\t\t\t\n\t\t\t\t$this->SetFont('Arial', 'B', 5);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif( $c == 9 || $c == 11 || $c == 13 || $c == 12){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 16, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\t\t\n\t\t\n\t\t$this->SetFont('Arial', '', 5);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\tforeach ($data as $val) {\n\t\t\n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $vc_customer_name = \tucfirst($val['AssessmentVehicleMaster']['vc_customer_name']);\n\t\t $dt_created_date=\t\tdate('d M Y', strtotime($val['AssessmentVehicleDetail']['dt_created_date']));\n\t\t $vc_assessment_no=\t\t$val['AssessmentVehicleDetail']['vc_assessment_no'];\n\t\t $vc_vehicle_lic_no= \t$val['AssessmentVehicleDetail']['vc_vehicle_lic_no'];\n\t\t $vc_vehicle_reg_no=\t\t$val['AssessmentVehicleDetail']['vc_vehicle_reg_no'];\n\t\t\t$vc_prtype_name = \t\t$val['VehicleDetail']['VEHICLETYPE']['vc_prtype_name'];\n\t\t $vc_pay_frequency = \t$val['AssessmentVehicleDetail']['vc_pay_frequency'];\n\t\t $vc_prev_end_om = \t\tnumber_format($val['AssessmentVehicleDetail']['vc_prev_end_om']);\n\t\t $vc_end_om = \t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_end_om']);\n\t\t $vc_km_travelled = \t\tnumber_format($val['AssessmentVehicleDetail']['vc_km_travelled']);\n\t\t $vc_rate =\t\t\t \tnumber_format($val['AssessmentVehicleDetail']['vc_rate'],2,'.',',');\n\t\t $vc_payable =\t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_payable'],2,'.',',');\n\t\t $vc_status =\t\t\t$allconstants[$val['AssessmentVehicleMaster']['vc_status']];\n\n\t\t\t$font_size = 6;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$alignvalue='C';\n\t\t\t\n\t\t\t$col[] = array('text' => $i+1, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_customer_name, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $dt_created_date, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_assessment_no, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_lic_no, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_reg_no, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prtype_name, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_pay_frequency, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prev_end_om, 'width' =>$columnwidtharrays[8], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_end_om, 'width' =>$columnwidtharrays[9], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_km_travelled, 'width' =>$columnwidtharrays[10], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$col[] = array('text' => $vc_rate, 'width' =>$columnwidtharrays[11], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_payable, 'width' =>$columnwidtharrays[12], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_status, 'width' =>$columnwidtharrays[13], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t}\n\t\n\t}", "function student_attendance()\n\t{\n\t\t\n\t\t$usercode = $_REQUEST['usercode'];\n\t\t$userdt\t\t\t\t=\t$this->ObjM->get_user_by_usercode($usercode);\n\t\t$yearly_acccount \t= $this->ObjM->student_yearly_acccount($userdt[0]['idcode']);\n\t\t\n\t\t$arr=array('student_yearly_code' =>$yearly_acccount[0]['student_yearly_code'],'attendance_month'=>$_REQUEST['month']);\n\t\t$stud_att\t\t\t\t=\t$this->ObjM->get_student_attendance($arr);\n\t\t\n\t\tif(count($stud_att)<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($stud_att);$i++){\n\t\t\t\t$attendance_date = date('d-m-Y',$stud_att[$i]['attendance_date']);\n\t\t\t\t$json_arr[]=array(\n\t\t\t\t\t'attendance_date'\t\t=>\t$attendance_date,\n\t\t\t\t\t'attendance'\t\t\t=>\t$stud_att[$i]['attendance'],\n\t\t\t\t\t'validation'\t \t\t=>\t'true' );\n\t\t }\n\t\t echo json_encode($json_arr);\n\t\t\texit;\n\t}", "public function export_tms_report() {\n set_time_limit(0);\n ini_set(\"memory_limit\", \"-1\");\n if (!empty($_GET)) {\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n if ($_GET['payStatus'] == '1') {\n $payment_status = \"PAID','PARTPAID\";\n } else if ($_GET['payStatus'] == '2') {\n $payment_status = \"NOTPAID','PARTPAID\";\n }\n $data['text'] = $displayText;\n $year = $_GET['yearVal'];\n $month = $_GET['monthVal'];\n $training_score1 = $_GET['trainingStatus'];\n\n if ($training_score1 == '1') {\n $training_score = 'C';\n } else if ($training_score1 == '2') {\n $training_score = \"NYC','2NYC\";\n } else if ($training_score1 == '3') {\n $training_score = 'ABS';\n } else if ($training_score1 == '4') {\n $training_score = \"C','NYC','2NYC\";\n }\n\n\n if ($_GET['payStatus'] == '1') {\n $result = $this->reportsModel->tms_paid_report($tenant_id, $payment_status, $year, $month, $training_score);\n } else if ($_GET['payStatus'] == '2') {\n $result = $this->reportsModel->tms_unpaid_report($tenant_id, $payment_status, $year, $month, $training_score);\n }\n }\n\n $this->load->helper('export_helper');\n export_tms_report_page($result);\n }", "public function attendance_sheet_export_to_pdf($action, $attendance_id, $student_id = 0, $course_id = '')\n {\n $attendance = new Attendance();\n $courseInfo = CourseManager::get_course_information($course_id);\n $attendance->set_course_id($courseInfo['code']);\n $groupId = isset($_REQUEST['group_id']) ? $_REQUEST['group_id'] : null;\n $data_array = array();\n $data_array['attendance_id'] = $attendance_id;\n $data_array['users_in_course'] = $attendance->get_users_rel_course($attendance_id, $groupId);\n\n $filter_type = 'today';\n\n if (!empty($_REQUEST['filter'])) {\n $filter_type = $_REQUEST['filter'];\n }\n\n $my_calendar_id = null;\n if (is_numeric($filter_type)) {\n $my_calendar_id = $filter_type;\n $filter_type = 'calendar_id';\n }\n\n $data_array['attendant_calendar'] = $attendance->get_attendance_calendar(\n $attendance_id,\n $filter_type,\n $my_calendar_id,\n $groupId\n );\n\n if (api_is_allowed_to_edit(null, true) || api_is_drh()) {\n $data_array['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);\n } else {\n if (!empty($student_id)) {\n $user_id = intval($student_id);\n } else {\n $user_id = api_get_user_id();\n }\n $data_array['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, $user_id, $groupId);\n $data_array['faults'] = $attendance->get_faults_of_user($user_id, $attendance_id, $groupId);\n $data_array['user_id'] = $user_id;\n }\n\n $data_array['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id($attendance_id);\n\n // Set headers pdf.\n $courseCategory = CourseManager::get_course_category($courseInfo['category_code']);\n $teacherInfo = CourseManager::get_teacher_list_from_course_code($courseInfo['code']);\n $teacherName = null;\n foreach ($teacherInfo as $teacherData) {\n if ($teacherName != null) {\n $teacherName = $teacherName.\" / \";\n }\n $teacherName .= api_get_person_name($teacherData['firstname'], $teacherData['lastname']);\n }\n\n // Get data table\n $data_table = array();\n $head_table = array('#', get_lang('Name'));\n foreach ($data_array['attendant_calendar'] as $class_day) {\n $head_table[] =\n api_format_date($class_day['date_time'], DATE_FORMAT_NUMBER_NO_YEAR).' '.\n api_format_date($class_day['date_time'], TIME_NO_SEC_FORMAT);\n }\n $data_table[] = $head_table;\n $data_attendant_calendar = $data_array['attendant_calendar'];\n $data_users_presence = $data_array['users_presence'];\n $count = 1;\n\n if (!empty($data_array['users_in_course'])) {\n foreach ($data_array['users_in_course'] as $user) {\n $cols = 1;\n $result = array();\n $result['count'] = $count;\n $result['full_name'] = api_get_person_name($user['firstname'], $user['lastname']);\n foreach ($data_array['attendant_calendar'] as $class_day) {\n if ($class_day['done_attendance'] == 1) {\n if ($data_users_presence[$user['user_id']][$class_day['id']]['presence'] == 1) {\n $result[$class_day['id']] = get_lang('UserAttendedSymbol');\n } else {\n $result[$class_day['id']] = '<span style=\"color:red\">'.get_lang('UserNotAttendedSymbol').'</span>';\n }\n } else {\n $result[$class_day['id']] = ' ';\n }\n $cols++;\n }\n $count++;\n $data_table[] = $result;\n }\n }\n $max_cols_per_page = 12; //10 dates + 2 name and number\n $max_dates_per_page = $max_dates_per_page_original = $max_cols_per_page - 2;//10\n $rows = count($data_table);\n\n if ($cols > $max_cols_per_page) {\n $number_tables = round(($cols-2)/$max_dates_per_page);\n $headers = $data_table[0];\n $all = array();\n $tables = array();\n $changed = 1;\n\n for ($i= 0; $i <= $rows; $i++) {\n $row = isset($data_table[$i]) ? $data_table[$i] : null;\n $key = 1;\n $max_dates_per_page = 10;\n $item = isset($data_table[$i]) ? $data_table[$i] : null;\n $count_j = 0;\n\n if (!empty($item)) {\n foreach ($item as $value) {\n if ($count_j >= $max_dates_per_page) {\n $key++;\n $max_dates_per_page = $max_dates_per_page_original*$key;\n //magic hack\n $tables[$key][$i][] = $tables[1][$i][0];\n $tables[$key][$i][] = $tables[1][$i][1];\n }\n $tables[$key][$i][] = $value;\n $count_j++;\n }\n }\n }\n\n $content = null;\n if (!empty($tables)) {\n foreach ($tables as $sub_table) {\n $content .= Export::convert_array_to_html($sub_table).'<br /><br />';\n }\n }\n } else {\n $content = Export::convert_array_to_html(\n $data_table,\n array('header_attributes' => array('align' => 'center'))\n );\n }\n\n $params = array(\n 'filename' => get_lang('Attendance').'-'.api_get_local_time(),\n 'pdf_title' => $courseInfo['title'],\n 'course_code' => $courseInfo['code'],\n 'add_signatures' => true,\n 'orientation' => 'landscape',\n 'pdf_teachers' => $teacherName,\n 'pdf_course_category' => $courseCategory['name'],\n 'format' => 'A4-L',\n 'orientation' => 'L'\n );\n\n Export::export_html_to_pdf($content, $params);\n exit;\n }", "public function reportMonthlyAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportMonthlyAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "function generate_report($req, $res, $isMonthly = true, $timeUnit = null, $uid = 1) {\r\n\tif ($isMonthly) {\r\n\t\tif (is_null ( $timeUnit ) || ! is_numeric ( $timeUnit ) || $timeUnit > 12 || $timeUnit < 1) {\r\n\t\t\t$timeUnit = date ( 'M' );\r\n\t\t}\r\n\t} else {\r\n\t\tif (is_null ( $timeUnit )) {\r\n\t\t\t$timeUnit = date ( 'Y' );\r\n\t\t}\r\n\t}\r\n\t\r\n\trequire_once 'PHPExcel/PHPExcel.php';\r\n\t$objPHPExcel = new PHPExcel ();\r\n\t\r\n\theader ( 'Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' );\r\n\theader ( 'Content-Disposition: attachment;filename=\"report_' . ($isMonthly ? 'monthly' : 'yearly') . date ( 'YMDhm' ) . '.xlsx\"' );\r\n\theader ( 'Cache-Control: max-age=0' );\r\n\t\r\n\t// Set properties\r\n\t$objPHPExcel->getProperties ()->setCreator ( \"Roy Ganor\" )->setTitle ( \"Doctors Report\" )->setSubject ( \"Doctors Report\" )->setDescription ( \"Doctors Report\" );\r\n\t\r\n\twriteSurgeries ( $req, $res, $uid, $objPHPExcel );\r\n\twriteShifts ( $req, $res, $uid, $objPHPExcel );\r\n\twriteSessions ( $req, $res, $uid, $objPHPExcel );\r\n\twriteSurgeons ( $req, $res, $uid, $objPHPExcel );\r\n\twriteOperations ( $req, $res, $uid, $objPHPExcel );\r\n\t\r\n\t$objPHPExcel->setActiveSheetIndex ( 0 );\r\n\t\r\n\t$objWriter = PHPExcel_IOFactory::createWriter ( $objPHPExcel, 'Excel2007' );\r\n\t$objWriter->save ( 'php://output' );\r\n}", "public function attendance(){\n\t\t\t$data['title'] = 'Students Attendences Course name '; \n\n\t\t\t$course_code = $_GET['course_code'];\n\t\t\t\n\t\t\t$ids = $this->register_model->ids($course_code);\n\n\t\t\t$course_id;\n\t\t\tforeach ($ids as $id) {\n\t\t\t\t\t$course_id = $id['id'];\n\t\t\t\t\t$data['course_name'] = $id['course_name'];\n\t\t\t}\t\t\t\n\t\t\t$data['courses'] = $this->register_model->get_attendance($course_id);\n\n\t\t\t$this->load->view('admin/header1');\n\t\t\t$this->load->view('admin/attendance', $data);\n\t\t\t$this->load->view('admin/footer');\n\t\t}", "public function makeReport()\n {\n }", "public function reportDatewiseClassWiseAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportDatewiseClassWiseAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "function ciniki_courses_reportStudents($ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'start_date'=>array('required'=>'yes', 'blank'=>'no', 'type'=>'date', 'name'=>'Start Date'), \n 'end_date'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'date', 'name'=>'End Date'), \n 'output'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'json', 'name'=>'Output'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'courses', 'private', 'checkAccess');\n $rc = ciniki_courses_checkAccess($ciniki, $args['tnid'], 'ciniki.courses.reportStudents'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n\n //\n // Load tenant details\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'tenantDetails');\n $rc = ciniki_tenants_tenantDetails($ciniki, $args['tnid']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['details']) && is_array($rc['details']) ) { \n $tenant_details = $rc['details'];\n } else {\n $tenant_details = array();\n }\n\n //\n // Get the list of registrations between the dates\n //\n $strsql = \"SELECT registrations.id, \"\n . \"offerings.name AS offering_name, \"\n . \"offerings.code AS offering_code, \"\n . \"offerings.condensed_date AS condensed_date, \"\n . \"courses.name AS course_name, \"\n . \"courses.code AS course_code, \"\n . \"customers.id AS customer_id, \"\n . \"customers.display_name, \"\n . \"DATE_FORMAT(offerings.start_date, '%b %d, %Y') AS start_date, \"\n . \"DATE_FORMAT(offerings.end_date, '%b %d, %Y') AS end_date, \"\n . \"IFNULL(prices.name, '') AS price_name, \"\n . \"emails.email AS emails \"\n . \"FROM ciniki_course_offering_classes AS classes \"\n . \"INNER JOIN ciniki_course_offering_registrations AS registrations ON (\"\n . \"classes.offering_id = registrations.offering_id \"\n . \"AND registrations.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"INNER JOIN ciniki_course_offerings AS offerings ON (\"\n . \"classes.offering_id = offerings.id \"\n . \"AND offerings.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"INNER JOIN ciniki_courses AS courses ON (\"\n . \"offerings.course_id = courses.id \"\n . \"AND courses.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_sapos_invoice_items AS items ON (\"\n . \"registrations.invoice_id = items.invoice_id \"\n . \"AND items.object_id = registrations.id \"\n . \"AND items.object = 'ciniki.courses.offering_registration' \"\n . \"AND items.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_course_offering_prices AS prices ON (\"\n . \"items.price_id = prices.id \"\n . \"AND prices.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_customers AS customers ON (\"\n . \"registrations.student_id = customers.id \"\n . \"AND customers.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_customer_emails AS emails ON (\"\n . \"customers.id = emails.customer_id \"\n . \"AND emails.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"WHERE classes.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND classes.class_date >= '\" . ciniki_core_dbQuote($ciniki, $args['start_date']) . \"' \"\n . \"\";\n if( isset($args['end_date']) && $args['end_date'] != '' && $args['end_date'] != '0000-00-00' ) {\n $strsql .= \"AND classes.class_date <= '\" . ciniki_core_dbQuote($ciniki, $args['end_date']) . \"' \";\n }\n $strsql .= \"ORDER BY customers.display_name, courses.name, offerings.name, registrations.id \"\n . \"\";\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.courses', array(\n array('container'=>'customers', 'fname'=>'id', \n 'fields'=>array('id', 'customer_id', 'display_name', 'offering_name', 'offering_code', 'course_code', 'course_name', \n 'condensed_date', 'price_name', 'start_date', 'end_date', 'emails'),\n 'lists'=>array('emails'),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.courses.112', 'msg'=>'Unable to load offering_registrations', 'err'=>$rc['err']));\n }\n $customers = isset($rc['customers']) ? $rc['customers'] : array();\n\n //\n // Output PDF version\n //\n if( $args['output'] == 'pdf' ) {\n //\n // FIXME: Add pdf output\n //\n/* $rc = ciniki_core_loadMethod($ciniki, 'ciniki', 'courses', 'templates', 'offeringRegistrationsPDF');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $fn = $rc['function_call'];\n\n $rc = $fn($ciniki, $args['tnid'], $args['offering_id'], $tenant_details, $courses_settings);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n $title = $rc['offering']['code'] . '_' . $rc['offering']['course_name'] . '_' . $rc['offering']['course_name'];\n\n $filename = preg_replace('/[^a-zA-Z0-9_]/', '', preg_replace('/ /', '_', $title));\n if( isset($rc['pdf']) ) {\n $rc['pdf']->Output($filename . '.pdf', 'D');\n } */\n }\n\n //\n // Output Excel version\n //\n elseif( $args['output'] == 'excel' ) {\n require($ciniki['config']['core']['lib_dir'] . '/PHPExcel/PHPExcel.php');\n $objPHPExcel = new PHPExcel();\n $objPHPExcelWorksheet = $objPHPExcel->setActiveSheetIndex(0);\n\n $col = 0;\n $row = 1;\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, 'Student', false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, 'Email', false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, 'Code', false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, 'Course', false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, 'Session', false);\n $row++;\n foreach($customers as $student) {\n $col = 0;\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, $student['display_name'], false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, $student['emails'], false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, $student['offering_code'], false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, $student['course_name'], false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, $student['offering_name'], false);\n\n $row++;\n }\n $objPHPExcelWorksheet->getStyle('A1:E1')->getFont()->setBold(true);\n $objPHPExcelWorksheet->getColumnDimension('A')->setAutoSize(true);\n $objPHPExcelWorksheet->getColumnDimension('B')->setAutoSize(true);\n $objPHPExcelWorksheet->getColumnDimension('C')->setAutoSize(true);\n $objPHPExcelWorksheet->getColumnDimension('D')->setAutoSize(true);\n $objPHPExcelWorksheet->getColumnDimension('E')->setAutoSize(true);\n\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"students.xls\"');\n header('Cache-Control: max-age=0');\n \n $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n $objWriter->save('php://output');\n \n return array('stat'=>'exit');\n } \n\n return array('stat'=>'ok', 'customers'=>$customers);\n}", "public function tms_report() {\n $data['sideMenuData'] = fetch_non_main_page_content();\n if (!empty($_POST)) {\n\n\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n if ($_POST['payStatus'] == '1') {\n $payment_status = \"PAID','PARTPAID\";\n $displayText = \"Total Amount Received for Paid invoices :\";\n $export_url = '?payStatus=1';\n } else if ($_POST['payStatus'] == '2') {\n $payment_status = \"NOTPAID','PARTPAID\";\n $displayText = \"Total Amount Due for unpaid invoices :\";\n $export_url = '?payStatus=2';\n }\n $data['text'] = $displayText;\n $year = $_POST['yearVal'];\n $month = $_POST['monthVal'];\n $training_score1 = $_POST['trainingStatus'];\n $export_url .='&yearVal=' . $year . '&monthVal=' . $month;\n if ($training_score1 == '1') {\n $training_score = 'C';\n } else if ($training_score1 == '2') {\n $training_score = \"NYC','2NYC\";\n } else if ($training_score1 == '3') {\n $training_score = 'ABS';\n } else if ($training_score1 == '4') {\n $training_score = \"C','NYC','2NYC\";\n }\n\n $export_url .= '&trainingStatus=' . $training_score1;\n $temp_data = array();\n if ($_POST['payStatus'] == '1') {\n $data['result'] = $this->reportsModel->tms_paid_report($tenant_id, $payment_status, $year, $month, $training_score);\n } else if ($_POST['payStatus'] == '2') {\n $data['result'] = $this->reportsModel->tms_unpaid_report($tenant_id, $payment_status, $year, $month, $training_score);\n }\n }\n $data['page_title'] = 'TMS Reports';\n $data['export_url'] = $export_url;\n $data['main_content'] = 'reports/tms_report';\n $this->load->view('layout', $data);\n }", "function generate_weekly_report_csv($c_data=array()){\n\t\t\n\t\tApp::import('Helper','csv');\n\t\t$csv = new csvHelper();\n\t\t$line = array(\"Store number\",\"Terminal\",\"Vendor\",\"Product\",\"Item\",\"Face Value\",\"Billed downloads\",\"Billed returns\",\"Net Billed Downloads\",\"Net Face Value\",\"Net Cost\",\"Net Commission\",\"Merchant\",\"Site\",\"Street\",\"Postcode\",\"City\",\"Duplicate Downloads\",\"All Downloads\",\"Duplicate Returns\",\"All Returns\",\"Net All Downloads\",\"Download Face Value\",\"Download Cost\",\"Download Commission\",\"Return Face Value\",\"Return Cost\",\"Return Commission\",\"From\",\"To\");\n\t\t$csv->addRow($line);\n\t\tif(!empty($c_data)){\n\t\t\tforeach($c_data as $data){\n\t\t\t\n\t\t\t\t$line = array($data['u']['u_id'],'X','X','X',$data['p']['title'],'X',$data['0']['total'],'X',$data['0']['total'],'X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X','X');\n\t\t\t\t$csv->addRow($line);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\techo $csv->render(\"weekly\".date(\"d/M/Y\"));\n\t\texit();\n\t}", "public function generateReport()\n {\n\t\t$this->_lastColumn=$this->objWorksheet->getHighestColumn();//TODO: better detection\n\t\t$this->_lastRow=$this->objWorksheet->getHighestRow();\n foreach($this->_data as $data)\n\t\t{\n\t\t\tif(isset ($data['repeat']) && $data['repeat']==true)\n\t\t\t{\n\t\t\t\t//Repeating data\n\t\t\t\t$foundTags=false;\n\t\t\t\t$repeatRange='';\n\t\t\t\t$firstRow='';\n\t\t\t\t$lastRow='';\n\n\t\t\t\t$firstCol='A';//TODO: better detection\n\t\t\t\t$lastCol=$this->_lastColumn;\n\n\t\t\t\t//scan the template\n\t\t\t\t//search for repeating part\n\t\t\t\tforeach ($this->objWorksheet->getRowIterator() as $row)\n\t\t\t\t{\n\t\t\t\t\t$cellIterator = $row->getCellIterator();\n\t\t\t\t\t$rowIndex = $row->getRowIndex();\n\t\t\t\t\t//find the repeating range (one or more rows)\n\t\t\t\t\tforeach ($cellIterator as $cell)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cellval=trim($cell->getValue());\n\t\t\t\t\t\t$column = $cell->getColumn();\n\t\t\t\t\t\t//see if the cell has something for replacing\n\t\t\t\t\t\tif(preg_match_all(\"/\\{\".$data['id'].\":(\\w*|#\\+?-?(\\d*)?)\\}/\", $cellval, $matches))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//this cell has replacement tags\n\t\t\t\t\t\t\tif(!$foundTags) $foundTags=true;\n\t\t\t\t\t\t\t//remember the first ant the last row\n\t\t\t\t\t\t\tif($rowIndex!=$firstRow)\n\t\t\t\t\t\t\t\t$lastRow=$rowIndex;\n\t\t\t\t\t\t\tif($firstRow=='')\n\t\t\t\t\t\t\t\t$firstRow=$rowIndex;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//form the repeating range\n\t\t\t\tif($foundTags)\n\t\t\t\t\t$repeatRange=$firstCol.$firstRow.\":\".$lastCol.$lastRow;\n\n\t\t\t\t//check if this is the last row\n\t\t\t\tif($foundTags && $lastRow==$this->_lastRow)\n\t\t\t\t\t$data['last']=true;\n\n\t\t\t\t//set initial format data\n\t\t\t\tif(! isset($data['format']))\n\t\t\t\t\t$data['format']=array();\n\n\t\t\t\t//set default step as 1\n\t\t\t\tif(! isset($data['step']))\n\t\t\t\t\t$data['step']=1;\n\n\t\t\t\t//check if data is an array\n\t\t\t\tif(is_array($data['data']))\n\t\t\t\t{\n\t\t\t\t\t//every element is an array with data for all the columns\n\t\t\t\t\tif($foundTags)\n\t\t\t\t\t{\n\t\t\t\t\t\t//insert repeating rows, as many as needed\n\t\t\t\t\t\t//check if grouping is defined\n\t\t\t\t\t\tif(count($this->_group))\n\t\t\t\t\t\t\t$this->generateRepeatingRowsWithGrouping($data, $repeatRange);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$this->generateRepeatingRows($data, $repeatRange);\n\t\t\t\t\t\t//remove the template rows\n\t\t\t\t\t\tfor($i=$firstRow;$i<=$lastRow;$i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->objWorksheet->removeRow($firstRow);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//if there is no data\n\t\t\t\t\t\tif(count($data['data'])==0)\n\t\t\t\t\t\t\t$this->addNoResultRow($firstRow,$firstCol,$lastCol);\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 //TODO\n\t\t\t\t //maybe an SQL query?\n\t\t\t\t //needs to be database agnostic\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//non-repeating data\n\t\t\t\t//check for additional formating\n\t\t\t\tif(! isset($data['format']))\n\t\t\t\t\t$data['format']=array();\n\n\t\t\t\t//check if data is an array or mybe a SQL query\n\t\t\t\tif(is_array($data['data']))\n\t\t\t\t{\n\t\t\t\t\t//array of data\n\t\t\t\t\t$this->generateSingleRow($data);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//TODO\n\t\t\t\t //maybe an SQL query?\n\t\t\t\t //needs to be database agnostic\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //call the replacing function\n $this->searchAndReplace();\n\n //generate heading if heading text is set\n if($this->_headingText!='')\n $this->generateHeading();\n\n }", "public function export_company_generate_invoice($id) \n {\n $tenant_id = $this->tenant_id;\n \n if (empty($id)) \n {\n return show_404();\n }\n// $result = $this->classtraineemodel->get_enroll_invoice($id);\n \n $result = $this->classtraineemodel->get_company_enroll_invoice($id);\n //added by pritam to generate previous invoice number\n $result->previous_inv_id = $this->classtraineemodel->get_enroll_prev_invoice($result->invoice_id);\n \n //sk st\n $discount = $this->classtraineemodel->get_discount($result->pymnt_due_id);\n $result->discount_label = $discount->discount_type;\n $result->discount_rate = $discount->discount_rate;\n //sk ed\n \n //\n $result->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($result->tenant_state), ', ');\n $result->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($result->tenant_country), ', ');\n $result->inv_year = date('Y', strtotime($result->inv_date));\n $result->inv_date = date('d/m/Y', strtotime($result->inv_date));\n $result->discount_label = rtrim($this->course->get_metadata_on_parameter_id($result->discount_type), ', ');\n if ($result->total_gst) {\n $result->gst_label = 'GST ON, ' . rtrim($this->course->get_metadata_on_parameter_id($result->gst_rule), ', ');\n } else {\n $result->gst_label = 'GST OFF';\n }\n $course_manager = $this->course->get_managers($courses->crse_manager);\n $length = stripos($course_manager, ', ');\n $result->course_manager = (!empty($length)) ? substr($course_manager, 0, $length) : $course_manager;\n if ($result->company_id[0] == 'T') {\n $result->company_name = $result->tenant_name;\n $result->company_details->comp_state = $result->tenant_state;\n $result->company_details->comp_cntry = $result->tenant_country;\n $result->company_details->comp_phone = $result->tenant_contact_num;\n $result->company_details->comp_address = $result->tenant_address;\n \n $company_person = $this->company->get_company_user($result->tenant_id, $result->company_id);//sk1\n $result->company_person_name = $company_person[0]->first_name;//sk2\n \n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $result->company_id);\n $result->company_details = $company_details[0];\n $result->company_details->comp_state = rtrim($this->course->get_metadata_on_parameter_id($result->company_details->comp_state), ', ');\n $result->company_details->comp_cntry = rtrim($this->course->get_metadata_on_parameter_id($result->company_details->comp_cntry), ', ');\n\n $result->company_name = $company_details[0]->company_name;\n \n $company_person = $this->company->get_company_user($this->tenant_id, $result->company_id);//skm1\n $result->company_person_name = $company_person[0]->first_name;//skm2\n \n }\n\n $result->total_inv_discnt = round($result->total_inv_discnt, 2);\n $result->total_unit_fees = round($result->total_unit_fees, 2);\n $result->total_inv_subsdy = round($result->total_inv_subsdy, 2);\n $result->gst_rate = round($result->gst_rate, 2);\n\n $result->indi_disc_total = ($result->class_fees * ($result->discount_rate / 100));\n\n $feesdue = $result->total_unit_fees - $result->total_inv_discnt;\n $result->payment_due_details = $this->classtraineemodel->get_company_payment_due_details($id);\n \n $company_received = $this->classtraineemodel->company_payment_recd($result->invoice_id);\n $user_paid = array();\n foreach ($company_received as $k => $v) {\n $user_paid[$v->user_id] = round($v->amount_recd,2);\n }\n $company_refunded = $this->classtraineemodel->company_payment_refund($result->invoice_id);\n $user_refund = array();\n foreach ($company_refunded as $k => $v) {\n $user_refund[$v->user_id] = round($v->refund_amount,2);\n }\n foreach($result->payment_due_details as $key=>$val)\n {\n $received = empty($user_paid[$val->user_id]) ? 0 : $user_paid[$val->user_id];\n $refunded = empty($user_refund[$val->user_id]) ? 0 : $user_refund[$val->user_id];\n $inv_amt+=$val->total_amount_due;\n $received_amt+=$received;\n $refunded_amt+=$refunded;\n if((($val->total_amount_due + $refunded) - $received) <= 0)\n {\n $payment_label = 'PAID';\n }\n else\n { \n \n if($received > 0 && $val->payment_status == 'PARTPAID')\n {\n $payment_label = 'PART PAID';\n \n }else if($refunded > 0)\n { \n $payment_label = 'REFUNDED'; \n } \n else\n { \n if($received == 0)\n {\n $payment_label = 'NOT PAID';\n }\n else if($received > 0)\n {\n $payment_label = 'PART PAID';\n }\n }\n }\n $result->payment_due_details[$key]->payment_label = $payment_label;\n }\n \n $payable_amount=$inv_amt-$received_amt; \n $result->payble_amount=$inv_amt+$refunded_amt-$received_amt;\n\n $this->load->helper('pdf_reports_helper');\n if($tenant_id =='T17'){\n generate_company_pdf_invoice_everest($result);\n }else{\n generate_company_pdf_invoice_all($result);\n }\n \n }", "public function reportMonthlyClassWiseAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportMonthlyClassWiseAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "function sendExport() {\n\tglobal $orgcode;\n\tglobal $filename;\n\tglobal $firstdate;\n\tglobal $lastdate;\n\t$headers = [\n\t\t\"ORGCODE\",\t//0\n\t\t\"PARTICIP\",\n\t\t\"ENROLL\",\n\t\t\"PAYER\",\n\t\t\"STATE\",\n\t\t\"GLUCTEST\",\t//5\n\t\t\"GDM\",\n\t\t\"RISKTEST\",\n\t\t\"AGE\",\n\t\t\"ETHNIC\",\n\t\t\"AIAN\",\t\t//10\n\t\t\"ASIAN\",\n\t\t\"BLACK\",\n\t\t\"NHOPI\",\n\t\t\"WHITE\",\n\t\t\"SEX\",\t\t//15\n\t\t\"HEIGHT\",\n\t\t\"EDU\",\n\t\t\"DMODE\",\n\t\t\"SESSID\",\n\t\t\"SESSTYPE\",\t//20\n\t\t\"DATE\",\n\t\t\"WEIGHT\",\n\t\t\"PA\"\n\t];\n\t\n\t$data = [$headers];\n\t$noncompliant = [$headers];\n\t$today = new DateTime(\"NOW\");\n\t\n\t// get all participant data\n\t$records = \\REDCap::getData(PROJECT_ID);\n\t$project = new \\Project(PROJECT_ID);\n\t\n\t// get year value for when these records were created or first logged update\n\t$recordCreationDates = [];\n\t$sql = \"SELECT pk, ts FROM redcap_log_event WHERE project_id=\" . PROJECT_ID . \" and pk in (\" . implode(array_keys($records), \", \") . \") and (description=\\\"Create record\\\" OR description=\\\"Update record\\\") ORDER BY pk ASC, ts ASC\";\n\t$query = db_query($sql);\n\twhile ($row = db_fetch_assoc($query)) {\n\t\tif (!isset($recordCreationDates[$row['pk']])) {\n\t\t\t$recordCreationDates[$row['pk']] = substr($row['ts'], 2, 2);\n\t\t}\n\t}\n\t\n\t// regex for getting labels for project fields (like state, sess_type, etc)\n\t$labelPattern = \"/(\\d+),?\\s?(.+?)(?=\\x{005c}\\x{006E}|$)/\";\n\t\n\tforeach ($records as $rid => $record) {\n\t\t$eid = array_keys($record)[0];\n\t\t\n\t\t// skip if orgcode set and not match\n\t\tif (isset($orgcode) and $orgcode != $record[$eid]['orgcode']) {\n\t\t\tcontinue;\n\t\t}\n\t\t\n\t\t// skip if have diabietes\n\t\tif ($record[$eid]['have_diabetes'] == 1 or $record[$eid]['enter_roster'] == 0) continue;\n\t\t\n\t\t$line = array_fill(0, 23, null);\n\t\t$line[0] = $record[$eid]['orgcode'];\n\t\t\n\t\t// determine participant ID\n\t\t$participantID = $recordCreationDates[$rid];\n\t\tpreg_match_all($labelPattern, $project->metadata['participant_id_group']['element_enum'], $matches);\n\t\t$participantID .= trim($matches[2][$record[$eid]['participant_id_group'] - 1]);\n\t\t$participantID .= $record[$eid]['participant_id_group'];\n\t\tpreg_match_all(\"/\\d+/\", $record[$eid]['participant_employee_id'], $matches);\n\t\t$participantID .= $matches[0][0];\n\t\t\n\t\t$line[1] = $participantID;\n\t\t$line[2] = $record[$eid]['program_referral'] === null ? 10 : $record[$eid]['program_referral'];\n\t\t$line[3] = $record[$eid]['payer'] === null ? 9 : $record[$eid]['payer'];\n\t\tpreg_match_all($labelPattern, $project->metadata['state']['element_enum'], $matches);\n\t\tpreg_match(\"/- ([A-Z]{2})(?:\\s|$)/\", $matches[2][$record[$eid]['state'] - 1], $matches);\n\t\t$line[4] = $matches[1];\n\t\t$line[5] = $record[$eid]['gluctest'] == 1 ? 1 : 2;\n\t\t$line[6] = $record[$eid]['gdm'] == 1 ? 1 : 2;\n\t\t$line[7] = $record[$eid]['risktest'] == 1 ? 1 : 2;\n\t\t$dob = new DateTime($record[$eid]['dob']);\n\t\t$line[8] = $dob->diff($today)->format('%y');\n\t\t$line[9] = $record[$eid]['ethnicity'] == null ? 9 : $record[$eid]['ethnicity'];\n\t\t$line[10] = $record[$eid]['race'][1] == 1 ? 1 : 2;\n\t\t$line[11] = $record[$eid]['race'][2] == 1 ? 1 : 2;\n\t\t$line[12] = $record[$eid]['race'][3] == 1 ? 1 : 2;\n\t\t$line[13] = $record[$eid]['race'][4] == 1 ? 1 : 2;\n\t\t$line[14] = $record[$eid]['race'][5] == 1 ? 1 : 2;\n\t\t$line[15] = $record[$eid]['sex'] == null ? 9 : $record[$eid]['sex'];\n\t\tpreg_match_all($labelPattern, $project->metadata['height']['element_enum'], $matches);\n\t\tpreg_match_all(\"/[0-9]{1,2}/\", $matches[2][$record[$eid]['height'] - 1], $matches);\n\t\t$line[16] = @((int) $matches[0][0] * 12 + (int) $matches[0][1]);\n\t\t$line[17] = $record[$eid]['education'] == null ? 9 : $record[$eid]['education'];\n\t\t\n\t\t$instanceSum = 0;\n\t\tforeach ($record['repeat_instances'][$eid]['sessionscoaching_log'] as $i => $instance) {\n\t\t\t// only add data that's within last 6 months!\n\t\t\t$sess_date = $instance[\"sess_actual_date\"];\n\t\t\tif (empty($sess_date)) {\n\t\t\t\t$sess_date = $instance[\"sess_scheduled_date\"];\n\t\t\t}\n\t\t\t\n\t\t\t$thisdate = strtotime($sess_date);\n\t\t\tif (empty($sess_date) or (!empty($firstdate) and $firstdate > $thisdate) or (!empty($lastdate) and $lastdate < $thisdate)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$instanceSum++;\n\t\t\t$line_copy = $line;\n\t\t\t$line_copy[18] = $instance['sess_mode'];\n\t\t\t$line_copy[19] = $instance['sess_id'];\n\t\t\tif ($instance[\"sess_month\"] >= 7) {\n\t\t\t\t$line_copy[19] = 99;\n\t\t\t\t$line_copy[20] = \"CM\";\n\t\t\t}\n\t\t\tif ($instance[\"sess_month\"] >= 7)\n\t\t\t\t$line_copy[20] = \"OM\";\n\t\t\tpreg_match_all($labelPattern, $project->metadata['sess_type']['element_enum'], $matches);\n\t\t\tpreg_match_all(\"/\\(([A-Z]|[A-Z][A-Z])\\)/\", $matches[2][$instance['sess_type'] - 1], $matches);\n\t\t\t$line_copy[20] = $matches[1][0];\n\t\t\t$line_copy[21] = $sess_date == null ? null : date(\"m/d/Y\", strtotime($sess_date));\n\t\t\t$line_copy[22] = $instance['sess_weight'];\n\t\t\t$line_copy[23] = $instance['sess_pa'];\n\t\t\t\n\t\t\t$session_attended = false;\n\t\t\tif ($instance[\"sess_attended\"] or $instance['sess_weight'] or $instance['sess_pa'])\n\t\t\t\t$session_attended = true;\n\t\t\t\n\t\t\tvalidateLine($line_copy, $session_attended);\n\t\t\t\n\t\t\t// if session is marked as attended but weight and/or pa values not included, use 999\n\t\t\tif ($instance[\"sess_attended\"] and empty($line_copy[22]))\n\t\t\t\t$line_copy[22] = 999;\n\t\t\tif ($instance[\"sess_attended\"] and empty($line_copy[23]))\n\t\t\t\t$line_copy[23] = 999;\n\t\t\t\n\t\t\t// if error messages were appended...\n\t\t\tif (isset($line_copy[24]) and isset($_GET['noncompliant'])) {\n\t\t\t\t$noncompliant[] = $line_copy;\n\t\t\t}\n\t\t\t\n\t\t\t// no errors and no non-compliant param\n\t\t\tif (!isset($line_copy[24]) and !isset($_GET['noncompliant'])) {\n\t\t\t\t$data[] = $line_copy;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// send participant records with no session data to noncompliant set\n\t\tif ($instanceSum == 0)\n\t\t\t$noncompliant[] = $line;\n\t}\n\t\n\theader('Content-Type: text/csv');\n\theader(\"Content-Disposition: attachment; filename=\\\"$filename\\\"\");\n\t$fp = fopen('php://output', 'wb');\n\t\n\t// non-compliance report\n\tif (isset($_GET['noncompliant'])) {\n\t\t$data = $noncompliant;\n\t}\n\t\n\tforeach ($data as $line) {\n\t\tfputcsv($fp, $line, ',');\n\t}\n\tfclose($fp);\n}", "public function generate_acknowledgement() {\n \n $clsid = $this->input->post('cls');\n $crsid = $this->input->post('crs');\n $usrid = $this->input->post('usr');\n $ack_data = $this->payments_model->get_acknowledgement_data($clsid, $crsid, $usrid);\n\n $tanant = $this->courses_model->get_tenant_details();\n \n //sankar code starts here\n //resetting classroom location parameter id with category name\n $ack_data[classroom_location] = $this->meta_data[$ack_data[classroom_location]];\n $ack_data[cert_level] = $this->meta_data[$ack_data[certi_level]];\n //sankar code ends here\n $gender = ($ack_data['gender'] == 'MALE') ? 'Mr. ' : 'Ms. ';\n $Url = base_url() . 'payments/print_ack';\n\n $date = date('M d Y');\n $startdate = date('M d Y, l', strtotime($ack_data[class_start_datetime])) . ' @ ' . date('h:i A', strtotime($ack_data[class_start_datetime]));\n \n /* skm code start for remark.\n reporting time skm start bcoz of sam request for AOP(67) on 18-may-17*/\n $time = strtotime($ack_data[class_start_datetime]);\n $reporting_time = date(\"H:i A\", strtotime('-30 minutes', $time));\n if($crsid == 67 || $crsid == 121)\n {\n $li = \"Report at center at $reporting_time to register for class\";\n }else{\n $li = \"Report at center at 8:30 AM to register for class\";\n }\n /* end */\n $tenant_id = TENANT_ID;\n if($tenant_id == 'T12')\n { \n $name = $tanant->contact_name;\n }else{\n\n $name = $gender. $ack_data[crse_manager][first_name] . ' ' . $ack_data[crse_manager][last_name];\n }\n \n $message3 = '\n <ol>\n <li>All participants please bring along their photo ID card with either their Nric/Fin number stated upon class date.</li>\n <li>Your NRIC, work permit or will be photocopied on the class date</li>\n <li>Trim finger nails and remove nail polish</li>\n <li>'.$li.'</li>\n </ol>';\n /* skm end */\n \n echo '<form action=\"' . $Url . '\" method=\"post\"><p> \n <a class=\"close-modal \" rel=\"modal:close\" href=\"#close-modal\">Close</a>\n\t\t\t <h2 class=\"panel_heading_style\">Booking Acknowledgment</h2>\t\t\t \n\t\t\n\t\t\t Your seat has been temporarily booked. Please pay the class fees on or before the class start date.\n\t\t\tTemporary booking for <b>' . $ack_data[first_name] . ' ' . $ack_data[last_name] . ' </b> for <b> Course:\"' . $ack_data[crse_name] . ',Class:' . $ack_data[class_name] . ',Certificate Code:' . $ack_data[cert_level] . ' </b>\".</i><br>\n\t\t\t </br><strong>Class start date:</strong> ' . $startdate . '<br>\n\t\t\t </br><strong>Location:</strong> ' . $ack_data[classroom_location] . '<br>\n\t\t\t</br><strong>Contact Details:</strong> ' . $name . ',(Phone: ' . $tanant->tenant_contact_num . ',Email Id: ' . $tanant->tenant_email_id . ')\n </br><strong>Remark:</strong> ' . $message3 . '<br>\n <input type=\"hidden\" value=\"' . $clsid . '\" name=\"classId\"/>\n <input type=\"hidden\" value=\"' . $crsid . '\" name=\"courseId\"/>\n <input type=\"hidden\" value=\"' . $usrid . '\" name=\"userId\"/> \n <input type=\"hidden\" value=\"' . $ack_data . '\" name=\"ackdata\"/>\n <div style=\"clear:both;\"></div><br>\t\t\t \n\t\t\t <span style=\"float:right;\">\n\t\t\t<button class=\"btn btn-primary\" type=\"submit\">Print</button>\n\t\t\t </p></form> ';\n }", "public function getAcademicAnalyticsPDF()\n {\n\n /*$getUrl = $this->connection->prepare(\"SELECT * FROM `AC_FacultyInfo` WHERE OU_ABBREV = ? AND OUTCOMES_AY = ?\");\n $getUrl->bindParam(1,$this->ouAbbrev,PDO::PARAM_STR);\n $getUrl->bindParam(2,$this->selectedYear,PDO::PARAM_STR);\n $getUrl->execute();\n $data = $getUrl->fetch();\n\n if (!empty($data[\"AC_SUPPL_ACADEMIC_ANALYTICS\"])){\n\n if (file_exists(\"../../uploads/ac_programs/\".$data[\"AC_SUPPL_ACADEMIC_ANALYTICS\"]))\n $this->getSupplementPdf(\"../../uploads/ac_programs/\".$data[\"AC_SUPPL_ACADEMIC_ANALYTICS\"]);\n\n }*/\n\n }", "private function gASummary($date_from,$date_to) {\n $service_account_email = '[email protected]'; \n // Create and configure a new client object.\n $client = new \\Google_Client();\n $client->setApplicationName(\"Analytics Reporting\");\n $analytics = new \\Google_Service_Analytics($client);\n $cred = new \\Google_Auth_AssertionCredentials(\n $service_account_email,\n array(\\Google_Service_Analytics::ANALYTICS_READONLY),\n \"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDAUT0xOyseXwTo\\nMRchra9QmsRYGUZ8+rdGihcAXrt3AqDq4/sKRaIe5gvte+C3bwHV8fI42nz0axRN\\n8WJo7lT7TzZweuAFTv+yuH/yHvNQlPAHMDCars7QTTGf8XcUHO5cq9yYA0FD2/gg\\nWAwU9V34RjL0fvEFHPii9zOZoPMtrNsMwxQcKSw2cs9TZ+grwfp5r/pRbUbPlUYg\\n/3B87jk5FjG9NKO7eRW2Pu7zf7pPZw067EMdAcGpZO7Gnzc21T1f3qj0JR0V7ooh\\nQcxiGCUIUbkKMYOuj/Rb5uQhnfb8ERehxfGFAg9FSiYbPZqag2d/adbmt32hQEKW\\nvud0nU4HAgMBAAECggEAHmy7wY4axDNEE3ewsSNJGPdjGIznGd6QIBi4itZx0eIY\\nkxB+JqHdhAXg3TE728k0ASTFrTjji8dk7u/BIdiSmS9u7VyDFFPrH9sQYr2CwLzP\\nPFPjXJVLIqkTsLoCnKv3CbIms+XP7WxfVL6ZKrempiB07zkl6CktLJrvDt7nmdH4\\nevtrk7aKxpESJUQQVgs5CULH5gIQow/qx5rDHjAaLIsbIlmUXOBZQ4yO77/Lub8u\\nZe6GDBZGeqHqA1yzKgYQiFu/TqAmtsNbtDYfm8dUY/Tkxv/RhJDCJRlpE7Vhq5zD\\nBdrnjW/IWlMVZV0SFLgvkIZ8KMBhvJi6TARzhEXcAQKBgQDswarwvnXmbGCzi4Qh\\ntJ84VeSqzOib4Gp4wzC5WyWHdQdgVb4Ob/HpI69zswwB112W7GbRy/eiUZz7Cg8Q\\nak+3ZbIVeLTlNcJApa0sNEBft+ps7Ww9hajPpTOEhtuSQu9Hx5GXgj65a6a3l+gG\\n9DPGkZC0dLXMrSgWDFZMmtLtPQKBgQDP8uYyy3mhg9owkAhgr1gdSdLJxQ/13o+Y\\nozOWHvBjoF84k/0iLDOqGxuqwBaZBf1ov5W9TS4CeyEfECaCSYc87gThcsKngeZM\\n2fSICIkmOHh24WXamEENQqmKvMXQ8g9HGKzo0TL+r9/iDrrsfo0nCPVEC2A/QBU9\\nBB5YQ9SkkwKBgQDDXSAwXgmt5Vp6bbLPmVsVQpNZeZKsJafWFMMdAKBcQW6fyMD2\\n6tsE1cSOxX0v+8YnptVFY3jpQU03PdqmYgN7w3gLDbq/tPehHtViN4+zLHFOBzCd\\nJ7Df/2MehaWj8IXAhmaWTgxyNumwb7IwIsyimzV8Ix5tUalVYELKHavVxQKBgCkO\\nMMq4h4QO7yYFWdIU7FWj/Jzfbj5BuaIOHqI164oP4JzgAusbRPwBrB2zHQMLPrPO\\nl3avZTUSMEDcxG2WrL+n0ojcSngd2mUz5uZwoPtNzOLTr3NP+g/vKF/+0yNklwWX\\nZpP0sZe9C3urItaMSbv6NcpAYLk8IrVQOdl9Ut9HAoGACt0YP/MLOlnn/S/qyn5+\\npQhuIsnv3rNa7yZrhfn0u+jdLNk4ubmc/A6Z4Yc/hqQEV/UOwfSwAAlHAZgdUWYi\\nvL6VfVaDxX5goKnWxnuvErFH1Zg+3Lem+moBzXXpb0EPxMXsAgXWe6j8YuZReXXu\\nOLoW4l5DW4h2ZmxxWr/D/Jc=\\n-----END PRIVATE KEY-----\\n\"\n ); \n $client->setAssertionCredentials($cred);\n if($client->getAuth()->isAccessTokenExpired()) {\n $client->getAuth()->refreshTokenWithAssertion($cred);\n }\n $optParams = [\n 'dimensions' => 'ga:date',\n 'sort'=>'-ga:date'\n ] ; \n $results = $analytics->data_ga->get(\n 'ga:140884579',\n $date_from,\n $date_to,\n 'ga:sessions,ga:users,ga:pageviews,ga:bounceRate,ga:hits,ga:avgSessionDuration',\n $optParams\n );\n \n $rows = $results->getRows();\n $rows_re_align = [] ;\n foreach($rows as $key=>$row) {\n foreach($row as $k=>$d) {\n $rows_re_align[$k][$key] = $d ;\n }\n } \n $optParams = array(\n 'dimensions' => 'rt:medium'\n );\n try {\n $results1 = $analytics->data_realtime->get(\n 'ga:140884579',\n 'rt:activeUsers',\n $optParams);\n // Success. \n } catch (apiServiceException $e) {\n // Handle API service exceptions.\n $error = $e->getMessage();\n }\n $active_users = $results1->totalsForAllResults ;\n return [\n 'data'=> $rows_re_align ,\n 'summary'=>$results->getTotalsForAllResults(),\n 'active_users'=>$active_users['rt:activeUsers']\n ] ;\n }", "function makeTXT()\n {\n $calendar_text = \"No calendar information available.\";\n if (isset($this->calendar->events)) {\n $calendar_text = \"\";\n foreach ($this->calendar->events as $event) {\n $description_seperator = \" - \";\n $description = \"description\";\n if ($this->description_flag != \"on\") {\n $description_seperator = \"\";\n $description = \"\";\n }\n\n $t =\n $this->textCalendar($event, [\n \"timestamp Y-m-d H:i\",\n \" \",\n // 'timezone',\n // ' ',\n \"summary\",\n \" [\",\n \"runtime\",\n \"]\",\n $description_seperator,\n $description,\n ]) . \"\\n\";\n\n $calendar_text .= $t;\n }\n }\n\n $txt =\n \"CALENDAR \" .\n $this->time_zone .\n \"\\n\\n\" .\n $calendar_text .\n \"\\n\\n\" .\n $this->response;\n\n $this->txt = $txt;\n $this->thing_report[\"txt\"] = $txt;\n }", "function demo_report_all() {\n\n $conn = sql_connect();\n\n $sql_patient = mysqli_query($conn, \"SELECT * FROM Patients;\");\n\n $insurance_Y = 0;\n $insurance_N = 0;\n $age = 0;\n $sex_M = 0;\n $sex_F = 0;\n $sex_Other = 0;\n\n $ethn_api = 0;\n $ethn_afam = 0;\n $ethn_natam = 0;\n $ethn_white = 0;\n $ethn_hisp = 0;\n $ethn_other = 0;\n\n $marital_sing = 0;\n $marital_marr = 0;\n $marital_widow = 0;\n $marital_divor = 0;\n $marital_separ = 0;\n\n $total = 0;\n\n if($sql_patient) {\n\n while($patient = mysqli_fetch_assoc($sql_patient)) {\n\n $total++;\n\n $sql_demo = mysqli_query($conn, \"SELECT * FROM Demographics WHERE Demo_ID=\".$patient['Demographics_ID'].\";\") or die(mysqli_error($conn));\n $demo = mysqli_fetch_assoc($sql_demo);\n\n if(strcmp($demo['Has_insurance'],'Yes') == 0) {\n $insurance_Y++;\n } else {\n $insurance_N++;\n }\n\n $age += $demo['Age'];\n\n if(strcmp($demo['Sex'],'M') == 0) {\n $sex_M++;\n } elseif (strcmp($demo['Sex'],'F') == 0) {\n $sex_F++;\n } else {\n $sex_Other++;\n }\n\n if (strcmp($demo['Ethnicity'], 'Asian/Pacific Islander') == 0) {\n $ethn_api++;\n } elseif (strcmp($demo['Ethnicity'], 'African-American') == 0) {\n $ethn_afam++;\n } elseif (strcmp($demo['Ethnicity'], 'Native American') == 0) {\n $ethn_natam++;\n } elseif (strcmp($demo['Ethnicity'], 'White') == 0) {\n $ethn_white++;\n } elseif (strcmp($demo['Ethnicity'], 'Hispanic') == 0) {\n $ethn_hisp++;\n } else {\n $ethn_other++;\n }\n\n if(strcmp($demo['Marital_status'], 'Single') == 0) {\n $marital_sing++;\n } elseif (strcmp($demo['Marital_status'], 'Married') == 0) {\n $marital_marr++;\n } elseif (strcmp($demo['Marital_status'], 'Widowed') == 0) {\n $marital_widow++;\n } elseif (strcmp($demo['Marital_status'], 'Divorced') == 0) {\n $marital_divor++;\n } else {\n $marital_separ++;\n }\n\n }\n\n $insurance_Y = number_format($insurance_Y/(float)$total, 3);\n $insurance_N = number_format($insurance_N/(float)$total, 3);\n $sex_M = number_format($sex_M/(float)$total, 3);\n $sex_F = number_format($sex_F/(float)$total, 3);\n $sex_Other = number_format($sex_Other/(float)$total, 3);\n $age = number_format($age/(float)$total, 1);\n $marital_sing = number_format($marital_sing/(float)$total, 3);\n $marital_marr = number_format($marital_marr/(float)$total, 3);\n $marital_widow = number_format($marital_widow/(float)$total, 3);\n $marital_divor = number_format($marital_divor/(float)$total, 3);\n $marital_separ = number_format($marital_separ, 3);\n $ethn_api = number_format($ethn_api/(float)$total, 3);\n $ethn_afam = number_format($ethn_afam/(float)$total, 3);\n $ethn_natam = number_format($ethn_natam/(float)$total, 3);\n $ethn_white = number_format($ethn_white/(float)$total, 3);\n $ethn_hisp = number_format($ethn_hisp/(float)$total, 3);\n $ethn_other = number_format($ethn_other/(float)$total, 3);\n\n\n echo \"<h3> Patient Demographics for Entire Clinic</h3><br>\";\n echo \"<table><tr><th>[Has Insurance]</th><th></th><th>[Gender]</th><th></th><th></th></tr>\";\n echo \"<tr><th>Yes</th><th>No</th><th>Male</th><th>Female</th><th>Other</th></tr>\";\n echo \"<tr><td><center>\".($insurance_Y*100).\"%</center></td><td><center>\".($insurance_N*100).\"%</center></td><td><center>\".($sex_M*100).\"%</center></td><td><center>\".($sex_F*100).\"%</center></td><td><center>\".($sex_Other*100).\"%</center></td></tr>\";\n echo \"<tr><th>[Average Age]</th><th></th><th></th><th>[Marital Status]</th><th></th><th></th><th></th></tr>\";\n echo \"<tr><th></th><th>Single</th><th>Married</th><th>Widowed</th><th>Divorced</th><th>Separated</th></tr>\";\n echo \"<tr><td><center>\".$age.\"</center></td><td><center>\".($marital_sing*100).\"%</center></td><td><center>\".($marital_marr*100).\"%</center></td><td><center>\".($marital_widow*100).\"%</center></td><td><center>\".($marital_divor*100).\"%</center></td><td><center>\".($marital_separ*100).\"%</center></td></tr>\";\n echo \"<tr><th></th><th></th><th>[Ethnicity]</th><th></th><th></th><th></th></tr>\";\n echo \"<tr><th>Asian/Pacific Islander</th><th>Africa-American</th><th>Native American</th><th>White</th><th>Hispanic</th><th>Other</th></tr>\";\n echo \"<tr><td><center>\".($ethn_api*100).\"%</center></td><td><center>\".($ethn_afam*100).\"%</center></td><td><center>\".($ethn_natam*100).\"%</center></td><td><center>\".($ethn_white*100).\"%</center></td><td><center>\".($ethn_hisp*100).\"%</center></td><td><center>\".($ethn_other*100).\"%</center></td></tr></table>\";\n\n } else {\n\n echo \"No patients found\";\n\n }\n\n }", "function report_availabilty($student_id)\n {\n global $CFG;\n\n $now=time();\n\n //if a maximum number of entries has been set lets see if the student has reached this number\n if (!empty($this->reportmaxentries)) {\n $studententries = $this->dbc->count_report_entries($this->report_id,$student_id);\n\n if ($studententries >= $this->reportmaxentries) {\n $extension = $this->extension_check('reportmaxentries');\n\n if (empty($extension) || $studententries >= $extension->value) {\n $temp = new stdClass();\n $temp->entries = $studententries;\n $temp->maxentries = (!empty($extension))? $extension->value : $this->reportmaxentries;\n return false;\n }\n }\n }\n\n //if this report has a lock date check if the date has passed\n if ($this->reporttype == ILP_RT_RECURRING_FINALDATE || $this->reporttype == ILP_RT_FINALDATE) {\n\n if ( $this->reportlockdate < $now ) {\n //find out if this student has been given a report extension\n $extension = $this->extension_check('reportlockdate');\n if (empty($extension) || $extension->value < $now) {\n $temp = new stdClass();\n $temp->expiredate = (!empty($extension))? date('d-m-Y',$extension->value) : date('d-m-Y',$this->reportlockdate);\n return false;\n }\n }\n }\n\n //if the report is a recurring report\n if ($this->reporttype == ILP_RT_RECURRING || $this->reporttype == ILP_RT_RECURRING_FINALDATE) {\n $recurringstart = 0;\n\n if ($this->recurstart == ILP_RECURRING_REPORTCREATION) {\n //rules started at report creation\n $recurringstart = $this->timecreated;\n } else if ($this->recurstart == ILP_RECURRING_SPECIFICDATE) {\n //rules started at specific date\n $recurringstart = $this->recurdate;\n } else {\n //rules started at first entry\n $studententries = $this->dbc->get_user_report_entries($this->id,$student_id);\n\n if (!empty($studententries)) {\n //get the creation time of the first user entry\n $recurringstart = reset($studententries);\n $recurringstart = $recurringstart->timecreated;\n }\n }\n\n if (!empty($recurringstart)) {\n $recurringperiod = $this->recurring_period($recurringstart,$this->recurfrequency);\n\n $entriescount = $this->dbc->count_report_entries($this->id,$student_id,$recurringperiod['start'],$recurringperiod['end']);\n\n if (!empty($entriescount) && $entriescount >= $this->recurmax) {\n $extension = $this->extension_check('recurmax');\n if (empty($extension) || $extension->value <= $entriescount) {\n $temp = new stdClass();\n $temp->entries = $entriescount;\n $temp->maxentries = (!empty($extension))? $extension->value : $this->recurmax;\n return false;\n }\n }\n }\n }\n return true;\n }", "function getSubjectTransaction($subject_id)\n {\n $school_id = '';\n if(($this->session->userdata('school_id'))) {\n $school_id = $this->session->userdata('school_id');\n if($school_id > 0){\n $this->db->where('school_id',$school_id);\n } \n }\n \n $transaction = 0;\n $count = 0;\n $current_date = date(\"Y-m-d\");\n // book issue table\n $result_array = $this->db->get_where(\"exam_routine\", array(\"subject_id\" => $subject_id))->result_array();\n $count = count($result_array);\n if($count)\n { \n $transaction = 1;\n return $transaction;\n }\n // \n \n $result_array = $this->db->get_where(\"mark\", array(\"subject_id\" =>$subject_id))->result_array();\n $count = count($result_array);\n if($count)\n { \n $transaction = 1;\n return $transaction;\n }\n \n \n return $transaction;\n }", "public function paynow1($scheduleid){\n //die(var_dump($this->usertype));\n $user_details = $this->pay_mdl->get_user_details($this->usertype, $this->user_id);\n \n $excep_param = array(\n 'usertype' => $user_details['usertype'],\n 'colid'=> $user_details['colid'],\n 'deptid' => $user_details['deptid'],\n 'progid' => ($user_details['usertype'] == 'applicant')? $user_details['prog1'] : $user_details['progid'],\n 'type' => ($user_details['usertype'] == 'applicant')? $user_details['type'] : \"\",\n 'coi'=>($user_details['usertype'] == 'applicant')? $user_details['coi'] : \"\",\n 'stid' => $user_details['stid'],\n 'level' => ($user_details['usertype'] == 'student')? $user_details['level'] : \"\",\n );\n $excep = $this->pay_mdl->get_user_exceptions($excep_param, $scheduleid)['rs'];\n \n //set pay history parameter\n $pay_hist_param = array(\n \"scheduleid\" => $scheduleid,\n \"userid\" => $user_details['userid'],\n \"status\" => \"'APPROVED'\"\n );\n $my_pay_hist = $this->pay_mdl->gets('my_pay_history', $pay_hist_param );\n \n $data['my_paying'] = '';\n \n \n switch ($this->usertype) {\n case 'applicant':\n \n\n break;\n case 'student':\n $hist_perc = array();\n $tot = 0;\n $total_paid = 0;\n\n\n // Set User session parameters\n if(!$this->main->get('level')){\n\n $student_details = $this->pay_mdl->gets('student_details', $this->main->item('user_id'));\n\n $this->main->set('level', $student_details['level'] );\n $this->main->set('colid', $student_details['colid'] );\n $this->main->set('deptid', $student_details['deptid'] );\n $this->main->set('progid', $student_details['progid'] );\n $this->main->set('usertype', $student_details['usertype']);\n }\n\n\n //set pay history parameter\n $pay_hist_param = array(\n \"scheduleid\" => $scheduleid,\n \"userid\" => $this->main->item('user_id'),\n \"status\" => \"'APPROVED'\"\n );\n $my_pay_hist = $this->pay_mdl->gets('my_pay_history', $pay_hist_param );\n\n\n\n // get the total sum of last payment and percentage \n if(!empty($my_pay_hist)){\n\n foreach($my_pay_hist as $key => $val){\n\n $hist_perc[$key] = $my_pay_hist[$key]['percentage'];\n\n $tot = $tot + $my_pay_hist[$key]['percentage'];\n $total_paid = $total_paid + $my_pay_hist[$key]['amt'];\n } \n }\n\n // Get pay schedule base on the session_parameters\n $session_param = array( \n \"scheduleid\" => $scheduleid,\n \"level\" => $this->main->get('level'),\n \"colid\" => $this->main->get('colid'),\n \"deptid\" => $this->main->get('deptid'),\n \"progid\" => $this->main->get('progid'),\n \"usertype\" => $this->main->get('usertype')\n );\n\n\n\n $schedule = $this->pay_mdl->gets('pay_schedule', $session_param);\n\n //var_dump($schedule);\n\n /*\n * check if schedule have exceptions\n */\n if($schedule['exceptions'] == 'Yes'){\n\n $excep = $this->pay_mdl->gets('my_pay_exception', $session_param);\n\n if(is_array($excep) && !empty($excep)){\n\n foreach($excep as $key => $value){\n\n if($excep[$key]['unittype'] == 'programme'){\n\n $to_pay = array();\n array_push($to_pay, $excep[$key]);\n\n break;\n\n }elseif($excep[$key]['unittype'] == 'department'){\n\n $to_pay = array();\n array_push($to_pay, $excep[$key]);\n\n break;\n\n }elseif($excep[$key]['unittype'] == 'college'){\n\n $to_pay = array();\n array_push($to_pay, $excep[$key]);\n\n break; \n } \n\n }\n\n $my_paying = array(\n \"schedule_id\" => $to_pay[0]['scheduleid'],\n \"schedule_type\" => $to_pay[0]['type'],\n \"exception_id\" => $to_pay[0]['exceptionid'],\n \"session_name\" => $to_pay[0]['sesname'],\n \"paying_amount\" => $to_pay[0]['ex_amount'],\n \"school_id\" => $to_pay[0]['schoolid'],\n \"session_id\" => $this->main->item('cur_session'),\n \"penalty\" => ($schedule['penalty_status'] == 'active')? $schedule['penalty'] : 0,\n \"penalty_status\" => $schedule['penalty_status'],\n \"adm_status\" => $to_pay[0]['admstatus'],\n \"level\" => $to_pay[0]['level'],\n \"payer_type\" => $to_pay[0]['payertype'],\n \"total_percent_paid\" => $tot,\n \"total_paid\" => $total_paid,\n \"revenue_head\" => $schedule['revhead']\n );\n\n if($schedule['penalty_status'] == 'active'){\n\n $my_paying['penalty_percentage'] = (100 - $my_paying['total_percent_paid']);\n $my_paying['paying_amount'] = (($my_paying['paying_amount'] + $schedule['penalty']) - $total_paid);\n\n }else{\n\n $percentage_arr = explode(':', $to_pay[0]['percentage']);\n\n $a = $hist_perc;\n $b = $percentage_arr;\n\n foreach ($a as $key => $value) {\n foreach($b as $k => $v){\n if($value == $v){\n unset($b[$k]);\n break;\n }\n }\n }\n\n $my_paying['percentage'] = $b;\n\n }// End of penalty Check\n\n\n }else{\n\n $to_pay = array();\n array_push($to_pay, $schedule);\n\n $my_paying = array(\n \"schedule_id\" => $to_pay[0]['scheduleid'],\n \"schedule_type\" => $to_pay[0]['type'],\n \"exception_id\" => NULL,\n \"session_name\" => $to_pay[0]['sesname'],\n \"paying_amount\" => $to_pay[0]['amount'],\n \"penalty\" => ($schedule['penalty_status'] == 'active')? $schedule['penalty'] : 0,\n \"penalty_status\" => $schedule['penalty_status'],\n \"school_id\" => $to_pay[0]['schoolid'],\n \"session_id\" => $this->main->item('cur_session'),\n \"adm_status\" => NULL,\n \"level\" => NULL,\n \"payer_type\" => NULL,\n \"total_percent_paid\" => $tot,\n \"revenue_head\" => $schedule['revhead']\n );\n\n\n if($schedule['penalty_status'] == 'active'){\n\n $my_paying['penalty_percentage'] = (100 - $my_paying['total_percent_paid']);\n $my_paying['paying_amount'] = (($my_paying['paying_amount'] + $schedule['penalty']) - $total_paid);\n\n }else{\n\n $percentage_arr = explode(':', $to_pay[0]['percentage']);\n\n $a = $hist_perc;\n $b = $percentage_arr;\n\n foreach ($a as $key => $value) {\n foreach($b as $k => $v){\n if($value == $v){\n unset($b[$k]);\n break;\n }\n }\n }\n\n $my_paying['percentage'] = $b;\n\n }// End of penalty Check\n\n\n } // End of Exception is not Empty\n\n }else{\n\n $to_pay = array();\n array_push($to_pay, $schedule);\n\n $my_paying = array(\n \"schedule_id\" => $to_pay[0]['scheduleid'],\n \"schedule_type\" => $to_pay[0]['type'],\n \"exception_id\" => NULL,\n \"session_name\" => $to_pay[0]['sesname'],\n \"session_id\" => $this->main->item('cur_session'),\n \"paying_amount\" => $to_pay[0]['amount'],\n \"school_id\" => $to_pay[0]['schoolid'],\n \"penalty\" => ($schedule['penalty_status'] == 'active')? $schedule['penalty'] : 0,\n \"penalty_status\" => $schedule['penalty_status'],\n \"adm_status\" => NULL,\n \"level\" => NULL,\n \"payer_type\" => NULL,\n \"total_percent_paid\" => $tot,\n \"revenue_head\" => $schedule['revhead']\n );\n\n if($schedule['penalty_status'] == 'active'){\n\n $my_paying['penalty_percentage'] = (100 - $my_paying['total_percent_paid']);\n $my_paying['paying_amount'] = (($my_paying['paying_amount'] + $schedule['penalty']) - $total_paid);\n\n }else{\n\n $percentage_arr = explode(':', $to_pay[0]['percentage']);\n\n $a = $hist_perc;\n $b = $percentage_arr;\n\n foreach ($a as $key => $value) {\n foreach($b as $k => $v){\n if($value == $v){\n unset($b[$k]);\n break;\n }\n }\n }\n\n $my_paying['percentage'] = $b;\n\n }// End of penalty Check\n\n }//End of schedule Has Exception Check\n\n $data['my_paying'] = $my_paying;\n\n break;\n\n default:\n break;\n } \n \n \n \n \n \n \n \n $page_name = 'paynow';\n \n //build view page for pay Now \n $page_content = $this->load->view($this->folder_name.'/'.$page_name, $data, true);\n $this->page->build($page_content, $this->folder_name, $page_name, $this->page_title ); \n \n \n \n }", "public function _generate($params)\n {\n $all = $makati = $clark = 0;\n $filter = array(\n 'sort' => \"floor_name\",\n 'search' => \"\"\n );\n\n $event_id = $_GET['event_id'];\n $model_attendee = &GnGn::getInstance('Model_Attendee');\n $attendees = $model_attendee->get_all_attendees($event_id, $filter);\n\n if(!empty($attendees) && is_array($attendees)):\n $all = count($attendees);\n foreach ($attendees as $key => $value) {\n if((int)$value['office_branch'] === 1):\n $clark++;\n else:\n $makati++;\n endif;\n }\n endif;\n return compact('event_id', 'attendees', 'all', 'makati', 'clark');\n }", "function getReport() ;", "public function pcAttendance_report() {\n BackendMenu::setContext('Olabs.Oims', 'reports', 'pcattendance_report');\n $this->searchFormWidget = $this->createAttendanceSearchFormWidget();\n $this->pageTitle = 'Petty Contractor Attendance Report';\n $reports = array();\n\n $oimsSetting = \\Olabs\\Oims\\Models\\Settings::instance();\n\n $searchForm = $this->searchFormWidget;\n\n $this->vars['search'] = false;\n $this->vars['msg'] = false;\n $this->vars['searchFormWidget'] = $searchForm;\n $this->vars['reports'] = $reports;\n\n $this->vars['oimsSetting'] = $oimsSetting;\n }", "public function Get_Evaluate_Report($semester,$year,$dept_id)\n {\n global $FILE_PATH;\n $semester_id = $this->DEADLINE->Search_Semester_id($semester,$year);\n if($semester_id)\n {\n $temp_course = $this->COURSE->Get_Dept_Course($dept_id,$semester_id);\n $dept_course = array();\n if(!isset($temp_course['status']))\n {\n for($i=0;$i<count($temp_course);$i++)\n {\n array_push($dept_course,$temp_course[$i]['id']);\n }\n }\n $DATA = array();\n $DATA['info'] = array();\n $DATA['download'] = $this->DOWNLOAD_URL.\"?course=all&type=report&dept=\".$dept_id.\"&info=evaluate&semester=\".$semester.\"&year=\".$year;\n $sql =\"SELECT `course_id` FROM `course_evaluate` WHERE `status` = '1' AND `semester_id` = \".$semester_id.\" ORDER BY `course_id`\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n \t$count = count($result);\n for($i=0;$i<$count;$i++)\n {\n if(!in_array($result[$i]['course_id'],$dept_course))\n {\n continue;\n }\n $data['id'] = $result[$i]['course_id'];\n $data['name'] = $this->COURSE->Get_Course_Name($data['id']);\n $data['syllabus'] = $this->COURSE->Get_Course_Syllabus($data['id'],$semester_id);\n $data['pdf'] = $this->DOWNLOAD_URL.\"?course=\".$data['id'].\"&type=report&info=evaluate&semester=\".$semester.\"&year=\".$year;\n $sql = \"SELECT `file_name` FROM `couse_grade` WHERE `course_id` = '\".$data['id'].\"' AND `semester_id` = \".$semester_id;\n $result_filename = $this->DB->Query($sql);\n if($result_filename)\n {\n $data['grade'] = $result_filename[0]['file_name'];\n }\n else\n {\n $data['grade'] = null;\n }\n array_push($DATA['info'],$data);\n }\n }\n if(count($DATA['info']) == 0)\n {\n $return['status'] = 'error';\n $return['msg'] = 'ไม่พบข้อมูล';\n return $return;\n }\n else\n {\n return $DATA;\n }\n\n }\n else\n {\n $return['status'] = 'error';\n $return['msg'] = 'ไม่พบข้อมูล';\n return $return;\n }\n\n }", "public function testReport(){\n // $autoTaskTools->checkTask('AutoDaySessReport');\n // $date = array(\n // date_to_int('-',date('Y-m-01', strtotime('-1 month'))),\n // date_to_int('-',date('Y-m-t', strtotime('-1 month'))),\n // );\n\n $reportTools = new ReportTools();\n $reportTools->saveReportList('AutoDaySessReport');\n\n\n $BeginDate = date('Y-m-01', strtotime(date(\"Y-m-d\")));\n $date = array(\n date_to_int('-',$BeginDate),\n date_to_int('-',date('Y-m-d', strtotime(\"$BeginDate +1 month -1 day\"))),\n );\n $month = date('Y-m-01', strtotime('-1 month'));\n $month1 = date('Y-m-t', strtotime('-1 month'));\n dump($month);\n dump($month1);\n $mytime = date(\"Y-01-01\", strtotime(\"-1 year\"));\n dump($mytime);\n $monthEndDays = cal_days_in_month(CAL_GREGORIAN, 12, date(\"Y\", strtotime(\"-1 year\")));\n $year = date(\"Y-12-\".$monthEndDays, strtotime(\"-1 year\"));\n echo 'year:' . $year;\n $monthDays = cal_days_in_month(CAL_GREGORIAN, date('m',strtotime('-1 month')), date('Y'));\n dump($monthDays);\n echo 'n:' . date('n');\n $season = ceil((date('n'))/3)-1;\n echo '<br>上季度起始时间:<br>';\n echo date('Y-m-d H:i:s', mktime(0, 0, 0,$season*3-3+1,1,date('Y'))),\"\\n\";\n echo date('Y-m-d H:i:s', mktime(23,59,59,$season*3,date('t',mktime(0, 0 , 0,$season*3,1,date(\"Y\"))),date('Y'))),\"\\n\";\n //获取第几季度\n // $season = ceil((date('n'))/3);\n // echo date('m', mktime(0, 0, 0,$season*3-3+1,1,date('Y'))),\"\\n\";\n // echo date('Y-m-d', mktime(23,59,59,$season*3,date('t',mktime(0, 0 , 0,$season*3,1,date(\"Y\"))),date('Y'))),\"\\n\";\n dump($season);\n // $daySessReportTools = new DaySessReportTools();\n // $daySessReportTools->getDateList($date);\n // $daySessReportTools->daySessExcelGen($date);\n //\n // $dayErrorReportTools = new DayErrorReportTools();\n // $dayErrorReportTools->dayErrorExcelGen($date);\n // $daySessReportTools->getDateList($date);\n $str = stristr('DaySuccessReport_UID_2017-06-29.xlsx','_',true);\n dump($str);\n $this->display();\n }", "private function XML_getXSSTestSubjects() {\n\t\t$subjectsEntity = $this->xmlHandler->createElement('subjects');\n\n\t\tforeach( $this->XSSReport->getTechniqueList() as $techniqueType => $techniques ) {\n\t\t\tforeach($techniques as $techniqueName) {\n\t\t\t\t$subjectEntity = $this->xmlHandler->createElement('subject');\n\t\t\t\t$subjectEntity->appendChild($this->xmlHandler->createTextNode($techniqueName));\n\t\t\t\t$subjectTechniqueTypeEntity = $this->xmlHandler->createAttribute('type');\n\t\t\t\tif($techniqueType === 'check' )\n\t\t\t\t\t$subjectTechniqueTypeEntity->appendChild($this->xmlHandler->createTextNode('vulnerability'));\n\t\t\t\telseif($techniqueType === 'inject')\n\t\t\t\t\t$subjectTechniqueTypeEntity->appendChild($this->xmlHandler->createTextNode('exploit'));\n\t\t\t\t$subjectEntity->appendChild($subjectTechniqueTypeEntity);\n\n\t\t\t\t$subjectsEntity->appendChild($subjectEntity);\n\t\t\t}\n\t\t}\n\n\t\treturn $subjectsEntity;\n\t}", "function meetingAttendanceReport($args, &$request){\r\n\t\timport ('classes.meeting.form.MeetingAttendanceReportForm');\r\n\t\tparent::validate();\r\n\t\t$this->setupTemplate();\r\n\t\t$meetingAttendanceReportForm= new MeetingAttendanceReportForm($args, $request);\r\n\t\t$isSubmit = Request::getUserVar('generateMeetingAttendance') != null ? true : false;\r\n\t\t\r\n\t\tif ($isSubmit) {\r\n\t\t\t$meetingAttendanceReportForm->readInputData();\r\n\t\t\tif($meetingAttendanceReportForm->validate()){\t\r\n\t\t\t\t\t$this->generateMeetingAttendanceReport($args);\r\n\t\t\t}else{\r\n\t\t\t\tif ($meetingAttendanceReportForm->isLocaleResubmit()) {\r\n\t\t\t\t\t$meetingAttendanceReportForm->readInputData();\r\n\t\t\t\t}\r\n\t\t\t\t$meetingAttendanceReportForm->display($args);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t$meetingAttendanceReportForm->display($args);\r\n\t\t}\r\n\t}", "public function reportStudentDoorAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportStudentDoorAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister); \n }", "public function generateReport(Request $request)\n {\n $this->authorize('report', Purchase::class);\n $reportCard = [];\n if ($request->input('year-month')) {\n $reportCard = [\n 'time' => $request->input('year-month'),\n 'total_cost' => $this->_monthlyBuilder('total_cost', $request),\n 'total_qty' => $this->_monthlyBuilder('total_qty', $request),\n 'tax_amount' => $this->_monthlyBuilder('tax_amount', $request),\n 'total_payment' => $this->_monthlyBuilder('total_payment', $request),\n 'shipping' => $this->_monthlyBuilder('shipping', $request),\n 'off_amount' => $this->_monthlyBuilder('discount_amount', $request),\n 'list' => $this->_monthlyBuilder('id', $request, true),\n ];\n }\n if ($request->date_s && $request->date_e) {\n $reportCard = [\n 'time' => $request->date_s . ' to ' . $request->date_e,\n 'total_cost' => $this->_periodBuilder('total_cost', $request),\n 'total_qty' => $this->_periodBuilder('total_qty', $request),\n 'tax_amount' => $this->_periodBuilder('tax_amount', $request),\n 'total_payment' => $this->_periodBuilder('total_payment', $request),\n 'shipping' => $this->_periodBuilder('shipping', $request),\n 'off_amount' => $this->_periodBuilder('discount_amount', $request),\n 'list' => $this->_periodBuilder('id', $request, true),\n 'date_s' => $request->date_s,\n 'date_e' => $request->date_e,\n ];\n }\n if ($request->frame) {\n $reportCard = [\n 'time' => ucwords($request->frame),\n 'total_cost' => $this->_frameBuilder('total_cost', $request),\n 'total_qty' => $this->_frameBuilder('total_qty', $request),\n 'tax_amount' => $this->_frameBuilder('tax_amount', $request),\n 'total_payment' => $this->_frameBuilder('total_payment', $request),\n 'shipping' => $this->_frameBuilder('shipping', $request),\n 'off_amount' => $this->_frameBuilder('discount_amount', $request),\n 'list' => $this->_frameBuilder('id', $request, true),\n 'frame' => $request->frame,\n ];\n }\n if (request()->input('print') === 'yes') {\n return view('report.cost.costPrint', compact('reportCard'));\n }\n event(\n new LogActivity(\n $reportCard['time'],\n __('Cost report generated'),\n __('Report')\n )\n );\n return view('report.cost.cost')\n ->with('reportData', json_encode($reportCard))\n ->with('reportCard', $reportCard);\n }", "public function getSubjectCodes() {\n\t\n\t\t\t$this->valid_subject_codes = array();\n\t\t\t\n\t\t\t$sql = new DB_Sql();\n\t\t\t$sql->connect();\n\t\t\t$query = \"SELECT Description, ID FROM tblsubject\";\n\t\t\t$sql->query($query, $this->debug);\n\t\t\tif ($sql->num_rows() > 0) {\n\t\t\t\twhile($sql->next_record()) {\n\t\t\t\t\t$key = $sql->Record['Description'];\n\t\t\t\t\t$this->valid_subject_codes[$key] = $sql->Record['ID'];\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function Generate_Report()\n\t{\n\t\t//\n\t\t// criteria start_date YYYYMMDD\n\t\t// criteria end_date YYYYMMDD\n\t\t// company_id\n\t\t//\n\t\ttry\n\t\t{\n\t\t\t$this->search_query = new Transaction_History_Report_Query($this->server);\n\n\t\t\t$data = new stdClass();\n\n\t\t\t// Save the report criteria\n\t\t\t$data->search_criteria = array(\n\t\t\t 'specific_date_MM' => $this->request->specific_date_month,\n\t\t\t 'specific_date_DD' => $this->request->specific_date_day,\n\t\t\t 'specific_date_YYYY' => $this->request->specific_date_year,\n\t\t\t 'company_id' => $this->request->company_id,\n\t\t\t 'loan_type' => $this->request->loan_type\n\t\t\t);\n\n\t\t\t$_SESSION['reports']['transaction_history']['report_data'] = new stdClass();\n\t\t\t$_SESSION['reports']['transaction_history']['report_data']->search_criteria = $data->search_criteria;\n\t\t\t$_SESSION['reports']['transaction_history']['url_data'] = array('name' => 'Transaction History', 'link' => '/?module=reporting&mode=transaction_history');\n\n\t\t\t// Start date\n\t\t\t$start_date_YYYY = $this->request->specific_date_year;\n\t\t\t$start_date_MM\t = $this->request->specific_date_month;\n\t\t\t$start_date_DD\t = $this->request->specific_date_day;\n\t\t\tif(!checkdate($start_date_MM, $start_date_DD, $start_date_YYYY))\n\t\t\t{\n\t\t\t\t//return with no data\n\t\t\t\t$data->search_message = \"Start Date invalid or not specified.\";\n\t\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$start_date_YYYYMMDD = 10000 * $start_date_YYYY\t+ 100 * $start_date_MM + $start_date_DD;\n\n\t\t\t$data->search_results = $this->search_query->Fetch_Transaction_History_Data( $start_date_YYYYMMDD,\n\t\t\t\t $this->request->loan_type,\n\t\t\t\t $this->request->company_id);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$data->search_message = \"Unable to execute report. Reporting server may be unavailable.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\t\t// we need to prevent client from displaying too large of a result set, otherwise\n\t\t// the PHP memory limit could be exceeded;\n\t\tif(!empty($data->search_results) && count($data->search_results) > $this->max_display_rows)\n\t\t{\n\t\t\t$data->search_message = \"Your report would have more than \" . $this->max_display_rows . \" lines to display. Please narrow the date range.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Sort if necessary\n\t\t$data = $this->Sort_Data($data);\n\n\t\tECash::getTransport()->Add_Levels(\"report_results\");\n\t\tECash::getTransport()->Set_Data($data);\n\t\t$_SESSION['reports']['transaction_history']['report_data'] = $data;\n\t}", "public function gen_inv_pdf_basedon_subsidy($invoice_id, $is_subsidy) {\n $tenant_id = $this->tenant_id;\n if (empty($invoice_id)) {\n return show_404();\n }\n if (empty($is_subsidy)) {\n $res = $this->classtraineemodel->get_company_invoice_no_subsidy($invoice_id);\n $text = 'b';\n } else {\n $res = $this->classtraineemodel->get_company_invoice_subsidy($invoice_id);\n $text = 'a';\n }\n \n $result = $res[0];\n //added by pritam to generate previous invoice number\n $result->previous_inv_id = $this->classtraineemodel->get_enroll_prev_invoice($invoice_id);\n //\n $result->invoice_label = $text;\n $result->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($result->tenant_state), ', ');\n $result->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($result->tenant_country), ', ');\n\n $result->inv_year = date('Y', strtotime($result->inv_date));\n $result->inv_date = date('d/m/Y', strtotime($result->inv_date));\n $result->discount_label = rtrim($this->course->get_metadata_on_parameter_id($result->discount_type), ', ');\n if ($result->total_gst) {\n $result->gst_label = 'GST ON, ' . rtrim($this->course->get_metadata_on_parameter_id($result->gst_rule), ', ');\n } else {\n $result->gst_label = 'GST OFF';\n }\n $course_manager = $this->course->get_managers($courses->crse_manager);\n $length = stripos($course_manager, ', ');\n $result->course_manager = (!empty($length)) ? substr($course_manager, 0, $length) : $course_manager;\n\n if ($result->company_id[0] == 'T') {\n $result->company_name = $result->tenant_name;\n $result->company_details->comp_state = $result->tenant_state;\n $result->company_details->comp_cntry = $result->tenant_country;\n $result->company_details->comp_phone = $result->tenant_contact_num;\n $result->company_details->comp_address = $result->tenant_address;\n \n $company_person = $this->company->get_company_user($result->tenant_id, $result->company_id);//sk1\n $result->company_person_name = $company_person[0]->first_name;//sk2\n \n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $result->company_id);\n $result->company_details = $company_details[0];\n $result->company_details->comp_state = rtrim($this->course->get_metadata_on_parameter_id($result->company_details->comp_state), ', ');\n $result->company_details->comp_cntry = rtrim($this->course->get_metadata_on_parameter_id($result->company_details->comp_cntry), ', ');\n $result->company_name = $company_details[0]->company_name;\n \n $company_person = $this->company->get_company_user($result->tenant_id, $result->company_id);//sk1\n $result->company_person_name = $company_person[0]->first_name;//sk2\n \n }\n //$result->discount_rate = round($result->discount_rate, 2);\n $result->gst_rate = round($result->gst_rate, 2);\n $total_unitfees = 0;\n $total_discount = 0;\n $total_gst = 0;\n $total_subsidy = 0;\n $total_inv_amount = 0;\n $company_received = $this->classtraineemodel->company_payment_recd($result->invoice_id);\n $user_paid = array();\n foreach ($company_received as $k => $v) {\n $user_paid[$v->user_id] = round($v->amount_recd,2);\n }\n $company_refunded = $this->classtraineemodel->company_payment_refund($result->invoice_id);\n $user_refund = array();\n foreach ($company_refunded as $k => $v) {\n $user_refund[$v->user_id] = round($v->refund_amount,2);\n }\n foreach ($res as $k => $row) {\n $received = empty($user_paid[$row->user_id]) ? 0 : $user_paid[$row->user_id];\n $refunded = empty($user_refund[$row->user_id]) ? 0 : $user_refund[$row->user_id];\n $received_amt+=$received;\n $refunded_amt+=$refunded;\n if((($row->total_amount_due + $refunded) - $received) <= 0){\n $payment_label = 'PAID';\n }else{ \n if($refunded > 0){\n $payment_label = 'REFUNDED'; \n } else{ \n if($received == 0){\n $payment_label = 'NOT PAID';\n }else if($received > 0){\n $payment_label = 'PART PAID';\n }\n }\n }\n $res[$k]->payment_label = $payment_label;\n $total_unitfees +=$row->class_fees;\n $total_discount += ($row->class_fees * ($result->discount_rate / 100));\n $total_gst += $row->gst_amount;\n $total_subsidy += $row->subsidy_amount;\n $total_inv_amount += $row->total_amount_due;\n $result->total_inv_amount1 = $row->total_inv_amount;\n }\n $result->payble_amount=$total_inv_amount+$refunded_amt-$received_amt;\n $result->total_unit_fees = round($total_unitfees, 2);\n $result->total_inv_discnt = round($total_discount, 2);\n $result->total_inv_subsdy = round($total_subsidy, 2);\n $result->total_gst = round($total_gst, 2);\n $result->indi_disc_total = ($result->class_fees * ($result->discount_rate / 100));\n $result->total_inv_amount = round($total_inv_amount, 2);\n $result->payment_due_details = $res;\n\n $this->load->helper('pdf_reports_helper');\n generate_company_pdf_invoice($result);\n }", "public function generateReport()\n {\n $activities = '';\n // General information.\n $totalExecution = $this->getActivityDetails(DFullProfiler::ACTIVITY_TOTAL);\n $report = '<h2>General Performance Details</h2>';\n $report .= '<table><tbody>';\n $report .= sprintf(\"\\t<th width=\\\"180px\\\">Total Execution Time</th><td>%0.4f sec</td></tr>\\n\",\n $totalExecution[ DFullProfiler::ACTIVITY_POINT_END ][ DFullProfiler::ACTIVITY_VALUE_TIME ]);\n $report .= sprintf(\"\\t<th width=\\\"180px\\\">Query Execution Time</th><td>%0.4f sec (%0.1f%%)</td></tr>\\n\",\n $this->queryExecutionTime,\n ($this->queryExecutionTime / $totalExecution[ DFullProfiler::ACTIVITY_POINT_END ][ DFullProfiler::ACTIVITY_VALUE_TIME ] * 100));\n $report .= sprintf(\"\\t<th width=\\\"180px\\\">Query Processing Time</th><td>%0.4f sec (%0.1f%%)</td></tr>\\n\",\n $this->queryProcessingTime,\n ($this->queryProcessingTime / $totalExecution[ DFullProfiler::ACTIVITY_POINT_END ][ DFullProfiler::ACTIVITY_VALUE_TIME ] * 100));\n $report .= sprintf(\"\\t<tr><th width=\\\"180px\\\">Memory Cache Usage</th><td>%0.4f sec (%0.1f%%) [%d Hits, %d Missed, %d Added, %d Removed, %d Invalidations]</td></tr>\\n\",\n $this->memoryCacheActivity[ DFullProfiler::MEMORY_CACHE_EXECUTION_TIME ],\n ($this->memoryCacheActivity[ DFullProfiler::MEMORY_CACHE_EXECUTION_TIME ] / $totalExecution[ DFullProfiler::ACTIVITY_POINT_END ][ DFullProfiler::ACTIVITY_VALUE_TIME ] * 100),\n $this->memoryCacheActivity[ DFullProfiler::MEMORY_CACHE_HIT ],\n $this->memoryCacheActivity[ DFullProfiler::MEMORY_CACHE_MISS ],\n $this->memoryCacheActivity[ DFullProfiler::MEMORY_CACHE_ADD ],\n $this->memoryCacheActivity[ DFullProfiler::MEMORY_CACHE_REMOVE ],\n $this->memoryCacheActivity[ DFullProfiler::MEMORY_CACHE_INVALIDATION ]);\n $report .= \"\\t<tr><th width=\\\"180px\\\">Peak Memory Usage</th><td>\" . DFile::bytesToString(memory_get_peak_usage(),\n 5) . \" (\" . DFile::bytesToString(DFile::stringToBytes(ini_get('memory_limit'))) . \" available)</td></tr>\\n\";\n $report .= '</tbody></table>';\n // Activity times.\n foreach ($this->activities as $name => $activity) {\n $end =& $activity[ DFullProfiler::ACTIVITY_POINT_END ];\n $length = $end[ DFullProfiler::ACTIVITY_VALUE_TIME ];\n $memory = DFile::bytesToString($end[ DFullProfiler::ACTIVITY_VALUE_MEMORY ], 2);\n $peakMemory = DFile::bytesToString($activity['peakMemory'], 2);\n $queries = $end[ DFullProfiler::ACTIVITY_VALUE_QUERIES ];\n $modelsMemory = $activity[ DFullProfiler::ACTIVITY_POINT_MODEL ][ DFullProfiler::MODEL_LOAD_MEMORY ];\n $modelsCache = $activity[ DFullProfiler::ACTIVITY_POINT_MODEL ][ DFullProfiler::MODEL_LOAD_CACHE ];\n $modelsDatabase = $activity[ DFullProfiler::ACTIVITY_POINT_MODEL ][ DFullProfiler::MODEL_LOAD_DATABASE ];\n $cacheHit = $activity[ DFullProfiler::ACTIVITY_POINT_CACHE ][ DCacheHandler::ACTION_HIT ];\n $cacheMiss = $activity[ DFullProfiler::ACTIVITY_POINT_CACHE ][ DCacheHandler::ACTION_MISS ];\n $iterations = $activity[ DFullProfiler::ACTIVITY_VALUE_ITERATIONS ];\n if ($iterations > 1) {\n $iterationLength = $length / $iterations;\n $iterationMemory = DFile::bytesToString($end[ DFullProfiler::ACTIVITY_VALUE_MEMORY ] / $iterations, 2);\n $iterationQueries = $queries / $iterations;\n $iterationObjectsMemory = $modelsMemory / $iterations;\n $iterationObjectsCache = $modelsCache / $iterations;\n $iterationObjectsDatabase = $modelsDatabase / $iterations;\n $iterationCacheHit = $cacheHit / $iterations;\n $iterationCacheMiss = $cacheMiss / $iterations;\n $activities .= sprintf(\"\\t<tr><th>%s</th><td class=\\\"good\\\">%0.4f sec<br />(%0.4f sec)</td><td class=\\\"good\\\">%s<br />(%s)</td><td class=\\\"good\\\">%s</td><td class=\\\"good\\\">%d<br />(%d)</td><td class=\\\"good\\\">%d<br />(%d)</td><td class=\\\"good\\\">%d<br />(%d)</td><td class=\\\"%s\\\">%d<br />(%d)</td><td class=\\\"good\\\">%d<br />(%d)</td><td class=\\\"%s\\\">%d<br />(%d)</td><td class=\\\"good\\\">%d</td></tr>\\n\",\n $name, $length, $iterationLength, $memory, $iterationMemory, $peakMemory,\n $queries, $iterationQueries, $modelsMemory, $iterationObjectsMemory,\n $modelsCache, $iterationObjectsCache, $modelsDatabase == 0 ? 'good' : 'bad',\n $modelsDatabase, $iterationObjectsDatabase, $cacheHit, $iterationCacheHit,\n $cacheMiss == 0 ? 'good' : 'bad', $cacheMiss, $iterationCacheMiss, $iterations);\n } else {\n $activities .= sprintf(\"\\t<tr><th>%s</th><td class=\\\"good\\\">%0.4f sec</td><td class=\\\"good\\\">%s</td><td class=\\\"good\\\">%s</td><td class=\\\"good\\\">%d</td><td class=\\\"good\\\">%d</td><td class=\\\"good\\\">%d</td><td class=\\\"%s\\\">%d</td><td class=\\\"good\\\">%d</td><td class=\\\"%s\\\">%d</td><td class=\\\"good\\\">%d</td></tr>\\n\",\n $name, $length, $memory, $peakMemory, $queries, $modelsMemory, $modelsCache,\n $modelsDatabase == 0 ? 'good' : 'bad', $modelsDatabase, $cacheHit,\n $cacheMiss == 0 ? 'good' : 'bad', $cacheMiss, $iterations);\n }\n }\n $report .= '<h2>Performance Break-down</h2>';\n $report .= sprintf('<table><thead><tr><th width=\"100px\" rowspan=\"2\">Activity</th><th rowspan=\"2\">Execution Time</td><th rowspan=\"2\">Memory Usage<br />Differential</th><th rowspan=\"2\">Memory Usage<br />Peak</th><th rowspan=\"2\">Queries</th><th colspan=\"3\">Loaded Models</th><th colspan=\"2\">Cache Activity</th><th rowspan=\"2\">Iterations</th></tr><tr><th>Memory</th><th>Cache</th><th>Database</th><th>Hit</th><th>Miss</th></tr></thead><tbody>%s</tbody></table>',\n $activities);\n // Query information.\n $report .= $this->generateQueryReport();\n // Cache information.\n $report .= $this->generateCachesReport() . '<br />';\n $url = DRequest::load()->getUrl();\n\n return \"<h1 id=\\\"\" . count(DErrorHandler::$profiling) . \"\\\">Profiler ({$url})</h1>{$report}\";\n }", "public function generate()\n {\n $reportType = Input::get('report_type');\n $from = Input::get('from');\n $to = Input::get('to');\n $disciplineId = Input::get('discipline');\n $info = explode(',', Input::get('info'));\n $id = $info[1];\n $type = $info[0];\n $license = array_key_exists(2, $info) ? $info[2] : '0';\n\n $from = empty($from) ? null : date('Y-m-d', strtotime($from));\n $to = empty($to) ? null : date('Y-m-d', strtotime($to));\n \n if (! $reportType) {\n Flash::danger('Please select a <strong>Report Type</strong>.');\n return Redirect::route('reports.index')->withInput();\n }\n\n if (empty($from)) {\n Flash::danger('Please enter a <strong>From Date</strong> to generate report.');\n return Redirect::route('reports.index')->withInput();\n }\n\n // all route params\n $routeParams = [$disciplineId, $type, $id, $license, $from, $to];\n\n switch ($reportType) {\n case 'site_summary':\n return Redirect::route('reports.site_summary', $routeParams);\n break;\n\n case 'scheduled_exams':\n return Redirect::route('reports.scheduled_exams', $routeParams);\n break;\n\n case 'retake_summary':\n return Redirect::route('reports.retake_summary', $routeParams);\n break;\n\n case 'skills_detail':\n return Redirect::route('reports.skills_detail', $routeParams);\n break;\n\n case 'knowledge_detail':\n return Redirect::route('reports.knowledge_detail', $routeParams);\n break;\n\n case 'pass_fail':\n // if admin / agency / staff show a page to select facility and instructor\n /*if(Auth::user()->ability(['Admin', 'Staff', 'Agency'], []))\n {\n return Redirect::route('reports.select_facility', [$from, $to]);\n }*/\n\n // Otherwise just show the regular pass/fail report\n return Redirect::route('reports.pass_fail', $routeParams);\n break;\n\n default:\n Flash::warning('This report type is not yet supported.', 'Warning');\n return Redirect::route('reports.index');\n\n }\n }", "public function basicreport()\n\t{\n\t\t\n\t\t$disp_msg = $this->session->flashdata('disp_msg');\n\t\t\n\t\t\n\t\t$search_filters = array();\n\t\t$search_results = array();\n\t\t\n\t\t$search_query = \"SELECT * FROM postpatch_schedule WHERE 1=1 \";\n\t\t\n\t\tif (!empty($_POST)) {\n\t\t\tif(!empty($_POST['dpa_flexinet_id']) && count($_POST['dpa_flexinet_id'])>0) {\n\t\t\t\t$dpavals = implode(\"' , '\", $_POST['dpa_flexinet_id']);\n\t\t\t\t$search_query .= \" AND dpa_flexinet IN ('\".$dpavals.\"') \";\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($_POST['verificationstatus']) && count($_POST['verificationstatus'])>0) {\n\t\t\t\t$verfstatusvals = implode(\"' , '\", $_POST['verificationstatus']);\n\t\t\t\t$search_query .= \" AND verificationstatus IN ('\".$verfstatusvals.\"') \";\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($_POST['scheduledate']) && count($_POST['scheduledate'])>0) {\n\t\t\t\t$scdvals = implode(\"' , '\", $_POST['scheduledate']);\n\t\t\t\t$search_query .= \" AND scheduledate IN ('\".$scdvals.\"') \";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$search_query_res = $this->commonclass->execute_rawquery($search_query);\n\t\t$search_results = $search_query_res->result_array();\n\t\t\n\t\t$dpa_emps = $this->commonclass->retrive_records('postpatch_schedule', ' DISTINCT(dpa_flexinet) as dpa_flexinet ', \"\",array(\"dpa_flexinet\" => \"ASC\"),'');\n\t\tif (count($dpa_emps)>0) {\n\t\t\tforeach($dpa_emps as $onedpa) {\n\t\t\t\t$search_filters['dpa'][] = $onedpa['dpa_flexinet'];\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\t$verf_status_res = $this->commonclass->retrive_records('postpatch_schedule', ' DISTINCT(verificationstatus) as verificationstatus ', \"\",array(\"dpa_flexinet\" => \"ASC\"),'');\n\t\tif (count($verf_status_res)>0) {\n\t\t\tforeach($verf_status_res as $oneverif) {\n\t\t\t\t$search_filters['verf_status'][] = $oneverif['verificationstatus'];\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$scheduledate_res = $this->commonclass->retrive_records('postpatch_schedule', ' DISTINCT(scheduledate) as scheduledate ', \"\",array(\"dpa_flexinet\" => \"ASC\"),'');\n\t\tif (count($scheduledate_res)>0) {\n\t\t\tforeach($scheduledate_res as $oneverif1) {\n\t\t\t\t$search_filters['scheduledates'][$oneverif1['scheduledate']] = ($oneverif1['scheduledate'] != \"0000-00-00\") ? $this->commonclass->dateformat1($oneverif1['scheduledate']) : \"00/00/0000\";\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t## ____________ Data sending to the template starts ____________ ##\n\t\t$data['disp_msg'] = $disp_msg; # display messages\n\t\t$data['search_filters'] = $search_filters; # search_filters\n\t\t$data['search_results'] = $search_results; # search_filters\n\t\t//$data['postpatch_uploads'] = $postpatch_uploads; # postpatch_schedule\n\t\t\n\t\t## ____________ Data sending to the template ends here ____________ ##\n\t\t\n\t\t$this->load->view('layout/'.$this->sel_theam_path.'/header', $data); # html view page\n\t\t$this->load->view('admin/report1-page', $data); # html view page\n\t\t$this->load->view('layout/'.$this->sel_theam_path.'/footer', $data); # html view page\n\t}", "function exam_schedule()\n\t {\n\t\t$standardcode = $_REQUEST['standardcode'];\n\t\t$exam_data \t \t\t\t= $this ->ObjM->get_exam_by_standard($standardcode);\n\t\t//var_dump($exam_data); exit;\n\t\t\n\t\tif(count($exam_data)<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($exam_data);$i++){\n\t\t\t$exam_date = date('d-m-Y',$exam_data[$i]['date_dt']);\n\t\t\t$exam_time = $exam_data[$i]['start_time'].' To '.$exam_data[$i]['end_time'];\n\t\t\t\n\t\t\t$json_arr[]=array(\n\t\t\t\t\t'standard_name'\t\t=>\t$exam_data[$i]['standard_name'],\n\t\t\t\t\t'exam_title'\t\t=>\t$exam_data[$i]['exam_title'],\n\t\t\t\t\t'subject_name'\t\t=>\t$exam_data[$i]['subject_name'],\n\t\t\t\t\t'exam_date'\t\t\t=>\t$exam_date,\n\t\t\t\t\t'exam_time'\t\t\t=>\t$exam_time,\n\t\t\t\t\t'marks'\t\t\t\t=>\t$exam_data[$i]['marks'],\n\t\t\t\t\t'validation'\t \t\t=>\t'true' );\n\t\t }\n\t\t echo json_encode($json_arr);\n\t\t\texit;\n\t }", "public function CreateExcelReport(){\n\t\t$objPHPExcel = new PHPExcel();\n\n\t\t$rows = array();\n\t\t$row_count = 2; //counter to loop through the Excel spreadsheet rows\n\n\t\t$objPHPExcel->getProperties()->setCreator(\"dxLink\")\n\t\t\t\t\t\t\t ->setLastModifiedBy(\"dxLink\")\n\t\t\t\t\t\t\t ->setTitle(\"dxLink program evaluation feedback\")\n\t\t\t\t\t\t\t ->setSubject(\"dxLink program evaluation feedback\")\n\t\t\t\t\t\t\t ->setDescription(\"Generates all data from dxLink evaluation program form\")\n\t\t\t\t\t\t\t ->setKeywords(\"dxLink evaluation program form feedback\")\n\t\t\t\t\t\t\t ->setCategory(\"evaluation result file\");\n\n\t\t$objPHPExcel->setActiveSheetIndex(0);\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A1', 'First Name')\n\t\t\t\t ->setCellValue('B1', 'Last Name')\n\t\t\t\t ->setCellValue('C1', 'Program')\n\t\t\t\t ->setCellValue('D1', 'Question')\n\t\t\t\t ->setCellValue('E1', 'Answer')\n\t\t\t\t ->setCellValue('F1', 'Comment')\n\t\t\t\t ->setCellValue('G1', 'Date Posted');\n\n \t$sql = \"SELECT doctor_answers.question_id, doctor_answers.doctor_answer, DATE_FORMAT(doctor_answers.date_of_answer,'%Y-%m-%d') AS date_of_answer, doctor_answers.comments, doctors.first_name, doctors.last_name, program_sections.program_id \n\t\tFROM doctor_answers, doctors, program_sections, questions \n\t\tWHERE doctors.doctor_id = doctor_answers.doctor_id AND program_sections.program_section_id = doctor_answers.program_section_id AND program_sections.program_section_type = 'Evaluation form' AND questions.question_id = doctor_answers.question_id\n\t\tORDER BY doctor_answers.date_of_answer DESC\";\n\n $query = $this->con->prepare($sql);\n $query->execute();\n\n while($result_row = $query->fetch(PDO::FETCH_ASSOC) ){\n \t$fisrt_name = $result_row['first_name'];\n \t$last_name = $result_row['last_name'];\n \t$program_id = $result_row['program_id']; \n\t\t\t$question_id = $result_row['question_id']; \n\t\t\t$answer = $result_row['doctor_answer']; \n\t\t\t$date_posted = $result_row['date_of_answer'];\n\t\t\t$comment = $result_row['comments'];\n\t\t\t$program = $this->Get_Program($program_id);\n\t\t\t$question = $this->Get_question($question_id);\n\t\t\tarray_push($rows, array($fisrt_name, $last_name, $program, $question, $answer, $comment, $date_posted));\n }\n \n \n foreach ($rows as $row => $column) {\n\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A' . $row_count, $column[0])\n\t\t\t\t\t\t\t ->setCellValue('B' . $row_count, $column[1])\n\t\t\t\t\t\t\t ->setCellValue('C' . $row_count, $column[2])\n\t\t\t\t\t\t\t ->setCellValue('D' . $row_count, $column[3])\n\t\t\t\t\t\t\t ->setCellValue('E' . $row_count, $column[4])\n\t\t\t\t\t\t\t ->setCellValue('F' . $row_count, $column[5])\n\t\t\t\t\t\t\t ->setCellValue('G' . $row_count, $column[6]);\n\n\t\t\t$objPHPExcel->getActiveSheet()->getRowDimension($row_count)->setRowHeight(50); \n\n\t\t $row_count++;\t\t\n\t\t}\t\n\n\t\t//Set widths of all columns\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(25);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(25);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(60);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(60);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(110);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(110);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('G')->setWidth(25);\n\n\t\t//Fill design settings for first heading row\n\t\t$objPHPExcel->getActiveSheet()->getRowDimension(1)->setRowHeight(30);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1:G1')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB('FF808080');\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1:G1')->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_WHITE);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1:G1')->getFont()->setSize(16);\n\t\t$objPHPExcel->getActiveSheet()->freezePane('A2');\n\n\t\t//Align all cells\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1:G' . $row_count)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1:G' . $row_count)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\n\n\t\t// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n\t\t$objPHPExcel->setActiveSheetIndex(0);\n\t\t\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('../Reports/dxLink_Evaluation_feedback_report.xlsx');\n\t\t\n\t\techo 'exported';\n\t\treturn true;\n\t}", "function get_time_table()\n\t{\n\t\t$usercode \t \t= $_REQUEST['usercode'];\n\t\t$daycode \t\t= $_REQUEST['day_code'];\n\t\t$user_dt \t \t\t= $this ->ObjM->get_user_by_usercode($usercode);\n\t\t$yearly_acccount \t= $this ->ObjM->student_yearly_acccount($user_dt[0]['idcode']);\n\t\t\n\t\t$arr=array('standard_code' =>$yearly_acccount[0]['current_standard'],'division_code' =>$yearly_acccount[0]['division_code'],'day' =>$daycode);\n\t\t$time_table\t\t\t=\t$this->ObjM->get_time_table($arr);\n\t\t\n\t\tif(count($time_table)<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($time_table);$i++){\n\t\t\tif($time_table[$i]['recess'] == 'Y')\n\t\t\t { \n\t\t\t\t$time = $time_table[$i]['recess_to'] .'-'. $time_table[$i]['recess_from'];\n\t\t\t\t$recess = $time_table[$i]['recess_to'] .'-'. $time_table[$i]['recess_from'];\n\t\t\t }\n\t\t\telse\n\t\t\t {\n\t\t\t\t$time = $time_table[$i]['s_time'] .'-'. $time_table[$i]['e_time'];\n\t\t\t\t$recess = '-';\n\t\t\t }\n\t\t\t \n\t\t\tif($time_table[$i]['subject_name'] == '')\n\t\t\t { \n\t\t\t\t$subject_name = '-';\n\t\t\t }\n\t\t\telse\n\t\t\t {\n\t\t\t\t$subject_name = $time_table[$i]['subject_name'];\n\t\t\t }\n\t\t\t \n\t\t\t if($time_table[$i]['staff_name'] == '')\n\t\t\t { \n\t\t\t\t$staff_name = '-';\n\t\t\t }\n\t\t\telse\n\t\t\t {\n\t\t\t\t$staff_name = $time_table[$i]['staff_name'];\n\t\t\t }\n\t\t\t \n\t\t\t \t$lec=($i==0)?'-':$i;\n\t\t\t \t\n\t\t\t\t$json_arr[]=array(\n\t\t\t\t\t'lecture'\t\t=>\t$lec,\n\t\t\t\t\t'time'\t\t\t=>\t$time,\n\t\t\t\t\t'recess'\t\t=>\t$recess,\n\t\t\t\t\t'subject_name'\t=>\t$subject_name,\n\t\t\t\t\t'staff_name'\t=>\t$staff_name,\n\t\t\t\t\t'validation'\t=>\t'true' );\n\t\t }\n\t\t echo json_encode($json_arr);\n\t\t\texit;\n\t}", "public function invoice_ammend_summary_function($path6, $invoice_ammend) {\n $object = PHPExcel_IOFactory::load($path6);\n $worksheet = $object->getActiveSheet();\n $highestRow = $worksheet->getHighestRow();\n $highestColumn = $worksheet->getHighestColumn();\n $customer_id = $this->input->post(\"cust_id\");\n $insert_id = $this->generate_insert_id();\n $customer_file_years = $this->input->post('customer_file_years');\n $original_month = array();\n $include_month = array();\n $amendment_month = array();\n $category = array();\n $gstin_arr = array();\n $invoice_date = array();\n $invoice_no = array();\n $name = array();\n $invoice_value = array();\n $taxable_value = array();\n $igst = array();\n $cgst = array();\n $sgst = array();\n $cess = array();\n $abc2 = $object->getActiveSheet()->getCell('A' . 3)->getValue();\n $x = filter_var($abc2, FILTER_SANITIZE_NUMBER_INT);\n $a1 = chunk_split($x, 4, \"-\");\n $a2 = rtrim($a1, '-');\n// exit;\n if ($customer_file_years == \"\") {\n $response['id'] = 'customer_file_years';\n $response['error'] = 'Please Select year';\n echo json_encode($response);\n exit;\n } else if ($customer_file_years == $a2) {\n for ($i = 0; $i <= $highestRow; $i++) {\n if ($object->getActiveSheet()->getCell(\"B\" . $i)->getValue() == \"Original Month\") { //get records of origial month\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $og_mon = $object->getActiveSheet()->getCell(\"B\" . $j)->getValue();\n $original_month[] = $og_mon;\n }\n } else {\n \n }\n if ($object->getActiveSheet()->getCell(\"C\" . $i)->getValue() == \"Include in month\") { //get records of Showing month\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $show_mon = $object->getActiveSheet()->getCell(\"C\" . $j)->getValue();\n $include_month[] = $show_mon;\n }\n } else {\n \n } if ($object->getActiveSheet()->getCell(\"D\" . $i)->getValue() == \"Amendment in month\") { //get records of Showing month\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $amend_mon = $object->getActiveSheet()->getCell(\"D\" . $j)->getValue();\n $amendment_month[] = $amend_mon;\n }\n } else {\n \n }\n\n if ($object->getActiveSheet()->getCell(\"E\" . $i)->getValue() == \"Category\") { //get records of Showing month\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $cat = $object->getActiveSheet()->getCell(\"E\" . $j)->getValue();\n $category[] = $cat;\n }\n } else {\n \n }\n if ($object->getActiveSheet()->getCell(\"F\" . $i)->getValue() == \"GSTIN\") { //get records of GSTIN\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $gstin = $object->getActiveSheet()->getCell(\"F\" . $j)->getValue();\n $gstin_arr[] = $gstin;\n }\n } else {\n \n }\n if ($object->getActiveSheet()->getCell(\"G\" . $i)->getValue() == \"Invoice Date\") { //get records of Invoice Date\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $invoiceDate = $object->getActiveSheet()->getCell(\"G\" . $j)->getValue();\n $invoice_date[] = $invoiceDate;\n }\n } else {\n \n }\n if ($object->getActiveSheet()->getCell(\"H\" . $i)->getValue() == \"Invoice No\") { //get records of Invoice No\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $invoiceno = $object->getActiveSheet()->getCell(\"H\" . $j)->getValue();\n $invoice_no[] = $invoiceno;\n }\n } else {\n \n }\n if ($object->getActiveSheet()->getCell(\"I\" . $i)->getValue() == \"Name\") { //get records of Names\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $names = $object->getActiveSheet()->getCell(\"I\" . $j)->getValue();\n $name[] = $names;\n }\n } else {\n \n }\n if ($object->getActiveSheet()->getCell(\"J\" . $i)->getValue() == \"Invoice Value \") { //get records of Invoice Value \n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $invoice_val = $object->getActiveSheet()->getCell(\"J\" . $j)->getValue();\n $invoice_value[] = $invoice_val;\n }\n } else {\n \n }\n if ($object->getActiveSheet()->getCell(\"K\" . $i)->getValue() == \"Taxable Value\") { //get records of Showing month\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $tax_val = $object->getActiveSheet()->getCell(\"K\" . $j)->getValue();\n $taxable_value[] = $tax_val;\n }\n } else {\n \n }\n if ($object->getActiveSheet()->getCell(\"L\" . $i)->getValue() == \"IGST\") { //get records of IGST\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $igst_val = $object->getActiveSheet()->getCell(\"L\" . $j)->getValue();\n $igst[] = $igst_val;\n }\n } else {\n \n }\n if ($object->getActiveSheet()->getCell(\"M\" . $i)->getValue() == \"CGST\") { //get records of CGST\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $cgst_val = $object->getActiveSheet()->getCell(\"M\" . $j)->getValue();\n $cgst[] = $cgst_val;\n }\n } else {\n \n }\n if ($object->getActiveSheet()->getCell(\"N\" . $i)->getValue() == \"SGST\") { //get records of SGST\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $sgst_val = $object->getActiveSheet()->getCell(\"N\" . $j)->getValue();\n $sgst[] = $sgst_val;\n }\n } else {\n \n }\n if ($object->getActiveSheet()->getCell(\"O\" . $i)->getValue() == \"CESS\") { //get records of SGST\n for ($j = $i + 1; $j <= $highestRow; $j++) {\n $cess_val = $object->getActiveSheet()->getCell(\"O\" . $j)->getValue();\n $cess[] = $cess_val;\n }\n } else {\n \n }\n }\n } else {\n $response['id'] = 'file_ex_invoice_amend';\n $response['error'] = 'Year is mismatch with file.Please choose correct.';\n echo json_encode($response);\n exit;\n }\n\n\n $count = count($original_month);\n $query = $this->db2->query(\"SELECT * FROM `invoices_amended_summary_all` where customer_id='$customer_id'\");\n if ($this->db2->affected_rows() > 0) {\n $monthly_history = $this->insert_invoice_ammend_summary_history($customer_id);\n if ($monthly_history == true) {\n for ($k = 0; $k < $count; $k++) {\n\n if ($original_month[$k] == \"\") {\n $original_month[$k] = \"0\";\n }\n if ($include_month[$k] == \"\") {\n $include_month[$k] = \"0\";\n }\n if ($amendment_month[$k] == \"\") {\n $amendment_month[$k] = \"0\";\n }\n if ($category[$k] == \"\") {\n $category[$k] = \"0\";\n }\n if ($gstin_arr[$k] == \"\") {\n $gstin_arr[$k] = \"0\";\n }\n if ($invoice_date[$k] == \"\") {\n $invoice_date[$k] = \"0\";\n }\n if ($invoice_no[$k] == \"\") {\n $invoice_no[$k] = \"0\";\n }\n if ($name[$k] == \"\") {\n $name[$k] = \"Not Given\";\n }\n if ($invoice_value[$k] == \"\") {\n $invoice_value[$k] = \"0\";\n }\n if ($taxable_value[$k] == \"\") {\n $taxable_value[$k] = \"0\";\n }\n if ($igst[$k] == \"\") {\n $igst[$k] = \"0\";\n }\n if ($cgst[$k] == \"\") {\n $cgst[$k] = \"0\";\n }\n if ($sgst[$k] == \"\") {\n $sgst[$k] = \"0\";\n }\n if ($cess[$k] == \"\") {\n $cess[$k] = \"0\";\n }\n\n $query = (\"insert into invoices_amended_summary_all (`customer_id`,`insert_id`,`original_month`,`included_in_month`,`amendment_month`,\"\n . \"`category`,`gstin_no`,`invoice_date`,`invoice_no`,`name`,`invoice_value`,`taxable_value`,`igst`,`cgst`,`sgst`,`cess`)\"\n . \"values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?)\");\n $this->db2->query($query, array($customer_id, $insert_id, $original_month[$k], $include_month[$k], $amendment_month[$k], $category[$k], $gstin_arr[$k],\n $invoice_date[$k], $invoice_no[$k], $name[$k], $invoice_value[$k], $taxable_value[$k], $igst[$k], $cgst[$k], $sgst[$k], $cess[$k]));\n if ($this->db2->affected_rows() > 0) {\n $invoice_ammend++;\n }\n }\n }\n } else {\n for ($k = 0; $k < $count; $k++) {\n\n if ($original_month[$k] == \"\") {\n $original_month[$k] = \"0\";\n }\n if ($include_month[$k] == \"\") {\n $include_month[$k] = \"0\";\n }\n if ($amendment_month[$k] == \"\") {\n $amendment_month[$k] = \"0\";\n }\n if ($category[$k] == \"\") {\n $category[$k] = \"0\";\n }\n if ($gstin_arr[$k] == \"\") {\n $gstin_arr[$k] = \"0\";\n }\n if ($invoice_date[$k] == \"\") {\n $invoice_date[$k] = \"0\";\n }\n if ($invoice_no[$k] == \"\") {\n $invoice_no[$k] = \"0\";\n }\n if ($name[$k] == \"\") {\n $name[$k] = \"Not Given\";\n }\n if ($invoice_value[$k] == \"\") {\n $invoice_value[$k] = \"0\";\n }\n if ($taxable_value[$k] == \"\") {\n $taxable_value[$k] = \"0\";\n }\n if ($igst[$k] == \"\") {\n $igst[$k] = \"0\";\n }\n if ($cgst[$k] == \"\") {\n $cgst[$k] = \"0\";\n }\n if ($sgst[$k] == \"\") {\n $sgst[$k] = \"0\";\n }\n if ($cess[$k] == \"\") {\n $cess[$k] = \"0\";\n }\n\n $query = (\"insert into invoices_amended_summary_all (`customer_id`,`insert_id`,`original_month`,`included_in_month`,`amendment_month`,\"\n . \"`category`,`gstin_no`,`invoice_date`,`invoice_no`,`name`,`invoice_value`,`taxable_value`,`igst`,`cgst`,`sgst`,`cess`)\"\n . \"values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?)\");\n $this->db2->query($query, array($customer_id, $insert_id, $original_month[$k], $include_month[$k], $amendment_month[$k], $category[$k], $gstin_arr[$k],\n $invoice_date[$k], $invoice_no[$k], $name[$k], $invoice_value[$k], $taxable_value[$k], $igst[$k], $cgst[$k], $sgst[$k], $cess[$k]));\n if ($this->db2->affected_rows() > 0) {\n $invoice_ammend++;\n }\n }\n }\n return $invoice_ammend;\n }", "public function download_in_pdf($seq_no)\n\t{\n\t\t$this->load->model('statement_header_model');\n\t\t// $this->load->library('m_pdf');\n\t\t$this->load->model('transactions_model');\n\t\t$statement = $this->statement_header_model->get_statement($seq_no);\n\t\t$start_date = $statement[0]->START_DATE;\n\t\t$end_date = $statement[0]->END_DATE;\n\t\t$internal_key = $statement[0]->INTERNAL_KEY;\n\t\t$data['statement'] = $statement[0];\n\n\t\t// return print_r($statement);\n\t\t$data['transactions'] = $this->transactions_model\n\t\t\t\t->get_trans_history($start_date,$end_date,$internal_key);\n\n\t\t$data['start_date'] = $this->formatDate($start_date);\n\t\t$data['end_date'] = $this->formatDate($end_date);\n\n\n\t\t $this->load->helper('dompdf');\n\t\t $html = $this->load->view('transactions/view_statement2', $data, true);\n \t return pdf_create($html, 'eStatement as of '.$start_date. ' to' .$end_date);\n\t}", "public function render()\n {\n $chromosome = explode(\",\", $this->timetable->chromosome);\n $scheme = explode(\",\", $this->timetable->scheme);\n $data = $this->generateData($chromosome, $scheme);\n\n $days = $this->timetable->days()->orderBy('id', 'ASC')->get();\n $timeslots = TimeslotModel::orderBy('rank', 'ASC')->get();\n $classes = CollegeClassModel::all();\n\n $tableTemplate = '<h3 class=\"text-center\">{TITLE}</h3>\n <div style=\"page-break-after: always\">\n <table class=\"table table-bordered\">\n <thead>\n {HEADING}\n </thead>\n <tbody>\n {BODY}\n </tbody>\n </table>\n </div>';\n\n $content = \"\";\n\n foreach ($classes as $class) {\n $header = \"<tr class='table-head'>\";\n $header .= \"<td>Days</td>\";\n\n foreach ($timeslots as $timeslot) {\n $header .= \"\\t<td>\" . $timeslot->time . \"</td>\";\n }\n\n $header .= \"</tr>\";\n\n $body = \"\";\n\n foreach ($days as $day) {\n $body .= \"<tr><td>\" . strtoupper($day->short_name) . \"</td>\";\n foreach ($timeslots as $timeslot) {\n if (isset($data[$class->id][$day->name][$timeslot->time])) {\n $body .= \"<td class='text-center'>\";\n $slotData = $data[$class->id][$day->name][$timeslot->time];\n $courseCode = $slotData['course_code'];\n $courseName = $slotData['course_name'];\n $professor = $slotData['professor'];\n $room = $slotData['room'];\n\n $body .= \"<span class='course_code'>{$courseCode}</span><br />\";\n $body .= \"<span class='room pull-left'>{$room}</span>\";\n $body .= \"<span class='professor pull-right'>{$professor}</span>\";\n\n $body .= \"</td>\";\n } else {\n $body .= \"<td></td>\";\n }\n }\n $body .= \"</tr>\";\n }\n\n $title = $class->name;\n $content .= str_replace(['{TITLE}', '{HEADING}', '{BODY}'], [$title, $header, $body], $tableTemplate);\n }\n\n $path = 'public/timetables/timetable_' . $this->timetable->id . '.html';\n Storage::put($path, $content);\n\n $this->timetable->update([\n 'file_url' => $path\n ]);\n }", "function genrate_inspectorvehicleloghistory_pdf($columnsValues,$data,$vehicletype,$allconstants,$profile,$toDate=null,$fromDate=null,$vehiclelicno=null) {\n \n\t\t$columnwidtharrays = array(15,17,16,20,15,15,15,15,27,16,18);\n\t\t\n\t\t$heightdynamic = 8;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vehicletype) && !empty($vehicletype)) ){\n\n\t\t\t$x= $this->GetX();\n\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t$this->SetX($x+125);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($vehicletype) && !empty($vehicletype))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Type :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vehicletype) && !empty($vehicletype))\n\t\t\t$this->MultiCell(39, 8, $allconstants[$vehicletype],0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Register No. : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(164, 8, $vehiclelicno,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(164, 8, '',0,'','L',true);\n\t\t\t$this->Ln(2);\n\n\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n\n\t\t$c = 0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t \n\n\t\t if( $c == 0 || $c ==3 || $c ==6 || $c ==7|| $c ==9|| $c ==8){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 12, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 12, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 6, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\t\t\n\t\t\n\t\t$this->SetFont('Arial', '', 5);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\tforeach ($data as $val) {\n\t\t\n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $dt_log_date = \t\t\tdate('d M Y', strtotime($val['VehicleLogDetail']['dt_log_date']));\n\t\t $vc_vehicle_reg_no=\t\t$val['VehicleLogDetail']['vc_vehicle_reg_no'];\n\t\t $vc_vehicle_lic_no=\t\t$val['VehicleLogDetail']['vc_vehicle_lic_no'];\n\t\t $vc_driver_name= \t\t$val['VehicleLogDetail']['vc_driver_name'];\n\t\t $nu_start_ometer=\t\tnumber_format($val['VehicleLogDetail']['nu_start_ometer']);\n\t\t\t$nu_end_ometer = \t\tnumber_format($val['VehicleLogDetail']['nu_end_ometer']);\n\t\t\t\n\t\t\tif($val['VehicleLogDetail']['ch_road_type']==1){\n\t\t\t\t\n\t\t\t\t$origin = $val['VehicleLogDetail']['vc_other_road_orign_name'];\n\t\t\t\t$destination = $val['VehicleLogDetail']['vc_other_road_destination_name'];\n\t\t\t\t$nu_km_traveled = number_format($val['VehicleLogDetail']['nu_other_road_km_traveled']);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\n\t\t\t\t$origin = $val['VehicleLogDetail']['vc_orign_name'];\n\t\t\t\t$destination = $val['VehicleLogDetail']['vc_destination_name'];\n\t\t\t\t$nu_km_traveled = number_format($val['VehicleLogDetail']['nu_km_traveled']);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($val['VehicleLogDetail']['ch_road_type']==1)\n\t\t\t\t$ch_road_type = 'Other Road';\n\t\t\telse\n\t\t\t\t$ch_road_type = 'Namibian Road';\n\t\t\t\t\t\t\t\n\t\t // $vc_orign_name = \t\t$val['VehicleLogDetail']['vc_orign_name'];\n\t\t // $vc_destination_name = \t$val['VehicleLogDetail']['vc_destination_name'];\n\t\t // $nu_km_traveled = \t\tnumber_format($val['VehicleLogDetail']['nu_km_traveled']);\n\t\t // $nu_other_road_km_traveled = number_format($val['VehicleLogDetail']['nu_other_road_km_traveled']);\n\t\t $dt_created_date =\t\tdate('d M Y', strtotime($val['VehicleLogDetail']['dt_created_date']));\n\n\t\t\t$font_size = 6;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_log_date, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_reg_no, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_lic_no, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_driver_name, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $nu_start_ometer, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $nu_end_ometer, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t$col[] = array('text' => $ch_road_type, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $origin, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $destination, 'width' =>$columnwidtharrays[8], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $nu_km_traveled, 'width' =>$columnwidtharrays[9], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_created_date, 'width' =>$columnwidtharrays[10], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t}\n\t}", "public function view_attendance() { \r\n date_default_timezone_set(\"Asia/Manila\");\r\n $date= date(\"Y-m-d\");\r\n $year = date('Y', strtotime($date));\r\n $month = date('m', strtotime($date));\r\n $datenow = $year .\"-\". $month;\r\n $set_data = $this->session->userdata('userlogin'); //session data\r\n $data = array('clientID' => $set_data['clientID']\r\n ); \r\n $firstDay = mktime(0,0,0,$month, 1, $year);\r\n $timestamp = $firstDay;\r\n $weekDays = array();\r\n for ($i = 0; $i < 31; $i++) {\r\n $weekDays[] = strftime('%a', $timestamp);\r\n $timestamp = strtotime('+1 day', $timestamp);\r\n } \r\n $records['clientprofile']=$this->Client_Model->clientprofile($data);\r\n $records['weekDays']=$weekDays;\r\n $records['useradmin']=$this->User_Model->usertype();\r\n $records['employeeatendance']=$this->Attendance_Model->viewattendanceemployee($set_data['clientID'], $datenow);\r\n $this->load->view('attendanceemployee', $records);\r\n }", "public function formatData(){\n $from = $this->dataObject->getFrom();\n\n // prepare array for counterxmlbuild with vendor informations\n $data = array(\n 'Report' => array (\n 0 => array(\n // Report attributes\n 'Created' => date('Y-m-d\\TH:i:s'),\n 'ID' => 'ID01', //TODO\n 'Version' => $this->dataObject->getVersion(),\n 'Name' => $this->dataObject->getReportName(),\n 'Title' => $this->dataObject->getReportTitle(),\n // Vendor node\n 'Vendor' => array(\n 'Name' => VENDOR_NAME,\n 'ID' => VENDOR_ID,\n 'Contact' => array(\n 0 => array(\n 'Contact' => VENDOR_CONTACT_NAME,\n 'E-mail' => VENDOR_CONTACT_MAIL\n ),\n ),\n 'WebSiteUrl' => VENDOR_WEBSITEURL,\n 'LogoUrl' => VENDOR_LOGOURL,\n ),\n ),\n ),\n );\n\n // prepare with customer informations\n $data['Report'][0]['Customer'][0] = $this->dataObject->getCustomerInfo();\n\n $j=0; // ReportItem\n $y=0; // ItemPerfomance\n $previousIdentifier = '';\n $count = 0;\n\n foreach ($this->dataObject->getData() as $row) {\n if (!($row['identifier'] == $previousIdentifier)) {\n // next Reportitem\n $j++;\n // reset ItemPerfomance\n $y=0;\n\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPlatform'] = 'TODO'; //TODO\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemDataType'] = 'TODO'; //TODO\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemName'] = $row['identifier'];\n }\n\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Period']['Begin'] = date('Y-m-d', strtotime($row['date']));\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Period']['End'] = date('Y-m-d', strtotime('last day of this month', strtotime($row['date'])));\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Category'] = 'TODO'; //TODO\n\n // check for different counts\n $x=0; // Instance\n\n // TODO: implement/translate format for different metric types\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Instance'][$x]['MetricType'] = 'ft_total';\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Instance'][$x]['Count'] = $row['counter'];\n\n $y++; //next ItemPerformance\n $previousIdentifier = $row['identifier'];\n $count++;\n }\n\n $counterxmlbuild = new CounterXMLBuilder();\n $counterxmlbuild->setIndentString(\"\\t\");\n $counterxmlbuild->start();\n $counterxmlbuild->add_reports($data);\n $counterxmlbuild->done();\n return $this->formattedData = $counterxmlbuild->outputMemory();\n }", "public function tms_report_count() {\n $data['sideMenuData'] = fetch_non_main_page_content();\n if (!empty($_POST)) {\n\n\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n if ($_POST['pStatus'] == '1') {\n $payment_status = \"PAID','PARTPAID\";\n $displayTextCount = \"Total Paid Trainees : \";\n $export_url = '?pStatus=1';\n } else if ($_POST['pStatus'] == '2') {\n $payment_status = \"NOTPAID','PARTPAID\";\n $displayTextCount = \"Total Unpaid Trainees : \";\n $export_url = '?payStatus=2';\n }\n \n $year = $_POST['yVal'];\n $month = $_POST['mVal'];\n \n $training_score1 = $_POST['tStatus'];\n $export_url .='&yearVal=' . $year . '&monthVal=' . $month;\n if ($training_score1 == '1') {\n $training_score = 'C';\n } else if ($training_score1 == '2') {\n $training_score = \"NYC','2NYC\";\n } else if ($training_score1 == '3') {\n $training_score = 'ABS';\n } else if ($training_score1 == '4') {\n $training_score = \"C','NYC','2NYC\";\n }\n\n $export_url .= '&trainingStatus=' . $training_score1;\n $temp_data = array();\n if ($_POST['pStatus'] == '1') {\n $data_res = $this->reportsModel->tms_paid_report_count($tenant_id, $payment_status, $year, $month, $training_score);\n $paidVal1 = $this->calculate_paid($data_res);\n $count=count($data_res);\n $displayTextCount = 'Total Amount Received : ';\n } else if ($_POST['pStatus'] == '2') {\n $data_res = $this->reportsModel->tms_unpaid_report_count($tenant_id, $payment_status, $year, $month, $training_score);\n $amount_due = $data_res[0]->total_amount_due;\n $paidVal1 = $amount_due;\n $count=$data_res[0]->count;\n $displayTextCount = 'Total Amount Pending : ';\n } else if ($_POST['pStatus'] == '3'){\n $payment_status2 = \"PAID','PARTPAID\";\n $payment_status1 = \"NOTPAID','PARTPAID\";\n $data1_res = $this->reportsModel->tms_unpaid_report_count($tenant_id, $payment_status1, $year, $month, $training_score);\n $data2_res = $this->reportsModel->tms_paid_report_count($tenant_id, $payment_status2, $year, $month, $training_score);\n $amount_due = $data1_res[0]->total_amount_due;\n $paid_amout = $this->calculate_paid($data2_res);\n $count = ($data1_res[0]->count)+count($data2_res);\n $displayTextCount = \"Total Paid + Unpaid Amount : \";\n \n $paidVal1 =$amount_due + $paid_amout;\n \n }\n \n }\n \n $data['text1'] = 'Total Trainee: '.$count;\n $data['amount1'] = $displayTextCount.$paidVal1;\n $data['page_title'] = 'TMS Reports';\n $data['export_url'] = $export_url;\n $data['main_content'] = 'reports/tms_report';\n $this->load->view('layout', $data);\n }", "public function booking_acknowledge_company_pdf($trainee_ids, $class_id, $company) \n {\n $tenant_id = $this->tenant_id;\n $trainee_allid = explode('-', $trainee_ids);\n $tr_count = 0;\n foreach ($trainee_allid as $row) {\n $trainee_id = $row;\n $trainee_name = $this->classtraineemodel->get_trainee_name('', '', $row, $tenant_id);\n $name = $trainee_name->first . ' ' . $trainee_name->last;\n $trainee_names = ($trainee_name->gender == 'MALE') ? 'Mr.' . $name : 'Ms.' . $name;\n $trainee .=$trainee_names . ', ';\n $tr_count++;\n }\n $trainee = rtrim($trainee, ', ');\n\n $company_details = $this->company->get_company_details($tenant_id, $company);\n $classes = $this->class->get_class_details($tenant_id, $class_id);\n $ClassLoc = $this->get_classroom_location($classes->classroom_location, $classes->classroom_venue_oth);\n $courses = $this->course->get_course_detailse($classes->course_id);\n $tenant_details = $this->classtraineemodel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n $courseLevel = rtrim($this->course->get_metadata_on_parameter_id($courses->certi_level), ', ');\n $data = ''; \n if ($tr_count > 0) {\n $contact_details = '';\n if($tenant_details->tenant_id =='T12')\n {\n if (!empty($tenant_details->contact_name))\n {\n $contact_details .=$tenant_details->contact_name . ' ';\n }\n }\n\nif (!empty($tenant_details->tenant_contact_num)) {\n $contact_details .='(Phone: ' . $tenant_details->tenant_contact_num . ', ';\n }\n if (!empty($tenant_details->tenant_email_id)) {\n $contact_details .='Email Id: ' . $tenant_details->tenant_email_id . ')';\n }\n $contact_details = rtrim($contact_details, ', ');\n if ($company[0] == 'T') {\n $company_details->company_name = $tenant_details->tenant_name;\n }\n \n /* skm code start for remark. reporting time skm start bcoz of sam request for AOP(67) on 18-may-17*/\n $time = strtotime($classes->class_start_datetime);\n $reporting_time = date(\"H:i A\", strtotime('-30 minutes', $time));\n if($classes->course_id == 67 || $classes->course_id == 121)\n {\n $li = \"Report at center at $reporting_time to register for class\";\n }else{\n $li = \"Report at center at 8:30 AM to register for class\";\n }\n /* end */\n if($tenant_details->tenant_id == 'T02')\n {\n $li2 = \"<li>In the event of unforeseen circumstances (example: SkillsFuture Credit website is down for maintenance, etc), Cash payment has to be collected from Candidate and Xprienz Pte Ltd will assist in making the appeal for them.</li>\";\n } else {\n $li2 = '';\n } \n ///// added by shubhranshu for wablab points\n if($tenant_details->tenant_id == 'T20' || $tenant_details->tenant_id == 'T17'){\n $li_first = \"<li>Your NRIC, work permit or will be photocopied on the class date</li>\";\n }else{\n $li_first =\"<li>All participants please bring along their photo ID card with either their Nric/Fin number stated upon class date.</li>\";\n }\n $message3 = '\n <ol style=\"font-size:13px;color:#4f4b4b\">\n '.$li_first.'\n \n <li>Trim finger nails and remove nail polish</li>\n <li>'.$li.'</li>\n '.$li2.'\n </ol>';\n \n /* skm end */\n \n $data = '<br><br>\n <table style=\"font-size:15px\">\n <tr>\n <td>'.$tr_count . ' Seats for your company ' . $company_details->company_name . ' has been booked. Booking details for your employees: \n ' . $trainee . ' for \\'Course: <b>' . $courses->crse_name . '</b>, Class: <b>' . $classes->class_name . '</b>, Certificate Code: ' . $courseLevel . '\\'<br><br>\n <strong>Class start date:</strong>\n ' . date('M d, Y h:i A', strtotime($classes->class_start_datetime)) . '\n <br>\n <br>\n <strong>Class end date:</strong>\n ' . date('M d, Y h:i A', strtotime($classes->class_end_datetime)) . '\n <br>\n <br>\n \n <strong>Location: </strong>\n ' . $ClassLoc . '<br><br>\n <strong>Contact Details: </strong>\n ' . $contact_details. '<br><br>\n <strong>Remark: </strong>\n ' . $message3.'</td>\n </tr>\n </table>';\n }\n $booking_details = $this->classtraineemodel->get_paydue_invoice($trainee_id, $class_id);\n if ($booking_details) {\n $booking_no = date('Y', strtotime($booking_details->inv_date)) . ' ' . $booking_details->invoice_id;\n $booking_date = date('d/m/Y', strtotime($booking_details->inv_date));\n } else {\n $booking_no = date('Y') . ' ' . $trainee_id;\n $booking_date = date('d/m/Y');\n }\n $this->load->helper('pdf_reports_helper');\n generate_booking_acknowledge_pdf($data, $tenant_details, $booking_no, $booking_date);\n }", "public function run()\n {\n $data = [\n\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Course Name',\n 'identifier' => 'course_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Grade',\n 'identifier' => 'grade',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Academic Year',\n 'identifier' => 'academic_year',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Absences',\n 'identifier' => 'absences',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Tardies',\n 'identifier' => 'tardies',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'First Name',\n 'identifier' => 'first_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Last Name',\n 'identifier' => 'last_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Student Image',\n 'identifier' => 'student_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Student Id',\n 'identifier' => 'student_id',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Date of Birth',\n 'identifier' => 'dob',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Home Teacher',\n 'identifier' => 'home_teacher',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Student Reflection',\n 'identifier' => 'student_reflection',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Teacher Reflection',\n 'identifier' => 'teacher_reflection',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Services',\n 'identifier' => 'services',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Strand Template',\n 'identifier' => 'strand_template = 1',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Standard Template',\n 'identifier' => 'standard_template = 2',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Impact Template',\n 'identifier' => 'impact_template = 3',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Teacher Name',\n 'identifier' => 'teacher_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Teacher Image',\n 'identifier' => 'teacher_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Course Comment',\n 'identifier' => 'course_comment',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Course Scale Name',\n 'identifier' => 'course_scale_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Course Scale Value Image',\n 'identifier' => 'course_scale_value_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 2,\n 'name' =>'Strand Name',\n 'identifier' => 'strand_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 2,\n 'name' =>'Strand Scale Name',\n 'identifier' => 'strand_scale_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 2,\n 'name' =>'Strand Scale Value Image',\n 'identifier' => 'strand_scale_value_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 2,\n 'name' =>'Strand Comment',\n 'identifier' => 'strand_comment',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 3,\n 'name' =>'Standards Name',\n 'identifier' => 'standard_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 3,\n 'name' =>'Standard Scale Name',\n 'identifier' => 'standard_scale_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 3,\n 'name' =>'Standard Scale Value Image',\n 'identifier' => 'standard_scale_value_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 3,\n 'name' =>'Standard Comment',\n 'identifier' => 'standard_comment',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 4,\n 'name' =>'Impact Name',\n 'identifier' => 'impact_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 4,\n 'name' =>'Impact Scale Name',\n 'identifier' => 'impact_scale_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 4,\n 'name' =>'Impact Scale Value Image',\n 'identifier' => 'impact_scale_value_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 4,\n 'name' =>'Impact Comment',\n 'identifier' => 'impact_comment',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n ];\n\n $table = $this->table('report_template_variables');\n $table->insert($data)->save();\n }", "public function invoice_audit_trail_export_PDF() {\n //Read page parameter to display report\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n $invoice_id = $this->input->get('invoice_id');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $company_id = $this->input->get('company_id');\n\n $tenant_details = $this->classTraineeModel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $query = $this->reportsModel->get_invoice_audit_trail($tenant_id, NULL, NULL, $field, $order_by, $payment_status, $start_date, $end_date, $invoice_id, $company_id);\n $this->load->helper('pdf_reports_helper');\n return invoice_audit_trail_report_PDF($query, $tenant_details);\n }", "public function generateCode()\n {\n $date = Carbon::now()->format('m-y');\n $count = (new self)->onCurrentMonth()->count() + 1;\n\n return Code::make([\n $date, \n $count,\n ]);\n }", "public function fecthExpencesWiseReport($data=array())\n\t{\n\t // echo \"<pre>\"; print_r($data); exit;\n// \t\t$query = $this->db->select('expences.name as name, expences.date as date, expences.cheque_no, expences.amount, payment_method.name as payment_method')\n// \t\t\t\t\t\t\t->from('expences')\n// \t\t\t\t\t\t\t->join('payment_method', 'payment_method.id = expences.payment_method')\n// \t\t\t\t\t\t\t->where('expences.id', $data['expences'])\n// \t\t\t\t\t\t\t->where('expences.date >=', $data['from'])\n// \t\t\t\t\t\t\t->where('expences.date <=', $data['to'])\n// \t\t\t\t\t\t\t->get();\n// \t\treturn $query->result();\n\t\t\n\t\t$query = $this->db->select('expences.name as name, expences.date as date, expences.cheque_no, expences.amount, payment_method.name as payment_method, expences_category.name as exp_catemane')\n\t\t\t\t\t\t\t->from('expences')\n\t\t\t\t\t\t\t->join('payment_method', 'payment_method.id = expences.payment_method')\n\t\t\t\t\t\t\t->join('expences_category', 'expences_category.id = expences.expcat_id')\n\t\t\t\t\t\t\t->where('expences.date >=', $data['from'])\n\t\t\t\t\t\t\t->where('expences.date <=', $data['to'])\n\t\t\t\t\t\t\t->where('expences.id', $data['expences'])\n\t\t\t\t\t\t\t->get();\n\t\treturn $query->result();\n\t}", "public function reportMonthlyAttendentView(Request $request)\n {\n $year = trim($request->year) ;\n $shift = trim($request->shift);\n $dept = trim($request->dept);\n $semister = trim($request->semister);\n $section = trim($request->section);\n $month = trim($request->month);\n // get student\n $result = DB::table('student')->where('year',$year)->where('shift_id',$shift)->where('dept_id', $dept )->where('semister_id',$semister)->where('section_id',$section)->orderBy('roll','asc')->get();\n // get holiday\n $from = $year.'-'.$month.'-01';\n $to = $year.'-'.$month.'-31';\n $count_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereBetween('holiday_date', [$from, $to])->count();\n $month_total_day =cal_days_in_month(CAL_GREGORIAN,$month,$year);\n \n $shift_name = DB::table('shift')->where('id',$shift)->first();\n $dept_name = DB::table('department')->where('id',$dept)->first();\n $semister_name = DB::table('semister')->where('id',$semister)->first();\n $section_name = DB::table('section')->where('id',$section)->first();\n\n return view('report.reportMonthlyAttendentView')->with('result',$result)->with('count_holiday',$count_holiday)->with('month_total_day',$month_total_day)->with('from',$from)->with('to',$to)->with('month',$month)->with('year',$year)->with('shift_name',$shift_name)->with('dept_name',$dept_name)->with('semister_name',$semister_name)->with('section_name',$section_name)->with('section',$section)->with('semister',$semister)->with('dept',$dept)->with('shift',$shift); \n }", "function genrate_inspectorpaymenthistory_pdf($columnsValues,$data,$allconstants,$profile,$toDate=null,$fromDate=null,$vc_customer_name) {\n\t\n\t\t$columnwidtharrays = array(10,24,26,26,28,26,25,24);\n\t\t\n\t\t$heightdynamic = 12;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vc_customer_name) && !empty($vc_customer_name)) ){\n\n\t\t\t$x= $this->GetX();\n\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+125);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(25, 8, 'Customer Name :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(39, 8, $vc_customer_name,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t}\n\t}\n\n\t\t$c=0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFont('Arial', 'B', 7);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\n\t\t if( $c == 0){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\t\t\n\t\t\n\t\t$this->SetFont('Arial', '', 5);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t foreach ($data as $val) {\n\t\t \n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $vc_assessment_no = \t$val['AssessmentVehicleMaster']['vc_assessment_no'];\n\t\t $vc_customer_name=\t\t$val['AssessmentVehicleMaster']['vc_customer_name'];\n\t\t $dt_assessment_date=\tdate('d-M-y', strtotime($val['AssessmentVehicleMaster']['dt_assessment_date']));\n\t\t $nu_total_payable_amount= number_format($val['AssessmentVehicleMaster']['nu_total_payable_amount'],2,'.',',');\n\t\t $vc_mdc_paid=\t\t\tnumber_format($val['AssessmentVehicleMaster']['vc_mdc_paid'],2,'.',',');\n\t\t\t$dt_received_date = \tdate('d M Y', strtotime($val['AssessmentVehicleMaster']['dt_received_date']));\n\t\t $vc_prtype_name = \t\t$val['PaymentStatus']['vc_prtype_name'];\n\n\t\t\t$font_size = 7;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$alignvalue='C';\n\t\t\t\n\t\t\t$col[] = array('text' => $i+1, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_assessment_no, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $vc_customer_name, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_assessment_date, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $nu_total_payable_amount, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_mdc_paid, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_received_date, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prtype_name, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t}\n\t}", "function timesheetYear(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mytask=0, $perioduser='')\n{\n\tglobal $bc, $langs;\n\tglobal $form, $projectstatic, $taskstatic;\n\tglobal $periodyear, $displaymode ;\n\n\tglobal $transfertarray;\n\n\t$lastprojectid=0;\n\t$totalcol = array();\n\t$totalline = 0;\n\t$var=true;\n\n\t$numlines=count($lines);\n\tfor ($i = 0 ; $i < $numlines ; $i++)\n\t{\n\t\tif ($parent == 0) $level = 0;\n\n\t\tif ($lines[$i]->fk_parent == $parent)\n\t\t{\n\n\t\t\t// Break on a new project\n\t\t\tif ($parent == 0 && $lines[$i]->fk_project != $lastprojectid)\n\t\t\t{\n\t\t\t\t$totalprojet = array();\n\t\t\t\t$var = !$var;\n\t\t\t\t$lastprojectid=$lines[$i]->fk_project;\n\t\t\t}\n\n\t\t\tprint \"<tr \".$bc[$var].\">\\n\";\n\t\t\t// Ref\n\t\t\tprint '<td>';\n\t\t\t$taskstatic->fetch($lines[$i]->id);\n\t\t\t$taskstatic->label=$lines[$i]->label.\" (\".dol_print_date($lines[$i]->date_start,'day').\" - \".dol_print_date($lines[$i]->date_end,'day').')'\t;\n\t\t\t//print $taskstatic->getNomUrl(1);\n\t\t\tprint $taskstatic->getNomUrl(1,($showproject?'':'withproject'));\n\t\t\tprint '</td>';\n\n\t\t\t// Progress\n\t\t\tprint '<td align=\"right\">';\n\t\t\tprint $lines[$i]->progress.'% ';\n\t\t\tprint $taskstatic->getLibStatut(3);\n\t\t\t\n\t\t\tif ($taskstatic->fk_statut == 3)\n\t\t\t\t$transfertarray[] = $lines[$i]->id;\n\n\t\t\tprint '</td>';\n\n\t\t\t$totalline = 0;\n\t\t\tfor ($month=1;$month<= 12 ;$month++)\n\t\t\t{\n\t\t\t\t$szvalue = fetchSumMonthTimeSpent($taskstatic->id, $month, $periodyear, $perioduser, $displaymode);\n\t\t\t\t$totalline+=$szvalue;\n\t\t\t\t$totalprojet[$month]+=$szvalue;\n\t\t\t\tif ($displaymode==0)\n\t\t\t\t\tprint '<td align=right>'.($szvalue ? convertSecondToTime($szvalue, 'allhourmin'):\"\").'</td>';\n\t\t\t\telse\n\t\t\t\t\tprint '<td align=right>'.($szvalue ? price($szvalue):\"\").'</td>';\n\t\t\t\t// le nom du champs c'est à la fois le jour et l'id de la tache\n\t\t\t}\n\t\t\tif ($displaymode==0)\n\t\t\t\tprint '<td align=right>'.($totalline ? convertSecondToTime($totalline, 'allhourmin'):\"\").'</td>';\n\t\t\telse\n\t\t\t\tprint '<td align=right>'.($totalline ? price($totalline):\"\").'</td>';\n\n\n\t\t\t$inc++;\n\t\t\t$level++;\n\t\t\tif ($lines[$i]->id) timesheetYear($inc, $lines[$i]->id, $lines, $level, $projectsrole, $tasksrole, $mytask, $perioduser);\n\t\t\t$level--;\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//$level--;\n\t\t}\n\t}\n\t\n\tif ($level == 0)\n\t{\n\t\tprint \"<tr class='liste_total'>\\n\";\n\t\tprint '<td colspan=2 align=right><b>Total</b></td>';\n\t\tprint '</td>';\n\t\t$totalline = 0;\n\t\tfor ($month=1;$month<= 12 ;$month++)\n\t\t{\n\t\t\t// on affiche le total du projet\n\t\t\tif ($displaymode==0)\n\t\t\t\tprint '<td align=right>'.($totalgen[$month] ? convertSecondToTime($totalgen[$month], 'allhourmin'):\"\").'</td>';\n\t\t\telse\n\t\t\t\tprint '<td align=right>'.($totalgen[$month] ? price($totalgen[$month]):\"\").'</td>';\n\n\t\t\t$totalline+=$totalgen[$month];\n\t\t}\n\t\t// on affiche le total du projet\n\t\tif ($displaymode==0)\n\t\t\tprint '<td align=right>'.($totalline ? convertSecondToTime($totalline, 'allhourmin'):\"\").'</td>';\n\t\telse\n\t\t\tprint '<td align=right>'.($totalline ? price($totalline):\"\").'</td>';\n\n\t\tprint \"</tr>\\n\";\n\t}\n\treturn $inc;\n}", "function genrate_inspectorvehiclelogsheet_pdf($columnsValues,$data,$allconstants,$profile,$toDate=null,$fromDate=null,$vc_customer_name,$vehiclelicno=null) {\n\t\n\t\t$columnwidtharrays = array(17,20,15,15,18,14,13,13,15,25,25);\n\t\t\n\t\t$heightdynamic = 8;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vc_customer_name) && !empty($vc_customer_name)) ){\n\n\t\t\t$x= $this->GetX();\n\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\t\t\t\n\t\t\t$this->SetX($x+125);\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(25, 8, 'Customer Name :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(39, 8, ucfirst($vc_customer_name),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t\t$x= $this->GetX();\t\t\t\n\t\t\t$y= $this->GetY();\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Register No. : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t\n\t\t\t$this->SetFont('Arial','', 6);\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\t\t\t\n\t\t\t$this->SetX($x+25);\n\t\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(165, 8, $vehiclelicno,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(165, 8, '',0,'','L',true);\n\t\t\t$this->Ln(2);\n\t\t}\n\t}\n\t\n\t\t\t$c=0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\n\t\t if( $c == 0 ){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 16, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($c == 4 || $c == 7 || $c == 8 || $c == 1|| $c == 9){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 16, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t else\n\t\t {\n\t\t\t\tif($c==$length ){\n\n\t\t\t\t\t$this->MultiCell($columnwidtharrays[$c], 16, $val , 1,'C',true);\n\n\t\t\t\t\t$this->SetY($y); //Reset the write point\n\n\t\t\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\n\t\t\t\t}\n\n\t\t\t\telse{\n\n\t\t\t\t\t$this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\n\t\t\t\t\t$this->SetY($y); //Reset the write point\n\n\t\t\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\n\t\t\n\t\t$this->SetFont('Arial', '', 5);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\tforeach ($data as $val) {\n\t\t\n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $LogDate = !empty ($val['VehicleLogDetail']['dt_log_date']) ? \n date('d M Y', strtotime($val['VehicleLogDetail']['dt_log_date'])):\n '';\n\t\t $vc_customer_name=\t\tucfirst($val['VehicleLogMaster']['vc_customer_name']);\n\t\t $vc_vehicle_reg_no=\t\t$val['VehicleDetail']['vc_vehicle_reg_no'];\n\t\t $vc_vehicle_lic_no=\t\t$val['VehicleLogDetail']['vc_vehicle_lic_no'];\n\t\t $vc_driver_name=\t\t$val['VehicleLogDetail']['vc_driver_name'];\n\t\t\t$StartOMet = \t\t\tisset($val['VehicleLogDetail']['nu_start_ometer']) ?$val['VehicleLogDetail']['nu_start_ometer']:'';\n\t\t $EndOMet = \t\t\t\tisset($val['VehicleLogDetail']['nu_end_ometer']) ?$val['VehicleLogDetail']['nu_end_ometer']:'';\n\t\t\t\n\t\t\tif($val['VehicleLogDetail']['ch_road_type']==1){\n\t\t\t\n\t\t\t$origin = $val['VehicleLogDetail']['vc_other_road_orign_name'];\n\t\t\t$destination = $val['VehicleLogDetail']['vc_other_road_destination_name'];\n\t\t\t//$kmtravldnamroad = number_format($val['VehicleLogDetail']['nu_km_traveled']);\n\t\t\t$KmTraV = $val['VehicleLogDetail']['nu_other_road_km_traveled'];\n\t\t\t\n\t\t\t}else{\n\t\t\t\n\t\t\t$origin = $val['VehicleLogDetail']['vc_orign_name'];\n\t\t\t$destination = $val['VehicleLogDetail']['vc_destination_name'];\n\t\t\t$KmTraV = $val['VehicleLogDetail']['nu_km_traveled'];\n\t\t\t//$kmtrvldotheroad = number_format($val['VehicleLogDetail']['nu_other_road_km_traveled']);\n\t\t\t\n\t\t\t}\n\t\t\tif($val['VehicleLogDetail']['ch_road_type']==1)\n\t\t\t$ch_road_type= 'Other Road';\n\t\t\telse\n\t\t\t$ch_road_type= 'Namibian Road';\n\t\t\t\t\t\t\t\n\t\t\t\n//\t\t\t$vc_orign_name =\t\t$val['VehicleLogDetail']['vc_orign_name'];\n\t//\t $vc_destination_name=\t$val['VehicleLogDetail']['vc_destination_name'];\n\t\t//\t$KmTraV = \t\t\t\tisset($val['VehicleLogDetail']['nu_km_traveled']) ?$val['VehicleLogDetail']['nu_km_traveled']:'';\n\t\t // $KmTravOth = \t\t\tisset($val['VehicleLogDetail']['nu_other_road_km_traveled']) ?$val['VehicleLogDetail']['nu_other_road_km_traveled']:'';\n\n\t\t\t$font_size = 7;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$col[] = array('text' => $LogDate, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_customer_name, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_reg_no, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_lic_no, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_driver_name, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue='R';\n\t\t\t\n\t\t\t$col[] = array('text' => number_format($StartOMet), 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => number_format($EndOMet), 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t$col[] = array('text' => $ch_road_type, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t$col[] = array('text' => $origin, 'width' =>$columnwidtharrays[8], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$col[] = array('text' =>$destination, 'width' =>$columnwidtharrays[9], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue='R';\n\t\t\t\n\t\t\t$col[] = array('text' =>number_format($KmTraV), 'width' =>$columnwidtharrays[10], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t\n\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\n\t\t}\n\t\n\t}", "public function get_sales_man_daily_work_report($date){\n\t\t $this->db->select('empployee.e_id,empployee.e_emplouee_id,assign_work.w_d_id,assign_work.date')->from('assign_work');\n\t\t $this->db->join('empployee', 'empployee.e_id = assign_work.work_employee_id ', 'left');\n\t\t $this->db->order_by('empployee.role_id',8);\n\t\t $this->db->where('empployee.status',1);\n\t\t $this->db->where('assign_work.date',$date);\n\t\t $return=$this->db->get()->result_array();\n\t\t $work_details=$data_work='';\n\t\t foreach($return as $list){\n\t\t\t $emp_work=$this->get_employee_work_dailay_details($list['date'],$list['e_id'],$list['w_d_id']);\n\t\t\t $data[$list['e_id']]=$list;\n\t\t\t $data[$list['e_id']]['work']=isset($emp_work)?$emp_work:'';\n\t\t\t \n\t\t }\n\t\t if(!empty($data)){\n\t\t\t return $data;\n\t\t }\n\t}", "public function gen_inv_pdf_basedon_forgeigner($invoice_id, $is_subsidy) {\n //$this->output->enable_profiler();\n $tenant_id = $this->tenant_id;\n \n if (empty($invoice_id)) {\n return show_404();\n }\n if (empty($is_subsidy)) {\n $res = $this->classtraineemodel->get_company_invoice_foreigner($invoice_id);\n $text = 'f';\n } \n \n $result = $res[0];\n //added by pritam to generate previous invoice number\n $result->previous_inv_id = $this->classtraineemodel->get_enroll_prev_invoice($invoice_id);\n //\n $result->invoice_label = $text;\n $result->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($result->tenant_state), ', ');\n $result->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($result->tenant_country), ', ');\n\n $result->inv_year = date('Y', strtotime($result->inv_date));\n $result->inv_date = date('d/m/Y', strtotime($result->inv_date));\n $result->discount_label = rtrim($this->course->get_metadata_on_parameter_id($result->discount_type), ', ');\n if ($result->total_gst) {\n $result->gst_label = 'GST ON, ' . rtrim($this->course->get_metadata_on_parameter_id($result->gst_rule), ', ');\n } else {\n $result->gst_label = 'GST OFF';\n }\n $course_manager = $this->course->get_managers($courses->crse_manager);\n $length = stripos($course_manager, ', ');\n $result->course_manager = (!empty($length)) ? substr($course_manager, 0, $length) : $course_manager;\n\n if ($result->company_id[0] == 'T') {\n $result->company_name = $result->tenant_name;\n $result->company_details->comp_state = $result->tenant_state;\n $result->company_details->comp_cntry = $result->tenant_country;\n $result->company_details->comp_phone = $result->tenant_contact_num;\n $result->company_details->comp_address = $result->tenant_address;\n \n $company_person = $this->company->get_company_user($this->tenant_id, $result->company_id);//sk1\n $result->company_person_name = $company_person[0]->first_name;//sk2\n \n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $result->company_id);\n $result->company_details = $company_details[0];\n $result->company_details->comp_state = rtrim($this->course->get_metadata_on_parameter_id($result->company_details->comp_state), ', ');\n $result->company_details->comp_cntry = rtrim($this->course->get_metadata_on_parameter_id($result->company_details->comp_cntry), ', ');\n $result->company_name = $company_details[0]->company_name;\n \n $company_person = $this->company->get_company_user($this->tenant_id, $result->company_id);//sk1\n $result->company_person_name = $company_person[0]->first_name;//sk2\n }\n //$result->discount_rate = round($result->discount_rate, 2);\n $result->gst_rate = round($result->gst_rate, 2);\n $total_unitfees = 0;\n $total_discount = 0;\n $total_gst = 0;\n $total_subsidy = 0;\n $total_inv_amount = 0;\n// $company_received = $this->classtraineemodel->company_payment_recd($result->invoice_id);\n $company_received = $this->classtraineemodel->company_payment_recd_forgeiner($result->invoice_id);\n $user_paid = array();\n foreach ($company_received as $k => $v) {\n $user_paid[$v->user_id] = round($v->amount_recd,2);\n }\n// $company_refunded = $this->classtraineemodel->company_payment_refund($result->invoice_id);\n $company_refunded = $this->classtraineemodel->company_payment_refund_foreigner($result->invoice_id);\n $user_refund = array();\n foreach ($company_refunded as $k => $v) {\n $user_refund[$v->user_id] = round($v->refund_amount,2);\n }\n foreach ($res as $k => $row) \n {\n $received = empty($user_paid[$row->user_id]) ? 0 : $user_paid[$row->user_id];\n $refunded = empty($user_refund[$row->user_id]) ? 0 : $user_refund[$row->user_id];\n $received_amt+=$received;\n $refunded_amt+=$refunded;\n if((($row->total_amount_due + $refunded) - $received) <= 0){\n $payment_label = 'PAID';\n }\n else{ \n if($refunded > 0){\n $payment_label = 'REFUNDED'; \n } else{ \n if($received == 0){\n $payment_label = 'NOT PAID';\n }else if($received > 0){\n $payment_label = 'PART PAID';\n }\n }\n }\n \n $res[$k]->payment_label = $payment_label;\n $total_unitfees +=$row->class_fees;\n $total_discount += ($row->class_fees * ($result->discount_rate / 100));\n $total_gst += $row->gst_amount;\n $total_subsidy += $row->subsidy_amount;\n $total_inv_amount += $row->total_amount_due;\n $result->total_inv_amount1 = $row->total_inv_amount;\n \n }\n $result->payble_amount=$total_inv_amount+$refunded_amt-$received_amt;\n $result->total_unit_fees = round($total_unitfees, 2);\n $result->total_inv_discnt = round($total_discount, 2);\n $result->total_inv_subsdy = round($total_subsidy, 2);\n $result->total_gst = round($total_gst, 2);\n $result->indi_disc_total = ($result->class_fees * ($result->discount_rate / 100));\n $result->total_inv_amount = round($total_inv_amount, 2);\n \n $result->payment_due_details = $res;\n\n $this->load->helper('pdf_reports_helper');\n generate_company_pdf_invoice($result);\n }", "public function reportPeriodicStudentPresentList()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportPeriodicStudentPresentList')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "public function generate_date_attendance(Request $request)\n {\n \t$unit_id=$request->unit_id;\n \t$a_date=date('Y-m-d', strtotime(str_replace('-', '/', $request->attendance_date)));\n \t$attendance=DB::table('tbl_attendance')\n \t\t\t->join('tbl_employee','tbl_attendance.employee_id','=','tbl_employee.employee_id')\n \t\t\t->join('tbl_unit','tbl_attendance.unit_id','=','tbl_unit.unit_id')\n ->join('tbl_designation','tbl_employee.designation_id','=','tbl_designation.designation_id')\n \t\t\t->where('attendance_date',$a_date)\n \t\t\t->where('tbl_attendance.unit_id',$unit_id)\n \t\t\t->get();\n \t\t/*dd($a_date);*/\n \treturn view('manager.show_update_attendance_form', compact('attendance','a_date'));\n }", "function attendance_construct_sessions_data_for_add($formdata, mod_attendance_structure $att) {\n global $CFG;\n\n $sesstarttime = $formdata->sestime['starthour'] * HOURSECS + $formdata->sestime['startminute'] * MINSECS;\n $sesendtime = $formdata->sestime['endhour'] * HOURSECS + $formdata->sestime['endminute'] * MINSECS;\n $sessiondate = $formdata->sessiondate + $sesstarttime;\n $duration = $sesendtime - $sesstarttime;\n if (empty(get_config('attendance', 'enablewarnings'))) {\n $absenteereport = get_config('attendance', 'absenteereport_default');\n } else {\n $absenteereport = empty($formdata->absenteereport) ? 0 : 1;\n }\n\n $now = time();\n\n if (empty(get_config('attendance', 'studentscanmark'))) {\n $formdata->studentscanmark = 0;\n }\n\n if (empty(get_config('attendance', 'allowupdatestatus'))) {\n $formdata->allowupdatestatus = 0;\n }\n\n $calendarevent = 0;\n if (isset($formdata->calendarevent)) { // Calendar event should be created.\n $calendarevent = 1;\n }\n\n $sessions = array();\n if (isset($formdata->addmultiply)) {\n $startdate = $sessiondate;\n $enddate = $formdata->sessionenddate + DAYSECS; // Because enddate in 0:0am.\n\n if ($enddate < $startdate) {\n return null;\n }\n\n // Getting first day of week.\n $sdate = $startdate;\n $dinfo = usergetdate($sdate);\n if ($CFG->calendar_startwday === '0') { // Week start from sunday.\n $startweek = $startdate - $dinfo['wday'] * DAYSECS; // Call new variable.\n } else {\n $wday = $dinfo['wday'] === 0 ? 7 : $dinfo['wday'];\n $startweek = $startdate - ($wday - 1) * DAYSECS;\n }\n\n $wdaydesc = array(0 => 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');\n\n while ($sdate < $enddate) {\n if ($sdate < strtotime('+1 week', $startweek)) {\n $dinfo = usergetdate($sdate);\n if (isset($formdata->sdays) && array_key_exists($wdaydesc[$dinfo['wday']], $formdata->sdays)) {\n $sess = new stdClass();\n $sess->sessdate = make_timestamp($dinfo['year'], $dinfo['mon'], $dinfo['mday'],\n $formdata->sestime['starthour'], $formdata->sestime['startminute']);\n $sess->duration = $duration;\n $sess->descriptionitemid = $formdata->sdescription['itemid'];\n $sess->description = $formdata->sdescription['text'];\n $sess->descriptionformat = $formdata->sdescription['format'];\n $sess->calendarevent = $calendarevent;\n $sess->timemodified = $now;\n $sess->absenteereport = $absenteereport;\n $sess->studentpassword = '';\n $sess->includeqrcode = 0;\n $sess->rotateqrcode = 0;\n $sess->rotateqrcodesecret = '';\n $sess->automark = !empty($formdata->automark) ? $formdata->automark : 0;\n $sess->automarkcmid = !empty($formdata->automarkcmid) ? $formdata->automarkcmid : 0;\n $sess->automarkcompleted = 0;\n\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n\n if (isset($formdata->studentscanmark)) { // Students will be able to mark their own attendance.\n $sess->studentscanmark = 1;\n if (isset($formdata->allowupdatestatus)) {\n $sess->allowupdatestatus = $formdata->allowupdatestatus;\n } else {\n $sess->allowupdatestatus = 0;\n }\n if (isset($formdata->autoassignstatus)) {\n $sess->autoassignstatus = 1;\n }\n if (isset($formdata->studentsearlyopentime)) {\n $sess->studentsearlyopentime = $formdata->studentsearlyopentime;\n }\n\n if (!empty($formdata->randompassword)) {\n $sess->studentpassword = attendance_random_string();\n } else if (!empty($formdata->studentpassword)) {\n $sess->studentpassword = $formdata->studentpassword;\n }\n if (!empty($formdata->includeqrcode)) {\n $sess->includeqrcode = $formdata->includeqrcode;\n }\n if (!empty($formdata->rotateqrcode)) {\n $sess->rotateqrcode = $formdata->rotateqrcode;\n $sess->studentpassword = attendance_random_string();\n $sess->rotateqrcodesecret = attendance_random_string();\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n } else {\n $sess->subnet = '';\n $sess->automark = 0;\n $sess->automarkcompleted = 0;\n $sess->preventsharedip = 0;\n $sess->preventsharediptime = '';\n }\n $sess->statusset = $formdata->statusset;\n\n attendance_fill_groupid($formdata, $sessions, $sess);\n }\n\n $sdate = strtotime(\"+1 day\", $sdate); // Set start to tomorrow.\n } else {\n $startweek = strtotime(\"+\".$formdata->period.' weeks', $startweek);\n $sdate = $startweek;\n }\n }\n } else {\n $sess = new stdClass();\n $sess->sessdate = $sessiondate;\n $sess->duration = $duration;\n $sess->descriptionitemid = $formdata->sdescription['itemid'];\n $sess->description = $formdata->sdescription['text'];\n $sess->descriptionformat = $formdata->sdescription['format'];\n $sess->calendarevent = $calendarevent;\n $sess->timemodified = $now;\n $sess->studentscanmark = 0;\n $sess->allowupdatestatus = 0;\n $sess->autoassignstatus = 0;\n $sess->subnet = '';\n $sess->studentpassword = '';\n $sess->automark = 0;\n $sess->automarkcompleted = 0;\n\n if (!empty($formdata->automarkcmid)) {\n $sess->automarkcmid = $formdata->automarkcmid;\n } else {\n $sess->automarkcmid = 0;\n }\n\n $sess->absenteereport = $absenteereport;\n $sess->includeqrcode = 0;\n $sess->rotateqrcode = 0;\n $sess->rotateqrcodesecret = '';\n\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n\n if (isset($formdata->studentscanmark) && !empty($formdata->studentscanmark)) {\n // Students will be able to mark their own attendance.\n $sess->studentscanmark = 1;\n if (!empty($formdata->allowupdatestatus)) {\n $sess->allowupdatestatus = $formdata->allowupdatestatus;\n } else {\n $sess->allowupdatestatus = 0;\n }\n if (isset($formdata->autoassignstatus) && !empty($formdata->autoassignstatus)) {\n $sess->autoassignstatus = 1;\n }\n if (!empty($formdata->randompassword)) {\n $sess->studentpassword = attendance_random_string();\n } else if (!empty($formdata->studentpassword)) {\n $sess->studentpassword = $formdata->studentpassword;\n }\n if (!empty($formdata->includeqrcode)) {\n $sess->includeqrcode = $formdata->includeqrcode;\n }\n if (!empty($formdata->rotateqrcode)) {\n $sess->rotateqrcode = $formdata->rotateqrcode;\n $sess->studentpassword = attendance_random_string();\n $sess->rotateqrcodesecret = attendance_random_string();\n }\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->studentsearlyopentime)) {\n $sess->studentsearlyopentime = $formdata->studentsearlyopentime;\n }\n }\n $sess->statusset = $formdata->statusset;\n\n attendance_fill_groupid($formdata, $sessions, $sess);\n }\n\n return $sessions;\n}", "function export_report()\n {\n // load csv generator library\n $this->load->library('csvgenerator');\n \n // get current session data \n $session_data = $this->session->userdata('logged_in');\n\n // get filter criteria from post input\n $data = array(\n 'risk_register' => $this->input->post('risk_register'),\n 'user_id' => $this->input->post('general_user'),\n 'project_id' => $session_data['report_project_id']\n );\n\n if ($session_data['role_id'] == 8)\n {\n // get assigned risk register and its ID\n $register_row = $this->project_model->getAssignedRiskRegisterName($data['user_id']);\n $assigned_register_id = $register_row->subproject_id;\n $this->csvgenerator->fetch_data( $user_id, $main_category, $risk_level, $risk_register, $assigned_register_id );\n }\n else\n {\n if($this->csvgenerator->fetch_response_data($data))\n {\n redirect('dashboard/report_response/generate'); \n }\n else\n {\n // error\n $this->session->set_flashdata('negative_msg','Sorry. No report or data for the selected data filter!');\n redirect('dashboard/reports/response_project');\n }\n } \n }", "public function dtincomegroupreport()\n {\n $search_type = $this->input->post('search_type');\n $date_from = $this->input->post('date_from');\n $date_to = $this->input->post('date_to');\n $head = $this->input->post('head');\n\n if (isset($search_type) && $search_type != '') {\n\n $dates = $this->customlib->get_betweendate($search_type);\n $data['search_type'] = $_POST['search_type'];\n\n } else {\n\n $dates = $this->customlib->get_betweendate('this_year');\n $data['search_type'] = '';\n\n }\n $data['head_id'] = $head_id = \"\";\n if (isset($_POST['head']) && $_POST['head'] != '') {\n $data['head_id'] = $head_id = $_POST['head'];\n }\n\n $start_date = date('Y-m-d', strtotime($dates['from_date']));\n $end_date = date('Y-m-d', strtotime($dates['to_date']));\n\n $data['label'] = date($this->customlib->getSchoolDateFormat(), strtotime($start_date)) . \" \" . $this->lang->line('to') . \" \" . date($this->customlib->getSchoolDateFormat(), strtotime($end_date));\n $incomeList = $this->income_model->searchincomegroup($start_date, $end_date, $head_id);\n $m = json_decode($incomeList);\n $currency_symbol = $this->customlib->getSchoolCurrencyFormat();\n $dt_data = array();\n $grand_total = 0;\n if (!empty($m->data)) {\n $grd_total = 0;\n foreach ($m->data as $key => $value) {\n\n $incomedata = explode(',', $value->income);\n $income_id = \"\";\n $income_name = \"\";\n $income_date = \"\";\n $invoice_no = \"\";\n $income_amount = \"\";\n $total_amount = 0;\n foreach ($incomedata as $incomevalue) {\n $incomeexpload = explode('@', $incomevalue);\n $income_id .= $incomeexpload[0];\n $income_id .= \"<br>\";\n $income_name .= $incomeexpload[1];\n $income_name .= \"<br>\";\n $income_date .= date($this->customlib->getSchoolDateFormat(), strtotime($incomeexpload[3]));\n $income_date .= \"<br>\";\n $invoice_no .= $incomeexpload[2];\n $invoice_no .= \"<br>\";\n $income_amount .= $incomeexpload[4];\n $income_amount .= \"<br>\";\n }\n $total_amount = \"<b>\" . $value->total_amount . \"</b>\";\n $grd_total += $value->total_amount;\n $row = array();\n $row[] = $value->income_category;\n $row[] = $income_id;\n $row[] = $income_name;\n $row[] = $income_date;\n $row[] = $invoice_no;\n $row[] = $income_amount;\n $dt_data[] = $row;\n\n $amount_row = array();\n $amount_row[] = \"\";\n $amount_row[] = \"\";\n $amount_row[] = \"\";\n $amount_row[] = \"\";\n $amount_row[] = \"\";\n $amount_row[] = $total_amount;\n $dt_data[] = $amount_row;\n }\n\n $grand_total = \"<b>\" . $currency_symbol . $grd_total . \"</b>\";\n $footer_row = array();\n $footer_row[] = \"\";\n $footer_row[] = \"\";\n $footer_row[] = \"\";\n $footer_row[] = \"\";\n $footer_row[] = \"<b>\" . $this->lang->line('total') . \"</b>\";\n $footer_row[] = $grand_total;\n $dt_data[] = $footer_row;\n }\n\n $json_data = array(\n \"draw\" => intval($m->draw),\n \"recordsTotal\" => intval($m->recordsTotal),\n \"recordsFiltered\" => intval($m->recordsFiltered),\n \"data\" => $dt_data,\n );\n echo json_encode($json_data);\n }", "public function getCurrentlyEnrolledSubjects($studentNumber) {\r\n \r\n $result = array();\r\n\r\n $queryresult = $this->db->query(\"SELECT c.`ID`, c.`STUDENT_NO`, CONCAT(sy.`SY_START`, ' - ', sy.`SY_END`) `SY`, \r\n ss.`SEMESTER`, \r\n CONCAT(UPPER(sub.`SUBJECT_CODE`), ' - ', UPPER(sub.`DESCRIPTION`), ' (', sub.`UNITS`, ' Units) / ', sy.`SY_ABBR`, ' - ', ss.`SEMESTER`, ' / ', \r\n CONCAT(UPPER(f.`LAST_NAME`), ' ', UPPER(f.`FIRST_NAME`), ' ', UPPER(IFNULL(f.`MIDDLE_NAME`, ''))), ' / ',\r\n sc.`DAY_OF_WEEK`, ' ', TIME_FORMAT(sc.`START_TIME`, '%h:%i%p'), ' - ', TIME_FORMAT(sc.`END_TIME`, '%h:%i%p')) SUBJECT, \r\n sub.`ID` subjectID, c.`SUBJECT_CODE`, sub.`DESCRIPTION` subjectTitle, sub.`UNITS` units\r\n FROM r_student_class_list c\r\n INNER JOIN r_sy sy\r\n ON sy.`ID` = c.`SY`\r\n INNER JOIN r_subject sub\r\n ON sub.`SUBJECT_CODE` = c.`SUBJECT_CODE`\r\n INNER JOIN r_semester ss\r\n ON ss.`ID` = c.`SEM`\r\n INNER JOIN r_schedule sc ON sc.`SECTION_CODE` = c.`SECTION_CODE` AND sc.`SY` = c.`SY` AND sc.`SEM` = c.`SEM`\r\n LEFT OUTER JOIN r_faculty_profile f ON f.`FACULTY_CODE` = sc.`FACULTY_CODE`\r\n WHERE c.`STUDENT_NO` = ? AND\r\n sy.`STATUS` = 'Active' AND ss.`STATUS` = 'Active'\", array($studentNumber));\r\n\r\n if($queryresult->num_rows() > 0) {\r\n foreach($queryresult->result() as $rows) {\r\n $result[] = array(\r\n 'SUBJECT_ID' => $rows->ID,\r\n 'SUBJECT' => $rows->SUBJECT,\r\n 'SUBJECT_CODE' => $rows->SUBJECT_CODE,\r\n 'subjectTitle' => $rows->subjectTitle,\r\n 'units' => $rows->units,\r\n 'SY' => $rows->SY,\r\n 'SEMESTER' => $rows->SEMESTER\r\n );\r\n }\r\n }\r\n\r\n return $result;\r\n }", "public function populateReport(){\n\t\t$companyID = $this->input->post('companyID');\n\t\t$courseID = $this->input->post('courseID');\n\t\t$daterange = $this->input->post('dateRange');\n\t\t\n\t\t$ranges = explode(\" - \", $daterange);\n\t\t#formatting the date ranges\n\t\t$from = date(\"Y-m-d H:i:s\",strtotime($ranges[0]));\n\t\t$to = date(\"Y-m-d H:i:s\",strtotime($ranges[1]));\n\t\t\n $report = $this->report->get_report($companyID, $courseID, $from, $to);\n $data = array();\n foreach ($report as $report_row) {\n $row = array();\n $row[] = '<td class=\"min-width nowrap\"></td>';\n $row[] = $report_row->name;\n $row[] = $report_row->mobile;\n $row[] = $report_row->email;\n $row[] = $report_row->questionSet;\n $row[] = $report_row->totalQuestions;\n $row[] = $report_row->duration;\n $row[] = $report_row->passingMarks;\n $row[] = $report_row->maxScore;\n $row[] = $report_row->timeTaken;\n $row[] = $report_row->result;\n $row[] = date(\"M d Y h:i A\",strtotime($report_row->timeStamp));\n array_push($data, $row);\n }\n \n $output = array(\n\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\"recordsTotal\" => $this->report->count_all(),\n\t\t\t\"recordsFiltered\" => $this->report->count_filtered(),\n\t\t\t\"data\" => $data,\n\t\t);\n echo json_encode($output);\n }", "function addPageSchedules4(&$pdf, $font, $template, $data_sub_plus, $data_sub_minus, $datas, $first=false)\n {\n $size_of_sub_plus = sizeof($data_sub_plus);\n $size_of_sub_minus = sizeof($data_sub_minus);\n\n $Term = ClassRegistry::init('Term');\n $target_day29 ='2017/04/01';\n\n //Term.account_beggining\n $term = $Term->getCurrentTerm();\n\n if(strtotime($target_day29) <= strtotime($term['Term']['account_end'])){\n\n if ($size_of_sub_plus <= 5 && $size_of_sub_minus <= 4) {\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n } else if($size_of_sub_plus > 5 && $size_of_sub_minus <= 4) {\n $data_sub_plus_1 = array_slice($data_sub_plus, 0, 5);\n $data_sub_plus_2 = array_slice($data_sub_plus, 5);\n $data_sub_plus_1 = array_slice($data_sub_plus, 0, 5);\n $data_sub_plus_2 = array_slice($data_sub_plus, 5);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_1);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_2);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n } else if($size_of_sub_plus <= 5 && $size_of_sub_minus > 4) {\n $data_sub_minus_1 = array_slice($data_sub_minus, 0, 4);\n $data_sub_minus_2 = array_slice($data_sub_minus, 4);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_1);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_2);\n } else {\n $data_sub_plus_1 = array_slice($data_sub_plus, 0, 5);\n $data_sub_plus_2 = array_slice($data_sub_plus, 5);\n $data_sub_minus_1 = array_slice($data_sub_minus, 0, 4);\n $data_sub_minus_2 = array_slice($data_sub_minus, 4);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_1);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_1);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->addPageSchedules4($pdf, $font, $template, $data_sub_plus_2, $data_sub_minus_2, $datas);\n }\n } else {\n if ($size_of_sub_plus <= 4 && $size_of_sub_minus <= 4) {\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n } else if($size_of_sub_plus > 4 && $size_of_sub_minus <= 4) {\n $data_sub_plus_1 = array_slice($data_sub_plus, 0, 4);\n $data_sub_plus_2 = array_slice($data_sub_plus, 4);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_1);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_2);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n } else if($size_of_sub_plus <= 4 && $size_of_sub_minus > 4) {\n $data_sub_minus_1 = array_slice($data_sub_minus, 0, 4);\n $data_sub_minus_2 = array_slice($data_sub_minus, 4);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_1);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_2);\n } else {\n $data_sub_plus_1 = array_slice($data_sub_plus, 0, 4);\n $data_sub_plus_2 = array_slice($data_sub_plus, 4);\n $data_sub_minus_1 = array_slice($data_sub_minus, 0, 4);\n $data_sub_minus_2 = array_slice($data_sub_minus, 4);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_1);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_1);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->addPageSchedules4($pdf, $font, $template, $data_sub_plus_2, $data_sub_minus_2, $datas);\n }\n }\n }", "function generate_rep($empList, $from, $to, $field) {\n foreach ($empList as $val) {\n $Arr[$val]['split'] = $this->generate_report_modelwise($val, $field, $from, $to);\n }\n $select = array(\n 'model_name'\n );\n $final = array();\n $this->db->distinct();\n $this->db->select($select);\n $this->db->order_by('model_name', 'ASC');\n $modelList = $this->db->get('inventory_table')->result_array();\n\n foreach ($modelList as $val) {\n $model[$val['model_name']]['target'] = 0;\n $model[$val['model_name']]['achieved'] = 0;\n }\n foreach ($Arr as $k => $v) {\n $final[$k] = array_merge($model, $Arr[$k]['split']);\n }\n foreach ($empList as $val) {\n $Arr[$val]['Total'] = $this->generate_rep_each_emp($val, $from, $to, $field);\n foreach ($Arr[$val]['Total'] as $key => $value) {\n $final[$val]['Total'] = $value;\n }\n }\n foreach ($empList as $emp) {\n $this->db->select('employe_table_employe_name');\n $inter = $this->db->get_where(\"employe_table\", array('employe_table_employe_id' => $emp))->result_array();\n $empName[$emp] = $inter[0];\n }\n\n foreach ($empName as $key => $pair) {\n $final[$empName[$key]['employe_table_employe_name']] = $final[$key];\n unset($final[$key]);\n }\n $this->db->order_by('model_name', 'ASC');\n\n foreach ($modelList as $k => $m)\n foreach ($m as $key => $value) { {\n $final['Dealership'][$value]['achieved'] = 0;\n $final['Dealership'][$value]['target'] = 'Not Applicable ';\n }\n }\n\n $final['Dealership']['Total']['target'] = 'Not Applicable ';\n $final['Dealership']['Total']['achieved'] = $this->db->from(\"rtl_daily_rep\")->where('Inv_Dt >=', $from)->where('Inv_Dt <=', $to)\n ->count_all_results();\n foreach ($modelList as $k => $m) {\n foreach ($m as $key => $value) {\n $final['Dealership'][$value]['achieved'] = $this->db->from(\"rtl_daily_rep\")->where('Inv_Dt >=', $from)->where('Inv_Dt <=', $to)\n ->where(array('Model' => $value))\n ->count_all_results();\n }\n }\n\n\n\n return $final;\n }", "public function report_sales_pdf() {\n $tenant_id = $this->tenant_id;\n foreach ($this->reportsModel->get_sales_executive($tenant_id)->result() as $item) {\n $executive[$item->user_id] = $item->user_name;\n }\n\n $sales_exec = $this->input->get('sales_exec');\n $non_sales_exec = $this->input->get('non_sales_exec');\n if (!empty($sales_exec)) {\n $sales_exec = $sales_exec;\n } else if (!empty($non_sales_exec)) {\n $sales_exec = $non_sales_exec;\n }\n\n\n\n $sales_comm_result = $this->reportsModel->get_sales_comm('pdf', $tenant_id, $records_per_page, $offset, $field, $order_by, $sales_exec);\n $comm_due_periods = $this->reportsModel->get_comm_due_period($tenant_id, $sales_exec);\n $year_arr = array(1 => 'Jan', 2 => 'Feb', 3 => 'Mar', 4 => 'Apr',\n 5 => 'May', 6 =>\n 'Jun', 7 => 'Jul', 8 => 'Aug', 9 => 'Sep',\n 10 => 'Oct', 11 => 'Nov', 12 => 'Dec');\n $periods = array();\n foreach ($comm_due_periods as $val) {\n $periods[$val->sales_exec_id] .= $year_arr[$val->comm_period_mth] . ' ' . $val->comm_period_yr . \", \";\n }\n $tenant_details = $this->classTraineeModel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n $this->load->helper('pdf_reports_helper');\n return sales_reports_pdf($sales_comm_result, $periods, $tenant_details, $executive);\n }", "function genrate_inspectorvehiclehistorypdf($columnsValues,$data,$allconstants,$profile,$toDate=null,$fromDate=null,$vc_customer_name,$vehiclelicno=null) {\n\t \n\t\t$columnwidtharrays = array(10,30,26,26,23,18,20,20,16);\n\t\t\n\t\t$heightdynamic =8;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vc_customer_name) && !empty($vc_customer_name)) ){\n\n\t\t\t$x= $this->GetX();\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+125);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(25, 8, 'Customer Name :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(39, 8, $vc_customer_name,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t\t$x = $this->GetX();\t\t\t\n\t\t\t$y = $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Register No. : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(164, 8, $vehiclelicno,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(164 ,8, '',0,'','L',true);\t\t\t\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t}\n\t}\n\t\t\n\t$c=0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\n\t\t if( $c == 0){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\n\t\t\n\t\t$this->SetFont('Arial', '', 5);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\tforeach ($data as $val) {\n\t\t\n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $vc_customer_name =\t\tucfirst($val['CustomerProfile']['vc_customer_name']);\n\t\t $vc_vehicle_lic_no =\t\t$val['VehicleDetail']['vc_vehicle_lic_no'];\n\t\t $vc_vehicle_reg_no =\t\t$val['VehicleDetail']['vc_vehicle_reg_no'];\n\t\t $dt_created_date =\t\tdate('d M Y', strtotime($val['VehicleDetail']['dt_created_date']));\n\t\t $vc_prtype_name =\t\t$val['VEHICLETYPE']['vc_prtype_name'];\n\t\t $vc_v_rating =\t\tnumber_format($val['VehicleDetail']['vc_v_rating']);\n\t\t $vc_dt_rating =\t\tnumber_format($val['VehicleDetail']['vc_dt_rating']);\n\t\t $vc_rate =\t\tnumber_format($val['VehicleDetail']['vc_rate'],2,'.',',');\n\t\t\t\n\t\t\t$font_size=7;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$alignvalue='C';\n\t\t\t\n\t\t\t$col[] = array('text' => $i+1, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_customer_name, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_lic_no, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_reg_no, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_created_date, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$col[] = array('text' => $vc_prtype_name, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$alignvalue='R';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_v_rating, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$col[] = array('text' => $vc_dt_rating, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$col[] = array('text' =>$vc_rate, 'width' =>$columnwidtharrays[8], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t}\n\t}", "function profile_download($report_for, $organizer_id, $event_id) {\n switch ($report_for) {\n case 'All':\n $get_data = $this->model->get_download_analytics('All', $event_id);\n $excel_column = \" Type \\t From Attendee Type \\t From Name \\t Designation \\t Company Name \\t To Attendee Type \\t To Name / Session Name \\t Designation \\t Company Name\\t Created \\n\";\n if ($get_data) {\n foreach ($get_data as $att) {\n $download_type = $this->get_download_type($att['type']);\n $sender_type = $this->get_user_type($att['sender_type']);\n $receiver_type = $this->get_user_type($att['receiver_type']);\n if ($download_type == 'Event Map') {\n $excel_column .= $download_type . \"\\t\" . $sender_type . \"\\t\" . $att['sender_name'] . \"\\t\" . $att['sender_designation'] . \"\\t\" .\n $att['sender_company'] . \"\\t\" . '-' . \"\\t\" . '-' . \"\\t\" .\n '-' . \"\\t\" . '-' . \"\\t\" . $att['created_date'] . \"\\n\";\n } else {\n if ($download_type == 'Session Profile') {\n $excel_column .= $download_type . \"\\t\" . $sender_type . \"\\t\" . $att['sender_name'] . \"\\t\" . $att ['sender_designation'] . \"\\t\" .\n $att['sender_company'] . \"\\t\" . 'Session' . \"\\t\" . $att['session_name'] . \"\\t\" .\n '-' . \"\\t\" . '-' . \"\\t\" . $att['created_date'] . \"\\n\";\n } else {\n $excel_column .= $download_type . \"\\t\" . $sender_type . \"\\t\" . $att['sender_name'] . \"\\t\" . $att['sender_designation'] . \"\\t\" .\n $att['sender_company'] . \"\\t\" . $receiver_type . \"\\t\" . $att['receiver_name'] . \"\\t\" .\n $att['receiver_designation'] . \"\\t\" . $att['receiver_company'] . \"\\t\" . $att['created_date'] . \"\\n\";\n }\n }\n }\n }\n $this->download_excel('All_profile_download_report', $excel_column);\n\n break;\n case 'download_evt_map':\n $get_data = $this->model->get_download_analytics('download_evt_map', $event_id);\n $excel_column = \" Type \\t From Attendee Type \\t From Name \\t Designation \\t Company Name \\t Created \\n\";\n if ($get_data) {\n foreach ($get_data as $att) {\n $download_type = $this->get_download_type($att['type']);\n $sender_type = $this->get_user_type($att['sender_type']);\n $receiver_type = $this->get_user_type($att['receiver_type']);\n $excel_column .= $download_type . \"\\t\" . $sender_type . \"\\t\" . $att['sender_name'] . \"\\t\" . $att ['sender_designation'] . \"\\t\" .\n $att ['sender_company'] . \"\\t\" . $att['created_date'] . \"\\n\";\n }\n }\n $this->download_excel('profile_download_event_map_report', $excel_column);\n break;\n case 'download_ses_map':\n $get_data = $this->model->get_download_analytics('download_ses_map', $event_id);\n $excel_column = \" Type \\t From Attendee Type \\t From Name \\t Designation \\t Company Name \\t Session Name \\t Created \\n\";\n if ($get_data) {\n foreach ($get_data as $att) {\n $download_type = $this->get_download_type($att['type']);\n $sender_type = $this->get_user_type($att['sender_type']);\n $receiver_type = $this->get_user_type($att['receiver_type']);\n $excel_column .= $download_type . \"\\t\" . $sender_type . \"\\t\" . $att['sender_name'] . \"\\t\" . $att ['sender_designation'] . \"\\t\" .\n $att['sender_company'] . \"\\t\" . $att['session_name'] . \"\\t\" . $att['created_date'] . \"\\n\";\n }\n }\n $this->download_excel('profile_download_session_report', $excel_column);\n break;\n case 'download_exh_pro':\n $get_data = $this->model->get_download_analytics('download_exh_pro', $event_id);\n $excel_column = \" Type \\t From Attendee Type \\t From Name \\t Designation \\t Company Name \\t To Attendee Type \\t To Name / Session Name \\t Designation \\t Company Name\\t Created \\n\";\n if ($get_data) {\n foreach ($get_data as $att) {\n $download_type = $this->get_download_type($att['type']);\n $sender_type = $this->get_user_type($att['sender_type']);\n $receiver_type = $this->get_user_type($att['receiver_type']);\n $excel_column .= $download_type . \"\\t\" . $sender_type . \"\\t\" . $att['sender_name'] . \"\\t\" . $att ['sender_designation'] . \"\\t\" .\n $att['sender_company'] . \"\\t\" . 'Exhibitor' . \"\\t\" . $att['receiver_name'] . \"\\t\" .\n $att ['receiver_designation'] . \"\\t\" . $att['receiver_company'] . \"\\t\" . $att['created_date'] . \"\\n\";\n }\n }\n $this->download_excel('profile_download_exhibitor_report', $excel_column);\n break;\n case 'download_exe_pro':\n //*************************************************** Speaker *******************************\n $get_data = $this->model->get_download_analytics('download_exe_pro', $event_id);\n $excel_column = \" Type \\t From Attendee Type \\t From Name \\t Designation \\t Company Name \\t To Attendee Type \\t To Name / Session Name \\t Designation \\t Company Name\\t Created \\n\";\n if ($get_data) {\n foreach ($get_data as $att) {\n $download_type = $this->get_download_type($att['type']);\n $sender_type = $this->get_user_type($att['sender_type']);\n $receiver_type = $this->get_user_type($att['receiver_type']);\n $excel_column .= $download_type . \"\\t\" . $sender_type . \"\\t\" . $att['sender_name'] . \"\\t\" . $att ['sender_designation'] . \"\\t\" .\n $att['sender_company'] . \"\\t\" . 'Speaker' . \"\\t\" . $att['receiver_name'] . \"\\t\" .\n $att ['receiver_designation'] . \"\\t\" . $att['receiver_company'] . \"\\t\" . $att['created_date'] . \"\\n\";\n }\n }\n $this->download_excel('profile_download_speaker_report', $excel_column);\n\n break;\n }\n }", "public function actionOutputStatistical()\n {\n\t\tset_time_limit(0);\n $searchModel = new AttendanceCheckinReportsSearch();\n $dataProvider = $searchModel->statistictalSearch(Yii::$app->request->queryParams);\n\t\t \n\t\t$sort = Yii::$app->request->queryParams['sort']?Yii::$app->request->queryParams['sort']:'signdate';\n\t\t\n\t\tif($sort{0}==\"-\"){\n\t\t\t$orderBy = substr($sort,1).\" desc\";\n\t\t}else{\n\t\t\t$orderBy = \" {$sort} ASC\";\n\t\t}\n\t\t$result = $dataProvider->query->orderBy($orderBy)->asArray()->all();\n $arr = []; \n foreach($result as $r) {\n $arr[] = $r;\n }\n\t\t$header = [\n 'year' => '年', \n 'month' => '月', \n 'personnel_id' => '员工ID', \n 'username' => '员工姓名', \n 'overtime' => '当月加班时长(计算)', \n 'overtime_valid' => '当月加班时长(有效)', \n ];\n\t\t$columns = array_keys($header);\n \\moonland\\phpexcel\\Excel::export([\n 'isMultipleSheet' => true,\n\t\t\t'models' => [\n\t\t\t\t'考勤统计' => $arr, \n\t\t\t],\n\t\t\t'columns' => [\n\t\t\t\t'考勤统计' => $columns,\n\t\t\t], \n\t\t\t'headers' => [\n\t\t\t\t'考勤统计' => $header, \n\t\t\t],\n ]);\n }", "public function getdistringsubject()\n\t{\n\t\t$this->db->distinct();\n\t\t$this->db->select('gen_type');\n\t\t$this->db->order_by('gen_type', 'asc');\n\t\t$query=$this->db->get('admission_erp');\n\t\treturn $query->result();\n\t}", "public function create_coursework_scenario(){\n \n $da = function($c,$r){\n return array('cols'=>$c, 'rows'=>$r);\n };\n \n $tables = array(\n 'ucourse' =>'enrol_ues_courses',\n 'user' =>'user',\n 'ustu' =>'enrol_ues_students',\n 'usem'=>'enrol_ues_semesters',\n 'usect' =>'enrol_ues_sections',\n 'course' =>'course',\n 'ctx' =>'context',\n 'ra' =>'role_assignments',\n 'log' =>'log',\n 'g' =>'groups',\n 'gm' =>'groups_members',\n 'mgi' =>'grade_items',\n 'mgg' =>'grade_grades',\n 'mgc' =>'grade_categories',\n 'quiz' =>'quiz',\n 'qatt' =>'quiz_attempts' \n );\n \n \n//--------------------------------------------------------------------//\n//----------------------------- enrollment ITEMS ---------------------//\n//--------------------------------------------------------------------//\n\n foreach(array_keys($tables) as $t){\n ${\"{$t}_rows\"} = array();\n }\n\n \n \n \n $date = new DateTime('today');\n $now = $date->getTimestamp();\n $current_semester = array(\n 'id' =>5,\n 'year' =>strftime('%Y', $now),\n 'name' =>'Current',\n 'campus' =>'LSU',\n 'session_key' =>null,\n 'classes_start' =>$now-(86400*21),\n 'grades_due' =>$now+(86400*14)\n ); //end two weeks ahead\n \n $enr1 = array(\n 'cid' => '1234',\n 'idnumber' => 'COURSE001_SPRING',\n 'usectid' => '4321',\n 'semester' => $current_semester,\n 'ucourseid' => 1,\n 'ucourse_fname' => 'COURSE001',\n 'ucourse_dept' => 'COURSE',\n 'ucourse_num' => 4001,\n 'usect_num' => 003\n );\n\n $user1 = array(9541,'student-3','exampleuser','[email protected]',700188683,'student-3');\n\n $enrol = function($user, $enrollments) \n use(&$usem_rows,\n &$ucourse_rows,\n &$ustu_rows,\n &$usect_rows,\n &$course_rows,\n &$ctx_rows,\n &$ra_rows,\n &$user_rows)\n {\n $user_rows[] = $user;\n foreach($enrollments as $e){\n $usem_rows[] = array_values($e['semester']);\n \n $flag = false;\n foreach($ucourse_rows as $r){\n if($r[0] == $e['ucourseid']){\n $flag = true;\n }\n }\n if(!$flag) $ucourse_rows[] = array($e['ucourseid'],$e['ucourse_fname'],$e['ucourse_dept'],$e['ucourse_num']);\n \n $flag = false;\n foreach($ustu_rows as $r){\n if($r[0] == $user[0].$e['usectid']){\n $flag = true;\n }\n }\n if(!$flag) $ustu_rows[] = array($user[0].$e['usectid'],$user[0], $e['usectid'],3,'Enrolled');\n \n $flag = false;\n foreach($usect_rows as $r){\n if($r[0] == $e['usectid']){\n $flag = true;\n }\n }\n if(!$flag) $usect_rows[] = array($e['usectid'],$e['idnumber'],$e['cid'],$e['semester']['id'],$e['usect_num']);\n \n \n \n $flag = false;\n foreach($course_rows as $r){\n if($r[0] == $e['cid']){\n $flag = true;\n }\n }\n if(!$flag) $course_rows[] = array($e['cid'],$e['idnumber']);\n \n $flag = false;\n foreach($ctx_rows as $r){\n if($r[0] == $e[cid].$user[0]){\n $flag = true;\n }\n }\n if(!$flag) $ctx_rows[] = array($e['cid'].$user[0],50,$e['cid']);\n \n $ra_rows[] = array(count($ra_rows)+1,5,$user[0],'contextid',$e['cid'].$user[0]);\n \n }\n };\n \n $enrol($user1,array($enr1));\n\n \n //ues semesters\n $usem_rows = $ucourse_rows = $usect_rows = $ustu_rows = array();\n $user_rows = $course_rows = $ctx_rows = $groups = $groups_members = array();\n \n $usem_cols = array('id','year','name','campus','session_key','classes_start','grades_due');\n $usem_rows[] = array(5,2013,'Spring','LSU',null,1358143200,time()+(86400*14)); //end two weeks ahead\n \n //ues_courses\n $ucourse_cols = array('id', 'fullname', 'department', 'cou_number');\n $ucourse_rows[] = array(2656,'BIOL1335','BIOL', 1335);\n $ucourse_rows[] = array(3613,'AGRI4009','AGRI', 4009);\n \n //ues_students\n $ustu_cols = array('id', 'userid', 'sectionid', 'credit_hours', 'status');\n $ustu_rows[] = array(1415, 465, 7227, 5, 'enrolled');\n $ustu_rows[] = array(5442, 465, 743, 4, 'enrolled');\n $ustu_rows[] = array(4861, 9584, 743, 5, 'enrolled');\n $ustu_rows[] = array( 452, 8251, 743, 5, 'enrolled');\n $ustu_rows[] = array(1413, 9541, 743, 5, 'enrolled');\n \n //ues sections\n $usect_cols = array('id','idnumber','courseid','semesterid','sec_number');\n $usect_rows[] = array(7227,'BIOL13356099',2656, 5, '006');\n $usect_rows[] = array(743,'AGRI40095354',3613,5,'009');\n \n //mdl_courses\n $course_cols = array('id','idnumber');\n $course_rows[] = array(2326,'BIOL13356099');\n $course_rows[] = array(9850,'AGRI40095354');\n \n //mdl_context\n $ctx_cols = array('id','contextlevel','instanceid');\n $ctx_rows[] = array(2042,50,2326);\n $ctx_rows[] = array(333,50,9850);\n $ctx_rows[] = array(334,50,3613);\n \n //mdl_role_asignment\n $ra_cols = array('id','roleid','userid','contextid');\n $ra_rows[] = array(1,5,465,2042);\n $ra_rows[] = array(2,5,465,333);\n $ra_rows[] = array(3,5,8251,2042);\n $ra_rows[] = array(4,5,8251,333);\n $ra_rows[] = array(5,3,999,2042);\n $ra_rows[] = array(6,4,555,2042);\n $ra_rows[] = array(7,3,5566,2042);\n $ra_rows[] = array(8,5,9854,334);\n \n //mdl_user\n $user_cols = array('id','firstname','lastname','email', 'idnumber','username');\n $user_rows[] = array(999, 'teacher-0','exampleuser','[email protected]',666777555,'teacher-0');\n $user_rows[] = array(5566,'teacher-1','exampleuser','[email protected]',666777545,'teacher-1');\n $user_rows[] = array(555, 'coach-0', 'exampleuser', '[email protected]',123777555,'coach-0');\n $user_rows[] = array(9584,'student-2','exampleuser','[email protected]',253071515,'student-2');\n $user_rows[] = array(9541,'student-3','exampleuser','[email protected]',700188683,'student-3');\n \n //user id 465 is in 2 sections\n $user_rows[] = array(465, 'student-0','exampleuser','[email protected]',472725024,'student-0');\n\n //user id 8251 has only one section\n $user_rows[] = array(8251,'student-1','exampleuser','[email protected]',163360288,'student-1');\n\n //mdl_groups\n $g_cols = array('id','courseid','name');\n $g_rows[] = array(666,2326,'control-01');\n $g_rows[] = array(667,2326,'control-02');\n $g_rows[] = array(7,2326,'control-02');\n \n //mdl_groups_members\n $gm_cols = array('id','groupid','userid','timeadded');\n $gm_rows[] = array(45,666,465,1358143200);\n $gm_rows[] = array(46,666,8251,1358143200);\n $gm_rows[] = array(47,666,999,1358143200);\n $gm_rows[] = array(48,666,555,1358143200);\n $gm_rows[] = array(49,667,5566,1358143200);\n \n \n //mdl_log\n $log_cols = array('id','time','userid','course', 'action');\n //note that log_rows is populated by a dedicated function \n $log_rows = $this->generate_activity_sequence();\n \n //--------------------------------------------------------------------//\n //----------------------------- coursework ITEMS ---------------------//\n //--------------------------------------------------------------------//\n \n /**\n * grade tables: grade_item, grade_categories, grade_grades\n */\n $mgi_cols = array('id','courseid', 'itemtype', 'itemmodule', 'iteminstance', 'aggregationcoef', 'categoryid');\n $mgc_cols = array('id','fullname','courseid', 'timecreated','timemodified');\n $mgg_cols = array('finalgrade', 'userid', 'itemid');\n \n $mgi_rows = $mgc_rows = $mgg_rows = array();\n \n $mgi_rows[] = array(1,2326,'mod','quiz',1,1,9);\n $mgc_rows[] = array(432,'categ fullname',9, time()-rand(100,10000),time());\n $mgg_rows[] = array(95,465,1);\n \n \n /**\n * Tables required: quiz, quiz_attempts\n * Dependencies: grade item with `itemmodule = 'quiz'`\n */\n $quiz_rows = $qatt_rows = array();\n \n $quiz_cols = array('id','intro','name','timeclose','grade','course','questions');\n $quiz_rows[] = array(1,'intro-test-1','quiz-test-1',time()+rand(0,100000), 100, 2326,'question dfjkskjgf');\n $quiz_rows[] = array(2,'intro-test-2','quiz-test-2',time()+rand(0,100000), 10, 2326, 'question 1 gfshsf');\n\n $qatt_cols = array('id','quiz', 'timefinish', 'layout');\n $qatt_rows[] = array(84,1,time()-10, 'default layout (reqd field)');\n \n //build xml file\n $xdoc = new DOMDocument();\n $root = $xdoc->createElement('dataset');\n foreach($tables as $table_key => $table_name){\n $t = $xdoc->createElement('table');\n $t->setAttribute('name', $table_name);\n// mtrace($table_key);\n foreach(${$table_key.'_cols'} as $tc){\n $column = $xdoc->createElement('column', $tc);\n $t->appendChild($column);\n }\n foreach(${$table_key.'_rows'} as $tr=>$vals){\n// mtrace($table_key);\n $row = $xdoc->createElement('row');\n foreach($vals as $v){\n $value = $xdoc->createElement('value', $v);\n $row->appendChild($value);\n }\n $t->appendChild($row);\n }\n $root->appendChild($t);\n }\n $xdoc->appendChild($root);\n return $xdoc;\n }", "public function finalreportcreate() {\n $supervisaornames = DB::select(\"SELECT name,id \n\t\t FROM panelmembers\n\t\t WHERE id = any (SELECT supervisorId \n\t\t FROM projects\n\t\t WHERE status = 'Approved')\");\n\n /* Get all group ids */\n $groupids = DB::select(\"SELECT groupID \n\t\t FROM research_groups\");\n\n /* Get all student actual id acording to the auto generated id */\n $studentid = DB::select(\"SELECT id,regId \n\t\t FROM students\n\t\t WHERE id = any (SELECT studentId \n\t\t FROM projects\n\t\t WHERE status = 'Approved')\");\n\n /* filtering projects according to the groups */\n $students = DB::select(\"SELECT id,title,studentId,supervisorId \n\t\t FROM projects\n\t\t WHERE status = 'Approved' and groupID = any (SELECT groupID \n\t\t FROM research_groups)\");\n\n $los = DB::table('settings')->first();\n\n return view('supevaluation.finalreportevaluation', compact('students', 'supervisaornames', 'studentid', 'groupids', 'los'));\n }" ]
[ "0.77966917", "0.6952219", "0.6225241", "0.59348047", "0.5846901", "0.58378285", "0.5793984", "0.5739033", "0.57314277", "0.5726573", "0.57134396", "0.57125956", "0.57031906", "0.56990755", "0.5669414", "0.563711", "0.5636193", "0.56284374", "0.56207716", "0.55699575", "0.55605674", "0.55554706", "0.55425525", "0.5519224", "0.550124", "0.54917026", "0.5476998", "0.5474807", "0.546664", "0.54573965", "0.54520994", "0.54453206", "0.5440688", "0.5422574", "0.5407494", "0.53855795", "0.5368656", "0.5332244", "0.5329854", "0.5326656", "0.53214926", "0.5315664", "0.5309336", "0.5306264", "0.5297455", "0.5294414", "0.52728575", "0.5257381", "0.52440166", "0.5238002", "0.52369577", "0.5236191", "0.5228277", "0.52177674", "0.52127266", "0.5200895", "0.52006674", "0.51978236", "0.51902235", "0.51838565", "0.51831764", "0.51824075", "0.5171246", "0.51587427", "0.5148056", "0.5144116", "0.51332057", "0.5130593", "0.5121949", "0.5121931", "0.51203895", "0.5115132", "0.51051843", "0.5104685", "0.50927687", "0.50917876", "0.5079269", "0.50769544", "0.50672936", "0.506214", "0.50620526", "0.506102", "0.5059193", "0.5053505", "0.5052489", "0.505219", "0.5047334", "0.5043904", "0.5043012", "0.5042259", "0.5041396", "0.5040356", "0.5035429", "0.5034755", "0.50328207", "0.5032718", "0.503076", "0.5030204", "0.5020836", "0.5017159" ]
0.79717195
0
End Action controllers for generating attendance report Start Action controllers for generating remarks report generate_subject_code_remarks_report function. commit 10/12/2018
public function generate_subject_code_remarks_report(){ $this->crud->credibilityAuth(array('Administrator','Registrar','Faculty')); // get inputs $con = array('subject_code'=>$this->input->post('subject_code'),'batch_year'=> $this->input->post('batch_year_id')); $range1 = $this->input->post('date_range1'); $range2 = $this->input->post('date_range2'); // get necessary report data $students = $this->admin_model->getStudentsBasicInfo($con,'a'); $attendance = $this->admin_model->getStudentAttendanceBySubjectCode($range1,$range2,$con['subject_code'],$con['batch_year']); $att_record = $this->admin_model->getStudentSubjectCodeAttendanceRecord($students,$range1,$range2,$con['subject_code'],$con['batch_year']); $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date'); // generate report data in pdf or csv format from admin_report_model if((!empty($con['subject_code']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){ if(!empty($attendance) && !empty($att_record)){ if($this->input->post('export_csv')){ $this->admin_report_model->generateStudentRemarksReportBySubjectCodeCsv($attendance,$att_record,$att_dates,$con,$range1,$range2); exit; }else if($this->input->post('export_pdf')){ $this->admin_report_model->generateSubjectCodeAttendanceReportPdf($attendance,$con,$range1,$range2); } } $this->session->set_flashdata('warning', 'No reports found!.'); }else{ $this->session->set_flashdata('danger', 'Invalid input.'); } redirect('attendance_report'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generate_subject_code_attendance_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar','Faculty'));\n // get inputs\n $con = array('subject_code'=>$this->input->post('subject_code'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $students = $this->admin_model->getStudentsBasicInfo($con,'a');\n $attendance = $this->admin_model->getStudentAttendanceBySubjectCode($range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_record = $this->admin_model->getStudentSubjectCodeAttendanceRecord($students,$range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($con['subject_code']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance) && !empty($att_record)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentAttendanceBySubjectCodeCsv($attendance,$att_record,$att_dates,$con,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateSubjectCodeAttendanceReportPdf($attendance,$con,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n }else{\n $this->session->set_flashdata('danger', 'Invalid input.');\n }\n redirect('attendance_report');\n }", "public function generate_voc_program_attendance_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar'));\n // get inputs\n $condition= array('vocational_program'=>$this->input->post('vocational_program'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $voc_program= $this->vocational_program_model->getVocationalPrograms('s',array('voc_program_id'=>$condition['vocational_program']));\n $students = $this->admin_model->getStudentsBasicInfo($condition,'a');\n $attendance = $this->admin_model->getStudentAttendanceByVocationalProgram($students,$range1,$range2,$condition['batch_year']);\n $att_record = $this->admin_model->getStudentDailyAttendanceRecord($students,$range1,$range2,$condition['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($condition['vocational_program']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentAttendanceByVocationalProgramCsv($attendance,$att_record,$att_dates,$voc_program,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateVocProgramAttendanceReportPdf($attendance,$voc_program,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n redirect('attendance_report');\n }\n $this->session->set_flashdata('danger', 'Invalid input.');\n redirect('attendance_report');\n \n }", "public function generate_acknowledgement() {\n \n $clsid = $this->input->post('cls');\n $crsid = $this->input->post('crs');\n $usrid = $this->input->post('usr');\n $ack_data = $this->payments_model->get_acknowledgement_data($clsid, $crsid, $usrid);\n\n $tanant = $this->courses_model->get_tenant_details();\n \n //sankar code starts here\n //resetting classroom location parameter id with category name\n $ack_data[classroom_location] = $this->meta_data[$ack_data[classroom_location]];\n $ack_data[cert_level] = $this->meta_data[$ack_data[certi_level]];\n //sankar code ends here\n $gender = ($ack_data['gender'] == 'MALE') ? 'Mr. ' : 'Ms. ';\n $Url = base_url() . 'payments/print_ack';\n\n $date = date('M d Y');\n $startdate = date('M d Y, l', strtotime($ack_data[class_start_datetime])) . ' @ ' . date('h:i A', strtotime($ack_data[class_start_datetime]));\n \n /* skm code start for remark.\n reporting time skm start bcoz of sam request for AOP(67) on 18-may-17*/\n $time = strtotime($ack_data[class_start_datetime]);\n $reporting_time = date(\"H:i A\", strtotime('-30 minutes', $time));\n if($crsid == 67 || $crsid == 121)\n {\n $li = \"Report at center at $reporting_time to register for class\";\n }else{\n $li = \"Report at center at 8:30 AM to register for class\";\n }\n /* end */\n $tenant_id = TENANT_ID;\n if($tenant_id == 'T12')\n { \n $name = $tanant->contact_name;\n }else{\n\n $name = $gender. $ack_data[crse_manager][first_name] . ' ' . $ack_data[crse_manager][last_name];\n }\n \n $message3 = '\n <ol>\n <li>All participants please bring along their photo ID card with either their Nric/Fin number stated upon class date.</li>\n <li>Your NRIC, work permit or will be photocopied on the class date</li>\n <li>Trim finger nails and remove nail polish</li>\n <li>'.$li.'</li>\n </ol>';\n /* skm end */\n \n echo '<form action=\"' . $Url . '\" method=\"post\"><p> \n <a class=\"close-modal \" rel=\"modal:close\" href=\"#close-modal\">Close</a>\n\t\t\t <h2 class=\"panel_heading_style\">Booking Acknowledgment</h2>\t\t\t \n\t\t\n\t\t\t Your seat has been temporarily booked. Please pay the class fees on or before the class start date.\n\t\t\tTemporary booking for <b>' . $ack_data[first_name] . ' ' . $ack_data[last_name] . ' </b> for <b> Course:\"' . $ack_data[crse_name] . ',Class:' . $ack_data[class_name] . ',Certificate Code:' . $ack_data[cert_level] . ' </b>\".</i><br>\n\t\t\t </br><strong>Class start date:</strong> ' . $startdate . '<br>\n\t\t\t </br><strong>Location:</strong> ' . $ack_data[classroom_location] . '<br>\n\t\t\t</br><strong>Contact Details:</strong> ' . $name . ',(Phone: ' . $tanant->tenant_contact_num . ',Email Id: ' . $tanant->tenant_email_id . ')\n </br><strong>Remark:</strong> ' . $message3 . '<br>\n <input type=\"hidden\" value=\"' . $clsid . '\" name=\"classId\"/>\n <input type=\"hidden\" value=\"' . $crsid . '\" name=\"courseId\"/>\n <input type=\"hidden\" value=\"' . $usrid . '\" name=\"userId\"/> \n <input type=\"hidden\" value=\"' . $ack_data . '\" name=\"ackdata\"/>\n <div style=\"clear:both;\"></div><br>\t\t\t \n\t\t\t <span style=\"float:right;\">\n\t\t\t<button class=\"btn btn-primary\" type=\"submit\">Print</button>\n\t\t\t </p></form> ';\n }", "function attendance_report() {\n if ($this->session->userdata('parent_login') != 1)\n redirect(base_url(), 'refresh');\n $student_id = $student_id = $this->session->userdata('parent_id');\n if ($this->input->post('month') != '' && $this->input->post('year') != '') {\n $page_data['month'] = $this->input->post('month');\n $page_data['year'] = $this->input->post('year');\n } else {\n $page_data['month'] = '';\n $page_data['year'] = '';\n }\n $page_data['student'] = $this->db->get_where('student', array('student_id' => $student_id))->row()->name;\n $page_data['student_id'] = $student_id;\n $page_data['page_name'] = 'attendance_report';\n $image = $this->db->get_where('student', array('student_id' => $student_id))->row()->image;\n $image_url = $this->crud_model->get_image_url('student', $image);\n $page_data['parent_page_title'] = \"<img src='$image_url'\" . 'class=\"img-circle\"' . 'width=\"40\"' . \"/>\" . $page_data['student'];\n $page_data['page_title'] = $page_data['student'];\n $this->load->view('backend/index', $page_data);\n }", "public function dtexamattemptreport()\n {\n $condition = \"\";\n $search_type = $this->input->post('search_type');\n $date_type = $this->input->post('date_type');\n $date_from = $this->input->post('date_from');\n $date_to = $this->input->post('date_to');\n $data['searchlist'] = $this->customlib->get_searchtype();\n $data['date_type'] = $this->customlib->date_type();\n\n $data['date_typeid'] = '';\n if (isset($search_type) && $search_type != '') {\n $dates = $this->customlib->get_betweendate($search_type);\n $data['search_type'] = $search_type;\n } else {\n $dates = $this->customlib->get_betweendate('this_year');\n $data['search_type'] = '';\n }\n\n $start_date = date('Y-m-d', strtotime($dates['from_date']));\n $end_date = date('Y-m-d', strtotime($dates['to_date']));\n\n $data['label'] = date($this->customlib->getSchoolDateFormat(), strtotime($start_date)) . \" \" . $this->lang->line('to') . \" \" . date($this->customlib->getSchoolDateFormat(), strtotime($end_date));\n\n if (isset($_POST['date_type']) && $_POST['date_type'] != '') {\n\n $data['date_typeid'] = $_POST['date_type'];\n\n if ($search_type == 'exam_from_date') {\n\n $condition .= \" and date_format(onlineexam.exam_from,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n\n } elseif ($date_type == 'exam_to_date') {\n $condition .= \" and date_format(onlineexam.exam_to,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n }\n\n } else {\n\n $condition .= \" and date_format(onlineexam.created_at,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n\n }\n\n $result = $this->onlineexam_model->onlineexamatteptreport($condition);\n $sch_setting = $this->sch_setting_detail;\n $resultlist = json_decode($result);\n $dt_data = array();\n\n if (!empty($resultlist->data)) {\n foreach ($resultlist->data as $resultlist_key => $student_value) {\n\n $exams = explode(',', $student_value->exams);\n\n $exam_name = '';\n $exam_from = '';\n $exam_to = '';\n $exam_duration = '';\n $exam_publish = \"\";\n $exam_resultpublish = \"\";\n $exam_publishprint = \"\";\n $exam_resultpublishprint = \"\";\n foreach ($exams as $exams_key => $exams_value) {\n $exam_details = explode('@', $exams_value);\n\n if (count($exam_details) == 9) {\n\n $exam_name .= $exam_details[1];\n $exam_from .= date($this->customlib->getSchoolDateFormat(), $this->customlib->dateYYYYMMDDtoStrtotime($exam_details[3]));\n $exam_to .= date($this->customlib->getSchoolDateFormat(), $this->customlib->dateYYYYMMDDtoStrtotime($exam_details[4]));\n $exam_duration .= $exam_details[5];\n $exam_publish .= ($exam_details[7] == 1) ? \"<i class='fa fa-check-square-o'></i>\" : \"<i class='fa fa-exclamation-circle'></i>\";\n $exam_resultpublish .= ($exam_details[8] == 1) ? \"<i class='fa fa-check-square-o'></i>\" : \"<i class='fa fa-exclamation-circle'></i>\";\n\n $exam_publishprint .= ($exam_details[7] == 1) ? \"<span style='display:none'>Yes</span>\" : \"<span style='display:none'>No</span>\";\n $exam_resultpublishprint .= ($exam_details[8] == 1) ? \"<span style='display:none'>Yes</span>\" : \"<span style='display:none'>No</span>\";\n\n $exam_name .= '<br>';\n $exam_from .= \"<br>\";\n $exam_to .= \"<br>\";\n $exam_duration .= \"<br>\";\n $exam_publish .= \"<br>\";\n $exam_resultpublish .= \"<br>\";\n $exam_publishprint .= \"<br>\";\n $exam_resultpublishprint .= \"<br>\";\n }\n }\n\n $row = array();\n $row[] = $this->customlib->getFullName($student_value->firstname, $student_value->middlename, $student_value->lastname, $sch_setting->middlename, $sch_setting->lastname);\n $row[] = $student_value->admission_no;\n\n $row[] = $student_value->class;\n $row[] = $student_value->section;\n $row[] = $exam_name;\n $row[] = $exam_from;\n $row[] = $exam_to;\n $row[] = $exam_duration;\n $row[] = $exam_publish . $exam_publishprint;\n $row[] = $exam_resultpublish . $exam_resultpublishprint;\n\n $dt_data[] = $row;\n }\n\n }\n $json_data = array(\n \"draw\" => intval($resultlist->draw),\n \"recordsTotal\" => intval($resultlist->recordsTotal),\n \"recordsFiltered\" => intval($resultlist->recordsFiltered),\n \"data\" => $dt_data,\n );\n echo json_encode($json_data);\n }", "public function tms_report() {\n $data['sideMenuData'] = fetch_non_main_page_content();\n if (!empty($_POST)) {\n\n\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n if ($_POST['payStatus'] == '1') {\n $payment_status = \"PAID','PARTPAID\";\n $displayText = \"Total Amount Received for Paid invoices :\";\n $export_url = '?payStatus=1';\n } else if ($_POST['payStatus'] == '2') {\n $payment_status = \"NOTPAID','PARTPAID\";\n $displayText = \"Total Amount Due for unpaid invoices :\";\n $export_url = '?payStatus=2';\n }\n $data['text'] = $displayText;\n $year = $_POST['yearVal'];\n $month = $_POST['monthVal'];\n $training_score1 = $_POST['trainingStatus'];\n $export_url .='&yearVal=' . $year . '&monthVal=' . $month;\n if ($training_score1 == '1') {\n $training_score = 'C';\n } else if ($training_score1 == '2') {\n $training_score = \"NYC','2NYC\";\n } else if ($training_score1 == '3') {\n $training_score = 'ABS';\n } else if ($training_score1 == '4') {\n $training_score = \"C','NYC','2NYC\";\n }\n\n $export_url .= '&trainingStatus=' . $training_score1;\n $temp_data = array();\n if ($_POST['payStatus'] == '1') {\n $data['result'] = $this->reportsModel->tms_paid_report($tenant_id, $payment_status, $year, $month, $training_score);\n } else if ($_POST['payStatus'] == '2') {\n $data['result'] = $this->reportsModel->tms_unpaid_report($tenant_id, $payment_status, $year, $month, $training_score);\n }\n }\n $data['page_title'] = 'TMS Reports';\n $data['export_url'] = $export_url;\n $data['main_content'] = 'reports/tms_report';\n $this->load->view('layout', $data);\n }", "public function mark_attendance($message = NULL) {\n $data['sideMenuData'] = fetch_non_main_page_content();\n $tenant_id = $this->tenant_id;\n $course_id = $this->input->post('course_id');\n $class_id = $this->input->post('class_id');\n $subsidy = $this->input->post('subsidy');\n $sort_by = $this->input->get('b');\n $sort_order = $this->input->get('o');\n $class_details = $this->class->get_class_by_id($tenant_id, $course_id, $class_id);\n \n $from_date = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);///added by shubhranshu\n $to_date = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);//added by shubhranshu\n $week_start_date = parse_date($this->input->post('week_start'), CLIENT_DATE_FORMAT);//added by shubhranshu\n //echo print_r($from_date);print_r($to_date);print_r($week_start_date);exit;\n \n $week = $this->input->post('week');\n $export = $this->input->post('export');\n $export1 = $this->input->post('export1');\n $this->load->helper('attendance_helper');\n if (!empty($export)) \n {\n $class_details = $this->class->get_class_details_for_report($tenant_id, $course_id, $class_id);\n $class_start = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);\n $class_end = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);\n if (empty($class_start))\n $class_start = new DateTime();\n if (empty($class_end))\n $class_end = new DateTime();\n $class_schedule = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $class_schedule_data = array();\n foreach ($class_schedule as $row) {\n $session_arr = array('S1' => '1', 'BRK' => '3', 'S2' => '2');\n $class_schedule_data[date('d/m/y', strtotime($row['class_date']))][$session_arr[$row['session_type_id']]] = date('h:i A', strtotime($row['session_start_time']));\n }\n \n if ($export == 'xls') \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $this->load->helper('export_helper');\n export_attendance($results, $class_details, $class_start, $class_end, $class_schedule_data);\n } \n else \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $tenant_details = $this->classtraineemodel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n\t\t$mark_count = $this->classtraineemodel->get_rows_count($course_id,$class_id);\n \n if ($export == 'xls_week'){\n $this->load->helper('export_helper');\n return generate_class_attendance_sheet_xls($results, $class_details, $class_start, $class_end, $tenant_details, $class_schedule_data);\n }\n $this->load->helper('pdf_reports_helper');\n if ($export == 'pdf') {\n //return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data, $mark_count);\n //print_r($results);exit;\n return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data,$mark_count); // removed mark count by shubhranshu\n \n } else if ($export == 'pdf_week') {\n return generate_class_attendance_sheet_pdf($results, $class_details, $tenant_details, $class_schedule_data);\n }\n }\n \n } \n else \n {\n if($export1=='lock')\n { \n $lock_msg=$this->classtraineemodel->lock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\", \"Succesfully Locked.\");\n }else{\n $this->session ->set_flashdata(\"error\",\"Something went wrong while locking.\");\n }\n }else if($export1=='unlock'){\n $lock_msg=$this->classtraineemodel->unlock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\",\"Succesfully Unocked\");\n }else{\n $this->session->set_flashdata(\"error\",\"Somthing went wrong while Unlocking !\");\n \n }\n }\n \n \n $data = get_data_for_renderring_attendance($tenant_id, $course_id, $class_id, $subsidy, $from_date, $to_date, $week_start_date, $week, $sort_by, $sort_order,'');\n \n $data['class_schedule'] = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $att = $this->classtraineemodel->get_attendance_lock_status($tenant_id,$course_id, $class_id);\n $data['lock_status']=$att->lock_status;\n $data['class_start_datetime']=$att->class_start_datetime;\n\t\t\t$data['user'] = $this->user;\n\t\t\t$data['controllerurl'] = 'class_trainee/mark_attendance';\n $data['page_title'] = 'Class Trainee Enrollment - Mark Attendance';\n $data['main_content'] = 'classtrainee/markattendance';\n //$data['week_start'] = $from_date;\n //$data['sideMenuData'] = $this->sideMenu;\n if (!empty($message))\n $data['message'] = $message;\n $this->load->view('layout', $data);\n }\n }", "function genrate_assessmenthistory_pdf($columnsValues,$data,$vehicletype,$allconstants,$profile,$toDate=null,$fromDate=null,$vehiclelicno=null) {\n\t\n\t\t$columnwidtharrays = array(9,15,15,14,15,14,13,12,13,27,12,17,13);\n\t\t\n\t\t$heightdynamic = 8;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vehicletype) && !empty($vehicletype)) || \n\t\t(isset($vehiclelicno) && !empty($vehiclelicno))){\n\n\t\t\t$x= $this->GetX();\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+125);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($vehicletype) && !empty($vehicletype))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Type :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vehicletype) && !empty($vehicletype))\n\t\t\t$this->MultiCell(39, 8, $allconstants[$vehicletype],0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t\t$x= $this->GetX();\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Register No. : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(164, 8, $vehiclelicno,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(164, 8, '',0,'','L',true);\n\t\t\t$this->Ln(2);\n\t\t\t//vehiclelicno\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n\t\t\n\t\t$c=0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\n\t\t if( $c == 0 || $c == 8 || $c == 10 || $c == 11 || $c == 12 ){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 16, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\t\t\n\t\t\n\t\t$this->SetFont('Arial', '', 6);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t foreach ($data as $val) {\n\t\t \n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $dt_created_date =\tdate('d M Y', strtotime($val['AssessmentVehicleDetail']['dt_created_date']));\n\t\t $vc_assessment_no =\t$val['AssessmentVehicleDetail']['vc_assessment_no'];\n\t\t $vc_vehicle_lic_no =\t$val['AssessmentVehicleDetail']['vc_vehicle_lic_no'];\n\t\t $vc_vehicle_reg_no = \t$val['AssessmentVehicleDetail']['vc_vehicle_reg_no'];\n\t\t $vc_prtype_name =\t$val['VehicleDetail']['VEHICLETYPE']['vc_prtype_name'];\n\t\t\t$vc_pay_frequency = \t$val['AssessmentVehicleDetail']['vc_pay_frequency'];\n\t\t $vc_prev_end_om =\tnumber_format($val['AssessmentVehicleDetail']['vc_prev_end_om']);\n\t\t $vc_end_om =\tnumber_format($val['AssessmentVehicleDetail']['vc_end_om']);\n\t\t $vc_km_travelled = \t\tnumber_format($val['AssessmentVehicleDetail']['vc_km_travelled']);\n\t\t $vc_rate = \t\t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_rate'],2,'.',',');\n\t\t $vc_payable = \t\t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_payable'],2,'.',',');\n\t\t $vc_status =\t\t$allconstants[$val['AssessmentVehicleMaster']['vc_status']];\n\n\t\t\t$font_size = 6;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$alignvalue='C';\n\t\t\t\n\t\t\t$col[] = array('text' => $i+1, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_created_date, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $vc_assessment_no, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_lic_no, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_reg_no, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prtype_name, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_pay_frequency, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prev_end_om, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_end_om, 'width' =>$columnwidtharrays[8], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_km_travelled, 'width' =>$columnwidtharrays[9], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_rate, 'width' =>$columnwidtharrays[10], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_payable, 'width' =>$columnwidtharrays[11], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_status, 'width' =>$columnwidtharrays[12], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function download_in_pdf($seq_no)\n\t{\n\t\t$this->load->model('statement_header_model');\n\t\t// $this->load->library('m_pdf');\n\t\t$this->load->model('transactions_model');\n\t\t$statement = $this->statement_header_model->get_statement($seq_no);\n\t\t$start_date = $statement[0]->START_DATE;\n\t\t$end_date = $statement[0]->END_DATE;\n\t\t$internal_key = $statement[0]->INTERNAL_KEY;\n\t\t$data['statement'] = $statement[0];\n\n\t\t// return print_r($statement);\n\t\t$data['transactions'] = $this->transactions_model\n\t\t\t\t->get_trans_history($start_date,$end_date,$internal_key);\n\n\t\t$data['start_date'] = $this->formatDate($start_date);\n\t\t$data['end_date'] = $this->formatDate($end_date);\n\n\n\t\t $this->load->helper('dompdf');\n\t\t $html = $this->load->view('transactions/view_statement2', $data, true);\n \t return pdf_create($html, 'eStatement as of '.$start_date. ' to' .$end_date);\n\t}", "function genrate_inspectorassessmenthistory_pdf($columnsValues,$data,$allconstants,$profile,$toDate=null,$fromDate=null,$vc_customer_name,$vehiclelicno=null) {\n\t\n\t\t$columnwidtharrays = array(7,15,15,15,14,16,\n\t\t 12,13,12,12,21,11,\n\t\t\t\t\t\t\t\t 15,12);\n\t\t\n\t\t$heightdynamic = 8;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vc_customer_name) && !empty($vc_customer_name)) ){\n\n\t\t\t$x = $this->GetX();\t\t\t\n\t\t\t$y = $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\t\t\t\n\t\t\t$this->SetX($x+125);\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(25, 8, 'Customer Name :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(39, 8, ucfirst($vc_customer_name),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t\t$x = $this->GetX();\t\t\t\n\t\t\t$y = $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Register No.: ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(164, 8, $vehiclelicno,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(164, 8, '',0,'','L',true);\n\t\t\t\n\t\t\t//$vehiclelicno\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t}\n\t}\n\t\t\n\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\n\t\t$c=0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\n\t\t\tif($c==10){\n\t\t\t\n\t\t\t\t$this->SetFont('Arial', 'B', 5);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif( $c == 9 || $c == 11 || $c == 13 || $c == 12){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 16, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\t\t\n\t\t\n\t\t$this->SetFont('Arial', '', 5);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\tforeach ($data as $val) {\n\t\t\n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $vc_customer_name = \tucfirst($val['AssessmentVehicleMaster']['vc_customer_name']);\n\t\t $dt_created_date=\t\tdate('d M Y', strtotime($val['AssessmentVehicleDetail']['dt_created_date']));\n\t\t $vc_assessment_no=\t\t$val['AssessmentVehicleDetail']['vc_assessment_no'];\n\t\t $vc_vehicle_lic_no= \t$val['AssessmentVehicleDetail']['vc_vehicle_lic_no'];\n\t\t $vc_vehicle_reg_no=\t\t$val['AssessmentVehicleDetail']['vc_vehicle_reg_no'];\n\t\t\t$vc_prtype_name = \t\t$val['VehicleDetail']['VEHICLETYPE']['vc_prtype_name'];\n\t\t $vc_pay_frequency = \t$val['AssessmentVehicleDetail']['vc_pay_frequency'];\n\t\t $vc_prev_end_om = \t\tnumber_format($val['AssessmentVehicleDetail']['vc_prev_end_om']);\n\t\t $vc_end_om = \t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_end_om']);\n\t\t $vc_km_travelled = \t\tnumber_format($val['AssessmentVehicleDetail']['vc_km_travelled']);\n\t\t $vc_rate =\t\t\t \tnumber_format($val['AssessmentVehicleDetail']['vc_rate'],2,'.',',');\n\t\t $vc_payable =\t\t\tnumber_format($val['AssessmentVehicleDetail']['vc_payable'],2,'.',',');\n\t\t $vc_status =\t\t\t$allconstants[$val['AssessmentVehicleMaster']['vc_status']];\n\n\t\t\t$font_size = 6;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$alignvalue='C';\n\t\t\t\n\t\t\t$col[] = array('text' => $i+1, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_customer_name, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $dt_created_date, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_assessment_no, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_lic_no, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_reg_no, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prtype_name, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_pay_frequency, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prev_end_om, 'width' =>$columnwidtharrays[8], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_end_om, 'width' =>$columnwidtharrays[9], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_km_travelled, 'width' =>$columnwidtharrays[10], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$col[] = array('text' => $vc_rate, 'width' =>$columnwidtharrays[11], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_payable, 'width' =>$columnwidtharrays[12], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_status, 'width' =>$columnwidtharrays[13], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t}\n\t\n\t}", "public function genattpdf($getatt){\n\t\t$data['getatt']=$getatt;\n\t\t\tforeach($getatt as $row){\n\t\t\t\t$asmid=$row->ca_asmid;\n\t\t\t\t$centerid=$row->ca_centername;\n\t\t\t\t$cname = $this->commodel->get_listspfic1('admissionstudent_enterenceexamcenter','eec_name','eec_id',$centerid)->eec_name;\n\t\t\t\t$year=date('Y');\n \t \t// move file to directory code for photo\n\t\t\t\t$desired_dir = 'uploads/SLCMS/enterenceadmin_student/'.$year;\n \t// Create directory if it does not exist\n \tif(is_dir($desired_dir)==false){\n \t\tmkdir(\"$desired_dir\", 0700);\n \t}\n\n \t \t$desired_dir = 'uploads/SLCMS/enterenceadmin_student/'.$year.'/attendence';\n \t// Create directory if it does not exist\n \tif(is_dir($desired_dir)==false){\n \t\tmkdir(\"$desired_dir\", 0700);\n \t\t }\n\n\t\t\t\t$this->acadyear = $this->usermodel->getcurrentAcadYear();\n\t\t\t\t\t\t\n\t\t\t\t//add pdf code to store and view pdf file\n\t\t\t\t$temp = $this->load->view('enterenceadmin/attendencepdf', $data, TRUE);\n\t\t\t\t//$pth='uploads/SLCMS/enterenceadmin_student/'.$year.'/attendence/'.$cname.'.pdf';\n\t\t\t\t$pth='uploads/SLCMS/enterenceadmin_student/'.$year.'/attendence/'.$centerid.'.pdf';\n\t\t\t\t$this->commodel->genpdf($temp,$pth);\n\t\t\t\t$master = array(\n\t\t \t\t'ca_attendencesheetstatus' => 'Y',\n\t \t \t\t);\n \t\t\t\t$this->commodel->updaterec('admissionstudent_centerallocation', $master,'ca_asmid',$asmid);\n\t\t\t\t$this->logger->write_logmessage(\"update\", \"Attendence sheet status update yes in admissionstudent_centerallocation\");\n \t\t$this->logger->write_dblogmessage(\"update\", \"Attendence sheet status update yes in admissionstudent_centerallocation\" );\n\t\t\t}\n\t}", "public function export_tms_report() {\n set_time_limit(0);\n ini_set(\"memory_limit\", \"-1\");\n if (!empty($_GET)) {\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n if ($_GET['payStatus'] == '1') {\n $payment_status = \"PAID','PARTPAID\";\n } else if ($_GET['payStatus'] == '2') {\n $payment_status = \"NOTPAID','PARTPAID\";\n }\n $data['text'] = $displayText;\n $year = $_GET['yearVal'];\n $month = $_GET['monthVal'];\n $training_score1 = $_GET['trainingStatus'];\n\n if ($training_score1 == '1') {\n $training_score = 'C';\n } else if ($training_score1 == '2') {\n $training_score = \"NYC','2NYC\";\n } else if ($training_score1 == '3') {\n $training_score = 'ABS';\n } else if ($training_score1 == '4') {\n $training_score = \"C','NYC','2NYC\";\n }\n\n\n if ($_GET['payStatus'] == '1') {\n $result = $this->reportsModel->tms_paid_report($tenant_id, $payment_status, $year, $month, $training_score);\n } else if ($_GET['payStatus'] == '2') {\n $result = $this->reportsModel->tms_unpaid_report($tenant_id, $payment_status, $year, $month, $training_score);\n }\n }\n\n $this->load->helper('export_helper');\n export_tms_report_page($result);\n }", "public function generate()\n {\n $reportType = Input::get('report_type');\n $from = Input::get('from');\n $to = Input::get('to');\n $disciplineId = Input::get('discipline');\n $info = explode(',', Input::get('info'));\n $id = $info[1];\n $type = $info[0];\n $license = array_key_exists(2, $info) ? $info[2] : '0';\n\n $from = empty($from) ? null : date('Y-m-d', strtotime($from));\n $to = empty($to) ? null : date('Y-m-d', strtotime($to));\n \n if (! $reportType) {\n Flash::danger('Please select a <strong>Report Type</strong>.');\n return Redirect::route('reports.index')->withInput();\n }\n\n if (empty($from)) {\n Flash::danger('Please enter a <strong>From Date</strong> to generate report.');\n return Redirect::route('reports.index')->withInput();\n }\n\n // all route params\n $routeParams = [$disciplineId, $type, $id, $license, $from, $to];\n\n switch ($reportType) {\n case 'site_summary':\n return Redirect::route('reports.site_summary', $routeParams);\n break;\n\n case 'scheduled_exams':\n return Redirect::route('reports.scheduled_exams', $routeParams);\n break;\n\n case 'retake_summary':\n return Redirect::route('reports.retake_summary', $routeParams);\n break;\n\n case 'skills_detail':\n return Redirect::route('reports.skills_detail', $routeParams);\n break;\n\n case 'knowledge_detail':\n return Redirect::route('reports.knowledge_detail', $routeParams);\n break;\n\n case 'pass_fail':\n // if admin / agency / staff show a page to select facility and instructor\n /*if(Auth::user()->ability(['Admin', 'Staff', 'Agency'], []))\n {\n return Redirect::route('reports.select_facility', [$from, $to]);\n }*/\n\n // Otherwise just show the regular pass/fail report\n return Redirect::route('reports.pass_fail', $routeParams);\n break;\n\n default:\n Flash::warning('This report type is not yet supported.', 'Warning');\n return Redirect::route('reports.index');\n\n }\n }", "public function overallSubjectAnalysis($slug)\n {\n \n $user = User::getRecordWithSlug($slug);\n if($isValid = $this->isValidRecord($user))\n return redirect($isValid); \n \n if(!isEligible($slug))\n return back();\n\n $records = array();\n $records = ( new App\\QuizResult())->getOverallSubjectsReport($user);\n if(!$records)\n {\n flash('Ooops..!','No Records available', 'overlay'); \n return back();\n }\n $color_correct = getColor('background',rand(00,9999));\n $color_wrong = getColor('background', rand(00,9999));\n $color_not_attempted = getColor('background', rand(00,9999)); \n $i=0;\n $labels = [];\n $dataset = [];\n $dataset_label = [];\n $bgcolor = [];\n $border_color = [];\n \n $marks_labels = [getPhrase('correct'), getPhrase('wrong'), getPhrase('not_answered')];\n $time_labels = [getPhrase('time_spent_on_correct_answers'), getPhrase('time_spent_on_wrong_answers')];\n\n foreach($records as $record) {\n $record = (object)$record;\n \n //Marks\n $subjects_display[$i]['subject_name'] = $record->subject_name;\n $subjects_display[$i]['correct_answers'] = $record->correct_answers;\n $subjects_display[$i]['wrong_answers'] = $record->wrong_answers;\n $subjects_display[$i]['not_answered'] = $record->not_answered;\n\n // Time\n $subjects_display[$i]['time_spent_on_correct_answers'] = $record->time_spent_on_correct_answers;\n $subjects_display[$i]['time_spent_on_wrong_answers'] = $record->time_spent_on_wrong_answers;\n $subjects_display[$i]['time_to_spend'] = $record->time_to_spend;\n $subjects_display[$i]['time_spent'] = $record->time_spent;\n\n \n $marks_dataset = [$record->correct_answers, $record->wrong_answers, $record->not_answered];\n $time_dataset = [$record->time_spent_on_correct_answers, $record->time_spent_on_wrong_answers];\n $dataset_label = $record->subject_name;\n \n $bgcolor = [$color_correct,$color_wrong,$color_not_attempted];\n \n $border_color = [$color_correct,$color_wrong,$color_not_attempted];\n\n \n $marks_data['type'] = 'pie'; \n //horizontalBar, bar, polarArea, line, doughnut, pie\n $marks_data['title'] = $record->subject_name; \n\n $marks_data['data'] = (object) array(\n 'labels' => $marks_labels,\n 'dataset' => $marks_dataset,\n 'dataset_label' => $dataset_label,\n 'bgcolor' => $bgcolor,\n 'border_color' => $border_color\n );\n \n $data['chart_data'][] = (object)$marks_data;\n\n\n $time_data['type'] = 'bar'; \n //horizontalBar, bar, polarArea, line, doughnut, pie\n $time_data['title'] = $record->subject_name; \n\n $time_data['data'] = (object) array(\n 'labels' => $time_labels,\n 'dataset' => $time_dataset,\n 'dataset_label' => $dataset_label,\n 'bgcolor' => $bgcolor,\n 'border_color' => $border_color\n );\n \n $data['time_data'][] = (object)$time_data;\n\n $i++;\n } \n \n $data['chart_data'][] = (object)$marks_data;\n\n $overall_correct_answers = 0;\n $overall_wrong_answers = 0;\n $overall_not_answered = 0;\n\n $overall_time_spent_correct_answers = 0;\n $overall_time_spent_wrong_answers = 0;\n \n foreach($records as $r)\n {\n $r = (object)$r;\n $overall_correct_answers += $r->correct_answers;\n $overall_wrong_answers += $r->wrong_answers;\n $overall_not_answered += $r->not_answered;\n \n $overall_time_spent_correct_answers += $r->time_spent_on_correct_answers;\n $overall_time_spent_wrong_answers += $r->time_spent_on_wrong_answers;\n }\n\n $overall_marks_dataset = [$overall_correct_answers, $overall_wrong_answers, $overall_not_answered];\n $overall_time_dataset = [$overall_time_spent_correct_answers, $overall_time_spent_wrong_answers];\n\n $overall_marks_data['type'] = 'doughnut'; \n //horizontalBar, bar, polarArea, line, doughnut, pie\n $overall_marks_data['title'] = getPhrase('overall_marks_analysis');\n $overall_marks_data['data'] = (object) array(\n 'labels' => $marks_labels,\n 'dataset' => $overall_marks_dataset,\n 'dataset_label' => getPhrase('overall_marks_analysis'),\n 'bgcolor' => $bgcolor,\n 'border_color' => $border_color\n );\n\n $data['right_bar_path'] = 'student.exams.subject-analysis.right-bar-performance-chart';\n $data['right_bar_data'] = array('right_bar_data' => (object)$overall_marks_data);\n \n $data['overall_data'][] = (object)$overall_marks_data;\n \n $data['subjects_display'] = $records;\n $data['active_class'] = 'analysis';\n $data['title'] = getPhrase('overall_subject_wise_analysis');\n $data['user'] = $user;\n $userid = $user->id;\n $data['layout'] = getLayout();\n\n return view('student.exams.subject-analysis.subject-analysis', $data); \n }", "public function mailReportAction(){\r\n \t\t\r\n \t\t/**\r\n \t\t * get form id\r\n \t\t */\r\n \t\t$form_id = $this->getAttribute('form_id');\r\n \t\t\r\n \t\t/**\r\n \t\t * set page url array\r\n \t\t */\r\n \t\t$url_array = array(\r\n \t\t\t$this->module_name, $this->action_name,\r\n \t\t\t'form_id', make_id($form_id),\r\n \t\t);\r\n \t\t\r\n \t\t/**\r\n \t\t * get page number from url and set attribute\r\n \t\t */\r\n \t\t$page_no = $this->getUrlParam('page');\r\n \t\t\r\n \t\t/**\r\n \t\t * set page number to 1 if page number is empty and assign to view\r\n \t\t */\r\n \t\tif (empty($page_no)){\r\n \t\t\t$page_no = 1;\r\n \t\t}else {\r\n \t\t\tif (is_numeric($page_no))\r\n \t\t\t\tarray_push($url_array, 'page',$page_no);\r\n \t\t}\r\n \t\t$this->viewAssign('page_no', $page_no);\r\n \t\t\r\n \t\t/**\r\n \t\t * get page limit from parameter\r\n \t\t */\r\n \t\t$limit = $this->getUrlParam('limit');\r\n \t\tif (is_numeric($limit))\r\n \t\t\t$this->setAttribute('limit', $limit);\r\n \t\t\r\n \t\t/**\r\n \t\t * if page limit is empty set page limit and assign to view\r\n \t\t */\t\r\n \t\tif (empty($limit)){\r\n \t\t\t$limit = ADMIN_DISP;\r\n \t\t}else {\r\n \t\t\tif (is_numeric($limit))\r\n \t\t\t\tarray_push($url_array, 'limit', $limit);\r\n \t\t}\r\n \t\t$this->viewAssign('limit', $limit);\r\n \t\t\r\n \t\t/**\r\n \t\t * set paging offset\r\n \t\t */\r\n \t\t$offset = ($page_no-1) * $limit;\r\n \t\t\r\n \t\t/**\r\n \t\t * set number to dispaly list number on view\r\n \t\t */\r\n \t\t$this->viewAssign('number', (($page_no-1)*$limit));\r\n \t\t\r\n \t\t/**\r\n\t\t * get form mail list\r\n\t\t */\r\n \t\t$list = $this->db_model->getFormMailList($form_id, $limit, $offset);\r\n \t\t\r\n \t\t/**\r\n \t\t * page view list assign to view\r\n \t\t */\r\n \t\t$this->viewAssign('list', $list);\r\n \t\t \t\t\r\n \t\t/**\r\n \t\t * if show all in one page\r\n \t\t */\r\n\t\tif ($limit == 'all'){\r\n \t\t\t$limit = 0;\r\n \t\t\t$this->viewAssign(\"paging\",'<li><span>1</span></li>');\r\n \t\t}else {\r\n \t\t\t\r\n \t\t\t/**\r\n \t\t\t * get paging html, previous, next page info and assign to view\r\n \t\t \t */\r\n \t\t\t$page_class = new PageClass($total_rows, $page_no, $limit);\r\n \t\t\t$this->viewAssign('prev', $page_class->isPrev());\r\n\t\t\t$this->viewAssign('prev_pn', $page_no-1);\r\n\t\t\t$this->viewAssign('next', $page_class->isNext());\r\n\t\t\t$this->viewAssign('next_pn', $page_no+1);\r\n\t\t\t$link_url = $this->self_url.'/'.$this->action_name.'/form_id/'.make_id($form_id).'/limit/'.$limit;;\r\n\t\t\t$paging = $page_class->DisPage($link_url);\r\n\t\t\t$this->viewAssign(\"paging\",$paging);\r\n\t\t}\r\n \t\t\r\n\t\t\r\n \t\t$this->setDisplay('report');\r\n \t\t\r\n \t}", "public function reportMonthlyAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportMonthlyAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "public function generate_ack_receipt() {\n $clsid = $this->input->post('cls');\n $crsid = $this->input->post('crs');\n $userid = $this->input->post('usr');\n $invoice_id = $this->input->post('invoice');\n $ack_data = $this->payments_model->get_acknowledgement_data($clsid, $crsid, $userid);\n\n $sfc_amount= $this->payments_model->get_sfc_details($invoice_id);\n if(!empty($sfc_amount['othr_mode_of_payment'])){ \n $other_mod_of_payment= \" & Other Mode Of Payment : ($ \".number_format($sfc_amount['other_amount_recd'],2,'.','').\")\";}\n else{\n $other_mod_of_payment=\"\";\n }\n if(($sfc_amount['sfc_claimed']>0))\n { \n $mod = 'Mode of payment: '.$sfc_amount['mode_of_pymnt'].'($ '.number_format($sfc_amount['sfc_claimed'],2,'.','').')'.''.$other_mod_of_payment;\n }else\n {\n $mod = 'Mode of payment: '.$sfc_amount['mode_of_pymnt'].'($ '.number_format($sfc_amount['amount_recd'],2,'.','').')'.''.$other_mod_of_payment;\n }\n //resetting classroom location parameter id with category name\n $ack_data[classroom_location] = $this->meta_data[$ack_data[classroom_location]];\n\n $ack_data[cert_level] = $this->meta_data[$ack_data[certi_level]];\n\n $tanant = $this->courses_model->get_tenant_details();\n $gender = ($ack_data['gender'] == 'MALE') ? 'Mr. ' : 'Ms. ';\n $date = date('M d Y', strtotime($ack_data['inv_date']));\n $logourl = base_url() . 'logos/' . $this->session->userdata(public_tenant_details)->Logo;\n $startdate = date('M d Y, l', strtotime($ack_data[class_start_datetime])) . ' @ ' . date('h:i A', strtotime($ack_data[class_start_datetime]));\n $Url = base_url() . 'payments/print_receipt';\n echo ' <form action=\"' . $Url . '\" method=\"post\"><p>\n \n <h2 class=\"panel_heading_style\">Payment Receipt</h2><br><a class=\"close-modal \" rel=\"modal:close\" href=\"#close-modal\">Close</a>\n <table width=\"100%\"> \n <tbody>\n <tr>\n <td rowspan=\"4\"><img src=\"' . $logourl . '\" border=\"0\" /></td>\n <td colspan=\"2\">' . $tanant->tenant_name . '</td>\n <td class=\"td_heading\">Receipt No.:</td>\n <td>' . date('Y') . '' . $ack_data['invoice_id'] . '</td>\n </tr>\n <tr>\n <td colspan=\"2\">' . $tanant->tenant_address, $tanant->tenant_city . '</td>\n <td class=\"td_heading\">Receipt Date:</td>\n <td>' . $date . '</td>\n </tr>\n <tr>\n <td colspan=\"4\"></td>\n </tr>\n <tr>\n <td colspan=\"4\">' . $tanant->tenant_contact_num . '</td>\n </tr>\n \n </tbody>\n </table><br>\n \n <p><font style=\"font-size:14px; font-weight:bold;\">Received</font> with thanks SGD ' . $ack_data[total_inv_amount] . ' from <b>' \n . $ack_data[first_name] . ' ' . $ack_data[last_name] . ' </b> for <b> Course: \"' . $ack_data[crse_name] . ' ,Class: '\n . $ack_data[class_name] . ' Certificate Code:' . $ack_data[cert_level] . '</b>\". '.$mod.'</p>\n\n <table class=\"table table-bordered\">\n \n <tbody>\n <tr>\n <td class=\"td_heading\">Class Start Date:</td>\n <td>' . $startdate . '</td>\n </tr>\n \n <tr>\n <td class=\"td_heading\">Location:</td>\n <td>' . $ack_data[classroom_location] . '</td>\n </tr>\n \n <tr>\n <td class=\"td_heading\">Contact Details:</td>\n <td>' . $gender . $ack_data[crse_manager][first_name] . ' ' . $ack_data[crse_manager][last_name] . '(Phone:' . $tanant->tenant_contact_num . ',Email Id: ' . $tanant->tenant_email_id . ')\n <input type=\"hidden\" value=\"' . $clsid . '\" name=\"classId\"/>\n <input type=\"hidden\" value=\"' . $crsid . '\" name=\"courseId\"/> \n <input type=\"hidden\" value=\"' . $userid . '\" name=\"userId\"/>\n </tr>\n </tbody>\n </table>\n \n <p>\n\n</br><p class=\"red\"><i>This is a computer generated receipt and does not require a seal or signature.</i></p>\n\n<div style=\"clear:both;\"></div><br>\n<span style=\"float:right;\">\n<button id=\"print_ack_receipt\" class=\"btn btn-primary\" type=\"submit\">Print</button>\n</p> </form> ';\n }", "public function reportMonthlyClassWiseAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportMonthlyClassWiseAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "function report() {\n if ($this->session->userdata('role') == 550 || $this->session->userdata('role') == 551) {\n if (!empty($_POST)) {\n if (isset($_POST['type'])) {\n $data['accompagnatore'] = $this->input->post('txtAccompagnatore');\n $data['collaboratore'] = $this->input->post('txtCollaboratore');\n $data['prodotto'] = $this->input->post('txtProdotto');\n $data['codice_prodotto'] = $this->input->post('txtCodiceProdotto');\n $data['passeggero'] = $this->input->post('txtPasseggero');\n $data['tipologia_passeggero'] = $this->input->post('selTipologiaPasseggero');\n $data['glf'] = $this->input->post('selGlf');\n\n $getData = array('accompagnatore' => $data['accompagnatore'], 'collaboratore' => $data['collaboratore'], 'prodotto' => $data['prodotto'], 'codice_prodotto' => $data['codice_prodotto'], 'passeggero' => $data['passeggero'], 'tipologia_passeggero' => $data['tipologia_passeggero'], 'glf' => $data['glf']);\n\n $resultData = $this->webservicemodel->getReportData($getData);\n if ($resultData) {\n $exportData = array();\n foreach ($resultData as $record) {\n $total_due = $record[\"costo_base\"] + $record[\"importo_tasse_volo\"] + $record[\"importo_aeroporto_aggiuntivo\"] + $record[\"supplementi\"];\n $balance = round(( $total_due - $record[\"pagamenti\"]), 2);\n\n $exportRecord = array(\n 'Accompagnatore' => $record['accompagnatore'],\n 'Collaboratore' => $record['collaboratore'],\n 'Prodotto' => $record['prodotto'],\n 'Codice Prodotto' => $record['codice_prodotto'],\n 'Passeggero' => $record['passeggero'],\n 'Tipologia Passeggero' => $record['tipologia_passeggero'],\n 'Total Due' => $total_due,\n 'Balance' => $balance\n );\n array_push($exportData, $exportRecord);\n }\n $this->load->library('export');\n $this->export->to_excel($exportData, 'webservicereport');\n } else\n redirect('webservice');\n }\n else {\n $data['title'] = 'plus-ed.com | Webservice data report';\n $data['breadcrumb1'] = 'Webservice management';\n $data['breadcrumb2'] = 'Webservice data report';\n $data['accompagnatore'] = $this->input->post('txtAccompagnatore');\n $data['collaboratore'] = $this->input->post('txtCollaboratore');\n $data['prodotto'] = $this->input->post('txtProdotto');\n $data['codice_prodotto'] = $this->input->post('txtCodiceProdotto');\n $data['passeggero'] = $this->input->post('txtPasseggero');\n $data['tipologia_passeggero'] = $this->input->post('selTipologiaPasseggero');\n $data['glf'] = $this->input->post('selGlf');\n\n $getData = array('accompagnatore' => $data['accompagnatore'], 'collaboratore' => $data['collaboratore'], 'prodotto' => $data['prodotto'], 'codice_prodotto' => $data['codice_prodotto'], 'passeggero' => $data['passeggero'], 'tipologia_passeggero' => $data['tipologia_passeggero'], 'glf' => $data['glf']);\n\n// $data['report_data'] = $this->webservicemodel->getReportData($getData);\n\n if (APP_THEME == \"OLD\")\n $this->load->view('plused_webservice_report_data', $data);\n else { // if(APP_THEME == \"LTE\")\n $data['pageHeader'] = $data['breadcrumb2'];\n $data['optionalDescription'] = \"\";\n $this->ltelayout->view('lte/reimbursement/webservice_report_data', $data);\n }\n }\n } else {\n $data['title'] = 'plus-ed.com | Webservice data report';\n $data['breadcrumb1'] = 'Webservice management';\n $data['breadcrumb2'] = 'Webservice data report';\n\n $data['tipologia_passeggero'] = $this->webservicemodel->getDistinctDataByField('tipologia_passeggero');\n $data['glf'] = $this->webservicemodel->getDistinctDataByField('glf');\n $data['accompagnatore'] = $this->webservicemodel->getDistinctDataByField('accompagnatore');\n $data['collaboratore'] = $this->webservicemodel->getDistinctDataByField('collaboratore');\n $data['codice_prodotto'] = $this->webservicemodel->getDistinctDataByField('codice_prodotto');\n\n if (APP_THEME == \"OLD\")\n $this->load->view('plused_webservice_report', $data);\n else { // if(APP_THEME == \"LTE\")\n $data['pageHeader'] = $data['breadcrumb2'];\n $data['optionalDescription'] = \"\";\n $this->ltelayout->view('lte/reimbursement/webservice_report', $data);\n }\n }\n } else {\n redirect('backoffice', 'refresh');\n }\n }", "public function actionReceipt_due_report(){\n\t\t$connection = Yii::app()->db; \n // return $cmdrow->queryAll();\n\t\t$connection = Yii::app()->db; \n\t\t$temp_projects_array = Yii::app()->session['projects_array'];\n\t\t$num_of_projects_counter = count($temp_projects_array);\t\n\t\t$num_of_projects_counter2 = $num_of_projects_counter;\n\t\t$sql1 = \"select * from projects where\";\n\t\t$num_of_projects_counter--;\n\t\twhile($num_of_projects_counter>-1)\n\t\t{\n\t\t\t$sql2[$num_of_projects_counter] = \" id=\".Yii::app()->session['projects_array'][$num_of_projects_counter]['project_id'];\n\t\t\t$num_of_projects_counter--;\n\t\t}\n\t\t\n\t\t$sql_project = $sql1;\n\t\t$sql_project = $sql_project.implode(' or',$sql2);\n\t\t$result_projects = $connection->createCommand($sql_project)->query() or mysql_error();\n\t //////////////////////////////////FUNCTION 3 END///////////////////////////////////////////\n\t $this->render('receipt_due_report',array('projects'=>$result_projects));\n\t\t}", "public function pcAttendance_report() {\n BackendMenu::setContext('Olabs.Oims', 'reports', 'pcattendance_report');\n $this->searchFormWidget = $this->createAttendanceSearchFormWidget();\n $this->pageTitle = 'Petty Contractor Attendance Report';\n $reports = array();\n\n $oimsSetting = \\Olabs\\Oims\\Models\\Settings::instance();\n\n $searchForm = $this->searchFormWidget;\n\n $this->vars['search'] = false;\n $this->vars['msg'] = false;\n $this->vars['searchFormWidget'] = $searchForm;\n $this->vars['reports'] = $reports;\n\n $this->vars['oimsSetting'] = $oimsSetting;\n }", "public function Mrrecord() {\n\n $concat_string = '';\n $ret_url = 'Mrrecord';\n if(!empty($this->input->get('page_id'))){\n $concat_string = '?page_id='.$this->input->get('page_id');\n }\n if(!empty($this->input->get('bpg'))){\n $ret_url = $this->input->get('bpg');\n }\n $title = 'Medical Records';\n if(!empty($this->input->get('ptl'))){\n $title = $this->input->get('ptl');\n }\n \n $breadcrumb_links[] = array('title' => $title,'link' => getUrl($ret_url).$concat_string);\n \n $data['breadcrumbs'] = $breadcrumb_links;\n $data['tail'] = 'Details';\n \n $data['page_title'] = \"Medical Records / Details\";\n \n $data['page_current'] = \"medical_record\";\n \n $inputData['patient_id'] = $this->input->get('pid');\n if(empty($inputData['patient_id'])){\n $inputData['patient_id'] = $this->input->post('pid');\n }\n \n $inputData['visit_id'] = $this->input->get('vid');\n $inputData['records'] = '';\n $inputData['offset'] = 0;\n\n $patientData = $this->medicalincidentHandler->getMedicalIncidentVisitDetails($inputData);\n \n if ($patientData['statusCode'] == 200) {\n //echo '<pre>'; print_r($patientData['response']['medicalIncidentVisitData']); echo '</pre>';\n $data['imgpath'] = $this->config->item('hff_media_path');\n $data['pdetails'] = $patientData['response']['patientData'][0];\n $data['userdata'] = $patientData['response']['userData'][0];\n// $data['userdata'] = (isset($patientData['response']['userData'][0]))?$patientData['response']['userData'][0]:null;\n $data['mivdata'] = $patientData['response']['medicalIncidentVisitData'];\n $data['feedback_ids'] = $patientData['response']['feedback_ids'];\n// $data['presc_options'] = $patientData['response']['presc_option_ids'];\n $data['visitid'] = $this->input->get('vid');\n $data['message'] = '';\n } else {\n $data['pdetails'] = '';\n $data['userdata'] = '';\n $data['mivdata'] = '';\n $data['message'] = STATUS_NO_DATA;\n// $data['message'] = $patientData['response']['message'];\n }\n// debugArray($data); exit;\n $data['content'] = \"doctor/doc_mr_number.php\";\n $template = 'templates/doctor_template';\n $this->load->view($template, $data);\n }", "public function makeReport()\n {\n }", "public function actionPdfRevisedratesreport()\n {\n $res = AllocationManager::getRevisedRatesData();\n $contents= $this->renderAjax('pdf-revised-rates-report',['res' => $res]);\n $pdf = Yii::$app->pdf;\n\n $pdf->generatePdf( \n $contents,\n null,\n 'Revised Rates Report for Evaluation of Questionnaire Reports',\n '|Page {PAGENO}|'.' '.\\Yii::$app->name,\n [\n 'orientation'=>\\kartik\\mpdf\\Pdf::ORIENT_LANDSCAPE\n ]);\n }", "public function reportDatewiseAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportDatewiseAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "public function reportDatewiseClassWiseAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportDatewiseClassWiseAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "public function tms_report_count() {\n $data['sideMenuData'] = fetch_non_main_page_content();\n if (!empty($_POST)) {\n\n\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n if ($_POST['pStatus'] == '1') {\n $payment_status = \"PAID','PARTPAID\";\n $displayTextCount = \"Total Paid Trainees : \";\n $export_url = '?pStatus=1';\n } else if ($_POST['pStatus'] == '2') {\n $payment_status = \"NOTPAID','PARTPAID\";\n $displayTextCount = \"Total Unpaid Trainees : \";\n $export_url = '?payStatus=2';\n }\n \n $year = $_POST['yVal'];\n $month = $_POST['mVal'];\n \n $training_score1 = $_POST['tStatus'];\n $export_url .='&yearVal=' . $year . '&monthVal=' . $month;\n if ($training_score1 == '1') {\n $training_score = 'C';\n } else if ($training_score1 == '2') {\n $training_score = \"NYC','2NYC\";\n } else if ($training_score1 == '3') {\n $training_score = 'ABS';\n } else if ($training_score1 == '4') {\n $training_score = \"C','NYC','2NYC\";\n }\n\n $export_url .= '&trainingStatus=' . $training_score1;\n $temp_data = array();\n if ($_POST['pStatus'] == '1') {\n $data_res = $this->reportsModel->tms_paid_report_count($tenant_id, $payment_status, $year, $month, $training_score);\n $paidVal1 = $this->calculate_paid($data_res);\n $count=count($data_res);\n $displayTextCount = 'Total Amount Received : ';\n } else if ($_POST['pStatus'] == '2') {\n $data_res = $this->reportsModel->tms_unpaid_report_count($tenant_id, $payment_status, $year, $month, $training_score);\n $amount_due = $data_res[0]->total_amount_due;\n $paidVal1 = $amount_due;\n $count=$data_res[0]->count;\n $displayTextCount = 'Total Amount Pending : ';\n } else if ($_POST['pStatus'] == '3'){\n $payment_status2 = \"PAID','PARTPAID\";\n $payment_status1 = \"NOTPAID','PARTPAID\";\n $data1_res = $this->reportsModel->tms_unpaid_report_count($tenant_id, $payment_status1, $year, $month, $training_score);\n $data2_res = $this->reportsModel->tms_paid_report_count($tenant_id, $payment_status2, $year, $month, $training_score);\n $amount_due = $data1_res[0]->total_amount_due;\n $paid_amout = $this->calculate_paid($data2_res);\n $count = ($data1_res[0]->count)+count($data2_res);\n $displayTextCount = \"Total Paid + Unpaid Amount : \";\n \n $paidVal1 =$amount_due + $paid_amout;\n \n }\n \n }\n \n $data['text1'] = 'Total Trainee: '.$count;\n $data['amount1'] = $displayTextCount.$paidVal1;\n $data['page_title'] = 'TMS Reports';\n $data['export_url'] = $export_url;\n $data['main_content'] = 'reports/tms_report';\n $this->load->view('layout', $data);\n }", "function generarRecibo15_txt() {\n $ids = $_REQUEST['ids'];\n $id_pdeclaracion = $_REQUEST['id_pdeclaracion'];\n $id_etapa_pago = $_REQUEST['id_etapa_pago'];\n//---------------------------------------------------\n// Variables secundarios para generar Reporte en txt\n $master_est = null; //2;\n $master_cc = null; //2;\n\n if ($_REQUEST['todo'] == \"todo\") { // UTIL PARA EL BOTON Recibo Total\n $cubo_est = \"todo\";\n $cubo_cc = \"todo\";\n }\n\n $id_est = $_REQUEST['id_establecimientos'];\n $id_cc = $_REQUEST['cboCentroCosto'];\n\n if ($id_est) {\n $master_est = $id_est;\n } else if($id_est=='0') {\n $cubo_est = \"todo\";\n }\n\n if ($id_cc) {\n $master_cc = $id_cc;\n } else if($id_cc == '0'){\n $cubo_cc = \"todo\";\n }\n //\n $dao = new PlameDeclaracionDao();\n $data_pd = $dao->buscar_ID($id_pdeclaracion);\n $fecha = $data_pd['periodo'];\n\n //---\n $dao_ep = new EtapaPagoDao();\n $data_ep = $dao_ep->buscar_ID($id_etapa_pago);\n ;\n\n $_name_15 = \"error\";\n if ($data_ep['tipo'] == 1):\n $_name_15 = \"1RA QUINCENA\";\n elseif ($data_ep['tipo'] == 2):\n $_name_15 = \"2DA QUINCENA\";\n endif;\n\n\n $nombre_mes = getNameMonth(getFechaPatron($fecha, \"m\"));\n $anio = getFechaPatron($fecha, \"Y\");\n\n\n $file_name = '01.txt';//NAME_COMERCIAL . '-' . $_name_15 . '.txt';\n $file_name2 = '02.txt';//NAME_COMERCIAL . '-BOLETA QUINCENA.txt';\n $fpx = fopen($file_name2, 'w');\n $fp = fopen($file_name, 'w');\n \n //..........................................................................\n $FORMATO_0 = chr(27).'@'.chr(27).'C!';\n $FORMATO = chr(18).chr(27).\"P\";\n $BREAK = chr(13) . chr(10);\n //$BREAK = chr(14) . chr(10);\n //chr(27). chr(100). chr(0)\n $LINEA = str_repeat('-', 80);\n//..............................................................................\n// Inicio Exel\n//.............................................................................. \n fwrite($fp,$FORMATO); \n \n\n\n // paso 01 Listar ESTABLECIMIENTOS del Emplearo 'Empresa'\n $dao_est = new EstablecimientoDao();\n $est = array();\n $est = $dao_est->listar_Ids_Establecimientos(ID_EMPLEADOR);\n $pagina = 1;\n\n // paso 02 listar CENTROS DE COSTO del establecimento. \n if (is_array($est) && count($est) > 0) {\n //DAO\n $dao_cc = new EmpresaCentroCostoDao();\n $dao_pago = new PagoDao();\n $dao_estd = new EstablecimientoDireccionDao();\n\n // -------- Variables globales --------// \n $TOTAL = 0;\n $SUM_TOTAL_CC = array();\n $SUM_TOTAL_EST = array();\n\n\n\n for ($i = 0; $i < count($est); $i++) { // ESTABLECIMIENTO\n //echo \" i = $i establecimiento ID=\".$est[$i]['id_establecimiento'];\n //echo \"<br>\";\n //$SUM_TOTAL_EST[$i]['establecimiento'] = strtoupper(\"Establecimiento X ==\" . $est[$i]['id_establecimiento']);\n $bandera_1 = false;\n if ($est[$i]['id_establecimiento'] == $master_est) {\n $bandera_1 = true;\n } else if ($cubo_est == \"todo\") {\n $bandera_1 = true;\n }\n\n if ($bandera_1) {\n \n // if($bander_ecc){\n \n $SUM_TOTAL_EST[$i]['monto'] = 0;\n //Establecimiento direccion Reniec\n $data_est_direc = $dao_estd->buscarEstablecimientoDireccionReniec($est[$i]['id_establecimiento']/* $id_establecimiento */);\n\n $SUM_TOTAL_EST[$i]['establecimiento'] = $data_est_direc['ubigeo_distrito'];\n\n $ecc = array();\n $ecc = $dao_cc->listar_Ids_EmpresaCentroCosto($est[$i]['id_establecimiento']);\n // paso 03 listamos los trabajadores por Centro de costo \n\n for ($j = 0; $j < count($ecc); $j++) {\n\n $bandera_2 = false;\n if ($ecc[$j]['id_empresa_centro_costo'] == $master_cc) {\n $bandera_2 = true;\n } else if ($cubo_est == 'todo' || $cubo_cc == \"todo\") { // $cubo_est\n $bandera_2 = true;\n }\n \n if ($bandera_2) {\n //$contador_break = $contador_break + 1;\n // LISTA DE TRABAJADORES\n $data_tra = array();\n $data_tra = $dao_pago->listar_2($id_etapa_pago, $est[$i]['id_establecimiento'], $ecc[$j]['id_empresa_centro_costo']);\n\n if (count($data_tra)>0) {\n \n $SUM_TOTAL_CC[$i][$j]['establecimiento'] = $data_est_direc['ubigeo_distrito'];\n $SUM_TOTAL_CC[$i][$j]['centro_costo'] = strtoupper($ecc[$j]['descripcion']);\n $SUM_TOTAL_CC[$i][$j]['monto'] = 0;\n\n //fwrite($fp, $LINEA); \n fwrite($fp, NAME_EMPRESA); \n //$worksheet->write(($row + 1), ($col + 1), NAME_EMPRESA);\n //$data_pd['periodo'] $data_pd['fecha_modificacion']\n $descripcion1 = date(\"d/m/Y\");\n \n fwrite($fp, str_pad(\"FECHA : \", 56, \" \", STR_PAD_LEFT));\n fwrite($fp, str_pad($descripcion1, 11, \" \", STR_PAD_LEFT));\n fwrite($fp, $BREAK);\n\n fwrite($fp, str_pad(\"PAGINA :\", 69, \" \", STR_PAD_LEFT)); \n fwrite($fp, str_pad($pagina, 11, \" \", STR_PAD_LEFT));\n fwrite($fp, $BREAK);\n\n fwrite($fp, str_pad($_name_15/*\"1RA QUINCENA\"*/, 80, \" \", STR_PAD_BOTH));\n fwrite($fp, $BREAK);\n\n fwrite($fp, str_pad(\"PLANILLA DEL MES DE \" . strtoupper($nombre_mes) . \" DEL \" . $anio, 80, \" \", STR_PAD_BOTH));\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n\n fwrite($fp, \"LOCALIDAD : \" . $data_est_direc['ubigeo_distrito']);\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n\n fwrite($fp, \"CENTRO DE COSTO : \" . strtoupper($ecc[$j]['descripcion']));\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n //$worksheet->write($row, $col, \"##################################################\");\n \n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(\"N \", 4, \" \", STR_PAD_LEFT));\n fwrite($fp, str_pad(\"DNI\", 12, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"APELLIDOS Y NOMBRES\", 40, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"IMPORTE\", 9, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"FIRMA\", 15, \" \", STR_PAD_RIGHT));\n fwrite($fp, $BREAK);\n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n \n $pag = 0;\n $num_trabajador = 0;\n for ($k = 0; $k < count($data_tra); $k++) {\n $num_trabajador = $num_trabajador +1; \n if($num_trabajador>24):\n fwrite($fp,chr(12));\n $num_trabajador=0;\n endif;\n \n $data = array();\n $data = $data_tra[$k]; \n //$DIRECCION = $SUM_TOTAL_EST[$i]['establecimiento'];\n // Inicio de Boleta \n \n generarRecibo15_txt2($fpx, $data, $nombre_mes, $anio,$pag);\n $pag = $pag +1;\n\n \n // Final de Boleta\n $texto_3 = $data_tra[$k]['apellido_paterno'] . \" \" . $data_tra[$k]['apellido_materno'] . \" \" . $data_tra[$k]['nombres']; \n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(($k + 1) . \" \", 4, \" \", STR_PAD_LEFT));\n fwrite($fp, str_pad($data_tra[$k]['num_documento'], 12, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(limpiar_caracteres_especiales_plame($texto_3), 40, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad($data_tra[$k]['sueldo'], 9, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"_______________\", 15, \" \", STR_PAD_RIGHT));\n fwrite($fp, $BREAK);\n \n // por persona\n $SUM_TOTAL_CC[$i][$j]['monto'] = $SUM_TOTAL_CC[$i][$j]['monto'] + $data_tra[$k]['sueldo'];\n }\n\n\n $SUM_TOTAL_EST[$i]['monto'] = $SUM_TOTAL_EST[$i]['monto'] + $SUM_TOTAL_CC[$i][$j]['monto'];\n \n //--- LINE\n fwrite($fp, $BREAK);\n //fwrite($fp, $LINEA);\n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(\"TOTAL \" . $SUM_TOTAL_CC[$i][$j]['centro_costo'] . \" \" . $SUM_TOTAL_EST[$i]['establecimiento'], 56, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM_TOTAL_CC[$i][$j]['monto'], 2));\n fwrite($fp, $BREAK);\n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n\n fwrite($fp,chr(12));\n $pagina = $pagina + 1;\n //fwrite($fp, $BREAK . $BREAK . $BREAK . $BREAK);\n $TOTAL = $TOTAL + $SUM_TOTAL_CC[$i][$j]['monto'];\n //$row_a = $row_a + 5;\n }//End Trabajadores\n }//End Bandera.\n }//END FOR CCosto\n\n\n // CALCULO POR ESTABLECIMIENTOS\n /* $SUM = 0.00;\n for ($z = 0; $z < count($SUM_TOTAL_CC[$i]); $z++) {\n\n fwrite($fp, str_pad($SUM_TOTAL_CC[$i][$z]['centro_costo'], 59, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM_TOTAL_CC[$i][$z]['monto'], 2));\n fwrite($fp, $BREAK);\n\n\n $SUM = $SUM + $SUM_TOTAL_CC[$i][$z]['monto'];\n }\n fwrite($fp, str_pad(\"T O T A L G E N E R A L --->>>\", 59, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM, 2));\n */\n\n //fwrite($fp, $BREAK . $BREAK);\n \n }\n }//END FOR Est\n\n /*\n fwrite($fp, str_repeat('*', 85));\n fwrite($fp, $BREAK);\n fwrite($fp, \"CALCULO FINAL ESTABLECIMIENTOS \");\n fwrite($fp, $BREAK);\n\n //$worksheet->write(($row+4), ($col + 1), \".::RESUMEN DE PAGOS::.\");\n $SUM = 0;\n for ($z = 0; $z < count($SUM_TOTAL_EST); $z++) {\n\n fwrite($fp, str_pad($SUM_TOTAL_EST[$z]['establecimiento'], 59, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM_TOTAL_EST[$z]['monto'], 2));\n fwrite($fp, $BREAK);\n $SUM = $SUM + $SUM_TOTAL_EST[$z]['monto'];\n }\n */\n \n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(\"T O T A L G E N E R A L --->>>\", 56, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(number_format_var($TOTAL), 15, ' ',STR_PAD_RIGHT));\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n \n \n }//END IF\n//..............................................................................\n// Inicio Exel\n//..............................................................................\n //|---------------------------------------------------------------------------\n //| Calculos Finales\n //|\n //|---------------------------------------------------------------------------\n //\n //fwrite($fp, $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK);\n //fwrite($fp, $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK);\n\n\n fclose($fp);\n fclose($fpx);\n // $workbook->close();\n // .........................................................................\n // SEGUNDO ARCHIVO\n //..........................................................................\n\n\n\n\n\n\n\n\n\n\n $file = array();\n $file[] = $file_name;\n $file[] = ($file_name2);\n ////generarRecibo15_txt2($id_pdeclaracion, $id_etapa_pago);\n\n\n $zipfile = new zipfile();\n $carpeta = \"file-\" . date(\"d-m-Y\") . \"/\";\n $zipfile->add_dir($carpeta);\n\n for ($i = 0; $i < count($file); $i++) {\n $zipfile->add_file(implode(\"\", file($file[$i])), $carpeta . $file[$i]);\n //$zipfile->add_file( file_get_contents($file[$i]),$carpeta.$file[$i]);\n }\n\n header(\"Content-type: application/octet-stream\");\n header(\"Content-disposition: attachment; filename=zipfile.zip\");\n\n echo $zipfile->file();\n}", "public function payments_received_reports_pdf() {\n ini_set('memory_limit', '256M');\n $tenant_id = $this->tenant_id;\n $company = $this->classTraineeModel->get_company_for_paidinvoice($tenant_id);\n $companies = array();\n foreach ($company as $row) {\n $companies[$row->company_id] = $row->company_name;\n }\n $company = $this->input->get('company');\n $invoice_id = $this->input->get('invoice_id');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'ei.invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $tabledata = $this->reportsModel->get_payment_recd($records_per_page, NULL, NULL, $order_by, $company, $invoice_id, $start_date, $end_date);\n $tabledata_count = count($tabledata);\n $pids = array();\n for ($i = 0; $i < $tabledata_count; $i++) {\n $pids[] = $tabledata[$i]->pymnt_due_id;\n }\n $tb_extra = $this->reportsModel->get_payment_recd_trainee_company($pids);\n $tabledataextra = array();\n for ($i = 0; $i < count($tb_extra); $i++) {\n $tabledataextra[$tb_extra[$i]->pymnt_due_id] = $tb_extra[$i];\n }\n $tenant_details = $this->classTraineeModel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n $this->load->helper('pdf_reports_helper');\n return payments_recd_report_pdf($tabledataextra, $tabledata, $tenant_details, $companies);\n }", "function report()\n {\n if ($this->acl->otentikasi2($this->title) == TRUE){\n $cur = $this->input->post('ccurrency');\n $start = $this->input->post('start');\n $end = $this->input->post('end');\n\n $data['currency'] = $cur;\n $data['start'] = tglin($start);\n $data['end'] = tglin($end);\n $data['rundate'] = tglin(date('Y-m-d'));\n $data['log'] = $this->decodedd->log;\n\n // Property Details\n $data['company'] = $this->properti['name'];\n\n $result = null;\n foreach ($this->model->report($cur,$start,$end)->result() as $res) {\n $result[] = array (\"id\"=>$res->id, \"no\"=>$res->no, \"notes\"=>$res->notes, \"dates\"=>tglin($res->dates), \n \"currency\"=>$res->currency, \"from\"=>$this->get_acc($res->from), \"to\"=>$this->get_acc($res->to), \n \"posted\"=>$res->approved, \"amount\"=>$res->amount);\n }\n $data['result'] = $result; $this->output = $data;\n }else { $this->reject_token(); }\n $this->response('content');\n }", "public function basicreport()\n\t{\n\t\t\n\t\t$disp_msg = $this->session->flashdata('disp_msg');\n\t\t\n\t\t\n\t\t$search_filters = array();\n\t\t$search_results = array();\n\t\t\n\t\t$search_query = \"SELECT * FROM postpatch_schedule WHERE 1=1 \";\n\t\t\n\t\tif (!empty($_POST)) {\n\t\t\tif(!empty($_POST['dpa_flexinet_id']) && count($_POST['dpa_flexinet_id'])>0) {\n\t\t\t\t$dpavals = implode(\"' , '\", $_POST['dpa_flexinet_id']);\n\t\t\t\t$search_query .= \" AND dpa_flexinet IN ('\".$dpavals.\"') \";\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($_POST['verificationstatus']) && count($_POST['verificationstatus'])>0) {\n\t\t\t\t$verfstatusvals = implode(\"' , '\", $_POST['verificationstatus']);\n\t\t\t\t$search_query .= \" AND verificationstatus IN ('\".$verfstatusvals.\"') \";\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($_POST['scheduledate']) && count($_POST['scheduledate'])>0) {\n\t\t\t\t$scdvals = implode(\"' , '\", $_POST['scheduledate']);\n\t\t\t\t$search_query .= \" AND scheduledate IN ('\".$scdvals.\"') \";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$search_query_res = $this->commonclass->execute_rawquery($search_query);\n\t\t$search_results = $search_query_res->result_array();\n\t\t\n\t\t$dpa_emps = $this->commonclass->retrive_records('postpatch_schedule', ' DISTINCT(dpa_flexinet) as dpa_flexinet ', \"\",array(\"dpa_flexinet\" => \"ASC\"),'');\n\t\tif (count($dpa_emps)>0) {\n\t\t\tforeach($dpa_emps as $onedpa) {\n\t\t\t\t$search_filters['dpa'][] = $onedpa['dpa_flexinet'];\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\t$verf_status_res = $this->commonclass->retrive_records('postpatch_schedule', ' DISTINCT(verificationstatus) as verificationstatus ', \"\",array(\"dpa_flexinet\" => \"ASC\"),'');\n\t\tif (count($verf_status_res)>0) {\n\t\t\tforeach($verf_status_res as $oneverif) {\n\t\t\t\t$search_filters['verf_status'][] = $oneverif['verificationstatus'];\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$scheduledate_res = $this->commonclass->retrive_records('postpatch_schedule', ' DISTINCT(scheduledate) as scheduledate ', \"\",array(\"dpa_flexinet\" => \"ASC\"),'');\n\t\tif (count($scheduledate_res)>0) {\n\t\t\tforeach($scheduledate_res as $oneverif1) {\n\t\t\t\t$search_filters['scheduledates'][$oneverif1['scheduledate']] = ($oneverif1['scheduledate'] != \"0000-00-00\") ? $this->commonclass->dateformat1($oneverif1['scheduledate']) : \"00/00/0000\";\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t## ____________ Data sending to the template starts ____________ ##\n\t\t$data['disp_msg'] = $disp_msg; # display messages\n\t\t$data['search_filters'] = $search_filters; # search_filters\n\t\t$data['search_results'] = $search_results; # search_filters\n\t\t//$data['postpatch_uploads'] = $postpatch_uploads; # postpatch_schedule\n\t\t\n\t\t## ____________ Data sending to the template ends here ____________ ##\n\t\t\n\t\t$this->load->view('layout/'.$this->sel_theam_path.'/header', $data); # html view page\n\t\t$this->load->view('admin/report1-page', $data); # html view page\n\t\t$this->load->view('layout/'.$this->sel_theam_path.'/footer', $data); # html view page\n\t}", "public function report() {\n $data = [];\n if ($this->input->post('submit')) {\n $report_data['from_date'] = $this->input->post('form_from_date');\n $report_data['to_date'] = $this->input->post('form_to_date');\n if ($this->input->post('form_summarized')) {\n $data['summarized_report'] = $this->account_model->getSummarizedReport($report_data);\n } else {\n $data['report'] = $this->account_model->getReport($report_data);\n }\n } else {\n if ($this->session->has_userdata('financialyear')) {\n $data['financialyear'] = $this->session->userdata('financialyear');\n }\n }\n $this->view('report', $data);\n }", "public function attendance(){\n\t\t\t$data['title'] = 'Students Attendences Course name '; \n\n\t\t\t$course_code = $_GET['course_code'];\n\t\t\t\n\t\t\t$ids = $this->register_model->ids($course_code);\n\n\t\t\t$course_id;\n\t\t\tforeach ($ids as $id) {\n\t\t\t\t\t$course_id = $id['id'];\n\t\t\t\t\t$data['course_name'] = $id['course_name'];\n\t\t\t}\t\t\t\n\t\t\t$data['courses'] = $this->register_model->get_attendance($course_id);\n\n\t\t\t$this->load->view('admin/header1');\n\t\t\t$this->load->view('admin/attendance', $data);\n\t\t\t$this->load->view('admin/footer');\n\t\t}", "public function report($typeId = null, $reportDate = null, $numOfDays = null, $classId = null, $sectionId = null)\n\t{\t\t\t\n\t\t$year = substr($reportDate, 0, 4);\n\t\t$month = substr($reportDate, 5, 7);\t\t\n\n\t\t$classData = $this->model_classes->fetchClassData($classId);\n\t\t$sectionData = $this->model_section->fetchSectionByClassSection($classId, $sectionId);\n\n\t\t\t// student\t\t\t\n\t\t\t$div = '<div class=\"well\">\n\t\t\t\t<center>\n\t\t\t\t\t<h4> Ngành học: '.$classData['class_name'].'<br> Lớp học : '.$sectionData['section_name'].'<h4>\n\t\t\t\t\t<h4> Năm : '.$year.' - Month :'.$month.'<h4>\t\t\n\t\t\t\t\t<small>\t\n\t\t\t\t\t\t1 : Tiết 1-2 ( 7h00-8h45) <br />\t\t\t\t\n\t\t\t\t\t\t2 : Tiết 3-4 (9h-10h45) <br />\n\t\t\t\t\t\t3 : Tiết 5-6 (13h - 14h45)<br />\n\t\t\t\t\t\t4 : Tiết 7-8 (15h-16h45)<br />\n\t\t\t\t\t\t\t5 : Tiết 9-10 (17h00 - 18h45)<br />\n\t\t\t\t\t</small>\n\t\t\t\t</center>\n\t\t\t</div>\n\n\t\t\t<div style=\"overflow-x:auto;\">\t\t\t\n\t\t\t<table class=\"table table-bordered\" style=\"width:100%;\">\t\t\t\n\t\t\t\t<tbody style=\"width:100%;\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"width:25%;\">Môn học</td>\n\t\t\t\t\t\t';\t\t\n\t\t\t\t\t\t// loop for days\n\t\t\t\t\t\tfor($i = 1; $i <= $numOfDays; $i++) {\n\t\t\t\t\t\t\t$div .= '\n\t\t\t\t\t\t\t\t<td style=\"width:10%;\">'.$i.'</td>';\t\n\t\t\t\t\t\t} // /for\n\t\t\t\t\t$div .= '</tr>';\n\t\t\t\t\t\t\n\t\t\t\t\t$subjectInfo = $this->model_subject->fetchSubjectDataByClass($classId);\n\n\t\t\t\t\tforeach ($subjectInfo as $key => $value) {\n\t\t\t\t\t\t$subjectName = $value['name'];\n\t\t\t\t\t\t$div .= '\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>'.$subjectName.'</td>';\n\n\t\t\t\t\t\t\tfor($i = 1; $i <= $numOfDays; $i++) {\n\t\t\t\t\t\t\t\t// $attendanceData = $this->model_attendance->getAttendance($i, $reportDate, $value['student_id'], $typeId, $classId, $sectionId);\n\t\t\t\t\t\t\t\t$scheduleData = $this->model_schedule->getAttendance($i, $reportDate, $value['subject_id'], $sectionId);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$div .= '<td>';\n\t\t\t\t\t\t\t\tforeach ($scheduleData as $scheduleKey => $scheduleValue) {\n\n\t\t\t\t\t\t\t\t\tif($scheduleValue['schedule_type'] == 1) {\n\t\t\t\t\t\t\t\t\t\t// Có mặt\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-success\">1</span>';\t\n\t\t\t\t\t\t\t\t\t} else if($scheduleValue['schedule_type'] == 2) {\n\t\t\t\t\t\t\t\t\t\t// Vắng\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-primary\">2</span>';\t\n\t\t\t\t\t\t\t\t\t} else if($scheduleValue['schedule_type'] == 3) {\n\t\t\t\t\t\t\t\t\t\t// Trễ\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-warning\">3</span>';\t\n\t\t\t\t\t\t\t\t\t} else if($scheduleValue['schedule_type'] == 4) {\n\t\t\t\t\t\t\t\t\t\t// Trễ\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-warning\">4</span>';\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Không xác định\n\t\t\t\t\t\t\t\t\t\t$scheduleStatus = '<span class=\"label label-danger\">5</span>';\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$div .= $scheduleStatus;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$div .= '\n\t\t\t\t\t\t\t\t\t</td>';\t\n\t\t\t\t\t\t\t\t} // /for\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t$div .= '</tr>';\t\t\n\t\t\t\t\t} // /foreach\n\t\t\t\t$div .= '</tbody>\n\t\t\t\t</table>\n\t\t\t<div>';\t\t\t\n\t\t\techo $div;\n\t\t\n\n\t\t\n\t}", "public function crystal_report_view()\n\t{\n\t\t$this->data['crystal_report']=$this->reports_personnel_schedule_model->crystal_report_view();\n\t\t$this->load->view('employee_portal/report_personnel/schedule/crystal_report',$this->data);\n\t}", "public function ss_reports()\n\t{\n\t\t$data['title'] = \"Social Security Reports\"; //Page title\n $flag = $this->input->post('sbtn', TRUE);\n\t\tif(!empty($flag))\n\t\t{\n\t\t\t$data['flag'] = 1;\n\t\t\t$data['month'] = $this->input->post('txtmonth');\n\t\t\t$data['social_security'] = $this->reports_model->get_emp_salary_details($data['month'],'ss');\n\t\t}\n $data['subview'] = $this->load->view('admin/reports/ss_reports', $data, TRUE);\n $this->load->view('admin/_layout_main', $data); //page load\n\t}", "public function genCIOMS ($caseId) {\n $this->viewBuilder()->layout('CIOMS');\n //1.\n $this->set('patientInitial', $this->getCiomsDirectValue($caseId,79,1));//B.1.1 patientinitial\n //1a.\n $this->set('country', $this->getCiomsLookupValue($caseId,3,1));// A.1.2 occurcountry\n //2.\n $this->set('birth', $this->getCiomsDirectValue($caseId,85,1));// A.1.2.1b patientbirthdate\n $this->set('birthMonth', $this->getCiomsMonthValue($caseId,85,1));// A.1.2.1b patientbirthdate\n //2a.\n $this->set('age', $this->getCiomsDirectValue($caseId,86,1));//B.1.2.2a patientonsetage\n $this->set('ageUnit',$this->getCiomsLookupValue($caseId,87,1));//B.1.2.2b patientonsetageunit\n //4-6\n $this->set('reaction', $this->getCiomsDirectValue($caseId,156,1));//B.2.i.4b reactionstartdate\n $this->set('reactionMonth', $this->getCiomsMonthValue($caseId,156,1));//B.2.i.4b reactionstartdate\n //3\n $this->set('sex',$this->getCiomsLookupValue($caseId,93,1));//B.1.5 sex\n //7\n $this->set('primarySourceReaction', $this->getCiomsDirectValue($caseId,149,1));//B.2.i.0 primarysourcereaction\n $this->set('reactionOutcome ', $this->getCiomsDirectValue($caseId,165,1));//B.2.i.8 reactionoutcome\n $this->set('actionDrug', $this->getCiomsDirectValue($caseId,208,1));// B.4.K.16 actiondrug\n $this->set('narrativeIncludeClinical', $this->getCiomsDirectValue($caseId,218,1));//B.5.1 narrativeincludeclinical\n \n //8-12\n $this->getCiomsSeriousValue($caseId,354,1);\n //13\n $this->set('resultsTestsProcedures', $this->getCiomsDirectValue($caseId,174,1));//B.3.2 resultstestsprocedures\n //14\n $this->set('drugone', $this->getCiomsDirectValue($caseId,177,1));//B.4.K.2+B.4.K.3 activesubstancename+obtaindrugcountry\n $this->set('genericOne', $this->getCiomsDirectValue($caseId,178,1));//B.4.K.3 obtaindrugcountry\n $this->set('drugtwo', $this->getCiomsDirectValue($caseId,177,2));//B.4.K.2+B.4.K.3 activesubstancename+obtaindrugcountry\n $this->set('genericTwo', $this->getCiomsDirectValue($caseId,178,2));//B.4.K.3 obtaindrugcountry\n //15\n $this->set('doseOne', $this->getCiomsDirectValue($caseId,183,1));//B.4.k.5.1Dose(number)\n $this->set('doseUnitOne', $this->getCiomsLookupValue($caseId,184,1));//Dose(unit) (B.4.k.5.2)\n $this->set('separateDosageOne', $this->getCiomsDirectValue($caseId,185,1));//Number Of Separate Dosages (B.4.k.5.3)\n $this->set('intervalOne', $this->getCiomsDirectValue($caseId,186,1));// Interval (B.4.k.5.4)\n $this->set('intervalUnitOne', $this->getCiomsLookupValue($caseId,187,1));//Interval Unit (B.4.k.5.5)\n\n\n $this->set('doseTwo', $this->getCiomsDirectValue($caseId,183,2));//B.4.k.5.1Dose(number)\n $this->set('doseUnitTwo', $this->getCiomsLookupValue($caseId,184,2));//Dose(unit) (B.4.k.5.2)\n $this->set('separateDosageTwo', $this->getCiomsDirectValue($caseId,185,2));//Number Of Separate Dosages (B.4.k.5.3)\n $this->set('intervalTwo', $this->getCiomsDirectValue($caseId,186,2));// Interval (B.4.k.5.4)\n $this->set('intervalUnitTwo', $this->getCiomsLookupValue($caseId,187,2));//Interval Unit (B.4.k.5.5)\n //16\n $this->set('routeone', $this->getCiomsLookupValue($caseId,192,1));//B.4.k.8 drugadministrationroute\n $this->set('routetwo', $this->getCiomsLookupValue($caseId,192,2));//B.4.k.8 drugadministrationroute\n //17\n $this->set('indicationOne', $this->getCiomsDirectValue($caseId,197,1));//B.4.k.11b drugindication\n $this->set('indicationTwo', $this->getCiomsDirectValue($caseId,197,2));//B.4.k.11b drugindication\n //18\n $this->set('TherapyStartOne', $this->getCiomsDateValue($caseId,199,1));//B.4.k.12b drugstartdate\n $this->set('TherapyStartTwo', $this->getCiomsDateValue($caseId,199,2));//B.4.k.12b drugstartdate\n $this->set('TherapyStopOne', $this->getCiomsDateValue($caseId,205,1));//B.4.k.14b drugenddate\n $this->set('TherapyStopTwo', $this->getCiomsDateValue($caseId,205,2));//B.4.k.14b drugenddate\n //19\n $this->set('TherapyDurationOne', $this->getCiomsDirectValue($caseId,206,1));//B.4.k.15a drugtreatmentduration\n $this->set('TherapyDurationUnitOne', $this->getCiomsLookupValue($caseId,207,1));//B.4.k.15b drugtreatmentdurationunit\n $this->set('TherapyDurationTwo', $this->getCiomsDirectValue($caseId,206,2));//B.4.k.15a drugtreatmentduration\n $this->set('TherapyDurationUnitTwo', $this->getCiomsLookupValue($caseId,207,2));//B.4.k.15b drugtreatmentdurationunit\n //20.\n $this->getCiomsDechallengeValue($caseId,381,1);//dechallenge\n //21.\n $this->getCiomsRechallengeValue($caseId,209,1);//Rechallenge\n //22. concomitant drugs and dates of administration\n $this->set('productName', $this->getCiomsDirectValue($caseId,176,2));//B.4.k.2.1medicinalproduct\n $this->set('substanceName', $this->getCiomsDirectValue($caseId,177,2));//B.4.k.2.2activesubstancename\n $this->set('countryObtain', $this->getCiomsDirectValue($caseId,178,2));//+B.4.k.2.3obtaindrugcountry\n $this->set('startDate', $this->getCiomsDirectValue($caseId,199,2));////B.4.k.12b drugstartdate\n $this->set('stopDate', $this->getCiomsDateValue($caseId,205,2));//B.4.k.14b drugenddate\n //23.other relevant history\n $this->set('patientEpisodeName', $this->getCiomsDirectValue($caseId,97,1));//B.1.7.1a.2 patientepisodename\n $this->set('patientMedicalStartDate', $this->getCiomsDateValue($caseId,99,1));//B.1.7.1c\tpatientmedicalstartdate\n $this->set('patientMedicalContinue', $this->getCiomsLooKupValue($caseId,100,1));//B.1.7.1d patientmedicalcontinue\n $this->set('patientMedicalEndDate', $this->getCiomsDateValue($caseId,102,1));//B.1.7.1f patientmedicalenddate\n $this->set('patientMedicalComment', $this->getCiomsDirectValue($caseId,103,1));//B.1.7.1g patientmedicalcomment\n //24a\n $this->set('caseSource', $this->getCiomsDateValue($caseId,19,1));//A.1.11.1 Source of the case identifier \n //24b\n $this->set('otherCaseIndentifier', $this->getCiomsDateValue($caseId,18,1));//A.1.11 Other case identifiers in previous transmissions\n //24c\n $this->set('receiptDate', $this->getCiomsDateValue($caseId,12,1));//A.1.7b Latest received date \n //24d\n $this->getCiomsReportSourceValue($caseId,1);\n\n }", "public function student_step5dw(){\n\t\t\t$id = $this->session->userdata['sm_id'];\n\t\t\t//print_r($id);\n\t\t$email = $this->commodel->get_listspfic1(\"student_master\",\"sm_email\",\"sm_id\",$id)->sm_email;\n\t\t$data['email'] = $email;\n\t\t\n\t\t//get the education detail from student_education\n\t\t// availabe final form for printing\n\t\t$this->sname=$this->commodel->get_listspfic1('student_master','sm_fname','sm_id',$id)->sm_fname;\n\t\t$this->mobile=$this->commodel->get_listspfic1('student_master','sm_mobile','sm_id',$id)->sm_mobile;\n\t\t$this->email=$this->commodel->get_listspfic1('student_master','sm_email','sm_id',$id)->sm_email;\n\t\t$this->dob=$this->commodel->get_listspfic1('student_master','sm_dob','sm_id',$id)->sm_dob;\n\t\t$this->uid=$this->commodel->get_listspfic1('student_master','sm_uid','sm_id',$id)->sm_uid;\n\t\t$this->bgroup=$this->commodel->get_listspfic1('student_master','sm_bloodgroup','sm_id',$id)->sm_bloodgroup;\n\n\t\t$this->mname = $this->commodel->get_listspfic1('student_parent','spar_mothername','spar_smid',$id)->spar_mothername;\t\t\n\t\t$this->fname=$this->commodel->get_listspfic1('student_parent','spar_fathername','spar_smid',$id)->spar_fathername;\n\t\t$this->ncid = $this->commodel->get_listspfic1('student_program','sp_programid','sp_smid',$id)->sp_programid;\n\t\t$this->pname = $this->commodel->get_listspfic1('program','prg_name','prg_id',$this->ncid)->prg_name;\n\t\t$this->gender=$this->commodel->get_listspfic1('student_master','sm_gender','sm_id',$id)->sm_gender;\n\t\n\t\t//postal address detail\n\t\t$this->padd=$this->commodel->get_listspfic1('student_parent','spar_paddress','spar_smid',$id)->spar_paddress;\n\t\t$this->cadd=$this->commodel->get_listspfic1('student_parent','spar_caddress','spar_smid',$id)->spar_caddress;\n\t\t$this->pcity=$this->commodel->get_listspfic1('student_parent','spar_pcity','spar_smid',$id)->spar_pcity;\n\t\t$this->ccity=$this->commodel->get_listspfic1('student_parent','spar_ccity','spar_smid',$id)->spar_ccity;\n\t\t$this->ppost=$this->commodel->get_listspfic1('student_parent','spar_ppostoffice','spar_smid',$id)->spar_ppostoffice;\n\t\t$this->cpost=$this->commodel->get_listspfic1('student_parent','spar_cpostoffice','spar_smid',$id)->spar_cpostoffice;\n\t\t$this->pdist=$this->commodel->get_listspfic1('student_parent','spar_pdistrict','spar_smid',$id)->spar_pdistrict;\n\t\t$this->cdist=$this->commodel->get_listspfic1('student_parent','spar_cdistrict','spar_smid',$id)->spar_cdistrict;\n\t\t$this->pstat=$this->commodel->get_listspfic1('student_parent','spar_pstate','spar_smid',$id)->spar_pstate;\n\t\t$this->cstat=$this->commodel->get_listspfic1('student_parent','spar_cstate','spar_smid',$id)->spar_cstate;\n\t\t$this->ppin=$this->commodel->get_listspfic1('student_parent','spar_ppincode','spar_smid',$id)->spar_ppincode;\n\t\t$this->cpin= $this->commodel->get_listspfic1('student_parent','spar_cpincode','spar_smid',$id)->spar_cpincode;\n\t\t\n\t\t$this->cateid=$this->commodel->get_listspfic1('student_master','sm_category','sm_id',$id)->sm_category;\n\t\t$this->catename=$this->commodel->get_listspfic1('category','cat_name','cat_id',$this->cateid)->cat_name;\n\n\t\t//fees detail\n\t\t$this->prog=$this->commodel->get_listspfic1('program','prg_name','prg_id',$this->ncid)->prg_name;\n\t\t$this->amnt=$this->commodel->get_listspfic1('student_fees','sfee_feeamount','sfee_smid',$id)->sfee_feeamount;\n\t\t$this->pmethod=$this->commodel->get_listspfic1('student_fees','sfee_paymentmethod','sfee_smid',$id)->sfee_paymentmethod;\n\t\t$this->rno=$this->commodel->get_listspfic1('student_fees','sfee_referenceno','sfee_smid',$id)->sfee_referenceno; \n\t\t$this->fid=$this->commodel->get_listspfic1('student_fees','sfee_id','sfee_smid',$id)->sfee_id; \n\t\t$this->bname=$this->commodel->get_listspfic1('student_fees','sfee_bankname','sfee_smid',$id)->sfee_bankname;\n\n\t\t$this->rollno = $this->commodel->get_listspfic1('student_entry_exit','senex_rollno','senex_smid',$id)->senex_rollno;\n\t\t\n\t\t//education detail\n\t\t$this->seresult = $this->commodel->get_listrow('student_education','sedu_smid',$id)->result();\n\t\t//get photo or sign\n\t\t$this->phresult = $this->commodel->get_listspfic1('student_master','sm_photo','sm_id',$id)->sm_photo;\n\t\t$this->signresult = $this->commodel->get_listspfic1('student_master','sm_signature','sm_id',$id)->sm_signature;\n\t\t\n\t\t$this->load->library('pdf');\n \t\t$this->pdf->load_view('student/student_step5dw');\n \t$this->pdf->render();\n \t$this->pdf->stream(\"Student_Admission.pdf\");\n\t\t\n\t\t//$this->load->view('student/student_step5');\n\t}", "function exam_marks() {\n if ($this->session->userdata('parent_login') != 1)\n redirect(base_url(), 'refresh');\n $year = $this->db->get_where('settings', array('type' => 'running_year'))->row()->description;\n\n $student_id = $this->session->userdata('parent_id');\n $page_data['student_id'] = $student_id;\n $page_data['teacher_id'] = $this->parents_model->get_student_id('teacher_id', $student_id);\n $page_data['exams'] = $this->parents_model->get_student_exams();\n foreach ($page_data['exams'] as $data) {\n $this->parents_model->create_exam_positions($page_data['teacher_id'], $data['exam_id'], $year);\n }$page_data['student'] = $this->db->get_where('student', array('student_id' => $student_id))->row()->name;\n $page_data['page_name'] = 'exam_marks';\n $image = $this->db->get_where('student', array('student_id' => $student_id))->row()->image;\n $image_url = $this->crud_model->get_image_url('student', $image);\n $page_data['parent_page_title'] = \"<img src='$image_url'\" . 'class=\"img-circle\"' . 'width=\"40\"' . \"/>\" . $page_data['student'];\n $page_data['page_title'] = $page_data['student'];\n $page_data['year'] = $year;\n $this->load->view('backend/index', $page_data);\n }", "function generateMeetingAttendanceReport($args) {\r\n\t\tparent::validate();\r\n\t\t$this->setupTemplate();\r\n\t\t$ercMembers = Request::getUserVar('ercMembers');\r\n\t\t\r\n\t\t$fromDate = Request::getUserDateVar('dateFrom', 1, 1);\r\n\t\tif ($fromDate != null) $fromDate = date('Y-m-d H:i:s', $fromDate);\r\n\t\t$toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);\r\n\t\tif ($toDate != null) $toDate = date('Y-m-d H:i:s', $toDate);\r\n\t\t$meetingDao = DAORegistry::getDAO('MeetingDAO');\r\n\t\t$userDao = DAORegistry::getDAO('UserDAO');\r\n\t\t\r\n\t\theader('content-type: text/comma-separated-values');\r\n\t\theader('content-disposition: attachment; filename=meetingAttendanceReport-' . date('Ymd') . '.csv');\r\n\t\t\r\n\t\t$columns = array(\r\n\t\t'lastname' => Locale::translate('user.lastName'),\r\n\t\t'firstname' => Locale::translate('user.firstName'),\r\n\t\t'middlename' => Locale::translate('user.middleName'),\r\n\t\t'meeting_date' => Locale::translate('editor.reports.meetingDate'),\r\n\t\t'present' => Locale::translate('editor.reports.isPresent'),\r\n\t\t'reason_for_absence' => Locale::translate('editor.reports.reason')\r\n\t\t);\r\n\t\t$yesNoArray = array('present');\r\n\t\t$yesnoMessages = array( 0 => Locale::translate('common.no'), 1 => Locale::translate('common.yes'));\r\n\t\t$fp = fopen('php://output', 'wt');\r\n\t\tString::fputcsv($fp, array_values($columns));\r\n\t\t\r\n\t\tforeach ($ercMembers as $member) {\r\n\t\t\t$user = $userDao->getUser($member);\r\n\t\t\tlist($meetingsIterator) = $meetingDao->getMeetingReportByReviewerId($member, $fromDate, $toDate);\r\n\t\t\r\n\t\t\t$meetings = array();\r\n\t\t\twhile ($row =& $meetingsIterator->next()) {\r\n\t\t\t\tforeach ($columns as $index => $junk) {\r\n\t\t\t\t\tif (in_array($index, $yesNoArray)) {\r\n\t\t\t\t\t\t$columns[$index] = $yesnoMessages[$row[$index]];\r\n\t\t\t\t\t} elseif ($index == \"lastname\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getLastName();\r\n\t\t\t\t\t} elseif ($index == \"firstname\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getFirstName();\r\n\t\t\t\t\t} elseif ($index == \"middlename\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getMiddleName();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$columns[$index] = $row[$index];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString::fputcsv($fp, $columns);\r\n\t\t\t\tunset($row);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfclose($fp);\r\n\t}", "function create()\n\t{\n\n\t\t$kStudent = $this->uri->segment(3);\n\t\t$this->load->model(\"student_model\",\"student\");\n\t\t$this->load->model(\"teacher_model\",\"teacher\");\n\t\t$this->load->model(\"menu_model\",\"menu\");\n\t\t$data[\"ranks\"] = get_keyed_pairs($this->menu->get_pairs(\"report_rank\"),array(\"value\",\"label\"));\n\t\t$data[\"kTeach\"] = $this->session->userdata(\"userID\");\n\t\t//if the individual is not a teacher, show a dropdown list of teachers on whose behalf.\n\t\t//Include the author as an option\n\t\t$data[\"is_teacher\"] = TRUE;\n\t\tif($this->session->userdata('dbRole') != 2){\n\t\t\t$this->load->model(\"teacher_model\");\n\t\t\t$teachers = $this->teacher_model->get_teacher_pairs();\n\t\t\t$data['teachers'] = get_keyed_pairs($teachers, array('kTeach', 'teacher'),NULL,NULL,array('value'=>\"Myself\",'name'=>$data[\"kTeach\"]));\n\t\t\t$data[\"is_teacher\"] = FALSE;\n\t\t}\n\t\t$data[\"kStudent\"] = $kStudent;\n\t\t$report = $this->student->get($kStudent,\"stuFirst,stuLast,stuNickname,teacher.teachFirst as advisorFirst,teacher.teachLast as advisorLast,teacher.kTeach as kAdvisor\",TRUE);\n\t\t$data[\"student\"] = format_name($report->stuFirst,$report->stuLast,$report->stuNickname);\n\t\t$data[\"advisor\"] = format_name($report->advisorFirst,$report->advisorLast);\n\t\t$data[\"report\"] = $report;\n\t\t$data[\"methods\"] = array(\"In Person\",\"Over the Phone\",\"Via Email\");\n\n\t\t$data[\"statuses\"] = get_keyed_pairs($this->menu->get_pairs(\"report_status\"),array(\"value\",\"label\"));\n\t\t$data[\"categories\"] = get_keyed_pairs($this->menu->get_pairs(\"report_category\"),array(\"value\",\"label\"));\n\t\t$data[\"methods\"] = $this->menu->get_pairs(\"report_contact_method\");\n\t\t$data[\"action\"] = \"insert\";\n\t\t$data[\"title\"] = sprintf(\"Adding an %s for %s\", STUDENT_REPORT, $data[\"student\"]);\n\t\t$data[\"target\"] = \"report/edit\";\n\t\t$this->_view($data);\n\t\t\n\t}", "public function reportStudentDoorAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportStudentDoorAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister); \n }", "public function index(){\n\t \t@$this->loadModel(\"Dashboard\");\n global $session;\n $dashData = array();\n $dashData = $this->model->getDashboardStat();\n $this->view->oticketcount = $dashData['otcount'];\n $this->view->aticketcount = $dashData['atcount'];\n $this->view->oschedule = $dashData['oschedule'];\n $this->view->oworksheet = $dashData['oworksheet'];\n $this->view->clients = $dashData['clients'];\n $this->view->pendings = $dashData['openPend'];\n $this->view->cproducts = $dashData['cproducts'];\n $lastmonth = (int)date(\"n\")-1;\n $curmonth = date(\"n\");\n\n $this->view->monthreport = $this->model->getMonthlyReportFinance(\" Month(datecreated) ='\".$curmonth.\"' AND Year(datecreated)='\".date(\"Y\").\"'\");\n $this->view->lastmonthreport = $this->model->getLastMonthlyReportFinance(\" Month(datecreated) ='\".$lastmonth.\"' AND Year(datecreated)='\".date(\"Y\").\"'\");\n $this->view->thisquarter = $this->model->getThisQuaterReportFinance(\" Quarter(datecreated) ='\".self::date_quarter().\"' AND Year(datecreated)='\".date(\"Y\").\"'\");\n global $session;\n \n if($session->empright == \"Super Admin\"){\n\t\t $this->view->render(\"dashboard/index\");\n\t\t }elseif($session->empright == \"Customer Support Services\" || $session->empright == \"Customer Support Service\"){\n\t\t $this->view->render(\"support/index\");\n\t\t \n\t\t }elseif($session->empright == \"Customer Support Engineer\" || $session->empright == \"Customer Service Engineer\"){\n @$this->loadModel(\"Itdepartment\");\n global $session;\n $datan =\"\";\n $uri = new Url(\"\");\n //$empworkdata = $this->model->getWorkSheetEmployee($id,\"\");\n \n $ptasks = Worksheet::find_by_sql(\"SELECT * FROM work_sheet_form WHERE cse_emp_id =\".$_SESSION['emp_ident'] );\n // print_r($ptasks);\n //$empworkdata['worksheet'];\n $x=1;\n $datan .=\"<table width='100%'>\n <thead><tr>\n \t<th>S/N</th><th>Prod ID</th><th>Status</th><th>Emp ID</th><th>Issue</th><th>Date Generated </th><th></th><th></th>\n </tr>\n </thead>\n <tbody>\";\n if($ptasks){\n \n foreach($ptasks as $task){\n $datan .= \"<tr><td>$x</td><td>$task->prod_id</td><td>$task->status </td><td>$task->cse_emp_id</td><td>$task->problem</td><td>$task->sheet_date</td><td><a href='\".$uri->link(\"itdepartment/worksheetdetail/\".$task->id.\"\").\"'>View Detail</a></td><td></td></tr>\";\n $x++;\n }\n }else{\n $datan .=\"<tr><td colspan='8'></td></tr>\";\n } \n $datan .=\"</tbody></table>\";\n \n $mysched =\"<div id='transalert'>\"; $mysched .=(isset($_SESSION['message']) && !empty($_SESSION['message'])) ? $_SESSION['message'] : \"\"; $mysched .=\"</div>\";\n \n $psched = Schedule::find_by_sql(\"SELECT * FROM schedule WHERE status !='Closed' AND emp_id =\".$_SESSION['emp_ident'].\" ORDER BY id DESC\" );\n //print_r($psched);\n //$empworkdata['worksheet'];\n $x=1;\n $mysched .=\"<table width='100%'>\n <thead><tr>\n \t<th>S/N</th><th>Machine</th><th>Issue</th><th>Location</th><th>Task Type</th><th>Task Date </th><th></th><th></th><th></th>\n </tr>\n </thead>\n <tbody>\";\n if($psched){\n \n foreach($psched as $task){\n $mysched .= \"<tr><td>$x</td><td>$task->prod_name</td><td>$task->issue </td>\"; \n $machine = Cproduct::find_by_id($task->prod_id);\n \n $mysched .= \"<td>$machine->install_address $machine->install_city</td><td>$task->maint_type</td><td>$task->s_date</td><td>\";\n \n if($task->status == \"Open\"){\n $mysched .=\"<a scheddata='{$task->id}' class='acceptTask' href='#'>Accept Task</a>\";\n }\n if($task->status == \"In Progress\"){\n $mysched .=\"<a href='\".$uri->link(\"itdepartment/worksheetupdateEmp/\".$task->id.\"\").\"'>Get Work Sheet</a>\";\n }\n \n $mysched .=\"\n \n <div id='myModal{$task->id}' class='reveal-modal'>\n <h2>Accept Task </h2>\n <p class='lead'>Click on the button below to accept task! </p>\n <form action='?url=itdepartment/doAcceptTask' method='post'>\n <input type='hidden' value='{$task->id}' name='mtaskid' id='mtaskid' />\n <p><a href='#' data-reveal-id='secondModal' class='secondary button acceptTast' >Accept</a></p>\n </form>\n <a class='close-reveal-modal'>&#215;</a>\n</div>\n\n\n \n \n </td><td></td><td></td></tr>\";\n $x++;\n }\n }else{\n $mysched .=\"<tr><td colspan='8'>There is no task currently</td></tr>\";\n } \n $mysched .=\"</tbody></table>\";\n \n $this->view->oldtask = $datan;\n $this->view->schedule = $mysched;\n $this->view->mee = $this->model->getEmployee($_SESSION['emp_ident']);\n $this->view->render(\"itdepartment/staffaccount\");\n\t\t }else{\n\t\t $this->view->render(\"login/index\",true);\n\t\t }\n\t\t\n\t}", "public function batch_garde_summary(){\r\n \t$GradeID = $this->input->GET('GradeID');\r\n \t$OptionID = $this->input->GET('OptionID');\r\n\r\n\r\n \t$this->load->model('admission/admission_batch_model');\r\n\r\n \tif($OptionID==1){\r\n \t$data['admission_batch'] = $this->admission_batch_model->get_batchwisegradesummary($GradeID); \t\t\r\n \t}else if($OptionID==2){\r\n \t$data['admission_batch'] = $this->admission_batch_model->get_GradeBatchSummary($GradeID); \t\t\r\n \t}\r\n\r\n //var_dump($data['admission_batch']);\r\n\t\t\r\n\t\t// Overall Font Size\t\t\t\r\n\t\t$font_name = 'Helvetica';\r\n\t\t$now_date = date('D d M @ h:i a');\r\n\r\n\r\n\r\n /***** Title *****/\r\n $Adm_Tit = 'Admission 2017';\r\n if(!empty($data['admission_batch'][0]->grade_name)){\r\n $Gde_Tit = $data['admission_batch'][0]->grade_name;\t\r\n }\r\n else{\r\n \t$Gde_Tit = '';\r\n } \r\n\r\n \r\n\r\n /***** Calculation Veriables *******/\r\n $Border_Clc = 1;\r\n $Border_Clc2 = 0;\r\n $FontSize_Clc = 8;\r\n $X_Clc = '';\r\n $Y_Clc = '';\r\n $CW_Clc = '';\r\n $CH_Clc = '';\r\n\r\n\r\n $TForms = 0;\r\n $TInprocess = 0;\r\n $TReAllocated = 0;\r\n $TSettled = 0;\r\n\r\n $TGirls = 0;\r\n $TBoys = 0;\r\n $TSiblings = 0;\r\n $TPets = 0;\r\n\r\n $TAAP = 0;\r\n $TAA = 0;\r\n $TAAM = 0;\r\n $TABP = 0;\r\n $TAB = 0;\r\n $TABM = 0;\r\n $TAC = 0;\r\n $TAD = 0;\r\n $TASD = 0;\r\n $TACFD = 0;\r\n $TAWL = 0;\r\n $TAOH = 0;\r\n $TARGR = 0;\r\n\r\n $TDAP = 0;\r\n $TDA = 0;\r\n $TDAM = 0;\r\n $TDBP = 0;\r\n $TDB = 0;\r\n $TDBM = 0;\r\n $TDC = 0;\r\n $TDD = 0;\r\n $TDSC = 0;\r\n $TDOFR = 0;\r\n $TDWL = 0;\r\n $TDOH = 0;\r\n $TDRGR = 0;\r\n\r\n $TWL = 0;\r\n $TOH = 0;\r\n $TFU = 0;\r\n $TOFD = 0;\r\n\r\n $TCNF = 0;\r\n $TRGT = 0;\r\n $TNIT = 0;\r\n /************************/\r\n\r\n\r\n \r\n\r\n\r\n\t\trequire_once('components/pdf/fpdf/fpdf.php');\r\n\t\trequire_once('components/pdf/fpdi/fpdi.php');\r\n\r\n\t\t// initiate FPDI\t\t\t\r\n\t\t$pdf = new FPDI();\r\n\t\t$pdf->aliasNbPages();\r\n\t\t$pdf->AddPage('L','A4');\r\n\t\t$pdf->SetMargins(0,0,0);\r\n\t\t$pdf->SetAutoPageBreak(true, 17);\r\n\r\n\r\n\r\n\t\t/***** Title Setup *******/\r\n $Border_Tit = 0;\r\n $FontSize_Tit = 12;\r\n $FontSize_Tit2 = 10;\r\n $X_Tit = 6;\r\n $Y_Tit = 5;\r\n $CW_Tit = 286;\r\n $CH_Tit = 6;\r\n /************************/\r\n\t\t\r\n\r\n\t /**************** Title ****************/\r\n\r\n\t $pdf->SetFillColor(209,209,209);\r\n\t\t$pdf->SetFont($font_name);\r\n\t $pdf->SetFont($font_name,'',$FontSize_Tit2);\r\n\t $pdf->SetXY($X_Tit, $Y_Tit);\r\n\t if ($OptionID == 1){\r\n\t \t$pdf->Cell($CW_Tit/3, $CH_Tit, 'Batch Wise Summary', $Border_Tit, 0, 'C', 1);\r\n\t\t}else if ($OptionID == 2){\r\n\t\t\t$pdf->Cell($CW_Tit/3, $CH_Tit, 'Grade Wise Summary', $Border_Tit, 0, 'C', 1);\r\n\t\t}\r\n\r\n\t $pdf->SetFont($font_name,'B',$FontSize_Tit);\r\n\t $pdf->Cell($CW_Tit/3, $CH_Tit, $Adm_Tit, $Border_Tit, 0, 'C', 1);\r\n\r\n\t $pdf->SetFont($font_name,'',$FontSize_Tit2);\r\n\t $pdf->Cell($CW_Tit/3, $CH_Tit, 'Page No', $Border_Tit, 2, 'C', 1);\r\n\r\n\t $pdf->SetFont($font_name,'B',$FontSize_Tit);\r\n\t $pdf->SetXY($X_Tit, $Y_Tit+$CH_Tit);\r\n\t $pdf->Cell($CW_Tit/3, $CH_Tit, $Gde_Tit, $Border_Tit, 0, 'C', 1);\r\n\r\n\t $pdf->SetFont($font_name,'',$FontSize_Tit2);\r\n\t $pdf->Cell($CW_Tit/3, $CH_Tit, 'as of '.$now_date, $Border_Tit, 0, 'C', 1);\r\n\r\n\t $pdf->SetFont($font_name,'B',$FontSize_Tit);\r\n\t $pdf->Cell($CW_Tit/3, $CH_Tit, '1', $Border_Tit, 0, 'C', 1);\r\n\r\n\t /***************************************/\r\n\r\n\r\n\t\t/***** Table Setup *******/ \r\n $Border_Tbl = 1;\r\n $Border_Tbl2 = 0;\r\n $FontSize_Tbl = 8;\r\n $X_Tbl = 6;\r\n $Y_Tbl = 20;\r\n $CW_Tbl = 286;\r\n $CH_Tbl = 9;\r\n $CW_Clc = ($CW_Tbl/2.5);\r\n\t\t$CH_Clc = $CH_Tbl/1.5;\r\n /************************/\r\n\r\n // Calculation Header\r\n\t\t\t$pdf->SetFont($font_name,'B',$FontSize_Tbl);\r\n\t\t\t$pdf->SetXY($X_Tbl, $Y_Tbl);\r\n\t\t\t$pdf->Cell($CW_Clc/3.07, $CH_Clc/1.5, 'Applicants', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t$pdf->Cell($CW_Clc/3, $CH_Clc/1.5, '', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t$pdf->Cell($CW_Clc/2.93, $CH_Clc/1.5, 'Profile', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t$pdf->Cell($CW_Clc/2, $CH_Clc/1.5, 'Assessment', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t$pdf->Cell($CW_Clc/2, $CH_Clc/1.5, 'Discussion', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t$pdf->Cell($CW_Clc/5.25, $CH_Clc/1.5, 'Intermediates', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t$pdf->Cell($CW_Clc/3.23, $CH_Clc/1.5, 'Outcomes', $Border_Tbl, 0, 'C', 1);\r\n\r\n\r\n\t\t$PageNo = 1;\r\n\t\t$i = 1;\r\n\t\t$len = count($data['admission_batch']);\r\n\r\n\t\tforeach ($data['admission_batch'] as $data) {\r\n\r\n\t\t\tif ($i > 7){\r\n\t\t\t\t$i = 1;\r\n\t\t\t\t$pdf->AddPage('L','A4');\r\n\r\n\r\n\t\t\t\t$PageNo++;\r\n\t\t\t\t/***** Title Setup *******/\r\n\t\t $Border_Tit = 0;\r\n\t\t $FontSize_Tit = 12;\r\n\t\t $FontSize_Tit2 = 10;\r\n\t\t $X_Tit = 6;\r\n\t\t $Y_Tit = 5;\r\n\t\t $CW_Tit = 286;\r\n\t\t $CH_Tit = 6;\r\n\t\t /************************/\r\n\t\t\t\t\r\n\r\n\t\t\t /**************** Title ****************/\r\n\r\n\t\t\t $pdf->SetFillColor(209,209,209);\r\n\t\t\t\t$pdf->SetFont($font_name);\r\n\t\t\t $pdf->SetFont($font_name,'',$FontSize_Tit2);\r\n\t\t\t $pdf->SetXY($X_Tit, $Y_Tit);\r\n\t\t\t if ($OptionID == 1){\r\n\t\t\t \t$pdf->Cell($CW_Tit/3, $CH_Tit, 'Batch Wise Summary', $Border_Tit, 0, 'C', 1);\r\n\t\t\t\t}else if ($OptionID == 2){\r\n\t\t\t\t\t$pdf->Cell($CW_Tit/3, $CH_Tit, 'Grade Wise Summary', $Border_Tit, 0, 'C', 1);\r\n\t\t\t\t}\r\n\t\t\t $pdf->SetFont($font_name,'B',$FontSize_Tit);\r\n\t\t\t $pdf->Cell($CW_Tit/3, $CH_Tit, $Adm_Tit, $Border_Tit, 0, 'C', 1);\r\n\r\n\t\t\t $pdf->SetFont($font_name,'',$FontSize_Tit2);\r\n\t\t\t $pdf->Cell($CW_Tit/3, $CH_Tit, 'Page No', $Border_Tit, 2, 'C', 1);\r\n\r\n\t\t\t $pdf->SetFont($font_name,'B',$FontSize_Tit);\r\n\t\t\t $pdf->SetXY($X_Tit, $Y_Tit+$CH_Tit);\r\n\t\t\t $pdf->Cell($CW_Tit/3, $CH_Tit, $Gde_Tit, $Border_Tit, 0, 'C', 1);\r\n\r\n\t\t\t $pdf->SetFont($font_name,'',$FontSize_Tit2);\r\n\t\t\t $pdf->Cell($CW_Tit/3, $CH_Tit, 'as of '.$now_date, $Border_Tit, 0, 'C', 1);\r\n\r\n\t\t\t $pdf->SetFont($font_name,'B',$FontSize_Tit);\r\n\t\t\t $pdf->Cell($CW_Tit/3, $CH_Tit, $PageNo, $Border_Tit, 0, 'C', 1);\r\n\r\n\t\t\t /***************************************/\r\n\r\n\r\n\t\t\t\t/***** Table Setup *******/ \r\n\t\t $Border_Tbl = 1;\r\n\t\t $Border_Tbl2 = 0;\r\n\t\t $FontSize_Tbl = 8;\r\n\t\t $X_Tbl = 6;\r\n\t\t $Y_Tbl = 20;\r\n\t\t $CW_Tbl = 286;\r\n\t\t $CH_Tbl = 9;\r\n\t\t $CW_Clc = ($CW_Tbl/2.5);\r\n\t\t\t\t$CH_Clc = $CH_Tbl/1.5;\r\n\t\t /************************/\r\n\r\n\t\t // Calculation Header\r\n\t\t\t\t\t$pdf->SetFont($font_name,'B',$FontSize_Tbl);\r\n\t\t\t\t\t$pdf->SetXY($X_Tbl, $Y_Tbl);\r\n\t\t\t\t\t$pdf->Cell($CW_Clc/3.07, $CH_Clc/1.5, 'Applicants', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t\t\t$pdf->Cell($CW_Clc/3, $CH_Clc/1.5, '', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t\t\t$pdf->Cell($CW_Clc/2.93, $CH_Clc/1.5, 'Profile', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t\t\t$pdf->Cell($CW_Clc/2, $CH_Clc/1.5, 'Assessment', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t\t\t$pdf->Cell($CW_Clc/2, $CH_Clc/1.5, 'Discussion', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t\t\t$pdf->Cell($CW_Clc/5.25, $CH_Clc/1.5, 'Intermediates', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t\t\t$pdf->Cell($CW_Clc/3.23, $CH_Clc/1.5, 'Outcomes', $Border_Tbl, 0, 'C', 1);\r\n\t\t\t}\r\n\r\n\t\t\t// Veriable\r\n\t\t\t$Clc_TotalForm = $data->total_forms;\r\n\t\t\t$Clc_InProcess = 0;\r\n\t $Clc_ReAllocated = $data->re_allocated;\r\n\t $Clc_Settled = 0;\r\n\t $Clc_Followup = 0;\r\n\r\n\t $Clc_Batch = $data->batch;\r\n\t $Clc_BatchDate = $data->batch_date;\r\n\r\n\t $Clc_boy = $data->gender_b;\r\n\t $Clc_Girl = $data->gender_g;\r\n\r\n\t $Clc_Sib = $data->siblings;\r\n\t $Clc_PetSib = $data->pet;\r\n\r\n\t $Clc_AAplus = $data->ass_ap;\r\n\t $Clc_AA = $data->ass_a;\r\n\t $Clc_AAminus = $data->ass_am;\r\n\t $Clc_ABplus = $data->ass_bp;\r\n\t $Clc_AB = $data->ass_b;\r\n\t $Clc_ABminus = $data->ass_bm;\r\n\t $Clc_AC = $data->ass_c;\r\n\t $Clc_AD = $data->ass_d;\r\n\t $Clc_ACfd = $data->ass_cfd;\r\n\t $Clc_AWil = $data->ass_wl;\r\n\t $Clc_AOhd = $data->ass_oh;\r\n\t $Clc_ARgt = $data->ass_rgr + $data->ass_rgr_pre;\r\n\r\n\t $Clc_DAplus = $data->dsc_ap;\r\n\t $Clc_DA = $data->dsc_a;\r\n\t $Clc_DAminus = $data->dsc_am;\r\n\t $Clc_DBplus = $data->dsc_bp;\r\n\t $Clc_DB = $data->dsc_b;\r\n\t $Clc_DBminus = $data->dsc_bm;\r\n\t $Clc_DC = $data->dsc_c;\r\n\t $Clc_DD = $data->dsc_d;\r\n\t $Clc_DOfr = $data->dsc_tbo + $data->inter_ofd + $data->adm_cnf + $data->dsc_total;\r\n\t $Clc_DWil = $data->dsc_wl;\r\n\t $Clc_DOhd = $data->dsc_oh;\r\n\t $Clc_DRgt = $data->dsc_rgr + $data->dsc_rgr_pre;\r\n\r\n\t $Clc_TWil = $data->inter_wl;\r\n\t $Clc_TOhd = $data->inter_oh;\r\n\t $Clc_TOfd = $data->inter_ofd + $data->adm_cnf;\r\n\t $Clc_TCnf = 0;\r\n\t $Clc_TNit = $data->ass_total + $data->dsc_total;\r\n\t $Clc_TRgt = $data->ass_rgr + $data->dsc_rgr;\r\n\t //$Clc_TInp = 0;\r\n\r\n\t \r\n\t $Clc_TAst = $Clc_AAplus + $Clc_AA + $Clc_AAminus + $Clc_ABplus + $Clc_AB + $Clc_ABminus + $Clc_AC + $Clc_AD;\r\n\t $Clc_TDis = $Clc_DAplus + $Clc_DA + $Clc_DAminus + $Clc_DBplus + $Clc_DB + $Clc_DBminus + $Clc_DC + $Clc_DD;\r\n\t $Clc_CNF = $data->adm_cnf;\r\n\r\n\t if ($data->batch_case == 'AND'){\r\n\t \t$Clc_ACfd = $Clc_DOfr + $Clc_DWil + $Clc_DOhd + $Clc_DRgt;\r\n\t }else if ($data->batch_case == 'ASO'){\r\n\t \t$Clc_ACfd = $data->ass_cfd + $Clc_TDis;\r\n\t }\r\n\r\n\t $Clc_Settled = $Clc_CNF + $Clc_TNit + $Clc_TRgt;\r\n\t\t\t$Clc_InProcess = $Clc_TotalForm - $Clc_Settled;\r\n\t\t\t\r\n\r\n\t\t\t$X_Clc = 6;\r\n\t\t\t$Y_Clc = 7 + ($CH_Tbl*2.5) * $i;\r\n\t\t\t$CW_Clc = ($CW_Tbl/2.5);\r\n\t\t\t$CH_Clc = $CH_Tbl/1.5;\r\n\r\n\r\n\r\n\t\t\t// Calculation First Line\r\n\t\t\t$pdf->SetTextColor(96,96,96);\r\n\t\t\t$pdf->SetFont($font_name,'',$FontSize_Tbl);\r\n\t\t\t$pdf->SetXY($X_Clc, $Y_Clc);\r\n\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, 'T Forms Sub', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, 'In Process', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell($CW_Clc/3, $CH_Clc, '', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, 'Girls', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, 'Boys', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A+', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A-', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B+', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B-', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'C', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'D', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A+', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A-', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B+', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B-', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'C', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'D', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, 'WL', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, 'OH', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, 'F/U', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, \"CNF'D\", $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, \"RGT'D\", $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, \"ABT'D\", $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t// Calculation Second Line\r\n\t\t\t$X_Clc = $X_Tbl;\r\n\t\t\t$Y_Clc = 11 + ($CH_Tbl*2.5) * $i;\r\n\t\t\t$CW_Clc = ($CW_Tbl/2.5);\r\n\t\t\t$CH_Clc = $CH_Tbl/1.5;\r\n\r\n\t\t\t$pdf->SetTextColor(0,0,0);\r\n\t\t\t$pdf->SetFont($font_name,'B',$FontSize_Tbl+1);\r\n\t\t\t$pdf->SetXY($X_Clc, $Y_Clc);\r\n\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, $Clc_TotalForm, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, $Clc_InProcess, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->SetFont($font_name,'B',$FontSize_Tbl+3);\r\n\t\t\t$pdf->Cell($CW_Clc/3, $CH_Clc, $Clc_Batch, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->SetFont($font_name,'B',$FontSize_Tbl+1);\r\n\t\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, $Clc_Girl, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, $Clc_boy, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_AAplus, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_AA, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_AAminus, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_ABplus, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_AB, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_ABminus, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_AC, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_AD, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_DAplus, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_DA, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_DAminus, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_DBplus, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_DB, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_DBminus, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_DC, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $Clc_DD, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, $Clc_TWil, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, $Clc_TOhd, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, $Clc_Followup, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, $Clc_CNF, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, $Clc_TRgt, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, $Clc_TNit, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t\r\n\t\t\t// Calculation 3rd Line\r\n\t\t\t$X_Clc = $X_Tbl;\r\n\t\t\t$Y_Clc = 17 + ($CH_Tbl*2.5) * $i;\r\n\t\t\t$CW_Clc = ($CW_Tbl/2.5);\r\n\t\t\t$CH_Clc = $CH_Tbl/1.5;\r\n\r\n\t\t\t$pdf->SetTextColor(96,96,96);\r\n\t\t\t$pdf->SetFont($font_name,'',$FontSize_Tbl);\r\n\t\t\t$pdf->SetXY($X_Clc, $Y_Clc);\r\n\t\t\tif ($OptionID == 2){\r\n\t\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, '', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t}else {\r\n\t\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, 'Re-Allocated', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t}\r\n\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, 'Settled', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell($CW_Clc/3, $CH_Clc, $Clc_BatchDate, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, 'Siblings', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, \"Pet's\", $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/3, $CH_Clc, \"T ASS'D\", $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, '> CFD', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, 'WL', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, '*OH*', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, 'TBR', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/3, $CH_Clc, \"T DIS'D\", $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, '> TBO', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, 'WL', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, '*OH*', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, 'TBR', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/5.25), $CH_Clc, \"OFR'D\", $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/3.2), $CH_Clc, 'INP', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t// Calculation 4th Line\r\n\t\t\t$X_Clc = $X_Tbl;\r\n\t\t\t$Y_Clc = 21 + ($CH_Tbl*2.5) * $i;\r\n\t\t\t$CW_Clc = ($CW_Tbl/2.5);\r\n\t\t\t$CH_Clc = $CH_Tbl/1.5;\r\n\r\n\t\t\t$pdf->SetTextColor(0,0,0);\r\n\t\t\t$pdf->SetFont($font_name,'B',$FontSize_Tbl+1);\r\n\t\t\t$pdf->SetXY($X_Clc, $Y_Clc);\r\n\t\t\tif ($OptionID == 2){\r\n\t\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, '', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t}else{\r\n\t\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, $Clc_ReAllocated, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t}\r\n\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, $Clc_Settled, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell($CW_Clc/3, $CH_Clc, '', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, $Clc_Sib, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, $Clc_PetSib, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/3, $CH_Clc, $Clc_TAst, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $Clc_ACfd, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $Clc_AWil, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $Clc_AOhd, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $Clc_ARgt, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/3, $CH_Clc, $Clc_TDis, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $Clc_DOfr, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $Clc_DWil, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $Clc_DOhd, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $Clc_DRgt, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/5.25), $CH_Clc, $Clc_TOfd, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t$pdf->Cell(($CW_Clc/3.2), $CH_Clc, $Clc_InProcess, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t\t// Formatting\r\n\r\n\t\t\t$X_Clc = 6;\r\n\t\t\t$Y_Clc = 5 + ($CH_Tbl*2.5) * $i;\r\n\t\t\t$CW_Clc = ($CW_Tbl/2.5);\r\n\t\t\t$CH_Clc = $CH_Tbl*2.5;\r\n\r\n\t\t\t$pdf->SetXY($X_Clc, $Y_Clc);\r\n\t\t\t$pdf->Cell($CW_Clc/3.07, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t\t$pdf->Cell($CW_Clc/3, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t\t$pdf->Cell($CW_Clc/2.93, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t\t$pdf->Cell($CW_Clc/2, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t\t$pdf->Cell($CW_Clc/2, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t\t$pdf->Cell($CW_Clc/5.25, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t\t$pdf->Cell($CW_Clc/3.23, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\r\n\r\n\t\t\t$TForms += $Clc_TotalForm;\r\n\t\t\t$TInprocess += $Clc_InProcess;\r\n\t $TReAllocated += $Clc_ReAllocated;\r\n\t $TSettled += $Clc_Settled;\r\n\r\n\t $TGirls += $Clc_Girl;\r\n\t $TBoys += $Clc_boy;\r\n\t $TSiblings += $Clc_Sib;\r\n\t $TPets += $Clc_PetSib;\r\n\r\n\t $TAAP += $Clc_AAplus;\r\n\t $TAA += $Clc_AA;\r\n\t $TAAM += $Clc_AAminus;\r\n\t $TABP += $Clc_ABplus;\r\n\t $TAB += $Clc_AB;\r\n\t $TABM += $Clc_ABminus;\r\n\t $TAC += $Clc_AC;\r\n\t $TAD += $Clc_AD;\r\n\t $TASD += $Clc_TAst;\r\n\t $TACFD += $Clc_ACfd;\r\n\t $TAWL += $Clc_AWil;\r\n\t $TAOH += $Clc_AOhd;\r\n\t $TARGR += $Clc_ARgt;\r\n\r\n\t $TDAP += $Clc_DAplus;\r\n\t $TDA += $Clc_DA;\r\n\t $TDAM += $Clc_DAminus;\r\n\t $TDBP += $Clc_DBplus;\r\n\t $TDB += $Clc_DB;\r\n\t $TDBM += $Clc_DBminus;\r\n\t $TDC += $Clc_DC;\r\n\t $TDD += $Clc_DD;\r\n\t $TDSC += $Clc_TDis;\r\n\t $TDOFR += $Clc_DOfr;\r\n\t $TDWL += $Clc_DWil;\r\n\t $TDOH += $Clc_DOhd;\r\n\t $TDRGR += $Clc_DRgt;\r\n\r\n\t $TWL += $Clc_TWil;\r\n\t $TOH += $Clc_TOhd;\r\n\t $TFU += 0;\r\n\t $TOFD += $Clc_TOfd;\r\n\r\n\t $TCNF += $Clc_CNF;\r\n\t $TRGT += $Clc_TRgt;\r\n\t $TNIT += $Clc_TNit;\r\n\r\n\r\n\r\n\t\t $i++;\r\n\r\n\t\t\t/***************************************/\r\n\t\t}\r\n\r\n\r\n\t\t\r\n\t\t$X_Clc1 = $X_Tbl;\r\n\t\t$Y_Clc1 = $Y_Clc+($CH_Clc)+($len/$PageNo);\r\n\t\t$CW_Clc = ($CW_Tbl/2.5);\r\n\t\t$CH_Clc = $CH_Tbl/1.5;\r\n\r\n\t\t// Calculation First Line\r\n\t\t$pdf->SetTextColor(96,96,96);\r\n\t\t$pdf->SetFont($font_name,'',$FontSize_Tbl);\r\n\t\t$pdf->SetXY($X_Clc1, $Y_Clc1);\r\n\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, 'T Forms Sub', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, 'In Process', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell($CW_Clc/3, $CH_Clc, '', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, 'Girls', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, 'Boys', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A+', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A-', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B+', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B-', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'C', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'D', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A+', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'A-', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B+', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'B-', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'C', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, 'D', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, 'WL', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, 'OH', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, 'F/U', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, \"CNF'D\", $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, \"RGT'D\", $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, \"ABT'D\", $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t// Calculation Second Line\r\n\t\t$pdf->SetTextColor(0,0,0);\r\n\t\t$X_Clc1 = $X_Tbl;\r\n\t\t$Y_Clc1 = $Y_Clc+($CH_Clc*4.5)+($len/$PageNo);\r\n\t\t$CW_Clc = ($CW_Tbl/2.5);\r\n\t\t$CH_Clc = $CH_Tbl/1.5;\r\n\r\n\t\t$pdf->SetFont($font_name,'B',$FontSize_Tbl+1);\r\n\t\t$pdf->SetXY($X_Clc1, $Y_Clc1);\r\n\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, $TForms, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, $TInprocess, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->SetFont($font_name,'B',$FontSize_Tbl+3);\r\n\t\t$pdf->Cell($CW_Clc/3, $CH_Clc, $Gde_Tit, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->SetFont($font_name,'B',$FontSize_Tbl+1);\r\n\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, $TGirls, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, $TBoys, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TAAP, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TAA, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TAAM, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TABP, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TAB, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TABM, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TAC, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TAD, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TDAP, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TDA, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TDAM, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TDBP, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TDB, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TDBM, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TDC, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/8, $CH_Clc, $TDD, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, $TWL, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, $TOH, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/5.25)/3, $CH_Clc, $TFU, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, $TCNF, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, $TRGT, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/3.2)/3, $CH_Clc, $TNIT, $Border_Tbl2, 0, 'C', 0);\r\n\t\t\r\n\t\t// Calculation 3rd Line\r\n\t\t$pdf->SetTextColor(96,96,96);\r\n\t\t$X_Clc1 = $X_Tbl;\r\n\t\t$Y_Clc1 = $Y_Clc+($CH_Clc*5.5)+($len/$PageNo);\r\n\t\t$CW_Clc = ($CW_Tbl/2.5);\r\n\t\t$CH_Clc = $CH_Tbl/1.5;\r\n\r\n\t\t$pdf->SetFont($font_name,'',$FontSize_Tbl);\r\n\t\t$pdf->SetXY($X_Clc1, $Y_Clc1);\r\n\t\tif ($OptionID == 2){\r\n\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, '', $Border_Tbl2, 0, 'C', 0);\r\n\t\t}else {\r\n\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, 'Re-Allocated', $Border_Tbl2, 0, 'C', 0);\r\n\t\t}\r\n\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, 'Settled', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell($CW_Clc/3, $CH_Clc, '', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, 'Siblings', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, \"Pet's\", $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/2)/3, $CH_Clc, \"T ASS'D\", $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, '> CFD', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, 'WL', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, '*OH*', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, 'TBR', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/2)/3, $CH_Clc, \"T DIS'D\", $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, '> TBO', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, 'WL', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, '*OH*', $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, 'TBR', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/5.25), $CH_Clc, \"OFR'D\", $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/3.2), $CH_Clc, 'INP', $Border_Tbl2, 0, 'C', 0);\r\n\t\t\r\n\t\t// Calculation 4th Line\r\n\t\t$pdf->SetTextColor(0,0,0);\r\n\t\t$X_Clc1 = $X_Tbl;\r\n\t\t$Y_Clc1 = $Y_Clc+($CH_Clc*6.2)+($len/$PageNo);\r\n\t\t$CW_Clc = ($CW_Tbl/2.5);\r\n\t\t$CH_Clc = $CH_Tbl/1.5;\r\n\r\n\t\t$pdf->SetFont($font_name,'B',$FontSize_Tbl+1);\r\n\t\t$pdf->SetXY($X_Clc1, $Y_Clc1);\r\n\t\tif ($OptionID == 2){\r\n\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, '', $Border_Tbl2, 0, 'C', 0);\r\n\t\t}else{\r\n\t\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, $TReAllocated, $Border_Tbl2, 0, 'C', 0);\r\n\t\t}\r\n\t\t$pdf->Cell(($CW_Clc/3.07)/2, $CH_Clc, $TSettled, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell($CW_Clc/3, $CH_Clc, '', $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, $TSiblings, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2.93)/2, $CH_Clc, $TPets, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/2)/3, $CH_Clc, $TASD, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $TACFD, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $TAWL, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $TAOH, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $TARGR, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/2)/3, $CH_Clc, $TDSC, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $TDOFR, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $TDWL, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $TDOH, $Border_Tbl2, 0, 'C', 0);\r\n\t\t$pdf->Cell(($CW_Clc/2)/6, $CH_Clc, $TDRGR, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/5.25), $CH_Clc, $TOFD, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t$pdf->Cell(($CW_Clc/3.2), $CH_Clc, $TInprocess, $Border_Tbl2, 0, 'C', 0);\r\n\r\n\t\t// Formatting\r\n\r\n\t\t$X_Clc1 = $X_Tbl;\r\n\t\t$Y_Clc1 = $Y_Clc+($CH_Clc*3.5)+($len/$PageNo);\r\n\t\t$CW_Clc = ($CW_Tbl/2.5);\r\n\t\t$CH_Clc = $CH_Tbl*2.5;\r\n\r\n\t\t$pdf->SetXY($X_Clc1, $Y_Clc1);\r\n\t\t$pdf->Cell($CW_Clc/3.07, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t$pdf->Cell($CW_Clc/3, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t$pdf->Cell($CW_Clc/2.93, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t$pdf->Cell($CW_Clc/2, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t$pdf->Cell($CW_Clc/2, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t$pdf->Cell($CW_Clc/5.25, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\t$pdf->Cell($CW_Clc/3.2, $CH_Clc, '', $Border_Tbl, 0, 'C', 0);\r\n\t\r\n\r\n\t\t$this->load->model('staff/staff_registered_model');\r\n\t\t$this->data['staff_registered_data'] = $this->staff_registered_model->get_by(array('user_id' => (int)$this->session->userdata('user_id')));\r\n\t if (!empty($this->data['staff_registered_data'][0])){\r\n\t \t$Username = ucwords($this->data['staff_registered_data'][0]->abridged_name);\r\n\t } else {\r\n\t \t$Username = 'UserName';\r\n\t\t}\r\n\t $pdf->SetTextColor(255,255,255);\r\n\t $pdf->SetFont($font_name,'',7.5);\r\n\t $pdf->SetFillColor(0,0,0);\r\n\t $pdf->SetXY(233, 189);\r\n\t $pdf->Cell(60, 4, date('D-d-M-Y H:i') . ' (' . $Username . ')', 0, 0, 'R', true);\r\n\t \r\n\t \r\n\t\t// Output the new PDF\r\n\t\t$pdf->Output($Gde_Tit . '.pdf', 'I');\r\n }", "public function actionInquiryReport()\n {\n $s_date='';\n $e_date='';\n $export = Yii::$app->request->get('export');\n $search = Yii::$app->request->get('search');\n if(isset($export) && !isset($search)) {\n $this->InquiryExport();\n }\n else{\n if (isset(Yii::$app->request->queryParams['BookingSearch']['start_date']))\n $s_date = Yii::$app->request->queryParams['BookingSearch']['start_date'];\n if (isset(Yii::$app->request->queryParams['BookingSearch']['end_date']))\n $e_date = Yii::$app->request->queryParams['BookingSearch']['end_date'];\n if($s_date=='')\n $s_date = date(\"M-d-Y\");\n if($e_date=='')\n $e_date = date(\"M-d-Y\");\n $searchModel = new RecordInquirySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('inquiry_index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 's_date' => $s_date,\n 'e_date' => $e_date,\n ]);\n }\n\n }", "public function export_company_generate_invoice($id) \n {\n $tenant_id = $this->tenant_id;\n \n if (empty($id)) \n {\n return show_404();\n }\n// $result = $this->classtraineemodel->get_enroll_invoice($id);\n \n $result = $this->classtraineemodel->get_company_enroll_invoice($id);\n //added by pritam to generate previous invoice number\n $result->previous_inv_id = $this->classtraineemodel->get_enroll_prev_invoice($result->invoice_id);\n \n //sk st\n $discount = $this->classtraineemodel->get_discount($result->pymnt_due_id);\n $result->discount_label = $discount->discount_type;\n $result->discount_rate = $discount->discount_rate;\n //sk ed\n \n //\n $result->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($result->tenant_state), ', ');\n $result->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($result->tenant_country), ', ');\n $result->inv_year = date('Y', strtotime($result->inv_date));\n $result->inv_date = date('d/m/Y', strtotime($result->inv_date));\n $result->discount_label = rtrim($this->course->get_metadata_on_parameter_id($result->discount_type), ', ');\n if ($result->total_gst) {\n $result->gst_label = 'GST ON, ' . rtrim($this->course->get_metadata_on_parameter_id($result->gst_rule), ', ');\n } else {\n $result->gst_label = 'GST OFF';\n }\n $course_manager = $this->course->get_managers($courses->crse_manager);\n $length = stripos($course_manager, ', ');\n $result->course_manager = (!empty($length)) ? substr($course_manager, 0, $length) : $course_manager;\n if ($result->company_id[0] == 'T') {\n $result->company_name = $result->tenant_name;\n $result->company_details->comp_state = $result->tenant_state;\n $result->company_details->comp_cntry = $result->tenant_country;\n $result->company_details->comp_phone = $result->tenant_contact_num;\n $result->company_details->comp_address = $result->tenant_address;\n \n $company_person = $this->company->get_company_user($result->tenant_id, $result->company_id);//sk1\n $result->company_person_name = $company_person[0]->first_name;//sk2\n \n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $result->company_id);\n $result->company_details = $company_details[0];\n $result->company_details->comp_state = rtrim($this->course->get_metadata_on_parameter_id($result->company_details->comp_state), ', ');\n $result->company_details->comp_cntry = rtrim($this->course->get_metadata_on_parameter_id($result->company_details->comp_cntry), ', ');\n\n $result->company_name = $company_details[0]->company_name;\n \n $company_person = $this->company->get_company_user($this->tenant_id, $result->company_id);//skm1\n $result->company_person_name = $company_person[0]->first_name;//skm2\n \n }\n\n $result->total_inv_discnt = round($result->total_inv_discnt, 2);\n $result->total_unit_fees = round($result->total_unit_fees, 2);\n $result->total_inv_subsdy = round($result->total_inv_subsdy, 2);\n $result->gst_rate = round($result->gst_rate, 2);\n\n $result->indi_disc_total = ($result->class_fees * ($result->discount_rate / 100));\n\n $feesdue = $result->total_unit_fees - $result->total_inv_discnt;\n $result->payment_due_details = $this->classtraineemodel->get_company_payment_due_details($id);\n \n $company_received = $this->classtraineemodel->company_payment_recd($result->invoice_id);\n $user_paid = array();\n foreach ($company_received as $k => $v) {\n $user_paid[$v->user_id] = round($v->amount_recd,2);\n }\n $company_refunded = $this->classtraineemodel->company_payment_refund($result->invoice_id);\n $user_refund = array();\n foreach ($company_refunded as $k => $v) {\n $user_refund[$v->user_id] = round($v->refund_amount,2);\n }\n foreach($result->payment_due_details as $key=>$val)\n {\n $received = empty($user_paid[$val->user_id]) ? 0 : $user_paid[$val->user_id];\n $refunded = empty($user_refund[$val->user_id]) ? 0 : $user_refund[$val->user_id];\n $inv_amt+=$val->total_amount_due;\n $received_amt+=$received;\n $refunded_amt+=$refunded;\n if((($val->total_amount_due + $refunded) - $received) <= 0)\n {\n $payment_label = 'PAID';\n }\n else\n { \n \n if($received > 0 && $val->payment_status == 'PARTPAID')\n {\n $payment_label = 'PART PAID';\n \n }else if($refunded > 0)\n { \n $payment_label = 'REFUNDED'; \n } \n else\n { \n if($received == 0)\n {\n $payment_label = 'NOT PAID';\n }\n else if($received > 0)\n {\n $payment_label = 'PART PAID';\n }\n }\n }\n $result->payment_due_details[$key]->payment_label = $payment_label;\n }\n \n $payable_amount=$inv_amt-$received_amt; \n $result->payble_amount=$inv_amt+$refunded_amt-$received_amt;\n\n $this->load->helper('pdf_reports_helper');\n if($tenant_id =='T17'){\n generate_company_pdf_invoice_everest($result);\n }else{\n generate_company_pdf_invoice_all($result);\n }\n \n }", "function meetingAttendanceReport($args, &$request){\r\n\t\timport ('classes.meeting.form.MeetingAttendanceReportForm');\r\n\t\tparent::validate();\r\n\t\t$this->setupTemplate();\r\n\t\t$meetingAttendanceReportForm= new MeetingAttendanceReportForm($args, $request);\r\n\t\t$isSubmit = Request::getUserVar('generateMeetingAttendance') != null ? true : false;\r\n\t\t\r\n\t\tif ($isSubmit) {\r\n\t\t\t$meetingAttendanceReportForm->readInputData();\r\n\t\t\tif($meetingAttendanceReportForm->validate()){\t\r\n\t\t\t\t\t$this->generateMeetingAttendanceReport($args);\r\n\t\t\t}else{\r\n\t\t\t\tif ($meetingAttendanceReportForm->isLocaleResubmit()) {\r\n\t\t\t\t\t$meetingAttendanceReportForm->readInputData();\r\n\t\t\t\t}\r\n\t\t\t\t$meetingAttendanceReportForm->display($args);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t$meetingAttendanceReportForm->display($args);\r\n\t\t}\r\n\t}", "function get_list()\n\t{\n\t\t$type = $this->uri->segment(3);\n\t\t$key = $this->uri->segment(4);\n\t\t$data[\"student_report\"] = STUDENT_REPORT;\n\n\t\tif($type && $key){\n\t\t\t$data[\"report_key\"] = $key;\n\t\t\t$data[\"report_type\"] = $type;\n\t\t\tswitch($type){\n\t\t\t\tcase \"student\":\n\t\t\t\t\t$this->load->model(\"student_model\",\"student\");\n\t\t\t\t\t$person = $this->student->get($key,\"stuFirst,stuLast,stuNickname,student.*,(`baseGrade`+\" . get_current_year() . \"-`baseYear`) as stuGrade\");\n\t\t\t\t\t$title = sprintf(\"for %s\" , format_name($person->stuFirst,$person->stuLast, $person->stuNickname));\n\t\t\t\t\t$data[\"kStudent\"] = $key;\n\n\t\t\t\t\t//$data[\"target\"] = \"report/\" . $type . \"_list\";\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"teacher\":\n\t\t\t\t\t$this->load->model(\"teacher_model\",\"teacher\");\n\t\t\t\t\t$person = $this->teacher->get($key,\"teachFirst,teachLast,dbRole,isAdvisor,gradeStart,gradeEnd,kTeach\");\n\t\t\t\t\t$title = sprintf(\"by %s %s\", $person->teachFirst,$person->teachLast);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"advisor\":\n\t\t\t\t\t$this->load->model(\"teacher_model\",\"teacher\");\n\t\t\t\t\t$person = $this->teacher->get($key,\"teachFirst as advisorFirst,teachLast as advisorLast,dbRole,isAdvisor,gradeStart,gradeEnd,kTeach\");\n\t\t\t\t\t$title = sprintf(\"to %s %s\",$person->advisorFirst,$person->advisorLast);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$options = array();\n\t\t\tif($this->input->get(\"date_start\") && $this->input->get(\"date_end\")){\n\t\t\t\t$date_start = $this->input->get(\"date_start\");\n\t\t\t\t$date_end = $this->input->get(\"date_end\");\n\t\t\t\t$options[\"date_range\"][\"date_start\"] = $date_start;\n\t\t\t\t$options[\"date_range\"][\"date_end\"] = $date_end;\n\n\t\t\t\t//$this->session->set_userdata(\"date_start\",$date_start);\n\t\t\t\t//$this->session->set_userdata(\"date_end\",$date_end);\n\t\t\t\tbake_cookie(\"date_start\", $date_start);\n\t\t\t\tbake_cookie(\"date_end\", $date_end);\n\t\t\t}\n\n\t\t\tif($this->input->get(\"category\")){\n\t\t\t\t$options[\"category\"] = $this->input->get(\"category\");\n\t\t\t}\n\n\t\t\t$data[\"options\"] = $options;\n\t\t\t$data[\"target\"] = \"report/list\";\n\t\t\t$data[\"person\"] = $person;\n\n\t\t\t$data[\"reports\"] = $this->report->get_list($type,$key,$options);\n\t\t\t$data[\"type\"] = $type;\n\t\t\t$data[\"title\"] = sprintf(\"%ss Submitted %s\", $data[\"student_report\"], $title);\n\t\t\t$this->load->view(\"page/index\",$data);\n\n\n\t\t}\n\t}", "public function hrEmpLeaveReport(Request $request, $type=null){\n $data['post_data'] = $request->all();\n //$userInfo = $this->getEmployeeInfo( null,3883);\n if ($type == 'pdf' && $request->users !=''){\n //$userInfo = $this->getEmployeeInfo( null, $request->users);\n\n $year = $request->year?$request->year:date(\"Y\");\n\n $data['user_id'] = $request->users;\n $data['year'] = $year;\n $data['leave_policys'] = self::getLeavePolicy($year,$request->users);\n\n $data['report_title'] = 'Leave Report - '. $year;\n $data['filename'] = 'leave_report_pdf';\n $data['orientation'] = \"P\";\n $data['branch_address'] = getUserInfoFromId(Auth::user()->id)->address;\n $data['signatures']=['Prepared by','Checked by','Approved by'];\n $view='HR.leave_report.leave_report_pdf';\n PdfHelper::exportPdf($view,$data);\n }else if(!empty($data['post_data'])){\n $data['emp_info'] = employeeInfo($request->users);\n $data['leave_summery'] = $this->getEmployeeLeaveInfo($request->users,'');\n }\n\n return view('HR.leave_report.leave_report', $data);\n\n }", "public function payments_due_report_pdf() {\n $tenant_id = $this->tenant_id;\n $executive = array('' => 'Select');\n foreach ($this->reportsModel->get_sales_executive($tenant_id)->result() as $item) {\n $executive[$item->user_id] = $item->user_name;\n }\n $salesexec = $this->input->get('salesexec');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'ei.invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $tabledata = $this->reportsModel->get_payment_due($tenant_id, NULL, NULL, $field, $order_by, $salesexec, $start_date, $end_date);\n $tabledata_count = count($tabledata);\n $invs = array();\n for ($i = 0; $i < $tabledata_count; $i++) {\n $invs[] = $tabledata[$i]->invoice_id;\n }\n $tb_recd = $this->reportsModel->get_payment_recd_sum($invs);\n $tabledatarecd = array();\n for ($i = 0; $i < count($tb_recd); $i++) {\n $tabledatarecd[$tb_recd[$i]->invoice_id] = $tb_recd[$i]->amount_recd;\n }\n $tb_refund = $this->reportsModel->get_payment_refund_sum($invs);\n $tabledatarefund = array();\n for ($i = 0; $i < count($tb_refund); $i++) {\n $tabledatarefund[$tb_refund[$i]->invoice_id] = $tb_refund[$i]->amount_refund;\n }\n $tenant_details = $this->classTraineeModel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n $this->load->helper('pdf_reports_helper');\n return payments_due_report_pdf($tabledatarefund, $tabledatarecd, $tabledata, $tenant_details, $executive);\n }", "function AfterAdd(&$values,&$keys,$inline,&$pageObject)\n{\n\n\t\tglobal $conn;\n\n$attend_id=$values['attend_id'];\n\n//select shecdule ID from timetable\n$sql_at= \"SELECT scheduleID,courseID,date,(end_time-start_time) AS hour FROM schedule_timetable WHERE id='$attend_id'\";\n$query_at=db_query($sql_at,$conn);\n$row_at=db_fetch_array($query_at);\n\n$scheduleID=$row_at['scheduleID'];\n\n//select related schedule id from schedule\n$sql_at2= \"SELECT programID,batchID,groupID FROM schedule WHERE scheduleID='$scheduleID'\";\n$query_at2=db_query($sql_at2,$conn);\n$row_at2=db_fetch_array($query_at2);\n\n$program=$row_at2['programID'];\n$batch=$row_at2['batchID'];\n$class=$row_at2['groupID'];\n\n//update program , batch, class to student_attendance table\n$date=$row_at['date'];\n$hour=$row_at['hour'];\n$course=$row_at['courseID'];\n$id=$keys['id'];\n$sql_up= \"Update student_attendance set programID ='$program', batchID='$batch',class='$class',course='$course',date='$date',hour='$hour' where id='$id'\";\n$query_up=db_exec($sql_up,$conn);\n\n//query the total hour for this module\n$sql_th= \"SELECT total_hour FROM program_course WHERE programID='$program' && CourseID=$course\";\n$query_th=db_query($sql_th,$conn);\n$row_th=db_fetch_array($query_th);\n\n$totalhour=$row_th['total_hour'];\n//the percentage wight of absentee ( $hour/$totalhour)\n$weight_absent=($hour/$totalhour*100);\n\n//query current attendance status for this student, program , module\n$studentID=$values['StudentID'];\n$sql_at3=\"SELECT Attendance FROM student_course WHERE StudentID=$studentID AND programID=$program AND CourseID=$course AND Exam_Remark IS NULL\";\n$query_at3=db_query($sql_at3,$conn);\n$row_at3=db_fetch_array($query_at3);\n\n$current_attendance=$row_at3['Attendance'];\n//update student_course attendance\n\n$net_attendance=$current_attendance-$weight_absent;\n\n$sql_ups= \"Update student_course SET Attendance='$net_attendance' where StudentID='$studentID' && programID='$program' && CourseID=$course AND Exam_Remark IS NULL\";\n$query_ups=db_exec($sql_ups,$conn);\n;\t\t\n}", "public function booking_acknowledge_company_pdf($trainee_ids, $class_id, $company) \n {\n $tenant_id = $this->tenant_id;\n $trainee_allid = explode('-', $trainee_ids);\n $tr_count = 0;\n foreach ($trainee_allid as $row) {\n $trainee_id = $row;\n $trainee_name = $this->classtraineemodel->get_trainee_name('', '', $row, $tenant_id);\n $name = $trainee_name->first . ' ' . $trainee_name->last;\n $trainee_names = ($trainee_name->gender == 'MALE') ? 'Mr.' . $name : 'Ms.' . $name;\n $trainee .=$trainee_names . ', ';\n $tr_count++;\n }\n $trainee = rtrim($trainee, ', ');\n\n $company_details = $this->company->get_company_details($tenant_id, $company);\n $classes = $this->class->get_class_details($tenant_id, $class_id);\n $ClassLoc = $this->get_classroom_location($classes->classroom_location, $classes->classroom_venue_oth);\n $courses = $this->course->get_course_detailse($classes->course_id);\n $tenant_details = $this->classtraineemodel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n $courseLevel = rtrim($this->course->get_metadata_on_parameter_id($courses->certi_level), ', ');\n $data = ''; \n if ($tr_count > 0) {\n $contact_details = '';\n if($tenant_details->tenant_id =='T12')\n {\n if (!empty($tenant_details->contact_name))\n {\n $contact_details .=$tenant_details->contact_name . ' ';\n }\n }\n\nif (!empty($tenant_details->tenant_contact_num)) {\n $contact_details .='(Phone: ' . $tenant_details->tenant_contact_num . ', ';\n }\n if (!empty($tenant_details->tenant_email_id)) {\n $contact_details .='Email Id: ' . $tenant_details->tenant_email_id . ')';\n }\n $contact_details = rtrim($contact_details, ', ');\n if ($company[0] == 'T') {\n $company_details->company_name = $tenant_details->tenant_name;\n }\n \n /* skm code start for remark. reporting time skm start bcoz of sam request for AOP(67) on 18-may-17*/\n $time = strtotime($classes->class_start_datetime);\n $reporting_time = date(\"H:i A\", strtotime('-30 minutes', $time));\n if($classes->course_id == 67 || $classes->course_id == 121)\n {\n $li = \"Report at center at $reporting_time to register for class\";\n }else{\n $li = \"Report at center at 8:30 AM to register for class\";\n }\n /* end */\n if($tenant_details->tenant_id == 'T02')\n {\n $li2 = \"<li>In the event of unforeseen circumstances (example: SkillsFuture Credit website is down for maintenance, etc), Cash payment has to be collected from Candidate and Xprienz Pte Ltd will assist in making the appeal for them.</li>\";\n } else {\n $li2 = '';\n } \n ///// added by shubhranshu for wablab points\n if($tenant_details->tenant_id == 'T20' || $tenant_details->tenant_id == 'T17'){\n $li_first = \"<li>Your NRIC, work permit or will be photocopied on the class date</li>\";\n }else{\n $li_first =\"<li>All participants please bring along their photo ID card with either their Nric/Fin number stated upon class date.</li>\";\n }\n $message3 = '\n <ol style=\"font-size:13px;color:#4f4b4b\">\n '.$li_first.'\n \n <li>Trim finger nails and remove nail polish</li>\n <li>'.$li.'</li>\n '.$li2.'\n </ol>';\n \n /* skm end */\n \n $data = '<br><br>\n <table style=\"font-size:15px\">\n <tr>\n <td>'.$tr_count . ' Seats for your company ' . $company_details->company_name . ' has been booked. Booking details for your employees: \n ' . $trainee . ' for \\'Course: <b>' . $courses->crse_name . '</b>, Class: <b>' . $classes->class_name . '</b>, Certificate Code: ' . $courseLevel . '\\'<br><br>\n <strong>Class start date:</strong>\n ' . date('M d, Y h:i A', strtotime($classes->class_start_datetime)) . '\n <br>\n <br>\n <strong>Class end date:</strong>\n ' . date('M d, Y h:i A', strtotime($classes->class_end_datetime)) . '\n <br>\n <br>\n \n <strong>Location: </strong>\n ' . $ClassLoc . '<br><br>\n <strong>Contact Details: </strong>\n ' . $contact_details. '<br><br>\n <strong>Remark: </strong>\n ' . $message3.'</td>\n </tr>\n </table>';\n }\n $booking_details = $this->classtraineemodel->get_paydue_invoice($trainee_id, $class_id);\n if ($booking_details) {\n $booking_no = date('Y', strtotime($booking_details->inv_date)) . ' ' . $booking_details->invoice_id;\n $booking_date = date('d/m/Y', strtotime($booking_details->inv_date));\n } else {\n $booking_no = date('Y') . ' ' . $trainee_id;\n $booking_date = date('d/m/Y');\n }\n $this->load->helper('pdf_reports_helper');\n generate_booking_acknowledge_pdf($data, $tenant_details, $booking_no, $booking_date);\n }", "public function actionMedicalvalidation() {\n\t\tif (\\Yii::$app->SessionCheck->isclientLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t// rendering the layout\n\t\t\t$this->layout = 'main';\n\t\t\t\n\t\t\t$encrypt_component = new EncryptDecryptComponent ();\n\t\t\t$company_detals = array ();\n\t\t\t$company_validation = array ();\n\t\t\t$error_medical_classes = array ();\n\t\t\t$arr_medical_individual_issues = array ();\n\t\t\t$medical_period_issues = array();\n\t\t\t$medical_validation_issues = array();\n\t\t\t$top_ten_employee_id = array();\n\t\t\t\n\t\t\t$get_company_id = \\Yii::$app->request->get ();\n\t\t\t\n\t\t\tif (! empty ( $get_company_id )) {\n\t\t\t\t/**\n\t\t\t\t * Encrypted company ID*\n\t\t\t\t */\n\t\t\t\t$encrypt_company_id = $get_company_id ['c_id'];\n\t\t\t\tif (! empty ( $encrypt_company_id )) {\n\t\t\t\t\t\n\t\t\t\t\t$company_id = $encrypt_component->decryptUser ( $encrypt_company_id ); // Decrypted company Id\n\t\t\t\t\t \n\t\t\t\t\t// / get the company details\n\t\t\t\t\t$company_detals = TblAcaCompanies::find ()->select ( 'company_client_number,company_name' )->where ( 'company_id = :company_id', [ \n\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t] )->one ();\n\t\t\t\t\t\n\t\t\t\t\t// checking if the validation starts for this company\n\t\t\t\t\t\n\t\t\t\t\t$company_validation = TblAcaCompanyValidationStatus::find ()->where ( [ \n\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t'is_initialized' => 1 \n\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t'is_completed' => 0 \n\t\t\t\t\t] )->One ();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * *** getting individual payroll employee validation *******\n\t\t\t\t\t */\n\t\t\t\t\t/**************** pagination ***********************/\t\n\t\t\t\t\t$num_rec_per_page=10;\n\t\t\t\t\n\t\t\t\t\tif (isset($get_company_id['page_id'])) {\n\t\t\t\t\t\t$page = $get_company_id['page_id'];\n\t\t\t\t\t } else {\n\t\t\t\t\t \t$page=1; \n\t\t\t\t\t }\n\t\t\n\t\t\t\t\t$start_from = ($page-1) * $num_rec_per_page;\n\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t\tnow getting the count of total issues \n\t\t\t\t\t**/\t\t\t\t\t\n\t\t\t\t\t$sql = 'SELECT `employee_id` FROM `tbl_aca_medical_validation_log` WHERE `company_id`=' . $company_id . ' GROUP BY employee_id';\n\t\t\t\t\t$medical_validation = \\Yii::$app->db->createCommand ( $sql )->queryAll ();\n\t\t\t\t\t$i=0;\n\t\t\t\t\tforeach($medical_validation as $medical_validation){\n\t\t\t\t\t\t$medical_validation_issues[$i] = $medical_validation['employee_id'];\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$sql = 'SELECT `employee_id` FROM `tbl_aca_medical_enrollment_period_validation_log` WHERE `company_id`=' . $company_id . ' GROUP BY employee_id';\n\t\t\t\t\t$medical_period = \\Yii::$app->db->createCommand ( $sql )->queryAll ();\n\t\t\t\t\t$j=0;\n\t\t\t\t\tforeach($medical_period as $medical_period){\n\t\t\t\t\t\t$medical_period_issues[$j] = $medical_period['employee_id'];\n\t\t\t\t\t\t$j++;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// combining both the issue arrays to combine all the employee ids\t\t\t\t\t\n\t\t\t\t\t$issues_array = array_merge($medical_validation_issues,$medical_period_issues);\n\t\t\t\t\n\t\t\t\t\t// get the unique employee ids\n\t\t\t\t\t$final_employee_ids_array = array_unique($issues_array);\n\t\t\t\t\t$final_employee_ids_array = array_values($final_employee_ids_array);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(count($final_employee_ids_array)> 10){\n\n\t\t\t\t\t\t//pagination\t\t\t\t\t\t\n\t\t\t\t\t\tfor($i=$start_from;$i<($start_from+10);$i++){\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($i<count($final_employee_ids_array)){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//\tif(!empty($final_employee_ids_array[$i])){\n\t\t\t\t\t\t\t\t$top_ten_employee_id[] = $final_employee_ids_array[$i];\n\t\t\t\t\t\t\t//\t}\n\t\t\t\t\t\t\t}else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor($i=0;$i<count($final_employee_ids_array);$i++){\n\t\t\t\t\t\t\t//if(!empty($final_employee_ids_array[$i])){\n\t\t\t\t\t\t\t$top_ten_employee_id[] = $final_employee_ids_array[$i];\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t$medical_details = ArrayHelper::index(TblAcaMedicalData::find ()->where ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $top_ten_employee_id\n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )->asArray()->All (),'employee_id');\n\t\t\t\t\t\t//ArrayHelper::map($array, 'id', 'name')\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t// get the number of issues for individual payroll data\n\t\t\t\t\t$error_individual_medical = ArrayHelper::index(TblAcaMedicalValidationLog::find ()->select(['COUNT(*) AS cnt,employee_id'])->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'<>',\n\t\t\t\t\t\t\t\t'is_validated',\n\t\t\t\t\t\t\t\t1 \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $top_ten_employee_id \n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )->asArray()->All (),'employee_id');\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t// get the number of issues for period payroll data\n\t\t\t\t\t$error_individual_medical_period = ArrayHelper::index(TblAcaMedicalEnrollmentPeriodValidationLog::find ()->select(['COUNT(*) AS cnt,employee_id'])->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'<>',\n\t\t\t\t\t\t\t\t'is_validated',\n\t\t\t\t\t\t\t\t1 \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $top_ten_employee_id \n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )->asArray()->All (),'employee_id');\n\t\t\t\t\t\t\n\t\t\t\t\tif(!empty($medical_details))\t\t\n\t\t\t\t\t{\t\t//print_r($issue_count);\t\t\t\n\t\t\t\t\tforeach($medical_details as $key=>$value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$employee_id = \t$key;\n\t\t\t\t\t\t$medical_issue = '';\n\t\t\t\t\t\t$medical_period_issue = '';\n\t\t\t\t\t\tif(!empty($error_individual_medical[$employee_id]['cnt'])){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$medical_issue = $error_individual_medical[$employee_id]['cnt'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!empty($error_individual_medical_period[$employee_id]['cnt'])){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$medical_period_issue = $error_individual_medical_period[$employee_id]['cnt'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$issue_count = $medical_issue+ $medical_period_issue;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif ($issue_count != 0) {\n\t\t\t\t\t\t\t$hased_medical_employee_id = $encrypt_component->encrytedUser ( $employee_id );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$arr_medical_individual_issues [] = array (\n\t\t\t\t\t\t\t\t//'medical_firstname' => $medical_details->first_name,\n\t\t\t\t\t\t\t\t'medical_firstname' => $value['first_name'],\n\t\t\t\t\t\t\t\t'medical_lastname' => $value['last_name'],\n\t\t\t\t\t\t\t\t'medical_middlename' => $value['middle_name'],\n\t\t\t\t\t\t\t\t'medical_ssn' => $value['ssn'],\n\t\t\t\t\t\t\t\t'issue_count' => $issue_count,\n\t\t\t\t\t\t\t\t'medical_id' => $hased_medical_employee_id ,\n\t\t\t\t\t\t\t\t'company_id' =>$encrypt_company_id\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * *** getting individual payroll employee validation *******\n\t\t\t\t\t */\n\t\t\t\t\t/**************** pagination **********************\n\t\t\t\t\t$num_rec_per_page=10;\n\t\t\t\t\t\n\t\t\t\t\tif (isset($get_company_id['page_id'])) {\n\t\t\t\t\t\t$page = $get_company_id['page_id'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$page=1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$start_from = ($page-1) * $num_rec_per_page;\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t\tnow getting the count of total issues \n\t\t\t\t\t*\n\t\t\t\t\t$medical_validation = TblAcaMedicalValidationLog::find ()->select ( 'employee_id' )->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t] )->All ();\n\t\t\t\t\t\t\n\t\t\t\t\t$arr_validations ['medical_data_validation'] = count($medical_validation);\n\t\t\t\t\t\n\t\t\t\t\t$medical_period = TblAcaMedicalEnrollmentPeriodValidationLog::find ()->select ( 'employee_id' )->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t] )->All ();\n\t\t\t\t\t\t\n\t\t\t\t\t$arr_validations ['medical_data_validation'] += count($medical_period);\n\t\t\t\t\t//print_r($arr_validations ['medical_data_validation']);die();\n\t\t\t\t\t/**\n\t\t\t\t\t * *** getting individual payroll employee validation *******\n\t\t\t\t\t \n\t\t\t\t\tif($arr_validations ['medical_data_validation']>10){\n\t\t\t\t\t\t$error_medical_classes = TblAcaMedicalData::find ()->where ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_validation \n\t\t\t\t\t\t] )->orWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_period \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )\n\t\t\t\t\t\t->offset($start_from)\n\t\t\t\t\t\t->limit($num_rec_per_page)\n\t\t\t\t\t\t\n\t\t\t\t\t\t->All ();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$error_medical_classes = TblAcaMedicalData::find ()->where ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_validation \n\t\t\t\t\t\t] )->orWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_period \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )->All ();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//////// using for pagination\n\t\t\t\t\t$error_medical_classes_count = TblAcaMedicalData::find ()->where ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_validation \n\t\t\t\t\t\t] )->orWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $medical_period \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->groupBy ( [ \n\t\t\t\t\t\t\t\t'employee_id' \n\t\t\t\t\t\t] )->count ();\n\t\t\t\t\t//$searchModel = new TblAcaMedicalErrorSearch();\n\t\t\t\t\t\n\t\t\t\t\t// get the individual payroll employee details\n\t\t\t\t\tforeach ( $error_medical_classes as $error_medical_class ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$medical_details = TblAcaMedicalData::find ()->where ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $error_medical_class->employee_id \n\t\t\t\t\t\t] )->One ();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// get the number of issues for individual medical data\n\t\t\t\t\t\t$error_individual_medical = TblAcaMedicalValidationLog::find ()->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'<>',\n\t\t\t\t\t\t\t\t'is_validated',\n\t\t\t\t\t\t\t\t1 \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $error_medical_class->employee_id \n\t\t\t\t\t\t] )->All ();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// get the number of issues for period medical data\n\t\t\t\t\t\t$error_individual_medical_period = TblAcaMedicalEnrollmentPeriodValidationLog::find ()->where ( [ \n\t\t\t\t\t\t\t\t'company_id' => $company_id \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'<>',\n\t\t\t\t\t\t\t\t'is_validated',\n\t\t\t\t\t\t\t\t1 \n\t\t\t\t\t\t] )->andWhere ( [ \n\t\t\t\t\t\t\t\t'employee_id' => $error_medical_class->employee_id \n\t\t\t\t\t\t] )->Count ();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$issue_count = count ( $error_individual_medical );\n\t\t\t\t\t\t$issue_count += $error_individual_medical_period;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($issue_count > 0) {\n\t\t\t\t\t\t\t$hased_medical_employee_id = $encrypt_component->encrytedUser ( $error_medical_class->employee_id );\n\t\t\t\t\t\t\t$arr_medical_individual_issues [] = array (\n\t\t\t\t\t\t\t\t\t//'medical_firstname' => $medical_details->first_name,\n\t\t\t\t\t\t\t\t\t'medical_firstname' => $medical_details->first_name,\n\t\t\t\t\t\t\t\t\t'medical_lastname' => $medical_details->last_name,\n\t\t\t\t\t\t\t\t\t'medical_middlename' => $medical_details->middle_name,\n\t\t\t\t\t\t\t\t\t'medical_ssn' => $medical_details->ssn,\n\t\t\t\t\t\t\t\t\t'issue_count' => $issue_count,\n\t\t\t\t\t\t\t\t\t'medical_id' => $hased_medical_employee_id ,\n\t\t\t\t\t\t\t\t\t'company_id' =>$encrypt_company_id\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t*/\n\t\t\t\t\t//print_r($arr_medical_individual_issues);die();\n\t\t\t\t\t\t//$dataProvider = $searchModel->search($arr_medical_individual_issues); //dataProvider for grid \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($arr_medical_individual_issues)){\n\t\t\treturn $this->render ( 'medicalvalidation', array (\n\t\t\t\t\t'company_detals' => $company_detals,\n\t\t\t\t\t//'dataProvider'=>$dataProvider,\n\t\t\t\t\t//'searchModel'=>$searchModel,\n\t\t\t\t\t'company_validation' => $company_validation,\n\t\t\t\t\t'encoded_company_id' => $_GET ['c_id'],\n\t\t\t\t\t'arr_medical_individual_issues' => $arr_medical_individual_issues,\n\t\t\t\t\t'total_issue_count' => count($final_employee_ids_array),\n\t\t\t\t\t'error_medical_classes_count' => count($final_employee_ids_array)\n\t\t\t) );\n\t\t\t\n\t\t\t}else{\n\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t'/client/validateforms?c_id=' . $encrypt_company_id \n\t\t\t\t\t\t) );\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->clientlogout (); // client logout\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}", "public function dayDetailsPdf() {\n check_access($this->session->userdata('role_id'),3);\n \n\t\tif($this->uri->segment(4)!=\"\"){\n\t\t\t$day_id = $this->uri->segment(4);\n\t\t}else if($this->session->userdata('day_id')){\n\t\t\t$day_id = $this->session->userdata('day_id');\n\t\t}\n\t\tif($day_id==\"\"){\n\t\t\tredirect(base_url().'admin/day/listing');\n\t\t}\n\t\t$data = array();\n\t\t$day = $this->day_model->getDay($day_id);\n\t\t$daydetails = $this->day_model->getDayDetails($day_id);\n\t\t$data['title'] = \"Day Details Pdf\";\n\t\t$data['day_id'] = $day_id;\n\t\t$data['day'] = $day;\n\t\t$data['daydetails'] = $daydetails;\n\t\t$this->pdf->loadHtml($this->load->view('dailyReport',$data, TRUE));\n\t\t$this->pdf->render();\n\t\t$this->pdf->stream(\"Day_details_\".$day_id.\".pdf\", array(\"Attachment\"=>0));\n\t}", "function genrate_inspectorpaymenthistory_pdf($columnsValues,$data,$allconstants,$profile,$toDate=null,$fromDate=null,$vc_customer_name) {\n\t\n\t\t$columnwidtharrays = array(10,24,26,26,28,26,25,24);\n\t\t\n\t\t$heightdynamic = 12;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vc_customer_name) && !empty($vc_customer_name)) ){\n\n\t\t\t$x= $this->GetX();\n\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+125);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(25, 8, 'Customer Name :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(39, 8, $vc_customer_name,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t}\n\t}\n\n\t\t$c=0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFont('Arial', 'B', 7);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\n\t\t if( $c == 0){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\t\t\n\t\t\n\t\t$this->SetFont('Arial', '', 5);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t foreach ($data as $val) {\n\t\t \n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $vc_assessment_no = \t$val['AssessmentVehicleMaster']['vc_assessment_no'];\n\t\t $vc_customer_name=\t\t$val['AssessmentVehicleMaster']['vc_customer_name'];\n\t\t $dt_assessment_date=\tdate('d-M-y', strtotime($val['AssessmentVehicleMaster']['dt_assessment_date']));\n\t\t $nu_total_payable_amount= number_format($val['AssessmentVehicleMaster']['nu_total_payable_amount'],2,'.',',');\n\t\t $vc_mdc_paid=\t\t\tnumber_format($val['AssessmentVehicleMaster']['vc_mdc_paid'],2,'.',',');\n\t\t\t$dt_received_date = \tdate('d M Y', strtotime($val['AssessmentVehicleMaster']['dt_received_date']));\n\t\t $vc_prtype_name = \t\t$val['PaymentStatus']['vc_prtype_name'];\n\n\t\t\t$font_size = 7;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$alignvalue='C';\n\t\t\t\n\t\t\t$col[] = array('text' => $i+1, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_assessment_no, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $vc_customer_name, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_assessment_date, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $nu_total_payable_amount, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_mdc_paid, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_received_date, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_prtype_name, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t}\n\t}", "public function actionCreate() {\n if (Yii::$app->user->can('school_exam')) {\n $model = new SchoolExamMarks();\n\n $classList = ArrayHelper::map(Classes::findAll(['is_active' => 'Y', 'is_deleted' => 'N']), 'id', 'name');\n $subclassList = ArrayHelper::map(Subclass::findAll(['is_active' => 'Y', 'is_deleted' => 'N']), 'id', 'sub_class');\n $semesterList = ArrayHelper::map(SchoolExamSemester::findAll(['is_active' => 'Y', 'is_deleted' => 'N']), 'id', 'semester');\n $divisionList = ArrayHelper::map(Division::findAll(['is_deleted' => 'N', 'is_active' => 'Y']), 'id', 'division');\n $subjectList = ArrayHelper::map(SchoolSubject::findAll(['is_deleted' => 'N', 'is_active' => 'Y']), 'id', 'name_en');\n $standardList = ArrayHelper::map(SchoolExam::findAll(['is_deleted' => 'N', 'is_active' => 'Y']), 'id', 'standard');\n\n $yearList = [];\n\n for ($i = 1430; $i <= 1600; $i++) {\n $yearList[$i] = $i;\n }\n\n if ($model->load(Yii::$app->request->post())) {\n return $this->redirect(['enter-marks', 'year' => $model->year, 'class_id' => $model->class_id, 'subclass_id' => $model->subclass_id, 'division_id' => $model->division_id, 'standard_id' => $model->standard_id, 'semester_id' => $model->semester_id, 'subject_id' => $model->subject_id]);\n //return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'classList' => $classList,\n 'subclassList' => $subclassList,\n 'semesterList' => $semesterList,\n 'yearList' => $yearList,\n 'divisionList' => $divisionList,\n 'standardList' => $standardList,\n 'subjectList' => $subjectList,\n ]);\n }\n } else {\n throw new ForbiddenHttpException;\n }\n }", "public function attendance_sheet_export_to_pdf($action, $attendance_id, $student_id = 0, $course_id = '')\n {\n $attendance = new Attendance();\n $courseInfo = CourseManager::get_course_information($course_id);\n $attendance->set_course_id($courseInfo['code']);\n $groupId = isset($_REQUEST['group_id']) ? $_REQUEST['group_id'] : null;\n $data_array = array();\n $data_array['attendance_id'] = $attendance_id;\n $data_array['users_in_course'] = $attendance->get_users_rel_course($attendance_id, $groupId);\n\n $filter_type = 'today';\n\n if (!empty($_REQUEST['filter'])) {\n $filter_type = $_REQUEST['filter'];\n }\n\n $my_calendar_id = null;\n if (is_numeric($filter_type)) {\n $my_calendar_id = $filter_type;\n $filter_type = 'calendar_id';\n }\n\n $data_array['attendant_calendar'] = $attendance->get_attendance_calendar(\n $attendance_id,\n $filter_type,\n $my_calendar_id,\n $groupId\n );\n\n if (api_is_allowed_to_edit(null, true) || api_is_drh()) {\n $data_array['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);\n } else {\n if (!empty($student_id)) {\n $user_id = intval($student_id);\n } else {\n $user_id = api_get_user_id();\n }\n $data_array['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, $user_id, $groupId);\n $data_array['faults'] = $attendance->get_faults_of_user($user_id, $attendance_id, $groupId);\n $data_array['user_id'] = $user_id;\n }\n\n $data_array['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id($attendance_id);\n\n // Set headers pdf.\n $courseCategory = CourseManager::get_course_category($courseInfo['category_code']);\n $teacherInfo = CourseManager::get_teacher_list_from_course_code($courseInfo['code']);\n $teacherName = null;\n foreach ($teacherInfo as $teacherData) {\n if ($teacherName != null) {\n $teacherName = $teacherName.\" / \";\n }\n $teacherName .= api_get_person_name($teacherData['firstname'], $teacherData['lastname']);\n }\n\n // Get data table\n $data_table = array();\n $head_table = array('#', get_lang('Name'));\n foreach ($data_array['attendant_calendar'] as $class_day) {\n $head_table[] =\n api_format_date($class_day['date_time'], DATE_FORMAT_NUMBER_NO_YEAR).' '.\n api_format_date($class_day['date_time'], TIME_NO_SEC_FORMAT);\n }\n $data_table[] = $head_table;\n $data_attendant_calendar = $data_array['attendant_calendar'];\n $data_users_presence = $data_array['users_presence'];\n $count = 1;\n\n if (!empty($data_array['users_in_course'])) {\n foreach ($data_array['users_in_course'] as $user) {\n $cols = 1;\n $result = array();\n $result['count'] = $count;\n $result['full_name'] = api_get_person_name($user['firstname'], $user['lastname']);\n foreach ($data_array['attendant_calendar'] as $class_day) {\n if ($class_day['done_attendance'] == 1) {\n if ($data_users_presence[$user['user_id']][$class_day['id']]['presence'] == 1) {\n $result[$class_day['id']] = get_lang('UserAttendedSymbol');\n } else {\n $result[$class_day['id']] = '<span style=\"color:red\">'.get_lang('UserNotAttendedSymbol').'</span>';\n }\n } else {\n $result[$class_day['id']] = ' ';\n }\n $cols++;\n }\n $count++;\n $data_table[] = $result;\n }\n }\n $max_cols_per_page = 12; //10 dates + 2 name and number\n $max_dates_per_page = $max_dates_per_page_original = $max_cols_per_page - 2;//10\n $rows = count($data_table);\n\n if ($cols > $max_cols_per_page) {\n $number_tables = round(($cols-2)/$max_dates_per_page);\n $headers = $data_table[0];\n $all = array();\n $tables = array();\n $changed = 1;\n\n for ($i= 0; $i <= $rows; $i++) {\n $row = isset($data_table[$i]) ? $data_table[$i] : null;\n $key = 1;\n $max_dates_per_page = 10;\n $item = isset($data_table[$i]) ? $data_table[$i] : null;\n $count_j = 0;\n\n if (!empty($item)) {\n foreach ($item as $value) {\n if ($count_j >= $max_dates_per_page) {\n $key++;\n $max_dates_per_page = $max_dates_per_page_original*$key;\n //magic hack\n $tables[$key][$i][] = $tables[1][$i][0];\n $tables[$key][$i][] = $tables[1][$i][1];\n }\n $tables[$key][$i][] = $value;\n $count_j++;\n }\n }\n }\n\n $content = null;\n if (!empty($tables)) {\n foreach ($tables as $sub_table) {\n $content .= Export::convert_array_to_html($sub_table).'<br /><br />';\n }\n }\n } else {\n $content = Export::convert_array_to_html(\n $data_table,\n array('header_attributes' => array('align' => 'center'))\n );\n }\n\n $params = array(\n 'filename' => get_lang('Attendance').'-'.api_get_local_time(),\n 'pdf_title' => $courseInfo['title'],\n 'course_code' => $courseInfo['code'],\n 'add_signatures' => true,\n 'orientation' => 'landscape',\n 'pdf_teachers' => $teacherName,\n 'pdf_course_category' => $courseCategory['name'],\n 'format' => 'A4-L',\n 'orientation' => 'L'\n );\n\n Export::export_html_to_pdf($content, $params);\n exit;\n }", "public function midreportcreate() {\n $supervisaornames = DB::select(\"SELECT name,id \n\t\t FROM panelmembers\n\t\t WHERE id = any (SELECT supervisorId \n\t\t FROM projects\n\t\t WHERE status = 'Approved')\");\n\n /* Get all group ids */\n $groupids = DB::select(\"SELECT groupID \n\t\t FROM research_groups\");\n\n /* Get all student actual id acording to the auto generated id */\n $studentid = DB::select(\"SELECT id,regId \n\t\t FROM students\n\t\t WHERE id = any (SELECT studentId \n\t\t FROM projects\n\t\t WHERE status = 'Approved')\");\n\n /* filtering projects according to the groups */\n $students = DB::select(\"SELECT id,title,studentId,supervisorId \n\t\t FROM projects\n\t\t WHERE status = 'Approved' and groupID = any (SELECT groupID \n\t\t FROM research_groups)\");\n\n $los = DB::table('settings')->first();\n\n return view('supevaluation.midreportevaluation', compact('students', 'supervisaornames', 'studentid', 'groupids', 'los'));\n }", "public function ctrreports()\n {\n //\n $productname = Input::get('productname');\n\t \t$start_date = Input::get('start_date');\n\t\t$end_date = Input::get('end_date');\n\t $product=m_product::where('product_name',$productname)->first();\n\t \n\t \t \n $contracts=t_contract::where('product_id',$product->id)\n\t ->where('pay_date','>',$start_date)\n\t ->where('pay_date','<=',$end_date)->get();\n\t\t$productname='本周'.$productname;\t\t\t\t \n\t if($contracts->count())\n\t {\n\t \t \n\t \t$filename=$product->product_name . time();\n\t \\Excel::create($filename, function($excel) use ($productname, $contracts) {\n $excel->sheet('New sheet', function($sheet) use ($productname, $contracts) {\n $sheet->loadView('ctrreports') \n ->withProductname($productname)\n\t ->withContracts($contracts);\n\n });\n\n })->download('xls'); \n\t\t }\n\t else {\n\t\t\t\n\t\t\treturn Redirect::back()->withInput()->withErrors('本时间段此产品下无合同产生');\n\t }\n\t \n\t \n\t \n \n }", "public function getReports()\n\t{\n\t\t$this->load->model('admin/inceptra_admin_model');\n\t\t$res=$this->inceptra_admin_model->get_report();\n\t\t\n\t\t$this->load->helper('file'); \n\t\t$this->load->helper(array('dompdf', 'file'));\n\t\t$head=\"LIST OF Candidates and there Marks\";\n\t\t$html=\"<center><h3>\".$head.\"</h3></center><br/>\";\n\t\t\t\t\n\t\t$html.='<center><table width=\"600\">';\n\t\t$html.='<tr><th align=\"left\">Username</th><th align=\"left\">Multichoice</th><th align=\"left\">Pickup1</th><th align=\"left\">Pickup2</th><th align=\"left\">Match Catch</th><th align=\"left\">Toal Marks</th></tr>';\n\t\tforeach($res as $r)\n\t\t{\n\t\t$html.='<tr><td>'.$r->r_id.'</td><td>'.$r->username.'</td><td>'.$r->multichoice.'</td><td>'.$r->pickup1marks.'</td><td>'.$r->pickup2marks.'</td><td>'.$r->matchcatch.'</td><td>'.$r->totalmarks.'</td></tr>';\n\t\t\n\t\t}\n\t\t$html.='</table></center>';\n\t\t\t\t\n \tpdf_create($html, 'pdfreport');\n write_file('name', $data);\n\t}", "public function actionOutputIndex()\n {\n\t\tset_time_limit(0);\n $searchModel = new AttendanceCheckinReportsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\t\t\n\t\t\n\t\t$sort = Yii::$app->request->queryParams['sort']?Yii::$app->request->queryParams['sort']:'signdate';\n\t\t\n\t\tif($sort{0}==\"-\"){\n\t\t\t$orderBy = substr($sort,1).\" desc\";\n\t\t}else{\n\t\t\t$orderBy = \" {$sort} ASC\";\n\t\t}\n\t\t$result = $dataProvider->query->orderBy($orderBy)->asArray()->all();\n\t\t// var_dump($result);exit;\n $arr = [];\n $ic = 1; \n foreach($result as $r) {\n\t\t\t$r['signtime1'] = $r[\"signtime1\"]==\"0000-00-00 00:00:00\"?\"\":$r[\"signtime1\"];\n\t\t\t$r['signtime2'] = $r[\"signtime2\"]==\"0000-00-00 00:00:00\"?\"\":$r[\"signtime2\"];\n\t\t\t\n\t\t\t\n\t\t\t$r['signstatus'] = $r['signstatus_valid']?:$r['signstatus'];\n\t\t\t$r['latetime'] = $r['latetime']-$r['latetime_valid'];\n\t\t\t$r['overtime'] = $r['overtime_valid'];\n $arr[] = $r;\n }\n\t\t$header = [\n 'id' => 'ID',\n 'personnel_id' => '员工ID',\n 'employeeid' => '工号',\n 'username' => '员工姓名',\n 'signdate' => '签到日期',\n 'dayofweek' => '星期几',\n 'signtime1' => '上班签到',\n 'signtime2' => '下班签到',\n 'timediff' => '工作时长',\n 'signstatus' => '签到状态',\n 'latetime' => '迟到分钟',\n 'overtime' => '加班时长',\n 'memo' => '备注',\n ];\n\t\t$columns = array_keys($header);\n\t\t\n\t\t \n \\moonland\\phpexcel\\Excel::export([\n\t\t\t'isMultipleSheet' => true,\n\t\t\t'models' => [\n\t\t\t\t'考勤报表' => $arr, \n\t\t\t],\n\t\t\t'columns' => [\n\t\t\t\t'考勤报表' => $columns,\n\t\t\t], \n\t\t\t'headers' => [\n\t\t\t\t'考勤报表' => $header, \n\t\t\t],\n ]);\n }", "function export_report()\n {\n // load csv generator library\n $this->load->library('csvgenerator');\n \n // get current session data \n $session_data = $this->session->userdata('logged_in');\n\n // get filter criteria from post input\n $data = array(\n 'risk_register' => $this->input->post('risk_register'),\n 'user_id' => $this->input->post('general_user'),\n 'project_id' => $session_data['report_project_id']\n );\n\n if ($session_data['role_id'] == 8)\n {\n // get assigned risk register and its ID\n $register_row = $this->project_model->getAssignedRiskRegisterName($data['user_id']);\n $assigned_register_id = $register_row->subproject_id;\n $this->csvgenerator->fetch_data( $user_id, $main_category, $risk_level, $risk_register, $assigned_register_id );\n }\n else\n {\n if($this->csvgenerator->fetch_response_data($data))\n {\n redirect('dashboard/report_response/generate'); \n }\n else\n {\n // error\n $this->session->set_flashdata('negative_msg','Sorry. No report or data for the selected data filter!');\n redirect('dashboard/reports/response_project');\n }\n } \n }", "function glReport() {\n if ($this->session->userdata('role') == 550 || $this->session->userdata('role') == 551) {\n if (!empty($_POST)) {\n if (isset($_POST['type'])) {\n if ($_POST['type'] == \"pdf\") {\n $collaboratore = $this->input->post('txtCollaboratore');\n $accompagnatore = $this->input->post('txtAccompagnatore');\n\n $glExportReportData = $this->_getGlReportData($collaboratore, $accompagnatore);\n $data['report_table_data'] = $glExportReportData['report_table_data'];\n\n $pdfFileName = \"Webservice_Report\";\n $reportHTML = $this->load->view(\"webservice_report_view\", $data, TRUE);\n downloadhtmltopdf($reportHTML, $pdfFileName);\n } else {\n $collaboratore = $this->input->post('txtCollaboratore');\n $accompagnatore = $this->input->post('txtAccompagnatore');\n\n $glExportReportData = $this->_getGlReportData($collaboratore, $accompagnatore);\n $report_data = $glExportReportData['report_table_data'];\n $grand_total = $passeggero_start = $passeggero_si_start = 0;\n $exportData = array();\n $prev_codice_prodotto = '';\n foreach ($report_data as $rdata) {\n $passeggero_start = ( $prev_codice_prodotto != $rdata['codice_prodotto'] ) ? 0 : $passeggero_start;\n $passeggero_si_start = ( $prev_codice_prodotto != $rdata['codice_prodotto'] ) ? 0 : $passeggero_si_start;\n\n if ($rdata['codice_prodotto'] != 'Total') {\n if ($rdata['pax'] > 1 && ( $rdata['type'] == 'Reimbursement' || $rdata['type'] == 'Presentation' )) {\n $passeggero_arr = $this->webservicemodel->getPasseggero($rdata['collaboratore'], $rdata['accompagnatore'], $rdata['codice_prodotto']);\n $passeggero = explode(\",\", $passeggero_arr['passeggero']);\n for ($i = 0; $i < $rdata['pax']; $i++) {\n $pax = 1;\n $total = $rdata['amount_per_pax'] * $pax;\n $grand_total = $grand_total + $total;\n $pass = isset($passeggero[$passeggero_start])?$passeggero[$passeggero_start]:'';\n $exportData[] = array(\n 'Collaboratore' => $rdata['collaboratore'],\n 'Accompagnatore' => $rdata['accompagnatore'],\n 'Campus' => $rdata['campus'],\n 'Product Code' => $rdata['codice_prodotto'],\n 'Pax Name' => $pass,\n 'Type' => $rdata['type'],\n 'Group' => $rdata['group'],\n 'Pax' => $pax,\n 'Amount Per Pax' => $rdata['amount_per_pax'],\n 'Total' => $total\n );\n $passeggero_start++;\n }\n } else if ($rdata['type'] == 'GLF') {\n $passeggero_arr = $this->webservicemodel->getPasseggeroSi($rdata['collaboratore'], $rdata['accompagnatore'], $rdata['codice_prodotto']);\n $passeggero = explode(\",\", $passeggero_arr['passeggero']);\n\n $total = $rdata['amount_per_pax'] * $rdata['pax'];\n $grand_total = $grand_total + $total;\n\n $exportData[] = array(\n 'Collaboratore' => $rdata['collaboratore'],\n 'Accompagnatore' => $rdata['accompagnatore'],\n 'Campus' => $rdata['campus'],\n 'Product Code' => $rdata['codice_prodotto'],\n 'Pax Name' => $passeggero[$passeggero_si_start],\n 'Type' => $rdata['type'],\n 'Group' => $rdata['group'],\n 'Pax' => $rdata['pax'],\n 'Amount Per Pax' => $rdata['amount_per_pax'],\n 'Total' => $rdata['total_reimbursement']\n );\n $passeggero_si_start++;\n } else {\n $total = $rdata['amount_per_pax'] * $rdata['pax'];\n $grand_total = $grand_total + $total;\n\n $exportData[] = array(\n 'Collaboratore' => $rdata['collaboratore'],\n 'Accompagnatore' => $rdata['accompagnatore'],\n 'Campus' => $rdata['campus'],\n 'Product Code' => $rdata['codice_prodotto'],\n 'Pax Name' => ( $rdata['type'] == 'Reimbursement' || $rdata['type'] == 'Presentation' ) ? $rdata['passeggero'] : \"\",\n 'Type' => $rdata['type'],\n 'Group' => $rdata['group'],\n 'Pax' => $rdata['pax'],\n 'Amount Per Pax' => $rdata['amount_per_pax'],\n 'Total' => $rdata['total_reimbursement']\n );\n }\n }\n $prev_codice_prodotto = $rdata['codice_prodotto'];\n }\n if (!empty($exportData)) {\n // Empty row before total\n $exportData[] = array(\n 'Collaboratore' => '',\n 'Accompagnatore' => '',\n 'Campus' => '',\n 'Product Code' => '',\n 'Pax Name' => '',\n 'Type' => '',\n 'Group' => '',\n 'Pax' => '',\n 'Amount Per Pax' => '',\n 'Total' => ''\n );\n\n $exportData[] = array(\n 'Collaboratore' => 'Total',\n 'Accompagnatore' => '',\n 'Campus' => '',\n 'Product Code' => '',\n 'Pax Name' => '',\n 'Type' => '',\n 'Group' => '',\n 'Pax' => '',\n 'Amount Per Pax' => '',\n 'Total' => $grand_total\n );\n }\n\n $this->load->library('export');\n $this->export->exportUsingPhpExcel($exportData, 'webserviceglreport');\n }\n } else {\n $data['title'] = 'plus-ed.com | Export by GL';\n $data['breadcrumb1'] = 'Webservice management';\n $data['breadcrumb2'] = 'Export by GL';\n\n $data['collaboratore'] = $this->input->post('txtCollaboratore');\n $data['accompagnatore'] = $this->input->post('txtAccompagnatore');\n\n $glReportData = $this->_getGlReportData($data['collaboratore'], $data['accompagnatore']);\n $data['reportData'] = $glReportData['report_data'];\n $data['report_table_data'] = $glReportData['report_table_data'];\n $data['report_analysis_data'] = $glReportData['report_analysis_data'];\n\n if (APP_THEME == \"OLD\")\n $this->load->view('plused_webservice_gl_report_data', $data);\n else { // if(APP_THEME == \"LTE\")\n $data['pageHeader'] = $data['breadcrumb2'];\n $data['optionalDescription'] = \"\";\n\t\t\t\t\t\t//echo \"<pre>\";print_r($data);die;\n $this->ltelayout->view('lte/reimbursement/webservice_gl_report_data', $data);\n }\n }\n } else {\n $data['title'] = 'plus-ed.com | Export by GL';\n $data['breadcrumb1'] = 'Webservice management';\n $data['breadcrumb2'] = 'Export by GL';\n\n $data['accompagnatore'] = $this->webservicemodel->getDistinctDataByField('accompagnatore');\n $data['collaboratore'] = $this->webservicemodel->getDistinctDataByField('collaboratore');\n\n if (APP_THEME == \"OLD\")\n $this->load->view('plused_webservice_gl_report', $data);\n else { // if(APP_THEME == \"LTE\")\n $data['pageHeader'] = $data['breadcrumb2'];\n $data['optionalDescription'] = \"\";\n $this->ltelayout->view('lte/reimbursement/webservice_gl_report', $data);\n }\n }\n } else {\n redirect('backoffice', 'refresh');\n }\n }", "public function view_estatement($seq_no)\n\t{\n\t\t$this->load->model('statement_header_model');\n\t\t// $this->load->library('m_pdf');\n\t\t$this->load->model('transactions_model');\n\t\t$statement = $this->statement_header_model->get_statement($seq_no);\n\t\t$start_date = $statement[0]->START_DATE;\n\t\t$end_date = $statement[0]->END_DATE;\n\t\t// return print $end_date;\n\t\t$internal_key = $statement[0]->INTERNAL_KEY;\n\t\t$data['statement'] = $statement[0];\n\n\t\t// return print_r($statement);\n\t\t$data['transactions'] = $this->transactions_model\n\t\t\t\t->get_trans_history($start_date,$end_date,$internal_key);\n\t\t\n\t\t$data['start_date'] = $this->formatDate($start_date);\n\t\t$data['end_date'] = $this->formatDate($end_date);\n\n\n\t\t// return print_r($data['transactions']);\n\t\treturn $this->render('transactions/view_statement3',$data);\n\t}", "public function Get_Special_Report($semester,$year,$dept_id)\n {\n global $FILE_PATH;\n $semester_id = $this->DEADLINE->Search_Semester_id($semester,$year);\n if($semester_id)\n {\n $temp_course = $this->COURSE->Get_Dept_Course($dept_id,$semester_id);\n $dept_course = array();\n if(!isset($temp_course['status']))\n {\n for($i=0;$i<count($temp_course);$i++)\n {\n array_push($dept_course,$temp_course[$i]['id']);\n }\n }\n $DATA = array();\n $DATA['info'] = array();\n $DATA['download'] = $this->DOWNLOAD_URL.\"?course=all&type=report&dept=\".$dept_id.\"&info=special&semester=\".$semester.\"&year=\".$year;\n $sql = \"SELECT DISTINCT `course_id` FROM `course_hire_special_instructor` WHERE `status` = '1' AND `semester_id` = \".$semester_id;\n $result_course = $this->DB->Query($sql);\n if($result_course)\n {\n for($i=0;$i<count($result_course);$i++)\n {\n if(!in_array($result_course[$i]['course_id'],$dept_course))\n {\n continue;\n }\n $sql = \"SELECT si.`instructor_id`,si.`prefix`,si.`firstname`,si.`lastname`,si.`cv` FROM `course_hire_special_instructor` ci ,`special_instructor` si \";\n $sql.= \"WHERE ci.`instructor_id` = si.`instructor_id` AND ci.`course_id` = '\".$result_course[$i]['course_id'].\"' AND ci.`status` = '1' AND ci.`semester_id` = \".$semester_id;\n $result_instructor = $this->DB->Query($sql);\n $data = array();\n $data['id'] = $result_course[$i]['course_id'];\n $data['name'] = $this->COURSE->Get_Course_Name($data['id']);\n $data['special'] = array();\n if($result_instructor)\n {\n for($j=0;$j<count($result_instructor);$j++)\n {\n $instructor['id'] = $result_instructor[$j]['instructor_id'];\n $instructor['name'] = $result_instructor[$j]['prefix'].' '.$result_instructor[$j]['firstname'].' '.$result_instructor[$j]['lastname'];\n $instructor['cv'] = $this->PERSON->Get_CV($instructor['id']);\n $instructor['pdf'] = $this->VIEW_URL.\"?course=\".$data['id'].\"&id=\".$instructor['id'].\"&type=complete&info=special&semester=\".$semester.\"&year=\".$year;\n array_push($data['special'],$instructor);\n }\n }\n array_push($DATA['info'],$data);\n }\n }\n if(count($DATA['info']) == 0)\n {\n $return['status'] = 'error';\n $return['msg'] = 'ไม่พบข้อมูล';\n return $return;\n }\n else\n {\n return $DATA;\n }\n }\n else\n {\n $return['status'] = 'error';\n $return['msg'] = 'ไม่พบข้อมูล';\n return $return;\n }\n }", "public function actionCreate() {\n if (User::userIsAllowedTo('Submit back to office report')) {\n $model = new MeBackToOfficeReport();\n if (Yii::$app->request->isAjax) {\n $model->load(Yii::$app->request->post());\n return Json::encode(\\yii\\widgets\\ActiveForm::validate($model));\n }\n\n if (!empty(Yii::$app->request->post()) && Yii::$app->request->post('submit_for_review') == 'true') {\n //var_dump(Yii::$app->request->post());\n $model->load(Yii::$app->request->post());\n $model->team_members = implode(\", \", $model->team_members);\n list( $model->start_date, $model->end_date) = explode('to', $model->travel_dates);\n $model->created_by = Yii::$app->user->id;\n $model->updated_by = Yii::$app->user->id;\n $model->status = \\backend\\models\\Storyofchange::_submitted_for_review;\n if ($model->save()) {\n $audit = new AuditTrail();\n $audit->user = Yii::$app->user->id;\n $audit->action = \"Submitted a back to office report for review\";\n $audit->ip_address = Yii::$app->request->getUserIP();\n $audit->user_agent = Yii::$app->request->getUserAgent();\n $audit->save();\n $role_model = \\common\\models\\RightAllocation::find()->where(['right' => 'Review back to office report'])->all();\n if (!empty($role_model)) {\n $subject = \"Back to office report:\" . $model->name_of_officer;\n foreach ($role_model as $_role) {\n //We now get all users with the fetched role\n $resetLink = Yii::$app->urlManager->createAbsoluteUrl(['site/login']);\n $_user_model = User::find()\n ->where(['role' => $_role->role])\n ->all();\n if (!empty($_user_model)) {\n //We send the emails\n foreach ($_user_model as $_model) {\n $msg = \"\";\n $msg .= \"<p>Dear \" . $_model->first_name . \" \" . $_model->other_name . \" \" . $_model->last_name . \",<br/>\";\n $msg .= $model->name_of_officer . \" has submitted a 'Back to office report' below is the summary of the assignment outcome<br/>\";\n $msg .= $model->summary_of_assignment_outcomes . \"</b></p>\";\n $msg .= '<p>You can login <i style=\"color: blue;\">' . Html::a('(Click Here to Login)', $resetLink) . '</i> to see more details and review the submitted BtOR</p>';\n \\backend\\models\\Storyofchange::sendEmail($msg, $subject, $_model->email);\n }\n }\n }\n }\n\n Yii::$app->session->setFlash('success', 'Back to office report was successfully submitted for review');\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n $message = \"\";\n foreach ($model->getErrors() as $error) {\n $message .= $error[0];\n }\n Yii::$app->session->setFlash('error', 'Error occured while submitting back to office report for review.Error::' . $message);\n }\n }\n\n\n if (!empty(Yii::$app->request->post()) && Yii::$app->request->post('submit for review') != 'true') {\n $model->load(Yii::$app->request->post());\n $model->team_members = implode(\", \", $model->team_members);\n list( $model->start_date, $model->end_date) = explode('to', $model->travel_dates);\n $model->created_by = Yii::$app->user->id;\n $model->updated_by = Yii::$app->user->id;\n $model->status = 0;\n if ($model->save()) {\n $audit = new AuditTrail();\n $audit->user = Yii::$app->user->id;\n $audit->action = \"Saved back to office report as draft\";\n $audit->ip_address = Yii::$app->request->getUserIP();\n $audit->user_agent = Yii::$app->request->getUserAgent();\n $audit->save();\n Yii::$app->session->setFlash('success', 'Back to office report was successfully saved as a draft');\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n $message = \"\";\n foreach ($model->getErrors() as $error) {\n $message .= $error[0];\n }\n Yii::$app->session->setFlash('error', 'Error occured while saving back to office report.Error::' . $message);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n } else {\n Yii::$app->session->setFlash('error', 'You are not authorised to perform that action.');\n return $this->redirect(['home/home']);\n }\n }", "function create_course_subject(){\n\n\t\t$Input_course_id =$this->input->post('course');\n\n\t\t$course_data =$this->setting_model->Get_All('course');\n\n\t\tforeach ($course_data as $data) {\n\t\t\tif($data['course_id'] == $Input_course_id){\n\t\t\t\t$course_title =$data['course_title'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$courses_modules= array(\n\t\t\t'module_subjects' => implode(\" \", $this->input->post('myInputs')),\n\t\t\t'course_id' => $this->input->post('course'),\n\t\t);\t\n\n\t\t//================= Activity Log Monitoring==========================//\n $activity_log_activity = \"Add new Courses subjects for\".$course_title; \n\n $activitylogs = array( \n 'activity_log_activity' =>$activity_log_activity, \n 'activity_date'=> date('Y-m-d h:i:s:a') ,\n 'user_id'=> $this->session->userdata('user_id')\n ); \n\n $this->setting_model->insert($activitylogs , 'activity_log');\n\n //==================== Activity Log Monitoring End=====================//\n\n\n\t\t$this->setting_model->insert($courses_modules,'course_module_subject');\n\n\t\t$this->session->set_flashdata('msg',\"<div class='alert alert-success'><strong>\". $course_title .\"</strong> Course Subjects Added Successfully!</div><style>.table>tbody>tr:nth-child(2){ background:#d9ff66; }</style>\");\n\n\t\tredirect('admin/add_course_subject');\n\t}", "public function finalreportcreate() {\n $supervisaornames = DB::select(\"SELECT name,id \n\t\t FROM panelmembers\n\t\t WHERE id = any (SELECT supervisorId \n\t\t FROM projects\n\t\t WHERE status = 'Approved')\");\n\n /* Get all group ids */\n $groupids = DB::select(\"SELECT groupID \n\t\t FROM research_groups\");\n\n /* Get all student actual id acording to the auto generated id */\n $studentid = DB::select(\"SELECT id,regId \n\t\t FROM students\n\t\t WHERE id = any (SELECT studentId \n\t\t FROM projects\n\t\t WHERE status = 'Approved')\");\n\n /* filtering projects according to the groups */\n $students = DB::select(\"SELECT id,title,studentId,supervisorId \n\t\t FROM projects\n\t\t WHERE status = 'Approved' and groupID = any (SELECT groupID \n\t\t FROM research_groups)\");\n\n $los = DB::table('settings')->first();\n\n return view('supevaluation.finalreportevaluation', compact('students', 'supervisaornames', 'studentid', 'groupids', 'los'));\n }", "public function achievementsReport() {\n if (userLogedIn()) {\n if(check_access('achievementsReport')){\n $fromDate = date(\"Y-m-d\", strtotime(\"first day of this month\"));\n if (isset($_POST['fromDate'])) {\n $date = explode('/', $this->input->post('repDate'));\n $day = $date[1];\n $month = $date[0];\n $year = $date[2];\n $fromDate = $year . '-' . $month . '-' . $day;\n }\n $data['get_target'] = $this->admin_model->get_target($fromDate);\n \n $date = explode('-', $fromDate);\n $day = $date[2];\n $month = $date[1];\n $year = $date[0];\n $fromDate = $month . '/' . $day . '/' . $year;\n $data['fromDate'] = $fromDate;\n \n $this->load->view(\"admin/achievementsReport\", $data);\n \n }\n \n \n else{\n $url=$this->router->fetch_class().'/'.$this->router->fetch_method(); \n // echo $url;\n myLoader('No Access', 'home/login');\n }\n } else {\n $this->load->view('admin/login');\n }\n }", "public function index()\n\t{\n\t\tif(isset($_GET['id_report'])==true)\n\t\t{\t\t\t\t\n\t\t\t$k = 0;\n\t\t\t$id_report=\"\";\n\t\t\tif(isset($_GET['id'])==true)\n\t\t\t{\t\t\t\t\n\t\t\t\t$query = $this->db->query(\"SELECT id_report, nodoc2, letter, DATE_FORMAT(created_date,'%d-%M-%Y') as created_date, DATE_FORMAT(letter_date,'%d/%m/%Y') as letter_date, event_name, event_venue, event_institution, doctor, event_address, event_start_time, event_end_time, DATE_FORMAT(event_start_date,'%d/%m/%Y') as event_start_date, DATE_FORMAT(event_end_date,'%d/%m/%Y') as event_end_date FROM thank_letter2 where id_tl=\".$_GET['id']);\n\t\t\t\tforeach ($query->result() as $row2)\n\t\t\t\t{\n\t\t\t\t\t$id_report = $row2->id_report;\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'event_organizer' => $row2->event_institution,\n\t\t\t\t\t\t'event_address' => $row2->event_address,\n\t\t\t\t\t\t'event_name' => $row2->event_name,\n\t\t\t\t\t\t'nodoc2' => $row2->nodoc2,\n\t\t\t\t\t\t'letter_date' => $row2->letter_date,\n\t\t\t\t\t\t'created_date' => $row2->created_date,\n\t\t\t\t\t\t'letter' => $row2->letter,\n\t\t\t\t\t\t'event_start_date' => $row2->event_start_date,\n\t\t\t\t\t\t'event_end_date' => $row2->event_end_date,\n\t\t\t\t\t\t'event_start_time' => $row2->event_start_time,\n\t\t\t\t\t\t'event_end_time' => $row2->event_end_time,\n\t\t\t\t\t\t'event_venue' => $row2->event_venue\n\t\t\t\t\t);\n\t\t\t\t\t$k = $k+1;\n\t\t\t\t}\n//\t\t\t\t$this->load->view('thank-letter2',$data);\n\t\t\t}\t\n\n\t\t\tif($k==0)\n\t\t\t{\n\t\t\t\t$nodoc = \"0001\";\t\n\t\t\t\t$max = 0;\n\t\t\t\t$max2 = 0;\n\t\t\t\t$max3 = 0;\n\t\t\t\t$query = $this->db->query(\"select max(nodoc2)+1 as nodoc from thank_letter where year='\".date(\"Y\").\"'\");\n\t\t\t\tforeach ($query->result() as $row2)\n\t\t\t\t{\n\t\t\t\t\t$max = $row2->nodoc;\n\t\t\t\t}\n\t\t\t\tif($max==null)\t$max=0;\n\t\t\t\t$query = $this->db->query(\"select max(nodoc2)+1 as nodoc from thank_letter3 where year='\".date(\"Y\").\"'\");\n\t\t\t\tforeach ($query->result() as $row2)\n\t\t\t\t{\n\t\t\t\t\t$max2 = $row2->nodoc;\n\t\t\t\t}\n\t\t\t\tif($max2==null)\t$max2=0;\n\t\t\t\t$query = $this->db->query(\"select max(nodoc2)+1 as nodoc from thank_letter2 where year='\".date(\"Y\").\"'\");\n\t\t\t\tforeach ($query->result() as $row2)\n\t\t\t\t{\n\t\t\t\t\t$max3 = $row2->nodoc;\n\t\t\t\t}\n\t\t\t\tif($max3==null)\t$max3=0;\n//\t\t\t\tif($max>0 && $max2>0)\n\t\t\t\tif($max==0 && $max2==0 && $max3==0)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\telse\t\n\t\t\t\t{\n\t\t\t\t\tif($max<$max3 && $max2<$max3)\n\t\t\t\t\t{\n\t\t\t\t\t\t$nodoc = str_pad($max3,4,\"0\",STR_PAD_LEFT);\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\telse if($max2<$max && $max3<$max)\n\t\t\t\t\t{\n\t\t\t\t\t\t$nodoc = str_pad($max,4,\"0\",STR_PAD_LEFT);\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$nodoc = str_pad($max2,4,\"0\",STR_PAD_LEFT);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\n\t\t\t\t$k=0;\t\n\n\t\t\t\t$query = $this->db->query(\"SELECT a.event_organizer, a.nodoc2, a.event_name, a.event_venue, DATE_FORMAT(event_start_date,'%d/%m/%Y') as event_start_date, DATE_FORMAT(event_end_date,'%d/%m/%Y') as event_end_date FROM hco_report a, hco b where a.id_hco=b.id_hco and a.id_report=\".$_GET['id_report']);\n\t\t\t\tforeach ($query->result() as $row2)\n\t\t\t\t{\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'event_organizer' => $row2->event_organizer,\n\t\t\t\t\t\t'event_address' => \"\",\n\t\t\t\t\t\t'event_name' => $row2->event_name,\n\t\t\t\t\t\t'doctor' => \"\",\n\t\t\t\t\t\t'event_start_date' => $row2->event_start_date,\n\t\t\t\t\t\t'event_end_date' => $row2->event_end_date,\n\t\t\t\t\t\t'created_date' => date(\"d-M-Y\"),\n\t\t\t\t\t\t'nodoc2' => $nodoc,\n\t\t\t\t\t\t'event_start_time' => \"\",\n\t\t\t\t\t\t'letter_date' => \"\",\n\t\t\t\t\t\t'letter' => \"\",\n\t\t\t\t\t\t'event_end_time' => \"\",\n\t\t\t\t\t\t'event_venue' => $row2->event_venue\n\t\t\t\t\t);\n\t\t\t\t\t$k = $k+1;\n\t\t\t\t}\n\n\t\t\t}\t\n\t\t\t\t$jumlah = 0;\n\t\t\t\t$query = $this->db->query(\"select count(*) as jumlah from menu a, menu_group b where a.id_menu=b.id_menu and replace(page,'List','')='\".$this->uri->segment(1).\"' and (id_group like '\".$this->session->userdata('id_group').\",%' or id_group like '%,\".$this->session->userdata('id_group').\"' or id_group like '%,\".$this->session->userdata('id_group').\",%' or id_group='\".$this->session->userdata('id_group').\"')\");\n\t\t\t\tforeach ($query->result() as $row2)\n\t\t\t\t{\n\t\t\t\t\t$jumlah = $row2->jumlah;\n\t\t\t\t\tif($jumlah==0 && isset($_GET['access']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$query2 = $this->db->query(\"select count(*) as jumlah from menu a, menu_group b where a.id_menu=b.id_menu and replace(page,'List','')='\".$this->uri->segment(1).\"' and (id_group like '\".$_GET['access'].\",%' or id_group like '%,\".$_GET['access'].\"' or id_group like '%,\".$_GET['access'].\",%' or id_group='\".$_GET['access'].\"')\");\n\t\t\t\t\t\tforeach ($query2->result() as $row3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$jumlah = $row3->jumlah;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(!$this->session->userdata('id_group') && !isset($_GET['access']))\n\t\t\t\t{\n\t\t\t\t\t$this->load->view('login');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\t\n\t\t\t\t\tif($jumlah==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->load->view('thank-letter2',$data);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->load->view('info2');\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\t\n\t\t}\t\n\t}", "public function actionExamReport() {\n// $modelExam = new Exam;\n// $this->render('examReport', array('modelClassroom'=>$modelClassroom,'modelExam'=>$modelExam));\n $modelClassroom = new Classroom;\n if (isset($_POST['Classroom'])) {\n $modelClassroom->attributes = $_POST['Classroom'];\n }\n\n// trace($modelClassroom->id);\n\n $modelExam = new Exam;\n if (isset($_POST['Exam'])) {\n $modelExam->attributes = $_POST['Exam'];\n }\n $this->render('examReport', array('modelClassroom' => $modelClassroom, 'modelExam' => $modelExam));\n }", "public function Generate_Report()\n\t{\n\t\t//\n\t\t// criteria start_date YYYYMMDD\n\t\t// criteria end_date YYYYMMDD\n\t\t// company_id\n\t\t//\n\t\ttry\n\t\t{\n\t\t\t$this->search_query = new Transaction_History_Report_Query($this->server);\n\n\t\t\t$data = new stdClass();\n\n\t\t\t// Save the report criteria\n\t\t\t$data->search_criteria = array(\n\t\t\t 'specific_date_MM' => $this->request->specific_date_month,\n\t\t\t 'specific_date_DD' => $this->request->specific_date_day,\n\t\t\t 'specific_date_YYYY' => $this->request->specific_date_year,\n\t\t\t 'company_id' => $this->request->company_id,\n\t\t\t 'loan_type' => $this->request->loan_type\n\t\t\t);\n\n\t\t\t$_SESSION['reports']['transaction_history']['report_data'] = new stdClass();\n\t\t\t$_SESSION['reports']['transaction_history']['report_data']->search_criteria = $data->search_criteria;\n\t\t\t$_SESSION['reports']['transaction_history']['url_data'] = array('name' => 'Transaction History', 'link' => '/?module=reporting&mode=transaction_history');\n\n\t\t\t// Start date\n\t\t\t$start_date_YYYY = $this->request->specific_date_year;\n\t\t\t$start_date_MM\t = $this->request->specific_date_month;\n\t\t\t$start_date_DD\t = $this->request->specific_date_day;\n\t\t\tif(!checkdate($start_date_MM, $start_date_DD, $start_date_YYYY))\n\t\t\t{\n\t\t\t\t//return with no data\n\t\t\t\t$data->search_message = \"Start Date invalid or not specified.\";\n\t\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$start_date_YYYYMMDD = 10000 * $start_date_YYYY\t+ 100 * $start_date_MM + $start_date_DD;\n\n\t\t\t$data->search_results = $this->search_query->Fetch_Transaction_History_Data( $start_date_YYYYMMDD,\n\t\t\t\t $this->request->loan_type,\n\t\t\t\t $this->request->company_id);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$data->search_message = \"Unable to execute report. Reporting server may be unavailable.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\t\t// we need to prevent client from displaying too large of a result set, otherwise\n\t\t// the PHP memory limit could be exceeded;\n\t\tif(!empty($data->search_results) && count($data->search_results) > $this->max_display_rows)\n\t\t{\n\t\t\t$data->search_message = \"Your report would have more than \" . $this->max_display_rows . \" lines to display. Please narrow the date range.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Sort if necessary\n\t\t$data = $this->Sort_Data($data);\n\n\t\tECash::getTransport()->Add_Levels(\"report_results\");\n\t\tECash::getTransport()->Set_Data($data);\n\t\t$_SESSION['reports']['transaction_history']['report_data'] = $data;\n\t}", "public function sendReportCheckin()\n { // $sended = $this->TBLTSendMail\n // ->exists([\n // 'Date' => date(\"Y-m-d\"),\n // 'Result' => 'success'\n // ]);\n\n // if($sended) { exit; }\n\n $alert = $this->TBLMItem->find()\n ->where([\n 'Code' => 'alert_time',\n 'Value IS NOT NULL'\n ])\n ->first();\n $mail1 = $this->TBLMItem->find()\n ->where([\n 'Code' => 'mail_receipt_1',\n 'Value IS NOT NULL'\n ])\n ->first();\n $mail2 = $this->TBLMItem->find()\n ->where([\n 'Code' => 'mail_receipt_2',\n 'Value IS NOT NULL'\n ])\n ->first();\n \n $allow = false;\n if (isset($alert['Value']) && (isset($mail1['Value']) || isset($mail2['Value']))) {\n if ($alert['Value'] == date(\"H:i\")) {\n $allow = true;\n } \n }\n\n // debug\n // $allow = true;\n\n if ($allow) {\n // set_time_limit(0);\n // ini_set(\"memory_limit\", \"-1\");\n // $builder = $this->viewBuilder();\n // // configure as needed\n // $builder->setLayout(false);\n // $builder->setTemplate('/Element/Pdf/ExportResultCheckin');\n // $builder->setHelpers(['Html']);\n // create a view instance\n\n\n $data[\"checked_in\"] = $this->TBLTTimeCard->find()\n ->contain(['TBLMStaff'])\n ->where([\n 'Date' => date(\"Y-m-d\"),\n // 'TimeIn <=' => $alert\n ])\n ->order(['TimeIn' => 'ASC'])\n ->toArray();\n\n $data[\"not_come\"] = $this->TBLMStaff->find()\n ->where([\n \"StaffID NOT IN (SELECT StaffID FROM tblTTimeCard WHERE Date ='\" . date(\"Y-m-d\") . \"')\",\n \"Position LIKE '%Leader%'\",\n \"FlagDelete = 0\"\n ])\n ->order(['StaffID' => 'ASC'])\n ->toArray();\n\n // echo '<pre>';\n // var_dump($data);\n // echo '</pre>';\n // exit;\n\n\n\n // $view = $builder->build(compact('data'));\n // $content = $view->render();\n\n // $dompdf = new Dompdf(array('enable_font_subsetting' => true));\n // $dompdf->loadHtml(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'), \"UTF-8\");\n // $dompdf->set_option('defaultFont', 'Times-Roman');\n\n // // (Optional) Setup the paper size and orientation\n // $dompdf->setPaper('A4');\n\n // // Render the HTML as PDF\n // $dompdf->render();\n\n // /* save file */\n // $path = WWW_ROOT . \"files/PdfResultCheckin\";\n // if (!file_exists($path)) {\n // mkdir($path);\n // }\n\n // $fileNameExport = \"ASM SYSTEM \" . date(\"Ymd\") . \" (\" . date(\"D\") . \") \" . date(\"Hi\") . \".pdf\";\n // $output = $path . \"/\" . $fileNameExport;\n\n // $file = $dompdf->output();\n // file_put_contents($output, $file);\n\n // debug\n // exit;\n\n $result_sended = self::__sendFileToMail($data, $mail1['Value'], $mail2['Value']);\n // mails receipt\n $mails_receipt = \"\";\n if ($mail1['Value']) {\n $mails_receipt .= $mail1['Value'];\n }\n\n if ($mail2['Value']) {\n $mails_receipt .= \", \" . $mail2['Value'];\n }\n // result\n $result = \"\";\n if(isset($result_sended['success']) && $result_sended['success'] == 1){\n $result = \"success\";\n } else {\n $result = \"fail\";\n }\n\n // ==> SAVE RESULT TO DB\n $sended = TableRegistry::getTableLocator()->get('TBLTSendMail')->newEntity();\n $sended->Date = date(\"Y-m-d\");\n $sended->Time = date(\"H:i\");\n $sended->ToEmail = $mails_receipt;\n $sended->FileSend = '';\n $sended->Result = $result;\n TableRegistry::getTableLocator()->get('TBLTSendMail')->save($sended);\n\n // ==> WRITE LOG\n $content = \n \"Date: \".date(\"Y-m-d\") . \"\\n\" .\n \"Time: \".date(\"H:i\") . \"\\n\" . \n \"To emails: \" . $mails_receipt .\"\\n\".\n \"Filename attachment: \".'' . \"\\n\" .\n \"Result: \".$result . \"\\n \\n\";\n Log::info($content, ['scope' => ['SENDMAIL']]);\n }\n exit;\n }", "function getMarksheet(){\n \n //get student datails to print in marksheet\n $unique_id1 = $this->session->userdata('unique_id1');\n $session1 = $this->session->userdata('session1');\n $q = $this->db->where('unique_id',$unique_id1)\n ->get('userinfo');\n \n\t if( $q->num_rows()>0 ){\n\t\t\t\t//login valid\n\t\t\t\t$name1 = $q->row('name');\n\t\t\t\t$contact_number1 = $q->row('contact_number');\n\t\t\t\t$city1 = $q->row('city');\n\t\t\t\t$state1 =\t$q->row('state');\n\t\t\t\t$address1 = $q->row('address');\n\t\t\t\t$school_name1 = $q->row('school_name');\n\t\t\t\t$father_name1 = $q->row('father_name');\n\t\t\t\t$enroll_no1 = $q->row('enroll_no');\n\t\t\t\t$class11 = $q->row('class1');\n\t\t\t\t$profile_img_path1 = $q->row('profile_img_path');\n\t\t\t\t$sign_img_path1 = $q->row('sign_img_path');\n\t\t\t\t$parent_sign_path1 = $q->row('parent_sign_path');\n\t\t\t\t$dob1 = $q->row('dob');\n\t\t\t\t$gender1 = $q->row('gender');\n\t\t\t\t$aadhar_no1 = $q->row('aadhar_no');\n\t\t\t\t$section1 = $q->row('section');\n\t\t\t\t\n\t\t\t\t$this->session->set_userdata('name1',$name1);\n\t\t\t\t$this->session->set_userdata('contact_number1',$contact_number1);\n\t\t\t\t$this->session->set_userdata('city1',$city1);\n\t\t\t\t$this->session->set_userdata('state1',$state1);\n\t\t\t\t$this->session->set_userdata('address1',$address1);\n\t\t\t\t$this->session->set_userdata('school_name1',$school_name1);\n\t\t\t\t$this->session->set_userdata('father_name1',$father_name1);\n\t\t\t\t$this->session->set_userdata('enroll_no1',$enroll_no1);\n\t\t\t\t$this->session->set_userdata('class11',$class11);\n\t\t\t\t$this->session->set_userdata('section1',$section1);\n $this->session->set_userdata('profile_img_path1',$profile_img_path1);\n $this->session->set_userdata('dob1',$dob1);\n\t\t\t\t$this->session->set_userdata('sign_img_path1',$sign_img_path1);\n\t\t\t\t$this->session->set_userdata('aadhar_no1',$aadhar_no1);\n\t\t\t\t$this->session->set_userdata('parent_sign_path1',$parent_sign_path1);\n\t\t\t\t$this->session->set_userdata('gender1',$gender1);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//get school details to display in marksheet\n\t\t\t\t$school_name = $this->session->userdata('school_name');\n\t $q = $this->db->like('school_name',$school_name)\n\t\t\t\t\t\t->get('userinfo');\n\n\t\t\tif( $q->num_rows()>0 ){\n\t\t\t\t//login valid\n\t\t\t\t$contact_number2 = $q->row('contact_number');\n\t\t\t\t$email2 = $q->row('email');\n\t\t\t\t$city2 = $q->row('city');\n\t\t\t\t$state2 =\t$q->row('state');\n\t\t\t\t$address2 = $q->row('address');\n\t\t\t\t$profile_img_path2 = $q->row('profile_img_path');\n\t\t\t\t\n\t\t\t\t$this->session->set_userdata('contact_number2',$contact_number2);\n\t\t\t\t$this->session->set_userdata('email2',$email2);\n\t\t\t\t$this->session->set_userdata('city2',$city2);\n\t\t\t\t$this->session->set_userdata('state2',$state2);\n\t\t\t\t$this->session->set_userdata('address2',$address2);\n\t\t\t\t$this->session->set_userdata('profile_img_path2',$profile_img_path2);\n\t\t\t\t\n\t\t\t}\n \n $q = $this->db->where('student_id',$unique_id1)\n\t\t ->where('session1',$session1)\n\t\t ->get('marks_table');\n\t\t \n\t\t $result = $q->result();\n\t\t $this->load->view('view_marksheet_operator',['dblist'=>$result]);\n \n\t }\n }", "public function main()\n {\n $records = array();\n\n $this->pObj->arrReport[] = '\n <h2>\n ' . $this->pObj->pi_getLL('ts_create_header') . '\n </h2>';\n\n $records = $this->page();\n $this->sqlInsert($records);\n }", "public function feVisitReportAction(){\n\n\t\t\t\t$params = $this->getRequest()->getParams(); \n\t\t\t\t$db = $this->db;\n\t\t\t\t$secretkey = $this->secretkey; \n\t\t\t\t$appkey\t= isset($params['appkey'])?$params['appkey']:\"\";\n\t\t\t\t$LoginID\t= isset($params['LoginID'])?$params['LoginID']:\"\";\n\t\t\t\t$device_id\t= isset($params['device_id'])?$params['device_id']:\"\";\n\t\t\t\t$farmer_code\t= isset($params['farmer_code'])?$params['farmer_code']:\"\";\n\t\t\t\t$comment\t= isset($params['comment'])?$params['comment']:\"\";\n\t\t\t\t$sink_date_time \t= isset($params['sink_date_time'])?$params['sink_date_time']:\"\";\n\n\n\t\t\t\t$error_code = 1;\n\t\t\t\t$succes = FALSE; \n\t\t\t\ttry{\n\t\t\t\t\t$db->beginTransaction();\n\t\t\t\t\tif($secretkey != $appkey){\n\t\t\t\t\t\tthrow new Exception(\"Invalid request.\");\n\t\t\t\t\t}\t\n\t\t\t\t\tif(!$LoginID || !$device_id){\n\t\t\t\t\t\tthrow new Exception(\"Required parameter missing.\");\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t$user = new Application_Model_Users();\n\t\t\t\t\t$alldata = $user->getUserDataByLoginId($LoginID);\n\t\t\t\t\tif(!empty($alldata['LoginID']) != $LoginID){\n\t\t\t\t\t\tthrow new Exception('Invalid login id.');\n\t\t\t\t\t} \n\t\t\t\t\tif(!empty($alldata['DeviceID'])){\t\t\t\n\t\t\t\t\t\tif($alldata['DeviceID'] != $device_id){\n\t\t\t\t\t\t\t$error_code = 3;\n\t\t\t\t\t\t\tthrow new Exception('You are not athorized for this device.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tif(strtolower($alldata['StaffStatus']) != 'ac'){\n\t\t\t\t\t\t$error_code = 3;\n\t\t\t\t\t\tthrow new Exception('Your account is not active.');\n\t\t\t\t\t}\t\n\n\t\t\t\t\tif($alldata['App_Access_Status'] == 2){\n\t\t\t\t\t\t$error_code = 2;\n\t\t\t\t\t\tthrow new Exception('This account deactivated by admin.');\n\t\t\t\t\t}\n\n\t\t\t\t\t$farmerMaster = new Application_Model_Farmermasters();\n\t\t\t\t\t$allFarmerData = $farmerMaster->getFarmerDetailsByFarmerCode($farmer_code); \t\n\t\t\t\t\t$farmerID = $allFarmerData['id'];\n\t\t\t\t\t$farmerCode = $allFarmerData['FarmerCode'];\n\n\n\t\t\t\t\t$fe_report = array(); \n\n\t\t\t\t\t$fe_report['comment'] = $comment;\n\n\t\t\t\t\t$fe_report['farmer_code'] = $farmer_code;\n\t\t\t\t\t$fe_report['farmer_id'] = $farmerID;\n\t\t\t\t\t$fe_report['fe_code'] = $LoginID;\n\t\t\t\t\t$fe_report['sink_date_time'] = $sink_date_time;\n\t\t\t\t\t$fe_report['created'] = $this->currdate; \n\t\t\t\t\t$db->insert('logi_fevisit_report', $fe_report);\n\n\t\t\t\t\t$landdetailId = $db->lastInsertId();\n\n\t\t\t\t\t$db->commit();\n\t\t\t\t\t$succes = TRUE;\t \n\t\t\t\t}\n\n\t\t\t\tcatch(Exception $e){\n //Rollback transaction\n\t\t\t\t\t$db->rollBack();\n\t\t\t\t\t$error= $e->getMessage();\n\t\t\t\t}\n\n\t\t\t\tif($succes == TRUE ){\n\t\t\t\t\techo json_encode(array(\"error_code\"=>'0', 'response_string'=>'Fe report Detail Inserted successfully.', 'fe_report_id'=>$landdetailId));\n\t\t\t\t\texit;\n\n\t\t\t\t}\n\n\t\t\t\telse{\n\t\t\t\t\techo json_encode(array(\"error_code\"=>$error_code, 'response_string'=>$error));\n\t\t\t\t\texit;\n\t\t\t\t}\n\n\t\t\t}", "public function show_report_service()\n { \n $this->load->model(\"swm/frontend/M_swm_attend\", \"msa\");\n $rs_service_data = $this->msa->get_time_us_attend(getNowDate(),getNowDate());//startDate, endDate, startAge, endAge, state\n $data['rs_service_data'] = $rs_service_data->result();\n $this->output(\"swm/frontend/v_report_service\", $data, true);\n }", "function processRemitaReceipt(){\n\n// redirect(base_url() . 'index.php?login', 'refresh');\n\t\tsession_start();\n\n\t\t\n\n\t\t$rrr = $this->input->post('rrr');\n\t\t\n\t\tif($rrr == '' || $rrr == ' ')\n\t\t{\n\n\t\t\n\t\t\t$_SESSION['err_msg'] = 'Incorrect RRR supplied.';\n\n\t\t\tredirect(base_url() . 'index.php?register/remitaGetReceipt');\n\t\t}\n\t\t\n\t\t\n\t\t$payment= $this->db->get_where('applicationinvoice_gen', array('rrr' => $rrr))->row();\n\t\t$PortalID1=$payment->payerID;\n\t\t$st= $this->db->get_where('student', array('portal_id' => $PortalID1))->row();\n\t\tif(!$st)\n\t\t\t {\n\t\t\t\t $names = explode(\" \",$payment->payername);\n\t\t\t\t \n\t\t\t$data[\"name\"]=$names[0];\n\t\t\t$data[\"othername\"]=$names[1].\" \".$names[2];\n\t\t\t$data[\"reg_no\"]=$payment->payerID;\n\t\t\t$data[\"portal_id\"]=$payment->payerID;\n\t\t\t$data[\"password\"]=rand(1000,100000);\n\t\t\t$data[\"dept\"]=0;\n\t\t\t$data[\"school\"]=0;\n\t\t\t$data[\"programme\"]=0;\n\t\t\t$data[\"prog_type\"]=0;\n\t\t\t$data[\"dept_option\"]=0;\n\t\t\t//$email =strtolower($adm_exist->surname).'.'.strtolower($adm_exist->firstname).mt_rand(1,1000).'@student.yabatech.edu.ng';\n\t\t\t$data[\"program_id\"]=0;\t\t\n\t\t\t$data[\"phone\"]=$payment->payerphone;\n $data[\"email\"]=$payment->payeremail;\t\t\t\n\t\t\t//$this->db->where('student_id',$row['student_id']);\n // $this->db->update('student', $data);\n\t\t\t//$data[\"email\"]=$adm_exist->dept_option_id;\n\t\t\t\n\t\t\t$result=$this->db->insert('student',$data);\n\t\t\t }\n\t\t\n\t\t\tif(!$payment)\n\t\t{\n\t\t\t$_SESSION['err_msg'] = 'Invalid RRR: Sorry RRR was not generated on this Portal';\n\n\t\t\tredirect(base_url() . 'index.php?register/remitaGetReceipt');\n\n\t\t}\n\t\t\n\t\t\n\t\tif($pmode==1)\n\t\t{\n\t $exp_paid = $this->db->get_where('nekede_etranzact_payment', array(\"confirm_code\" => $confirmcode))->row();\n\t\tif($exp_paid)\n\t\t{\n\t\t$verify_invoice = $this->db->get_where('invoice_gen', array(\"invoice_no\" => $exp_paid->payee_id,\"portal_id\"=>$portalID))->row();\n\t\tif(!$verify_invoice)\n\t\t{\n\t\t\t$_SESSION['err_msg'] = 'Sorry Confirmation Code Supplied does not Belong to you! Contact Administrator for further information';\n\n\t\t\tredirect(base_url() . 'index.php?register/pay_acp_fees');\n\t\t}\n\t\t$session = $verify_invoice->session_id;\n\t\n\t\t\n\t\t$verify_payment_log = $this->db->get_where('eduportal_fees_payment_log', array(\"payment_fee_type\" => '1','student_id' => $this->session->userdata('newstudent_id'),'payment_session'=>$session))->row();\n\t\tif(!$verify_payment_log)\n\t\t{\n\t\t\t$payment_data = array(\n 'regno'=>$portalID,\n 'payment_code' => $confirmcode,\n 'payment_session' => $session,\n\t\t\t 'payment_level'=> $year,\n\t\t\t 'payment_amount'=>$verify_invoice->amount,\n\t\t\t 'payment_status' =>'F',\n\t\t\t 'payment_date' => date('Y-m-d H:i:s'),\n\t\t\t 'payment_fee_type' => '1',\n\t\t\t 'student_id' => $this->session->userdata('student_id'),\n\t\t\t 'semester'=> 'FIRST'\n\t\t\t \n );\t\t\t\n\n$this->db->insert('eduportal_fees_payment_log',$payment_data);\t\n\t\t}\n\t\t$_SESSION['payeeID']= $confirmcode;\n\t\tredirect(base_url() . 'index.php?register/etransact_acp_receipt');\n}\nelse\n{\n \t$terminalID = '7630000003';\n // $cfc = $this->input->post('CONFIRMATION_NO'); \n \n //start etranzact\n\n $this->load->library('etranzact'); //load the ozioma library $this->input->post('message')\n $this->etranzact->set_terminal($terminalID);//message from textfield\n $this->etranzact->set_conf($confirmcode);//message from textfield\n $this->etranzact->send();\n\n \n //break;\n if($this->etranzact->get_status() != \"-1\" && $this->etranzact->get_status() != \"00\" && strlen($this->etranzact->get_confirm()) > 3){ \n\n $student = $this->db->get_where('student', array(\"student_id\" => $this->session->userdata('student_id')))->row();\n\t\t\t $school = $this->db->get_where('schools', array(\"schoolid\" => $student->school))->row();\n$dept = $this->db->get_where('department', array(\"deptID\" => $student->dept))->row();\n$programme = $this->db->get_where('student_type', array(\"student_type_id\" => $student->programme))->row();\n$programme_type = $this->db->get_where('programme_type', array(\"programme_type_id\" => $student->prog_type))->row();\n$yr = $this->db->get_where('course_year_of_study', array(\"year_of_study_id\" => $student->level))->row();\n \n $data['receipt_no'] = $this->etranzact->get_receipt();\n $data['bankcode'] = $this->etranzact->get_bankcode();\n $data['bankname'] = $this->etranzact->get_bankname();\n $data['branchcode'] = $this->etranzact->get_branchcode();\n $data['confirm_code'] = $this->etranzact->get_confirm();\n $data['amount'] = $this->etranzact->get_amount();\n $data['description'] = $this->etranzact->get_descr();\n $data['payment_confirmation_date'] = $this->etranzact->get_date();\n $data['payee_id'] = $this->etranzact->get_customer();\n $data['payment_method'] = 'Bank';\n $data['status'] = 'PAID';\n $data['prog_type'] = $student->prog_type; \n $data['student_id'] = $this->session->userdata('student_id'); \n\t\t\t\t\t \n $data['portal_id'] = $portalID;\n \n $data['session'] = '2016/2017'; \n\t\t\t\t\t$data['fullname'] = $student->name.' '.$student->othername;\n\t\t\t\t\t$data['phone'] = $student->phone;\n\t\t\t\t\t$data['email'] = $student->email;\n\t\t\t\t\t$data['programme'] = $programme_type->programme_type_name;\n\t\t\t\t\t$data['faculty'] = $school->schoolname;\n\t\t\t\t\t$data['department'] = $dept->deptName;\n\t\t\t\t\t$data['level'] = $yr->year_of_study_name; \n \n\n //$this->db->insert('prehnd_etranzact_data', $data);\n // $this->db->where('payee_id', $this->etranzact->get_customer());\n\t\t\t\t \n $verify_invoice = $this->db->get_where('invoice_gen', array(\"invoice_no\" => $this->etranzact->get_customer(),\"portal_id\"=>$portalID))->row();\n\t\tif(!$verify_invoice)\n\t\t{\n\t\t\t$_SESSION['err_msg'] = 'Sorry Confirmation Code Supplied does not Belong to you! Contact Administrator for further information';\n\n\t\t\tredirect(base_url() . 'index.php?student/pay_acp_fees');\n\t\t}\n\t\t$session = $verify_invoice->session_id;\n\t\t//$student= $this->db->get_where('student', array('student_id' => $this->session->userdata('student_id')))->row();\n\t\t$verify_payment_log = $this->db->get_where('eduportal_fees_payment_log', array(\"payment_fee_type\" => '1','student_id' => $this->session->userdata('student_id'),'payment_session'=>$session))->row();\n\t\tif(!$verify_payment_log)\n\t\t{\n\t\t\t$payment_data = array(\n 'regno'=>$portalID,\n 'payment_code' => $confirmcode,\n 'payment_session' => $session,\n\t\t\t 'payment_level'=> $year,\n\t\t\t 'payment_amount'=>$verify_invoice->amount,\n\t\t\t 'payment_status' =>'F',\n\t\t\t 'payment_date' => date('Y-m-d H:i:s'),\n\t\t\t 'payment_fee_type' => '1',\n\t\t\t 'student_id' => $this->session->userdata('student_id'),\n\t\t\t 'semester'=> 'FIRST'\n\t\t\t \n );\t\t\t\n\n$this->db->insert('eduportal_fees_payment_log',$payment_data);\t\n\t\t}\n\t\t\n \n\t\t$this->db->insert('nekede_etranzact_payment', $data);\n \n\n //get the sms sender\n //$sender = $this->db->get_where('prehnd_settings', array('settings' => 'sms_sender'))->row();\n $sender = 'Eduportal';\n $reciever = $this->session->userdata('fullname'); \n\n // Start Ozioma\n $this->load->library('ozioma'); \n\n //set message\n $this->ozioma->set_message(\"Hello \" . $reciever . \", you have successfully confirmed your HND Acceptance Fee payment.\");\n\n //recipient phone number\n $this->ozioma->set_recipient('2348034158429');\n\n //sender\n //$this->ozioma->set_sender($sender->value);\n $this->ozioma->set_sender($sender);\n \n //send\n $this->ozioma->send();\n session_start();\n\t\t\t\t\t$_SESSION['payeeID']= $confirmcode;\n\t\t\n redirect(base_url() . 'index.php?student/etransact_acp_receipt'); \n\t\t\t\t \n\n }else{\n $terminalID = '7630000002';\n // $cfc = $this->input->post('CONFIRMATION_NO'); \n \n //start etranzact\n\n $this->load->library('etranzact'); //load the ozioma library $this->input->post('message')\n $this->etranzact->set_terminal($terminalID);//message from textfield\n $this->etranzact->set_conf($confirmcode);//message from textfield\n $this->etranzact->send();\n\n \n //break;\n if($this->etranzact->get_status() != \"-1\" && $this->etranzact->get_status() != \"00\" && strlen($this->etranzact->get_confirm()) > 3){ \n\n $student = $this->db->get_where('student', array(\"student_id\" => $this->session->userdata('student_id')))->row();\n\t\t\t $school = $this->db->get_where('schools', array(\"schoolid\" => $student->school))->row();\n$dept = $this->db->get_where('department', array(\"deptID\" => $student->dept))->row();\n$programme = $this->db->get_where('student_type', array(\"student_type_id\" => $student->programme))->row();\n$programme_type = $this->db->get_where('programme_type', array(\"programme_type_id\" => $student->prog_type))->row();\n$yr = $this->db->get_where('course_year_of_study', array(\"year_of_study_id\" => $student->level))->row();\n \n $data['receipt_no'] = $this->etranzact->get_receipt();\n $data['bankcode'] = $this->etranzact->get_bankcode();\n $data['bankname'] = $this->etranzact->get_bankname();\n $data['branchcode'] = $this->etranzact->get_branchcode();\n $data['confirm_code'] = $this->etranzact->get_confirm();\n $data['amount'] = $this->etranzact->get_amount();\n $data['description'] = $this->etranzact->get_descr();\n $data['payment_confirmation_date'] = $this->etranzact->get_date();\n $data['payee_id'] = $this->etranzact->get_customer();\n $data['payment_method'] = 'Bank';\n $data['status'] = 'PAID';\n $data['prog_type'] = $student->prog_type; \n $data['student_id'] = $this->session->userdata('student_id'); \n\t\t\t\t\t \n $data['portal_id'] = $portalID;\n \n $data['session'] = '2016/2017'; \n\t\t\t\t\t$data['fullname'] = $student->name.' '.$student->othername;\n\t\t\t\t\t$data['phone'] = $student->phone;\n\t\t\t\t\t$data['email'] = $student->email;\n\t\t\t\t\t$data['programme'] = $programme_type->programme_type_name;\n\t\t\t\t\t$data['faculty'] = $school->schoolname;\n\t\t\t\t\t$data['department'] = $dept->deptName;\n\t\t\t\t\t$data['level'] = $yr->year_of_study_name; \n \n\n //$this->db->insert('prehnd_etranzact_data', $data);\n // $this->db->where('payee_id', $this->etranzact->get_customer());\n\t\t\t\t \n $verify_invoice = $this->db->get_where('invoice_gen', array(\"invoice_no\" => $this->etranzact->get_customer(),\"portal_id\"=>$portalID))->row();\n\t\tif(!$verify_invoice)\n\t\t{\n\t\t\t$_SESSION['err_msg'] = 'Sorry Confirmation Code Supplied does not Belong to you! Contact Administrator for further information';\n\n\t\t\tredirect(base_url() . 'index.php?student/pay_acp_fees');\n\t\t}\n\t\t$session = $verify_invoice->session_id;\n\t\t//$student= $this->db->get_where('student', array('student_id' => $this->session->userdata('student_id')))->row();\n\n\t\t$verify_payment_log = $this->db->get_where('eduportal_fees_payment_log', array(\"payment_fee_type\" => '1','student_id' => $this->session->userdata('student_id'),'payment_session'=>$session))->row();\n\t\tif(!$verify_payment_log)\n\t\t{\n\t\t\t$payment_data = array(\n 'regno'=>$portalID,\n 'payment_code' => $confirmcode,\n 'payment_session' => $session,\n\t\t\t 'payment_level'=> $year,\n\t\t\t 'payment_amount'=>$verify_invoice->amount,\n\t\t\t 'payment_status' =>'F',\n\t\t\t 'payment_date' => date('Y-m-d H:i:s'),\n\t\t\t 'payment_fee_type' => '1',\n\t\t\t 'student_id' => $this->session->userdata('student_id'),\n\t\t\t 'semester'=> 'FIRST'\n\t\t\t \n );\t\t\t\n\n$this->db->insert('eduportal_fees_payment_log',$payment_data);\t\n\t\t}\n\t\t\n \n\t\t$this->db->insert('nekede_etranzact_payment', $data);\n \n\n //get the sms sender\n //$sender = $this->db->get_where('prehnd_settings', array('settings' => 'sms_sender'))->row();\n $sender = 'Eduportal';\n $reciever = $this->session->userdata('fullname'); \n\n // Start Ozioma\n $this->load->library('ozioma'); \n\n //set message\n $this->ozioma->set_message(\"Hello \" . $reciever . \", you have successfully confirmed your HND Acceptance Fee payment.\");\n\n //recipient phone number\n $this->ozioma->set_recipient('2348034158429');\n\n //sender\n //$this->ozioma->set_sender($sender->value);\n $this->ozioma->set_sender($sender);\n \n //send\n $this->ozioma->send();\n session_start();\n\t\t\t\t\t$_SESSION['payeeID']= $confirmcode;\n\t\t\n redirect(base_url() . 'index.php?student/etransact_acp_receipt'); \n\t\t\t\t \n\n }\n \n else{\n\t\t\t\t\t $terminalID = '7730020028';\n // $cfc = $this->input->post('CONFIRMATION_NO'); \n \n //start etranzact\n\n $this->load->library('etranzact'); //load the ozioma library $this->input->post('message')\n $this->etranzact->set_terminal($terminalID);//message from textfield\n $this->etranzact->set_conf($confirmcode);//message from textfield\n $this->etranzact->send();\n\n \n //break;\n if($this->etranzact->get_status() != \"-1\" && $this->etranzact->get_status() != \"00\" && strlen($this->etranzact->get_confirm()) > 3){ \n\n $student = $this->db->get_where('student', array(\"student_id\" => $this->session->userdata('student_id')))->row();\n\t\t\t $school = $this->db->get_where('schools', array(\"schoolid\" => $student->school))->row();\n$dept = $this->db->get_where('department', array(\"deptID\" => $student->dept))->row();\n$programme = $this->db->get_where('student_type', array(\"student_type_id\" => $student->programme))->row();\n$programme_type = $this->db->get_where('programme_type', array(\"programme_type_id\" => $student->prog_type))->row();\n$yr = $this->db->get_where('course_year_of_study', array(\"year_of_study_id\" => $student->level))->row();\n \n $data['receipt_no'] = $this->etranzact->get_receipt();\n $data['bankcode'] = $this->etranzact->get_bankcode();\n $data['bankname'] = $this->etranzact->get_bankname();\n $data['branchcode'] = $this->etranzact->get_branchcode();\n $data['confirm_code'] = $this->etranzact->get_confirm();\n $data['amount'] = $this->etranzact->get_amount();\n $data['description'] = $this->etranzact->get_descr();\n $data['payment_confirmation_date'] = $this->etranzact->get_date();\n $data['payee_id'] = $this->etranzact->get_customer();\n $data['payment_method'] = 'Bank';\n $data['status'] = 'PAID';\n $data['prog_type'] = $student->prog_type; \n $data['student_id'] = $this->session->userdata('student_id'); \n\t\t\t\t\t \n $data['portal_id'] = $portalID;\n \n $data['session'] = '2016/2017'; \n\t\t\t\t\t$data['fullname'] = $student->name.' '.$student->othername;\n\t\t\t\t\t$data['phone'] = $student->phone;\n\t\t\t\t\t$data['email'] = $student->email;\n\t\t\t\t\t$data['programme'] = $programme_type->programme_type_name;\n\t\t\t\t\t$data['faculty'] = $school->schoolname;\n\t\t\t\t\t$data['department'] = $dept->deptName;\n\t\t\t\t\t$data['level'] = $yr->year_of_study_name; \n \n\n //$this->db->insert('prehnd_etranzact_data', $data);\n // $this->db->where('payee_id', $this->etranzact->get_customer());\n\t\t\t\t \n $verify_invoice = $this->db->get_where('invoice_gen', array(\"invoice_no\" => $this->etranzact->get_customer(),\"portal_id\"=>$portalID))->row();\n\t\tif(!$verify_invoice)\n\t\t{\n\t\t\t$_SESSION['err_msg'] = 'Sorry Confirmation Code Supplied does not Belong to you! Contact Administrator for further information';\n\n\t\t\tredirect(base_url() . 'index.php?student/pay_acp_fees');\n\t\t}\n\t\t$session = $verify_invoice->session_id;\n\t\t//$student= $this->db->get_where('student', array('student_id' => $this->session->userdata('student_id')))->row();\n\n\t\t$verify_payment_log = $this->db->get_where('eduportal_fees_payment_log', array(\"payment_fee_type\" => '1','student_id' => $this->session->userdata('student_id'),'payment_session'=>$session))->row();\n\t\tif(!$verify_payment_log)\n\t\t{\n\t\t\t$payment_data = array(\n 'regno'=>$portalID,\n 'payment_code' => $confirmcode,\n 'payment_session' => $session,\n\t\t\t 'payment_level'=> $year,\n\t\t\t 'payment_amount'=>$verify_invoice->amount,\n\t\t\t 'payment_status' =>'F',\n\t\t\t 'payment_date' => date('Y-m-d H:i:s'),\n\t\t\t 'payment_fee_type' => '1',\n\t\t\t 'student_id' => $this->session->userdata('student_id'),\n\t\t\t 'semester'=> 'FIRST'\n\t\t\t \n );\t\t\t\n\n$this->db->insert('eduportal_fees_payment_log',$payment_data);\t\n\t\t}\n\t\t\n \n\t\t$this->db->insert('nekede_etranzact_payment', $data);\n \n\n //get the sms sender\n //$sender = $this->db->get_where('prehnd_settings', array('settings' => 'sms_sender'))->row();\n $sender = 'Eduportal';\n $reciever = $this->session->userdata('fullname'); \n\n // Start Ozioma\n $this->load->library('ozioma'); \n\n //set message\n $this->ozioma->set_message(\"Hello \" . $reciever . \", you have successfully confirmed your HND Acceptance Fee payment.\");\n\n //recipient phone number\n $this->ozioma->set_recipient('2348034158429');\n\n //sender\n //$this->ozioma->set_sender($sender->value);\n $this->ozioma->set_sender($sender);\n \n //send\n $this->ozioma->send();\n session_start();\n\t\t\t\t\t$_SESSION['payeeID']= $confirmcode;\n\t\t\n redirect(base_url() . 'index.php?student/etransact_acp_receipt'); \n\t\t\t\t \n\n }\n\t\t\t\t\t else{\n $_SESSION['err_msg'] = 'The Confirmation Code you entered is incorrect';\n redirect(base_url() . 'index.php?student/pay_acp_fees');\n\t\t\t\t\t }\n }\n \n \n \n } \n\t\n}\n\t\t}\n\t\telse{\n\t\t$exp_paid = $this->db->get_where('eduportal_remita_payment', array(\"rrr\" => $rrr))->row();\n\t\tif($exp_paid)\n\t\t{\n\t\t$verify_invoice = $this->db->get_where('applicationinvoice_gen', array(\"rrr\" => $rrr))->row();\n\t\tif(!$verify_invoice)\n\t\t{\n\t\t\t$_SESSION['err_msg'] = 'Sorry RRR Supplied does not Exist';\n\n\t\t\tredirect(base_url() . 'index.php?register/remitaGetReceipt');\n\t\t}\n\t\t$session = $verify_invoice->acadsession;\n\t\t$student= $this->db->get_where('student', array('portal_id' => $verify_invoice->payerID))->row();\n\t\t$verify_payment_log = $this->db->get_where('eduportal_fees_payment_log', array(\"payment_fee_type\" => $verify_invoice->paymentid,'payment_code' => $rrr,'payment_session'=>$session))->row();\n\t\tif(!$verify_payment_log)\n\t\t{\n\t\t\t$payment_data = array(\n 'regno'=>$verify_invoice->payerID,\n 'payment_code' => $rrr,\n 'payment_session' => $session,\n\t\t\t 'payment_level'=> $session,\n\t\t\t 'payment_amount'=>$verify_invoice->amt,\n\t\t\t 'payment_status' =>'F',\n\t\t\t 'payment_date' => date('Y-m-d H:i:s'),\n\t\t\t 'payment_fee_type' => $verify_invoice->paymentid,\n\t\t\t 'student_id' => $student->student_id,\n\t\t\t 'semester'=> 'FIRST'\n\t\t\t \n );\t\t\t\n\n$this->db->insert('eduportal_fees_payment_log',$payment_data);\t\n\t\t}\n\t\t$_SESSION['payeeID']= $rrr;\n\t\tredirect(base_url() . 'index.php?register/remita_payment_receipt');\n}\nelse\n{\n\t\n\t\t\t$mert = '576943955';\n\n\t\t\t$api_key = '428537';\n\n\t\t\t$concatString = $rrr . $api_key . $mert;\n\n\t\t\t$hash = hash('sha512', $concatString);\n\n\t\t\t$url \t= 'https://login.remita.net/remita/ecomm/' . $mert . '/' . $rrr . '/' . $hash . '/' . 'status.reg';\n\n\t\t\t// Initiate curl\n\n\n\n\t\t\t$ch = curl_init();\n\n\t\t\t// Disable SSL verification\n\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n\t\t\t// Will return the response, if false it print the response\n\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\t\t\t// Set the url\n\n\t\t\tcurl_setopt($ch, CURLOPT_URL,$url);\n\n\t\t\t// Execute\n\n\t\t\t$result=curl_exec($ch);\n\n\t\t\t// Closing\n\n\t\t\tcurl_close($ch);\n\n\t\t\t$response = json_decode($result, true);\n\n\t\t\t$msg = $response['message'];\n\n\t\t\t$rem = $response['RRR'];\n\n\t\t\t\n\n\t\t\tif($msg == 'Approved'){\n\n\t\t\t\t\n\n\t\t\t\t//get the applicant invoice details using the portal id\n\n\t\t\t\t$stud = $this->db->get_where('applicationinvoice_gen', array(\"rrr\" => $rem))->row();\n $student = $this->db->get_where('student', array(\"portal_id\" => $stud->payerID))->row();\n\t\t\t\t\n\n\t\t\t\t$data5['rrr'] = $rem;\n\t\t\t\t$data5['payment_id'] = $response['orderId'];\n\t\t\t\t$data5['channel'] = 'BRANCH';\n\t\t\t\t$data5['amount'] = $response['amount'];\n\t\t\t\t$data5['payer_name'] = $stud->payername;\n\t\t\t\t$data5['payer_email'] =$stud->payeremail;\n\n\t\t\t\t$data5['payer_phone'] = $stud->payerphone;\n\n\t\t\t\t$data5['unique_id'] = $response['orderId'];\n\n\t\t\t\t$data5['response_code'] = $response['status'];\n\n\t\t\t\t$data5['trans_date'] = date(\"Y-m-d\");\n $data5['debit_date']=$response['transactiontime'];\n\t\t\t\t$data2['status'] = $msg;\n\n\t\t\t\t\n\t\t\t\t $this->session->set_userdata('receipt',$stud->$response['orderId']); //Trans Receipt\n\t\t\t\t\t\t //Transaction PayeeID\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t // \tinclude('application/config/z.php');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\n$verify_invoice = $this->db->get_where('applicationinvoice_gen', array(\"rrr\" => $rrr))->row();\n$session = $verify_invoice->acadsession;\n$year = $verify_invoice->acadsession;\n\t\tif(!$verify_invoice)\n\t\t{\n\t\t\t$_SESSION['err_msg'] = 'Sorry RRR Supplied does not Exit';\n\n\t\t\tredirect(base_url() . 'index.php?register/pay_acp_fees');\n\t\t}\n\t\t\t\t\t\t\n\t\t\t\t$this->db->where('rrr', $rrr);\n\n\t\t\t\t$this->db->update('applicationinvoice_gen', $data2);\n\t\t\t\t\n\t\t\t\t$this->db->where('rrr', $rrr);\n\n\t\t\t\t$this->db->update('eduportal_remita_payment', $data2);\n\n\t\t\t\t\n\n\t\t\t\t//check if record already exists\n\n\t\t\t\t$rrrset = $this->db->get_where('eduportal_remita_payment', array(\"rrr\" => $rrr))->row();\n\t\t\t\t\n\n\t\t\t\tif($rrrset){\n\n\t\t\t\t\n\t\t\t\t\t//$this->session->set_userdata('logged_in',\"1\");\t\n\t\t\t\t\t$_SESSION['payeeID']= $rrr;\n\t\t\t\t\tredirect(base_url() . 'index.php?register/remita_acp_receipt');\n\t\t\t\t\t\t\t\t//echo $rem . ' already in accp table <br />';\n\n\t\t\t\t\t\n\n\t\t\t\t}else{\n\t\t\t\t\t\n\n\t\t\t\t\t$this->db->insert('eduportal_remita_payment', $data5);\n\n\t$verify_payment_log = $this->db->get_where('eduportal_fees_payment_log', array(\"payment_fee_type\" => $verify_invoice->paymentid,'payment_code' => $rrr,'payment_session'=>$session))->row();\n\t\n\t\tif(!$verify_payment_log)\n\t\t{\n\t\t\t$payment_data = array(\n 'regno'=>$verify_invoice->payerID,\n 'payment_code' => $rrr,\n 'payment_session' => $session,\n\t\t\t 'payment_level'=> $year,\n\t\t\t 'payment_amount'=>$verify_invoice->amt,\n\t\t\t 'payment_status' =>'F',\n\t\t\t 'payment_date' => date('Y-m-d H:i:s'),\n\t\t\t 'payment_fee_type' => $verify_invoice->paymentid,\n\t\t\t 'student_id' => $student->student_id,\n\t\t\t 'semester'=> 'FIRST'\n\t\t\t \n );\t\t\t\n\n$this->db->insert('eduportal_fees_payment_log',$payment_data);\ninclude('application/config/z.php');\n \n$serviceheadid = \"gtcopaul\";\n$token = \"736@_73gh\";\n\n$adm= sqlsrv_query($conn,\"SELECT payername, payerID from applicationinvoice_gen where rrr='$rrr'\")or die( print_r( sqlsrv_errors(), true));\n while(list( $payername, $payerID)=sqlsrv_fetch_array($adm))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$names =$payername; \t\ntry{\n\t $opts = array(\n 'ssl' => array('ciphers'=>'RC4-SHA', 'verify_peer'=>false, 'verify_peer_name'=>false)\n);\n// SOAP 1.2 client\n\n\n$params = array ('encoding' => 'UTF-8', 'verifypeer' => false, 'verifyhost' => false, 'soap_version' => SOAP_1_2, 'trace' => 1, 'exceptions' => 1, \"connection_timeout\" => 180, 'stream_context' => stream_context_create($opts) );\n$soapclient = new SoapClient('http://portal.yabatech.edu.ng/paymentservice/yctoutservice.asmx?wsdl',$params);\n\n$param=array(\n'tx'=>$serviceheadid,\n'ty'=>$token,\n't1'=>\"Approved\",\n't2'=>date('Y-m-d H:i:s'),\n't3'=>$verify_invoice->amt,\n't4'=>$verify_invoice->paymentdescription,\n't5'=>$rrr,\n't6'=>$verify_invoice->paymentid,\n't7'=>$payerID);\n//print_r($param);\n//exit;\n\n$response =$soapclient->dodo($param);\n\necho '<br>';\n$array = json_decode(json_encode($response), true);\n//$response = json_decode($jsonData, true);\n\n\n\n\n\tforeach($array as $item) {\n\t\t\necho $item;\n$result =json_decode($item, true);\necho '<br/>';\n\t\n\t\n}\t$pid=$verify_invoice->paymentid;\n\tsqlsrv_query($conn,\"update eduportal_fees_payment_log set posted_citm='1' where regno='$payerID' and payment_fee_type='$pid'\") or die( print_r( sqlsrv_errors(), true));\n\t\n\t//print_r($items);\n}catch(Exception $e){\n\techo $e->getMessage();\n\t\n\tsqlsrv_query($conn,\"update eduportal_fees_payment_log set posted_citm='1' where regno='$payerID' and payment_fee_type='$pid'\") or die( print_r( sqlsrv_errors(), true));\n\t\n}\n\t\t}\n\t\t}\n\t\t\t\t\t$_SESSION['payeeID']= $rrr;\n\t\t\t\t\tredirect(base_url() . 'index.php?register/remita_payment_receipt');\n\t\t\t\t\n}\n\t\t\t\t\n\t\t\t\n\t}\n\telse{\n\t\t\t$_SESSION['err_msg'] = 'Invalid Remita RRR';\n\t\t\t\t\n\n\t\t\tredirect(base_url() . 'index.php?register/remitaGetReceipt');\n\t\t}\n\t$_SESSION['err_msg'] = 'Error: Network problem. Please try again at a later time.';\n\t$this->session->set_userdata('error', 'Error: Network problem. Please again at a later time.');\nredirect(base_url() . 'index.php?student/remitaGetReceipt');\t\n\n}\t\t\t\n\t\n}\n\n\t}", "function genrate_inspectorvehicleloghistory_pdf($columnsValues,$data,$vehicletype,$allconstants,$profile,$toDate=null,$fromDate=null,$vehiclelicno=null) {\n \n\t\t$columnwidtharrays = array(15,17,16,20,15,15,15,15,27,16,18);\n\t\t\n\t\t$heightdynamic = 8;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vehicletype) && !empty($vehicletype)) ){\n\n\t\t\t$x= $this->GetX();\n\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t$this->SetX($x+125);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($vehicletype) && !empty($vehicletype))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Type :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vehicletype) && !empty($vehicletype))\n\t\t\t$this->MultiCell(39, 8, $allconstants[$vehicletype],0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Register No. : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(164, 8, $vehiclelicno,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(164, 8, '',0,'','L',true);\n\t\t\t$this->Ln(2);\n\n\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n\n\t\t$c = 0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t \n\n\t\t if( $c == 0 || $c ==3 || $c ==6 || $c ==7|| $c ==9|| $c ==8){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 12, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 12, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 6, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\t\t\n\t\t\n\t\t$this->SetFont('Arial', '', 5);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\tforeach ($data as $val) {\n\t\t\n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $dt_log_date = \t\t\tdate('d M Y', strtotime($val['VehicleLogDetail']['dt_log_date']));\n\t\t $vc_vehicle_reg_no=\t\t$val['VehicleLogDetail']['vc_vehicle_reg_no'];\n\t\t $vc_vehicle_lic_no=\t\t$val['VehicleLogDetail']['vc_vehicle_lic_no'];\n\t\t $vc_driver_name= \t\t$val['VehicleLogDetail']['vc_driver_name'];\n\t\t $nu_start_ometer=\t\tnumber_format($val['VehicleLogDetail']['nu_start_ometer']);\n\t\t\t$nu_end_ometer = \t\tnumber_format($val['VehicleLogDetail']['nu_end_ometer']);\n\t\t\t\n\t\t\tif($val['VehicleLogDetail']['ch_road_type']==1){\n\t\t\t\t\n\t\t\t\t$origin = $val['VehicleLogDetail']['vc_other_road_orign_name'];\n\t\t\t\t$destination = $val['VehicleLogDetail']['vc_other_road_destination_name'];\n\t\t\t\t$nu_km_traveled = number_format($val['VehicleLogDetail']['nu_other_road_km_traveled']);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\n\t\t\t\t$origin = $val['VehicleLogDetail']['vc_orign_name'];\n\t\t\t\t$destination = $val['VehicleLogDetail']['vc_destination_name'];\n\t\t\t\t$nu_km_traveled = number_format($val['VehicleLogDetail']['nu_km_traveled']);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($val['VehicleLogDetail']['ch_road_type']==1)\n\t\t\t\t$ch_road_type = 'Other Road';\n\t\t\telse\n\t\t\t\t$ch_road_type = 'Namibian Road';\n\t\t\t\t\t\t\t\n\t\t // $vc_orign_name = \t\t$val['VehicleLogDetail']['vc_orign_name'];\n\t\t // $vc_destination_name = \t$val['VehicleLogDetail']['vc_destination_name'];\n\t\t // $nu_km_traveled = \t\tnumber_format($val['VehicleLogDetail']['nu_km_traveled']);\n\t\t // $nu_other_road_km_traveled = number_format($val['VehicleLogDetail']['nu_other_road_km_traveled']);\n\t\t $dt_created_date =\t\tdate('d M Y', strtotime($val['VehicleLogDetail']['dt_created_date']));\n\n\t\t\t$font_size = 6;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_log_date, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_reg_no, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_lic_no, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_driver_name, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $nu_start_ometer, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $nu_end_ometer, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t$col[] = array('text' => $ch_road_type, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $origin, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $destination, 'width' =>$columnwidtharrays[8], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue = 'R';\n\t\t\t\n\t\t\t$col[] = array('text' => $nu_km_traveled, 'width' =>$columnwidtharrays[9], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\n\t\t\t\n\t\t\t$alignvalue = 'L';\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_created_date, 'width' =>$columnwidtharrays[10], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t}\n\t}", "public function select_subject(){\n $this->block_for_test();\n if($this->session->has_userdata('APPLICATION_ID')) {\n $APPLICATION_ID = $this->session->userdata('APPLICATION_ID');\n\n $user = $this->session->userdata($this->SessionName);\n $user = $this->User_model->getUserById($user['USER_ID']);\n\n $data['user'] = $user;\n $data['APPLICATION_ID'] = $APPLICATION_ID;\n\n $application = $this->Application_model->getApplicationByUserAndApplicationId($user['USER_ID'], $APPLICATION_ID);\n if($application['STATUS_ID']==FINAL_SUBMIT_STATUS_ID){\n redirect(base_url('form/application_form'));\n exit();\n }\n if($application['STATUS_ID']>FINAL_SUBMIT_STATUS_ID){\n redirect(base_url('form/dashboard'));\n }\n if ($application) {\n \n //form close from bachelor\n $this->close_registration_for_bachelor($application);\n \n \n $form_data = $this->User_model->getUserFullDetailById($user['USER_ID'],$APPLICATION_ID);\n\n $degree_list = array(\n 'BACHELOR'=>array('PROGRAM_TYPE_ID'=>1,'DEGREE_ID'=>3),\n 'MASTER'=>array('PROGRAM_TYPE_ID'=>2,'DEGREE_ID'=>array(4,5,6))\n );\n\n //$form_data = json_decode($application['FORM_DATA'],true);\n $bool = false;\n $valid_qualification = null;\n if($application['PROGRAM_TYPE_ID']==$degree_list['BACHELOR']['PROGRAM_TYPE_ID']){\n // echo \"bach\";\n foreach ($form_data['qualifications'] as $qualification){\n if($qualification['DEGREE_ID'] ==$degree_list['BACHELOR']['DEGREE_ID']){\n $bool = true;\n $valid_qualification = $qualification;\n break;\n }\n }\n\n\n }\n else if($application['PROGRAM_TYPE_ID']==$degree_list['MASTER']['PROGRAM_TYPE_ID']){\n //echo \"master\";\n //4\n // prePrint($form_data['qualifications']);\n\n\n// prePrint($degree_list['MASTER']['DEGREE_ID']);\n \n// prePrint($form_data['qualifications']);\n// exit();\n foreach ($form_data['qualifications'] as $k=>$qualification){\n $check = false;\n \n \n foreach($degree_list['MASTER']['DEGREE_ID'] as $degree_id){\n if($degree_id==$qualification['DEGREE_ID']){\n $check = true;\n break;\n }\n }\n if($check){\n $bool = true;\n if($k==0){\n $valid_qualification = $qualification;\n }\n \n if($qualification['DEGREE_ID']>$valid_qualification['DEGREE_ID']){\n $valid_qualification = $qualification;\n }\n\n //break;\n }\n // prePrint(\"K\".$k);\n // prePrint($qualification);\n // prePrint(\"CEHL\".$check);\n // prePrint($valid_qualification);\n }\n }\n\n// exit();\n $form_fees = $this->Admission_session_model->getFormFeesBySessionAndCampusId($application['SESSION_ID'], $application['CAMPUS_ID']);\n\n if ($form_fees) {\n// $valid_upto = getDateCustomeView($application['ADMISSION_END_DATE'], 'd-m-Y');\n//\n// if ($application['ADMISSION_END_DATE'] < date('Y-m-d')) {\n// exit(\"Sorry your challan is expired..\");\n// }\n\n\n\n $data['profile_url'] = $this->profile;\n// $data['is_valid_qualification'] = $bool;\n// $data['form_data'] = $form_data;\n //$data['application'] = $application;\n if($bool&&$valid_qualification!=null){\n\n $result = $this->Application_model->getMinorMappingByDisciplineId($valid_qualification['DISCIPLINE_ID']);\n \n if($result!=null && count($result)==1){\n //prePrint($result);\n $result =$result[0];\n \n $is_exist = $this->Application_model->getApplicantsMinorsByApplicationIdAndMinorMappingId($APPLICATION_ID,$result['MINOR_MAPPING_ID']);\n if(count($is_exist)==0) {\n $applicants_minnor = array(\n \"APPLICATION_ID\" => $APPLICATION_ID,\n \"DISCIPLINE_ID\" => $result['DISCIPLINE_ID'],\n \"MINOR_MAPPING_ID\" => $result['MINOR_MAPPING_ID'],\n \"USER_ID\" => $user['USER_ID'],\n \"ACTIVE\" => 1\n );\n $is_add = $this->Application_model->addApplicantsMinors($applicants_minnor);\n if ($is_add) {\n echo \"Minor Automatic Added\";\n $error = \"<div class='text-danger'>Minor Automatic Added</div>\";\n $alert = array('MSG'=>$error,'TYPE'=>'ALERT');\n //$this->session->set_flashdata('ALERT_MSG',$alert);\n redirect(base_url('form/select_category'));\n\n } else{\n echo \"ByDefault Minor Not added\";\n $error = \"<div class='text-danger'> ByDefault Minor Not added</div>\";\n $alert = array('MSG'=>$error,'TYPE'=>'ALERT');\n $this->session->set_flashdata('ALERT_MSG',$alert);\n redirect(base_url('form/select_category'));\n\n }\n\n }else{\n\n// $error = \"<div class='text-danger'> Already selected minors</div>\";\n// $alert = array('MSG'=>$error,'TYPE'=>'ALERT');\n// $this->session->set_flashdata('ALERT_MSG',$alert);\n redirect(base_url('form/select_category'));\n\n }\n\n }\n else if($result!=null && count($result)>1){\n $data['minors'] = $result;\n $data['DISCIPLINE_ID'] = $valid_qualification['DISCIPLINE_ID'];\n /***********DANGER**************\n WE NEED TO UPDATE APPLICATION ID INSTEAD OF USER ID IN \n $data['applicantsMinors'] = $this->Application_model->getApplicantsMinorsByUserIdAndDisciplineID($user['USER_ID'],$valid_qualification['DISCIPLINE_ID']);\n ***********DANGER**************/\n /***********UPDATED**************/\n $data['applicantsMinors'] = $this->Application_model->getApplicantsMinorsByApplicationIdAndDisciplineID($APPLICATION_ID,$valid_qualification['DISCIPLINE_ID']);\n $data['PROGRAM_TYPE_ID'] =$application['PROGRAM_TYPE_ID'];\n // $data['roll_no'] = $user['USER_ID'];\n $this->load->view('include/header', $data);\n $this->load->view('include/preloder');\n $this->load->view('include/side_bar', $data);\n $this->load->view('include/nav', $data);\n $this->load->view('select_minor_subject', $data);\n $this->load->view('include/footer_area', $data);\n $this->load->view('include/footer', $data);\n }else{\n echo \"minors not found\";\n }\n }\n else{\n\n $error = \"<div class='text-danger'>Please must add appropriate degree</div>\";\n $alert = array('MSG'=>$error,'TYPE'=>'ALERT');\n $this->session->set_flashdata('ALERT_MSG',$alert);\n redirect(base_url('candidate/add_inter_qualification'));\n }\n // prePrint($application);\n\n\n\n } else {\n echo \"fees not found\";\n redirect(base_url('form/dashboard'));\n }\n\n } else {\n echo \"this application id is not associate with you\";\n redirect(base_url('form/dashboard'));\n }\n }else{\n echo \"Application Id Not Found\";\n redirect(base_url('form/dashboard'));\n }\n }", "function admin_export_patients($id=NULL) // template for new classes\r\n {\r\n $data['offline_mode']\t\t=\t$this->config->item('offline_mode');\r\n $data['debug_mode']\t\t =\t$this->config->item('debug_mode');\r\n\t\t$data['user_rights'] = $this->mthirra->get_user_rights($_SESSION['username']);\r\n $data['home_clinic'] = $_SESSION['location_id'];\r\n\t\t$data['title'] = \"Export Patients\";\r\n\t\t$data['form_purpose'] = \t\"new_export\";\r\n $data['now_id'] = time();\r\n\t\t$data['unsynched_list'] = $this->madmin_rdb->get_unsynched_patients($data['home_clinic']);\r\n\t\t$data['synched_list'] = $this->madmin_rdb->get_unsynched_patients($data['home_clinic'],TRUE);\r\n\t\t$this->load->vars($data);\r\n\t\tif ($_SESSION['thirra_mode'] == \"ehr_mobile\"){\r\n $new_header = \"ehr/header_xhtml-mobile10\";\r\n $new_banner = \"ehr/banner_emr_wap\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_wap\";\r\n $new_body = \"ehr/emr_newpage_wap\";\r\n $new_footer = \"ehr/footer_emr_wap\";\r\n\t\t} else {\r\n //$new_header = \"ehr/header_xhtml1-strict\";\r\n $new_header = \"ehr/header_xhtml1-transitional\";\r\n $new_banner = \"ehr/banner_ehr_html\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_html\";\r\n $new_body = \"ehr/ehr_admin_export_patients_html\";\r\n $new_footer = \"ehr/footer_emr_html\";\r\n\t\t}\r\n if($data['user_rights']['section_admin'] < 100){\r\n $new_body = \"ehr/ehr_access_denied_html\";\r\n }\r\n\t\t$this->load->view($new_header);\t\t\t\r\n\t\t$this->load->view($new_banner);\t\t\t\r\n\t\t$this->load->view($new_sidebar);\t\t\t\r\n\t\t$this->load->view($new_body);\t\t\t\r\n\t\t$this->load->view($new_footer);\t\t\t\r\n }", "public function print_ack() {\n $userid = $this->input->post('userId');\n $data = $this->get_pdf_data($userid);\n //modified on 27/11/2014\n $data['meta_data'] = $this->meta_data;\n return generate_acknowledgment($data);\n }", "public function reporteFinalMantenimientosController(){\n\n\t\t\t$respuesta = GestorMantenimientosModel::reporteFinalMantenimientosModel();\n\n\t\t\tforeach ($respuesta as $row => $item) {\n\t\t\t\t\n\t\t\t\techo '\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>' . $item[\"cedula_cliente\"] . '</td>\n\t\t\t\t\t\t<td>' . $item[\"nombre_cliente\"] . \" \" . $item[\"apellido_cliente\"] . '</td>\n\t\t\t\t\t\t<td>' . $item[\"placas_vehiculo\"] . '</td>\n\t\t\t\t\t\t<td>' . $item[\"marca_vehiculo\"] . ' '. $item[\"modelo_vehiculo\"] . '</td>\n\t\t\t\t\t\t<td>' . $item[\"kilometraje_vehiculo\"] . '</td>\n\t\t\t\t\t\t<td>' . $item[\"nombre_categoria\"] . '</td>\n\t\t\t\t\t\t<td>' . $item[\"descripcion_mantenimiento\"] . '</td>\n\t\t\t\t\t\t<td>' . $item[\"fecha_ingreso\"] . '</td>\n\t\t\t\t\t</tr>\n\t\t\t\t';\n\t\t\t}\n\n\t\t}", "function genrate_inspectorvehiclehistorypdf($columnsValues,$data,$allconstants,$profile,$toDate=null,$fromDate=null,$vc_customer_name,$vehiclelicno=null) {\n\t \n\t\t$columnwidtharrays = array(10,30,26,26,23,18,20,20,16);\n\t\t\n\t\t$heightdynamic =8;\n \n\t\t$this->AddPage();\n\t\t\n\t\tif($this->PageNo()==1){\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\tif((isset($fromDate) && !empty($fromDate)) || (isset($toDate) && !empty($toDate)) || \n\t\t(isset($vc_customer_name) && !empty($vc_customer_name)) ){\n\n\t\t\t$x= $this->GetX();\t\t\t\n\t\t\t$y= $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(25, 8, 'From Date : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($fromDate) && !empty($fromDate))\n\t\t\t$this->MultiCell(50, 8, date('d M Y', strtotime($fromDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(50, 8, '',0,'','L',true);\n\n\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+75);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, 'To Date :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+100);\t\n\t\t\t\n\t\t\tif(isset($toDate) && !empty($toDate))\n\t\t\t$this->MultiCell(25, 8, date('d M Y', strtotime($toDate)),0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+125);\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(25, 8, 'Customer Name :',0,'','R',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','R',true);\n\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+150);\t\n\t\t\t\n\t\t\tif(isset($vc_customer_name) && !empty($vc_customer_name))\n\t\t\t$this->MultiCell(39, 8, $vc_customer_name,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(39, 8,'',0,'','L',true);\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t\t$x = $this->GetX();\t\t\t\n\t\t\t$y = $this->GetY();\n\t\t\t\n\t\t\t$this->SetFont('Arial', 'B', 6);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(25, 8, 'Vehicle Register No. : ',0,'','L',true);\n\t\t\telse\n\t\t\t$this->MultiCell(25, 8, '',0,'','L',true);\n\t\t\t$this->SetFont('Arial','', 6);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n\t\t\t\n\t\t\t$this->SetX($x+25);\t\t\n\t\t\tif(isset($vehiclelicno) && !empty($vehiclelicno))\n\t\t\t$this->MultiCell(164, 8, $vehiclelicno,0,'','L',true);\t\n\t\t\telse\n\t\t\t$this->MultiCell(164 ,8, '',0,'','L',true);\t\t\t\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t\n\t\t}\n\t}\n\t\t\n\t$c=0;\n\t\t\n\t\t$this->SetFillColor(191,191,191);\n\t\t\n\t\t$length = count($columnsValues)-1;\n\t\t\n\t\t$this->SetFont('Arial', 'B', 6);\n\t\t\n foreach($columnsValues as $val) {\n\t\t\t\n\t\t\t$x= $this->GetX();\n\t\t \n\t\t\t$y= $this->GetY();\n\n\t\t if( $c == 0){\n\t\t\t\n\t\t\t$this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t\n\t\t\t$this->SetY($y); //Reset the write point\n \n\t\t\t$this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t\t\n\t\t\t}\n\t\t else\n\t\t {\n \t\t if($c==$length)\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t else\n\t\t\t \n\t\t\t $this->MultiCell($columnwidtharrays[$c], 8, $val , 1,'C',true);\n\t\t\t \n\t\t\t $this->SetY($y); //Reset the write point\n \n\t\t\t $this->SetX($x +$columnwidtharrays[$c]); //Move X to $x + width of last cell\n\t\t }\n\t\t \n\t\t\t$c++;\n\t\t\n\t\t}\n\t\t\n\t\t$this->SetFont('Arial', '', 5);\n\t\t\n\t\t$i=0;\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\tforeach ($data as $val) {\n\t\t\n\t\t\t$x = $this->GetX();\n\t\t $y = $this->GetY();\n\t\t\t$alignvalue = 'L';\n\t\t\t$columns = array();\n\t\t\t$col = array();\n\n\t\t $vc_customer_name =\t\tucfirst($val['CustomerProfile']['vc_customer_name']);\n\t\t $vc_vehicle_lic_no =\t\t$val['VehicleDetail']['vc_vehicle_lic_no'];\n\t\t $vc_vehicle_reg_no =\t\t$val['VehicleDetail']['vc_vehicle_reg_no'];\n\t\t $dt_created_date =\t\tdate('d M Y', strtotime($val['VehicleDetail']['dt_created_date']));\n\t\t $vc_prtype_name =\t\t$val['VEHICLETYPE']['vc_prtype_name'];\n\t\t $vc_v_rating =\t\tnumber_format($val['VehicleDetail']['vc_v_rating']);\n\t\t $vc_dt_rating =\t\tnumber_format($val['VehicleDetail']['vc_dt_rating']);\n\t\t $vc_rate =\t\tnumber_format($val['VehicleDetail']['vc_rate'],2,'.',',');\n\t\t\t\n\t\t\t$font_size=7;\n\t\t\t\n\t\t\t$fillcolor= '255,250,250';\n\t\t\t\n\t\t\t$alignvalue='C';\n\t\t\t\n\t\t\t$col[] = array('text' => $i+1, 'width' => $columnwidtharrays[0], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' =>$fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_customer_name, 'width' =>$columnwidtharrays[1], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_lic_no, 'width' =>$columnwidtharrays[2], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_vehicle_reg_no, 'width' =>$columnwidtharrays[3], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$col[] = array('text' => $dt_created_date, 'width' =>$columnwidtharrays[4], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', 'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$col[] = array('text' => $vc_prtype_name, 'width' =>$columnwidtharrays[5], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\n\t\t\t$alignvalue='R';\n\t\t\t\n\t\t\t$col[] = array('text' => $vc_v_rating, 'width' =>$columnwidtharrays[6], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$col[] = array('text' => $vc_dt_rating, 'width' =>$columnwidtharrays[7], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\n\t\t\t$col[] = array('text' =>$vc_rate, 'width' =>$columnwidtharrays[8], 'height' => $heightdynamic, 'align' => $alignvalue, 'font_name' => 'Arial', 'font_size' => $font_size, 'font_style' => '', 'fillcolor' => $fillcolor, 'textcolor' => '0,0,0', 'drawcolor' => '0,0,0', \n\t\t\t'linewidth' => '0', 'linearea' => 'LTBR');\n\t\t\t\n\t\t\t$columns[]=$col;\n\t\t\t\n\t\t\t$this->WriteTable($columns); \n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t$alignvalue='L';\n\t\t\t\n\t\t}\n\t}", "public function actionReport()\n\t{\n\t\t$model = new AutoChores();\n\t\t$results = array();\n\t\t$errors = array();\n\t\t$isPrint = 0;\n\t\t//exit;\n\t\tif(isset($_REQUEST['go'])){\n\t\t if(!isset($_REQUEST['go']))\n \t\t $isPrint = 1;\n\t\t\tif(empty($_REQUEST['from_date'])){\n\t\t\t\t$errors[\"from_date\"] = \"Invalid From Date\";\n\t\t\t}\n\t\t\tif(empty($_REQUEST['to_date'])){\n\t\t\t\t$errors[\"to_date\"] = \"Invalid To Date\";\n\t\t\t}\n\t\t\tif(empty($_REQUEST['farm'])){\n\t\t\t\t$errors[\"farm\"] = \"Invalid Farm & Herd\";\n\t\t\t}else {\n\t\t\t\t$qtxt =\"SELECT farm_herd FROM herd_setup WHERE farm_herd = '\".$_REQUEST['farm'].\"' \";\n\t\t\t\t$command =Yii::app()->db->createCommand($qtxt);\n\t\t\t\t$res =$command->queryColumn();\n\n\t\t\t\tif($_REQUEST['farm'] != 'A' && (!isset($res[0]) || $res[0] != $_REQUEST['farm']))\n\t\t\t\t\t$errors[\"farm\"] = \"Invalid Farm & Herd\";\n\t\t\t}\n\t\t\tif(count($errors) == 0) {\n\t\t\t\t$results1 = $this->dateRange($_REQUEST['from_date'], $_REQUEST['to_date'],'+1 day','m/d/Y');\n\t\t\t\tforeach ($results1 as $result) {\n\t\t\t\t\t$qtxt = \"SELECT * FROM chores WHERE date = '\".$result.\"' \";\n\t\t\t\t\tif($_REQUEST['farm'] != 'A')\n\t\t\t\t\t\t$qtxt .= \" AND farm_herd = '\".$_REQUEST['farm'].\"' \";\n\t\t\t\t\t$command =Yii::app()->db->createCommand($qtxt);\n\t\t\t\t\t$res =$command->queryAll();\n\t\t\t\t\t//$results[$result] = $res;\n\n\t\t\t\t\t//D\n\t\t\t\t\t$qtxt = \"SELECT * FROM auto_chores WHERE generated_by = 'D' AND disabled = 'N' \";\n\t\t\t\t\tif($_REQUEST['farm'] != 'A')\n\t\t\t\t\t\t$qtxt .= \" AND (farm_herd = '\".$_REQUEST['farm'].\"' OR generated_by = 'A') \";\n\n\t\t\t\t\t$qtxt1 = \" ADDDATE(date_asof, days_after) = '\".$result.\"' \";\n\t\t\t\t\t$qtxt2 = \" ADDDATE(date_asof, (days_after+(times_occur*days_between))) = '\".$result.\"' AND times_occur >= 2\";\n\t\t\t\t\t$qtxt .= \" AND ((\".$qtxt1.\") OR (\".$qtxt2.\")) \";\n\n\n\t\t\t\t\t$command =Yii::app()->db->createCommand($qtxt);\n\t\t\t\t\t$res1 =$command->queryAll();\n\t\t\t\t\t$results[$result] = array_merge($res,$res1);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$model->addErrors($errors);\n\t\t\t}\n\t\t}\n\n\n\t\t$this->render('report',array(\n\t\t\t\t'model'=>$model,\n\t\t\t\t'results'=>$results,\n\t\t 'isPrint'=>$isPrint,\n\n\t\t));\n\t}", "function runReport (){\n\t\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($this->params['form']=='allData'){\n\t\t\t\tindex();\n\t\t\t}else {\n\t\t\t\tindex();\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t}", "function runReport (){\n\t\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($this->params['form']=='allData'){\n\t\t\t\tindex();\n\t\t\t}else {\n\t\t\t\tindex();\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t}", "public function report_sales_pdf() {\n $tenant_id = $this->tenant_id;\n foreach ($this->reportsModel->get_sales_executive($tenant_id)->result() as $item) {\n $executive[$item->user_id] = $item->user_name;\n }\n\n $sales_exec = $this->input->get('sales_exec');\n $non_sales_exec = $this->input->get('non_sales_exec');\n if (!empty($sales_exec)) {\n $sales_exec = $sales_exec;\n } else if (!empty($non_sales_exec)) {\n $sales_exec = $non_sales_exec;\n }\n\n\n\n $sales_comm_result = $this->reportsModel->get_sales_comm('pdf', $tenant_id, $records_per_page, $offset, $field, $order_by, $sales_exec);\n $comm_due_periods = $this->reportsModel->get_comm_due_period($tenant_id, $sales_exec);\n $year_arr = array(1 => 'Jan', 2 => 'Feb', 3 => 'Mar', 4 => 'Apr',\n 5 => 'May', 6 =>\n 'Jun', 7 => 'Jul', 8 => 'Aug', 9 => 'Sep',\n 10 => 'Oct', 11 => 'Nov', 12 => 'Dec');\n $periods = array();\n foreach ($comm_due_periods as $val) {\n $periods[$val->sales_exec_id] .= $year_arr[$val->comm_period_mth] . ' ' . $val->comm_period_yr . \", \";\n }\n $tenant_details = $this->classTraineeModel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n $this->load->helper('pdf_reports_helper');\n return sales_reports_pdf($sales_comm_result, $periods, $tenant_details, $executive);\n }", "function sendExport() {\n\tglobal $orgcode;\n\tglobal $filename;\n\tglobal $firstdate;\n\tglobal $lastdate;\n\t$headers = [\n\t\t\"ORGCODE\",\t//0\n\t\t\"PARTICIP\",\n\t\t\"ENROLL\",\n\t\t\"PAYER\",\n\t\t\"STATE\",\n\t\t\"GLUCTEST\",\t//5\n\t\t\"GDM\",\n\t\t\"RISKTEST\",\n\t\t\"AGE\",\n\t\t\"ETHNIC\",\n\t\t\"AIAN\",\t\t//10\n\t\t\"ASIAN\",\n\t\t\"BLACK\",\n\t\t\"NHOPI\",\n\t\t\"WHITE\",\n\t\t\"SEX\",\t\t//15\n\t\t\"HEIGHT\",\n\t\t\"EDU\",\n\t\t\"DMODE\",\n\t\t\"SESSID\",\n\t\t\"SESSTYPE\",\t//20\n\t\t\"DATE\",\n\t\t\"WEIGHT\",\n\t\t\"PA\"\n\t];\n\t\n\t$data = [$headers];\n\t$noncompliant = [$headers];\n\t$today = new DateTime(\"NOW\");\n\t\n\t// get all participant data\n\t$records = \\REDCap::getData(PROJECT_ID);\n\t$project = new \\Project(PROJECT_ID);\n\t\n\t// get year value for when these records were created or first logged update\n\t$recordCreationDates = [];\n\t$sql = \"SELECT pk, ts FROM redcap_log_event WHERE project_id=\" . PROJECT_ID . \" and pk in (\" . implode(array_keys($records), \", \") . \") and (description=\\\"Create record\\\" OR description=\\\"Update record\\\") ORDER BY pk ASC, ts ASC\";\n\t$query = db_query($sql);\n\twhile ($row = db_fetch_assoc($query)) {\n\t\tif (!isset($recordCreationDates[$row['pk']])) {\n\t\t\t$recordCreationDates[$row['pk']] = substr($row['ts'], 2, 2);\n\t\t}\n\t}\n\t\n\t// regex for getting labels for project fields (like state, sess_type, etc)\n\t$labelPattern = \"/(\\d+),?\\s?(.+?)(?=\\x{005c}\\x{006E}|$)/\";\n\t\n\tforeach ($records as $rid => $record) {\n\t\t$eid = array_keys($record)[0];\n\t\t\n\t\t// skip if orgcode set and not match\n\t\tif (isset($orgcode) and $orgcode != $record[$eid]['orgcode']) {\n\t\t\tcontinue;\n\t\t}\n\t\t\n\t\t// skip if have diabietes\n\t\tif ($record[$eid]['have_diabetes'] == 1 or $record[$eid]['enter_roster'] == 0) continue;\n\t\t\n\t\t$line = array_fill(0, 23, null);\n\t\t$line[0] = $record[$eid]['orgcode'];\n\t\t\n\t\t// determine participant ID\n\t\t$participantID = $recordCreationDates[$rid];\n\t\tpreg_match_all($labelPattern, $project->metadata['participant_id_group']['element_enum'], $matches);\n\t\t$participantID .= trim($matches[2][$record[$eid]['participant_id_group'] - 1]);\n\t\t$participantID .= $record[$eid]['participant_id_group'];\n\t\tpreg_match_all(\"/\\d+/\", $record[$eid]['participant_employee_id'], $matches);\n\t\t$participantID .= $matches[0][0];\n\t\t\n\t\t$line[1] = $participantID;\n\t\t$line[2] = $record[$eid]['program_referral'] === null ? 10 : $record[$eid]['program_referral'];\n\t\t$line[3] = $record[$eid]['payer'] === null ? 9 : $record[$eid]['payer'];\n\t\tpreg_match_all($labelPattern, $project->metadata['state']['element_enum'], $matches);\n\t\tpreg_match(\"/- ([A-Z]{2})(?:\\s|$)/\", $matches[2][$record[$eid]['state'] - 1], $matches);\n\t\t$line[4] = $matches[1];\n\t\t$line[5] = $record[$eid]['gluctest'] == 1 ? 1 : 2;\n\t\t$line[6] = $record[$eid]['gdm'] == 1 ? 1 : 2;\n\t\t$line[7] = $record[$eid]['risktest'] == 1 ? 1 : 2;\n\t\t$dob = new DateTime($record[$eid]['dob']);\n\t\t$line[8] = $dob->diff($today)->format('%y');\n\t\t$line[9] = $record[$eid]['ethnicity'] == null ? 9 : $record[$eid]['ethnicity'];\n\t\t$line[10] = $record[$eid]['race'][1] == 1 ? 1 : 2;\n\t\t$line[11] = $record[$eid]['race'][2] == 1 ? 1 : 2;\n\t\t$line[12] = $record[$eid]['race'][3] == 1 ? 1 : 2;\n\t\t$line[13] = $record[$eid]['race'][4] == 1 ? 1 : 2;\n\t\t$line[14] = $record[$eid]['race'][5] == 1 ? 1 : 2;\n\t\t$line[15] = $record[$eid]['sex'] == null ? 9 : $record[$eid]['sex'];\n\t\tpreg_match_all($labelPattern, $project->metadata['height']['element_enum'], $matches);\n\t\tpreg_match_all(\"/[0-9]{1,2}/\", $matches[2][$record[$eid]['height'] - 1], $matches);\n\t\t$line[16] = @((int) $matches[0][0] * 12 + (int) $matches[0][1]);\n\t\t$line[17] = $record[$eid]['education'] == null ? 9 : $record[$eid]['education'];\n\t\t\n\t\t$instanceSum = 0;\n\t\tforeach ($record['repeat_instances'][$eid]['sessionscoaching_log'] as $i => $instance) {\n\t\t\t// only add data that's within last 6 months!\n\t\t\t$sess_date = $instance[\"sess_actual_date\"];\n\t\t\tif (empty($sess_date)) {\n\t\t\t\t$sess_date = $instance[\"sess_scheduled_date\"];\n\t\t\t}\n\t\t\t\n\t\t\t$thisdate = strtotime($sess_date);\n\t\t\tif (empty($sess_date) or (!empty($firstdate) and $firstdate > $thisdate) or (!empty($lastdate) and $lastdate < $thisdate)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$instanceSum++;\n\t\t\t$line_copy = $line;\n\t\t\t$line_copy[18] = $instance['sess_mode'];\n\t\t\t$line_copy[19] = $instance['sess_id'];\n\t\t\tif ($instance[\"sess_month\"] >= 7) {\n\t\t\t\t$line_copy[19] = 99;\n\t\t\t\t$line_copy[20] = \"CM\";\n\t\t\t}\n\t\t\tif ($instance[\"sess_month\"] >= 7)\n\t\t\t\t$line_copy[20] = \"OM\";\n\t\t\tpreg_match_all($labelPattern, $project->metadata['sess_type']['element_enum'], $matches);\n\t\t\tpreg_match_all(\"/\\(([A-Z]|[A-Z][A-Z])\\)/\", $matches[2][$instance['sess_type'] - 1], $matches);\n\t\t\t$line_copy[20] = $matches[1][0];\n\t\t\t$line_copy[21] = $sess_date == null ? null : date(\"m/d/Y\", strtotime($sess_date));\n\t\t\t$line_copy[22] = $instance['sess_weight'];\n\t\t\t$line_copy[23] = $instance['sess_pa'];\n\t\t\t\n\t\t\t$session_attended = false;\n\t\t\tif ($instance[\"sess_attended\"] or $instance['sess_weight'] or $instance['sess_pa'])\n\t\t\t\t$session_attended = true;\n\t\t\t\n\t\t\tvalidateLine($line_copy, $session_attended);\n\t\t\t\n\t\t\t// if session is marked as attended but weight and/or pa values not included, use 999\n\t\t\tif ($instance[\"sess_attended\"] and empty($line_copy[22]))\n\t\t\t\t$line_copy[22] = 999;\n\t\t\tif ($instance[\"sess_attended\"] and empty($line_copy[23]))\n\t\t\t\t$line_copy[23] = 999;\n\t\t\t\n\t\t\t// if error messages were appended...\n\t\t\tif (isset($line_copy[24]) and isset($_GET['noncompliant'])) {\n\t\t\t\t$noncompliant[] = $line_copy;\n\t\t\t}\n\t\t\t\n\t\t\t// no errors and no non-compliant param\n\t\t\tif (!isset($line_copy[24]) and !isset($_GET['noncompliant'])) {\n\t\t\t\t$data[] = $line_copy;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// send participant records with no session data to noncompliant set\n\t\tif ($instanceSum == 0)\n\t\t\t$noncompliant[] = $line;\n\t}\n\t\n\theader('Content-Type: text/csv');\n\theader(\"Content-Disposition: attachment; filename=\\\"$filename\\\"\");\n\t$fp = fopen('php://output', 'wb');\n\t\n\t// non-compliance report\n\tif (isset($_GET['noncompliant'])) {\n\t\t$data = $noncompliant;\n\t}\n\t\n\tforeach ($data as $line) {\n\t\tfputcsv($fp, $line, ',');\n\t}\n\tfclose($fp);\n}", "public function invoice_audit_trail_export_PDF() {\n //Read page parameter to display report\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n $invoice_id = $this->input->get('invoice_id');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $company_id = $this->input->get('company_id');\n\n $tenant_details = $this->classTraineeModel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $query = $this->reportsModel->get_invoice_audit_trail($tenant_id, NULL, NULL, $field, $order_by, $payment_status, $start_date, $end_date, $invoice_id, $company_id);\n $this->load->helper('pdf_reports_helper');\n return invoice_audit_trail_report_PDF($query, $tenant_details);\n }", "public function generate_invoice() {\n $clsid = $this->input->post('cls');\n $crsid = $this->input->post('crs');\n $userid = $this->input->post('usr');\n $invoice_id = $this->input->post('invoice');\n $status = $this->input->post('status');\n $this->load->helper('common_helper');\n \n $paid_details = $this->payments_model->get_invoice_paid_details($invoice_id);\n $paid_arr = array();\n $paid_rcd_till_date = 0;\n foreach ($paid_details as $row) \n {\n $paid_rcd_till_date = $row->amount_recd + $paid_rcd_till_date;\n }\n $total_paid = $paid_rcd_till_date;\n $refund_details = $this->payments_model->get_refund_paid_details($invoice_id);\n $refund_amount = 0;\n foreach ($refund_details as $k => $row) \n {\n $refund_amount = $refund_amount + $row->amount_refund;\n }\n $paid_paid_till_date = $paid_rcd_till_date - $refund_amount;\n \n \n $ack_data = $this->payments_model->get_acknowledgement_data($clsid, $crsid, $userid);\n $invoice = $this->payments_model->get_invoice_details($clsid, $crsid, $userid);\n $user_org = $this->payments_model->get_user_org_details($userid);\n $invoice_amount=$invoice['total_inv_amount'];\n $invoice_amount_temp=$invoice['total_inv_amount'];\n if($status==\"PAID\"){\n \n $sfc_amount= $this->payments_model->get_sfc_details($invoice_id);\n $invoice_amount=$sfc_amount['amount_recd'];\n $invoice_amount1=$sfc_amount['amount_recd'];\n $invoice_amount=$invoice['total_inv_amount']-$sfc_amount['sfc_claimed'];\n if($sfc_amount['sfc_claimed']>0){\n $mop=explode('_',$sfc_amount['mode_of_pymnt']);\n \n }\n \n }\n //$outstanding_amount=$invoice_amount_temp-$invoice_amount1;\n $outstanding_amount=$invoice_amount_temp-$paid_paid_till_date;\n $tanant = $this->payments_model->get_tanant();\n $date = date('M d Y', strtotime($invoice['inv_date']));\n $logourl = base_url() . 'logos/' . $this->session->userdata(public_tenant_details)->Logo;\n $startdate = date('M d Y, l', strtotime($ack_data[class_start_datetime])) . ' @ ' . date(''\n . 'h:i A', strtotime($ack_data[class_start_datetime]));\n $after_discount = $invoice['class_fees'] - $invoice['total_inv_discnt'];\n $after_gst = $after_discount + $invoice['total_gst'];\n $Url = base_url() . 'payments/print_invoice';\n $gender = ($ack_data['gender'] == 'MALE') ? 'Mr. ' : 'Ms. ';\n //added by sankar\n $gst_label = 'GST Not Applicable';\n $gst_prelabel = 'GST OFF';\n if (!empty($invoice['gst_rule'])) {\n $gst_label = 'GST ON, ' . $this->meta_data[$invoice['gst_rule']];\n $gst_prelabel = 'GST (' . number_format($invoice['gst_rate'], 2, '.', '') . '%)';\n }\n \n //code ends here\n\n echo ' <form action=\"' . $Url . '\" method=\"post\"><p><a class=\"close-modal \" rel=\"modal:close\" href=\"#close-modal\">Close</a>\n <h2 class=\"sub_panel_heading_style\">Invoice \n <!-- commended by sankar <span class=\"label label-default push_right\"><a href=\"#export\" rel=\"modal:open\" class=\"small_text1\">Print/ Export to PDF</a></span>-->\n </h2>\n <div class=\"col-lg-6\">\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n <tr>\n <td align=\"left\"><img src=\"' . $logourl . '\" border=\"0\" /></td>\n </tr>\n <tr>\n <td class=\"td_heading\" align=\"left\">' . $tanant[tenant_address] . ' </br>' .\n $tanant[tenant_city] . ' ' . get_catname_by_parm($tanant[tenant_state]) . ' ' . get_catname_by_parm($tanant[tenant_country]) . '</br>\n Tel:' . $tanant[tenant_contact_num] . ' <br>\n ' . $tanant[tenant_email_id] . ' </td>\n </tr>\n\n </table>\n\n </div>\n <div class=\"col-lg-6\">\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n <tr>\n <td colspan=\"2\"><font style=\"font-size:18px; font-weight:bold;\">' . $tanant['invoice_name'] . '</font></td>\n </tr>\n <tr>\n <td colspan=\"2\"><strong>' . $tanant['invoice_name'] . ' No. </strong> ' . date('Y') . '' . $invoice['invoice_id'] . '<br><strong>' . $tanant['invoice_name'] . ' Date</strong>: ' . $date . '<br><br></td>\n </tr>\n <tr>\n <td colspan=\"2\"><strong><u>Individual Details:</u></strong></td>\n </tr>\n \n <tr>\n <td class=\"td_heading\">Address:</td>\n <td>' . $user_org[personal_address_bldg] . '</br>\n ' . $user_org[personal_address_city] . ' '\n . $this->meta_data[$user_org[personal_address_state]] . ' '\n . $this->meta_data[$user_org[personal_address_country]] . '</td>\n </tr>\n <tr>\n <td class=\"td_heading\">Contact No:</td>\n <td>' . $user_org[contact_number] . '</td>\n </tr>\n <tr>\n <td class=\"td_heading\">Attention:</td>\n <td>' .$gender. $user_org[first_name] . ' ' . $user_org[last_name] . '</td>\n </tr>\n </table>\n\n </div>\n\n <div style=\"clear:both;\"></div>\n <br>\n <div class=\"table-responsive\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th class=\"th_header\">Description</th>\n <th class=\"th_header\">Unit Price</th>\n <th class=\"th_header\">Total</th>\n \n </tr>\n </thead>\n <tbody>\n <tr>\n <td>' . $ack_data['crse_name'] . ', ' . $invoice['class_name'] . '</td>\n <td>$' . number_format($invoice['class_fees'], 2, '.', '') . '</td>\n <td>$' . number_format($invoice['class_fees'], 2, '.', '') . '</td>\n \n </tr>\n \n <tr>\n <td>' . $this->meta_data[$invoice['discount_type']] . ' Discount @ ' . number_format($invoice['discount_rate'], 2, '.', '') . '%</td>\n <td>$' . number_format($invoice['total_inv_discnt'], 2, '.', '') . '</td>\n <td>$' . number_format($invoice['total_inv_discnt'], 2, '.', '') . '</td>\n \n </tr>\n\n <tr>\n <td colspan=\"2\" align=\"right\" class=\"td_heading\">After Discounts</td>\n <td>$' . number_format($after_discount, 2, '.', '') . '</td>\n </tr>\n\n <tr>\n <td colspan=\"2\" align=\"right\" class=\"td_heading\">' . $gst_prelabel . '</td>\n <td>$' . number_format($invoice['total_gst'], 2, '.', '') . '</td>\n \n </tr>\n\n <tr>\n <td colspan=\"2\" align=\"right\" class=\"td_heading\">' . $gst_label . '</td>\n <td>$' . number_format($after_gst, 2, '.', '') . '</td>\n \n </tr>\n <tr>\n <td>Subsidy :</td>\n <td>$' . number_format($invoice[total_inv_subsdy], 2, '.', '') . '</td>\n <td>$' . number_format($invoice[total_inv_subsdy], 2, '.', '') . '</td>\n \n </tr>\n <tr>\n <td>Skills Future Credit :</td>\n <td></td>\n <td>$' .number_format($sfc_amount['sfc_claimed'],2,'.','').'</td>\n </tr>\n \n <tr class=\"info\">\n <td colspan=\"2\" align=\"right\" class=\"td_heading\">Invoice Amount</td>\n <td>$' . number_format($invoice_amount, 2, '.', '') . '</td>\n \n </tr>\n </tbody>\n </table>\n </div>\n <br>\n <div class=\"table-responsive\">\n <div>\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th colspan=\"9\">Particulars of Participants</th>\n </tr>\n <tr>\n <th width=\"16%\" class=\"th_header\">Name</th>\n <th width=\"13%\" class=\"th_header\">Tax Code</th>\n <th width=\"9%\" class=\"th_header\">TG# </th>\n <th width=\"10%\" class=\"th_header\">Subsidy</th>\n <th width=\"12%\" class=\"th_header\">Discount</th>\n <th width=\"13%\" class=\"th_header\">GST Amount</th>\n <th width=\"13%\" class=\"th_header\">SFC('.$mop[1].') Amount</th>\n <th width=\"16%\" class=\"th_header\">Unit Fee(GST Applicable)</th>\n <th width=\"11%\" class=\"th_header\">Remarks </th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>' .$gender. $user_org[first_name] . ' ' . $user_org[last_name] . '</td>\n <td>' . $user_org[tax_code] . '</td>\n <td>' . $invoice[tg_number] . '</td>\n <td>$' . number_format($invoice[total_inv_subsdy], 2, '.', '') . '</td>\n <td>$' . number_format($invoice[total_inv_discnt], 2, '.', '') . '</td>\n <td>$' . number_format($invoice[total_gst], 2, '.', '') . '</td>\n <td>$' . number_format($sfc_amount['sfc_claimed'],2,'.','').'</td>\n <td>$' . number_format($invoice_amount, 2, '.', '') . '</td>\n <td>'. $invoice['payment_status'].'</td> \n <input type=\"hidden\" value=\"' . $clsid . '\" name=\"classId\"/>\n <input type=\"hidden\" value=\"' . $crsid . '\" name=\"courseId\"/> \n <input type=\"hidden\" value=\"' . $userid . '\" name=\"userId\"/>\n </tr>\n <tr>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n \n <td colspan=\"2\">OUT STANDING AMOUNT</td>\n <td>$' . number_format($outstanding_amount, 2, '.', '') . '</td>\n <td></td> \n \n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <div style=\"clear:both;\"></div>\n <br>\n <p class=\"red\">This is a computer generated invoice. No signature is required- ' . $tanant['tenant_name'] . ' Administrator.</p>\n <div style=\"color:red;\">' . html_entity_decode($tanant['invoice_footer_text']) . '</div>\n <div style=\"clear:both;\"></div><br>\n <span style=\"float:right;\">\n<!-- <button class=\"btn btn-primary\" type=\"submit\">Print</button></form><br><br>-->\n ';\n }", "public function Reporte(){\r\n\t\t$roles=new RolesModel();\r\n\t\t//Conseguimos todos los usuarios\r\n\t\t\r\n\t\r\n\t\r\n\t\tsession_start();\r\n\t\r\n\t\r\n\t\tif (isset( $_SESSION['usuario']) )\r\n\t\t{\r\n\t\t\t$resultRep = $roles->getByPDF(\"id_rol, nombre_rol\", \" nombre_rol != '' \");\r\n\t\t\t$this->report(\"Roles\",array(\t\"resultRep\"=>$resultRep));\r\n\t\r\n\t\t}\r\n\t\t\t\t\t\r\n\t\r\n\t}", "public function sendMarks($noOfStudent ){\n\t\t$datestring = '%Y/%m/%d';\n\t\t$date = mdate($datestring);\n\n\t\t//echo \"Total student\".$noOfStudent;\n\n\t\t$teacherid = $this->session->userdata('username');\n\t\t$subjectid = $this->input->post('subjectid');\n\t\t$fullmarks = $this->input->post('fullmarks');\n\t\t$passmarks = $this->input->post('passmarks');\n\t\t$semester = $this->input->post('semester');\n\t\t$term = $this->input->post('term');\n\n\t\t$i;\n\t\t$marks = array(\n\t\t\t\t\t\tarray('teacherid' => $teacherid,\n\t\t\t\t\t\t\t'course_id' => $subjectid,\n\t\t\t\t\t\t\t'fullmarks' => $fullmarks,\n\t\t\t\t\t\t\t'passmarks' => $passmarks,\n\t\t\t\t\t\t\t'semester' => $semester,\n\t\t\t\t\t\t\t'term' => $term,\n\t\t\t\t\t\t\t'userid' => '',\n\t\t\t\t\t\t\t'obtainmarks' => '',\n\t\t\t\t\t\t\t'date' => $date ),\n\n\t\t \t\t\t\t);\n\n\t\tfor ($i=0; $i < $noOfStudent; $i++) { \n\t\t\t$marks[$i]['teacherid'] = $teacherid;\n\t\t\t$marks[$i]['course_id'] = $subjectid;\n\t\t\t$marks[$i]['fullmarks'] = $fullmarks;\n\t\t\t$marks[$i]['passmarks'] = $passmarks;\n\t\t\t$marks[$i]['semester'] = $semester;\n\t\t\t$marks[$i]['term'] = $term;\n\t\t\t$marks[$i]['userid'] = $this->input->post(\"sid\".$i);\n\t\t\t$marks[$i]['obtainmarks'] = $this->input->post('oid'+$i);\n\t\t\t$marks[$i]['date'] = $date;\n\t\t}\n\n\t\t$status = $this->staff_model->sendAllMarks($marks);\n\n\n\t\t$email = $this->session->userdata('username');\n\t\t$data['mail']=$email;\n\t\tif($status == true){\n\t\t\t$a = array('no'=> 1, 'sucmsg'=>\"Marks Sent Successfully!!!\");\n\t\t\t$this->load->view('templates/header');\n\t\t\t$this->load->view('templates/staff_nav',$data);\n \t$this->load->view('staff_views/sendmark',$a);\n \t$this->load->view('templates/footer');\n\t\t}\n\t\t\n\t}", "abstract public function buildReport();", "public function paytax_reports()\n\t{\n\t\t$data['title'] = \"Payroll Tax Report\"; //Page title\n\t\t$this->reports_model->_table_name = \"tbl_allow_ded\";\n\t\t$this->reports_model->_order_by = \"id\";\n\t\t\n $data['global_allowance'] = $this->reports_model->get_by(array('id_gsettings' => $this->session->userdata('id_gsettings')));\n\t\t\n\t\t$flag = $this->input->post('sbtn', TRUE);\n\t\tif(!empty($flag))\n\t\t{\n\t\t\t$data['flag'] = 1;\n\t\t\t$data['month'] = $this->input->post('txtmonth');\n\t\t\t$data['paytax_history'] = $this->reports_model->get_emp_salary_details($data['month'],'pay_tax');\n\t\t}\n $data['subview'] = $this->load->view('admin/reports/paytax_reports', $data, TRUE);\n $this->load->view('admin/_layout_main', $data); //page load\n\t}", "public function postProcess() {\n $config =& CRM_Core_Config::singleton( );\n \t\t$params = $this->controller->exportValues( );\n \t\t\n \t\tif(!empty($params['start_date']))\n \t\t $start_date = CRM_Utils_Date::processDate($params['start_date']);\n \t\tif(!empty($params['next_sched_contribution'])) \n \t\t $next_sched_contribution = CRM_Utils_Date::processDate($params['next_sched_contribution']);\n \t\t\n if ($params['action'] == 'add') {\n //$recur->create_date = date( 'YmdHis' );\n $sql = \"INSERT INTO civicrm_contribution_recur SET contact_id = %1 , amount = %2 , frequency_interval = %3 , frequency_unit = %4 , invoice_id = %5 ,\n trxn_id = %6 , currency = %7 , create_date = %8 , start_date = %9 , next_sched_contribution = %10 , processor_id = %11\";\n $invoice_id = md5(uniqid(rand(), true));\n $recur_params = array(\n 1 => array( $params['cid'] , 'Integer' ) , \n 2 => array( $params['amount'] , 'String' ) ,\n 3 => array( $params['frequency_interval'] , 'String' ) ,\n 4 => array( $params['frequency_unit'] , 'String' ) ,\n 5 => array( $invoice_id , 'String' ) ,\n 6 => array( $invoice_id , 'String' ) ,\n 7 => array( $config->defaultCurrency , 'String' ) ,\n 8 => array( date('YmdHis') , 'String' ) ,\n 9 => array( $start_date , 'String' ) ,\n 10 => array( $next_sched_contribution , 'String' ) ,\n 11 => array( $params['processor_id'] , 'String' )\n \n );\n $status = ts('Recurring Contribution setup successfully'); \n }\n elseif ($params['action'] == 'update') {\n $sql = \"UPDATE civicrm_contribution_recur SET amount = %1 , frequency_interval = %2 , frequency_unit = %3 ,\n start_date = %4 , next_sched_contribution = %5 , modified_date = %6 , processor_id = %8 WHERE id = %7\";\n $recur_params = array(\n 1 => array( $params['amount'] , 'String' ) ,\n 2 => array( $params['frequency_interval'] , 'String' ) ,\n 3 => array( $params['frequency_unit'] , 'String' ) ,\n 4 => array( $start_date , 'String' ) ,\n 5 => array( $next_sched_contribution , 'String' ) ,\n 6 => array( date('YmdHis') , 'String' ) ,\n 7 => array( $params['id'] , 'Integer') ,\n 8 => array( $params['processor_id'] , 'String' )\n );\n \n $status = ts('Recurring Contribution updated'); \n }\n \n CRM_Core_DAO::executeQuery($sql , $recur_params);\n \n $session = CRM_Core_Session::singleton( );\n CRM_Core_Session::setStatus( $status );\n \n CRM_Utils_System::redirect( '?q=civicrm/contact/view&reset=1&cid='.$params['cid'] );\n\t }", "public function invoice_audit_trail_export_xls() {\n\n //Read page parameter to display report\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n $invoice_id = $this->input->get('invoice_id');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $company_id = $this->input->get('company_id');\n\n //Build required values to display invoice audit report in table format\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $tabledata = $this->reportsModel->get_invoice_audit_trail($tenant_id, $records_per_page, $offset, $field, $order_by, $payment_status, $start_date, $end_date, $invoice_id, $company_id);\n\n //EXPORT PART\n $this->load->helper('export_helper');\n $count_tabledata = count($tabledata);\n $excel_titles = array('Inv #', 'Inv Dt.', 'Inv Type', 'Taxcode', 'Discount', 'Subsidy', 'GST', 'Net Amt.', 'Prev. Inv. Number', 'Next Inv. Number');\n $excel_data = array();\n for ($i = 0; $i < $count_tabledata; $i++) {\n $paid_arr = array('PAID' => 'Paid', 'PARTPAID' => 'Part Paid', 'NOTPAID' => 'Not Paid');\n $paid_sty_arr = array('PAID' => 'color:green;', 'PARTPAID' => 'color:red;', 'NOTPAID' => 'color:red;');\n if ($tabledata[$i]->enrolment_mode == 'SELF') {\n $taxcode = $tabledata[$i]->tax_code;\n $name = $tabledata[$i]->first_name . ' ' . $tabledata[$i]->last_name;\n $status = $paid_arr[$tabledata[$i]->payment_status];\n } else {\n // Modified by dummy for internal staff enroll on 01 Dec 2014.\n if ($tabledata[$i]->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($tabledata[$i]->company_id);\n $taxcode = $tenant_details->tenant_name;\n $name = $tenant_details->tenant_name;\n } else {\n $taxcode = $tabledata[$i]->comp_regist_num;\n $name = $tabledata[$i]->company_name;\n }\n $status = ($tabledata[$i]->payment_status > 0) ? 'Part Paid/Not Paid' : 'Paid';\n }\n $inv_type1 = $tabledata[$i]->inv_type1 . ' (' . $name . ')';\n $excel_data[$i][] = $tabledata[$i]->invoice_id;\n $excel_data[$i][] = date('d/m/Y', strtotime($tabledata[$i]->inv_date));\n $excel_data[$i][] = $inv_type1;\n $excel_data[$i][] = $this->mask_format($taxcode);\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->total_inv_discnt, 2, '.', '') . ' SGD';\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->total_inv_subsdy, 2, '.', '') . ' SGD';\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->total_gst, 2, '.', '') . ' SGD';\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->total_inv_amount, 2, '.', '') . ' SGD';\n $excel_data[$i][] = $tabledata[$i]->invoice_id;\n $excel_data[$i][] = $tabledata[$i]->regen_inv_id;\n }\n if (empty($start_date) && empty($end_date)) {\n $period = ' for ' . date('F d Y, l');\n } else {\n $period = 'for the period';\n if (!empty($start_date))\n $period .= ' from ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $start_date)->getTimestamp());\n if (!empty($end_date))\n $period .= ' to ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $end_date)->getTimestamp());\n }\n $excel_filename = 'invlice_audit_list.xls';\n $excel_sheetname = 'Invoice Audit Trail';\n $excel_main_heading = 'Accounting Reports - Invoice Audit Trail' . $period;\n export_page_fields($excel_titles, $excel_data, $excel_filename, $excel_sheetname, $excel_main_heading);\n }", "public function view_attendance() { \r\n date_default_timezone_set(\"Asia/Manila\");\r\n $date= date(\"Y-m-d\");\r\n $year = date('Y', strtotime($date));\r\n $month = date('m', strtotime($date));\r\n $datenow = $year .\"-\". $month;\r\n $set_data = $this->session->userdata('userlogin'); //session data\r\n $data = array('clientID' => $set_data['clientID']\r\n ); \r\n $firstDay = mktime(0,0,0,$month, 1, $year);\r\n $timestamp = $firstDay;\r\n $weekDays = array();\r\n for ($i = 0; $i < 31; $i++) {\r\n $weekDays[] = strftime('%a', $timestamp);\r\n $timestamp = strtotime('+1 day', $timestamp);\r\n } \r\n $records['clientprofile']=$this->Client_Model->clientprofile($data);\r\n $records['weekDays']=$weekDays;\r\n $records['useradmin']=$this->User_Model->usertype();\r\n $records['employeeatendance']=$this->Attendance_Model->viewattendanceemployee($set_data['clientID'], $datenow);\r\n $this->load->view('attendanceemployee', $records);\r\n }", "public function viewcontract_reportemployee() { \r\n $set_data = $this->session->userdata('userlogin'); //session data\r\n $data = array('clientID' => $set_data['clientID']\r\n );\r\n $records['useradmin']=$this->User_Model->usertype();\r\n $employeeid = $this->uri->segment(3);\r\n $records['clientprofile']=$this->Client_Model->clientprofile($data);\r\n $records['clientname'] = strtoupper($set_data['firstname']) .\" \". strtoupper($set_data['lastname']);\r\n $records['employeecontract']=$this->Client_Model->viewcontractemployee($set_data['clientID'], $employeeid);\r\n if ($set_data['username']){\r\n $this->load->view('contractdetail', $records); \r\n }\r\n else{\r\n $this->load->view('login');\r\n }\r\n }", "public function dormitoryReport() {\n $data['dormitory'] = $this->common->getAllData('dormitory');\n $data['dormitoryRoom'] = $this->common->getAllData('dormitory_room');\n $data['dormitory_bed'] = $this->common->getAllData('dormitory_bed');\n $this->load->view('temp/header');\n $this->load->view('dormitoryReport', $data);\n $this->load->view('temp/footer');\n }" ]
[ "0.78921235", "0.6877639", "0.63729405", "0.63677514", "0.6346944", "0.6255291", "0.60872173", "0.6075249", "0.5999765", "0.59749573", "0.5970591", "0.5963558", "0.5930038", "0.59207654", "0.5920088", "0.5911183", "0.58961457", "0.58660185", "0.58473986", "0.5843417", "0.5839251", "0.58361727", "0.5826392", "0.5813611", "0.58129823", "0.5805866", "0.58003485", "0.57954794", "0.5791967", "0.5782226", "0.5778544", "0.5776056", "0.57611525", "0.57553625", "0.57462233", "0.5742617", "0.57357544", "0.57304317", "0.56759363", "0.56644183", "0.5663315", "0.5650022", "0.5649546", "0.56414676", "0.56413484", "0.5639113", "0.56384486", "0.5632259", "0.56232655", "0.5620259", "0.5615513", "0.5613836", "0.5605752", "0.56007373", "0.5599147", "0.55966586", "0.55904883", "0.5581717", "0.55807465", "0.55632764", "0.556264", "0.5557997", "0.5557843", "0.5556331", "0.55547047", "0.5553824", "0.5546863", "0.55404794", "0.55329907", "0.55314654", "0.55297995", "0.5528178", "0.5527193", "0.55271786", "0.5522788", "0.55186296", "0.55154014", "0.5512301", "0.5505114", "0.55005586", "0.549913", "0.54933256", "0.54854804", "0.54842323", "0.547531", "0.5472558", "0.5472558", "0.5470688", "0.54650813", "0.5463285", "0.5462699", "0.5456334", "0.54552335", "0.5449493", "0.5449241", "0.5448906", "0.5442807", "0.5441999", "0.5441969", "0.5438809" ]
0.84146255
0
Display a listing of the resource.
public function index(Request $request) { return SearchProductCollection::collection( Product::where('name', 'LIKE','%'.$request->s.'%')->select('id', 'name')->get()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
/ Update custom layout
public function changeLayoutEvent($observer){ $setting = Mage::helper("multidealpro"); $enable = $setting->getRecentDeal_EnableRecent(); $reference = $setting->getRecentDeal_BlockReference(); if($enable == 1){ if($reference != 'none'){ $type = $setting->getSidebar_BlockData_RecentDeal_Type(); $name = $setting->getSidebar_BlockData_RecentDeal_Name(); $template = $setting->getSidebar_BlockData_RecentDeal_Template(); $position = $setting->getRecentDeal_Position(); if(!preg_match("/^(before|after)\=\"[a-zA-Z0-9_.-]+\"/",$position)) $position = ""; if($reference == 'all'){ $xml = '<reference name="left">'; $xml .= '<block type="'.$type.'" '.$position.' name="'.$name.'" template="'.$template.'"/>'; $xml .= '</reference>'; $xml .= '<reference name="right">'; $xml .= '<block type="'.$type.'" '.$position.' name="'.$name.'" template="'.$template.'"/>'; $xml .= '</reference>'; }else{ $xml = '<reference name="'.$reference.'">'; $xml .= '<block type="'.$type.'" '.$position.' name="'.$name.'" template="'.$template.'"/>'; $xml .= '</reference>'; } $update = $observer->getEvent()->getLayout()->getUpdate(); $update->addUpdate($xml); } } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initLayout();", "function afterLayout() { \t\t\n }", "public function renderLayout();", "public function update() {\n $this->view = $this->template->getView();\n $this->layout = $this->template->getLayout();\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 }", "abstract function buildShowLayout(): void;", "protected function setupLayout()\n\t{\n\t\tdefine(\"aol_institute\", 68);\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "public function render_screen_layout()\n {\n }", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout) && ! $this->is_pjax())\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout() {\n\t\tif (!is_null($this -> layout)) {\n\t\t\t$this -> layout = View::make($this -> layout);\n\t\t}\n\t}", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = view($this->layout);\n $this->layout->menus = Menu::getMenu() ;\n }\n }", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout, $this->_data);\n\t\t\t$this->layout->content = null;\n\t\t\t$this->layout->currentProject = null;\n\t\t}\n\t}", "protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\n\n\t\t\t$cb_js_var = array(\n\t\t\t\t'site_url' => url('/'),\n\t\t\t\t'admin_url' => url('/admin'),\n\t\t\t\t'admin_assets_url' => asset('packages/vizioart/cookbook/'),\n\t\t\t\t'admin_api_url' => url('/admin/api')\n\t\t\t);\n\n\n\t\t\t$this->layout = View::make($this->layout, array(\n\t\t\t\t'cb_js_var' => $cb_js_var\n\t\t\t));\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = view($this->layout);\n\t\t}\n\t}", "protected function applyPageLayout()\n {\n $this->content = \"\n @extends('generated/layout')\n \";\n }", "protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "public function setLayout() {\n if ($this->controller == 'login' || $this->controller == 'infos') {\n $this->viewBuilder()->setLayout('empty');\n } else if ($this->controller == 'ajax') {\n $this->viewBuilder()->setLayout('ajax');\n } else {\n $this->viewBuilder()->setLayout('chotreo');\n }\n }", "function beforeLayout() {\n }", "public function getPageLayout() {}", "protected function setupLayout() {\n if (!is_null($this->layout)) $this->layout = View::make($this->layout);\n }", "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\r\n\t{\r\n\t\tif ( ! is_null($this->layout))\r\n\t\t{\r\n\t\t\t$this->layout = View::make($this->layout);\r\n\t\t}\r\n\t}", "protected function _prepareLayout()\n\t{\n\t\treturn parent::_prepareLayout();\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n\n }", "protected function setupLayout()\n\t{\n\t\t$button['text'] = \"login\";\n\t\t$button['url'] = route('login');\n\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$button['text'] = \"logout\";\n\t\t\t$button['url'] = route('logout');\n\t\t\t$this->logged_in_user = Auth::user();\n\t\t\t$notif = new Notification();\n\t\t\t$notifications = $notif->getNotifications($this->logged_in_user->id);\n\t\t\t$new = 0;\n\t\t\tforeach ($notifications as $not) {\n\t\t\t\tif($not->seen == 0)\n\t\t\t\t{\n\t\t\t\t\t$new++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$rating_types = RatingType::getRatingTypes($this->logged_in_user->id);\n\n\t\t\tView::share('notifications', $notifications);\n\t\t\tView::share('new', $new);\n\t\t\tView::share('rating_types', $rating_types);\n\t\t\tView::share('logged_in_user', $this->logged_in_user);\n\t\t}\n\n\t\tView::share('button', $button);\n\t\tView::share('show_feed', $this->show_feed);\n\t\t//Get image path info for all poster and backdrop images\n\t\t$t = new TheMovieDb();\n \t\t$this->image_path_config = $t->getImgPath();\n\t\tView::share('image_path_config', $this->image_path_config);\n\n\n\t\t\n\n\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n {\n if( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n\n if (Request::Ajax())\n {\n $this->layout = View::make('layouts.ajax');\n }\n else\n $this->layout = View::make($this->layout);\n\n $this->layout->content = \" \";\n }\n }", "protected function initLayout()\n {\n $showLabels = $this->hasLabels();\n $showErrors = $this->getConfigParam('showErrors');\n $this->mergeSettings($showLabels, $showErrors);\n $this->buildLayoutParts($showLabels, $showErrors);\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = \\View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout() {\n if ( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "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}", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected static function updateLayout(): void\n {\n (new Filesystem)->delete(resource_path('views/layouts'));\n\n (new Filesystem)->copyDirectory(__DIR__.'/ttall-stubs/resources/views/layouts', resource_path('views/layouts'));\n }", "public function init()\n {\n $this->getHelper('layout')->setLayout('manage-layout');\n }", "public function getLayout();", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\n\t\t$this->setLocale();\n\t}", "public function layout() {\r\n $this->template['header'] = $this->load->view('common/header', $this->data, true);\r\n $this->template['content'] = $this->load->view($this->content, $this->data, true);\r\n $this->template['footer'] = $this->load->view('common/footer', $this->data, true);\r\n $this->load->view('common/layout', $this->template);\r\n }", "public function setLayout($layout)\n\t{\n\t\t//LAYOUT CAN BE FLAT\t\n\t}", "public function getLayout() {}", "public function horizontalLayout() {\n }", "protected function _prepareLayout(){\r\n return $this;\r\n }", "protected function _prepareLayout() {\n $this->_removeButton('reset'); // Remove unused buttons\n $this->_removeButton('delete');\n $this->_removeButton('save');\n\n return parent::_prepareLayout();\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 admin_layout()\n\t{\n\t\techo '<link rel=\"stylesheet\" href=\"' . get_bloginfo('template_directory').'/admin/grid.css\"/>';\n\t\techo '<link rel=\"stylesheet\" href=\"' . get_bloginfo('template_directory').'/admin/style.css\"/>';\n\t\t\n\t\t$selected_layout = ($_GET['layout']) ? sanitize_title( $_GET['layout'] ) : $this->layout_default;\n\t\t\n\t\t// is an action being done on a layout?\n\t\tif($_GET['action'] || $_POST)\n\t\t{\n\t\t\t// is a layout being deleted?\n\t\t\tif($_GET['action'] == 'delete')\n\t\t\t{\n\t\t\t\t// delete the layout\n\t\t\t\t$this->deleteLayout( $selected_layout );\n\t\t\t\t\n\t\t\t\t// set the selected layout to the default\n\t\t\t\t$selected_layout = $this->layout_default;\n\t\t\t}//end if\n\t\t\telseif($_POST) // form was posted\n\t\t\t{\n\t\t\t\t$selected_layout = $this->updateLayout( $selected_layout, $_POST );\n\t\t\t}//end else\n\t\t\t\n\t\t\techo '<script type=\"text/javascript\">document.location = \"', get_option('siteurl'), '/wp-admin/themes.php?page=', $this->layout_page, '&layout=',$selected_layout,'\";</script>';\n\t\t}//end if\n\t\t\n?>\n<script type=\"text/javascript\">\n\tvar ninespot_max_slots = <?php echo $this->$selected_layout->grid; ?>;\n</script>\n<script type=\"text/javascript\" src=\"<?php echo get_bloginfo('template_directory'); ?>/js/admin.js\"></script>\n\n<div id=\"ninespot-settings\">\n<ul id=\"ninespot-tabs\">\n\t<li class=\"<?php echo ($selected_layout == $this->layout_default ) ? 'active' : ''; ?>\"><a href=\"?page=<?php echo $this->layout_page; ?>&layout=<?php echo $this->layout_default; ?>\">Default</a></li>\n<?php\n\tforeach($this->layouts as $layout):\n\t\tif($layout != $this->layout_default): \n?>\n\t\t\t<li class=\"<?php echo ($selected_layout == $layout) ? 'active' : ''; ?>\"><a href=\"?page=<?php echo $this->layout_page; ?>&layout=<?php echo $layout; ?>\"><?php echo $this->$layout->name; ?></a></li>\n<?php \n\t\tendif;\n\tendforeach;\n\t\n\tif($selected_layout == $this->layout_new):\n?>\n\t\t\t<li class=\"active\"><a href=\"?page=<?php echo $this->layout_page; ?>&layout=<?php echo $this->layout_new; ?>\">New Layout</a></li>\n<?php else: ?>\n\t<li><a href=\"?page=<?php echo $this->layout_page; ?>&layout=<?php echo $this->layout_new; ?>\" class=\"ninespot-add\">( + )</a></li>\n<?php endif; ?>\n</ul>\n<?php\n\tif($selected_layout == $this->layout_new)\n\t{\n\t\t$this->$selected_layout = new NineSpotLayout($this->default_structure);\n\t}//end if\n\n\t$new_slug = ($selected_layout == $this->layout_new) ? 'The slug will be created when you save this layout.' : $selected_layout;\n\tinclude $this->dir . '/admin/theme_settings.php';\n?>\n</div>\n<?php\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\treturn $this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function _prepareLayout()\n {\n $this->setTemplate('Magento_UrlRewrite::edit.phtml');\n\n $this->_addBackButton();\n $this->_prepareLayoutFeatures();\n\n return parent::_prepareLayout();\n }", "protected function setupLayout() {\n\t\t$this->data['route'] = Route::getCurrentRoute()->getPath();\t\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->data['enrolledCourses'] = NULL;\n\t\t\t\n\t\t\tif (Auth::check() && in_array(Auth::user()->user_type, array(3, 5))) {\n\t\t\t\t$this->data['enrolledCourses'] = EnrolledCourses::getEnrolledCourses();\n\t\t\t\t$this->data['endedCourses'] = EnrolledCourses::getEndedCourses();\n\t\t\t\t$this->data['profiling'] = User::getRegProfile();\t\n\t\t\t\t$this->data['profiling_ctr'] = $this->data['profiling'];\t\t\t\t\n\t\t\t} else if (Auth::check() && Auth::user()->user_type == 2) {\n\t\t\t\t$this->data['assigned_courses'] = Courses::getAssignedCourses();\n\t\t\t}\n\n\t\t\t$this->layout = View::make($this->layout, $this->data);\n\t\t}\n\t}", "function set_layout($layout) {\n $this->layout = $layout;\n }", "public function setCleanLayout()\n {\n $this->layout = \"@app/modules/site/views/layouts/public_clean\";\n }", "public function setLayout($value);", "public function xlayouts() {\n\t\t$templates = $this->getModel ( 'layout' );\n\t\t$templates->getAll ( 'appliesto = \"Global\"' );\n\t\t/* set last view into session */\n\t\t$this->session->returnto ( $this->getView () );\n\t\t\n\t\t$this->setView ( 'layouts' );\n\t}", "function initializeFilesLayout() {\n $this->loadFilesMenubar();\n // navigation stuff\n $this->layout->add($this->getSearchPanel());\n $this->layout->add($this->getTagsPanel());\n $this->layout->add($this->getFolderPanel());\n // file list\n $this->layout->add($this->getClipboardPanel());\n $this->layout->add($this->getFilesPanel());\n // dialog\n $this->layout->setParam('COLUMNWIDTH_CENTER', '50%');\n $this->layout->setParam('COLUMNWIDTH_RIGHT', '50%');\n }", "protected function setupLayout()\n\t{\n\n $this->user = Auth::user();\n $this->theme = Theme::uses('default')->layout('default');\n $user = $this->user;\n $this->theme->bind('user', function() use($user)\n {\n return $user;\n });\n $cat = Category::all();\n $this->theme->bind('cat', function() use($cat)\n {\n return $cat;\n });\n if (Session::get('cart')){\n $cart_count = count(Session::get('cart'));\n $this->theme->bind('cart_count', function() use($cart_count)\n {\n return $cart_count;\n });\n }\n\t}", "protected function _prepareLayout() {\t\n\t\t$this->_removeButton('add');\n $this->_addButton('import', array(\n 'label' => Mage::helper('catalog')->__('Manuel import'),\n 'onclick' => 'setLocation(\\'' . $this->getUrl('*/*/import') . '\\')',\n 'class' => 'add'\n ));\n return parent::_prepareLayout();\n }", "protected function _prepareLayout()\n\t{\n\t\t$this->getLayout()->getBlock('head')->setTitle($this->__($this->_helper->pageTitle()));\n $this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');\n\t\t$this->getLayout()->getBlock('head')->addCss('css/extrembler/prelogin/form.css');\n\t\t$this->getLayout()->getBlock('root')->unsetChild('header');\n\t\t$this->getLayout()->getBlock('content')->insert('store_language');\n\t\t$this->getLayout()->getBlock('root')->unsetChild('footer');\n\t return parent::_prepareLayout();\n\t}", "function LayoutSize() {\n\treturn 1;\n }", "protected function init()\n {\n $this->setTitle('core_layout.edit_layout');\n $this->addElement([\n 'plugin' => 'hidden',\n 'name' => 'base_script',\n 'value' => 'view'\n ]);\n $this->addElement([\n 'plugin' => 'hidden',\n 'name' => 'item_script',\n 'value' => 'view',\n ]);\n }", "function get_row_layout()\n{\n}", "protected function _prepareLayoutFeatures()\n {\n if ($this->_getUrlRewrite()->getId()) {\n $this->_headerText = __('Edit URL Rewrite');\n } else {\n $this->_headerText = __('Add New URL Rewrite');\n }\n\n $this->_addUrlRewriteSelectorBlock();\n $this->_addEditFormBlock();\n }", "protected static function updateLayoutViews()\n {\n static::copyDirectory(static::RESOURCE_PATH . 'views/layouts', resource_path('views/layouts'));\n static::copyDirectory(static::RESOURCE_PATH . 'views/partials', resource_path('views/partials'));\n static::copyDirectory(static::RESOURCE_PATH . 'views/app', resource_path('views/app'));\n }", "protected function makeViewLayout()\n {\n new MakeLayout($this, $this->files);\n }", "function setLayout($value) {\r\n $this->layout = $value;\r\n }", "public function layout( $layout ) {\n\t\t$this->_layout = $layout;\n\t}" ]
[ "0.74593246", "0.72889507", "0.7194638", "0.6947515", "0.6791371", "0.67908514", "0.6723251", "0.67140836", "0.67024606", "0.6693607", "0.6680688", "0.6670205", "0.66371924", "0.6630761", "0.66276765", "0.6590011", "0.6569911", "0.65672845", "0.65667856", "0.65654045", "0.6562536", "0.6554284", "0.6546418", "0.6536501", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6527428", "0.6521751", "0.6521543", "0.6509502", "0.65031195", "0.64974654", "0.6491829", "0.6487744", "0.64856076", "0.64856076", "0.64856076", "0.64856076", "0.64856076", "0.64734375", "0.6460217", "0.6451259", "0.6451259", "0.6450341", "0.6444961", "0.6444961", "0.6433444", "0.64278954", "0.6426587", "0.6426159", "0.6415419", "0.6412139", "0.64107686", "0.6380819", "0.63732576", "0.6359146", "0.63308346", "0.6315242", "0.6310392", "0.62963474", "0.62711143", "0.6267443", "0.6253367", "0.62402564", "0.6228741", "0.6220317", "0.6211125", "0.6204495", "0.62010384", "0.61551297", "0.61544305", "0.61098754", "0.6108699", "0.6101394", "0.60736513", "0.6069294", "0.60659873" ]
0.0
-1
Event Type Up Coming , Past , Draft
public static function getUserEventList($event_type,$id) { // Page My Event is Own Event $limit = 100; $page = 1; if($page=="") $page = 1; $date_now = date("Y-m-d"); $result = CommonFunction::resultPaging( $page, $limit, EventModel::where('userId', '=', $id)->count(), EventModel::where("status","=",$event_type)-> where("endDate",">=",$date_now)->where('userId', '=', $id)->take($limit)->skip(($page-1)*$limit)->get(array('id', 'name','description', 'avenueName','avanueAddress','latitude','longitude','coverImage','facebook','twitter','line','website','host','categoryId','status','private','share','userId','startDate','endDate','time','startTime','endTime')) ); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventType(): string;", "function get_type_events()\n{\n return 'atu_events';\n}", "public function get_event_posttype(){\r\n\t\treturn $this->event_posttype;\r\n\t}", "function Submissions_Latex_Event()\n {\n $event=$this->Event();\n $event=$this->EventsObj()->ApplyAllEnums($event,TRUE);\n $event=$this->EventsObj()->TrimLatexItem($event);\n\n return $event;\n }", "function getType ()\n\t\t{\n\t\t\treturn \"Event\";\n\t\t}", "public function get_event_status()\n {\n return array(0 => 'undefined'//, 1 => 'due for approval'\n ,2 => 'confirmed', 3 => 'cancelled'//, 4 => 'delegated'\n ,10 => 'tentative', 11 => 'needs-action'\n );\n }", "function setEventType()\n {\n $this->_eventType = 12;\n }", "public function getType() {\n\t\treturn $this->eventType;\n\t}", "public function getEventType() {\n\t\treturn ($this->eventType);\n\t}", "function get_is_upcoming_event_display($view): bool {\n $display = $view->current_display;\n\n switch ($display) {\n // Set the past events link for a topic filtered display.\n case 'page_1': // Event all display\n case 'page_3': // Event topic display\n case 'page_4': // Past topic display\n return TRUE;\n default:\n return FALSE;\n }\n}", "function testEditCalendarEventType()\n\t{\n\t\tedit_event_type($this->eventtype_id,\"test_event_type1\",'calendar/testtype1','');\n\t\t// Test the forum was actually created\n\t\t$this->assertTrue('test_event_type1'==get_translated_text($GLOBALS['SITE_DB']->query_value('calendar_types','t_title ',array('id'=>$this->eventtype_id))));\n\t}", "function eventoni_suggest_events()\n{\n\t// POST-Daten (Inhalt + Titel) auslesen und analysieren\n\t$content = $_POST['content'];\n\t$what = analyse_content($content);\n\n\t// hole Rohdaten zu den Events anhand des analysierten Text-Inhalts\n\t$data = eventoni_fetch('&wt='.$what, true);\n\techo $data['xml'];\n\tdie();\n}", "function _entryapi_ui_event_form_save_event($form, &$form_state, $location, $organiser) {\n\n $values = $form_state['values'];\n\n $update = FALSE;\n if (isset($form['#event'])) {\n $update = TRUE;\n $event = $form['#event'];\n }\n else {\n $event = new CultureFeed_Cdb_Item_Event();\n }\n\n // Publication date\n if ($values['publication_date']) {\n $event->setPublicationDate($values['publication_date']);\n }\n\n // Age\n $event->setAgeFrom(($values['age'] ? $values['age'] : 0));\n\n // Timestamps as calendar.\n if ($values['when'] == 'one_day' || $values['when'] == 'multiple_days') {\n _entry_api_ui_event_save_timestamps($event, $values);\n }\n\n // Period or permanent as calendar.\n elseif ($values['when'] == 'period' || $values['when'] == 'permanent') {\n _entry_api_ui_event_save_weekscheme($event, $values);\n }\n\n // Categories.\n $category_values = $values['kijken_en_luisteren'];\n $category_values += $values['doen'];\n $category_values += $values['bezoeken'];\n $category_options = $form['what']['kijken_en_luisteren']['#options'];\n $category_options += $form['what']['doen']['#options'];\n $category_options += $form['what']['bezoeken']['#options'];\n\n $categories = new CultureFeed_Cdb_Data_CategoryList();\n foreach ($category_values as $key => $value) {\n if ($value) {\n $categories->add(new CultureFeed_Cdb_Data_Category(CultureFeed_Cdb_Data_Category::CATEGORY_TYPE_EVENT_TYPE, $value, $category_options[$value]));\n }\n }\n $event->setCategories($categories);\n\n // Event details.\n $detail = new CultureFeed_Cdb_Data_EventDetail();\n $detail->setTitle($values['title']);\n if (!empty($values['short_description'])) {\n $detail->setShortDescription($values['short_description']);\n }\n $detail->setLanguage(culturefeed_search_get_preferred_language());\n\n $details = new CultureFeed_Cdb_Data_EventDetailList();\n $details->add($detail);\n $event->setDetails($details);\n\n // Location / Address.\n $addresses = $location->getEntity()->getContactInfo()->getAddresses();\n $address = $addresses[0];\n\n // Event location\n $cdbLocation = new CultureFeed_Cdb_Data_Location($address);\n $cdbLocation->setLabel($values['location']);\n $cdbLocation->setCdbid($location->getId());\n $event->setLocation($cdbLocation);\n\n // Event organiser.\n $organiser_object = new CultureFeed_Cdb_Data_Organiser();\n $organiser_object->setLabel($values['organiser']);\n $organiser_object->setCdbid($organiser->getId());\n $event->setOrganiser($organiser_object);\n\n // Contact info.\n $physical_address = $address->getPhysicalAddress();\n $contact_object = new CultureFeed_Cdb_Data_ContactInfo();\n $contact_object->addAddress(new CultureFeed_Cdb_Data_Address($physical_address));\n\n foreach ($values['contacts'] as $contact) {\n\n if (!empty($contact['text'])) {\n switch ($contact['type']) {\n\n case 'website':\n $contact_object->addUrl(new CultureFeed_Cdb_Data_Url($contact['text'], FALSE, $contact['reservation']));\n break;\n\n case 'email':\n $contact_object->addMail(new CultureFeed_Cdb_Data_Mail($contact['text'], FALSE, $contact['reservation']));\n break;\n\n case 'phone':\n $contact_object->addPhone(new CultureFeed_Cdb_Data_Phone($contact['text'], CultureFeed_Cdb_Data_Phone::PHONE_TYPE_PHONE, FALSE, $contact['reservation']));\n break;\n\n }\n }\n\n\n }\n\n $event->setContactInfo($contact_object);\n\n try {\n\n if ($update) {\n DrupalCultureFeed_EntryApi::updateEvent($event);\n $form_state['#event_id'] = $event->getCdbId();\n }\n else {\n $form_state['#event_id'] = DrupalCultureFeed_EntryApi::createEvent($event);\n }\n\n $form_state['#update_event'] = $update;\n\n }\n catch (Exception $e) {\n watchdog_exception('entry_api_ui', $e);\n form_set_error('', 'Er ging iets fout tijdens het bewaren.');\n }\n\n}", "public function get_event_types()\n {\n return array(0 => 'miscellaneous', 1 => 'appointment', 2 => 'holiday'\n ,3 => 'birthday', 4 => 'personal', 5 => 'education'\n ,6 => 'travel', 7 => 'anniversary', 8 => 'not in office'\n ,9 => 'sick day', 10 => 'meeting', 11 => 'vacation'\n ,12 => 'phone call', 13 => 'business'\n ,14 => 'non-working hours', 50 => 'special occasion'\n );\n }", "public function postEventedit();", "public function getEventTypeAttribute() {\n return $this->eventType()->getResults();\n }", "public function getOtherEvents();", "function isPastEvent($newEventID){\r\n\t\tif(!$this->DBLogin()){\r\n $this->HandleError(\"Database login failed!\");\r\n return false;\r\n }\r\n\t\t\r\n\t\t//check that the event is not a past event.\r\n\t\t//the user should not be able to edit the event when it is past.\r\n\t\t\r\n\t\t\r\n\t\t\r\n if(!$this->EnsureRegTable()){\r\n return false;\r\n }\r\n\t\t\r\n\t\tif(!$this->EnsureMyEventsTable($formvars['UuserName'])){\r\n return false;\r\n }\r\n\t\t\r\n if(!$this->IsFieldUnique($formvars, 'email')){\r\n $this->HandleError(\"This email is already registered\");\r\n return false;\r\n }\r\n \r\n if(!$this->IsFieldUnique($formvars, 'username')){\r\n $this->HandleError(\"This UserName is already used. Please try another username\");\r\n return false;\r\n }\r\n \r\n if(!$this->InsertIntoEventAdvisorDB($formvars)){\r\n $this->HandleError(\"Inserting to Database failed!\");\r\n return false;\r\n }\r\n return true;\r\n\t}", "public function getEventType()\n {\n return $this->proxyBase->eventType;\n }", "public static function getNewEvent(){\n $new_event = null;\n $events = Event::all();\n foreach ($events as $event)\n if( ( $event->isUpcoming() || $event->isOpened() ) && $event->published ){\n $new_event = $event;\n break;\n }\n return $new_event;\n }", "function ct_event() {\n\t\tglobal $Language;\n\n\t\t// C_EVENT_ID\n\t\t$this->C_EVENT_ID = new cField('t_event', 't_event', 'x_C_EVENT_ID', 'C_EVENT_ID', '`C_EVENT_ID`', 3, -1, FALSE, '`C_EVENT_ID`', FALSE);\n\t\t$this->C_EVENT_ID->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_EVENT_ID'] =& $this->C_EVENT_ID;\n\n\t\t// FK_CONGTY_ID\n\t\t$this->FK_CONGTY_ID = new cField('t_event', 't_event', 'x_FK_CONGTY_ID', 'FK_CONGTY_ID', '`FK_CONGTY_ID`', 3, -1, FALSE, '`FK_CONGTY_ID`', FALSE);\n\t\t$this->FK_CONGTY_ID->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['FK_CONGTY_ID'] =& $this->FK_CONGTY_ID;\n\n\t\t// C_EVENT_NAME\n\t\t$this->C_EVENT_NAME = new cField('t_event', 't_event', 'x_C_EVENT_NAME', 'C_EVENT_NAME', '`C_EVENT_NAME`', 201, -1, FALSE, '`C_EVENT_NAME`', FALSE);\n\t\t$this->fields['C_EVENT_NAME'] =& $this->C_EVENT_NAME;\n\n\t\t// C_TYPE_EVENT\n\t\t$this->C_TYPE_EVENT = new cField('t_event', 't_event', 'x_C_TYPE_EVENT', 'C_TYPE_EVENT', '`C_TYPE_EVENT`', 3, -1, FALSE, '`C_TYPE_EVENT`', FALSE);\n\t\t$this->C_TYPE_EVENT->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_TYPE_EVENT'] =& $this->C_TYPE_EVENT;\n\n\t\t// C_POST\n\t\t$this->C_POST = new cField('t_event', 't_event', 'x_C_POST', 'C_POST', '`C_POST`', 3, -1, FALSE, '`C_POST`', FALSE);\n\t\t$this->C_POST->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_POST'] =& $this->C_POST;\n\n\t\t// C_URL_IMAGES\n\t\t$this->C_URL_IMAGES = new cField('t_event', 't_event', 'x_C_URL_IMAGES', 'C_URL_IMAGES', '`C_URL_IMAGES`', 201, -1, FALSE, '`C_URL_IMAGES`', FALSE);\n\t\t$this->fields['C_URL_IMAGES'] =& $this->C_URL_IMAGES;\n\n\t\t// C_URL_LINK\n\t\t$this->C_URL_LINK = new cField('t_event', 't_event', 'x_C_URL_LINK', 'C_URL_LINK', '`C_URL_LINK`', 201, -1, FALSE, '`C_URL_LINK`', FALSE);\n\t\t$this->fields['C_URL_LINK'] =& $this->C_URL_LINK;\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN = new cField('t_event', 't_event', 'x_C_DATETIME_BEGIN', 'C_DATETIME_BEGIN', '`C_DATETIME_BEGIN`', 135, 7, FALSE, '`C_DATETIME_BEGIN`', FALSE);\n\t\t$this->C_DATETIME_BEGIN->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_DATETIME_BEGIN'] =& $this->C_DATETIME_BEGIN;\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END = new cField('t_event', 't_event', 'x_C_DATETIME_END', 'C_DATETIME_END', '`C_DATETIME_END`', 135, 7, FALSE, '`C_DATETIME_END`', FALSE);\n\t\t$this->C_DATETIME_END->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_DATETIME_END'] =& $this->C_DATETIME_END;\n\n\t\t// C_ODER\n\t\t$this->C_ODER = new cField('t_event', 't_event', 'x_C_ODER', 'C_ODER', '`C_ODER`', 135, 7, FALSE, '`C_ODER`', FALSE);\n\t\t$this->C_ODER->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_ODER'] =& $this->C_ODER;\n\n\t\t// C_NOTE\n\t\t$this->C_NOTE = new cField('t_event', 't_event', 'x_C_NOTE', 'C_NOTE', '`C_NOTE`', 201, -1, FALSE, '`C_NOTE`', FALSE);\n\t\t$this->fields['C_NOTE'] =& $this->C_NOTE;\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD = new cField('t_event', 't_event', 'x_C_USER_ADD', 'C_USER_ADD', '`C_USER_ADD`', 3, -1, FALSE, '`C_USER_ADD`', FALSE);\n\t\t$this->C_USER_ADD->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_USER_ADD'] =& $this->C_USER_ADD;\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME = new cField('t_event', 't_event', 'x_C_ADD_TIME', 'C_ADD_TIME', '`C_ADD_TIME`', 135, 7, FALSE, '`C_ADD_TIME`', FALSE);\n\t\t$this->C_ADD_TIME->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_ADD_TIME'] =& $this->C_ADD_TIME;\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT = new cField('t_event', 't_event', 'x_C_USER_EDIT', 'C_USER_EDIT', '`C_USER_EDIT`', 3, -1, FALSE, '`C_USER_EDIT`', FALSE);\n\t\t$this->C_USER_EDIT->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_USER_EDIT'] =& $this->C_USER_EDIT;\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME = new cField('t_event', 't_event', 'x_C_EDIT_TIME', 'C_EDIT_TIME', '`C_EDIT_TIME`', 135, 7, FALSE, '`C_EDIT_TIME`', FALSE);\n\t\t$this->C_EDIT_TIME->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_EDIT_TIME'] =& $this->C_EDIT_TIME;\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\t$this->C_ACTIVE_LEVELSITE = new cField('t_event', 't_event', 'x_C_ACTIVE_LEVELSITE', 'C_ACTIVE_LEVELSITE', '`C_ACTIVE_LEVELSITE`', 3, -1, FALSE, '`C_ACTIVE_LEVELSITE`', FALSE);\n\t\t$this->C_ACTIVE_LEVELSITE->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_ACTIVE_LEVELSITE'] =& $this->C_ACTIVE_LEVELSITE;\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE = new cField('t_event', 't_event', 'x_C_TIME_ACTIVE', 'C_TIME_ACTIVE', '`C_TIME_ACTIVE`', 135, 7, FALSE, '`C_TIME_ACTIVE`', FALSE);\n\t\t$this->C_TIME_ACTIVE->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_TIME_ACTIVE'] =& $this->C_TIME_ACTIVE;\n\n\t\t// C_SEND_MAIL\n\t\t$this->C_SEND_MAIL = new cField('t_event', 't_event', 'x_C_SEND_MAIL', 'C_SEND_MAIL', '`C_SEND_MAIL`', 3, -1, FALSE, '`C_SEND_MAIL`', FALSE);\n\t\t$this->C_SEND_MAIL->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_SEND_MAIL'] =& $this->C_SEND_MAIL;\n\n\t\t// C_CONTENT_MAIL\n\t\t$this->C_CONTENT_MAIL = new cField('t_event', 't_event', 'x_C_CONTENT_MAIL', 'C_CONTENT_MAIL', '`C_CONTENT_MAIL`', 201, -1, FALSE, '`C_CONTENT_MAIL`', FALSE);\n\t\t$this->fields['C_CONTENT_MAIL'] =& $this->C_CONTENT_MAIL;\n\n\t\t// C_FK_BROWSE\n\t\t$this->C_FK_BROWSE = new cField('t_event', 't_event', 'x_C_FK_BROWSE', 'C_FK_BROWSE', '`C_FK_BROWSE`', 200, -1, FALSE, '`C_FK_BROWSE`', FALSE);\n\t\t$this->fields['C_FK_BROWSE'] =& $this->C_FK_BROWSE;\n\n\t\t// FK_ARRAY_TINBAI\n\t\t$this->FK_ARRAY_TINBAI = new cField('t_event', 't_event', 'x_FK_ARRAY_TINBAI', 'FK_ARRAY_TINBAI', '`FK_ARRAY_TINBAI`', 200, -1, FALSE, '`FK_ARRAY_TINBAI`', FALSE);\n\t\t$this->fields['FK_ARRAY_TINBAI'] =& $this->FK_ARRAY_TINBAI;\n\n\t\t// FK_ARRAY_CONGTY\n\t\t$this->FK_ARRAY_CONGTY = new cField('t_event', 't_event', 'x_FK_ARRAY_CONGTY', 'FK_ARRAY_CONGTY', '`FK_ARRAY_CONGTY`', 200, -1, FALSE, '`FK_ARRAY_CONGTY`', FALSE);\n\t\t$this->fields['FK_ARRAY_CONGTY'] =& $this->FK_ARRAY_CONGTY;\n\t}", "public function getEventType() {\n $ret = '';\n switch($this->type) {\n case Event::TYPE_EVENT:\n $ret = 'Event';\n break;\n case Event::TYPE_FLAGSHIP:\n $ret = 'Flagship';\n break;\n case Event::TYPE_WORKSHOP:\n $ret = 'Workshop';\n break;\n case Event::TYPE_CELEBRITY_APPEARANCE:\n $ret = 'Celebrity Appearance';\n break;\n case Event::TYPE_GUEST_LECTURE:\n $ret = 'Guest Lecture';\n break;\n }\n\n return $ret;\n }", "function getEvents() {\n\n $events = ['new' => __('New change'),\n 'update' => __('Update of a change'),\n 'solved' => __('Change solved'),\n 'validation' => __('Validation request'),\n 'validation_answer' => __('Validation request answer'),\n 'closed' => __('Closure of a change'),\n 'delete' => __('Deleting a change')];\n\n $events = array_merge($events, parent::getEvents());\n asort($events);\n return $events;\n }", "function publish_new_events($status, $ckf7_key, $submitted_data){\n return 'publish';\n}", "abstract public function getEventName();", "private static function get_events() {\n\t\treturn array(\n\t\t\t'formidable_send_usage' => 'weekly',\n\t\t);\n\t}", "function create_events_posttype() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Events', 'Post Type General Name'),\n\t\t'singular_name' => _x( 'Event', 'Post Type Singular Name'),\n\t\t'menu_name' => __( 'Events'),\n\t\t'parent_item_colon' => __( 'Parent Event'),\n\t\t'all_items' => __( 'All Events'),\n\t\t'view_item' => __( 'View Event'),\n\t\t'add_new_item' => __( 'Add New Event'),\n\t\t'add_new' => __( 'Add New'),\n\t\t'edit_item' => __( 'Edit Event'),\n\t\t'update_item' => __( 'Update Event'),\n\t\t'search_items' => __( 'Search Event'),\n\t\t'not_found' => __( 'Not Found'),\n\t\t'not_found_in_trash' => __( 'Not found in Trash'),\n);\n\n$args = array(\n\t'label' => __( 'Events'),\n\t'description' => __( 'Events organized by Swing Foundation'),\n\t'labels' => $labels,\n\t// Features this CPT supports in Post Editor\n\t'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', 'custom-fields'),\n\t/* A hierarchical CPT is like Pages and can have\n\t* Parent and child items. A non-hierarchical CPT\n\t* is like Posts.\n\t*/ \n\t'hierarchical' => false,\n\t'public' => true,\n\t'show_ui' => true,\n\t'show_in_menu' => true,\n\t'show_in_nav_menus' => true,\n\t'show_in_admin_bar' => true,\n\t'menu_position' => 4,\n\t'can_export' => true,\n\t'has_archive' => true,\n\t'exclude_from_search' => false,\n\t'publicly_queryable' => true,\n\t'capability_type' => 'page',\n\t'menu_icon'\t\t\t\t\t\t=> 'dashicons-calendar-alt'\n);\n \n\tregister_post_type( 'events', $args );\n}", "function aidtransparency_print_events()\r\n{\r\n $events = new IATI_Event_Collection();\r\n if( $events->findPosts() > 0 ) :\r\n ?>\r\n <ol>\r\n <?php\r\n foreach ($events->getPosts() as $event) :\r\n ?>\r\n <li><a href=\"<?php echo get_permalink($event->ID); ?>\" title=\"<?php echo $event->post_title; ?>\"><?php echo $event->post_title; ?></a>\r\n <span class=\"when\"><?php echo $event->getWhere(); ?> </span>\r\n </li>\r\n <?php endforeach; ?>\r\n </ol>\r\n <?php endif;\r\n}", "public function getEventType(): int\n {\n return $this->_eventType;\n }", "function is_event_calendar_page() {\n\n\tif ( class_exists( 'TribeEvents' ) ) {\n\n\t\t$is_event_calendar = false; // Default is false so if everything falls through it returns that it is not an EC page\n\n\t\tif ( tribe_is_month() && ! is_tax() ) { // Month View Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( tribe_is_month() && is_tax() ) { // Month View Category Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( tribe_is_past() || tribe_is_upcoming() && ! is_tax() ) { // List View Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( tribe_is_past() || tribe_is_upcoming() && is_tax() ) { // List View Category Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( tribe_is_week() && ! is_tax() ) { // Week View Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( tribe_is_week() && is_tax() ) { // Week View Category Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( tribe_is_day() && ! is_tax() ) { // Day View Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( tribe_is_day() && is_tax() ) { // Day View Category Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( tribe_is_map() && ! is_tax() ) { // Map View Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( tribe_is_map() && is_tax() ) { // Map View Category Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( tribe_is_photo() && ! is_tax() ) { // Photo View Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( tribe_is_photo() && is_tax() ) { // Photo View Category Page\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( is_singular( ‘tribe_events’ ) ) { // Single Events\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( is_singular( ‘tribe_venue’ ) ) { // Single Venues\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} elseif ( is_singular( ‘tribe_organizer’ ) ) { // Single Organizers\n\n\t\t\t$is_event_calendar = true;\n\n\t\t} else {\n\n\t\t}\n\n\t\treturn $is_event_calendar;\n\t}\n}", "function bat_event_type_form_submit(&$form, &$form_state) {\n if (isset($form_state['values']['events'][$form_state['values']['type']])) {\n foreach ($form_state['values']['events'] as $event => $field) {\n $form_state['bat_event_type']->default_event_value_field_ids[$event] = $field;\n }\n }\n if (isset($form_state['values']['event_label']['default_event_label_field_name'])) {\n $form_state['bat_event_type']->default_event_label_field_name = $form_state['values']['event_label']['default_event_label_field_name'];\n }\n\n $event_type = entity_ui_form_submit_build_entity($form, $form_state);\n // Save and go back.\n $event_type->save();\n $form_state['redirect'] = 'admin/bat/events/event-types';\n}", "function sfgovpl_preprocess_views_view__events__page(&$variables) {\n $view = $variables['view'];\n $variables['upcoming_event_count'] = get_upcoming_event_count($view);\n $variables['upcoming_events_url'] = get_upcoming_event_view_url($view);\n $variables['past_events_url'] = get_past_event_view_url($view);\n $variables['is_upcoming_event_display'] = get_is_upcoming_event_display($view);\n}", "function tipoSituacaoEvento($tipo){\n\t\t\t\tswitch($tipo){\n\t\t\t\t\t\n\t\t\t\tcase '1':\n\t\t\t\t\t$tipo\t= 'Solicitada';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '2':\n\t\t\t\t\t$tipo\t= 'Autorizada';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '3':\n\t\t\t\t\t$tipo\t= 'Em Andamento';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '4':\n\t\t\t\t\t$tipo\t= 'Concluida';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\treturn $tipo;\n}", "function eventclass_offeraride()\n\t{\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}", "public static function eventStatus()\n {\n return [\n 'abe' => 'Aberto',\n 'fec' => 'Fechado',\n 'can' => 'Cancelado'\n ];\n }", "public function getEventType()\n {\n return $this->readOneof(2);\n }", "function simple_history_transition_post_status($new_status, $old_status, $post) {\n\n\t#echo \"<br>From $old_status to $new_status\";\n\n\t// From new to auto-draft <- ignore\n\t// From new to inherit <- ignore\n\t// From auto-draft to draft <- page/post created\n\t// From draft to draft\n\t// From draft to pending\n\t// From pending to publish\n\t# From pending to trash\n\t// if not from & to = same, then user has changed something\n\t//bonny_d($post); // regular post object\n\tif ($old_status == \"auto-draft\" && ($new_status != \"auto-draft\" && $new_status != \"inherit\")) {\n\t\t// page created\n\t\t$action = \"created\";\n\t} elseif ($new_status == \"auto-draft\" || ($old_status == \"new\" && $new_status == \"inherit\")) {\n\t\t// page...eh.. just leave it.\n\t\treturn;\n\t} elseif ($new_status == \"trash\") {\n\t\t$action = \"deleted\";\n\t} else {\n\t\t// page updated. i guess.\n\t\t$action = \"updated\";\n\t}\n\t$object_type = \"post\";\n\t$object_subtype = $post->post_type;\n\n\t// Attempt to auto-translate post types*/\n\t// no, no longer, do it at presentation instead\n\t#$object_type = __( ucfirst ( $object_type ) );\n\t#$object_subtype = __( ucfirst ( $object_subtype ) );\n\n\tif ($object_subtype == \"revision\") {\n\t\t// don't log revisions\n\t\treturn;\n\t}\n\t\n\tif (wp_is_post_revision($post->ID) === false) {\n\t\t// ok, no revision\n\t\t$object_id = $post->ID;\n\t} else {\n\t\treturn; \n\t}\n\t\n\t$post_title = get_the_title($post->ID);\n\t$post_title = urlencode($post_title);\n\t\n\tsimple_history_add(\"action=$action&object_type=$object_type&object_subtype=$object_subtype&object_id=$object_id&object_name=$post_title\");\n}", "function cpt_event() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Events', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'Event', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Events', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Event', 'text_domain' ),\n\t\t'archives' => __( 'Event Archives', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Event:', 'text_domain' ),\n\t\t'all_items' => __( 'All Events', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Event', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New Event', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Event', 'text_domain' ),\n\t\t'update_item' => __( 'Update Event', 'text_domain' ),\n\t\t'view_item' => __( 'View Event', 'text_domain' ),\n\t\t'search_items' => __( 'Search Event', 'text_domain' ),\n\t\t'not_found' => __( 'Not found', 'text_domain' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n\t\t'featured_image' => __( 'Featured Image', 'text_domain' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n\t\t'items_list' => __( 'Events list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Events list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'Event', 'text_domain' ),\n\t\t'description' => __( 'Events', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array('title', 'editor', 'thumbnail' ),\n\t\t'taxonomies' => array(),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\t\t\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\tregister_post_type( 'event', $args );\n\n}", "private function getEvents($type)\r\n {\r\n if ($type == Stat::TYPE_INQUIRY) {\r\n $inqs = $this->container->get('jcs.ds')->getGroup('inquiry');\r\n return !empty($inqs) ? $inqs : [];\r\n }\r\n elseif ($type == Stat::TYPE_FAMILY_HELP) {\r\n $events = $this->container->getParameter('stat_events');\r\n\r\n return isset($events[$type]) ? $events[$type] : [];\r\n }\r\n }", "public function past_events()\n {\n if($this->Auth->user('level') != \"Officer\" && $this->Auth->user('level') != \"Admin\")\n $this->redirect(\n array('controller' => 'Users', 'action' => 'profilehub/' . $this->Auth->user('id')));\n\n $allRsvps = $this->Event->EventsUser->find('all');\n $this->set('rsvps', $allRsvps);\n\n $this->EventHelper();\n\n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Hub');\n }", "function sfgovpl_preprocess_views_view__events__page_1(&$variables) {\n $view = $variables['view'];\n $variables['upcoming_event_count'] = get_upcoming_event_count($view);\n $variables['upcoming_events_url'] = get_upcoming_event_view_url($view);\n $variables['past_events_url'] = get_past_event_view_url($view);\n $variables['is_upcoming_event_display'] = get_is_upcoming_event_display($view);\n}", "public static function getAllEventTypes()\n {\n return [\n 'complete' => 'complete',\n 'fail' => 'fail'\n ];\n }", "function notify_post($post_id) {\n\n if( ( $_POST['post_status'] == 'publish' ) && ( $_POST['original_post_status'] != 'publish' ) && ( $_POST['post_type'] == 'events' ) ) {\n\n send_event_email($post_id);\n\n }\n\n}", "abstract protected function get_event_name();", "public function getRentalEventType()\n {\n return $this->_fields['RentalEventType']['FieldValue'];\n }", "public function get_upcoming() {\n\t\t$sql = \"SELECT DATE_FORMAT (datetime,'%M %e') as date, event FROM events\n\t\tWHERE datetime > now() limit 2\";\n\t\t$eh = $this->pdo->query($sql);\n\t\t$text = \"Upcoming Events: \\n-------------------\\n \";\n\t\t\tforeach ($eh as $ev ){\n\t\t\t\t$text .= $ev['date'] . \": \" . $ev['event'] . NL;\n\t\t\t}\n\t\t$text .= NL;\n\t\tfile_put_contents(FileDefs::next_dir . '/' . FileDefs::tease_calendar,$text);\n\t\t//echo $text . BRNL;\n\n\t\treturn true;\n\t}", "public function getNextEvent(){\n\t\t// get the events\n\t\t$events = $this->getEvents();\n\n\t\t// extract the next event that will happen\n\t\t$nextEvent = array_shift($events);\n\t\tfor ($i = 1; $i < sizeof($events); $i++){\n\t\t\t$event = array_shift($events);\n\t\t\tif($events[0]['is_approved'] == 1 && $events[0]['date'] > $nextEvent['date']){\n\t\t\t\t$nextEvent = $event;\n\t\t\t}\n\t\t}\n\n\t\treturn $nextEvent;\n\t}", "public function getEventName() : String;", "public function getEventType(): ?string\n {\n return $this->eventType;\n }", "function submitted_events_postwalk($submission) {\n\tif (submitted_events_starts_with ( $submission->postwalk, 'Public House' )) {\n\t\treturn 'Pub to finish.';\n\t} elseif (submitted_events_starts_with ( $submission->postwalk, 'Tea Shop' )) {\n\t\treturn 'After the walk we\\'ll go to a tea shop.';\n\t} else {\n\t\treturn '';\n\t}\n}", "function sfgovpl_preprocess_views_view__events__page_2(&$variables) {\n $view = $variables['view'];\n $variables['upcoming_event_count'] = get_upcoming_event_count($view);\n $variables['upcoming_events_url'] = get_upcoming_event_view_url($view);\n $variables['past_events_url'] = get_past_event_view_url($view);\n $variables['is_upcoming_event_display'] = get_is_upcoming_event_display($view);\n}", "function actions($eventname, $party = -1){\n //events: order_placed, order_canceled/order_pending/order_confirmed/order_declined/order_delivered (done), user_registered (done)\n $SQL = \"SELECT party, sms, phone, email, message FROM actions WHERE eventname = '\" . $eventname . \"'\";\n if ($party > -1) {\n $SQL .= \" AND party = \" . $party;\n }\n return first($SQL, $party > -1, \"API.actions\");\n}", "function get_event(){\n\t\tglobal $EM_Event;\n\t\tif( is_object($EM_Event) && $EM_Event->event_id == $this->event_id ){\n\t\t\treturn $EM_Event;\n\t\t}else{\n\t\t\tif( is_numeric($this->event_id) && $this->event_id > 0 ){\n\t\t\t\treturn em_get_event($this->event_id, 'event_id');\n\t\t\t}elseif( is_array($this->bookings) ){\n\t\t\t\tforeach($this->bookings as $EM_Booking){\n\t\t\t\t\t/* @var $EM_Booking EM_Booking */\n\t\t\t\t\treturn em_get_event($EM_Booking->event_id, 'event_id');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn em_get_event($this->event_id, 'event_id');\n\t}", "static public function western_time_past_event($str = \"2013-1-8\")\n {\n $datetime1 = new DateTime(\"now\");\n $datetime2 = new DateTime($str);\n //what is going on now here\n if ($datetime1 == $datetime2) {\n return 0;\n } else if ($datetime1 < $datetime2) {\n //what is going on the coming event- -- FUTURE EVENT\n return 1;\n } else if ($datetime1 > $datetime2) {\n //what has been happened in the past. -- PAST EVENT\n return 2;\n }\n return FALSE;\n }", "public function followingEvent()\n {\n return Event::where('starts_at', '>=', $this->ends_at)\n ->where('type', '=', Event::MEETUP)\n ->first();\n }", "public function testEventStatus()\n {\n $feed = $this->eventFeed;\n\n // Assert that all entry's have an eventStatus object\n foreach ($feed as $entry) {\n $this->assertTrue($entry->getEventStatus() instanceof Zend_Gdata_Extension_EventStatus);\n }\n\n // Assert one of the entries values\n $entry = $feed[2];\n $this->verifyProperty2($entry, \"eventStatus\", \"value\", \"http://schemas.google.com/g/2005#event.confirmed\");\n }", "function is_event($p = null) {\n\tglobal $post;\n\t$p = ($p == null) ? $post : $p;\n\t$cat = get_the_category($p->ID);\n\t$option_category = get_it_option('event_category');\n\t\n\treturn $cat[0]->cat_ID == $option_category ||\n\t\t\tget_top_parent_cat_ID($cat[0]) == $option_category;\n}", "function set_event_type($eventType, $secondaryType)\n{\n\n if ($eventType && $secondaryType) {\n // If both type and secondary type\n\n $secondaryType .= ', ' . $eventType;\n\n $types = explode(\", \", $secondaryType);\n\n } elseif ($eventType && !$secondaryType) {\n // If only type and no secondary type\n\n $types[] = $eventType;\n\n } else {\n // In case there is not type at all\n\n $types[] = 'Misc';\n }\n\n $finalTypes = array_unique($types);\n\n return implode(\",\", $finalTypes);\n\n}", "function _culturefeed_agenda_preprocess_event(&$variables) {\n\n $event = $variables['item']->getEntity();\n $event_detail = $event->getDetails()->getDetailByLanguage(culturefeed_search_get_preferred_language());\n\n $variables['agefrom'] = check_plain($event->getAgeFrom());\n if (is_numeric($event->getAgeFrom()) && ($event->getAgeFrom() <= 12)) {\n $variables['forkids'] = TRUE;\n }\n $variables['location'] = culturefeed_agenda_get_location_of_event($event);\n\n $actor = NULL;\n\n // Contact information\n $variables['contact'] = array();\n if ($event->getContactInfo()) {\n\n $contact_info = $event->getContactInfo();\n\n // Mails.\n $mails = array();\n foreach ($contact_info->getMails() as $mail) {\n $mails[] = l($mail->getMailAddress(), 'mailto:' . $mail->getMailAddress(), array('attributes' => array('id' => 'cf-contact')));\n }\n $variables['contact']['mail'] = implode(', ', $mails);\n\n // Fax + phone numbers.\n $phones = array();\n $faxes = array();\n foreach ($contact_info->getPhones() as $phone) {\n if ($phone->getType() == CultureFeed_Cdb_Data_Phone::PHONE_TYPE_PHONE) {\n $phones[] = $phone->getNumber();\n }\n else {\n $faxes[] = $phone->getNumber();\n }\n }\n $variables['contact']['phone'] = implode(', ', $phones);\n $variables['contact']['fax'] = implode(', ', $faxes);\n\n // Reservation data.\n $variables['reservation'] = $contact_info->getReservationInfo();\n $reservation_info = $variables['reservation'];\n\n // Reservation mail\n if (isset($reservation_info['mails'])) {\n foreach ($reservation_info['mails'] as $mail) {\n $reservation_mails[] = l($mail, 'mailto:' . $mail, array('attributes' => array('id' => 'cf-reservation')));\n }\n $variables['reservation']['mail'] = implode(', ', $reservation_mails);\n }\n\n // Reservation phone\n if (isset($reservation_info['phone'])) {\n foreach ($reservation_info['phone'] as $phone) {\n $reservation_phones[] = $phone;\n }\n $variables['reservation']['phone'] = implode(', ', $reservation_phones);\n }\n\n // Reservation url\n if (isset($reservation_info['url'])) {\n foreach ($reservation_info['url'] as $url) {\n // clean up link text\n $url_text = str_replace('http://', '', $url);\n $url_text = str_replace('https://', '', $url_text);\n $reservation_urls[] = l(truncate_utf8($url_text, 40, FALSE, TRUE), $url, array('attributes' => array('id' => 'cf-reservation')));\n }\n $variables['reservation']['url'] = implode(', ', $reservation_urls);\n }\n\n // Coordinates.\n $addresses = $contact_info->getAddresses();\n if ($addresses) {\n $address = current($addresses);\n $coordinates = $address->getPhysicalAddress()->getGeoInformation();\n if ($coordinates) {\n $variables['coordinates'] = array(\n 'lat' => $coordinates->getYCoordinate(),\n 'lng' => $coordinates->getXCoordinate(),\n );\n }\n }\n\n }\n\n // Calendar.\n if ($calendar = $event->getCalendar()) {\n $variables['calendar'] = culturefeed_agenda_parse_calendar($calendar);\n }\n\n if ($event_detail) {\n\n // Link to detail.\n $variables['url'] = culturefeed_search_detail_url($variables['item']->getType(), $event->getCdbid(), $event_detail->getTitle());\n\n // When.\n $variables['when'] = check_plain($event_detail->getCalendarSummary());\n\n }\n\n // Personal calendar buttons.\n if (module_exists('culturefeed_calendar')) {\n $variables['personal_calendar_buttons'] = culturefeed_calendar_render_calendar_buttons($variables['item']);\n }\n}", "function culturefeed_ui_page_top_events_json() {\n\n $sort = variable_get('culturefeed_ui_block_top_events_sort', CultureFeed::TOP_EVENTS_SORT_ACTIVE);\n\n try {\n $events = DrupalCultureFeed::getTopEvents($sort, CULTUREFEED_UI_BLOCK_TOP_EVENTS_COUNT);\n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_ui', $e);\n return;\n }\n\n $items = array();\n\n $events_info = culturefeed_get_nodes_for_cdbids('event', $events);\n\n // Search what top events are liked.\n $user_likes = array();\n $user_goes = array();\n if (DrupalCultureFeed::isCultureFeedUser()) {\n try {\n\n $query = new CultureFeed_SearchActivitiesQuery();\n $query->type = array(CultureFeed_Activity::TYPE_LIKE, CultureFeed_Activity::TYPE_IK_GA,);\n $query->nodeId = $events;\n $query->contentType = CultureFeed_Activity::CONTENT_TYPE_EVENT;\n $query->userId = DrupalCultureFeed::getLoggedInUserId();\n $query->private = TRUE;\n\n $activities = DrupalCultureFeed::searchActivities($query);\n\n foreach ($activities->objects as $activity) {\n if ($activity->type == CultureFeed_Activity::TYPE_LIKE) {\n $user_likes[$activity->nodeId] = TRUE;\n }\n else {\n $user_goes[$activity->nodeId] = TRUE;\n }\n }\n\n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_ui', $e);\n }\n }\n\n $items = array();\n\n foreach ($events as $cdbid) {\n\n if (!isset($events_info[$cdbid])) {\n continue;\n }\n\n $event = $events_info[$cdbid];\n\n $anonymous = '';\n $disable = array();\n if (user_is_anonymous()) {\n $url = 'culturefeed/do/' . CultureFeed_Activity::TYPE_LIKE . '/' . CultureFeed_Activity::CONTENT_TYPE_EVENT . '/' . $cdbid;\n $anonymous = theme('culturefeed_ui_connect_hover', array('url' => $url));\n $disable = array('disable');\n }\n\n if (!isset($user_likes[$cdbid])) {\n\n $positive = array(\n '#type' => 'link',\n '#id' => 'top-like-'. $cdbid,\n '#title' => 'Vind ik leuk',\n '#href' => 'culturefeed/do/' . CultureFeed_Activity::TYPE_LIKE . '/' . CultureFeed_Activity::CONTENT_TYPE_EVENT . '/' . $cdbid . '/noredirect',\n '#attributes' => array('class' => array_merge(array('like-link'), $disable)),\n '#options' => array('query' => drupal_get_destination()),\n '#ajax' => array(\n 'wrapper' => 'rate-' . $cdbid,\n ),\n );\n\n $link = render($positive) . $anonymous;\n }\n else {\n\n $negative = array(\n '#type' => 'link',\n '#id' => 'top-like-'. $cdbid,\n '#title' => 'Niet meer',\n '#href' => 'culturefeed/undo/' . CultureFeed_Activity::TYPE_LIKE . '/' . CultureFeed_Activity::CONTENT_TYPE_EVENT . '/' . $cdbid . '/noredirect',\n '#attributes' => array('class' => array('unlike-link'), 'title' => 'Vind ik niet meer leuk'),\n '#ajax' => array(\n 'wrapper' => 'rate-' . $cdbid,\n ),\n );\n\n $link = render($negative);\n }\n\n $items[] = theme('culturefeed_ui_top_event', array('event' => $event, 'rate_link' => $link));\n\n }\n\n $content = array();\n if (!empty($items)) {\n $content = array(\n '#theme' => 'item_list',\n '#items' => $items,\n '#type' => 'ol',\n '#attributes' => array('class' => 'event-teaser-list'),\n );\n }\n\n $commands = array();\n\n $data = drupal_render($content);\n $commands[] = ajax_command_html('#top-events', $data);\n\n ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));\n\n}", "function get_event_wct($html) {\n\t$event_name = $html->find(\".wctlight\")[0]->plaintext;\n\t//Common Sense check\n\tif (strlen($event_name) <= 3) {\n\t\techo \"\\n\\n*****ERROR: Short Event name found\\n\";\n\t\tpause(\"\");\n\t}\n\t\n\t$event_location = $html->find(\".wctlight\")[1]->plaintext;\n\t//Common Sense check\n\tif (strlen($event_location) <= 3) {\n\t\techo \"\\n\\n****ERROR: Short Event location found*****\\n\\n\";\n\t\tpause(\"\");\n\t}\n\t//Get the event date\n\t$event_date_html = str_replace(\"&nbsp;\", \"\", $html->find(\".wctlight\")[3]->plaintext);\n\t$start_date = get_date_wct($event_date_html, \"start\");\n\t$end_date = get_date_wct($event_date_html, \"end\");\n\t\n\t//Get the event purse\n\t$event_purse = get_purse_wct($html->find(\".wctlight\")[5]->plaintext);\n\t\n\t$event_currency = get_currency_wct($html->find(\".wctlight\")[5]->plaintext);\n\t\n\t$event_gender = get_gender_wct($html);\n\n\treturn new Event($event_location, $start_date, $end_date, $event_purse, $event_currency, $event_name, $event_gender);\n}", "function post() {\n\t\n\t\n\t\tif(! local_channel())\n\t\t\treturn;\n\t\n\t\t$channel = \\App::get_channel();\n\t\n\t\tif((argc() > 2) && (argv(1) === 'complete') && intval(argv(2))) {\n\t\t\t$ret = array('success' => false);\n\t\t\t$r = q(\"select * from event where etype = 'task' and uid = %d and id = %d limit 1\",\n\t\t\t\tintval(local_channel()),\n\t\t\t\tintval(argv(2))\n\t\t\t);\n\t\t\tif($r) {\n\t\t\t\t$event = $r[0];\n\t\t\t\tif($event['event_status'] === 'COMPLETED') {\n\t\t\t\t\t$event['event_status'] = 'IN-PROCESS';\n\t\t\t\t\t$event['event_status_date'] = NULL_DATE;\n\t\t\t\t\t$event['event_percent'] = 0;\n\t\t\t\t\t$event['event_sequence'] = $event['event_sequence'] + 1;\n\t\t\t\t\t$event['edited'] = datetime_convert();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$event['event_status'] = 'COMPLETED';\n\t\t\t\t\t$event['event_status_date'] = datetime_convert();\n\t\t\t\t\t$event['event_percent'] = 100;\n\t\t\t\t\t$event['event_sequence'] = $event['event_sequence'] + 1;\n\t\t\t\t\t$event['edited'] = datetime_convert();\n\t\t\t\t}\n\t\t\t\t$x = event_store_event($event);\n\t\t\t\tif($x)\n\t\t\t\t\t$ret['success'] = true;\n\t\t\t}\n\n\t\t\tjson_return_and_die($ret);\n\t\t}\n\t\n\t\tif(argc() == 2 && argv(1) === 'new') {\n\t\t\t$text = escape_tags(trim($_REQUEST['summary']));\n\t\t\tif(! $text)\n\t\t\t\treturn array('success' => false);\n\t\t\t$event = array();\n\t\t\t$event['account'] = $channel['channel_account_id'];\n\t\t\t$event['uid'] = $channel['channel_id'];\n\t\t\t$event['event_xchan'] = $channel['channel_hash'];\n\t\t\t$event['etype'] = 'task';\n\t\t\t$event['nofinish'] = true;\n\t\t\t$event['created'] = $event['edited'] = $event['dtstart'] = datetime_convert();\n\t\t\t$event['adjust'] = 1;\n\t\t\t$event['allow_cid'] = '<' . $channel['channel_hash'] . '>';\n\t\t\t$event['summary'] = escape_tags($_REQUEST['summary']);\n\t\t\t$x = event_store_event($event);\n\t\t\tif($x)\n\t\t\t\t$x['success'] = true;\n\t\t\telse\n\t\t\t\t$x = array('success' => false);\n\t\t\tjson_return_and_die($x);\n\t\t}\t\n\t}", "function GetEventActivityType()\n\t{\n\t\tif (empty($this->eventactivitytype)) {\n\t\t\treturn array();\n\t\t}\n\n\t\tif (is_array($this->eventactivitytype)) {\n\t\t\treturn $this->eventactivitytype;\n\t\t}\n\n\t\treturn unserialize($this->eventactivitytype);\n\t}", "function wp_localize_community_events()\n {\n }", "public function filter_event() {\n\t\tif ( isset( $_POST['campus'] ) && isset( $_POST['month'] ) && isset( $_POST['year'] ) ) {\n\t\t\tTribeEventsQuery::init();\n\n\t\t\t$event_args = array(\n\t\t\t\t'eventDisplay' => 'upcoming',\n\t\t\t\t'post_type' => 'tribe_events',\n\t\t\t\t'posts_per_page' => 10,\n\t\t\t\t'post_status' => 'publish',\n\t\t\t);\n\n\t\t\tif ( '0' !== $_POST['month'] ) {\n\t\t\t\tif ( (int) $_POST['month'] >= (int) date( 'n' ) ) {\n\t\t\t\t\t$event_args['eventDisplay'] = 'monthly';\n\t\t\t\t} else {\n\t\t\t\t\t$event_args['eventDisplay'] = 'past';\n\t\t\t\t}\n\n\t\t\t\t$startdate = $_POST['year'] .'-'. $_POST['month'] . '-01 01:00:00';\n\t\t\t\tif ( $_POST['month'] === '12' ) {\n\t\t\t\t\t$enddate = $_POST['year'] .'-'. $_POST['month'] . '-31 23:00:00';\n\t\t\t\t} else {\n\t\t\t\t\t$enddate = $_POST['year'] .'-'. ( $_POST['month'] + 1 ) . '-01 01:00:00';\n\t\t\t\t}\n\n\t\t\t\t$event_args['meta_query'] = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key' => '_EventStartDate',\n\t\t\t\t\t\t'value' => $startdate,\n\t\t\t\t\t\t'type' => 'DATETIME',\n\t\t\t\t\t\t'compare' => '>='\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key' => '_EventStartDate',\n\t\t\t\t\t\t'value' => $enddate,\n\t\t\t\t\t\t'type' => 'DATETIME',\n\t\t\t\t\t\t'compare' => '<'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( '0' !== $_POST['campus'] ) {\n\t\t\t\t$event_args['ctrs-campus'] = sanitize_text_field( $_POST['campus'] );\n\t\t\t}\n\n\t\t\tif ( '0' === $_POST['month'] ) {\n\t\t\t\t$event_query = TribeEventsQuery::getEvents( $event_args, true );\n\t\t\t} else {\n\t\t\t\t$event_query = new WP_Query( $event_args );\n\t\t\t}\n\n\t\t\tglobal $wp_query, $post;\n\t\t\t$wp_query = $event_query;\n\t\t\tif ( ! empty( $event_query->posts ) ) {\n\t\t\t\t$post = $event_query->posts[0];\n\t\t\t}\n\n\t\t\tob_start();\n\n\t\t\tif ( have_posts() ) { ?>\n\t\t\t\t<div class=\"events-container\">\n\t\t\t\t\t<!-- Notices -->\n\t\t\t\t\t<?php tribe_events_the_notices() ?>\n\n\t\t\t\t\t<!-- Events Loop -->\n\t\t\t\t\t<?php if ( have_posts() ) : ?>\n\t\t\t\t\t\t<?php do_action( 'tribe_events_before_loop' ); ?>\n\t\t\t\t\t\t<?php tribe_get_template_part( 'list/loop' ) ?>\n\t\t\t\t\t\t<?php do_action( 'tribe_events_after_loop' ); ?>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\t\t\t<?php } else { ?>\n\t\t\t\t<div class=\"tribe-events-notices\"><ul><li>There were no results found.</li></ul></div>\n\t\t\t<?php }\n\n\t\t\t$filtered_events = ob_get_contents();\n\t\t\tob_end_clean();\n\n\t\t\twp_reset_postdata();\n\n\t\t\techo $filtered_events;\n\t\t\tdie();\n\t\t} else {\n\t\t\tdie();\n\t\t}\n\t}", "public function getCustomEventTypeAllowableValues()\n {\n return [\n self::CUSTOM_EVENT_TYPE_ADD_TO_CART,\n self::CUSTOM_EVENT_TYPE_REMOVE_FROM_CART,\n self::CUSTOM_EVENT_TYPE_CHECKOUT,\n self::CUSTOM_EVENT_TYPE_CHECKOUT_OPTION,\n self::CUSTOM_EVENT_TYPE_CLICK,\n self::CUSTOM_EVENT_TYPE_VIEW_DETAIL,\n self::CUSTOM_EVENT_TYPE_PURCHASE,\n self::CUSTOM_EVENT_TYPE_REFUND,\n self::CUSTOM_EVENT_TYPE_PROMOTION_VIEW,\n self::CUSTOM_EVENT_TYPE_PROMOTION_CLICK,\n self::CUSTOM_EVENT_TYPE_ADD_TO_WISHLIST,\n self::CUSTOM_EVENT_TYPE_REMOVE_FROM_WISHLIST,\n self::CUSTOM_EVENT_TYPE_IMPRESSION,\n ];\n }", "function getFromPost() {\r\n\t\t\r\n\t\t//Event Page variables.\r\n\t\t$this->name = $_POST['eventName'];\r\n\t\t$this->date = $_POST['eventDate'];\r\n\t\t$this->time = $_POST['eventTime'];\r\n\t\t$this->time_before = $_POST['time_before'];\r\n\t\t$this->freq = $_POST['frequency'];\r\n\t\t$this->notif_method = $_POST['method'];\r\n\t}", "function culturefeed_agenda_preprocess_culturefeed_event(&$variables) {\n\n _culturefeed_agenda_preprocess_agenda($variables);\n _culturefeed_agenda_preprocess_event($variables);\n _culturefeed_agenda_preprocess_agenda_detail($variables);\n\n _culturefeed_agenda_preprocess_event_production_metatags($variables);\n}", "function setEventType() // OK\n {\n }", "function get_past_event_view_url($view) {\n $display = $view->current_display;\n $parameters = $view->getUrl()->getRouteParameters();\n\n switch ($display) {\n // Set the past events link for a topic filtered display.\n case 'page_3': // Event topic display\n case 'page_5': // Past topic display\n return Url::fromRoute('view.events.page_5', $parameters)->toString();\n\n // Set the past events link for a department filtered display.\n case 'page_4': // Event department display\n case 'page_6': // Past department display\n return Url::fromRoute('view.events.page_6', $parameters)->toString();\n\n // Set the past events link for the all events display.\n case 'page_1': // Event all display\n case 'page_2': // Past all display\n default:\n return '/past-events';\n }\n}", "public static function events();", "function entry_api_ui_event_form_submit($form, &$form_state) {\n\n if ($form_state['#update_event']) {\n $form_state['redirect'] = culturefeed_search_detail_url('event', $form_state['#event_id'], $form_state['values']['title']);\n drupal_set_message('De activiteit werd aangepast. Het duurt echter een half uur eer het\n op alle kanalen (inclusief UitinVlaanderen) beschikbaar zal zijn. ');\n }\n else {\n $link_change_event = '<a href=\"/entryapi/event/' . $form_state['#event_id'] . '/edit\">Klik hier om het event aan te passen</a>';\n drupal_set_message('De activiteit werd toegevoegd. Het duurt echter een half uur eer het\n op alle kanalen (inclusief UitinVlaanderen) beschikbaar zal zijn. ' . $link_change_event);\n }\n\n}", "function eventclass_student_attendance()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "public function getPastEvents(){\n\t\t// get the events\n\t\t$events = $this->getEvents();\n\n\t\t$pastEvents = [];\n\t\t$eventNumber = sizeof($events);\n\n\t\t// extracts the events which has not happened yet, which date is not passed\n\t\tfor ($i = 0; $i < $eventNumber; $i++){\n\t\t\t$event = array_shift($events);\n\t\t\tif($event['is_approved'] == 1 && $event['date'] < date('Y-m-d')){\n\t\t\t\tarray_push($pastEvents, $event);\n\t\t\t}\n\t\t}\n\n\t\treturn $pastEvents;\n\t}", "function block_core_calendar_update_has_published_post_on_transition_post_status($new_status, $old_status, $post)\n {\n }", "public function getTypeEvt(): ?string {\n return $this->typeEvt;\n }", "public function getEventTypeAllowableValues()\r\n {\r\n return [\r\n self::EVENT_TYPE__DEFAULT,\r\n ];\r\n }", "public function Upcoming() {\n return $this->get_all_events( 'start_date', 'ASC', true );\n }", "private function parserEventJson($jsonevent)\n {\n $event=null;\n //convert to php object\n $php_object = json_decode($jsonevent); \n if($php_object!=null){\n \n $event= new Event($php_object->CreatorId, $php_object->Title,$php_object->Venue,$php_object->privacy);\n $event->setCurrencyCountry($php_object->current_country);\n $event->setSearchableKeywords($php_object->search_keywords);\n $event->setFees($php_object->fees);\n $event->setCurrencyCountry( $php_object->current_country);\n $event->setCurrencyCountry( $php_object->current_country);\n $event->setDescription($php_object->Description);\n $event->setStartDate($php_object->StartDate);\n $event->setGoing($php_object->going); \n \n }\n \n return $event; \n }", "function add_event($input = array()) {\r\n \r\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\r\n \r\n // check if user is logged in\r\n if (!isset($_SESSION['active']) || $_SESSION['active'] === false) {\r\n header(\"location: \" . $_SERVER['PHP_SELF'] . \"?action=login&error=err_login_to_add_event\");\r\n return;\r\n }\r\n \r\n require(HOME_DIR . 'libs/event.class.php');\r\n $event = new event;\r\n \r\n\r\n $event->creator_id = $_SESSION['user_id'];\r\n // check if title is empty\r\n if (empty($input['title'])) {\r\n $this->tpl->assign('ERROR_TITLE', 'err_title_empty');\r\n return;\r\n }\r\n $event->title = $input['title'];\r\n \r\n // check description\r\n if (empty($input['description'])) {\r\n $this->tpl->assign('ERROR_DESCRIPTION', 'err_description_empty');\r\n return;\r\n }\r\n $event->description = $input['description'];\r\n\r\n // check label\r\n $label = $input['label'];\r\n $label = json_decode($label);\r\n $event->label = $label;\r\n \r\n // check date\r\n $event->fixed_date = isset($input['fixed_date']) ? 1 : 0;\r\n $event->start_date = date('Y-m-d', mktime($input['start_date']));\r\n $event->start_time = date('h:i', mktime($input['start_time']));\r\n\r\n // check location\r\n $event->fixed_location = isset($input['fixed_location']) ? 1 : 0;;\r\n \r\n // handle number of participants\r\n $event->limited_number_of_participants = isset($input['limited_number_of_participants']) ? 1 : 0;\r\n $event->max_number_of_participants = $input['max_number_of_participants'];\r\n \r\n // handle reservations\r\n $event->advance_reservation_required = isset($input['advance_reservation_required']) ? 1 : 0; \r\n $event->confirm_reservations = isset($input['advance_reservation_required']) && isset($input['confirm_reservations']) ? 1 : 0;\r\n\r\n $event->insert_into_db();\r\n header(\"location: \" . $_SERVER['PHP_SELF'] . \"?action=dashboard&message=event_successfully_created\"); \r\n } \r\n }", "function fh_augment_events_query($query)\r\r\n{\r\r\n\tif((($query->is_post_type_archive && $query->query['post_type'] == \"event\")\r\r\n\t\t\t|| ($query->is_archive && isset($query->query[\"event_categories\"])))\r\r\n\t\t&& (\r\r\n\t\t\t!is_admin() \r\r\n\t\t\t|| isset($query->query[\"event_filter\"]))\r\r\n\t\t)\r\r\n\t{\r\r\n\t\t// Modify the query to support comparison against current date\r\r\n\t\t$today = strtotime(date(\"Y-m-d\"));\r\r\n\t\t$tomorrow = ($today + (3600 * 24) - 1) . \"000\"; // One second shy of 24 hrs later...\r\r\n\t\t$today = $today . \"000\";\r\r\n\r\r\n\t\t$start_default = time();\r\r\n\t\tif(isset($query->query_vars[\"start_date\"]) && is_numeric($query->query_vars[\"start_date\"]))\r\r\n\t\t{\r\r\n\t\t\t$start_default = $query->query_vars[\"start_date\"];\r\r\n\t\t}\r\r\n\r\r\n\t\t$end_default = $start_default;\r\r\n\t\tif(isset($query->query_vars[\"end_date\"]) && is_numeric($query->query_vars[\"end_date\"]))\r\r\n\t\t{\r\r\n\t\t\t$end_default = $query->query_vars[\"end_date\"];\r\r\n\t\t}\r\r\n\r\r\n\t\t$first_of_month = strtotime(date(\"Y-m\", $start_default) . \"-01\");\r\r\n\t\tif(intval(date(\"m\", $start_default)) == 12)\r\r\n\t\t{\r\r\n\t\t\t$first_next_month = strtotime((date(\"Y\", $start_default) + 1) . \"-01-01\");\r\r\n\t\t}\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\t$first_next_month = strtotime(date(\"Y-\", $start_default) . (date(\"m\", $start_default) + 1) . \"-01\");\r\r\n\t\t}\r\r\n\r\r\n\t\t// \"upcoming\" is the default filter for the events archive:\r\r\n\t\tif((!isset($query->query['event_filter']) && !is_admin()) || (isset($query->query['event_filter']) && $query->query['event_filter'] == \"upcoming\"))\r\r\n\t\t{\r\r\n\t\t\t$meta_query = array(\r\r\n\t\t\t\t'relation' => 'OR',\r\r\n\t\t\t\tarray(\r\r\n\t\t\t\t\t'key' => slt_cf_field_key(\"event_date\"),\r\r\n\t\t\t\t\t'value' => $today,\r\r\n\t\t\t\t\t'type' => \"NUMERIC\",\r\r\n\t\t\t\t\t'compare' => '>='\r\r\n\t\t\t\t),\r\r\n\t\t\t\tarray(\r\r\n\t\t\t\t\t'key' => slt_cf_field_key(\"end_date\"),\r\r\n\t\t\t\t\t'value' => $today,\r\r\n\t\t\t\t\t'type' => \"NUMERIC\",\r\r\n\t\t\t\t\t'compare' => '>='\r\r\n\t\t\t\t)\r\r\n\t\t\t);\r\r\n\t\t\t$query->query_vars['meta_query'] = $meta_query;\r\r\n\t\t\t// Affect our sort order here:\r\r\n\t\t\tadd_filter('posts_clauses', \"fh_events_posts_clauses\");\r\r\n\t\t}\r\r\n\t\telse if($query->query['event_filter'] == \"month\")\r\r\n\t\t{\r\r\n\t\t\t// Prepare some parameters for use:\r\r\n\t\t\t$query->query_vars[\"_search_start\"] = $first_of_month;\r\r\n\t\t\t$query->query_vars[\"_search_end\"] = $first_next_month;\r\r\n\r\r\n\t\t\t// Getting a bit more aggressive here. Going to completely modify the WHERE and JOIN clauses.\r\r\n\t\t\tadd_filter(\"posts_clauses\", \"fh_events_search_clauses\", 10, 2);\r\r\n\t\t}\r\r\n\t\telse if($query->query['event_filter'] == \"range\")\r\r\n\t\t{\r\r\n\t\t\t$start_date = time();\r\r\n\t\t\tif(isset($query->query_vars[\"start_date\"]) && is_numeric($query->query_vars[\"start_date\"]))\r\r\n\t\t\t{\r\r\n\t\t\t\t$start_date = $query->query_vars[\"start_date\"];\r\r\n\t\t\t}\r\r\n\t\t\t$end_date = $start_date;\r\r\n\t\t\tif(isset($query->query_vars[\"end_date\"]) && is_numeric($query->query_vars[\"end_date\"]))\r\r\n\t\t\t{\r\r\n\t\t\t\t$end_date = $query->query_vars[\"end_date\"];\r\r\n\t\t\t\tif($end_date <= $start_date)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$end_date = $start_date;\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t// Temporary fix: add a day, minus a second, to the end date to get through the day:\r\r\n\t\t\t$end_date += (24*3600) - 1;\r\r\n\r\r\n\t\t\t$query->query_vars[\"_search_start\"] = $start_date;\r\r\n\t\t\t$query->query_vars[\"_search_end\"] = $end_date;\r\r\n\r\r\n\t\t\t// Getting a bit more aggressive here. Going to completely modify the WHERE and JOIN clauses.\r\r\n\t\t\tadd_filter(\"posts_clauses\", \"fh_events_search_clauses\", 10, 2);\r\r\n\t\t}\r\r\n\t}\r\r\n}", "function sort_events( $vars ) {\n\n\t\t// Check if we're viewing the 'event' post type.\n\t\tif ( isset( $vars['post_type'] ) && 'event' == $vars['post_type'] ) {\n\n\t\t\t// Check if 'orderby' is set to 'recurring'.\n\t\t\tif ( isset( $vars['orderby'] ) && 'recurring' == $vars['orderby'] ) {\n\n\t\t\t\t// Merge the query vars with our custom variables.\n\t\t\t\t$vars = array_merge(\n\t\t\t\t\t$vars,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'meta_key' => 'be_recurring_event',\n\t\t\t\t\t\t'orderby' => 'meta_value_num',\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $vars;\n\t}", "public function getEventTypeAllowableValues()\n {\n return [\n self::EVENT_TYPE_CREDIT_CARD,\n self::EVENT_TYPE_CASH,\n self::EVENT_TYPE_THIRD_PARTY_CARD,\n self::EVENT_TYPE_NO_SALE,\n self::EVENT_TYPE_SQUARE_WALLET,\n self::EVENT_TYPE_SQUARE_GIFT_CARD,\n self::EVENT_TYPE_UNKNOWN,\n self::EVENT_TYPE_OTHER,\n ];\n }", "public function getTriggeringEvents();", "public function event($event_type, $name, $description, $date, $time, $mandal, $village, $mobile, $mobile2, $content, $status)\n\t{\n\n\t\t$queryGetMandal = mysql_fetch_assoc(mysql_query(\"select *from mandalmaster where mandalid='$mandal'\"));\n\t\t$queryGetVillage = mysql_fetch_assoc(mysql_query(\"select *from villagemaster where mandalid='$mandal'\"));\n\n\t\t$mandalName = $queryGetMandal['mandalname'];\n\t\t$villageName = $queryGetVillage['villagename'];\n\t\tif ($status == 'yes')\n\t\t{\n\t\t\t$query = \"INSERT INTO events(event_type, event_name, event_description, constituency, mandal, village, phone, phone2, sms_content, date, time, status, doc) VALUES ('\" . $event_type . \"','\" . $name . \"','\" . $description . \"', '\" . $constituency . \"', '\" . $mandalName . \"','\" . $villageName . \"','\" . $mobile . \"','\" . $mobile2 . \"','\" . $content . \"','\" . $date . \"','\" . $time . \"','\" . $status . \"', NOW())\";\n\t\t\t$result2 = mysql_query($query) or die(mysql_error());\n\t\t} else\n\t\t{\n\t\t\t$query = \"INSERT INTO events(event_type, event_name, event_description, constituency, mandal, village, phone, phone2, sms_content, date, time, status, doc) VALUES ('\" . $event_type . \"','\" . $name . \"','\" . $description . \"','\" . $constituency . \"','\" . $mandalName . \"','\" . $villageName . \"','\" . $mobile . \"','\" . $mobile2 . \"','\" . $content . \"','\" . $date . \"','\" . $time . \"','\" . $status . \"', NOW())\";\n\t\t\t$result2 = mysql_query($query) or die(mysql_error());\n\n\t\t\t$smsUrl = \"http://alerts.smssolutions.in/api/web2sms.php\";\n\t\t\t$apiKey = \"4143fcjtx1o4400a9476\";\n\t\t\t$senderId = \"VMNRES\";\n\t\t\t$mobileNumber = $mobile;\n\t\t\t$message = $content;\n\t\t\t$dlr_url = \"\";\n\t\t\t$type = \"xml\";\n\n\t\t\t$sendsms = new sendsms($smsUrl, $apiKey, $senderId);\n\t\t\t$timeZone = explode($time);\n\t\t\t$hours = $timeZone[0];\n\t\t\t$minutes = $timeZone[1];\n\n\t\t\tif ($minutes <= 15)\n\t\t\t{\n\t\t\t\t$min = 15;\n\t\t\t} elseif ($minutes >= 15 and $minutes <= 30)\n\t\t\t{\n\t\t\t\t$min = 30;\n\t\t\t} elseif ($minutes >= 30 and $minutes <= 45)\n\t\t\t{\n\t\t\t\t$min = 45;\n\t\t\t} elseif ($minutes >= 30 and $minutes <= 59)\n\t\t\t{\n\t\t\t\t$min = 00;\n\t\t\t}\n\t\t\t$time = \"$hours$min\";\n\t\t\t$smsDate = str_replace(\"-\", \"\", date(\"d-m-Y\", strtotime($date)));\n\t\t\t$smsDateTime = \"$smsDate$time\";\n\t\t\t//$sms=$sendsms->send_sms($mobileNumber, $message, $dlr_url, $type);\n\t\t\t$sendsms -> schedule_sms($mobileNumber, $message, $dlr_url, $type, $smsDateTime);\n\t\t}\n\t\treturn $result2;\n\t}", "public function givenAPublished($event);", "public function event()\n {\n switch ($this->status_changed) {\n case \"in_progress\":\n return \"set to In Progress\";\n case \"completed\":\n return \"closed\";\n case \"submitted\":\n return \"reopened\";\n }\n }", "public function get_event_list()\n\t{\n\treturn $this->cal['VEVENT'];\n\t}", "private function _valid_event_type($event_type=NULL){\n\t\tif(!empty($event_type)){\n\t\t\tif ($event_type == Minematic_Connector_Model_Config::EVENT_TYPE_ALL ||\n\t\t\t\t$event_type == Minematic_Connector_Model_Config::EVENT_TYPE_PAID || \n\t\t\t\t$event_type == Minematic_Connector_Model_Config::EVENT_TYPE_OTHERS){\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "function event__add_edit_event($type, $event, $id = null)\n {\n $_next_day = date('n/j/Y', strtotime($event['start_date'] . ' +1 day'));\n if (empty($event['end_date']))\n {\n if (empty($event['end_time']))\n {\n $event['end_date'] = (empty($event['start_time']) ? $_next_day : $event['start_date']);\n }\n else\n {\n $event['end_date'] = $event['start_date'];\n }\n }\n if (empty($event['start_time'])) $event['start_time'] = '12 am';\n if (empty($event['end_time'])) $event['end_time'] = $event['start_time'];\n\n // Manipulate dates based on checkbox states\n if (!empty($event['no_end_date']))\n {\n $event['end_date'] = (!empty($event['all_day_event']) ? $_next_day : $event['start_date']);\n $event['end_time'] = $event['start_time'];\n }\n elseif (!empty($event['all_day_event']))\n {\n $event['end_date'] = (!empty($event['end_date']) ? $event['end_date'] : $_next_day);\n $event['end_time'] = '12 am';\n }\n $event['date_start'] = date('Y-m-d H:i:s', strtotime($event['start_date'] . ' ' . $event['start_time']));\n $event['date_end'] = date('Y-m-d H:i:s', strtotime($event['end_date'] . ' ' . $event['end_time']));\n unset($event['start_date']);\n unset($event['start_time']);\n unset($event['end_date']);\n unset($event['end_time']);\n\n // Correct for blank latitude/longitude\n if (empty($event['latitude'])) $event['latitude'] = null;\n if (empty($event['longitude'])) $event['longitude'] = null;\n\n // Change '-' to null\n if ($event['status'] == '-') $event['status'] = null;\n\n // Add recordkeeping fields\n $event['date_last_updated'] = date('Y-m-d H:i:s');\n $event['last_updated_by'] = $this->session->userdata('member_id');\n\n // Initialize return variable (null for calls as void function)\n $return = null;\n\n // Determine database calls and some event values based on type\n switch ($type)\n {\n case 'edit':\n // Boolean fields\n if (empty($event['all_day_event'])) $event['all_day_event'] = 0;\n if (empty($event['multiday_event'])) $event['multiday_event'] = 0;\n if (empty($event['rsvp_only'])) $event['rsvp_only'] = 0;\n if (empty($event['hide_address'])) $event['hide_address'] = 0;\n\n // Update event in database\n $this->db->where('id', $id);\n $this->db->update('events', $event);\n\n break;\n case 'add':\n default:\n // Creation recordkeeping\n $event['date_added'] = date('Y-m-d H:i:s');\n $event['added_by'] = $this->session->userdata('member_id');\n\n // Add slug\n $event['slug'] = url_title($event['name'], '-', true);\n\n // Add event to database\n $this->db->insert('events', $event);\n\n // Set return variable to insert ID\n $return = $this->db->insert_id();\n\n break;\n }\n\n // Return insert ID\n return $return;\n }", "public function viewEvents();", "function wp_print_community_events_markup()\n {\n }", "function submitted_events_create_event($submission) {\n\t// first determine if this is a walk or not\n\t$level = submitted_events_walk_level ( $submission );\n\tif ($level === 'Social' || $level === 'Other') {\n\t\tsubmitted_events_create_non_walk ( $submission, $level );\n\t} else {\n\t\tsubmitted_events_create_walk ( $submission, $level );\n\t}\n\t\n\t// Set eventgenerated to TRUE in the database\n\tglobal $wpdb;\n\t$table_name = $wpdb->prefix . \"submitted_events\";\n\t$result = $wpdb->update ( $table_name, array (\n\t\t\t'eventgenerated' => 1 \n\t), array (\n\t\t\t'ID' => $submission->id \n\t), array (\n\t\t\t'%d' \n\t), array (\n\t\t\t'%d' \n\t) );\n\t// echo $submission->id . ' result = ' . $result;\n}", "function be_event_query( $query ) {\n\n if ( $query->is_main_query() && ! is_admin() && is_post_type_archive( 'rns_event' ) ) {\n // Begin with the next upcoming event, and go into the future\n $meta_query = array(\n array(\n 'key' => '_rns_event_starts',\n 'value' => strtotime( 'today ' . get_option( 'timezone_string' ) ),\n 'compare' => '>'\n )\n );\n $query->set( 'meta_query', $meta_query );\n $query->set( 'orderby', 'meta_value_num' );\n $query->set( 'meta_key', '_rns_event_starts' );\n $query->set( 'order', 'asc' );\n }\n\n}", "public function createEventPast(Person $changePerson, $oldEvent, Event $newEvent, $eventChangeType)\n {\n $eventPast = new EventPast();\n $eventPast->setEvent($newEvent);\n $eventPast->setBeforeEventJson(null !== $oldEvent ? $oldEvent->createJson() : '');\n $eventPast->setAfterEventJson($newEvent->createJson());\n $eventPast->setChangedAtDateTime(new \\DateTime());\n $eventPast->setEventChangeType($eventChangeType);\n $eventPast->setChangedByPerson($changePerson);\n\n return $eventPast;\n }", "public static function getEntityTypeEvents() {\n $event = ['onEntityTypeEvent', 100];\n $events[EntityTypeEvents::CREATE][] = $event;\n $events[EntityTypeEvents::UPDATE][] = $event;\n $events[EntityTypeEvents::DELETE][] = $event;\n return $events;\n }", "public function getEventType()\n {\n return EventType::TRANSFER_CREATED;\n }", "function hookAjaxGetEvents() {\n\n\t \t$start = intval($_POST['start']);\n\t \t$end = intval($_POST['end']);\n\n\t \t$args['datefrom'] = $start;\n\t \t$args['dateto'] = $end;\n\t \t$args['datemode'] = FSE_DATE_MODE_ALL;\n\t \t$args['number'] = 0; // Do not limit!\n\n\t \tif (isset($_POST['state']))\n\t \t$args['state'] = $_POST['state'];\n\t \tif (isset($_POST['author']))\n\t \t$args['author'] = $_POST['author'];\n\t \tif (isset($_POST['categories']))\n\t \t$args['categories'] = $_POST['categories'];\n\t \tif (isset($_POST['include']))\n\t \t$args['include'] = $_POST['include'];\n\t \tif (isset($_POST['exclude']))\n\t \t$args['exclude'] = $_POST['exclude'];\n\t \t$events = $this->getEventsExternal($args);\n\n\t \t// Process array of events\n\t \t$events_out = array();\n\t \tforeach($events as $evt) {\n\t \t\tunset($e);\n\t \t\t$e['id'] = $evt->eventid;\n\t \t\t$e['post_id'] = $evt->postid;\n\t \t\t$e['post_url'] = (empty($evt->postid) ? '' : get_permalink($evt->postid));\n\t \t\t$e['title'] = $evt->subject;\n\t \t\t$e['allDay'] = ($evt->allday == true ? true : false);\n\t \t\t$e['start'] = mysql2date('c', $evt->from);\n\t \t\t$e['end'] = mysql2date('c', $evt->to);\n\t \t\t$e['editable'] = false;\n\n\t \t\t$classes = array();\n\t \t\tforeach($evt->categories as $c) {\n\t \t\t\t$classes[] = 'category-'.$c;\n\t \t\t}\n\t \t\tif (count($classes) > 0) {\n\t \t\t\t$e['className'] = $classes;\n\t \t\t}\n\t \t\t\n\t \t\t$events_out[] = $e;\n\t \t}\n\n\t \t$response = json_encode($events_out);\n\n\t \theader(\"Content-Type: application/json\");\n\t \techo $response;\n\n\t \texit;\n\t }", "function getAllEvents() {\n\n $this->events = $this->getEvents();\n //If plugin adds new events for an already defined type\n Plugin::doHook('item_get_events', $this);\n\n return $this->events;\n }", "public function getEventTypes()\n {\n return $this->event_types;\n }", "function getPublishChangeEvents() {\n\t\treturn array('updateSidebar');\n\t}" ]
[ "0.6361297", "0.62281877", "0.60921997", "0.60668045", "0.5946989", "0.59179974", "0.5813758", "0.57842225", "0.57714874", "0.57533926", "0.57045645", "0.56834346", "0.56805813", "0.56698024", "0.5590879", "0.55824906", "0.55646247", "0.5562858", "0.55625516", "0.55597866", "0.55495316", "0.55465007", "0.55315346", "0.55298936", "0.55007726", "0.54724675", "0.546759", "0.5458798", "0.5451852", "0.544445", "0.54418695", "0.5437404", "0.54243064", "0.54222393", "0.5416591", "0.54097986", "0.5393122", "0.5391669", "0.5382235", "0.5374821", "0.5359625", "0.53556174", "0.5343699", "0.5342951", "0.5318115", "0.5317", "0.5305736", "0.5301351", "0.5298848", "0.52882147", "0.5276803", "0.52725405", "0.5271332", "0.52577525", "0.5249977", "0.52411973", "0.52373654", "0.5229804", "0.5229483", "0.5226533", "0.51928216", "0.5192587", "0.51832944", "0.51824737", "0.5172467", "0.51532835", "0.51404524", "0.51338655", "0.513091", "0.5122834", "0.5122622", "0.5119474", "0.51175934", "0.51169366", "0.5116672", "0.5106802", "0.5104948", "0.5093553", "0.5087766", "0.5086143", "0.50645655", "0.506421", "0.5061341", "0.5057747", "0.5057624", "0.5055748", "0.5050115", "0.50454634", "0.50426286", "0.50371534", "0.50304925", "0.50282425", "0.5026344", "0.50254303", "0.50155854", "0.50146973", "0.50139636", "0.5013426", "0.50091976", "0.5008024", "0.49989393" ]
0.0
-1
cancel action: take user to main screen
public function handleCancel() { // logit('HC: ' . print_r($this->data, true)); if ($this->data['submit_button'] == 'Cancel') { $this->data = array(); $this->error = array(); $this->_redirector->gotoUrl($this->mainpage); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cancel() {\r\n\t\t$this->setRedirect ( 'index.php' );\r\n\t}", "function cancel() {\n\n\t\tif (KRequest::getVar('return')) {\n\t\t\t$url = KLink::base64UrlDecode(KRequest::getVar('return'));\n\t\t}\n\t\telse {\n\t\t\t$controllerName = KenedoController::getControllerNameFromClass(get_class($this));\n\t\t\t$url = KLink::getRoute('index.php?option='.$this->component.'&controller='.$controllerName, false);\n\t\t}\n\n\t\t$this->setRedirect($url);\n\n\t}", "public function cancel();", "public function cancelAction()\n\t{\n\t\t$this->_redirect('checkout/onepage/failure');\n\t}", "public function actionCancel()\n {\n $this->render('cancel');\n }", "public function actionCancel()\n {\n }", "public function cancel(): void;", "public function cancel()\n {\n }", "public function cancel()\n {\n }", "public function cancelAction() \n {\n \t\t$tblVote = Facebook_Vote::Table();\n\t\t$objSession = new App_Session_Namespace( 'facebook' );\n\t\t\n\t\tif ( is_object( $objSession )) {\n\t\t\t$nUserId = $objSession->user->fbu_id;\n\t\t\t$nVoteId = $this->_getIntParam( 'fbv_vote_id', 1 );\n\t\t\t\n\t\t\t$objVote = $tblVote->findVote( $nUserId, $nVoteId );\n\t\t\tif ( is_object( $objVote ) ) {\n \t\t\t\t$objVote->delete();\n\t\t\t}\n\t\t}\n\t\t$this->view->return = $this->_getParam( 'return' );\n }", "function cancel($key=null)\n\t{\n\t\t$this->setRedirect( 'index.php' );\n\t}", "public function cancel()\n\t{\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\t\t$this->setRedirect('index.php');\n\t}", "protected function cancel(): void\n {\n }", "public function cancel()\n {\n $this->resetInput();\n $this->updateMode = false;\n }", "public function cancelled()\n {\n \n $this->alert('info', 'Understood');\n }", "public function cancelled()\n {\n \n $this->alert('info', 'Understood');\n }", "public function cancel()\n\t{\n\t\t// Initialize variables.\n\t\t$app = &JFactory::getApplication();\n\n\t\t// Clear the user edit information from the session.\n\t\t$app->setUserState('com_users.edit.user.id', null);\n\t\t$app->setUserState('com_users.edit.user.data', null);\n\n\t\t// Redirect to the list screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users&view=users', false));\n\t}", "function cancel()\n\t{\n\t\t// Initialize variables.\n\t\t$app = & JFactory::getApplication();\n\n\t\t// Clear the link id from the session.\n\t\t$app->setUserState('redirect.edit.link.id', null);\n\n\t\t// Redirect to the list screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=links', false));\n\t}", "public function cancelAction() \n {\n if (Mage::getEdition() == Mage::EDITION_ENTERPRISE) {\n $this->helper()->storeCreditSessionUnset();\n $this->helper()->giftCardsSessionUnset();\n }\n\n $this->_redirect('checkout/cart');\n }", "function cancel()\n\t{\n\t\t// Initialize some variables\n\t\t$db = & JFactory::getDBO();\n\t\t$user = & JFactory::getUser();\n\n\t\t// Get an article table object and bind post variabes to it [We don't need a full model here]\n\t\t$article = & JTable::getInstance( 'content' );\n\t\t$article->bind( JRequest::get( 'post' ) );\n\n\t\tif ( $user->authorize( 'com_content', 'edit', 'content', 'all' ) || ($user->authorize( 'com_content', 'edit', 'content', 'own' ) && $article->created_by == $user->get( 'id' )) )\n\t\t{\n\t\t\t$article->checkin();\n\t\t}\n\n\t\t// If the task was edit or cancel, we go back to the content item\n\t\t$referer = JRequest::getString( 'ret', base64_encode( JURI::base() ), 'get' );\n\t\t$referer = base64_decode( $referer );\n\t\tif ( !JURI::isInternal( $referer ) )\n\t\t{\n\t\t\t$referer = '';\n\t\t}\n\t\t$this->setRedirect( $referer );\n\n\t}", "function cancel() \r\n\t\t{\r\n\t $msg = JText::_('COM_QRCODE_CANCEL');\r\n\t $this->setRedirect(JRoute::_('index.php?option=com_qrcode', false), $msg);\r\n\t }", "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "function cancelUser( $option ) {\r\n\tmosRedirect( 'index2.php?ca='. $option .'&task=view' );\r\n}", "public function cancel()\n\t{\n\t\t$option = JRequest::getVar('option');\n\t\t$Itemid = JRequest::getVar('Itemid');\n\n\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&Itemid=' . $Itemid, false); ?>\n\t\t<script language=\"javascript\">\n\t\t\twindow.parent.location.href = \"<?php echo $link ?>\";\n\t\t</script>\n\t\t<?php exit;\n\t}", "public function cancel()\n {\n $this->confirmationArchived = false;\n }", "function cancel()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t// Checkin the weblink\n\t\t$model = $this->getModel('weblink');\n\t\t$model->checkin();\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "function cancel()\n\t{\n\t\tif ($_GET[\"obj_id\"] != 0)\n\t\t{\n\t\t\tif ($_GET[\"new_type\"] == \"pg\")\n\t\t\t{\n\t\t\t\t$this->ctrl->redirect($this, \"view\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ctrl->redirect($this, \"subchap\");\n\t\t\t}\n\t\t}\n\t}", "public function cancel()\r\n\t{\r\n\t\t// Check for request forgeries\r\n\t\tJRequest::checkToken() or die( 'Invalid Token' );\r\n\t\t\r\n\t\t$this->setRedirect( 'index.php?option=com_joomfish' );\r\n\t}", "public function massCancelAction()\n {\n $this->_ratepayMassEvent('cancel');\n \n $this->_redirect('*/*/index');\n }", "function cancel()\n\t{\n\t\t// Get some objects from the JApplication\n\t\t$user\t= & JFactory::getUser();\n\n\t\t// Must be logged in\n\t\tif ($user->get('id') < 1) {\n\t\t\tJError::raiseError(403, JText::_('ALERTNOTAUTH'));\n\t\t\treturn;\n\t\t}\n\n\t\t// Checkin the weblink\n\t\t$model = $this->getModel('weblink');\n\t\t$model->checkin();\n\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_weblinks&view=categories', false));\n\t}", "public function cancelAction() {\n\n return $this->_redirect('/order_basis/payment');\n }", "public function cancel()\n {\n $user = Auth::user();\n\n if ( $user->cancel_rank() )\n flash('Your place request was canceled.')->success()->important();\n\n if ( $user->cancel_place() )\n flash('Your place as been removed.')->success()->important();\n\n return redirect()->back();\n }", "public function cancel(): int;", "function cancelsettings()\r\n {\r\n $this->setRedirect('index.php?option=com_jfusionconnect&view=cpanel', $msg, $msgType);\r\n }", "public function abortDuel(){\n $this->plugin->getScheduler()->cancelTask($this->countdownTaskHandler->getTaskId());\n }", "public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect($this->getReturnPage());\n\t}", "public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect($this->getReturnPage());\n\t}", "public function cancelAction()\n {\n $event = Mage::getModel('payanyway/event')\n ->setEventData($this->getRequest()->getParams());\n $message = $event->cancelEvent();\n\n // set quote to active\n $session = $this->_getCheckout();\n if ($quoteId = $session->getPayanywayQuoteId()) {\n $quote = Mage::getModel('sales/quote')->load($quoteId);\n if ($quote->getId()) {\n $quote->setIsActive(true)->save();\n $session->setQuoteId($quoteId);\n }\n }\n $session->addError($message);\n $this->_redirect('checkout/cart');\n }", "function cancelar()\r\n\t{\r\n\t\t$this->_log->debug( $this->get_txt() . \"[ cancelar ]\", 'toba');\r\n\t\t$this->limpiar_memoria();\r\n\t}", "public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect(JRoute::_($this->getReturnPage()));\n\t}", "function handleCancelProgramItemSelector(EventContext $context)\n {\n $context->setForward(dirname(__FILE__) . \"/index.php\");\n }", "public function cancel() {\n\t\t$this->workflowActivitySpecification->setState(WorkflowActivityStateEnum::CANCELLED);\n\n\t\tif ($this->runtimeContext)\n\t\t\t$this->workflowActivity->onCancel($this->runtimeContext);\n\t}", "public function cancelAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId($session->getPaypalStandardQuoteId(true));\n\n $this->_redirect('checkout/cart');\n }", "public function cancelEdit($data) {\n\t\t\n\t\t// Redirect back to the edit page\n\t\treturn $this->redirect(\"budgeting/edit\");\n\t}", "protected function cancelEdit()\n {\n if ($this->backup == NULL && $this->current) {\n $this->plugins[$this->current] = new $this->current($this->dn, $this);\n $this->plugins[$this->current]->set_acl_base($this->acl_base);\n $this->plugins[$this->current]->set_acl_category(preg_replace(\"/\\/$/\", \"\", $this->acl_category));\n\n } elseif (is_array($this->backup)) {\n foreach ($this->backup as $name => $value) {\n $this->plugins[$this->current]->$name = $value;\n }\n }\n $this->backup = NULL;\n $this->current = \"\";\n $this->closeDialogs();\n }", "public function abortAction()\n {\n /** @var $session Mage_Checkout_Model_Session */\n $session = Mage::getSingleton('checkout/session');\n $order = Mage::getModel('sales/order');\n\n try {\n /** @var $order Mage_Sales_Model_Order */\n\n $order->loadByIncrementId($session->getLastRealOrderId());\n $order->addStatusHistoryComment('Customer cancelled the payment',false);\n\n if (!$order->getId()) {\n Mage::throwException('No order for processing found');\n }\n if($order->canCancel()) {\n $order->cancel()->save();\n }\n } catch (Exception $e) {\n\n }\n\n $quote = Mage::getSingleton('sales/quote');\n $quote->load($order->getQuoteId());\n $session->setQuoteId($order->getQuoteId());\n $session->getQuote()->setIsActive(1)->save();\n\n // redirect customer to the cart (dirty)\n $redirectUrl = Mage::helper('checkout/cart')->getCartUrl();\n $block = new Mage_Core_Block_Template();\n $block->setTemplate('mcpservice/redirect.phtml');\n $block->assign('url',$redirectUrl);\n $block->assign('media_url',Mage::getBaseUrl() . '/../../media/micropayment/');\n $block->assign('year',date('Y'));\n $block->assign('payment_method',$order->getPayment());\n $block->assign('target','parent');\n\n echo $block->renderView();\n\n }", "function cancel_account() {\n\t\tif ($this->dx_auth->is_logged_in()) {\t\t\t\n\t\t\t$val = $this->form_validation;\n\t\t\t\n\t\t\t// Set form validation rules\n\t\t\t$val->set_rules('password', 'Password', \"trim|required\");\n\t\t\t\n\t\t\t// Validate rules and change password\n\t\t\tif ($val->run() AND $this->dx_auth->cancel_account($val->set_value('password'))) {\n\t\t\t\t// Redirect to homepage\n\t\t\t\tredirect('', 'location');\n\t\t\t} else {\n\t\t\t\t$this->load->view($this->dx_auth->cancel_account_view);\n\t\t\t}\n\t\t} else {\n\t\t\t// Redirect to login page\n\t\t\t$this->dx_auth->deny_access('login');\n\t\t}\n\t}", "protected function _cancelOperation() {}", "public function cancelSection()\n\t{\n\t\tJRequest::checkToken() or jExit(JText::_('JInvalid_Token'));\n\n\t\t// Initialize variables.\n\t\t$app\t= &JFactory::getApplication();\n\n\t\t$modelName = $app->getUserState('com_eve.roles.model');\n\t\t$app->setUserState('com_eve.roles.model', null);\n\t\t$app->setUserState('com_eve.sectionCorporation.corporationID', null);\n\t\t$app->setUserState('com_eve.sectionCorporation.section', null);\n\n\t\t$model\t= &$this->getModel($modelName, 'EveModel');\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_eve&view=access', false));\n\t}", "function ting_visual_relation_slide_form_cancel($form, &$form_state) {\n // Go back to app-settings (or destination if parameter is set)\n $form_state['redirect'] = 'admin/config/ting/ting-visual-relation/app-settings';\n}", "function cancelCommit()\n{\n global $user;\n $UID = $user->uid;\n $params = drupal_get_query_parameters();\n $OID = $params['OID'];\n\n // removing user's commitment from the outreach completely\n dbRemoveUserFromOutreach($UID,$OID);\n drupal_set_message(\"Your commitment to outreach event: \" . dbGetOutreachname($OID) . \" has been removed!\"); //letting them know and redirecting user to the previous page they were on\n drupal_goto($_SERVER['HTTP_REFERER']);\n}", "private function merchantPageCancel()\n {\n $cart = $this->context->cart;\n\n $customer = new Customer($cart->id_customer);\n\n if (!Validate::isLoadedObject($customer) || !isset($this->module->currentOrder)) {\n $error_message = $this->module->l('You have cancelled the payment, please try again.');\n\n $id_order = $this->module->currentOrder;\n if (! $id_order || null == $id_order || empty($id_order)) {\n $id_order = Context::getContext()->cookie->__get('aps_apple_order_id');\n $this->aps_payment->refillCart($id_order);\n $this->aps_helper->log('refill cart and merchantPageCancel called');\n }\n Context::getContext()->cookie->apsErrors = $error_message;\n Tools::redirect('index.php?controller=order&step=1');\n }\n $this->aps_payment->merchantPageCancel();\n $objOrder = new Order($this->module->currentOrder);\n if ($objOrder) {\n $this->aps_payment->refillCart($objOrder->id);\n $error_message = $this->module->l('You have cancelled the payment, please try again.');\n Context::getContext()->cookie->apsErrors = $error_message;\n $this->aps_helper->log('merchantPageCancel called');\n\n Tools::redirect('index.php?controller=order&step=1');\n } else {\n $error_message = $this->module->l('You have cancelled the payment, please try again.');\n Context::getContext()->cookie->__set('aps_error_msg', $error_message);\n Tools::redirect(\n 'index.php?fc=module&module=amazonpaymentservices&controller=error&action=displayError'\n );\n }\n }", "function doStopTourAction() {\n//\t\t$request = DevblocksPlatform::getHttpRequest();\n\n\t\t$worker = CerberusApplication::getActiveWorker();\n\t\tDAO_WorkerPref::set($worker->id, 'assist_mode', 0);\n\t\t\n//\t\tDevblocksPlatform::redirect(new DevblocksHttpResponse($request->path, $request->query));\n\t}", "public function dockCancel(){\n\t\treturn $this->_sendPacketToController(self::DOCK_CANCEL);\n\t}", "function handleCancelProgramItemEditor(EventContext $context)\n {\n $context->setForward(dirname(__FILE__) . \"/program_item_selector.php\");\n }", "public function cancel()\n {\n $post = $_REQUEST;\n $model = & $this->getModel('jms');\n $model->cancelSubscription($post);\n $this->setRedirect('index.php?option=com_jms&view=jms&layout=cancel&id=' . $post['id'] . '&plan_id=' . $post['plan_id']);\n }", "public function cancel()\n {\n session()->flash('warning', trans('saassubscription::app.super-user.plans.payment-cancel'));\n\n return redirect()->route($this->_config['redirect']);\n }", "public function editFormCancelled(\\Nette\\Forms\\SubmitButton $btn) {\n $this->redirect('default');\n }", "function eve_api_subtask_cancel(&$form_state) {\n // Clear our ctools cache object. It's good housekeeping.\n eve_api_clear_page_cache('signup');\n}", "function cancelObject($in_rep = false)\n\t{\n\t\tilUtil::sendInfo($this->lng->txt('msg_cancel'), true);\n\t\t// TODO: check this\n\t\tilUtil::redirect('repository.php?cmd=frameset&ref_id='.$_GET['ref_id']);\n\t}", "function stopSurvey() {\n $this->autoRender = false;\n $type = ($this->Session->check('Survey.type')) ? $this->Session->read('Survey.type') : ''; // the type of survey being taken 'test' or 'user'\n $this->__clearEditSession(CLEAR_SURVEY); // delete the temporary session values associated with the survey\n switch ($type) {\n case 'test':\n $this->redirect(array('action' => 'index'));\n break;\n }\n $this->render('/Pages/stopped', 'survey');\n }", "public function cancelAction()\n {\n \n $po_order_id = $this->getRequest()->getParam('po_order_id');\n \n Mage::dispatchEvent('purchase_order_stockmovement_cancel_po', array('po_order_id'=>$po_order_id)); \n \n //move to 'purchase_order_stockmovement_cancel' event to handle.\n /*$collection = mage::getModel('Purchase/StockMovement')\n ->getCollection()\n ->addFieldToFilter('sm_po_num', $po_num);\n foreach ($collection as $item)\n {\n $item->delete();\n }\n */\n /*\n $order = mage::getModel('Purchase/Order')->load($po_num);\n foreach ($order->getProducts() as $item)\n {\n $productId = $item->getpop_product_id();\n Mage::dispatchEvent('purchase_update_supply_needs_for_product', array('product_id'=>$productId));\n }\n */\n \n //Move to order cancel funciton.\n /*$collection = mage::getModel('purchase/orderitem')\n ->getCollection()\n ->addFieldToFilter('pop_order_num', $po_num);\n foreach ($collection as $item)\n {\n $item->delete();\n } */\n \n \n $purchaseOrder = Mage::getModel('purchase/order')->load($po_order_id);\n\n $purchaseOrder->cancel();\n \n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Purchase order successfully Canceled'));\n \n $this->_redirect('purchase/orders/list');\n }", "public function cancelUserDeletion(): void\n {\n $this->dispatch('close-modal', id: 'confirmingUserDeletion');\n }", "public function cancelRequest(){\n //the other users Id\n $otherUserId = $_POST[\"otherUserId\"];\n //deletes the record in the database\n $this->individualGroupModel->cancelGroupRequestInvitation($otherUserId); \n //redirects\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }", "public function discard() {\n\t\t$this->DispositionManager->discard();\n\t\t$this->autoRender = false;\n\t\t$this->redirect($this->refererStack(SYSTEM_CONSUME_REFERER));\n\t}", "public function cancel($key = null)\n\t{\n\t\t$this->_result = $result = parent::cancel();\n\t\t$model = $this->getModel();\n\n\t\t//Define the redirections\n\t\tswitch ($this->getLayout() . '.' . $this->getTask())\n\t\t{\n\t\t\tcase 'reservation.cancel':\n\n\t\t\t\t$app = JFactory::getApplication();\n\t\t\t\t$app->redirect(\"index.php\");\n\n\t\t\t\t/*$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t), array(\n\t\t\t\t\t'cid[]' => null\n\t\t\t\t));*/\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t));\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function actionQuit()\r\n\t\t{\r\n\t\t\t$varSession = self::actionGetListaSessions();\r\n\t\t\tself::actionAnularSession($varSession);\r\n\t\t\treturn $this->render('/menu/menuvertical2');\r\n\t\t}", "public function abort() {\n\t\t$this->timer->abortEvent( $this );\n\t}", "public function cancel_membership() {\n \t$membership_id = $this->uri->segment(3);\n\n \t$data = [\n \t\t'id' => $membership_id,\n \t\t'status' => 'Cancelled'\n \t];\n\n \t$this->Member_Model->update_membership($data);\n\n \tredirect('members/list/active');\n }", "public function switchUserBack();", "public function actionCancel() {\n $token = trim($_GET['token']);\n// $payerId = trim($_GET['PayerID']);\n $criteria = new CDbCriteria;\n $criteria->condition = 'token=:Tokenw';\n $criteria->params = array(':Tokenw' => $token);\n $orders = Orders::model()->find($criteria);\n if ($orders->status_id == '4') {\n $orders->status_id = '2';\n $orders->save();\n// need to clear cart\n//Yii::app()->shoppingCart->clear();\n }\n $this->render('cancel');\n }", "public function friendly_stop() {\n global $OUTPUT;\n\n $riskyediting = ($this->surveypro->riskyeditdeadline > time());\n $utilitylayoutman = new utility_layout($this->cm, $this->surveypro);\n $hassubmissions = $utilitylayoutman->has_submissions();\n\n if ($hassubmissions && (!$riskyediting)) {\n echo $OUTPUT->notification(get_string('applyusertemplatedenied01', 'mod_surveypro'), 'notifyproblem');\n $url = new \\moodle_url('/mod/surveypro/view_submissions.php', ['s' => $this->surveypro->id]);\n echo $OUTPUT->continue_button($url);\n echo $OUTPUT->footer();\n die();\n }\n\n if ($this->surveypro->template && (!$riskyediting)) { // This survey comes from a master template so it is multilang.\n echo $OUTPUT->notification(get_string('applyusertemplatedenied02', 'mod_surveypro'), 'notifyproblem');\n $url = new \\moodle_url('/mod/surveypro/view_userform.php', ['s' => $this->surveypro->id]);\n echo $OUTPUT->continue_button($url);\n echo $OUTPUT->footer();\n die();\n }\n }", "protected function cancel()\n\t{\n\t\t$this->executeTask('Rollback');\n\n\t\treturn false;\n\t}", "public function cancelAction()\n {\n $params = $this->getRequest()->getParams();\n if (array_key_exists('shipment', $params)) {\n $shipment = Mage::getModel('sales/order_shipment')->load($params['shipment']);\n if (Mage::helper('iparcel/api')->cancelShipment($shipment)) {\n Mage::getSingleton('adminhtml/session')->addSuccess('Shipment canceled');\n }\n }\n\n $this->_redirectReferer();\n return true;\n }", "function cancelCreationPageUsingTemplateObject()\n\t{\n\t\tglobal $ilCtrl;\n\n\t\t// redirect to newly created page\n\t\t$ilCtrl->setParameterByClass(\"ilwikipagegui\", \"page\", ilWikiUtil::makeUrlTitle(($_GET[\"from_page\"])));\n\t\t$ilCtrl->redirectByClass(\"ilwikipagegui\", \"preview\");\n\t}", "public function cancel()\n\t{\n\t\t$this->pdoStatement = null;\n\t}", "public function cancelAction() {\n\n //CHECK AUTH\n if( !$this->_helper->requireUser()->isValid() ) return;\n\n\t\t//GET PAGE ID.\n\t\t$page_id = $this->_getParam('page_id');\n\t\t$sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n\t\t\n\t\t//GET VIEWER ID.\n\t\t$viewer = Engine_Api::_()->user()->getViewer();\n\n //MAKE FORM\n $this->view->form = $form = new Sitepagemember_Form_Member();\n $form->setTitle('Cancel Page Membership Request');\n $form->setDescription('Would you like to cancel your request for membership in this page?');\n $form->submit->setLabel('Cancel Request');\n\n //PROCESS FORM\n if( $this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost()) ) {\n\n\t\t\t//REMOVE THE NOTIFICATION.\n\t\t\t$notification = Engine_Api::_()->getDbtable('notifications', 'activity')->getNotificationByObjectAndType($sitepage->getOwner(), $sitepage, 'sitepagemember_approve');\n\t\t\tif( $notification ) {\n\t\t\t\t$notification->delete();\n\t\t\t}\n\n\t\t\tif (!empty($page_id)) {\n\t\t\t\t//DELETE THE RESULT FORM THE TABLE.\n\t\t\t\tEngine_Api::_()->getDbtable('membership', 'sitepage')->delete(array('resource_id =?' => $page_id, 'user_id =?' => $viewer->getIdentity()));\n\t\t\t}\n\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Page membership request cancelled.')),\n 'layout' => 'default-simple',\n \n 'parentRefresh' => true,\n ));\n }\n }", "private function cancelConfirmation()\n {\n Chat::$bot->editMessageText([\n 'text' => 'channel removing confirmation canceled',\n 'inline_message_id' => Chat::getCallBackQuery()->getInlineMessageId()\n ]);\n }", "public function deactivate();", "public static function cancella()\n {\n $delete_id = $_SESSION['current_user']->getId();\n UtenteFactory::cancellaAzienda($delete_id);\n }", "public function cancel(Project $project) {\n }", "public function cancelSubmit(array &$form, FormStateInterface $form_state) {\n $article_id = $this->getRequest()->get('article');\n $this->returnToArticle($article_id, $form_state);\n }", "public function abort(): void;", "public function Cancel()\n {\n $prevMode = $this->m_Mode;\n $this->SetDisplayMode(MODE_R);\n if ($prevMode == MODE_N) // NEW mode to READ mode, has record change, need to refresh the subforms\n return $this->ReRender(true, true);\n // EDIT to READ, no record change\n return $this->ReRender(true,false);\n }", "public function cancel(){\n\t\t$this->getBasics();\n\t\t$this->getParams();\n\t\t$this->getLanguage();\n\n\t\t// load additonal language (for breadcrumbs)\n\t\t$this->language->load( 'checkout/success' );\n\n\t\t$this->load->library( 'encryption' );\n\t\t$encryption = new Encryption( $this->config->get( 'config_encryption' ) );\n\n\t\t// get order id\n\t\tif( isset( $this->request->get['order_id'] ) ) {\n\t\t\t$order_id = $encryption->decrypt( $this->request->get['order_id'] );\n\t\t}else{\n\t\t\t$order_id = 0;\n\t\t}\n\n\t\t// get project id\n\t\t$project_id = $this->getRequest( 'pid', 0 );\n\n\t\t// write log\n\t\t$msg = sprintf( $this->language->get( 'text_log_return_cancel'), $project_id, $order_id );\n\t\t$this->writeLog( $msg, 4 );\n\n\t\t$this->data['heading_title']\t= $this->language->get( 'text_cancel' );\n\t\t$this->data['text_message']\t\t= sprintf(\n\t\t\t$this->language->get( 'text_cancel_message' ),\n\t\t\t$this->buildUrl( 'information/contact' )\n\t\t);\n\t\t$this->data['button_continue']\t= $this->language->get( 'button_continue' );\n\t\t$this->data['continue']\t\t\t= $this->buildUrl( 'common/home' );\n\n\t\tif( $this->_ocversion == '1.4' ) {\n\t\t\t$breadcrumbs = array(\n\t\t\t\tarray(\n\t\t \t'href' => $this->buildUrl( 'common/home' ),\n\t\t \t'text' => $this->language->get( 'text_home' ),\n\t\t \t'separator' => false\n\t\t \t),\n\t\t \tarray(\n\t\t \t'href' => $this->buildUrl( 'checkout/cart' ),\n\t\t \t'text' => $this->language->get( 'text_basket' ),\n\t\t \t'separator' => $this->language->get( 'text_separator' )\n\t\t \t)\n\t\t\t);\n\n\t\t\tif( $this->customer->isLogged() ) {\n\t\t\t\t$breadcrumbs_add = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $this->buildUrl( 'checkout/shipping' ),\n\t\t\t\t\t\t'text' => $this->language->get( 'text_shipping' ),\n\t\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $this->buildUrl( 'checkout/payment' ),\n\t\t\t\t\t\t'text' => $this->language->get( 'text_payment' ),\n\t\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $this->buildUrl( 'checkout/confirm' ),\n\t\t\t\t\t\t'text' => $this->language->get( 'text_failed' ),\n\t\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}else{\n\t\t\t\t$breadcrumbs_add = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $this->buildUrl( 'checkout/guest' ),\n\t\t\t\t\t\t'text' => $this->language->get( 'text_guest' ),\n\t\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $this->buildUrl( 'checkout/guest/confirm' ),\n\t\t\t\t\t\t'text' => $this->language->get( 'text_failed' ),\n\t\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$breadcrumbs = array_merge( $breadcrumbs, $breadcrumbs_add );\n\n\t \t$breadcrumbs[] = array(\n\t \t'href' => $this->buildUrl( 'checkout/success' ),\n\t \t'text' => $this->language->get( 'text_failed' ),\n\t \t'separator' => $this->language->get( 'text_separator' )\n\t \t);\n\t\t}else{\n\t\t\t$breadcrumbs = array(\n\t\t\t\tarray(\n\t\t\t\t\t'href' => $this->buildUrl( 'common/home' ),\n\t\t \t'text' => $this->language->get( 'text_home' ),\n\t\t \t'separator' => false\n\t\t\t\t),\n\t \tarray(\n\t\t \t'href' => $this->buildUrl( 'checkout/cart' ),\n\t\t \t'text' => $this->language->get( 'text_basket' ),\n\t\t \t'separator' => $this->language->get( 'text_separator' )\n\t\t \t),\n\t\t \tarray(\n\t\t\t\t\t'href' => $this->buildUrl( 'checkout/checkout', '', 'SSL' ),\n\t\t\t\t\t'text' => $this->language->get( 'text_checkout' ),\n\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t \t'href' => $this->buildUrl( 'checkout/success' ),\n\t\t \t'text' => $this->language->get( 'text_failed' ),\n\t\t \t'separator' => $this->language->get( 'text_separator' )\n\t\t \t)\n\t \t);\n\t\t}\n\n\t\t$this->getTemplate( '/template/common/success.tpl' );\n\t\t$this->buildBreadcrumbs( $breadcrumbs );\n\t\t$this->buildTitle( $this->language->get( 'text_cancel' ) );\n\t\t$this->getChildren();\n\t\t$this->buildResponse();\n\t}", "public function cancel()\n {\n $this->_statement =null;\n }", "protected function cancelOrder(jshopOrder $order)\r\n {\r\n $this->redirect($this->getActionUrl('cancel', $order->order_id));\r\n }", "public function cancelMyReserved($id);", "private function _noActionTaken()\n {\n $this->view->display($this->model);\n }", "public function setActionNothing()\n\t{\n\t\t$this->setAction( \"javascription:void(0)\" );\n\t}", "public function halt();", "public function htmleditorAction()\r\n {\r\n $this->_view->unsetMain();\r\n }", "public function cancel( $id )\n\t{\n\t\treturn $this->controller->cancel( $id );\n\t}", "public function cancelDownload() {\n $this->callMethod( 'cancelDownload' );\n }", "public function cancelDownload() {\n $this->callMethod( 'cancelDownload' );\n }", "public function cancelDownload() {\n $this->callMethod( 'cancelDownload' );\n }", "public function cancelDownload() {\n $this->callMethod('cancelDownload');\n }", "public static function deactivate(){\n // Do nothing\n }", "public function cerrarAction()\n {\n $this->session->remove('auth');\n $this->flash->success('Goodbye!');\n return $this->dispatcher->forward(array(\n 'controller' => 'index',\n 'action' => 'index'\n ));\n }" ]
[ "0.8050979", "0.7746314", "0.770287", "0.755568", "0.7483072", "0.7398462", "0.7364269", "0.7322016", "0.7322016", "0.72616875", "0.72446644", "0.7201807", "0.71693695", "0.7162362", "0.71113497", "0.71113497", "0.70994234", "0.70049405", "0.69981426", "0.69097847", "0.6872593", "0.6857007", "0.6857007", "0.6829627", "0.68088144", "0.6718646", "0.67058915", "0.67048967", "0.66983867", "0.6663745", "0.6662305", "0.66386414", "0.66244686", "0.6596219", "0.65412146", "0.65048176", "0.6504413", "0.6504413", "0.6394018", "0.63772094", "0.63579446", "0.63471365", "0.63068306", "0.6297546", "0.62721103", "0.6269766", "0.6227061", "0.6154737", "0.6150662", "0.61120474", "0.6096282", "0.60951954", "0.60668343", "0.6059496", "0.6037695", "0.6031552", "0.60220945", "0.6019344", "0.60062116", "0.60006094", "0.5947291", "0.59430987", "0.5940673", "0.5938102", "0.592062", "0.5912824", "0.58766264", "0.5865488", "0.585775", "0.58296", "0.58092314", "0.58014977", "0.5795316", "0.5790938", "0.5780846", "0.57772297", "0.5765839", "0.5746082", "0.57416207", "0.57328916", "0.57284594", "0.5721384", "0.57026213", "0.5699084", "0.5686782", "0.5682797", "0.56801325", "0.5663139", "0.56620026", "0.56515557", "0.564887", "0.56440485", "0.5643537", "0.5628667", "0.5628077", "0.5628077", "0.5628077", "0.56244516", "0.56044686", "0.56041646" ]
0.68037504
25
Get the translations for common words
public function getTwords() { $this->tlist = getTranslatables($this->langtag); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function getTranslations();", "public function get_common_words()\n\t{\n\t\treturn array();\n\t}", "private function extractGettextStrings()\n {\n $translation = null;\n $translationObjects = array();\n $lookupDirectories = array(\n Strata::getVendorPath() . 'strata-mvc' . DIRECTORY_SEPARATOR . 'strata' . DIRECTORY_SEPARATOR . 'src',\n Strata::getSrcPath(),\n Strata::getThemesPath(),\n );\n\n foreach ($lookupDirectories as $directory) {\n $translationObjects = $this->recurseThroughDirectory($directory);\n\n // Merge all translation objects into a bigger one\n foreach ($translationObjects as $t) {\n if (is_null($translation)) {\n $translation = $t;\n } else {\n $translation->mergeWith($t);\n }\n }\n }\n\n return $translation;\n }", "public function getMultilingual();", "public function getAllTranslationByLanguage();", "public function getStrings ()\n {\n return $this->translate;\n }", "public function translations() {\n return $this->client->get(self::$apiName, array());\n }", "function wp_get_available_translations()\n {\n }", "static public function getTranslate()\r\n {\r\n return Warecorp_Translate::getTranslate();\r\n }", "public function getTranslations()\n {\n }", "function get_computer_translated_phrases() {\n return $this->translated_phrases - $this->human_translated_phrases;\n }", "function localize($phrase) {\n global $translations;\n /* Static keyword is used to ensure the file is loaded only once */\n if ($translations[$phrase])\n return $translations[$phrase];\n else\n return $phrase;\n}", "function GetLocalizedTexts()\n\t{\n\t\t$result = $this->sendRequest(\"GetLocalizedTexts\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "private function internal_translate_words() {\n global $DB;\n $this->translated = false;\n\n // Get list of all words used.\n $allwords = array();\n foreach (array_merge($this->terms, $this->negativeterms) as $term) {\n $allwords = array_merge($allwords, $term->words);\n }\n $allwords = array_unique($allwords);\n if (count($allwords) === 0) {\n return array(false, null);\n }\n\n // OK, great, now let's build a query for all those words.\n list ($wordlistwhere, $wordlistwherearray) =\n $DB->get_in_or_equal($allwords);\n $words = $DB->get_records_select('local_ousearch_words',\n 'word ' . $wordlistwhere, $wordlistwherearray, '', 'word,id');\n\n // Convert words to IDs.\n $newterms = array();\n $lastmissed = '';\n foreach ($this->terms as $term) {\n $missed = false;\n $term->ids = array();\n foreach ($term->words as $word) {\n if (!array_key_exists($word, $words)) {\n $missed = true;\n $lastmissed = $word;\n break;\n } else {\n $term->ids[] = $words[$word]->id;\n }\n }\n // If we didn't have some words in the term...\n if ($missed) {\n // Required term? Not going to find anything then.\n if ($term->required || !self::SUPPORTS_OR) {\n return array(false, $lastmissed);\n }\n // If not required, just dump that term.\n } else {\n $newterms[] = $term;\n }\n }\n // Must have some (positive) terms.\n if (count($newterms) == 0) {\n return array(false, $lastmissed);\n }\n $this->terms = $newterms;\n\n $newterms = array();\n foreach ($this->negativeterms as $term) {\n $missed = false;\n $term->ids = array();\n foreach ($term->words as $word) {\n if (!array_key_exists($word, $words)) {\n $missed = $word;\n break;\n } else {\n $term->ids[] = $words[$word]->id;\n }\n }\n // If we didn't have some words in the term, dump it.\n if (!$missed) {\n $newterms[] = $term;\n }\n }\n $this->negativeterms = $newterms;\n $this->translated = true;\n return array(true, true);\n }", "static protected function translate($s){\nif(!self::$strings)return $s;\nif(!array_key_exists($s,self::$strings))return $s;\nreturn self::$strings[$s];\n}", "public function getTranslationsForKey($key);", "function get_lang($name) {\n global $lang;\n return $lang->get_phrase($name);\n}", "public function get_desired_languages();", "public function translated();", "public function translated();", "public static function getTranslations(array $strings) {\n $r = [];\n foreach ($strings as $string) {\n $r[$string] = lang::get($string);\n }\n return $r;\n }", "public function getLanguages();", "protected function getTranslations() {\n\t\treturn $this->_viewHelper->getTranslations();\n\t}", "protected function getLanguages() {}", "public function getTranslationsForLanguage($language);", "function getAllTranslations()\n {\n $translations = [];\n $modules = $this->getAllModulesOfProject();\n sort($modules);\n\n foreach ($modules as $module)\n {\n $trans = $this->getTranslationsOfModule($module);\n if ($trans)\n {\n foreach ($trans as $value)\n {\n foreach ($value as $key => $val)\n {\n $langsAvailable = $this->getAvailableLangsOfKey($key);\n\n if (!isset($translations[$key]))\n {\n $translations[$key] = [\n 'key' => $key,\n 'value' => $val,\n 'module' => $module->name,\n 'locale' => implode(', ', $langsAvailable)\n ];\n }\n else\n {\n $isPrivateModulo = $this->modulesRegistry->isPrivateModule($module->name);\n if ($isPrivateModulo)\n {\n $translations[$key] = [\n 'key' => $key,\n 'value' => $val,\n 'module' => $module->name,\n 'locale' => implode(', ', $langsAvailable)\n ];\n }\n }\n }\n }\n }\n }\n return $translations;\n }", "public static function getArrayTranslations() {\n return array(\n\n 'mot' => 'mot', 'secondmot' => 'second mot', 'bienvenue' => 'bienvenue'\n\n );\n\n }", "public static function get_translate(){\n return self::$translate;\n }", "public function translateMany($word, $source_lang, $dest_lang, $max=10){\n\t\t\t\n\t\t\t$paramArr = array (\n\t\t\t\t\t\t\t\t\t 'text'\t\t\t\t=> $word,\n\t\t\t\t\t\t\t\t\t 'from'\t\t\t\t=> $source_lang,\n\t\t\t\t\t\t\t\t\t 'to'\t\t\t\t=> $dest_lang,\n\t\t\t\t\t\t\t\t\t 'maxTranslations'\t=> $max\n );\n\t\t\t$paramArr = http_build_query($paramArr);\n\n\t\t\t$this->http->setURL($this->url.$this->apiUrl.$this->getMode(\"translates\").\"?\".$paramArr);\n\t\t\t$response = $this->http->send(FALSE);\n\n\t\t\t//$this->out($response);\n\n\t\t\tpreg_match_all('@\"TranslatedText\":\"(.*?)\"@i', $response, $matches, PREG_OFFSET_CAPTURE);\n\t\t\t$string = NULL;\n\n\t\t\tforeach ($matches[1] as $val)\n\t\t\t\t$string .= strtolower($val[0]).\",\";\n\n\t\t\t$string = substr($string, 0, -1);\n\n\t\t\treturn array_unique($this->synsetFilter(explode(\",\", $string)));\n\n\t\t\t//return $response;\n\n\t\t}", "public function translate();", "public function getTranslations()\n {\n return $this->language;\n }", "public function getSiteLanguages();", "public function getLanguages() {}", "function getTranslationOptions()\r\n\t{\r\n\t\t$translations = $this->Translations();\r\n\t\tif(count($translations) > 0)\r\n\t\t\t$indexed = regroupList($translations, \"language\");\r\n\t\telse\r\n\t\t\t$index = array();\r\n\t\t\t\r\n\t\t$options = array();\r\n\t\tforeach(TextTranslation::$languageOptions as $language)\r\n\t\t{\r\n\t\t\tif($language != \"English\" && !array_key_exists($language, $indexed))\r\n\t\t\t\t$options[$language] = $language;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn $options;\r\n\t}", "public function translations()\n {\n $locales = config('translatable.locales');\n $fallback_locale = config('translatable.fallback_local');\n unset($locales[$fallback_locale]);\n $translations_count = count($locales);\n if ($translations_count === 1) {\n return $this->hasOne(get_class() . 'Translation');\n } else {\n return $this->hasMany(get_class(), 'Translation');\n }\n }", "protected function getTranslation()\n {\n $language = $this->request->getBestLanguage();\n\n // Check if we have a translation file for that lang\n // TODO 处理英文\n if (file_exists(APP_PATH . \"/app/messages/\" . $language . \".php\")) {\n require_once APP_PATH. '/app/messages/'. $language . \".php\";\n } else {\n require_once APP_PATH. '/app/messages/zh-CN.php';\n // Fallback to some default\n// require \"../messages/en.php\";\n }\n\n // Return a translation object\n return new NativeArray(\n array(\n \"content\" => $messages\n )\n );\n }", "public function translate2($word, $from, $tos)\n\t\t{\n\t\t\t//$tos is array of languages to translate to\n\t\t\t//returns array of translations as $result['en']=>'Hello'\n\t\t\t\n\t\t\t$access_token = $this->get_access_token();\n\t\t\t\n\t\t\t$result[$from] = $word;\n\t\t\t\n\t\t\tforeach($tos as $to)\n\t\t\t{\n\t\t\t\t$url = 'http://api.microsofttranslator.com/V2/Http.svc/Translate?text='. urlencode($word) .'&from='.$from.'&to='.$to;\n\t\t\t\t\n\t\t\t\t$ch = curl_init();\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $url); \n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization:bearer '.$access_token));\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); \n\t\t\t\t$rsp = curl_exec($ch); \n\t\t\t\t\n\t\t\t\tpreg_match_all('/<string (.*?)>(.*?)<\\/string>/s', $rsp, $matches);\n\t\n\t\t\t\t$result[$to] = $matches[2][0];\n\t\t\t}\n\t\t\t\n\t\t\treturn $result;\n\t\t}", "protected function getTranslateTools() {}", "function languages()\n {\n $defaults = array('en');\n $langs = array();\n\n // get aspell dictionaries\n exec('aspell dump dicts', $dicts);\n if (!empty($dicts)) {\n $seen = array();\n foreach ($dicts as $lang) {\n $lang = preg_replace('/-.*$/', '', $lang);\n $langc = strlen($lang) == 2 ? $lang.'_'.strtoupper($lang) : $lang;\n if (!$seen[$langc]++)\n $langs[] = $lang;\n }\n $langs = array_unique($langs);\n }\n else {\n $langs = $defaults;\n }\n\n return $langs;\n }", "public function getTranslations($msv, $default_lang='', $system=-1) {\n\t\t\tglobal $db;\n\t\t\t$testing=false;\n\t\t\t//$testing=true;\n\t\t\t$labels=array();\n\t\t\tif ($testing) print \"getTrans($msv, $default_lang, $system)<br>\";\n\n\t\t\t// 1 - Collect standard translations in english\n\t\t\t$query=\"select id, shortname, longname, longname as eng from labels WHERE \".(($system>-1)?\"system=$system\":\"system<2\").\" order by longname\";\n\t\t\tif ($testing) print \"$query<br>\\n\";\n\t\t\t$labels=$this->getLabels($db->get_results($query), $labels);\n\t\t\t\n\t\t\t// 2 - See if we have default site translations for any labels\n\t\t\t//if ($default_lang!=\"en\") {\n\t\t\t\t$query=\"select shortname, ld.longname from labels l left join labels_default ld on l.id=ld.label_id where ld.lang='$default_lang' AND \".(($system>-1)?\"system=$system\":\"system<2\").\" order by l.longname\";\n\t\t\t\tif ($testing) print \"$query<br>\\n\";\n\t\t\t\t$labels=$this->getLabels($db->get_results($query), $labels, 'default');\n\t\t\t//}\n\t\t\t\n\t\t\t// 3 - Get microsite version specific labels.\t\n\t\t\t// Dont do this if we are running for msv=1 as msv 1 has no translations and is allowed to modify defaults only.\n\t\t\t//if ($msv!=1 || $system==2) {\n\t\t\t\t$query=\"select shortname, lt.longname from labels l left join labels_translations lt on l.id=lt.label_id where lt.msv=$msv AND \".(($system>-1)?\"system=$system\":\"system<2\").\" order by l.longname\";\n\t\t\t\tif ($testing) print \"$query<br>\\n\";\n\t\t\t\t$labels=$this->getLabels($db->get_results($query), $labels, 'site');\n\t\t\t//}\n\n\t\t\tif ($testing) print_r($labels);\n\t\t\treturn $labels;\n\t\t}", "abstract public function getTranslationIn(string $locale);", "abstract public function getTranslationIn(string $locale);", "abstract public function getTranslationIn(string $locale);", "protected function sectionTranslations()\n {\n $found = []; // translations found in latte templates\n foreach (glob('template/*.latte') as $file) {\n $tempFileContents = file_get_contents($file);\n Assert::string($tempFileContents);\n preg_match_all('~\\{=(\"([^\"]+)\"|\\'([^\\']+)\\')\\|translate\\}~i', $tempFileContents, $matches);\n $found = array_merge($found, $matches[2]);\n }\n $found = array_unique($found);\n $output = '<h1><i class=\"fa fa-globe\"></i> ' . $this->tableAdmin->translate('Translations')\n . '</h1><div id=\"agenda-translations\">'\n . '<form action=\"\" method=\"post\" onsubmit=\"return confirm(\\''\n . $this->tableAdmin->translate('Are you sure?') . '\\')\">'\n . Tools::htmlInput('translations', '', 1, array('type' => 'hidden'))\n . Tools::htmlInput('token', '', end($_SESSION['token']), 'hidden')\n . Tools::htmlInput('old_name', '', '', array('type' => 'hidden', 'id' => 'old_name'))\n . '<table class=\"table table-striped\"><thead><tr><th style=\"width:'\n . intval(100 / (count($this->MyCMS->TRANSLATIONS) + 1)) . '%\">'\n . Tools::htmlInput('one', '', false, 'radio') . '</th>';\n $translations = $keys = [];\n $localisation = new L10n($this->prefixUiL10n, $this->MyCMS->TRANSLATIONS);\n foreach ($this->MyCMS->TRANSLATIONS as $key => $value) {\n $output .= \"<th>$value</th>\";\n $translations[$key] = $localisation->readLocalisation($key);\n $keys = array_merge($keys, array_keys($translations[$key]));\n }\n $output .= '</tr></thead><tbody>' . PHP_EOL;\n $keys = array_unique($keys);\n natcasesort($keys);\n foreach ($keys as $key) {\n $output .= '<tr><th>'\n . Tools::htmlInput('one', '', $key, array('type' => 'radio', 'class' => 'translation')) . ' '\n . Tools::h((string) $key) . '</th>';\n foreach ($this->MyCMS->TRANSLATIONS as $code => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"tr[$code][$key]\",\n '',\n Tools::set($translations[$code][$key], ''),\n ['class' => 'form-control form-control-sm', 'title' => \"$code: $key\"]\n ) . '</td>';\n }\n $output .= '</tr>' . PHP_EOL;\n if ($key = array_search($key, $found)) {\n unset($found[$key]);\n }\n }\n $output .= '<tr><td>' . Tools::htmlInput(\n 'new[0]',\n '',\n '',\n array('class' => 'form-control form-control-sm', 'title' => $this->tableAdmin->translate('New record'))\n ) . '</td>';\n foreach ($this->MyCMS->TRANSLATIONS as $key => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"new[$key]\",\n '',\n '',\n ['class' => 'form-control form-control-sm',\n 'title' => $this->tableAdmin->translate('New record') . ' (' . $value . ')']\n ) . '</td>';\n }\n $output .= '</tr></tbody></table>\n <button name=\"translations\" type=\"submit\" class=\"btn btn-secondary\"><i class=\"fa fa-save\"></i> '\n . $this->tableAdmin->translate('Save') . '</button>\n <button name=\"delete\" type=\"submit\" class=\"btn btn-secondary\" value=\"1\"><i class=\"fa fa-dot-circle\"></i>\n <i class=\"fa fa-trash\"></i> ' . $this->tableAdmin->translate('Delete') . '</button>\n <fieldset class=\"d-inline-block position-relative\"><div class=\"input-group\" id=\"rename-fieldset\">'\n . '<div class=\"input-group-prepend\">\n <button class=\"btn btn-secondary\" type=\"submit\"><i class=\"fa fa-dot-circle\"></i> '\n . '<i class=\"fa fa-i-cursor\"></i> ' . $this->tableAdmin->translate('Rename') . '</button>\n </div>'\n . Tools::htmlInput('new_name', '', '', array('class' => 'form-control', 'id' => 'new_name'))\n . '</div></fieldset>\n </form></div>' . PHP_EOL;\n $output .= count($found) ? '<h2 class=\"mt-4\">' .\n $this->tableAdmin->translate('Missing translations in templates') . '</h2><ul>' : '';\n foreach ($found as $value) {\n $output .= '<li><code>' . Tools::h($value) . '</code></li>' . PHP_EOL;\n }\n $output .= count($found) ? '</ul>' : '';\n return $output;\n }", "function gTranslate($text,$langOriginal,$langFinal){\n\t\t//Si los idiomas son iguales no hago nada\n\t\tif($langOriginal != $langFinal){\n\t\t/* Definimos la URL de la API de Google Translate y metemos en la variable el texto a traducir */\n\t\t$url = 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q='.urlencode($text).'&langpair='.$langOriginal.'|'.$langFinal;\n\t\t// iniciamos y configuramos curl_init();\n\t\t$curl_handle = curl_init();\n\t\tcurl_setopt($curl_handle,CURLOPT_URL, $url);\n\t\tcurl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\n\t\tcurl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);\n\t\t$code = curl_exec($curl_handle);\n\t\tcurl_close($curl_handle);\n\t\t/* La api nos devuelve los resultados en forma de objeto stdClass */\t\n\t\t$json \t\t= json_decode($code)->responseData;\n \t $traduccion = utf8_decode($json->translatedText);\n\t\treturn utf8_decode($traduccion);\n\t\t}else{\n\t\t\treturn $text;\n\t\t}\n\t}", "public function getSystemLanguages() {}", "public function getSystemLanguages() {}", "private function translations()\n {\n $this['translator'] = $this->share($this->extend('translator', function ($translator) {\n $translator->addLoader('yaml', new TranslationFileLoader());\n\n $translator->addResource('yaml', 'config/locales/pt-br.yml', 'pt-br');\n $translator->addResource('yaml', 'config/locales/en-us.yml', 'en-us');\n $translator->addResource('yaml', 'config/locales/es-es.yml', 'es-es');\n\n return $translator;\n }));\n }", "public function getLanguagesTitleForVacancy() {\n return $this->descriptions->map(function($entity){\n return $entity->getLanguage()->getTitle(); \n });\n }", "static public function words() : array {\n return [\n \"абажур\",\n \"абзац\",\n \"абонент\",\n \"абрикос\",\n \"абсурд\",\n \"авангард\",\n \"август\",\n \"авиация\",\n \"авоська\",\n \"автор\",\n \"агат\",\n \"агент\",\n \"агитатор\",\n \"агнец\",\n \"агония\",\n \"агрегат\",\n \"адвокат\",\n \"адмирал\",\n \"адрес\",\n \"ажиотаж\",\n \"азарт\",\n \"азбука\",\n \"азот\",\n \"аист\",\n \"айсберг\",\n \"академия\",\n \"аквариум\",\n \"аккорд\",\n \"акробат\",\n \"аксиома\",\n \"актер\",\n \"акула\",\n \"акция\",\n \"алгоритм\",\n \"алебарда\",\n \"аллея\",\n \"алмаз\",\n \"алтарь\",\n \"алфавит\",\n \"алхимик\",\n \"алый\",\n \"альбом\",\n \"алюминий\",\n \"амбар\",\n \"аметист\",\n \"амнезия\",\n \"ампула\",\n \"амфора\",\n \"анализ\",\n \"ангел\",\n \"анекдот\",\n \"анимация\",\n \"анкета\",\n \"аномалия\",\n \"ансамбль\",\n \"антенна\",\n \"апатия\",\n \"апельсин\",\n \"апофеоз\",\n \"аппарат\",\n \"апрель\",\n \"аптека\",\n \"арабский\",\n \"арбуз\",\n \"аргумент\",\n \"арест\",\n \"ария\",\n \"арка\",\n \"армия\",\n \"аромат\",\n \"арсенал\",\n \"артист\",\n \"архив\",\n \"аршин\",\n \"асбест\",\n \"аскетизм\",\n \"аспект\",\n \"ассорти\",\n \"астроном\",\n \"асфальт\",\n \"атака\",\n \"ателье\",\n \"атлас\",\n \"атом\",\n \"атрибут\",\n \"аудитор\",\n \"аукцион\",\n \"аура\",\n \"афера\",\n \"афиша\",\n \"ахинея\",\n \"ацетон\",\n \"аэропорт\",\n \"бабушка\",\n \"багаж\",\n \"бадья\",\n \"база\",\n \"баклажан\",\n \"балкон\",\n \"бампер\",\n \"банк\",\n \"барон\",\n \"бассейн\",\n \"батарея\",\n \"бахрома\",\n \"башня\",\n \"баян\",\n \"бегство\",\n \"бедро\",\n \"бездна\",\n \"бекон\",\n \"белый\",\n \"бензин\",\n \"берег\",\n \"беседа\",\n \"бетонный\",\n \"биатлон\",\n \"библия\",\n \"бивень\",\n \"бигуди\",\n \"бидон\",\n \"бизнес\",\n \"бикини\",\n \"билет\",\n \"бинокль\",\n \"биология\",\n \"биржа\",\n \"бисер\",\n \"битва\",\n \"бицепс\",\n \"благо\",\n \"бледный\",\n \"близкий\",\n \"блок\",\n \"блуждать\",\n \"блюдо\",\n \"бляха\",\n \"бобер\",\n \"богатый\",\n \"бодрый\",\n \"боевой\",\n \"бокал\",\n \"большой\",\n \"борьба\",\n \"босой\",\n \"ботинок\",\n \"боцман\",\n \"бочка\",\n \"боярин\",\n \"брать\",\n \"бревно\",\n \"бригада\",\n \"бросать\",\n \"брызги\",\n \"брюки\",\n \"бублик\",\n \"бугор\",\n \"будущее\",\n \"буква\",\n \"бульвар\",\n \"бумага\",\n \"бунт\",\n \"бурный\",\n \"бусы\",\n \"бутылка\",\n \"буфет\",\n \"бухта\",\n \"бушлат\",\n \"бывалый\",\n \"быль\",\n \"быстрый\",\n \"быть\",\n \"бюджет\",\n \"бюро\",\n \"бюст\",\n \"вагон\",\n \"важный\",\n \"ваза\",\n \"вакцина\",\n \"валюта\",\n \"вампир\",\n \"ванная\",\n \"вариант\",\n \"вассал\",\n \"вата\",\n \"вафля\",\n \"вахта\",\n \"вдова\",\n \"вдыхать\",\n \"ведущий\",\n \"веер\",\n \"вежливый\",\n \"везти\",\n \"веко\",\n \"великий\",\n \"вена\",\n \"верить\",\n \"веселый\",\n \"ветер\",\n \"вечер\",\n \"вешать\",\n \"вещь\",\n \"веяние\",\n \"взаимный\",\n \"взбучка\",\n \"взвод\",\n \"взгляд\",\n \"вздыхать\",\n \"взлетать\",\n \"взмах\",\n \"взнос\",\n \"взор\",\n \"взрыв\",\n \"взывать\",\n \"взятка\",\n \"вибрация\",\n \"визит\",\n \"вилка\",\n \"вино\",\n \"вирус\",\n \"висеть\",\n \"витрина\",\n \"вихрь\",\n \"вишневый\",\n \"включать\",\n \"вкус\",\n \"власть\",\n \"влечь\",\n \"влияние\",\n \"влюблять\",\n \"внешний\",\n \"внимание\",\n \"внук\",\n \"внятный\",\n \"вода\",\n \"воевать\",\n \"вождь\",\n \"воздух\",\n \"войти\",\n \"вокзал\",\n \"волос\",\n \"вопрос\",\n \"ворота\",\n \"восток\",\n \"впадать\",\n \"впускать\",\n \"врач\",\n \"время\",\n \"вручать\",\n \"всадник\",\n \"всеобщий\",\n \"вспышка\",\n \"встреча\",\n \"вторник\",\n \"вулкан\",\n \"вурдалак\",\n \"входить\",\n \"въезд\",\n \"выбор\",\n \"вывод\",\n \"выгодный\",\n \"выделять\",\n \"выезжать\",\n \"выживать\",\n \"вызывать\",\n \"выигрыш\",\n \"вылезать\",\n \"выносить\",\n \"выпивать\",\n \"высокий\",\n \"выходить\",\n \"вычет\",\n \"вышка\",\n \"выяснять\",\n \"вязать\",\n \"вялый\",\n \"гавань\",\n \"гадать\",\n \"газета\",\n \"гаишник\",\n \"галстук\",\n \"гамма\",\n \"гарантия\",\n \"гастроли\",\n \"гвардия\",\n \"гвоздь\",\n \"гектар\",\n \"гель\",\n \"генерал\",\n \"геолог\",\n \"герой\",\n \"гешефт\",\n \"гибель\",\n \"гигант\",\n \"гильза\",\n \"гимн\",\n \"гипотеза\",\n \"гитара\",\n \"глаз\",\n \"глина\",\n \"глоток\",\n \"глубокий\",\n \"глыба\",\n \"глядеть\",\n \"гнать\",\n \"гнев\",\n \"гнить\",\n \"гном\",\n \"гнуть\",\n \"говорить\",\n \"годовой\",\n \"голова\",\n \"гонка\",\n \"город\",\n \"гость\",\n \"готовый\",\n \"граница\",\n \"грех\",\n \"гриб\",\n \"громкий\",\n \"группа\",\n \"грызть\",\n \"грязный\",\n \"губа\",\n \"гудеть\",\n \"гулять\",\n \"гуманный\",\n \"густой\",\n \"гуща\",\n \"давать\",\n \"далекий\",\n \"дама\",\n \"данные\",\n \"дарить\",\n \"дать\",\n \"дача\",\n \"дверь\",\n \"движение\",\n \"двор\",\n \"дебют\",\n \"девушка\",\n \"дедушка\",\n \"дежурный\",\n \"дезертир\",\n \"действие\",\n \"декабрь\",\n \"дело\",\n \"демократ\",\n \"день\",\n \"депутат\",\n \"держать\",\n \"десяток\",\n \"детский\",\n \"дефицит\",\n \"дешевый\",\n \"деятель\",\n \"джаз\",\n \"джинсы\",\n \"джунгли\",\n \"диалог\",\n \"диван\",\n \"диета\",\n \"дизайн\",\n \"дикий\",\n \"динамика\",\n \"диплом\",\n \"директор\",\n \"диск\",\n \"дитя\",\n \"дичь\",\n \"длинный\",\n \"дневник\",\n \"добрый\",\n \"доверие\",\n \"договор\",\n \"дождь\",\n \"доза\",\n \"документ\",\n \"должен\",\n \"домашний\",\n \"допрос\",\n \"дорога\",\n \"доход\",\n \"доцент\",\n \"дочь\",\n \"дощатый\",\n \"драка\",\n \"древний\",\n \"дрожать\",\n \"друг\",\n \"дрянь\",\n \"дубовый\",\n \"дуга\",\n \"дудка\",\n \"дукат\",\n \"дуло\",\n \"думать\",\n \"дупло\",\n \"дурак\",\n \"дуть\",\n \"духи\",\n \"душа\",\n \"дуэт\",\n \"дымить\",\n \"дыня\",\n \"дыра\",\n \"дыханье\",\n \"дышать\",\n \"дьявол\",\n \"дюжина\",\n \"дюйм\",\n \"дюна\",\n \"дядя\",\n \"дятел\",\n \"егерь\",\n \"единый\",\n \"едкий\",\n \"ежевика\",\n \"ежик\",\n \"езда\",\n \"елка\",\n \"емкость\",\n \"ерунда\",\n \"ехать\",\n \"жадный\",\n \"жажда\",\n \"жалеть\",\n \"жанр\",\n \"жара\",\n \"жать\",\n \"жгучий\",\n \"ждать\",\n \"жевать\",\n \"желание\",\n \"жемчуг\",\n \"женщина\",\n \"жертва\",\n \"жесткий\",\n \"жечь\",\n \"живой\",\n \"жидкость\",\n \"жизнь\",\n \"жилье\",\n \"жирный\",\n \"житель\",\n \"журнал\",\n \"жюри\",\n \"забывать\",\n \"завод\",\n \"загадка\",\n \"задача\",\n \"зажечь\",\n \"зайти\",\n \"закон\",\n \"замечать\",\n \"занимать\",\n \"западный\",\n \"зарплата\",\n \"засыпать\",\n \"затрата\",\n \"захват\",\n \"зацепка\",\n \"зачет\",\n \"защита\",\n \"заявка\",\n \"звать\",\n \"звезда\",\n \"звонить\",\n \"звук\",\n \"здание\",\n \"здешний\",\n \"здоровье\",\n \"зебра\",\n \"зевать\",\n \"зеленый\",\n \"земля\",\n \"зенит\",\n \"зеркало\",\n \"зефир\",\n \"зигзаг\",\n \"зима\",\n \"зиять\",\n \"злак\",\n \"злой\",\n \"змея\",\n \"знать\",\n \"зной\",\n \"зодчий\",\n \"золотой\",\n \"зомби\",\n \"зона\",\n \"зоопарк\",\n \"зоркий\",\n \"зрачок\",\n \"зрение\",\n \"зритель\",\n \"зубной\",\n \"зыбкий\",\n \"зять\",\n \"игла\",\n \"иголка\",\n \"играть\",\n \"идея\",\n \"идиот\",\n \"идол\",\n \"идти\",\n \"иерархия\",\n \"избрать\",\n \"известие\",\n \"изгонять\",\n \"издание\",\n \"излагать\",\n \"изменять\",\n \"износ\",\n \"изоляция\",\n \"изрядный\",\n \"изучать\",\n \"изымать\",\n \"изящный\",\n \"икона\",\n \"икра\",\n \"иллюзия\",\n \"имбирь\",\n \"иметь\",\n \"имидж\",\n \"иммунный\",\n \"империя\",\n \"инвестор\",\n \"индивид\",\n \"инерция\",\n \"инженер\",\n \"иномарка\",\n \"институт\",\n \"интерес\",\n \"инфекция\",\n \"инцидент\",\n \"ипподром\",\n \"ирис\",\n \"ирония\",\n \"искать\",\n \"история\",\n \"исходить\",\n \"исчезать\",\n \"итог\",\n \"июль\",\n \"июнь\",\n \"кабинет\",\n \"кавалер\",\n \"кадр\",\n \"казарма\",\n \"кайф\",\n \"кактус\",\n \"калитка\",\n \"камень\",\n \"канал\",\n \"капитан\",\n \"картина\",\n \"касса\",\n \"катер\",\n \"кафе\",\n \"качество\",\n \"каша\",\n \"каюта\",\n \"квартира\",\n \"квинтет\",\n \"квота\",\n \"кедр\",\n \"кекс\",\n \"кенгуру\",\n \"кепка\",\n \"керосин\",\n \"кетчуп\",\n \"кефир\",\n \"кибитка\",\n \"кивнуть\",\n \"кидать\",\n \"километр\",\n \"кино\",\n \"киоск\",\n \"кипеть\",\n \"кирпич\",\n \"кисть\",\n \"китаец\",\n \"класс\",\n \"клетка\",\n \"клиент\",\n \"клоун\",\n \"клуб\",\n \"клык\",\n \"ключ\",\n \"клятва\",\n \"книга\",\n \"кнопка\",\n \"кнут\",\n \"князь\",\n \"кобура\",\n \"ковер\",\n \"коготь\",\n \"кодекс\",\n \"кожа\",\n \"козел\",\n \"койка\",\n \"коктейль\",\n \"колено\",\n \"компания\",\n \"конец\",\n \"копейка\",\n \"короткий\",\n \"костюм\",\n \"котел\",\n \"кофе\",\n \"кошка\",\n \"красный\",\n \"кресло\",\n \"кричать\",\n \"кровь\",\n \"крупный\",\n \"крыша\",\n \"крючок\",\n \"кубок\",\n \"кувшин\",\n \"кудрявый\",\n \"кузов\",\n \"кукла\",\n \"культура\",\n \"кумир\",\n \"купить\",\n \"курс\",\n \"кусок\",\n \"кухня\",\n \"куча\",\n \"кушать\",\n \"кювет\",\n \"лабиринт\",\n \"лавка\",\n \"лагерь\",\n \"ладонь\",\n \"лазерный\",\n \"лайнер\",\n \"лакей\",\n \"лампа\",\n \"ландшафт\",\n \"лапа\",\n \"ларек\",\n \"ласковый\",\n \"лауреат\",\n \"лачуга\",\n \"лаять\",\n \"лгать\",\n \"лебедь\",\n \"левый\",\n \"легкий\",\n \"ледяной\",\n \"лежать\",\n \"лекция\",\n \"лента\",\n \"лепесток\",\n \"лесной\",\n \"лето\",\n \"лечь\",\n \"леший\",\n \"лживый\",\n \"либерал\",\n \"ливень\",\n \"лига\",\n \"лидер\",\n \"ликовать\",\n \"лиловый\",\n \"лимон\",\n \"линия\",\n \"липа\",\n \"лирика\",\n \"лист\",\n \"литр\",\n \"лифт\",\n \"лихой\",\n \"лицо\",\n \"личный\",\n \"лишний\",\n \"лобовой\",\n \"ловить\",\n \"логика\",\n \"лодка\",\n \"ложка\",\n \"лозунг\",\n \"локоть\",\n \"ломать\",\n \"лоно\",\n \"лопата\",\n \"лорд\",\n \"лось\",\n \"лоток\",\n \"лохматый\",\n \"лошадь\",\n \"лужа\",\n \"лукавый\",\n \"луна\",\n \"лупить\",\n \"лучший\",\n \"лыжный\",\n \"лысый\",\n \"львиный\",\n \"льгота\",\n \"льдина\",\n \"любить\",\n \"людской\",\n \"люстра\",\n \"лютый\",\n \"лягушка\",\n \"магазин\",\n \"мадам\",\n \"мазать\",\n \"майор\",\n \"максимум\",\n \"мальчик\",\n \"манера\",\n \"март\",\n \"масса\",\n \"мать\",\n \"мафия\",\n \"махать\",\n \"мачта\",\n \"машина\",\n \"маэстро\",\n \"маяк\",\n \"мгла\",\n \"мебель\",\n \"медведь\",\n \"мелкий\",\n \"мемуары\",\n \"менять\",\n \"мера\",\n \"место\",\n \"метод\",\n \"механизм\",\n \"мечтать\",\n \"мешать\",\n \"миграция\",\n \"мизинец\",\n \"микрофон\",\n \"миллион\",\n \"минута\",\n \"мировой\",\n \"миссия\",\n \"митинг\",\n \"мишень\",\n \"младший\",\n \"мнение\",\n \"мнимый\",\n \"могила\",\n \"модель\",\n \"мозг\",\n \"мойка\",\n \"мокрый\",\n \"молодой\",\n \"момент\",\n \"монах\",\n \"море\",\n \"мост\",\n \"мотор\",\n \"мохнатый\",\n \"мочь\",\n \"мошенник\",\n \"мощный\",\n \"мрачный\",\n \"мстить\",\n \"мудрый\",\n \"мужчина\",\n \"музыка\",\n \"мука\",\n \"мумия\",\n \"мундир\",\n \"муравей\",\n \"мусор\",\n \"мутный\",\n \"муфта\",\n \"муха\",\n \"мучить\",\n \"мушкетер\",\n \"мыло\",\n \"мысль\",\n \"мыть\",\n \"мычать\",\n \"мышь\",\n \"мэтр\",\n \"мюзикл\",\n \"мягкий\",\n \"мякиш\",\n \"мясо\",\n \"мятый\",\n \"мячик\",\n \"набор\",\n \"навык\",\n \"нагрузка\",\n \"надежда\",\n \"наемный\",\n \"нажать\",\n \"называть\",\n \"наивный\",\n \"накрыть\",\n \"налог\",\n \"намерен\",\n \"наносить\",\n \"написать\",\n \"народ\",\n \"натура\",\n \"наука\",\n \"нация\",\n \"начать\",\n \"небо\",\n \"невеста\",\n \"негодяй\",\n \"неделя\",\n \"нежный\",\n \"незнание\",\n \"нелепый\",\n \"немалый\",\n \"неправда\",\n \"нервный\",\n \"нести\",\n \"нефть\",\n \"нехватка\",\n \"нечистый\",\n \"неясный\",\n \"нива\",\n \"нижний\",\n \"низкий\",\n \"никель\",\n \"нирвана\",\n \"нить\",\n \"ничья\",\n \"ниша\",\n \"нищий\",\n \"новый\",\n \"нога\",\n \"ножницы\",\n \"ноздря\",\n \"ноль\",\n \"номер\",\n \"норма\",\n \"нота\",\n \"ночь\",\n \"ноша\",\n \"ноябрь\",\n \"нрав\",\n \"нужный\",\n \"нутро\",\n \"нынешний\",\n \"нырнуть\",\n \"ныть\",\n \"нюанс\",\n \"нюхать\",\n \"няня\",\n \"оазис\",\n \"обаяние\",\n \"обвинять\",\n \"обгонять\",\n \"обещать\",\n \"обжигать\",\n \"обзор\",\n \"обида\",\n \"область\",\n \"обмен\",\n \"обнимать\",\n \"оборона\",\n \"образ\",\n \"обучение\",\n \"обходить\",\n \"обширный\",\n \"общий\",\n \"объект\",\n \"обычный\",\n \"обязать\",\n \"овальный\",\n \"овес\",\n \"овощи\",\n \"овраг\",\n \"овца\",\n \"овчарка\",\n \"огненный\",\n \"огонь\",\n \"огромный\",\n \"огурец\",\n \"одежда\",\n \"одинокий\",\n \"одобрить\",\n \"ожидать\",\n \"ожог\",\n \"озарение\",\n \"озеро\",\n \"означать\",\n \"оказать\",\n \"океан\",\n \"оклад\",\n \"окно\",\n \"округ\",\n \"октябрь\",\n \"окурок\",\n \"олень\",\n \"опасный\",\n \"операция\",\n \"описать\",\n \"оплата\",\n \"опора\",\n \"оппонент\",\n \"опрос\",\n \"оптимизм\",\n \"опускать\",\n \"опыт\",\n \"орать\",\n \"орбита\",\n \"орган\",\n \"орден\",\n \"орел\",\n \"оригинал\",\n \"оркестр\",\n \"орнамент\",\n \"оружие\",\n \"осадок\",\n \"освещать\",\n \"осень\",\n \"осина\",\n \"осколок\",\n \"осмотр\",\n \"основной\",\n \"особый\",\n \"осуждать\",\n \"отбор\",\n \"отвечать\",\n \"отдать\",\n \"отец\",\n \"отзыв\",\n \"открытие\",\n \"отмечать\",\n \"относить\",\n \"отпуск\",\n \"отрасль\",\n \"отставка\",\n \"оттенок\",\n \"отходить\",\n \"отчет\",\n \"отъезд\",\n \"офицер\",\n \"охапка\",\n \"охота\",\n \"охрана\",\n \"оценка\",\n \"очаг\",\n \"очередь\",\n \"очищать\",\n \"очки\",\n \"ошейник\",\n \"ошибка\",\n \"ощущение\",\n \"павильон\",\n \"падать\",\n \"паек\",\n \"пакет\",\n \"палец\",\n \"память\",\n \"панель\",\n \"папка\",\n \"партия\",\n \"паспорт\",\n \"патрон\",\n \"пауза\",\n \"пафос\",\n \"пахнуть\",\n \"пациент\",\n \"пачка\",\n \"пашня\",\n \"певец\",\n \"педагог\",\n \"пейзаж\",\n \"пельмень\",\n \"пенсия\",\n \"пепел\",\n \"период\",\n \"песня\",\n \"петля\",\n \"пехота\",\n \"печать\",\n \"пешеход\",\n \"пещера\",\n \"пианист\",\n \"пиво\",\n \"пиджак\",\n \"пиковый\",\n \"пилот\",\n \"пионер\",\n \"пирог\",\n \"писать\",\n \"пить\",\n \"пицца\",\n \"пишущий\",\n \"пища\",\n \"план\",\n \"плечо\",\n \"плита\",\n \"плохой\",\n \"плыть\",\n \"плюс\",\n \"пляж\",\n \"победа\",\n \"повод\",\n \"погода\",\n \"подумать\",\n \"поехать\",\n \"пожимать\",\n \"позиция\",\n \"поиск\",\n \"покой\",\n \"получать\",\n \"помнить\",\n \"пони\",\n \"поощрять\",\n \"попадать\",\n \"порядок\",\n \"пост\",\n \"поток\",\n \"похожий\",\n \"поцелуй\",\n \"почва\",\n \"пощечина\",\n \"поэт\",\n \"пояснить\",\n \"право\",\n \"предмет\",\n \"проблема\",\n \"пруд\",\n \"прыгать\",\n \"прямой\",\n \"психолог\",\n \"птица\",\n \"публика\",\n \"пугать\",\n \"пудра\",\n \"пузырь\",\n \"пуля\",\n \"пункт\",\n \"пурга\",\n \"пустой\",\n \"путь\",\n \"пухлый\",\n \"пучок\",\n \"пушистый\",\n \"пчела\",\n \"пшеница\",\n \"пыль\",\n \"пытка\",\n \"пыхтеть\",\n \"пышный\",\n \"пьеса\",\n \"пьяный\",\n \"пятно\",\n \"работа\",\n \"равный\",\n \"радость\",\n \"развитие\",\n \"район\",\n \"ракета\",\n \"рамка\",\n \"ранний\",\n \"рапорт\",\n \"рассказ\",\n \"раунд\",\n \"рация\",\n \"рвать\",\n \"реальный\",\n \"ребенок\",\n \"реветь\",\n \"регион\",\n \"редакция\",\n \"реестр\",\n \"режим\",\n \"резкий\",\n \"рейтинг\",\n \"река\",\n \"религия\",\n \"ремонт\",\n \"рента\",\n \"реплика\",\n \"ресурс\",\n \"реформа\",\n \"рецепт\",\n \"речь\",\n \"решение\",\n \"ржавый\",\n \"рисунок\",\n \"ритм\",\n \"рифма\",\n \"робкий\",\n \"ровный\",\n \"рогатый\",\n \"родитель\",\n \"рождение\",\n \"розовый\",\n \"роковой\",\n \"роль\",\n \"роман\",\n \"ронять\",\n \"рост\",\n \"рота\",\n \"роща\",\n \"рояль\",\n \"рубль\",\n \"ругать\",\n \"руда\",\n \"ружье\",\n \"руины\",\n \"рука\",\n \"руль\",\n \"румяный\",\n \"русский\",\n \"ручка\",\n \"рыба\",\n \"рывок\",\n \"рыдать\",\n \"рыжий\",\n \"рынок\",\n \"рысь\",\n \"рыть\",\n \"рыхлый\",\n \"рыцарь\",\n \"рычаг\",\n \"рюкзак\",\n \"рюмка\",\n \"рябой\",\n \"рядовой\",\n \"сабля\",\n \"садовый\",\n \"сажать\",\n \"салон\",\n \"самолет\",\n \"сани\",\n \"сапог\",\n \"сарай\",\n \"сатира\",\n \"сауна\",\n \"сахар\",\n \"сбегать\",\n \"сбивать\",\n \"сбор\",\n \"сбыт\",\n \"свадьба\",\n \"свет\",\n \"свидание\",\n \"свобода\",\n \"связь\",\n \"сгорать\",\n \"сдвигать\",\n \"сеанс\",\n \"северный\",\n \"сегмент\",\n \"седой\",\n \"сезон\",\n \"сейф\",\n \"секунда\",\n \"сельский\",\n \"семья\",\n \"сентябрь\",\n \"сердце\",\n \"сеть\",\n \"сечение\",\n \"сеять\",\n \"сигнал\",\n \"сидеть\",\n \"сизый\",\n \"сила\",\n \"символ\",\n \"синий\",\n \"сирота\",\n \"система\",\n \"ситуация\",\n \"сиять\",\n \"сказать\",\n \"скважина\",\n \"скелет\",\n \"скидка\",\n \"склад\",\n \"скорый\",\n \"скрывать\",\n \"скучный\",\n \"слава\",\n \"слеза\",\n \"слияние\",\n \"слово\",\n \"случай\",\n \"слышать\",\n \"слюна\",\n \"смех\",\n \"смирение\",\n \"смотреть\",\n \"смутный\",\n \"смысл\",\n \"смятение\",\n \"снаряд\",\n \"снег\",\n \"снижение\",\n \"сносить\",\n \"снять\",\n \"событие\",\n \"совет\",\n \"согласие\",\n \"сожалеть\",\n \"сойти\",\n \"сокол\",\n \"солнце\",\n \"сомнение\",\n \"сонный\",\n \"сообщать\",\n \"соперник\",\n \"сорт\",\n \"состав\",\n \"сотня\",\n \"соус\",\n \"социолог\",\n \"сочинять\",\n \"союз\",\n \"спать\",\n \"спешить\",\n \"спина\",\n \"сплошной\",\n \"способ\",\n \"спутник\",\n \"средство\",\n \"срок\",\n \"срывать\",\n \"стать\",\n \"ствол\",\n \"стена\",\n \"стихи\",\n \"сторона\",\n \"страна\",\n \"студент\",\n \"стыд\",\n \"субъект\",\n \"сувенир\",\n \"сугроб\",\n \"судьба\",\n \"суета\",\n \"суждение\",\n \"сукно\",\n \"сулить\",\n \"сумма\",\n \"сунуть\",\n \"супруг\",\n \"суровый\",\n \"сустав\",\n \"суть\",\n \"сухой\",\n \"суша\",\n \"существо\",\n \"сфера\",\n \"схема\",\n \"сцена\",\n \"счастье\",\n \"счет\",\n \"считать\",\n \"сшивать\",\n \"съезд\",\n \"сынок\",\n \"сыпать\",\n \"сырье\",\n \"сытый\",\n \"сыщик\",\n \"сюжет\",\n \"сюрприз\",\n \"таблица\",\n \"таежный\",\n \"таинство\",\n \"тайна\",\n \"такси\",\n \"талант\",\n \"таможня\",\n \"танец\",\n \"тарелка\",\n \"таскать\",\n \"тахта\",\n \"тачка\",\n \"таять\",\n \"тварь\",\n \"твердый\",\n \"творить\",\n \"театр\",\n \"тезис\",\n \"текст\",\n \"тело\",\n \"тема\",\n \"тень\",\n \"теория\",\n \"теплый\",\n \"терять\",\n \"тесный\",\n \"тетя\",\n \"техника\",\n \"течение\",\n \"тигр\",\n \"типичный\",\n \"тираж\",\n \"титул\",\n \"тихий\",\n \"тишина\",\n \"ткань\",\n \"товарищ\",\n \"толпа\",\n \"тонкий\",\n \"топливо\",\n \"торговля\",\n \"тоска\",\n \"точка\",\n \"тощий\",\n \"традиция\",\n \"тревога\",\n \"трибуна\",\n \"трогать\",\n \"труд\",\n \"трюк\",\n \"тряпка\",\n \"туалет\",\n \"тугой\",\n \"туловище\",\n \"туман\",\n \"тундра\",\n \"тупой\",\n \"турнир\",\n \"тусклый\",\n \"туфля\",\n \"туча\",\n \"туша\",\n \"тыкать\",\n \"тысяча\",\n \"тьма\",\n \"тюльпан\",\n \"тюрьма\",\n \"тяга\",\n \"тяжелый\",\n \"тянуть\",\n \"убеждать\",\n \"убирать\",\n \"убогий\",\n \"убыток\",\n \"уважение\",\n \"уверять\",\n \"увлекать\",\n \"угнать\",\n \"угол\",\n \"угроза\",\n \"удар\",\n \"удивлять\",\n \"удобный\",\n \"уезд\",\n \"ужас\",\n \"ужин\",\n \"узел\",\n \"узкий\",\n \"узнавать\",\n \"узор\",\n \"уйма\",\n \"уклон\",\n \"укол\",\n \"уксус\",\n \"улетать\",\n \"улица\",\n \"улучшать\",\n \"улыбка\",\n \"уметь\",\n \"умиление\",\n \"умный\",\n \"умолять\",\n \"умысел\",\n \"унижать\",\n \"уносить\",\n \"уныние\",\n \"упасть\",\n \"уплата\",\n \"упор\",\n \"упрекать\",\n \"упускать\",\n \"уран\",\n \"урна\",\n \"уровень\",\n \"усадьба\",\n \"усердие\",\n \"усилие\",\n \"ускорять\",\n \"условие\",\n \"усмешка\",\n \"уснуть\",\n \"успеть\",\n \"усыпать\",\n \"утешать\",\n \"утка\",\n \"уточнять\",\n \"утро\",\n \"утюг\",\n \"уходить\",\n \"уцелеть\",\n \"участие\",\n \"ученый\",\n \"учитель\",\n \"ушко\",\n \"ущерб\",\n \"уютный\",\n \"уяснять\",\n \"фабрика\",\n \"фаворит\",\n \"фаза\",\n \"файл\",\n \"факт\",\n \"фамилия\",\n \"фантазия\",\n \"фара\",\n \"фасад\",\n \"февраль\",\n \"фельдшер\",\n \"феномен\",\n \"ферма\",\n \"фигура\",\n \"физика\",\n \"фильм\",\n \"финал\",\n \"фирма\",\n \"фишка\",\n \"флаг\",\n \"флейта\",\n \"флот\",\n \"фокус\",\n \"фольклор\",\n \"фонд\",\n \"форма\",\n \"фото\",\n \"фраза\",\n \"фреска\",\n \"фронт\",\n \"фрукт\",\n \"функция\",\n \"фуражка\",\n \"футбол\",\n \"фыркать\",\n \"халат\",\n \"хамство\",\n \"хаос\",\n \"характер\",\n \"хата\",\n \"хватать\",\n \"хвост\",\n \"хижина\",\n \"хилый\",\n \"химия\",\n \"хирург\",\n \"хитрый\",\n \"хищник\",\n \"хлам\",\n \"хлеб\",\n \"хлопать\",\n \"хмурый\",\n \"ходить\",\n \"хозяин\",\n \"хоккей\",\n \"холодный\",\n \"хороший\",\n \"хотеть\",\n \"хохотать\",\n \"храм\",\n \"хрен\",\n \"хриплый\",\n \"хроника\",\n \"хрупкий\",\n \"художник\",\n \"хулиган\",\n \"хутор\",\n \"царь\",\n \"цвет\",\n \"цель\",\n \"цемент\",\n \"центр\",\n \"цепь\",\n \"церковь\",\n \"цикл\",\n \"цилиндр\",\n \"циничный\",\n \"цирк\",\n \"цистерна\",\n \"цитата\",\n \"цифра\",\n \"цыпленок\",\n \"чадо\",\n \"чайник\",\n \"часть\",\n \"чашка\",\n \"человек\",\n \"чемодан\",\n \"чепуха\",\n \"черный\",\n \"честь\",\n \"четкий\",\n \"чехол\",\n \"чиновник\",\n \"число\",\n \"читать\",\n \"членство\",\n \"чреватый\",\n \"чтение\",\n \"чувство\",\n \"чугунный\",\n \"чудо\",\n \"чужой\",\n \"чукча\",\n \"чулок\",\n \"чума\",\n \"чуткий\",\n \"чучело\",\n \"чушь\",\n \"шаблон\",\n \"шагать\",\n \"шайка\",\n \"шакал\",\n \"шалаш\",\n \"шампунь\",\n \"шанс\",\n \"шапка\",\n \"шарик\",\n \"шасси\",\n \"шатер\",\n \"шахта\",\n \"шашлык\",\n \"швейный\",\n \"швырять\",\n \"шевелить\",\n \"шедевр\",\n \"шейка\",\n \"шелковый\",\n \"шептать\",\n \"шерсть\",\n \"шестерка\",\n \"шикарный\",\n \"шинель\",\n \"шипеть\",\n \"широкий\",\n \"шить\",\n \"шишка\",\n \"шкаф\",\n \"школа\",\n \"шкура\",\n \"шланг\",\n \"шлем\",\n \"шлюпка\",\n \"шляпа\",\n \"шнур\",\n \"шоколад\",\n \"шорох\",\n \"шоссе\",\n \"шофер\",\n \"шпага\",\n \"шпион\",\n \"шприц\",\n \"шрам\",\n \"шрифт\",\n \"штаб\",\n \"штора\",\n \"штраф\",\n \"штука\",\n \"штык\",\n \"шуба\",\n \"шуметь\",\n \"шуршать\",\n \"шутка\",\n \"щадить\",\n \"щедрый\",\n \"щека\",\n \"щель\",\n \"щенок\",\n \"щепка\",\n \"щетка\",\n \"щука\",\n \"эволюция\",\n \"эгоизм\",\n \"экзамен\",\n \"экипаж\",\n \"экономия\",\n \"экран\",\n \"эксперт\",\n \"элемент\",\n \"элита\",\n \"эмблема\",\n \"эмигрант\",\n \"эмоция\",\n \"энергия\",\n \"эпизод\",\n \"эпоха\",\n \"эскиз\",\n \"эссе\",\n \"эстрада\",\n \"этап\",\n \"этика\",\n \"этюд\",\n \"эфир\",\n \"эффект\",\n \"эшелон\",\n \"юбилей\",\n \"юбка\",\n \"южный\",\n \"юмор\",\n \"юноша\",\n \"юрист\",\n \"яблоко\",\n \"явление\",\n \"ягода\",\n \"ядерный\",\n \"ядовитый\",\n \"ядро\",\n \"язва\",\n \"язык\",\n \"яйцо\",\n \"якорь\",\n \"январь\",\n \"японец\",\n \"яркий\",\n \"ярмарка\",\n \"ярость\",\n \"ярус\",\n \"ясный\",\n \"яхта\",\n \"ячейка\",\n \"ящик\" \n ];\n }", "function __($word) {\n global $cfg;\n if (isset($_GET['lang'])) {\n include(\"langs/\".$_GET['lang'].\".php\");\n } else include(\"langs/\".$cfg[\"default_language\"].\".php\"); \n\n return isset($translations[$word]) ? $translations[$word] : $word;\n}", "public function getLang();", "function getAll()\r\n\t\t{\r\n\t\t\treturn $this->lang;\r\n\t\t}", "function getDictionary ()\n\t{\n\t\t$dictionary = array ();\n\t\tinclude ('framework/i18n/dictionary_en.php');\n\t\t$file = 'framework/i18n/dictionary_'.$_SESSION['brimLanguage'].'.php';\n\t\tif (file_exists ($file))\n\t\t{\n\t\t\tinclude ($file);\n\t\t}\n\t\treturn $dictionary;\n\t}", "public function messages()\n {\n $pieces = explode('\\\\', __CLASS__);\n $pack = mb_strtolower($pieces[1]);\n // dddx($pieces);\n $pieces = \\array_slice($pieces, 3);\n $pieces = collect($pieces)->map(\n function ($item) {\n return snake_case($item);\n }\n )->all();\n $trad_name = $pack.'::'.implode('.', $pieces);\n $trad = trans($trad_name);\n if (! \\is_array($trad)) {\n // dddx($trad_name.' is not an array');\n $trad = [];\n }\n $tradGeneric = trans('ui::generic'); // deve funzionare anche senza il pacchetto \"food\", invece \"extend\" e' un pacchetto primario\n if (! \\is_array($tradGeneric)) {\n $tradGeneric = [];\n }\n $trad = array_merge($tradGeneric, $trad);\n\n return $trad;\n }", "function getCVocabularyNames() {\n\t global $sotfVars;\n\t // avail langs are stored in sotf_vars and updated by install.php\n\t // roles\n\t $langs = explode(',', $sotfVars->get('roles_langs', 'eng'));\n\t foreach($langs as $l) {\n\t\t$retval[] = array(\"roles\",\"\",$l);\n\t }\n\t // genres\n\t $langs = explode(',', $sotfVars->get('genres_langs', 'eng'));\n\t foreach($langs as $l) {\n\t\t$retval[] = array(\"genres\",\"\",$l);\n\t }\n\t // subject trees\n\t $trees = $this->listTrees();\n\t foreach($trees as $t) {\n\t\t$langs = explode(',', $t['languages']);\n\t\tforeach($langs as $l) {\n\t\t $retval[] = array(\"topics\", $t['tree_id'], $l);\n\t\t}\n\t }\n\t return $retval;\n }", "static private function ___translate___()\n {\n _('RECORD\\Farthest %1$s from Sagittarius A*');\n }", "public static function getSystemLanguages() {}", "public function translations()\n\t{\n\t\treturn $this->hasMany($this->getTranslatorClassName(), 'original_id');\n\t}", "public function getAllWords(){\n $handle = fopen(\"assets/en-US.dic\", \"r\");\n $words = [];\n $i=0;\n if ($handle) {\n while (($line = fgets($handle)) !== false) {\n $line = trim(preg_replace('/\\s\\s+/', ' ', $line));\n $line = strtolower($line);\n $yy = strpos($line, \"'\");\n if(!is_numeric($yy) && strlen($line) < 15 && strlen($line) > 2){\n $words[] = $line;\n }\n }\n fclose($handle);\n return ['status'=>1, 'message'=>'Success', 'body'=>$words];\n } else {\n return ['status'=>0, 'message'=>'Error', 'body'=>'Unable to read dictionary file!'];\n }\n }", "public function inEnglish()\n {\n return $this->getTranslationIn('en');\n }", "protected function getDictionary()\n {\n $schemaClass = get_class($this->schema);\n $locale = $this->language;\n $key = \"$schemaClass/$locale\";\n if ( !isset($this->dictionary[$key]) ) {\n $dict=[];\n // model indexes\n $indexNames = $this->schema->getIndexNames();\n foreach ( $indexNames as $index) {\n $fields = $this->schema->getIndexFields($index);\n foreach ($fields as $field ) {\n $translated = $this->schema->getFieldLabel($field);\n $translated = \\mb_strtolower($translated, 'UTF-8');\n $dict[$translated] = $field;\n // add the root form of German gendered words (\"Autor/in\"=> \"Autor\"), todo: make this more universal\n $de_gendered = substr($locale,0,2) === \"de\"\n and ( $pos = strpos($translated, \"/\") or $pos = strpos($translated, \"*\"));\n if ( $de_gendered ) {\n $dict[substr($translated, 0, $pos)] = $field;\n }\n }\n }\n // modifiers and booleans\n foreach ( $this->operators as $operator) {\n // save the lowercase version of the translation for fast lookup\n $translations = $this->getOperatorData($operator)['translation'];\n //Yii::info([Yii::$app->language, $operator, $translations ]);\n foreach ((array) $translations as $translation) {\n // remove placeholder tokens\n $replace_placeholders = ['{leftOperand}','{rightOperand}','{field}','{value}'];\n $translation = \\mb_strtolower( trim(str_replace($replace_placeholders,'', $translation)), 'UTF-8');\n $dict[$translation] = $operator;\n }\n }\n $this->dictionary[$key] = $dict;\n //if( $locale!=\"en-US\") Yii::debug($dict, __METHOD__);\n }\n return $this->dictionary[$key];\n }", "public function allTranslations()\n {\n return $this->allLanguages()->mapWithKeys(function ($name, $language) {\n return [$language => $this->allTranslationsFor($language)];\n });\n }", "public function getTranslation($key = '')\n {\n return self::$translations[$key];\n }", "function getTranslationObject();", "function wp_get_translation_updates()\n {\n }", "function yourls_get_translations_for_domain( $domain ) {\n\tglobal $yourls_l10n;\n\tif ( !isset( $yourls_l10n[$domain] ) ) {\n\t\t$yourls_l10n[$domain] = new NOOPTranslations;\n\t}\n\treturn $yourls_l10n[$domain];\n}", "protected function setMessagesInCommonLanguage(&$texts)\n {\n if ($this->_locale != $this->_commonLanguageId) {\n $textsLang = $this->getMessagesByLanguage($texts, array($this->_commonLanguageId));\n foreach ($texts as &$text) {\n $mess = '';\n foreach ($textsLang as $textLang) {\n if ($text['hash'] == $textLang['hash']) {\n $mess = $textLang['target']['target'];\n break;\n }\n }\n $text['commonLang'] = $mess;\n }\n }\n }", "private function getTranslatedFields() {\n $langs = explode(',',$_REQUEST['translations']);\n\t\t$translations = array();\n\t\tforeach($langs as $lang){\t\t\n\t\t\t$translations[$lang] = array(\n\t\t\t\t'id' => (int) $_REQUEST['TranslationID'.$lang],\n\t\t\t\t'pagetitle' => $_REQUEST['pagetitle'.$lang],\n\t\t\t\t'longtitle' => $_REQUEST['longtitle'.$lang],\n\t\t\t\t'menutitle' => $_REQUEST['menutitle'.$lang],\n\t\t\t\t'introtext' => $_REQUEST['introtext'.$lang],\n\t\t\t\t'description' => $_REQUEST['description'.$lang],\n\t\t\t\t'content' => $_REQUEST['content'.$lang],\n\t\t\t);\n\t\t\tforeach($translations[$lang] as $key => $val){\n\t\t\t\tif($translations[$lang][$key] == null){\n\t\t\t\t $translations[$lang][$key] = '';\n\t\t\t\t};\n\t\t\t};\t\n\t\t};\n\t\treturn $translations;\t\t\n\t}", "public function getTextsWithBaseTexts($language);", "abstract public function get_app_language();", "protected function extract_strings() {\n\t\t$translations = new Translations();\n\n\t\t// Add existing strings first but don't keep headers.\n\t\tif ( ! empty( $this->merge ) ) {\n\t\t\t$existing_translations = new Translations();\n\t\t\tPo::fromFile( $this->merge, $existing_translations );\n\t\t\t$translations->mergeWith( $existing_translations, Merge::ADD | Merge::REMOVE );\n\t\t}\n\n\t\tPotGenerator::setCommentBeforeHeaders( $this->get_file_comment() );\n\n\t\t$this->set_default_headers( $translations );\n\n\t\t// POT files have no Language header.\n\t\t$translations->deleteHeader( Translations::HEADER_LANGUAGE );\n\n\t\t// Only relevant for PO files, not POT files.\n\t\t$translations->setHeader( 'PO-Revision-Date', 'YEAR-MO-DA HO:MI+ZONE' );\n\n\t\tif ( $this->domain ) {\n\t\t\t$translations->setDomain( $this->domain );\n\t\t}\n\n\t\tunset( $this->main_file_data['Version'], $this->main_file_data['License'], $this->main_file_data['Domain Path'], $this->main_file_data['Text Domain'] );\n\n\t\t$is_theme = isset( $this->main_file_data['Theme Name'] );\n\n\t\t// Set entries from main file data.\n\t\tforeach ( $this->main_file_data as $header => $data ) {\n\t\t\tif ( empty( $data ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$translation = new Translation( '', $data );\n\n\t\t\tif ( $is_theme ) {\n\t\t\t\t$translation->addExtractedComment( sprintf( '%s of the theme', $header ) );\n\t\t\t} else {\n\t\t\t\t$translation->addExtractedComment( sprintf( '%s of the plugin', $header ) );\n\t\t\t}\n\n\t\t\t$translations[] = $translation;\n\t\t}\n\n\t\ttry {\n\t\t\tif ( ! $this->skip_php ) {\n\t\t\t\t$options = [\n\t\t\t\t\t// Extract 'Template Name' headers in theme files.\n\t\t\t\t\t'wpExtractTemplates' => $is_theme,\n\t\t\t\t\t// Extract 'Title' and 'Description' headers from pattern files.\n\t\t\t\t\t'wpExtractPatterns' => $is_theme,\n\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t'extensions' => [ 'php' ],\n\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t];\n\t\t\t\tPhpCodeExtractor::fromDirectory( $this->source, $translations, $options );\n\t\t\t}\n\n\t\t\tif ( ! $this->skip_blade ) {\n\t\t\t\t$options = [\n\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t'extensions' => [ 'blade.php' ],\n\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t];\n\t\t\t\tBladeCodeExtractor::fromDirectory( $this->source, $translations, $options );\n\t\t\t}\n\n\t\t\tif ( ! $this->skip_js ) {\n\t\t\t\tJsCodeExtractor::fromDirectory(\n\t\t\t\t\t$this->source,\n\t\t\t\t\t$translations,\n\t\t\t\t\t[\n\t\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t\t'extensions' => [ 'js', 'jsx' ],\n\t\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\tMapCodeExtractor::fromDirectory(\n\t\t\t\t\t$this->source,\n\t\t\t\t\t$translations,\n\t\t\t\t\t[\n\t\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t\t'extensions' => [ 'map' ],\n\t\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( ! $this->skip_block_json ) {\n\t\t\t\tBlockExtractor::fromDirectory(\n\t\t\t\t\t$this->source,\n\t\t\t\t\t$translations,\n\t\t\t\t\t[\n\t\t\t\t\t\t'schema' => JsonSchemaExtractor::BLOCK_JSON_SOURCE,\n\t\t\t\t\t\t'schemaFallback' => JsonSchemaExtractor::BLOCK_JSON_FALLBACK,\n\t\t\t\t\t\t// Only look for block.json files, nothing else.\n\t\t\t\t\t\t'restrictFileNames' => [ 'block.json' ],\n\t\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t\t'extensions' => [ 'json' ],\n\t\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( ! $this->skip_theme_json ) {\n\t\t\t\t// This will look for the top-level theme.json file, as well as\n\t\t\t\t// any JSON file within the top-level styles/ directory.\n\t\t\t\tThemeJsonExtractor::fromDirectory(\n\t\t\t\t\t$this->source,\n\t\t\t\t\t$translations,\n\t\t\t\t\t[\n\t\t\t\t\t\t'schema' => JsonSchemaExtractor::THEME_JSON_SOURCE,\n\t\t\t\t\t\t'schemaFallback' => JsonSchemaExtractor::THEME_JSON_FALLBACK,\n\t\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t\t'extensions' => [ 'json' ],\n\t\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t}\n\t\t} catch ( \\Exception $e ) {\n\t\t\tWP_CLI::error( $e->getMessage() );\n\t\t}\n\n\t\tforeach ( $this->exceptions as $file => $exception_translations ) {\n\t\t\t/** @var Translation $exception_translation */\n\t\t\tforeach ( $exception_translations as $exception_translation ) {\n\t\t\t\tif ( ! $translations->find( $exception_translation ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( $this->subtract_and_merge ) {\n\t\t\t\t\t$translation = $translations[ $exception_translation->getId() ];\n\t\t\t\t\t$exception_translation->mergeWith( $translation );\n\t\t\t\t}\n\n\t\t\t\tunset( $translations[ $exception_translation->getId() ] );\n\t\t\t}\n\n\t\t\tif ( $this->subtract_and_merge ) {\n\t\t\t\tPotGenerator::toFile( $exception_translations, $file );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $this->skip_audit ) {\n\t\t\t$this->audit_strings( $translations );\n\t\t}\n\n\t\treturn $translations;\n\t}", "public function synchTranslations() {\n\t\t//header('Content-type: text/html; charset=utf-8');\n\t\t$player = User::getUser();\n\t\t$lang = $this->params['lang'];\n\n\t\t//ONLY English!\n\t\t$lang = \"EN\";\n\t\tif (!$player or $player->canAccess('Super Admin Interface') !== TRUE or strlen($lang) != 2) {\n\t\t\tDooUriRouter::redirect(Doo::conf()->APP_URL);\n\t\t\treturn false;\n\t\t}\n\n\t\t$file_names = array();\n\t\t$path = Doo::conf()->SITE_PATH . 'protected';\n\t\tExternalController::scanFileNameRecursivly($path, $file_names);\n\n\t\t//$translator = Doo::translator('Csv', Doo::conf()->SITE_PATH . 'protected/lang/' . $lang . '/' . $lang . //'.csv');\n\t\t$translator = Doo::translator('database', $lang);\n\n\t\t$fileResult = array();\n\n\t\tforeach ($file_names as $file) {\n\n\t\t\tif (file_exists($file)) {\n\n\t\t\t\t$content = file_get_contents($file);\n\n\t\t\t\t$clen = strlen($content);\n\n\t\t\t\t$pos = 0;\n\t\t\t\twhile ($pos = strpos($content, 'this'.'->__(', $pos))\n\t\t\t\t{\n\t\t\t\t\tif ($pos)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Get ''\n\t\t\t\t\t\tif ($content[$pos+9]==\"'\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$res = \"\";\n\t\t\t\t\t\t\t$pos1 = strpos($content, \"'\", $pos+1);\n\t\t\t\t\t\t\t$pos2 = strpos($content, \"'\", $pos1+1);\n\n\t\t\t\t\t\t\tfor ($i=$pos1+1;$i<$pos2;$i++)\n\t\t\t\t\t\t\t\t$res .= $content[$i];\n\t\t\t\t\t\t\t$fileResult[] = $res;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Get \"\"\n\t\t\t\t\t\tif ($content[$pos+9]=='\"')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$res = \"\";\n\t\t\t\t\t\t\t$pos1 = strpos($content, '\"', $pos+1);\n\t\t\t\t\t\t\t$pos2 = strpos($content, '\"', $pos1+1);\n\n\t\t\t\t\t\t\tfor ($i=$pos1+1;$i<$pos2;$i++)\n\t\t\t\t\t\t\t\t$res .= $content[$i];\n\t\t\t\t\t\t\t$fileResult[] = $res;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$pos++;\n\t\t\t\t}\n\n\t\t\t\t// Check for snController - used when this can not be used\n\t\t\t\t$pos = 0;\n\t\t\t\twhile ($pos = strpos($content, 'snController'.'->__(', $pos))\n\t\t\t\t{\n\t\t\t\t\tif ($pos)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Get ''\n\t\t\t\t\t\tif ($content[$pos+17]==\"'\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$res = \"\";\n\t\t\t\t\t\t\t$pos1 = strpos($content, \"'\", $pos+1);\n\t\t\t\t\t\t\t$pos2 = strpos($content, \"'\", $pos1+1);\n\n\t\t\t\t\t\t\tfor ($i=$pos1+1;$i<$pos2;$i++)\n\t\t\t\t\t\t\t\t$res .= $content[$i];\n\t\t\t\t\t\t\t$fileResult[] = $res;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Get \"\"\n\t\t\t\t\t\tif ($content[$pos+17]=='\"')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$res = \"\";\n\t\t\t\t\t\t\t$pos1 = strpos($content, '\"', $pos+1);\n\t\t\t\t\t\t\t$pos2 = strpos($content, '\"', $pos1+1);\n\n\t\t\t\t\t\t\tfor ($i=$pos1+1;$i<$pos2;$i++)\n\t\t\t\t\t\t\t\t$res .= $content[$i];\n\t\t\t\t\t\t\t$fileResult[] = $res;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$pos++;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\techo \"No file\";\n\t\t\t}\n\t\t}\n $fileResult = array_unique($fileResult);\n //Fetch and compare texts from database with collected fileresults to find unused texts and delete them\n if (!empty($fileResult)) {\n echo \"TRANSLATION KEY DELETION: <br/><br/>\";\n\n $dRows = 0;\n $screentexts = new GeScreenTexts();\n $params['select'] = \"{$screentexts->_table}.ID_TEXT, {$screentexts->_table}.TransKey\";\n $dbKeys = Doo::db()->find('GeScreenTexts', $params);\n foreach($dbKeys as $text) {\n $key = array_search($text->TransKey, $fileResult);\n // If key isn't used, delete it\n if(!$key) {\n $query = \"DELETE FROM ge_screentexts WHERE ID_TEXT={$text->ID_TEXT}\";\n echo \"Deleted: $text->TransKey<br/>\";\n Doo::db()->query($query);\n $dRows++;\n }\n }\n echo \"$dRows keys deleted<br/><br/>\";\n }\n\n\t\t//Loop thru the collected fileresults and find new untranslated texts and insert them\n\t\tif (!empty($fileResult)) {\n\t\t\techo \"FILE TRANSLATION: <br/><br/>\";\n\n\t\t\t$nRows = 0;\n\t\t\tforeach ($fileResult as $item)\n\t\t\t{\n\t\t\t\t$query = \"SELECT COUNT(*) as n FROM ge_screentexts WHERE TransKey=\" .'\"' . $item . '\"';\n\n\t\t\t\t$o = (object)Doo::db()->fetchRow($query);\n\t\t\t\t$n = $o->n;\n\n\t\t\t\tif ($n==0)\n\t\t\t\t{\n\t\t\t\t\t$query = \"INSERT INTO ge_screentexts\".\n\t\t\t\t\t\t\t \"(TransKey,TransTextEN,TransTextDA,TransTextDE,TransTextFR,TransTextES,TransTextRO,TransTextLT,TransTextBG,\".\n\t\t\t\t\t\t\t \"TransTextNL,TransTextEL,TransTextTR,TransTextZH,TransTextIS,TransTextBR,TransTextTH,TransTextPT,TransTextRU,\".\n\t\t\t\t\t\t\t \"TransTextPL,TransTextFI,TransTextFA,TransTextDR,TransTextNO,TransTextSE,TransTextHU,TransTextAR,TransTextET)\".\n\t\t\t\t\t\t\t \"VALUES (\".'\"'.$item.'\",\"'.$item.'\"'.\",'','','','','','','','','','','','','','','','','','','','','','','','','')\";\n\t\t\t\t\techo \"New: $item<br/>\";\n\t\t\t\t\tDoo::db()->query($query);\n\t\t\t\t\t//echo \" - $query<br/>\";\n\t\t\t\t\t$nRows++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\techo \"$nRows new rows added<br/>\";\n\t\t}\n\n\n\t\techo \"<p>Synch translations done</p>\";\n\t\texit;\n\n\t}", "function __(string $translate, string $locale = null, array $values = []) : string\n {\n return I18n::find($translate, $locale, $values);\n }", "public static function getTranslations() {\n $settings = self::getSettings();\n return json_decode($settings->translations, true);\n }", "public function getTranslations()\n {\n return $this->hasMany(NewsItemLang::class, ['news_item_id' => 'id']);\n }", "function issuu_get_languages() {\n $predefined = _locale_get_predefined_list();\n foreach ($predefined as $key => $value) {\n // Issuu doesn't support variants (for example pt-br), so skip those.\n if (strlen($key) != 2) {\n unset($predefined[$key]);\n continue;\n }\n // Include native name in output, if possible\n if (count($value) > 1) {\n $tname = t($value[0]);\n $predefined[$key] = ($tname == $value[1]) ? $tname : \"$tname ($value[1])\";\n }\n else {\n $predefined[$key] = t($value[0]);\n }\n }\n asort($predefined);\n return $predefined;\n}", "public function languages();", "function my_text_strings( $translated_text, $text, $domain ) {\n switch ( $translated_text ) {\n case 'Ver carrito' :\n $translated_text = __( 'Agregaste este producto ¿Quieres ver el Carrito?', 'woocommerce' );\n break;\n case 'Log in' :\n $translated_text = __( 'Entrar', 'woocommerce' );\n break;\n case 'Cart totals' :\n $translated_text = __( 'Total del carrito', 'woocommerce' );\n break;\n case 'Proceed to checkout' :\n $translated_text = __( 'Proceder a revision', 'woocommerce' );\n break;\n case 'Shipping' :\n $translated_text = __( 'Envio', 'woocommerce' );\n break;\n case 'Sort By' :\n $translated_text = __( 'Ordenar por', 'woocommerce' );\n break;\n case 'Price Range' :\n $translated_text = __( 'Rango de precio', 'woocommerce' );\n break;\n case 'Categories' :\n $translated_text = __( 'Categorias', 'woocommerce' );\n break;\n case 'None' :\n $translated_text = __( 'Ninguna', 'woocommerce' );\n break;\n case 'Review Count' :\n $translated_text = __( 'Recuento de revisión', 'woocommerce' );\n break;\n case 'Popularity' :\n $translated_text = __( 'Popularidad', 'woocommerce' );\n break;\n case 'Average rating' :\n $translated_text = __( 'Puntuación media', 'woocommerce' );\n break;\n case 'Newness' :\n $translated_text = __( 'Novedad', 'woocommerce' );\n break;\n case 'Price: low to high' :\n $translated_text = __( 'Precios de Menor a Mayor', 'woocommerce' );\n break;\n case 'Price: high to low' :\n $translated_text = __( 'Precio: de Mayor a Menor', 'woocommerce' );\n break;\n case 'Random Products' :\n $translated_text = __( 'Productos Aleatorios', 'woocommerce' );\n break;\n case 'Product Name' :\n $translated_text = __( 'Alfabeticamente', 'woocommerce' );\n break;\n case 'Related products' :\n $translated_text = __( 'Productos relacionados', 'woocommerce' );\n break;\n case 'has been added to your cart.' :\n $translated_text = __( 'Ha sido agregado a tu carro', 'woocommerce' );\n break;\n case 'Company name' :\n $translated_text = __( 'Nombre de empresa', 'woocommerce' );\n break;\n case '(optional)' :\n $translated_text = __( '(Opcional)', 'woocommerce' );\n break;\n case 'Street address' :\n $translated_text = __( 'Dirección', 'woocommerce' );\n break;\n case 'Apartment, suite, unit etc. (optional)' :\n $translated_text = __( 'Apartamento, suite, unidad, etc. (opcional)', 'woocommerce' );\n break;\n case 'Email address' :\n $translated_text = __( 'Dirección de correo electrónico', 'woocommerce' );\n break;\n case 'Ship to a different address?' :\n $translated_text = __( '¿Envia a una direccion diferente?', 'woocommerce' );\n break;\n case 'Notes about your order, e.g. special notes for delivery.' :\n $translated_text = __( 'Notas especiales para la entrega.', 'woocommerce' );\n break;\n case 'Shipping' :\n $translated_text = __( 'Envio', 'woocommerce' );\n break;\n\n case 'Billing details' :\n $translated_text = __( 'Detalles de facturación', 'woocommerce' );\n break;\n case 'Direct bank transfer' :\n $translated_text = __( 'Transferencia bancaria directa', 'woocommerce' );\n break;\n case 'Gracias. Tu pedido ha sido recibido.' :\n $translated_text = __( '¡Gracias por su compra!. Su pedido ha sido recibido con exito. Si precisa cualquier aclaracion o tiene alguna duda, use el formulario de CONTACTANOS para hacernos llegar su consulta. En breve nos pondremos en contacto con usted para confirmar su pedido y cuando le sera enviado. ', 'woocommerce' );\n break;\n case 'PayPal Express Checkout' :\n $translated_text = __( 'PayPal Pago exprés', 'woocommerce' );\n break;\n \n case 'privacy policy' :\n $translated_text = __( 'Politicas de Privacidad', 'woocommerce' );\n break;\n\n case 'Continue to payment' :\n $translated_text = __( 'Continuar con el pago', 'woocommerce' );\n break;\n case 'Undo?' :\n $translated_text = __( '¿Deshacer?', 'woocommerce' );\n break;\n case 'Return to shop' :\n $translated_text = __( 'Tienda', 'woocommerce' );\n break;\n case 'From your account dashboard you can view your ':\n $translated_text = __( 'Desde el panel de su cuenta puede ver su', 'woocommerce-page' );\n break;\n case 'recent orders':\n $translated_text = __( 'ordenes recientes', 'woocommerce-page' );\n break;\n case ', manage your ':\n $translated_text = __( 'administrar su', 'woocommerce-page' );\n break;\n }\n return $translated_text;\n}", "function yourls_translate( $text, $domain = 'default' ) {\n\t$translations = yourls_get_translations_for_domain( $domain );\n\treturn yourls_apply_filter( 'translate', $translations->translate( $text ), $text, $domain );\n}", "function print_lang($name) {\n global $lang;\n echo $lang->get_phrase($name);\n}", "function __t($key, $values = null)\n{\n // Get current locale\n $locale = cache()->rememberForever('language', function () {\n try {\n return get_setting('language') ?? 'en';\n } catch (\\Illuminate\\Database\\QueryException $e) {\n return 'en';\n }\n });\n\n // Get language strings\n $strings = cache()->rememberForever(\"language-translations-$locale\", function () use ($locale) {\n try {\n return Language::whereLocale($locale)->firstOrFail()->languageTranslations;\n } catch (QueryException | ModelNotFoundException $e) {\n return null;\n }\n }) ?? get_default_language_translations();\n\n // Find the string by key\n $string = $strings->firstWhere('key', $key)->value ?? $strings->get($key);\n\n if ($values) {\n return replace_occurrence($string, collect($values));\n }\n\n return $string;\n}", "public function getTranslatedTerms()\n {\n return $this->translated_terms;\n }", "function &getTranslations(){\n\t\tif ( isset( $this->_cache[__FUNCTION__]) ) return $this->_cache[__FUNCTION__];\n\t\t$tables =& $this->tables();\n\t\t$translations = array();\n\t\tforeach ( array_keys($tables) as $tablename){\n\t\t\t$translations = array_merge($translations, $tables[$tablename]->getTranslations());\n\t\t}\n\t\t$this->_cache[__FUNCTION__] =& $translations;\n\t\treturn $translations;\n\t\t\n\t}", "function lng($text, $lng = '') {\n\tglobal $_base_path_cms, $_lang_cms, $_lang_array;\n\n\tif(empty($lng)) {\n\t\tif($_lang_cms == \"\") $_lang_cms = \"ro\";\n\t\t$return = lng($text, $_lang_cms);\n\n\t\tif(!empty($return)) {\n\t\t\treturn $_lang_array[$return];\n\t\t}\n\n\t\treturn $text;\n\t} else {\n\t\t/*\n\t\tinclude $_base_path_cms.'lang/'.$lng.'.php';\n\t\tif(is_file($_base_path_cms . 'lang/extra/'.$lng.'.php')){\n\t\t\tinclude $_base_path_cms . 'lang/extra/'.$lng.'.php';\n\t\t}\n\t\t*/\n\t\tif(isset($_lang_array[$text])) return $text;\n\n\t\t$key = array_search($text, $_lang_array);\n\t\tif(!empty($key)) return $key;\n\t}\n}", "public function inSomali()\n {\n return $this->getTranslationIn('so');\n }", "public function _getTranslations($msv, $primary_msv, $charset) {\n\t\t\tglobal $db, $testing;\n\t\t\t$labels=array();\n\t\t\t$testing = false;\n\t\t\t// Collect tranlsations\n\t\t\t$query=\"select shortname, lt.longname as translation from labels l left join labels_translations lt on l.id=lt.label_id where lt.msv=$msv\";\n\t\t\tif ($testing) print \"$query<br>\";\n\t\t\t$results=$db->get_results($query);\n\t\t\tif (!$results) {\n\t\t\t\tif ($msv!=$primary_msv) {\n\t\t\t\t\t$query=\"select shortname, lt.longname as translation from labels l left join labels_translations lt on l.id=lt.label_id where lt.msv=$primary_msv\";\n\t\t\t\t\tif ($testing) print \"$query<br>\";\n\t\t\t\t\t$results=$db->get_results($query);\n\t\t\t\t}\n\t\t\t\tif (!$results) {\n\t\t\t\t\t$query=\"select shortname, longname as translation from labels l\";\n\t\t\t\t\tif ($testing) print \"$query<br>\";\n\t\t\t\t\t$results=$db->get_results($query);\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach($results as $result) {\n\t\t\t\t$translation=$result->translation?$result->translation:$result->english;\n\t\t\t\t$labels[$result->shortname]=htmlspecialchars($translation, ENT_QUOTES, $charset);\n\t\t\t}\n\t\t\tif ($testing) print_r($labels);\n\t\t\treturn $labels;\n\t\t}", "function GetLanguages() // static function\r\n\t{\r\n\t\treturn array_keys ( $this->m_languages );\r\n\t}", "abstract public function translate($sentence);", "public function getPageTexts($language);", "public function getDifferentLanguages()\n\t{\n\t\t$sql = <<<TRANSLATIONS\nSELECT\n\t*\nFROM\n\t`i18n_language_codes`\nWHERE l10n IS NOT NULL\nORDER BY\n\tenglish_name ASC\nTRANSLATIONS;\n\n\treturn $this->GetArray( $sql, array( 'tag' => 'List of different languages in DB' ) );\n\t}", "public function translationMessages()\n {\n return [];\n }", "function get_translations_for_domain($domain)\n {\n }", "private function generateLanguageBar()\n {\n $languages = $this->translator->getLanguage()->getLanguageList();\n $langmap = null;\n if (count($languages) > 1) {\n $parameterName = $this->getTranslator()->getLanguage()->getLanguageParameterName();\n $langmap = array();\n foreach ($languages as $lang => $current) {\n $lang = strtolower($lang);\n $langname = $this->translator->getLanguage()->getLanguageLocalizedName($lang);\n $url = false;\n if (!$current) {\n $url = htmlspecialchars(\\SimpleSAML\\Utils\\HTTP::addURLParameters(\n '',\n array($parameterName => $lang)\n ));\n }\n $langmap[$lang] = array(\n 'name' => $langname,\n 'url' => $url,\n );\n }\n }\n return $langmap;\n }", "public static function languagesForAdmin()\n {\n $copies = Copy::serverTranslations();\n\n $languages = self::languages();\n\n foreach (LANGUAGES as $key => $value) {\n $localized[] = [\n 'key' => $key,\n 'value' => $copies[$value] ?? $value,\n 'checked' => \\in_array($key, $languages, true),\n ];\n }\n\n return $localized ?? null;\n }", "static public function getConjugationsSearch($words)\n {\n\t\t$rc = null;\n\n\t\tif (!is_array($words))\n\t\t{\n\t\t\t// make the words array first\n\t\t\t// raw conjugation looks like: |;mato;mata;matas;|mate;mate;matamos;|\n\t\t\t$tenses = [];\n\t\t\t$lines = explode('|', $words);\n\t\t\tforeach($lines as $line)\n\t\t\t{\n\t\t\t\t$parts = explode(';', $line);\n\t\t\t\tif (count($parts) > 0)\n\t\t\t\t{\n\t\t\t\t\tforeach($parts as $part)\n\t\t\t\t\t{\n\t\t\t\t\t\t// fix the reflexives\n\t\t\t\t\t\tif (Tools::startsWithAny($part, ['me ', 'te ', 'se ', 'nos ', 'os ', 'no te ', 'no se ', 'no nos ', 'no os ', 'no se ']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// chop off the reflexive prefix words, like 'me acuerdo', 'no se acuerden'\n\t\t\t\t\t\t\t$pieces = explode(' ', $part);\n\t\t\t\t\t\t\tif (count($pieces) > 2)\n\t\t\t\t\t\t\t\t$part = $pieces[2];\n\t\t\t\t\t\t\telse if (count($pieces) > 1)\n\t\t\t\t\t\t\t\t$part = $pieces[1];\n\t\t\t\t\t\t\telse if (count($pieces) > 0)\n\t\t\t\t\t\t\t\t$part = $pieces[0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$tenses[] = $part;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$words = $tenses;\n\t\t}\n\n\t\tif (isset($words) && is_array($words))\n\t\t{\n\t\t\t$unique = [];\n\t\t\tforeach($words as $word)\n\t\t\t{\n\t\t\t\tif (strlen($word) > 0)\n\t\t\t\t{\n\t\t\t\t\tif (!in_array($word, $unique))\n\t\t\t\t\t{\n\t\t\t\t\t\t$unique[] = $word;\n\t\t\t\t\t\t$rc .= $word . ';';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$rc = ';' . $rc; // make it mysql searchable for exact match, like: \";voy;vea;veamos;ven;vamos;\n\t\t}\n\n\t\treturn $rc;\n\t}", "function translate($sKey, $sLang = null);", "static public function getRelatedWords($page_id, $lang_id) {\n $link_db = Piwidict::getDatabaseConnection();\n \n $relations = array();\n $rk = self::setRelationCoef();\n\n $query = \"SELECT trim(wiki_text.text) as word, relation_type_id FROM wiki_text, relation, lang_pos, meaning \n WHERE relation.wiki_text_id=wiki_text.id and meaning.lang_pos_id=lang_pos.id and relation.meaning_id=meaning.id \n and lang_pos.page_id=\".(int)$page_id.\" and lang_pos.lang_id=\".(int)$lang_id;\n $res = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n while ($row = $res->fetch_object()){\n if (isset($relations[$row->word]))\n// $relations[$row->word] = max($relations[$row->word], $rk[$row->relation_type_id]);\n $relations[$row->word] = min($relations[$row->word], $rk[$row->relation_type_id]);\n\t else \t\n\t $relations[$row->word] = $rk[$row->relation_type_id];\n\t }\n\t return $relations;\n }", "protected function getLocalizedRandomLabels()\n {\n $labels = [];\n\n foreach ($this->locales as $locale) {\n $labels[$locale->getCode()] = $this->faker->sentence(2);\n }\n\n return $labels;\n }", "public function getDifferentLanguages()\n\t{\n\t\t$sql = <<<TRANSLATIONS\nSELECT\n\t*\nFROM\n\t`i18n_language_codes`\nWHERE l10n IS NOT NULL\nORDER BY\n\tenglish_name ASC\nTRANSLATIONS;\n\n\t\treturn $this->GetArray( $sql, array( 'tag' => 'List of different languages in DB' ) );\n\t}" ]
[ "0.7154993", "0.68198085", "0.67766815", "0.6621984", "0.6592838", "0.64911014", "0.64806175", "0.63997537", "0.6385001", "0.63393795", "0.6260629", "0.6241757", "0.6231555", "0.62023544", "0.62007684", "0.61967325", "0.6166923", "0.61475354", "0.6129332", "0.6129332", "0.6113612", "0.61111766", "0.61057013", "0.6062847", "0.60599065", "0.6049674", "0.60344845", "0.6023784", "0.6019969", "0.6015083", "0.60036755", "0.59884995", "0.5975323", "0.5968686", "0.59626585", "0.5918753", "0.59042406", "0.5902932", "0.5900628", "0.5878569", "0.5858827", "0.5858827", "0.5858827", "0.5813107", "0.5812114", "0.5807638", "0.5806228", "0.5796039", "0.57833195", "0.57805145", "0.57784563", "0.57777137", "0.57709676", "0.5769389", "0.5764753", "0.5743904", "0.5742514", "0.57351273", "0.5730894", "0.5722093", "0.57039046", "0.5693458", "0.5693299", "0.56928784", "0.5688896", "0.56860596", "0.56850135", "0.5681836", "0.5679229", "0.5679209", "0.56769806", "0.5659752", "0.5652667", "0.56448203", "0.5643397", "0.5642456", "0.5637028", "0.56317586", "0.56307995", "0.5618092", "0.55972844", "0.5591717", "0.5591331", "0.55905396", "0.55902755", "0.55822295", "0.5579475", "0.55750763", "0.55718666", "0.55704665", "0.5560101", "0.5548236", "0.5522865", "0.5522833", "0.5520839", "0.55204594", "0.5508005", "0.550329", "0.5499899", "0.549316" ]
0.6330874
10
/ start the session
public function setupSession() { global $userid, $langtag; $this->echecklistNamespace = new Zend_Session_Namespace('eChecklist'); // logit("test: {$this->echecklistNamespace->lab['labnum']}"); if (isset($this->echecklistNamespace->user)) { $u = $this->echecklistNamespace->user; $user = $u; $this->usertype = $u['usertype']; $this->username = $u['userid']; $this->userfullname = $u['name']; $userid = $this->userid = $u['id']; // logit("{$this->username}, {$this->usertype}, {$this->userfullname}, {$this->userid}"); } // logit('TIME1: ' . isset($this->echecklistNamespace->lab)); if (isset($this->echecklistNamespace->lab)) { $this->lab = $this->echecklistNamespace->lab; // logit('ECLAB: ' . print_r($this->lab, true)); $this->labid = $this->lab['id']; $this->labname = $this->lab['labname']; $this->labnum = get_arrval($this->lab, 'labnum', 'No-NUM'); $this->showlab = "{$this->labnum}/{$this->labname}"; } else { $this->lab = null; $this->labid = 0; $this->labname = ''; $this->labnum = ''; $this->showlab = ''; } if (! isset($this->echecklistNamespace->lang)) { $this->echecklistNamespace->lang = 'EN'; } // clear selected audit if labid is not for this audit if (isset($this->echecklistNamespace->audit) || $this->echecklistNamespace->audit != null) { $au = new Application_Model_DbTable_Audit(); $this->audit = $au->getAudit($this->echecklistNamespace->audit['audit_id']); if ($this->labid != $this->audit['lab_id']) $this->echecklistNamespace->audit = null; } if (isset($this->echecklistNamespace->audit) || $this->echecklistNamespace->audit != null) { // logit('AUEC: '. print_r($this->echecklistNamespace->audit, true)); $au = new Application_Model_DbTable_Audit(); $this->audit = $this->echecklistNamespace->audit = $au->getAudit($this->echecklistNamespace->audit['audit_id']); $this->showaudit = "{$this->audit['tag']} - #{$this->audit['audit_id']}" . "- {$this->audit['labname']}"; // logit('ec audit: ' . print_r($this->audit, true)); // / {$this->audit['updated_at']}"; } else { $this->audit = null; $this->showaudit = ''; } $langtag = $this->view->langtag = $this->langtag = $this->echecklistNamespace->lang; // $this->langtag = $this->echecklistNamespace->lang; // logit('LT: '. $this->view->langtag); Zend_Session::start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function startSession() {}", "public static function startSession();", "public static function start()\r\n {\r\n if (!self::isStarted())\r\n session_start();\r\n }", "public final function start() \n\t{\n\t\tif (isset($_SESSION)) return;\n\t\tsession_start();\n\t}", "public function startSession()\n\t{\n\t\t// Let's start the session\n\t\tif (session_id() == '')\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public static function sessionStart()\n\t{\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "private static function startSession() {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }", "public static function startSession() {\n ob_clean();\n session_start();\n\n self::$isStarted = true;\n }", "public function startSession() {\n\n session_start(); //Tell PHP to start the session\n\n /* Determine if user is logged in */\n $this->logged_in = $this->checkLogin();\n\n /**\n * Set guest value to users not logged in, and update\n * active guests table accordingly.\n */\n if (!$this->logged_in) {\n $this->username = $_SESSION['username'] = GUEST_NAME;\n $this->userlevel = GUEST_LEVEL;\n $this->connection->addActiveGuest($_SERVER['REMOTE_ADDR'], $this->time);\n }\n /* Update users active timestamp */ else {\n $this->connection->addActiveUser($this->username, $this->time);\n }\n\n /* Remove inactive visitors from database */\n $this->connection->removeInactiveUsers();\n $this->connection->removeInactiveGuests();\n\n /* Set referrer page */\n if (isset($_SESSION['url'])) {\n $this->referrer = $_SESSION['url'];\n } else {\n $this->referrer = \"/\";\n }\n\n /* Set current url */\n $this->url = $_SESSION['url'] = $_SERVER['PHP_SELF'];\n }", "protected function _startSession()\n\t{\n\t\tif (is_null($this->_client))\n\t\t{\n\t\t\t$this->_client = new SoapClient($this->config['url']);\t\t\t\n\t\t}\n\t\tif (is_null($this->_session))\n\t\t{\n\t\t\t$this->_session = $this->_client->login($this->config['apiuser'], $this->config['apikey']);\t\t\t\n\t\t}\t\t\n\t\tpr($this->_client->__getFunctions());\n\t}", "public function start()\n {\n if (self::$sessionStarted) {\n return;\n }\n\n // use this object as the session handler\n session_set_save_handler(\n array($this, 'sessionDummy'), // open\n array($this, 'sessionDummy'), // close\n array($this, 'sessionRead'),\n array($this, 'sessionDummy'), // write\n array($this, 'sessionDestroy'),\n array($this, 'sessionDummy') // gc\n );\n\n parent::start();\n }", "public function SessionStart ();", "public function start()\n {\n $path = ini_get('session.cookie_path');\n if (!strlen($path)) {\n $path = '/';\n }\n\n $secure = false;\n\n if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') {\n $secure = true;\n } else {\n $secure = (empty($_SERVER[\"HTTPS\"]) || ($_SERVER[\"HTTPS\"] === 'off')) ? false : true;\n }\n\n session_set_cookie_params(ini_get('session.cookie_lifetime'), $path, ini_get('session.cookie_domain'), $secure);\n\n if (version_compare(PHP_VERSION, '7.0.0') >= 0) {\n $this->close_session_locks = true;\n }\n\n if ($this->close_session_locks) {\n $result = $this->session_read();\n } else {\n $result = $this->session_open();\n }\n if ($result) {\n $this->flash = new Phpr_Flash();\n if ($this->flash) {\n if (array_key_exists('flash_partial', $_POST) && strlen($_POST['flash_partial'])) {\n $this->flash['system'] = 'flash_partial:' . $_POST['flash_partial'];\n }\n }\n }\n\n return $result;\n }", "static function start()\n {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }", "function startSession()\n {\n $this->session_data = $this->_openSession($this->service_link, $this->username, $this->password,\n $this->calling_program, $this->calling_program_version,\n $this->target_dbms, $this->target_dbms_version,\n $this->connection_technology, $this->connection_technology_version,\n $this->interactive);\n\n if (isset($this->session_data) && ($this->session_data != null)\n && ($this->session_data->target != $this->url)) {\n // Reopens the service on the new URL that was provided\n $url = $this->session_data->target;\n $this->startService();\n }\n }", "private function openSession() {\n $this->sessionId = isset($_POST['key']) ? $_POST['key'] : (isset($_GET['key']) ? $_GET['key'] : 'null');\n\n if($this->sessionId == 'null' || strlen($this->sessionId) === 0) {\n $this->sessionId = rand(0, 999999999);\n }\n\n session_id($this->sessionId);\n session_name(\"gibSession\");\n session_start();\n }", "public static function start(){\n\t\treturn session_start();\n\t}", "public function start()\n\t{\n\t\t$path = ini_get('session.cookie_path');\n\t\tif (!strlen($path))\n\t\t\t$path = '/';\n\n\t\t$secure = false;\n\n\t\tif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https')\n\t\t\t$secure = true;\n\t\telse\n\t\t\t$secure = (empty($_SERVER[\"HTTPS\"]) || ($_SERVER[\"HTTPS\"] === 'off')) ? false : true;\n\t\t\t\n\t\tsession_set_cookie_params(ini_get('session.cookie_lifetime') , $path, ini_get('session.cookie_domain'), $secure);\n\t\t\n\t\tif ($result = session_start())\n\t\t{\n\t\t\t$this->flash = new Flash();\n\t\t\tif ($this->flash)\n\t\t\t{\n\t\t\t\tif (array_key_exists('flash_partial', $_POST) && strlen($_POST['flash_partial']))\n\t\t\t\t\t$this->flash['system'] = 'flash_partial:'.$_POST['flash_partial'];\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn $result;\n\t}", "public static function start() {\t\t\t\n\t\t\t// get session id\n $sessionid = Functions::encrypt_decrypt('encrypt', \"Bengalathon\");\n \n //set session name\n\t\t\tini_set('session.name', $sessionid.'_SESID');\n \t\t\t\n //set session name\n\t\t\tini_set('session.name', base64_encode(BASE_PATH).'_SESID');\n \n //set session path\n\t\t\tini_set('session.cookie_path', \"/\");\n\t\t\t \t\t\t\n //set session domain\n ini_set('session.cookie_domain', $_SERVER['HTTP_HOST']);\n \n //set session httponly\n ini_set('session.cookie_httponly', true);\n \n //set session secure https\n ini_set('session.cookie_secure', false);\n \n\t\t\t// start the session\n\t\t\t@session_start();\t\t\n\t\t\t\n\t\t\t// get session token\n\t\t\t$token = self::get('token');\n\t\t\t\n\t\t\t// set session token\n\t\t\tif (empty($token)) {\n\t\t\t\tif (function_exists('mcrypt_create_iv')) {\n\t\t\t\t\tself::set('token', bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM)));\n\t\t\t\t} else {\n\t\t\t\t\tself::set('token', bin2hex(openssl_random_pseudo_bytes(32)));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// return session id\t\t\t\n\t\t\treturn session_id();\n\t\t}", "public static function start(): void\n {\n if (session_status() === PHP_SESSION_NONE) {\n ini_set('session.use_strict_mode', true);\n $options = [\n 'expires' => 0,\n 'path' => HTTPRequest::root(),\n 'secure' => HTTPRequest::isHTTPS(),\n 'httponly' => true,\n 'samesite' => Cookie::SAMESITE_STRICT\n ];\n if (($timeout = Formwork::instance()->option('admin.session_timeout')) > 0) {\n $options['expires'] = time() + $timeout * 60;\n }\n session_name(self::SESSION_NAME);\n session_start();\n if (!isset($_COOKIE[self::SESSION_NAME]) || $options['expires'] > 0) {\n // Send session cookie if not already sent or timeout is set\n Cookie::send(self::SESSION_NAME, session_id(), $options, true);\n } elseif ($_COOKIE[self::SESSION_NAME] !== session_id()) {\n // Remove cookie if session id is not valid\n unset($_COOKIE[self::SESSION_NAME]);\n Cookie::send(self::SESSION_NAME, '', ['expires' => time() - 3600] + $options, true);\n }\n }\n }", "function wpdev_session_start() {\n session_start();\n }", "function startSession(){\r\n\r\n\t\tsession_name(\"phpBMS\".preg_replace('/\\W/',\"\",APPLICATION_NAME).\"v096ID\");\r\n\t\tsession_start();\r\n\r\n\t}", "public function createSession()\n {\n session_start();\n }", "function StartSession()\n\t{\n\t\t// Check if application configuration require SSL and if connection uses it\n\t\tif(IS_SECURE && $_SERVER['HTTPS'] != 'on')\n\t\t{\n\t\t\t// Make a notice log about non-ssl connection attempt\n\t\t\terror_log('[NOTICE] Non-SSL connection attempt;');\n\t\t\t// Redirect to the same page using https \n\t\t\tRedirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n\t\t}\n\t\t\n\t\t// Set custom session id\n\t\t$sessionName = SESSION_NAME;\n\t\t// Get secure status\n\t\t$isSecure = IS_SECURE;\n\t\t// Stop JavaScript being able to access the session id\n\t\t$isHttpOnly = true;\n\t\t\n\t\t// Force cookies usage to store the session id on the client side; Check if setting was done\n\t\tif (ini_set('session.use_only_cookies', 1) === FALSE)\n\t\t{\n\t\t\t// Make an error log about impossibility of cookies usage to store the session id on the client side\n\t\t\terror_log('[ERROR] Cannot force cookies use to store the session id on the client side; Could not initiate a safe session;');\n\t\t\t// Redirect to the error page using \n\t\t\tRedirect('error.php?error=Could not initiate a safe session.');\n\t\t}\n\t\t\n\t\t// Get current session cookies parameters\n\t\t$cookieParams = session_get_cookie_params();\n\t\t// Set current session cookies parameters (last two)\n\t\tsession_set_cookie_params($cookieParams['lifetime'], $cookieParams['path'], $cookieParams['domain'], $isSecure, $isHttpOnly);\n\t\t\n\t\t// Set specified current session name\n\t\tsession_name($sessionName);\n\t\t// Start new or resume existing session\n\t\tsession_start();\n\t\t// Update the current session id with a newly generated one\n\t\tsession_regenerate_id(); \n\t}", "public function startSessions()\r\n {\r\n Zend_Session::start();\r\n }", "public function startSession() {\n if (ini_set('session.use_only_cookies', 1) === FALSE) {\n return;\n }\n //session_name('');\n session_start();\n session_regenerate_id();\n }", "function __construct(){\n $this->startSession();\n }", "public function start()\n {\n // don't start more than once.\n if ($this->isStarted()) {\n // be sure the segment is loaded, though\n $this->load();\n return;\n }\n \n // set the privacy headers\n if ($this->_config['P3P']) {\n $response = Solar_Registry::get('response');\n $response->setHeader('P3P', $this->_config['P3P']);\n }\n \n // start the session\n $this->_manager->start();\n \n // load the session segment\n $this->load();\n }", "public function open() {\n\n if(!$this->isActive()) {\n session_start();\n //session_regenerate_id();\n }\n }", "public function start()\n {\n session_name($this->getConfigVariable('name'));\n ini_set(\"session.use_only_cookies\", $this->getConfigVariable('use_only_cookies'));\n ini_set(\"session.cookie_secure\", $this->getConfigVariable('cookie_secure'));\n ini_set(\"session.hash_function\", $this->getConfigVariable('hash_function'));\n // create a private session directory so that another script\n // with a lower lifetime doesn't clean up our session\n $path = $this->getConfigVariable('save_path');\n if (!empty($path) and\n is_dir($path) and\n is_writable($path)\n ) {\n ini_set('session.save_path', $this->getConfigVariable('save_path'));\n }\n //When to destroy sessions on the filesystem\n ini_set('session.gc_maxlifetime', $this->getConfigVariable('gc_maxlifetime'));\n ini_set('session.gc_probability', $this->getConfigVariable('gc_probability'));\n ini_set('session.gc_divisor', $this->getConfigVariable('gc_divisor'));\n\n //session_set_cookie_params (lifetime,path,domain,secure)\n session_set_cookie_params(\n $this->getConfigVariable('cookie_lifetime'),\n $this->getConfigVariable('cookie_path'),\n $this->getConfigVariable('cookie_domain'),\n $this->getConfigVariable('cookie_secure')\n );\n\n //the session_cache_limiter cache-control line is there to kill a bug in\n //IE that causes the PDF not to be cached over ssl.\n //these lines allow the caching and let the file be downloaded.\n //This bug doesn't seem to affect the preview\n //it was present in IE6 and IE7\n session_cache_limiter('must-revalidate');\n\n session_start();\n //do a very small check to see if the browser is the same as the originating browser\n //this canbe fooled easily, but provides a bit of security\n if (empty($_SESSION)) {\n $this->setup();\n } elseif (empty($_SESSION['security']) or\n $_SESSION['security']['user-agent'] != md5(\n empty($_SERVER['HTTP_USER_AGENT']) ? '' : $_SERVER['HTTP_USER_AGENT']\n )\n ) {\n $this->restart();\n }\n }", "public function start(): void\n {\n $sessionId = session_id();\n\n if ('' === $sessionId || false === $sessionId) {\n // @codeCoverageIgnoreStart\n if (! defined('AUTH0_TESTS_DIR')) {\n session_set_cookie_params([\n 'lifetime' => $this->configuration->getCookieExpires(),\n 'domain' => $this->configuration->getCookieDomain(),\n 'path' => $this->configuration->getCookiePath(),\n 'secure' => $this->configuration->getCookieSecure(),\n 'httponly' => true,\n 'samesite' => 'form_post' === $this->configuration->getResponseMode() ? 'None' : $this->configuration->getCookieSameSite() ?? 'Lax',\n ]);\n }\n // @codeCoverageIgnoreEnd\n\n session_register_shutdown();\n\n session_start();\n }\n }", "public function startSession($id){\n\n }", "function start()\n {\n\t\t// start session if not startet\n\t\tif( $this->_state == 'restart' ) {\n session_id( $this->_createId() );\n }\n\n\t\tsession_cache_limiter('none');\n session_start();\n\n\t\t// Send modified header for IE 6.0 Security Policy\n\t\theader('P3P: CP=\"NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM\"');\n\n return true;\n }", "public function joinSession(){\n\t\tif (session_status() != PHP_SESSION_ACTIVE){\n\t\t\tsession_start();\n\t\t}\n\t}", "function start_session() {\n\tsession_start();\t\n\tif($status == PHP_SESSION_NONE){\n\t\t//There is no active session\n\t\tsession_start();\n\t}else\n\tif($status == PHP_SESSION_DISABLED){\n\t\t//Sessions are not available\n\t}else\n\tif($status == PHP_SESSION_ACTIVE){\n\t\t//Destroy current and start new one\n\t\tsession_destroy();\n\t\tsession_start();\n\t}\n\t\n}", "function MySessionStart() {\n\tif (defined('SET_SESSION_NAME')) session_name(SET_SESSION_NAME);\n\t\n\tif (TRACKPOINT_ISSETUP) {\n\t\tif (!defined('TABLEPREFIX')) define('TABLEPREFIX', TRACKPOINT_TABLEPREFIX);\n\t\t$ses_class = new Session();\n\t\tsession_set_save_handler(\n\t\t\tarray(&$ses_class, '_open'),\n\t\t\tarray(&$ses_class, '_close'),\n\t\t\tarray(&$ses_class, '_read'),\n\t\t\tarray(&$ses_class, '_write'),\n\t\t\tarray(&$ses_class, '_destroy'),\n\t\t\tarray(&$ses_class, '_gc')\n\t\t);\n\t} else {\n\t\tini_set('session.save_handler', 'files');\n\t\tif (defined('TEMP_DIRECTORY') && is_writable(TEMP_DIRECTORY)) ini_set('session.save_path', TEMP_DIRECTORY);\n\t}\n\tsession_start();\n}", "public function start() {\r\n\t\tif (!self::hasSession()) {\r\n\t\t\tself::session();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function start_session() {\n\n\t\tif ( $this->is_plugin_settings( $this->_slug ) ) {\n\t\t\tsession_start();\n\t\t}\n\n\t}", "function start_session() {\n session_start();\n\n if (!isset($_SESSION['initiated'])) {\n session_regenerate_id();\n $_SESSION['initiated'] = 1;\n }\n\n if (!isset($_SESSION['count'])) $_SESSION['count'] = 0;\n else ++$_SESSION['count'];\n }", "public function startSession()\r\n {\r\n $result = self::makeCall('startSession', array(), 'sessionID', true);\r\n if (empty($result)) {\r\n return $result;\r\n }\r\n $this->sessionID = $result;\r\n return $result;\r\n }", "public function setSession()\n\t{\n\t\t$this->session = Session::getInstance();\n\t\t$this->session->start();\n\t}", "public static function session_start(){\n\t\t\tif(getenv('HTTPS')){\n\t\t\t\t// Use secure cookies if available.\n\t\t\t\tini_set('session.cookie_secure', 1);\n\t\t\t}\n\n\t\t\t// Since we don't allow Sessions to be stored in the Database...\n\t\t\tini_set('session.serialize_handler', 'php');\n\t\t\tini_set('session.cookie_path', '/');\n\n\t\t\t// Attempt to save sessions in /tmp/sessions\n\t\t\tif(is_dir(TMP_PATH . 'sessions')){\n\t\t\t\tini_set('session.save_path', TMP_PATH . DS . 'sessions');\n\t\t\t}\n\t\t\t\n\t\t\tini_set('session.use_cookies', 1);\n\t\t\tini_set('session.cookie_lifetime', Config::read('Session.timeout'));\n\t\t\tini_set('session.use_trans_sid', 0);\n\t\t\tini_set('url_rewriter.tags', '');\n\n\t\t\tif(!isset($_SESSION)){\n\t\t\t\tsession_cache_limiter('must-revalidate');\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}", "public static function initSession(){\n \n self::setSessionIni(); \n self::setSessionHandler();\n session_start();\n self::checkSystemCookie();\n\n // if 'started' is set for previous request\n //we truely know we are in 'in_session'\n if (isset($_SESSION['started'])){\n $_SESSION['in_session'] = 1;\n }\n\n // if not started we do not know for sure if session will work\n // we destroy 'in_session'\n if (!isset($_SESSION['started'])){\n $_SESSION['started'] = 1;\n $_SESSION['in_session'] = null;\n }\n\n // we set a session start time\n if (!isset($_SESSION['start_time'])){\n $_SESSION['start_time'] = time();\n }\n }", "protected function startSession(Request $request)\n {\n $this->session->setId($request->cookies->get('fluxbb_session'));\n $this->session->start();\n }", "function start_session() {\n if(!session_id()) {\n session_start();\n }\n}", "private function initSession()\n {\n // Start the session\n session_start();\n\n // Create session id constant\n define('SID', session_id());\n }", "public function startSessionAction() {\n try {\n $isset = false;\n if ($this->statistics) {\n $isset = true;\n $this->statistics->setUpdateOnly(!$this->statistics->getUpdateOnly());\n } else {\n $this->statistics = new Statistics();\n $this->statistics\n ->setSessionId($this->sessionId)\n ->setMySessionId($this->sessionId)\n ->setAction($this->type)\n ->setApp($this->app)\n ->setIp(@$_SERVER['REMOTE_ADDR']);\n $this->em->persist($this->statistics);\n }\n $statisticsTime = new StatisticsTime();\n $statisticsTime\n ->setStatistics($this->statistics)\n ->setAction($this->type)\n ->setTimeType('start')\n ->setMySessionId($this->sessionId)\n ->setIp(@$_SERVER['REMOTE_ADDR']);\n $this->statistics->addTime($statisticsTime);\n $this->em->persist($statisticsTime);\n $this->em->flush();\n return new JsonResponse(array('success' => true, 'msg' => $isset ? 'Restart session action successuflly did' : 'Start session action successuflly did'));\n } catch (\\Exception $e) {\n return new JsonResponse(array('success' => false, 'msg' => 'An error occured', 'error' => $e->getMessage()));\n }\n }", "private function _sess_run() {\n\t\t// session\n\t\tini_set('session.save_handler', $this->sess_save_handler);\n\t\t$path = array();\n\t\tforeach ($this->sess_server as $server) {\n\t\t\tif (isset($server['host']) && isset($server['port'])) {\n\t\t\t\t$path[] = \"tcp://{$server['host']}:{$server['port']}?\" . http_build_query(isset($server['params']) ? $server['params'] : array());\n\t\t\t}\n\t\t}\n\t\tif (empty($path)) {\n\t\t\tshow_error('Session save_path is empty');\n\t\t}\n\t\tini_set('session.save_path', implode(',', $path));\n\n\t\tini_set('session.gc_maxlifetime', $this->sess_expiration);\t// 过期时间\n\t\t// cookie\n\t\tini_set('session.cookie_secure', 0);\t\t// 0 http:// 1 https://\n\t\tini_set('session.cookie_httponly', 1);\t\t// 不让JS读取session的cookie\n\t\tsession_name($this->sess_cookie_name);\n\n\t\tsession_start();\n\t\t// delete old flashdata (from last request)\n\t\t$this->_flashdata_sweep();\n\t\t// mark all new flashdata as old (data will be deleted before next request)\n\t\t$this->_flashdata_mark();\n\t}", "public static function sessionStart() {\n\t\t\t//return false;\n\n\t\t//if(isset($_SESSION[\"PHPSESSID\"])) unset($_SESSION[\"PHPSESSID\"]);\n\t\tif(empty(session_id()))\n\t\t\t@session_start();\n\t\t//$_SESSION[\"PHPSESSID\"] = true;\n\t\treturn true;\n\t}", "private static function init(){\n\t\t\tif (session_status() != PHP_SESSION_ACTIVE) {\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t}", "public function start(){\n\t\t$this->current_time = $this->time->time;\n\t\t$this->data['user_id'] = ANONYMOUS;\n\t\t$boolValid = false;\n\n\t\t//Return, if we don't want a session\n\t\tif (defined('NO_SESSION')) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Remove old sessions and update user information if necessary.\n\t\tif($this->current_time - $this->session_length > $this->config->get('session_last_cleanup')){\n\t\t\t$this->cleanup($this->current_time);\n\t\t}\n\t\t//Cookie-Data\n\t\t$arrCookieData = array();\n\t\t$arrCookieData['sid']\t= get_cookie('sid');\n\t\t$arrCookieData['data']\t= get_cookie('data');\n\t\t$arrCookieData['data']\t= ( !empty($arrCookieData['data']) ) ? unserialize(base64_decode(stripslashes($arrCookieData['data']))) : '';\n\n\t\t//Let's get a Session\n\t\tif ($this->in->exists('s') && $this->in->get('s', '') != \"\"){\n\t\t\t//s-param\n\t\t\t$this->sid = $this->in->get('s', '');\n\t\t} else {\n\t\t\t$this->sid = $arrCookieData['sid'];\n\t\t}\n\n\t\t//Do we have an session? If yes, try to look if it's a valid session and get all information about it\n\t\tif ($this->sid != ''){\n\t\t\t$query = $this->db->query(\"SELECT *\n\t\t\t\t\t\t\t\tFROM __sessions s\n\t\t\t\t\t\t\t\tLEFT JOIN __users u\n\t\t\t\t\t\t\t\tON u.user_id = s.session_user_id\n\t\t\t\t\t\t\t\tWHERE s.session_id = '\".$this->db->escape($this->sid).\"'\n\t\t\t\t\t\t\t\tAND session_type = '\".$this->db->escape((defined('SESSION_TYPE')) ? SESSION_TYPE : '').\"'\");\n\t\t\t$arrResult = $this->db->fetch_record($query);\n\t\t\t$this->db->free_result($query);\n\n\t\t\t$this->data = $arrResult;\n\t\t\tif (!isset($this->data['user_id'])){\n\t\t\t\t$this->data['user_id'] = ANONYMOUS;\n\t\t\t}\n\n\t\t\t//If the Session is in our Table && is the session_length ok && the IP&Browser fits\n\t\t\t//prevent too short session_length\n\t\t\tif ($arrResult && (($arrResult['session_start'] + $this->session_length) > $this->current_time) ){\n\t\t\t\t//If the IP&Browser fits\n\t\t\t\tif (($arrResult['session_ip'] === $this->env->ip) && ($arrResult['session_browser'] === $this->env->useragent)){\n\t\t\t\t\t//We have a valid session\n\t\t\t\t\t$this->data['user_id'] = ($this->data['user_id'] == (int)$arrResult['session_user_id']) ? intval($arrResult['session_user_id']) : $this->data['user_id'];\n\t\t\t\t\t$this->id = $this->data['user_id'];\n\t\t\t\t\t// Only update session DB a minute or so after last update or if page changes\n\t\t\t\t\tif ( ($this->current_time - $arrResult['session_current'] > 60) || ($arrResult['session_page'] != $this->env->current_page) ){\n\t\t\t\t\t\t$this->db->query(\"UPDATE __sessions SET :params WHERE session_id = ?\", array(\n\t\t\t\t\t\t\t'session_current'\t=> $this->current_time,\n\t\t\t\t\t\t\t'session_page'\t\t=> strlen($this->env->current_page) ? $this->env->current_page : '',\n\t\t\t\t\t\t), $this->sid);\n\t\t\t\t\t}\n\t\t\t\t\t//The Session is valid, copy the user-data to the data-array and finish the init. You you can work with this data.\n\n\t\t\t\t\tregistry::add_const('SID', \"?s=\".((!empty($arrCookieData['sid'])) ? '' : $this->sid));\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//START Autologin\n\t\t$boolSetAutoLogin = false;\n\n\t\t//Loginmethod Autologin\n\t\t$arrAuthObjects = $this->get_login_objects();\n\t\tforeach($arrAuthObjects as $strMethods => $objMethod){\n\t\t\tif (method_exists($objMethod, 'autologin')){\n\t\t\t\t$arrAutologin = $objMethod->autologin($arrCookieData);\n\t\t\t\tif ($arrAutologin){\n\t\t\t\t\t$this->data = $arrAutologin;\n\t\t\t\t\t$boolSetAutoLogin = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//EQdkp Autologin\n\t\tif (!$boolSetAutoLogin){\n\t\t\t$arrAutologin = $this->autologin($arrCookieData);\n\t\t\tif ($arrAutologin){\n\t\t\t\t$this->data = $arrAutologin;\n\t\t\t\t$boolSetAutoLogin = true;\n\t\t\t}\n\t\t}\n\n\t\t//Bridge Autologin\n\t\tif (!$boolSetAutoLogin && $this->config->get('cmsbridge_active') == 1 && $this->config->get('pk_maintenance_mode') != 1){\n\t\t\t$arrAutologin = $this->bridge->autologin($arrCookieData);\n\t\t\tif ($arrAutologin){\n\t\t\t\t$this->data = $arrAutologin;\n\t\t\t\t$boolSetAutoLogin = true;\n\t\t\t}\n\t\t}\n\t\t//END Autologin\n\n\t\t//Let's create a session\n\t\t$this->create($this->data['user_id'], (isset($this->data['user_login_key']) ? $this->data['user_login_key'] : ''), $boolSetAutoLogin);\n\t\t$this->id = $this->data['user_id'];\n\t\treturn true;\n\t}", "public static function init()\n {\n if (self::$sessionStarted == false) {\n session_start();\n self::$sessionStarted = true;\n }\n }", "public function session_init()\n {\n // session started (Installer?)\n if (session_id())\n return;\n\n $sess_name = $this->config->get('session_name');\n $sess_domain = $this->config->get('session_domain');\n $lifetime = $this->config->get('session_lifetime', 0) * 60;\n\n // set session domain\n if ($sess_domain) {\n ini_set('session.cookie_domain', $sess_domain);\n }\n // set session garbage collecting time according to session_lifetime\n if ($lifetime) {\n ini_set('session.gc_maxlifetime', $lifetime * 2);\n }\n\n ini_set('session.cookie_secure', rcube_ui::https_check());\n ini_set('session.name', $sess_name ? $sess_name : 'roundcube_sessid');\n ini_set('session.use_cookies', 1);\n ini_set('session.use_only_cookies', 1);\n ini_set('session.serialize_handler', 'php');\n\n // use database for storing session data\n $this->session = new rcube_session($this->get_dbh(), $this->config);\n\n $this->session->register_gc_handler(array($this, 'temp_gc'));\n $this->session->register_gc_handler(array($this, 'cache_gc'));\n\n // start PHP session (if not in CLI mode)\n if ($_SERVER['REMOTE_ADDR'])\n session_start();\n\n // set initial session vars\n if (!$_SESSION['user_id'])\n $_SESSION['temp'] = true;\n\n // restore skin selection after logout\n if ($_SESSION['temp'] && !empty($_SESSION['skin']))\n $this->config->set('skin', $_SESSION['skin']);\n }", "private function startPhpSession()\n {\n if (session_status() === PHP_SESSION_NONE) {\n session_start();\n }\n }", "function start()\n {\n $this->startService();\n $this->startSession();\n }", "public function startSession(){\n if ( $this->sessionState == self::SESSION_NOT_STARTED ) {\n $this->sessionState = session_start();\n }\n \n return $this->sessionState;\n }", "public function startSession(){\n\t\tif( $this->sessionState == self::SESION_NO_INICIADA){\n\t\t\t$this->sessionState = session_start();\n\t\t}\n\t\treturn $this->sessionState;\n\t}", "public static function afnSessionStart()\n {\n //session_name($GLOBALS[\"settings\"][\"name\"] . sha1(dirname(__FILE__) . '2k-]+*,3OzI!K^THTI'));\n //session_cache_limiter('nocache');\n\n if (@session_start()) {\n self::safeStart();\n return true;\n } else {\n die(\"Error:\");\n }\n }", "public static function start($name = null): void {\n\t\tif (! isset ( self::$sessionInstance )) {\n\t\t\tself::$sessionInstance = Startup::getSessionInstance ();\n\t\t}\n\t\tself::$sessionInstance->start ( $name );\n\t}", "function Session () {\r\n session_start();\r\n }", "private function __construct () {\n // start the session\n session_start();\n }", "public function initSession() {\n\n\n\n if (session_id() == '') {\n\n // session isn't started\n\n session_start();\n }\n }", "function kcsite_session_start() {\n\tif (!session_id()){\n\t\tsession_start();\n\t}\n}", "public static function init() {\n\t\t\t\n\t\t\t/* Run session */\n\t\t\tsession_start();\n\t\t\t\n\t\t}", "public function start() {\n if (!$this->sessionStarted()) {\n if (\\session_start()) {\n\n $hash = md5($_SERVER['HTTP_USER_AGENT'] . \"---|---\" . $this->name);\n $_SESSION['_fingerprint'] = $hash;\n\n return mt_rand(0, 4) === 0 ? $this->refresh() : true; // 1/5, regenerate sid\n }\n }\n return false;\n }", "private function initSession() :void\n {\n if (session_status() === PHP_SESSION_NONE) {\n session_start();\n }\n }", "public static function start() {\n\t if(self::isRequest()\n\t && (PHP_SESSION_ACTIVE == ($status = session_status())\n\t || (PHP_SESSION_NONE == $status && session_start()))) {\n\t return true;\n\t } else {\n\t if(!isset($_SESSION)) {\n\t // create a dummy session array\n\t $_SESSION = array();\n\t }\n\t return false;\n\t }\n\t}", "public function initSession() {\n if (is_writable(GLPI_SESSION_DIR)) {\n Session::setPath();\n } else {\n if (isCommandLine()) {\n die(\"Can't write in \".GLPI_SESSION_DIR.\"\\n\");\n }\n }\n Session::start();\n\n if (isCommandLine()) {\n // Init debug variable\n $_SESSION = ['glpilanguage' => (isset($this->args['lang']) ? $this->args['lang'] : 'en_GB')];\n $_SESSION[\"glpi_currenttime\"] = date(\"Y-m-d H:i:s\");\n }\n\n // Init debug variable\n // Only show errors\n Toolbox::setDebugMode(Session::DEBUG_MODE, 0, 0, 1);\n }", "public function maybeStartSession() {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }", "function sess_start($name = null){\n\n if( $name ) session_name($name);\n session_start();\n session_regenerate_id();\n\n }", "public function start()\n {\n if (!$this->enabled) {\n return;\n }\n if (!$this->isStarted()) {\n $this->configure();\n session_start();\n if ($this->lifetimeMode == 'reset') {\n $cookie = new Cookie($this->getName(), $this->getId());\n $cookie->setLifetime($this->lifetime);\n $cookie->send();\n }\n $this->expiration->start();\n $this->fingerprint->start();\n }\n if ($this->expiration->isObsolete()) {\n $this->refresh();\n }\n if ($this->fingerprint->isInitiated()\n && !$this->fingerprint->hasValidFingerprint()) {\n throw new SessionException(SessionException::ERROR_INVALID_FINGERPRINT);\n }\n }", "function sec_session_start() {\r\n $session_name = 'sec_session_id'; // define name of session\r\n $secure = SECURE;\r\n // to avoid access to session id via JavaScript.\r\n $httponly = true;\r\n // Zwingt die Sessions nur Cookies zu benutzen.\r\n if (ini_set('session.use_only_cookies', 1) === FALSE) {\r\n header(\"Location: ../index.php?err=Could not initiate a safe session (ini_set)\");\r\n exit();\r\n }\r\n // Holt Cookie-Parameter.\r\n $cookieParams = session_get_cookie_params();\r\n session_set_cookie_params($cookieParams[\"lifetime\"], $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly);\r\n // Setzt den Session-Name zu oben angegebenem.\r\n session_name($session_name);\r\n session_start(); // Startet die PHP-Sitzung \r\n session_regenerate_id(); // Erneuert die Session, löscht die alte. \r\n }", "public function pcr_auth_session_start() {\r\n\r\n // # check session_status()\r\n if(session_status() === PHP_SESSION_NONE) {\r\n session_start();\r\n }\r\n\r\n $request_uri = $_SERVER['REQUEST_URI'];\r\n\r\n // # due to wp nonce in some request_uri's, lets partial match login and logout strings\r\n // # also look for onesignal references even though we match on entire troublsome URL's below.\r\n if(stripos('login', $request_uri) !== true && stripos('logout', $request_uri) !== true && stripos('onesignal', $request_uri) !== true) {\r\n\r\n // # build the array of known url's to skip\r\n $skip_urls = array('/',\r\n '/login/',\r\n '/wp-admin/admin-ajax.php',\r\n '/wp-cron.php?doing_wp_cron',\r\n '/login/?login=false',\r\n '/login/?login=failed',\r\n '/wp-login.php'\r\n );\r\n\r\n // # check if reuest uri is empty and does not match skip_urls array\r\n if(!empty($request_uri) && !in_array($request_uri, $skip_urls)) {\r\n\r\n // # all is good, set the session\r\n $_SESSION['request_uri'] = $request_uri;\r\n }\r\n }\r\n }", "public static function instance(){\n\t\t\tif(!Session::session_started()){\n\t\t\t\tSession::session_start();\n\t\t\t}\n\t\t}", "public function startSession(UserModel $user)\n\t{\n\t\t$_SESSION['username'] = $user->getUsername();\n\t\t$_SESSION['start'] = time();\n\t\t// Ending a session in 5 minutes from the starting time.\n\t\t$_SESSION['expire'] = $_SESSION['start'] + (5 * 60);\n\t}", "public function newSession();", "private function sessionStart(&$get, &$post)\n\t{\n\t\tif (empty($_SESSION)) {\n\t\t\tini_set('session.cookie_path', Paths::$uri_base);\n\t\t\tif (isset($get['memory_limit'])) {\n\t\t\t\tini_set('memory_limit', $get['memory_limit']);\n\t\t\t\tunset($get['memory_limit']);\n\t\t\t}\n\t\t\tif (isset($get['time_limit'])) {\n\t\t\t\tset_time_limit($get['time_limit']);\n\t\t\t\tunset($get['time_limit']);\n\t\t\t}\n\t\t\tsession_start();\n\t\t\tif (isset($GLOBALS['X'])) {\n\t\t\t\t$_SESSION = [];\n\t\t\t}\n\t\t}\n\t\t$this->setIncludePath($_SESSION, Application::class);\n\t\tif (isset($_SESSION['session']) && isset($_SESSION['session']->plugins)) {\n\t\t\t$this->resumeSession();\n\t\t}\n\t\telse {\n\t\t\t$this->createSession();\n\t\t}\n\t\tif (!Application::current()) {\n\t\t\t$_SESSION = [];\n\t\t\t$this->createSession();\n\t\t}\n\t\tunset($get[session_name()]);\n\t\tunset($post[session_name()]);\n\t}", "private function __construct()\r\n {\r\n // session_set_save_handler(\r\n // array(&$this, \"sessionOpen\"),\r\n // array(&$this, \"sessionClose\"),\r\n // array(&$this, \"sessionRead\"),\r\n // array(&$this, \"sessionWrite\"),\r\n // array(&$this, \"sessionDestroy\"),\r\n // array(&$this, \"sessionGarbageCollector\")\r\n // );\r\n \r\n session_name(SESSION_NAME);\r\n session_start();\r\n }", "protected function start(Request $request)\n {\n $this->session->initialize($this->settings, $request->getHeaderLine('HTTP_USER_AGENT'));\n $this->session->start();\n $this->refreshSessionCookie();\n }", "function session_begin()\n\t{\n\t\t// Get user information\n\t\t$this->time_now\t\t\t\t= time();\n\t\t$this->cookie_data\t\t\t= array('u' => 0, 'k' => '');\n\t\t$this->update_session_page\t= $update_session_page;\n\t\t$this->browser\t\t\t\t= $request->header('User-Agent');\n\t\t$this->referer\t\t\t\t= $request->header('Referer');\n\t\t$this->forwarded_for\t\t= $request->header('X-Forwarded-For');\n\n\t\treturn $this->session_create();\n\t}", "public function canStartSession();", "function session()\n {\n if (!API_MODE) {\n session_name('SKELETON');\n session_start();\n } else {\n ini_set('session.use_cookies', '0');\n }\n }", "public function sessionStart($userid = null, $userLevel = null){\n $this->load->library( 'nativesession' );\n\n\t\t//Update session data\n $this->nativesession->set( 'userid', $userid );\n $this->nativesession->set( 'userLevel', $userLevel );\n\t}", "public function startsessionAction()\r\n {\r\n // initialise the session for a new search\r\n $sid = $this->engine->initializePazpar2Client();\r\n //$ns = new Zend_Session_Namespace($this->id);\r\n //$ns->sid = $sid;\r\n $_SESSION[$this->id]['sid'] = $sid;\r\n\t\t// then redirect to search action\r\n $params = $this->query->getAllSearchParams();\r\n\t\t$params['lang'] = $this->request->getParam('lang');\r\n\t $params['controller'] = $this->request->getParam('controller');\r\n\t $params['action'] = 'search';\r\n\t\t$url = $this->request->url_for($params);\r\n\t\treturn $this->redirect()->toUrl($url);\r\n\t}", "function sec_session_start() {\n\t $session_name = 'sec_session_id'; // Set a custom session name\n\t $secure = false; // Set to true if using https.\n\t $httponly = true; // This stops javascript being able to access the session id. \n\n\t ini_set('session.use_only_cookies', 1); // Forces sessions to only use cookies. \n\t $cookieParams = session_get_cookie_params(); // Gets current cookies params.\n\t session_set_cookie_params(ConfigFunctions::getSessionLength(true), $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly); \n\t session_name($session_name); // Sets the session name to the one set above.\n\t session_start(); // Start the php session\n\t session_regenerate_id(); // regenerated the session, delete the old one. \n\t}", "public function session_start_controller(){\n\n\t\t\t$userName=mainModel::clean_string($_POST['loginUserName']);\n\t\t\t$userPass=mainModel::clean_string($_POST['loginUserPass']);\n\n\t\t\t//$userPass=mainModel::encryption($userPass);\n\n\t\t\t$dataLogin=[\n\t\t\t\t\"AccountUserName\"=>$userName,\n\t\t\t\t\"AccountPass\"=>$userPass\n\t\t\t];\n\n\t\t\tif($dataAccount=loginmodel::session_start_model($dataLogin)){\n\t\t\t\tif($dataAccount->rowCount()==1){\n\n\t\t\t\t\t$row=$dataAccount->fetch();\n\n session_start(['name'=>'ASUSAP']);\n $_SESSION['user_name_srce']=$row['usuario'];\n $_SESSION['user_token_srce']=$row['password'];\n // $_SESSION['user_token_srce']=md5(uniqid(mt_rand(), true));\n\n $dateNow=date(\"Y-m-d\");\n\t\t\t\t\t$yearNow=date(\"Y\");\n\t\t\t\t\t$timeNow=date(\"h:i:s a\");\n\n $url=SERVERURL.\"dashboard/\";\n\n\t\t\t\t}else{\n\t\t\t\t\t$dataAlert=[\n\t\t\t\t\t\t\"Title\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\t\"Text\"=>\"El nombre de usuario y contraseña no son correctos o su cuenta puede estar deshabilitada\",\n\t\t\t\t\t\t\"Type\"=>\"error\",\n\t\t\t\t\t\t\"Alert\"=>\"single\"\n\t\t\t\t\t];\n\t\t\t\t\treturn mainModel::sweet_alert($dataAlert);\n\t\t\t\t}\n return $urlLocation='<script type=\"text/javascript\"> window.location=\"'.$url.'\"; </script>';\n\t\t\t}else{\n\t\t\t\t$dataAlert=[\n\t\t\t\t\t\"Title\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Text\"=>\"No se pudo realizar la petición\",\n\t\t\t\t\t\"Type\"=>\"error\",\n\t\t\t\t\t\"Alert\"=>\"single\"\n\t\t\t\t];\n\t\t\t\treturn mainModel::sweet_alert($dataAlert);\n\t\t\t}\n\t\t}", "function loadSession() {}", "private function ensureStarted(): void\n {\n if (session_status() === PHP_SESSION_NONE) {\n session_start();\n }\n }", "public function __construct(){\n session_start();\n }", "public static function session_started(){\n\t\t\tif(isset($_SESSION) && session_id()){\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "function startSession($fName, $lName, $username)\n {\n\t\t// Starting the session\n\t session_start();\n\t\t$_SESSION['userFirstName'] = $fName;\n\t $_SESSION['userLastName'] = $lName;\n\t $_SESSION['userName'] = $username;\n }", "function startSession()\n{\n if ( !isset( $_SESSION ) ) { @session_start() ; }\n}", "public static function init()\n {\n if (session_id() == '') {\n session_start();\n }\n }", "public static function init()\n {\n if (session_id() == '') {\n session_start();\n }\n }", "public function __construct()\n {\n if(!session_id()) {\n session_start();\n }\n }", "function __construct() {\n\t\t$this->time = time();\n\t\t$this->startSession();\n\t}", "public function __construct() {\n\t\tsession_start();\n\t}", "public function __construct()\n {\n if (!session_id()) {\n session_start();\n }\n }", "public function run() {\n if ($this->_config->getConfigFolder() == NULL) {\n $this->setConfigFolder('../config');\n }\n\n $this->_frontController = \\GRG\\FrontController::getInsance();\n\n if ($this->router instanceof \\GRG\\Routers\\IRouter) {\n $this->_frontController->setRouter($this->router);\n }\n elseif ($this->router == 'SomeRouter') {\n // TODO: create router.\n// $this->_frontController->setRouter(new \\GRG\\Routers\\SomeRouter());\n }\n else {\n // If none specified, set default router.\n $this->_frontController->setRouter(new \\GRG\\Routers\\DefaultRouter());\n }\n\n $_sess = $this->_config->app['session'];\n if ($_sess['autostart']) {\n if ($_sess['type'] == 'native') {\n $_s = new \\GRG\\Sessions\\NativeSession(\n $_sess['name'],\n $_sess['lifetime'],\n $_sess['path'],\n $_sess['domain'],\n $_sess['secure']\n );\n }\n elseif ($_sess['type'] == 'database') {\n $_s = new \\GRG\\Sessions\\DBSession(\n $_sess['dbConnection'],\n $_sess['name'],\n $_sess['dbTable'],\n $_sess['lifetime'],\n $_sess['path'],\n $_sess['domain'],\n $_sess['secure']\n );\n }\n else {\n throw new \\Exception('No valid session.', 500);\n }\n\n $this->setSession($_s);\n }\n\n $this->_frontController->dispatch();\n }", "function startSession() {\n\t$lifetime = 60 * 60 * 24 * 2; // 2 days in seconds\n\tsession_set_cookie_params($lifetime, '/');\n\tsession_start();\n}", "public static function startSession($mode = self::PROFILE_MODE_PRODUCTION)\n {\n self::endSession();\n self::$_mode = $mode;\n self::$_start_time = !empty($_SERVER['REQUEST_TIME_FLOAT']) ? $_SERVER['REQUEST_TIME_FLOAT'] : microtime(true);\n self::$_timer_profilers = array();\n self::$_memory_profilers = array();\n }" ]
[ "0.90282655", "0.9003395", "0.845623", "0.8131663", "0.80436057", "0.79954684", "0.79706097", "0.7965818", "0.7944286", "0.7915886", "0.79023486", "0.7859829", "0.78356284", "0.7815267", "0.7812748", "0.7790747", "0.7772361", "0.7770696", "0.77402574", "0.7736278", "0.7678797", "0.7619159", "0.7582305", "0.75418425", "0.75416774", "0.7536888", "0.7467588", "0.74669075", "0.7458586", "0.7438634", "0.74290127", "0.7418579", "0.73683023", "0.7354186", "0.7319927", "0.73176694", "0.7307378", "0.7307267", "0.73028344", "0.7231853", "0.7212754", "0.72038925", "0.7202529", "0.7177114", "0.71704865", "0.7161105", "0.7138292", "0.712648", "0.7109812", "0.70851374", "0.7077571", "0.7075679", "0.7075393", "0.7066423", "0.7065823", "0.70607233", "0.7054986", "0.70506424", "0.7036633", "0.7018196", "0.701296", "0.70054096", "0.7001309", "0.6993089", "0.6981339", "0.6981091", "0.69754475", "0.69546866", "0.6920314", "0.6899076", "0.68564147", "0.68276995", "0.6816317", "0.68107885", "0.68076617", "0.6807212", "0.6801129", "0.6800467", "0.67991936", "0.6792539", "0.6782979", "0.6782353", "0.6771509", "0.67619747", "0.6761968", "0.674508", "0.6740703", "0.6734254", "0.6718906", "0.67146003", "0.6710623", "0.6699374", "0.66831315", "0.66831315", "0.6654702", "0.6651186", "0.66499555", "0.66342276", "0.66315985", "0.6626977", "0.6625918" ]
0.0
-1
/ all CSS and js files are set up here
public function setHeaderFiles() { $csslist = array('/css/dtree.css', // charisma starts below '/charisma/css/bootstrap-cerulean.css','/charisma/css/bootstrap-responsive.css', '/charisma/css/charisma-app.css','/charisma/css/jquery-ui-1.8.21.custom.css', '/charisma/css/fullcalendar.css','/charisma/css/chosen.css', '/charisma/css/uniform.default.css','/charisma/css/jquery.noty.css', '/charisma/css/noty_theme_default.css','/charisma/css/elfinder.min.css', '/charisma/css/elfinder.theme.css','/charisma/css/opa-icons.css', '/css/echecklist-styles.css'); foreach($csslist as $f) { $this->view->headLink()->appendStylesheet("{$this->baseurl}{$f}"); } $jslist = array('/js/dtree.js','/charisma/js/jquery-1.7.2.min.js', '/charisma/js/jquery-ui-1.8.21.custom.min.js','/charisma/js/bootstrap-transition.js', '/charisma/js/bootstrap-alert.js','/charisma/js/bootstrap-modal.js', '/charisma/js/bootstrap-dropdown.js','/charisma/js/bootstrap-scrollspy.js', '/charisma/js/bootstrap-tab.js','/charisma/js/bootstrap-tooltip.js', '/charisma/js/bootstrap-popover.js','/charisma/js/bootstrap-button.js', '/charisma/js/bootstrap-collapse.js','/charisma/js/bootstrap-carousel.js', '/charisma/js/bootstrap-typeahead.js','/charisma/js/jquery.cookie.js', '/charisma/js/fullcalendar.min.js','/charisma/js/jquery.dataTables.min.js', '/charisma/js/jquery.chosen.min.js','/charisma/js/jquery.uniform.min.js', '/charisma/js/jquery.colorbox.min.js','/charisma/js/jquery.noty.js', '/charisma/js/jquery.elfinder.min.js','/charisma/js/jquery.raty.min.js', '/charisma/js/jquery.autogrow-textarea.js','/charisma/js/jquery.history.js', '/charisma/js/charisma.js','/js/helpers.js'); // '/js/helpers.js' foreach($jslist as $f) { $this->view->headScript()->appendFile("{$this->baseurl}{$f}"); } /* * logit ( "Links: {$this->view->headLink()}" ); logit ( "Scripts: {$this->view->headScript()}" ); */ }
{ "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 }", "private function __register_scripts() {\n\t\t// Load all the registered scripts\n\t\t$assets_loader = new SwpmvcAssetsLoader();\n\t\t$assets = $assets_loader->fn_load_scripts();\n\n\t\t//Extract CSS Assets and put them into Registered CSS Container\n\t\t$this->registered_css = $assets[ 'css' ];\n\n\t\t//Extract JS Assets and put them into Registered JS Container\n\t\t$this->registered_js = $assets[ 'js' ];\n\n\t\t//Some cleanup\n\t\tunset($assets_loader);\n\t\tunset($assets);\n\n\t\t//Load all the common CSS and JS which will be required for all the pages.\n\t\t$this->fn_load_scripts();\n\t}", "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}", "public function loadConfigAssets()\r\n {\r\n $this->app->document->addScript('elements:imagebox/assets/js/myimage.js');\r\n $this->app->document->addStylesheet('elements:imagebox/assets/css/editoption.css');\r\n $this->app->document->addScript('elements:imagebox/assets/js/myoption.js');\r\n $this->app->document->addStylesheet('elements:option/option.css');\r\n }", "private function fn_load_scripts() {\n\n\t\t/**\n\t\t * Load Common CSS and JS for a blank Page\n\t\t */\n\n\t\t$fixed_version = $this->fixed_version;\n\t\t$common_css_version = '0.3';\n\t\t$common_js_version = '0.1';\n\t\t$custom_css_version = '0.4';\n\t\t$custom_js_version = '0.4';\n\n\t\t$registered_styles = $this->registered_css;\n\t\t$registered_scripts = $this->registered_js;\n\n\t\t/**\n\t\t * Load CSS--------------------------------------------------------------\n\t\t */\n\n /** Load Google Fonts */\n\t\t$this->google_fonts['google_opensans'] = $registered_styles['google_opensans'];\n\n\t\t/** Load CSS Assets @todo Move the components in their containers */\n\t\t\n\t\t$this->css_assets['bootstrap'] = $registered_styles['bootstrap'].\"?ver=\".$fixed_version;\n\t\t$this->css_assets['fontawesome'] = $registered_styles['fontawesome'].\"?ver=\".$fixed_version;\n\t\t\n\t\t/**\n\t\t * Load JS--------------------------------------------------------------\n\t\t */\n\t\t\n\t\t/** Load footer js **/\n\t\t$this->footer_js['jquery'] = $registered_scripts['jquery'].\"?ver=\".$fixed_version;\t\t\n\t\t$this->footer_js['jquery-ui'] = $registered_scripts['jquery-ui'].\"?ver=\".$fixed_version;\n\n\t\t$this->footer_js['bootstrap'] = $registered_scripts['bootstrap'].\"?ver=\".$fixed_version;\n\t\t/**let other controllers load their own css/js files **/\n\t}", "function load_js_css() {\n\n\t\t\twp_register_script( 'fontawesome-all', get_stylesheet_directory_uri() . '/js/fontawesome-all.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'owl', get_stylesheet_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'selectric', get_stylesheet_directory_uri() . '/js/jquery.selectric.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'select', get_stylesheet_directory_uri() . '/js/select.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'jquery-ui', get_stylesheet_directory_uri() . '/js/jquery-ui.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'tab_menu', get_stylesheet_directory_uri() . '/js/tab_menu.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'aos', get_stylesheet_directory_uri() . '/js/aos.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'rangeslider', get_stylesheet_directory_uri() . '/js/rangeslider.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'bootstrap', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'easymap', get_stylesheet_directory_uri() . '/js/easymap.plugin.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'markerclusterer', get_stylesheet_directory_uri() . '/js/markerclusterer.min.js', array(), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'customscrollbar', get_stylesheet_directory_uri() . '/js/jquery.mCustomScrollbar.concat.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'ddslick', get_stylesheet_directory_uri() . '/js/jquery.ddslick.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'project045-main', get_stylesheet_directory_uri() . '/js/main.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\n\t\t\twp_enqueue_script( 'fontawesome-all' );\n\t\t\twp_enqueue_script( 'owl' );\n\t\t\twp_enqueue_script( 'selectric' );\n\t\t\twp_enqueue_script( 'select' );\n\t\t\twp_enqueue_script( 'jquery-ui' );\n\t\t\twp_enqueue_script( 'tab_menu' );\n\t\t\twp_enqueue_script( 'aos' );\n\t\t\twp_enqueue_script( 'rangeslider' );\n\t\t\twp_enqueue_script( 'bootstrap' );\n\t\t\twp_enqueue_script( 'easymap' );\n\t\t\twp_enqueue_script( 'markerclusterer' );\n\t\t\twp_enqueue_script( 'customscrollbar' );\n\t\t\twp_enqueue_script( 'ddslick' );\n\t\t\twp_enqueue_script( 'project045-main' );\n\n\t\t}", "static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\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}", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "public function initialize () {\n PageLayout::addStylesheet($this->assets . 'styles.css');\n $this->addScript('script.js');\n }", "function init() {\r\n $this->load_upcss();\r\n }", "protected function loadCss() {}", "public function load_assets() {\n\t\t\t//only load styles and js when needed\n\t\t\tif ( $this->is_edit_page() ) {\n\t\t\t\t//styles\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\twp_enqueue_style( 'wm-options-panel-white-label' );\n\t\t\t\tif ( ! wm_option( 'branding-panel-logo' ) && ! wm_option( 'branding-panel-no-logo' ) )\n\t\t\t\t\twp_enqueue_style( 'wm-options-panel-branded' );\n\t\t\t\twp_enqueue_style( 'color-picker' );\n\n\t\t\t\t//scripts\n\t\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-tabs' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-datepicker' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\t\twp_enqueue_script( 'thickbox' );\n\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t\twp_enqueue_script( 'wm-options-panel' );\n\t\t\t\twp_enqueue_script( 'color-picker' );\n\t\t\t}\n\t\t}", "public function dt_testimonial_simple_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n }", "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}", "public function initialize_scripts_and_styles() {\n\t\tTypes_Asset_Manager::get_instance();\n\t}", "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addAssetInfo(\n array(\"js/jquery.cookie.js\" ),\n $this->getCommonAssetDir()\n );\n $this->addAssetInfo(\n \"smartScrollPane.css\",\n dirname(__FILE__) . \"/assets\"\n );\n }", "public function init()\n\t{\n//\t\t$this->js[] = YII_DEBUG ? 'js/jquery.Jcrop.js' : 'js/jquery.Jcrop.min.js';\n $this->css[]=\"css/imgareaselect-animated.css\";\n $this->css[]=\"css/imagestyle.css\";\n\n $this->js[]=\"js/script.js\";\n $this->js[]=\"js/jquery.imgareaselect.pack.js\";\n $this->js[]=\"//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js\";\n \n \n // $this->js[]=\"js/myjs.js\";\n \n\t\n\t}", "public function js_css_public(){\n\n wp_enqueue_style('asRange', plugin_dir_url(__FILE__). 'libs/assets/css/asRange.min.css', false, $this->version());\n wp_enqueue_style('select2', plugin_dir_url(__FILE__). 'libs/assets/css/select2.min.css', false, $this->version());\n wp_enqueue_style('flatpickr', plugin_dir_url(__FILE__). 'libs/assets/css/flatpickr.min.css', false, $this->version());\n wp_enqueue_style('metform-ui', plugin_dir_url(__FILE__). 'libs/assets/css/metform-ui.css', false, $this->version());\n wp_enqueue_style('font-awesome', plugin_dir_url(__FILE__). 'libs/assets/css/font-awesome.min.css', false, $this->version());\n wp_enqueue_style('metform-style', plugin_dir_url(__FILE__). 'libs/assets/css/style.css', false, $this->version());\n \n wp_enqueue_script('asRange', plugin_dir_url(__FILE__) . 'libs/assets/js/jquery-asRange.min.js', array(), $this->version(), true);\n wp_enqueue_script('select2', plugin_dir_url(__FILE__) . 'libs/assets/js/select2.min.js', array(), $this->version(), true);\n wp_enqueue_script('flatpickr', plugin_dir_url(__FILE__) . 'libs/assets/js/flatpickr.js', array(), $this->version(), true);\n \n wp_register_script('recaptcha', 'https://www.google.com/recaptcha/api.js?onload=onloadMetFormCallback&render=explicit', array(), $this->version(), true);\n wp_enqueue_script('metform-submission', plugin_dir_url(__FILE__) . 'libs/assets/js/submission.js', array(), $this->version(), true);\n \n\n }", "public function enqueue_scripts() {\n\t\t$this->styles();\n\t\t$this->scripts();\n\t}", "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addYiiGemsCommonCss();\n $this->addFontAwesomeCss();\n $this->addAssetInfo( \"buttonBar.css\", dirname(__FILE__) . \"/assets\" );\n $this->addGradientAssets(array(\n $this->gradient, $this->hoverGradient,\n $this->activeGradient, $this->selectedGradient,\n $this->separatorGradient, $this->selectedColor\n ));\n }", "function cssAndJs() {\r\n\t\t$siteurl = get_bloginfo('wpurl');\r\n\t\t// include css in any case. e.g. for widget\r\n\t\tprint '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.css\" />'.\"\\n\";\r\n\t\tif (!defined('IS_UWR1RESULTS_VIEW')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$siteurlPath = substr($siteurl, strlen('http://'.$_SERVER['HTTP_HOST']));\r\n\t\tif ('/' != $siteurlPath{0}) {\r\n\t\t\t$siteurlPath = '/'.$siteurlPath;\r\n\t\t}\r\n\t\t//print '<script type=\"text/javascript\" src=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.js.php?siteurl='.urlencode($siteurlPath)./*($https?'ssl=1':'').*/'\"></script>'.\"\\n\";\r\n\t}", "private function _initJsCss(){\n\t\t$cs = Yii::app()->clientScript;\n\t\t$cs->registerCssFile(Yii::app()->baseUrl . '/css/admin/admin.css');\n\n\t}", "protected function renderJavaScriptAndCss() {}", "public function css() {\r\n\t\tif ($this->cssLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/css/'.$this->cssLink.'.css\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif ($this->cssExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.$this->cssExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->cssExternalLink);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public function initialize()\n {\n // $this->view->setTemplateBefore('public');\n // $this->view->setTemplateBefore('coba');\n if ($this->session->has('auth-identity')) {\n // $this->view->setTemplateBefore('private');\n $this->view->setTemplateBefore('cobaprivate');\n }else {\n // $this->view->setTemplateBefore('public');\n $this->view->setTemplateBefore('coba');\n }\n\n // Add some local CSS resources\n $this->assets->addCss(\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\");\n $this->assets->addCss(\"css/font-awesome.min.css\");\n $this->assets->addCss(\"css/animate.min.css\");\n $this->assets->addCss(\"css/prettyPhoto.css\");\n $this->assets->addCss(\"css/main.css\");\n $this->assets->addCss(\"css/responsive.css\");\n\n // And some local JavaScript resources\n $this->assets->addJs(\"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\");\n $this->assets->addJs(\"js/jquery.js\");\n $this->assets->addJs(\"js/bootstrap.min.js\");\n $this->assets->addJs(\"js/main.js\");\n $this->assets->addJs(\"js/jquery.prettyPhoto.js\");\n $this->assets->addJs(\"js/jquery.isotope.min.js\");\n $this->assets->addJs(\"js/wow.min.js\");\n }", "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n if ($this->iconClass) {\n $this->addAssetInfo(\n \"font-awesome.css\", \n $this->getCommonAssetDir()\n );\n }\n \n $this->addAssetInfo(\n \"titleHeader.css\",\n dirname(__FILE__) . \"/assets\"\n );\n }", "public function __construct()\n {\n $this->style = file_get_contents(__DIR__ . '/style.css');\n //load scripts.js into $scripts\n $this->scripts = file_get_contents(__DIR__ . '/scripts.js');\n }", "public function addAssets()\n {\n $this->addJs('../../graphreport/assets/d3.js');\n $this->addJs('../../graphreport/assets/c3.js');\n $this->addCss('../../graphreport/assets/c3.css'); \n }", "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addYiiGemsCommonCss();\n $this->addFontAwesomeCss();\n $this->addAssetInfo(\n array( \"$this->style.css\", \"faq.js\"),\n dirname(__FILE__) . \"/assets\"\n );\n $this->addGradientAssets($this->gradient);\n }", "function perusecretland_css_js() {\n wp_enqueue_style( 'perusecretland-fonts', get_stylesheet_directory_uri() . '/css/fonts.css');\n wp_enqueue_style( 'perusecretland-responsive', get_stylesheet_directory_uri() . '/css/responsive.css');\n wp_enqueue_style( 'jquery-chosen', get_stylesheet_directory_uri() . '/css/chosen.min.css');\n wp_enqueue_script( 'perusecretland-easing', get_stylesheet_directory_uri() . '/js/jquery.easing.1.3.js', array('jquery'));\n wp_enqueue_script( 'jquery-chosen', get_stylesheet_directory_uri() . '/js/chosen.jquery.min.js', array('jquery'));\n wp_enqueue_script( 'perusecretland-scripts', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'));\n wp_enqueue_script( 'perusecretland-footer-scripts', get_stylesheet_directory_uri() . '/js/footer.scripts.js', array('jquery', 'jquery-chosen'), false, true );\n }", "public function DefineJsResources()\n {\n $this->carabiner->js('https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js');\n $this->carabiner->js('https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js');\n $this->carabiner->js('https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.min.js');\n // an array of arrays\n $this->carabiner->js(array(\n array('assets/js/Chart.min.js'),\n array('assets/js/Chart.bundle.min.js'),\n array('assets/js/jquery.js')\n ));\n }", "public function DefineCssResources()\n {\n $this->carabiner->css(array(\n array('assets/css/libs/bootstrap.css'),\n array('assets/css/views/normalize.css'),\n array('assets/css/libs/Chart.min.css')\n ));\n }", "function add_css_js()\n\t{\n\t\tif (!defined('CSS_JS_PARSED'))\n\t\t{\n\t\t\tdefine('CSS_JS_PARSED', true);\n\t\t}\n\n\t\t// Include custom CSS from templates/CURRENT_TPL folder\n\t\tif(is_array($this->css_style_include) && !empty($this->css_style_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->css_style_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('css_style_include', array(\n\t\t\t\t\t'CSS_FILE' => $this->css_style_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Include custom CSS from templates/common folder\n\t\tif(is_array($this->css_include) && !empty($this->css_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->css_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('css_include', array(\n\t\t\t\t\t'CSS_FILE' => $this->css_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Include custom JS from templates/common folder\n\t\tif(is_array($this->js_include) && !empty($this->js_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->js_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('js_include', array(\n\t\t\t\t\t'JS_FILE' => $this->js_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addYiiGemsCommonCss();\n $this->addFontAwesomeCss();\n $this->addAssetInfo(\n \"ribbon.css\",\n dirname(__FILE__) . \"/assets\"\n );\n $this->addGradientAssets($this->barGradient);\n }", "function excalibur_css_js() {\n\tglobal $wp_styles;\n\t\t// register main stylesheet\n\t\twp_register_style('excalibur-stylesheet', get_stylesheet_directory_uri() . '/assets/css/styles.css', array(), '', 'all');\n\t\t\n\t\twp_enqueue_style( 'excalibur-stylesheet' );\n}", "public function init() {\n\t\t\n\t\t$class = $this->className();\n\t\t$config = $this->wire('config');\n\t\n\t\t$file = $config->paths->$class . \"$class.css\";\n\t\tif($this->loadStyles && is_file($file)) {\n\t\t\t$mtime = filemtime($file);\n\t\t\t$this->config->styles->add($config->urls->$class . \"$class.css?v=$mtime\");\n\t\t}\n\t\t\n\t\t$file = $config->paths->$class . \"$class.js\"; \n\t\t$mtime = 0;\n\t\tif($this->loadScripts && is_file($file)) {\n\t\t\t$minFile = $config->paths->$class . \"$class.min.js\";\n\t\t\tif(!$config->debug && is_file($minFile)) {\n\t\t\t\t$mtime = filemtime($minFile);\n\t\t\t\t$config->scripts->add($config->urls->$class . \"$class.min.js?v=$mtime\");\n\t\t\t} else {\n\t\t\t\t$mtime = filemtime($file);\n\t\t\t\t$config->scripts->add($config->urls->$class . \"$class.js?v=$mtime\");\n\t\t\t}\n\t\t}\n\n\t\tif(count($this->requested)) {\n\t\t\tforeach($this->requested as $name) {\n\t\t\t\t$url = $this->components[$name]; \n\t\t\t\tif(strpos($url, '/') === false) {\n\t\t\t\t\t$mtime = filemtime($config->paths->$class . $url);\n\t\t\t\t\t$url = $config->urls->$class . $url;\n\t\t\t\t}\n\t\t\t\t$url .= \"?v=$mtime\";\n\t\t\t\t$this->wire('config')->scripts->add($url);\n\t\t\t}\n\t\t\t$this->requested = array();\n\t\t}\n\n\t\t$this->initialized = true;\n\t}", "function head_css()\n\t{\n\t\tqa_html_theme_base::head_css();\n\t\t// if if already added widgets have a css file activated\n\t\t$styles = array();\n\t\tforeach ($this->content['widgets'] as $region_key => $regions) {\n\t\t\tforeach ($regions as $template_key => $widgets) {\n\t\t\t\t$position = strtoupper(substr($region_key,0,1) . substr($template_key,0,1) );\n\t\t\t\tforeach ($widgets as $key => $widget) {\n\t\t\t\t\t$widget_name = get_class ($widget);\n\t\t\t\t\t$widget_key = $widget_name.'_'.$position;\n\t\t\t\t\t$file = get_widget_option($widget_key, 'uw_styles');\n\t\t\t\t\t// if file existed then put it into an array to prevent duplications\n\t\t\t\t\tif($file)\n\t\t\t\t\t\t$styles[$widget_name][$file]=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add styling files to theme\n\t\tif($styles)\n\t\t\tforeach ($styles as $widget_name => $files)\n\t\t\t\tforeach ($files as $file => $verified)\n\t\t\t\t\tif( $file != 'none' )\n\t\t\t\t\t\t$this->output('<link rel=\"stylesheet\" href=\"'.UW_URL.'widgets/'.$widget_name.'/styles/'.$file.'\"/>');\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 }", "public function init() {\n\t\tparent::init();\n\t\t\t\t\n\t\t// Register site CSS file\n\t\t$cs = Yii::app()->clientscript;\n\t\t$cs->registerCssFile(Yii::app()->baseUrl.'/css/site.css');\n\t}", "function theme_files() {\n \n wp_register_style('style', get_template_directory_uri() . '/dist/app.css', [], 1, 'all');\n wp_enqueue_style('style');\n\n wp_enqueue_script('jquery');\n\n wp_register_script('app', get_template_directory_uri() . '/dist/app.js', ['jquery'], 1, true);\n wp_enqueue_script('app');\n}", "function mandiberg_scripts() {\n\n\t\t//include bootstrap:\n\t\twp_register_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\t\twp_enqueue_style( 'bootstrap-style');\n\n\n\n\t\t// Register the style like this for a theme:\n\t wp_register_style( 'mandiberg-style', get_template_directory_uri() . '/style.css', array(), '20120208', 'all' );\n\t\twp_enqueue_style( 'mandiberg-style');\n\n\t\t//barba js for transitions\n\n\t\t wp_register_script('barba', get_template_directory_uri() . '/build/barba.min.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('barba');\n\n\t\t//js\n\t\twp_register_script('js-file', get_template_directory_uri() . '/build/script.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('js-file');\n\n\t}", "public function loadAssets(): void\n {\n $this->printStyle('//resource.css', 'print_resource_page_assets');\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 }", "public function includeAssets()\n {\n $this->Html->script('CkTools.vendor/tinymce/jquery.tinymce.min.js', ['block' => true]);\n $this->Html->script('CkTools.vendor/moxiemanager/js/moxman.loader.min.js', ['block' => true]);\n }", "public function dt_icon_list_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'droit-wbpakery-addons_js', plugins_url('assets/droit-wbpakery-addons.js', __FILE__), array('jquery') );\n }", "public function init()\n{\n//'assets/js/cssrefresh.js'\n// ];\n parent::init();\n}", "public function prepareHead() {\r\n // add jQuery\r\n if($this->cdn_jquery) {\r\n $this->addJS('//code.jquery.com/jquery-2.1.0.min.js', true);\r\n $this->addJS('//code.jquery.com/jquery-migrate-1.2.1.min.js', true);\r\n } else {\r\n $this->addJS(array('jquery-2.1.0.min', 'jquery-migrate-1.2.1.min'));\r\n }\r\n // add bootstrap\r\n if($this->cdn_bootstrap) {\r\n $this->addCSS('//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css', true);\r\n $this->addJS('//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js', true);\r\n } else {\r\n $this->addCSS('bootstrap.min');\r\n $this->addJS('bootstrap.min');\r\n }\r\n \r\n $this->addCSS(array('bootstrap-switch.min', 'spectrum'));\r\n $this->addJS(array('plugins'));\r\n \r\n // ace code editor\r\n $this->addJS('libs/ace/ace.js', true);\r\n \r\n $this->addCSS('style');\r\n $this->addJS('script');\r\n \r\n $this->smarty->assign(array(\r\n 'title' => $this->title,\r\n 'css_files' => $this->css_files,\r\n 'js_files' => $this->js_files,\r\n ));\r\n }", "protected function addSystemCssJs()\n\t{\n\t\tglobal $cWebPath;\n\t\t\t\t\n\t\t$this->mStyles[] = $cWebPath . '/style/mainstyle.css';\n\t\t$this->mStyles[] = $cWebPath . '/style/svwp_style.css';\n\t\t\n\t\t$this->mScripts[] = $cWebPath . '/scripts/jquery.slideViewerPro.1.5.js';\n\t\t$this->mScripts[] = $cWebPath . '/scripts/jquery.timers-1.2.js';\n\t\t$this->mScripts[] = $cWebPath . '/scripts/imageslider.js';\n\t}", "function init() {\n $this->enqueue_script();\n $this->localize_script();\n $this->stylize();\n }", "public function styles() {\n $this->addStyle(CORE_WWW_ROOT.\"ressources/css/externals/bootstrap.core.min.css\", true);\n\n\n $this->addStyle($this->directory().\"css/reset.less\");\n $this->addStyle($this->directory().\"css/animations.less\");\n $this->addStyle($this->directory().\"css/main.less\");\n $this->addStyle($this->directory().\"css/overlay.less\");\n $this->addStyle($this->directory().\"css/header.less\");\n $this->addStyle($this->directory().\"css/footer.less\");\n\n // externals\n $this->addStyle(\"//fonts.googleapis.com/css?family=Lora:400,400i,700,700i\", true);\n $this->addStyle('//fonts.googleapis.com/css?family=Roboto:700', true);\n\n // blocks\n $this->addStyle($this->directory().\"css/blocks/rd_arrow.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_button.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_bigteaser.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_smallteaser.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_longtext.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_forms.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_listings.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_collection.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_components.less\");\n\n $this->addStyle($this->directory().\"css/responsive.less\");\n }", "function achilles_scripts() {\n\t\n\t//main stylesheet for now\n\twp_enqueue_style('achilles_style', get_template_directory_uri() . '/style.css', false, '1.0');\n\t\n\t//Foundations stylesheet\n\twp_register_style( 'achilles_main', get_template_directory_uri(). '/css/app.css', false, '1.0');\n\t\n\t\n\twp_enqueue_style( 'achilles_main' );\n\t\n\t//Load built in jQuery from WordPress \n\t// @TODO: Load jQuery from CDN or Google\n\twp_enqueue_script( 'jquery' );\n}", "public function addRessources()\n {\n // $this->context->controller->addCss(($this->_path . '/views/css/tab.css'), 'all');\n // $this->context->controller->addJquery();\n // $this->context->controller->addJS(($this->_path . '/views/js/script.js'));\n // $this->context->controller->addJS(($this->_path . '/views/js/configuration.js'));\n }", "function mightyResources() {\n $css_file = get_stylesheet_directory() . '/dist/assets/css/style.min.css';\n wp_enqueue_style('theme', get_stylesheet_directory_uri() . '/dist/assets/css/style.min.css', '', date('m.d.Y.H.i.s', filemtime($css_file)));\n\t\twp_dequeue_style('wp-block-library');\n\n wp_deregister_script('jquery');\n wp_register_script('jquery', ('//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js'), '', '2.2.4', false);\n wp_enqueue_script('jquery');\n\n // wp_enqueue_script('fontawesome-kit', '//kit.fontawesome.com/72e34829c8.js', '', '1.0', false);\n\t\twp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?key=AIzaSyClqC80DXd3luWXcJZ-a0odx1q6ddTDVr0', '', '1.0', false);\n\n\t\twp_enqueue_script('aos', '//unpkg.com/[email protected]/dist/aos.js', '', '2.3.1', true);\n wp_enqueue_script('theme', get_stylesheet_directory_uri() . '/dist/assets/js/scripts.min.js', ['jquery'], '1.0.6', true);\n\n\t\twp_localize_script('theme', 'globalVar', array(\n\t\t 'themePath' => get_template_directory_uri(),\n\t\t));\n }", "function massively_theme_assets() {\n\n\t\t$var = '1.0.0';\n\n\t\t/* CSS */\n\t\twp_enqueue_style( 'main-css', get_theme_file_uri('/assets/css/main.css'), '', $var );\n\t\twp_enqueue_style( 'noscript-css', get_theme_file_uri('/assets/css/noscript.css'), '', $var );\n\t\twp_enqueue_style( 'theme-css', get_stylesheet_uri(), '', $var );\n\n\t\t/* JavaScripts */\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'scrollex-js', get_theme_file_uri('/assets/js/jquery.scrollex.min.js'), '', $var );\n\t\twp_enqueue_script( 'scrolly-js', get_theme_file_uri('/assets/js/jquery.scrolly.min.js'), '', $var );\n\t\twp_enqueue_script( 'browser-js', get_theme_file_uri('/assets/js/browser.min.js'), '', $var );\n\t\twp_enqueue_script( 'breakpoints-js', get_theme_file_uri('/assets/js/breakpoints.min.js'), '', $var );\n\t\twp_enqueue_script( 'util-js', get_theme_file_uri('/assets/js/util.js'), '', $var );\n\t\twp_enqueue_script( 'main-js', get_theme_file_uri('/assets/js/main.js'), array('jquery'), $var, true );\n\t}", "function theme_scripts() {\n wp_enqueue_style('main', CSS . '/main.css');\n wp_enqueue_style('my', CSS . '/my.css');\n wp_enqueue_script('scripts', JS . '/main.js', array('jquery'), null, true);\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 jn_scripts_styles() {\n // Loads our main stylesheet.\n wp_enqueue_style( 'jn-style', get_stylesheet_uri() );\n // Loads jQuery\n\twp_enqueue_script( 'jquery' );\n\t// Loads javascript file\n wp_enqueue_script('jn-js-responsive', get_template_directory_uri() . '/js/responsive.js');\n}", "protected function loadJavaScripts() {}", "private function setup_assets() {\n\t\t$this->prefix = sanitize_title($this->theme_name) . '-';\n\t\t$public_lib = '/lib/pub/';\n\t\t$source_lib = '/lib/src/';\n\n\t\t//IF WP DEBUG Is ON, load source maps and assets\n\t\tif (constant(\"WP_DEBUG\") === true) {\n\t\t\t//Style Resources\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'styles',\n\t\t\t\t'path' => $source_lib . 'css/master.css',\n\t\t\t\t'deps' => array()\n\t\t\t);\n\t\t\t\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'scss',\n\t\t\t\t'path' => $source_lib . 'scss/master.scss',\n\t\t\t\t'deps' => array( $this->prefix . 'styles')\n\t\t\t);\n\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'css-map',\n\t\t\t\t'path' => $source_lib . 'maps/master.css.map',\n\t\t\t\t'deps' => array( $this->prefix . 'styles', $this->prefix . 'scss')\n\t\t\t);\n\t\t\n\t\n\t\t\t$this->scripts[] = array(\n\t\t\t\t'slug' => $this->prefix . 'plugins',\n\t\t\t\t'path' => $source_lib . 'js/plugins.js',\n\t\t\t\t'deps' => array(\n\t\t\t\t\t'jquery'\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->scripts[] = array(\n\t\t\t\t'slug' => $this->prefix . 'the-script',\n\t\t\t\t'path' => $source_lib . 'js/script.js',\n\t\t\t\t'deps' => array(\n\t\t\t\t\t'jquery'\n\t\t\t\t)\n\t\t\t);\n\n\n\n\t\t\t// $this->scripts[] = array(\n\t\t\t// \t'slug' => $this->prefix . 'script-map',\n\t\t\t// \t'path' => $source_lib . 'maps/scripts.js.map',\n\t\t\t// \t'deps' => array(\n\t\t\t// \t\t'jquery',\n\t\t\t// \t\t$this->prefix . 'script'\n\t\t\t// \t)\n\t\t\t// );\n\t\n\t\t// Otherwise load only minified assets\n\t\t} else {\n\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'styles-min',\n\t\t\t\t'path' => $public_lib . 'css/master.min.css',\n\t\t\t\t'deps' => array()\n\t\t\t);\n\n\t\t\t$this->scripts[] = array(\n\t\t\t\t\t'slug' => $this->prefix . 'scripts-min',\n\t\t\t\t\t'path' => $public_lib . 'js/master.min.js',\n\t\t\t\t\t'deps' => array(\n\t\t\t\t\t\t'jquery'\n\t\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t}\n\t\t\n\t\t$this->add_wp_script('jquery');\n\t\t\n\t\tadd_action('wp_enqueue_scripts', array( $this, 'theme_assets_handler' ));\n\t}", "function css_files() {\n\t\twp_enqueue_style('escalate_network-admin-global', $this->plugin_url .'/css/styles-admin-global.css');\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 }", "function assets() {\n\t\tif ( ! is_admin() ) {\n\t\t\twp_enqueue_style( '_yourthemename-style', get_theme_file_uri( '/dist/css/bundle.css' ), array(), _YOURTHEMENAME_VER );\n\n\t\t\twp_deregister_script( 'jquery' );\n\t\t\twp_enqueue_script( '_yourthemename-scripts', get_theme_file_uri( '/dist/js/bundle.min.js' ), array(), _YOURTHEMENAME_VER, true );\n\t\t}\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "function webbusiness_scripts() {\n\twp_enqueue_style('webbusiness-style', get_stylesheet_uri());\n\twp_enqueue_style('webbusiness-framework', get_template_directory_uri() . '/css/framework.css');\n\t$style = get_theme_mod(\"style\");\n\tif (!$style || $style == \"default\") {\n\t\t$style = \"dark\";\n\t}\n\t$wp_customize = \"\";\n\tif (isset($_POST[\"wp_customize\"])) $wp_customize = $_POST[\"wp_customize\"];\n\tif ($wp_customize == \"on\") {\n\t\twp_enqueue_style('webbusiness-color-dynamic', get_template_directory_uri() . '/css/dynamic-css-customizer.php');\n\t} else {\n\t\twebbusiness_save_css();\n\t\t$uploads = wp_upload_dir();\n\t\t$uploads_dir = trailingslashit($uploads[\"basedir\"]);\n\t\t$uploads_path = trailingslashit($uploads[\"baseurl\"]);\n\t\tif (file_exists($uploads_dir . \"webbusiness.css\") /* && !$save_custom_css */) {\n\t\t\twp_enqueue_style('webbusiness-color-dynamic', $uploads_path . \"webbusiness.css\");\n\t\t} else {\n\t\t\twp_enqueue_style('webbusiness-color-dynamic', get_template_directory_uri() . '/css/dynamic-css.php');\n\t\t}\n\t}\n\n\twp_enqueue_style('webbusiness-layout', get_template_directory_uri() . '/css/webbusiness.css');\n\t\n\tif (!get_theme_mod(\"googlefonts_link\")) {\n\t\twp_enqueue_style('webbusiness-googlefonts', \"http://fonts.googleapis.com/css?family=Ubuntu\");\n\t}\n\t\n\twp_enqueue_script('webbusiness-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true);\n\n\twp_enqueue_script('webbusiness-jquery-cycle', get_template_directory_uri() . '/js/jquery.cycle.all.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-superfish', get_template_directory_uri() . '/js/superfish.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-tinynav', get_template_directory_uri() . '/js/tinynav.min.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-script', get_template_directory_uri() . '/js/script.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-retina', get_template_directory_uri() . '/js/retina-1.1.0.min.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-modernizr', get_template_directory_uri() . '/js/modernizr-2.0.6.min.js', array(), '20120206', false);\n\n\tif (is_singular() && comments_open() && get_option('thread_comments')) {\n\t\twp_enqueue_script('comment-reply');\n\t}\n\n\tif (is_singular() && wp_attachment_is_image()) {\n\t\twp_enqueue_script('webbusiness-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array('jquery'), '20120202');\n\t}\n}", "function scripts() {\n\n\t\t// Foundation core\n\t\twp_register_style( 'maera_zf', MAERA_FOUNDATION_SHELL_URL . '/assets/css/foundation.css' );\n\t\twp_enqueue_style( 'maera_zf' );\n\n\t\t// Foundation icons\n\t\twp_register_style( 'maera_foundation_icons', MAERA_FOUNDATION_SHELL_URL . '/assets/foundation-icons/foundation-icons.css' );\n\t\twp_enqueue_style( 'maera_foundation_icons' );\n\n\t\t// Add Foundation required scripts\n\t\twp_enqueue_script( 'fastclick', MAERA_FOUNDATION_SHELL_URL . '/assets/vendor/fastclick.js', false );\n\t\twp_enqueue_script( 'foundation', MAERA_FOUNDATION_SHELL_URL . '/assets/foundation.min.js', 'jquery' );\n\n\t\t// Add our custom styles\n\t\twp_register_style( 'maera_foundation_custom', MAERA_FOUNDATION_SHELL_URL . '/assets/css/style.css' );\n\t\twp_enqueue_style( 'maera_foundation_custom' );\n\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 enqueue_css_js() {\n\t\twp_enqueue_style('wp-pointer');\n\t\twp_enqueue_script('wp-pointer');\n\t}", "private function set_styles()\n {\n\n if (count($this->assets_css['global']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN GLOBAL MANDATORY STYLES -->');\n foreach($this->assets_css['global'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n if (isset($this->assets_css['page_style']) && count($this->assets_css['page_style']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN PAGE STYLES -->');\n foreach($this->assets_css['page_style'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n\n // Webkit based browsers\n //$this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/webkit.css\" media=\"screen\" />');\n\n // Internet Explorer styles\n $this->template->append_metadata('<!--[if IE 6]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie6.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 7]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie7.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie8.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 9]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie9.css\" media=\"screen\" /><![endif]-->');\n }", "public function initialize()\n {\n\n $this->view->setTemplateBefore('cobaprivate');\n // Add some local CSS resources\n $this->assets->addCss(\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\");\n $this->assets->addCss(\"css/font-awesome.min.css\");\n $this->assets->addCss(\"css/animate.min.css\");\n $this->assets->addCss(\"css/prettyPhoto.css\");\n $this->assets->addCss(\"css/main.css\");\n $this->assets->addCss(\"css/responsive.css\");\n\n // And some local JavaScript resources\n $this->assets->addJs(\"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\");\n $this->assets->addJs(\"js/jquery.js\");\n $this->assets->addJs(\"js/bootstrap.min.js\");\n $this->assets->addJs(\"js/main.js\");\n $this->assets->addJs(\"js/jquery.prettyPhoto.js\");\n $this->assets->addJs(\"js/jquery.isotope.min.js\");\n $this->assets->addJs(\"js/wow.min.js\");\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 Define_Resources() : void\n {\n for($i = 0;$i < count($this->Scripts);$i++)\n {\n if($this->Scripts[$i] instanceof stdClass)\n {\n wp_enqueue_script($this->Scripts[$i]->Handle,$this->Scripts[$i]->Src,$this->Scripts[$i]->Deps,$this->Scripts[$i]->Ver,$this->Scripts[$i]->InFooter);\n }\n }\n for($i = 0;$i < count($this->Styles);$i++)\n {\n if($this->Styles[$i] instanceof stdClass)\n {\n wp_enqueue_style($this->Styles[$i]->Handle,$this->Styles[$i]->Src,$this->Styles[$i]->Deps,$this->Styles[$i]->Ver,$this->Styles[$i]->Media);\n }\n }\n }", "function loadJSCSS() {\n\tif (!is_admin()) {\n\t\twp_enqueue_script( 'jquery' );\n\t\n\t// Load Theme Options\n\t\t$themeoptions = array_merge(get_option(\"tb_longwave_theme_general_options\"),get_option(\"tb_longwave_theme_header_options\"));\t\n\t\t\n\t\n\t// Enqueue the Theme Styles\n\n\t\t \n\t\t//Basic \n\t\twp_enqueue_style( 'tb_base_style',get_stylesheet_directory_uri().'/style.css');\n\t\t\n\t\t//Responsive?\n\t\tif(isset($themeoptions[\"tb_longwave_responsive_active\"])){\n\t\t\twp_enqueue_style( 'tb_mediaquery_style',T_CSS.'/media-queries.css');\n\t\t}\n\t\t\n\n\t\t//Google Font\n\t\t$google_font = $themeoptions[\"tb_longwave_main_font\"];\n\t if(!empty($google_font)) wp_enqueue_style( 'tb_googlefont_style',$google_font);\n\t \n\t //Fontello Icons\n\t wp_enqueue_style( 'tb_fontello_style',T_TYPE.'/fontello.css');\n\t \n\t //Main Color Style\n\t\tif(!empty($themeoptions[\"tb_longwave_main_style\"])) wp_enqueue_style( 'tb_longwave_main_style',T_CSS.\"/\".$themeoptions[\"tb_longwave_main_style\"].\".css\");\n\t\t \n\t \n\t// Enqueue the Theme JS \n\t\t\n\t\t//Navigation\n\t\twp_enqueue_script('tb_ddsmoothmenu_script', T_JS.\"/ddsmoothmenu.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_selectnav_script', T_JS.\"/selectnav.js\", array('jquery'),false,true);\n\t\t\n\t\t//Basics\n\t\twp_enqueue_script('tb_easytabs_script', T_JS.\"/jquery.easytabs.min.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_hoverdir_script', T_JS.\"/jquery.hoverdir.min.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_isotope_script', T_JS.\"/jquery.isotope.min.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_twitter_script', T_JS.\"/twitter.min.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_fitvids_script', T_JS.\"/jquery.fitvids.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_jribble_script', T_JS.\"/jquery.jribbble-0.11.0.ugly.js\", array('jquery'),false,true);\t\t\n\t\twp_enqueue_script('tb_sharrre_script', T_JS.\"/jquery.sharrre-1.3.3.php\", array('jquery'),false,true);\t\t\n\t\twp_enqueue_script('tb_portfolio_script', T_JS.\"/jquery.sliderportfolio.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_retina_script', T_JS.\"/retina.js\", array('jquery'),false,true);\t\n\t\t\t\t\t\n\t\t//Main Script\n\t\twp_enqueue_script('tb_longwave_script', T_JS.\"/scripts.js\", array('jquery'),false,true);\n\t\t\n\t\t//Comments\n\t\tif(is_singular() && get_option(\"thread_comments\")) wp_enqueue_script(\"comment-reply\");\n\t\t\n\t}\n}", "public function initialize() {\n parent::initialize();\n Gdn_Theme::section('Dashboard');\n $this->addJsFile('log.js');\n $this->addJsFile('jquery.expander.js');\n $this->addJsFile('jquery-ui.min.js');\n $this->addJsFile('jquery.popup.js');\n }", "public function loadAssets() {\r\n\t\t$this->app->document->addScript('elements:relateditems/relateditems.js');\r\n\t}", "function load_css() {\n wp_register_style('main', get_template_directory_uri() . '/css/main.css', array(), false, 'all');\n wp_enqueue_style('main');\n }", "public function set_script_styling(){\r\n /**\r\n * enqueue css styling here\r\n */\r\n wp_enqueue_style('before-after-comparison-styling', plugin_dir_url( __FILE__ ) . 'css/before-after.css', array(), '1.0');\r\n\r\n /**\r\n * enqueue custom js / javascript library here\r\n */\r\n wp_enqueue_script('before-after-comparison-javascript', plugin_dir_url( __FILE__ ) . 'js/before-after.js', array('jquery'), '1.0' , false);\r\n\r\n \r\n }", "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}", "function addCSSFiles()\n\t{\n\t\t$this->getContainer()->AddCSSFile(\"include/zoombox/zoombox.css\");\n\t}", "public function addDependencies()\n {\n $this->Html->script('/attachments/js/vendor/jquery.ui.widget.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.iframe-transport.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.fileupload.js', ['block' => true]);\n $this->Html->script('/attachments/js/app/lib/AttachmentsWidget.js', ['block' => true]);\n $this->Html->css('/attachments/css/attachments.css', ['block' => true]);\n }", "public function loadAssets()\r\n {\r\n $this->app->document->addStylesheet('elements:imagebox/assets/css/edit.css');\r\n return parent::loadAssets();\r\n }", "function scripts_styles() {\n\n\t\t// No need to process if in admin.\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$main_css_url = $theme_url . '/style.css';\n\t\t$main_css_path = get_template_directory() . '/style.css';\n\t\t$main_css_ver = file_exists( $main_css_path ) ? filemtime( $main_css_path ) : '';\n\n\t\twp_enqueue_style( 'superiocity-style', $main_css_url, null, $main_css_ver );\n\t\twp_deregister_script( 'wp-embed' );\n\t}", "public function init() {\n\t\t//theme needs to be set TWO times...\n\t\t//$theme = Session::get(\"theme\"); if(!$theme) {$theme = \"simple\";}SSViewer::set_theme($theme);\n\t\tparent::init();\n\t\t$theme = Config::inst()->get(\"SSViewer\", \"theme\");\n\t\tif($theme == \"main\") {\n\t\t\tRequirements::themedCSS('reset');\n\t\t\tRequirements::themedCSS('layout');\n\t\t\tRequirements::themedCSS('typography');\n\t\t\tRequirements::themedCSS('form');\n\t\t\tRequirements::themedCSS('menu');\n\n\t\t\tRequirements::themedCSS('ecommerce');\n\n\t\t\tRequirements::themedCSS('individualPages');\n\t\t\tRequirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');\n\t\t}\n\t\telseif($theme == \"simple\") {\n\t\t}\n\t}", "protected function loadStylesheets()\n {\n if (!empty($GLOBALS['TBE_STYLES']['stylesheet'])) {\n $this->pageRenderer->addCssFile($GLOBALS['TBE_STYLES']['stylesheet']);\n }\n if (!empty($GLOBALS['TBE_STYLES']['stylesheet2'])) {\n $this->pageRenderer->addCssFile($GLOBALS['TBE_STYLES']['stylesheet2']);\n }\n }", "public function initAssets()\n {\n add_action(\n \"admin_enqueue_scripts\",\n array($this, 'PluginScripts')\n );\n\n add_action(\n \"admin_enqueue_scripts\",\n array($this, 'PluginStyles')\n );\n }", "protected function init()\n {\n parent::init();\n // You can include any CSS or JS required by your project here.\n // See: https://docs.silverstripe.org/en/developer_guides/templates/requirements/\n }", "public function settings_assets () {\n\n // We're including the farbtastic script & styles here because they're needed for the colour picker\n // If you're not including a colour picker field then you can leave these calls out as well as the farbtastic dependency for the wpt-admin-js script below\n wp_enqueue_style( 'farbtastic' );\n wp_enqueue_script( 'farbtastic' );\n\n // We're including the WP media scripts here because they're needed for the image upload field\n // If you're not including an image upload then you can leave this function call out\n wp_enqueue_media();\n\n wp_register_script( $this->_token . '-settings-js', $this->assets_url . 'js/settings' . $this->script_suffix . '.js', array( 'farbtastic', 'jquery' ), '1.0.0' );\n wp_enqueue_script( $this->_token . '-settings-js' );\n \n\n }", "public function setup() {\n\t\t$this->setup_menu();\n\t\t$this->enqueue_scripts();\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}", "public function enqueue_scripts(){\n\t\t\t// Add the color picker JS & CSS files\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_script( 'wp-color-picker' );\n\t\t}", "function include_css_js_files()\n{\n\twp_register_style('css_file1','https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css');\n\twp_enqueue_style('css_file1');\n\n\n\twp_register_script('js_file1','https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js');\n\twp_enqueue_script('js_file1');\n\twp_register_script('js_file2','https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js');\n\twp_enqueue_script('js_file2');\n\twp_register_script('js_file3','https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js');\n\twp_enqueue_script('js_file3');\n\n}", "function init() {\n\n\t\twp_register_style( THEME_PREFIX . '/copy', get_theme_file_url( 'assets/critical/copy.min.css' ), null, 'init' );\n\n\t\tCalyx()->_register_vendor_assets();\n\n\t\twp_register_script( THEME_PREFIX . '/script_object', get_theme_file_url( 'assets/js/calyx.min.js' ), null, 'init' );\n\n\t\t\t$localize_args = array(\n\t\t\t\t'_site' => home_url(),\n\t\t\t\t'_rest' => home_url( 'wp-json' ),\n\t\t\t\t'_ajax' => admin_url( 'admin-ajax.php' ),\n\n\t\t\t\t '_server_high_load' => json_encode( Calyx()->server()->is_high_load() ),\n\t\t\t\t'_server_extreme_load' => json_encode( Calyx()->server()->is_extreme_load() ),\n\t\t\t\t '_webfontloader' => json_encode( Calyx()->get_webfontloader_settings() ),\n\t\t\t);\n\n\t\t\tis_admin() && $localize_args['_admin'] = json_encode( true );\n\n\t\t\twp_localize_script( THEME_PREFIX . '/script_object', '_' . THEME_PREFIX . '_data', $localize_args );\n\n\t}", "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 register_scripts() {\n\t\t\t$id = get_the_ID();\n\t\t\t// Only continue if current page is home\n\t\t\tif ( !is_home() ) return;\n\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'kevinw-sf-react', plugins_url( 'assets/react.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\twp_enqueue_script( 'kevinw-sf-react-app', plugins_url( 'assets/scripts.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\n\t\t\t$this->register_scripts_css();\n\t\t}", "function theme_assets() {\n\t// load css\n\twp_enqueue_style( 'font-awesome-css', get_template_directory_uri() . '/css/fontawesome.css' );\n\twp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/css/bootstrap.css' );\n\twp_enqueue_style( 'style-css', get_template_directory_uri() . '/style.css', false, time() );\n\n\t// load javascript\n\twp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '', true );\n wp_enqueue_script( 'waterfall-js', get_template_directory_uri() . '/js/waterfall.js', array(), '', true );\n\twp_enqueue_script( 'main', get_template_directory_uri() . '/js/main.js', array(), '', true);\n}", "function goodrds_scripts() {\n\t\twp_register_style( 'goodrds_css', plugins_url('goodrds.css', __FILE__), false, '0.1' );\n\t\twp_enqueue_style( 'goodrds_css' );\n\n\t\twp_register_script( 'goodrds_js', plugins_url('goodrds.js', __FILE__), array('jquery'), '0.1', true );\n\t\twp_enqueue_script( 'goodrds_js' );\n\t}", "function nameless_sheep_scripts() {\n\t\t// Get the theme data.\n\t\t$the_theme = wp_get_theme();\n\t\t$theme_version = $the_theme->get( 'Version' );\n\n\t\t$css_version = $theme_version . '.' . filemtime( get_template_directory() . '/css/theme.min.css' );\n\t\twp_enqueue_style( 'nameless_sheep-styles', get_template_directory_uri() . '/css/theme.min.css', array(), $css_version );\n\n\t\twp_enqueue_script( 'jquery' );\n\t}", "protected function loadJavaScripts()\n {\n $this->pageRenderer->loadJquery();\n $this->pageRenderer->loadRequireJsModule('bootstrap');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ContextHelp');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DocumentHeader');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/SplitButtons');\n }", "public function loadAssets() {\r\n\t\tparent::loadAssets();\r\n\t\t$this->app->document->addScript('elements:download/assets/js/download.js');\r\n\t}", "function meatball_scripts() {\n\t// wp_enqueue_style( 'meatball-style', get_stylesheet_uri() );\n\n\twp_enqueue_style( 'meatball-style', get_template_directory_uri() . '/css/main.css' );\n\n\t// wp_enqueue_script( 'meatball-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\n\n\t// wp_enqueue_script( 'meatball-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\t// if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t// \twp_enqueue_script( 'comment-reply' );\n\t// }\n}" ]
[ "0.74689645", "0.7461765", "0.7363478", "0.7338017", "0.7332753", "0.73314744", "0.7321029", "0.7306904", "0.7306904", "0.7260686", "0.7245947", "0.7168618", "0.7163276", "0.71445405", "0.7133125", "0.7123209", "0.7121005", "0.71161366", "0.71074015", "0.7105983", "0.7091901", "0.7062405", "0.7050888", "0.704322", "0.70297897", "0.70226824", "0.69852835", "0.6973821", "0.6955378", "0.6949224", "0.6948036", "0.69480246", "0.6931637", "0.693024", "0.6929851", "0.69277716", "0.6921914", "0.69204473", "0.69161874", "0.6910929", "0.6907502", "0.68766457", "0.6872891", "0.6868105", "0.68614054", "0.6860154", "0.68594694", "0.68538046", "0.68523574", "0.6838217", "0.6838103", "0.6833919", "0.6830774", "0.6829931", "0.6827896", "0.6826508", "0.6820395", "0.68101656", "0.6799292", "0.6774792", "0.6770962", "0.6769187", "0.67647094", "0.6755371", "0.67541957", "0.6753602", "0.67519593", "0.6750572", "0.67471516", "0.67462873", "0.67382246", "0.67344236", "0.67343473", "0.6726329", "0.67263025", "0.67225814", "0.67218125", "0.671862", "0.671735", "0.6716816", "0.6715397", "0.6714938", "0.6709381", "0.67070013", "0.66980195", "0.66933924", "0.66881305", "0.6684347", "0.66789556", "0.6673867", "0.6670944", "0.6669746", "0.66621625", "0.6662129", "0.66534585", "0.6648436", "0.6645317", "0.6644459", "0.6643873", "0.66408056", "0.6631654" ]
0.0
-1
/ The input is an array of arrays array(top, array(array(icon, item),))+ The top level creates buttons the rest create the menu items
public function makeMenu($menu) { $out = array(); $out[] = "<div class=\"btn-group pull-left\">"; foreach($menu as $mx) { $i = 0; foreach($mx as $m) { $i ++; switch ($i) { case 1 : $icon = $m['icon']; $out[] = "<a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"{$m['url']}\">"; $out[] = $this->makeIcon($icon[0], $icon[1]); $out[] = "<span class=\"hidden-phone\">{$m['text']}</span><span class=\"caret\"></span></a>"; $out[] = "<ul class=\"dropdown-menu\">"; break; default : foreach($m as $mi) { if (in_array('divider', $mi)) { $out[] = '<li class="divider"></li>'; continue; } $icon = $mi['icon']; $out[] = "<li><a href=\"{$this->baseurl}{$mi['url']}\">" . $this->makeIcon($icon[0], $icon[1]) . " {$mi['text']}</a></li>"; } } $out[] = "</ul></div>"; } } return implode("\n", $out); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function buildMenuArray() {}", "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 }", "function add_item($arr)\n\t{\n\t\tif (empty($arr[\"parent\"]))\n\t\t{\n\t\t\t$arr[\"parent\"] = $this->menu_id;\n\t\t}\n\n\t\t$caption = empty($arr[\"text\"]) ? \"[MENU ITEM]\" : $arr[\"text\"];\n\t\t$attribs = array(\"class\" => \"menuItem\", \"caption\" => $caption);\n\t\tif (!empty($arr[\"href_id\"])) $attribs[\"id\"] = $arr[\"href_id\"]; // DOM id\n\t\tif (!empty($arr[\"title\"])) $attribs[\"title\"] = $arr[\"title\"]; // link title\n\n\t\tif(empty($arr[\"disabled\"]))\n\t\t{\n\t\t\t// href\n\t\t\tif (!empty($arr[\"action\"]))\n\t\t\t{\n\t\t\t\t$attribs[\"url\"] = \"javascript:submit_changeform('{$arr[\"action\"]}');\";\n\t\t\t}\n\t\t\telseif (!empty($arr[\"link\"]))\n\t\t\t{\n\t\t\t\t$attribs[\"url\"] = $arr[\"link\"];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$attribs[\"url\"] = \"javascript:void(0);\";\n\t\t\t}\n\n\t\t\t// onclick\n\t\t\t$attribs[\"onclick\"] = \"\";\n\t\t\tif (!empty($arr[\"onClick\"])) $attribs[\"onclick\"] = $arr[\"onClick\"];\n\t\t\tif (!empty($arr[\"onclick\"])) $attribs[\"onclick\"] = $arr[\"onclick\"];\n\n\t\t\t// target window/frame\n\t\t\tif (!empty($arr[\"target\"])) $attribs[\"target\"] = \"_blank\";\n\n\t\t\t// confirmation dialog\n\t\t\tif (!empty($arr[\"confirm\"])) $attribs[\"onclick\"] .= \"return confirm(\\\"{$arr[\"confirm\"]}\\\");\";\n\n\t\t\t$style = \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$attribs[\"url\"] = \"javascript:void(0);\";\n\t\t\t$style = \"color: gray; text-decoration: none; cursor: default;\";\n\t\t}\n\n\t\tif (!empty($arr[\"emphasized\"])) $style .= \"background-color: silver;\"; // emphasis\n\n\t\t$attribs[\"style\"] = $style;\n\n\t\t$rv = html::href($attribs);\n\n\t\tif (!isset($this->menus[$arr[\"parent\"]]))\n\t\t{\n\t\t\t$this->menus[$arr[\"parent\"]] = \"\";\n\t\t}\n\t\t\n\t\t$arr[\"html\"] = $rv;\n\t\tif (!isset($this->items[$arr[\"parent\"]]))\n\t\t{\n\t\t\t$this->items[$arr[\"parent\"]] = array();\n\t\t}\n\t\t$this->items[$arr[\"parent\"]][] = $arr;\n\t\t\n\t\t$this->menus[$arr[\"parent\"]] .= $rv;\n\t}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "public function run() {\n $menus = [\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '0',\n 'body' => 'Main Navigation',\n 'type' => 'separator'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '1',\n 'icon' => 'home',\n 'name' => 'dashboard',\n 'uri' => 'admin',\n 'title' => 'Go to Dashboard',\n 'body' => 'Dashboard'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '5.1',\n 'icon' => 'group',\n 'name' => 'user',\n 'uri' => 'admin/user',\n 'title' => 'User Management',\n 'body' => 'Users'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9',\n 'body' => 'Settings',\n 'type' => 'separator'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.1',\n 'name' => 'setting',\n 'icon' => 'gear',\n 'uri' => '',\n 'title' => 'Pengaturan Website',\n 'body' => 'Pengaturan',\n 'type' => 'parent'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.2',\n 'name' => 'menu',\n 'icon' => 'bars',\n 'uri' => 'admin/menu',\n 'title' => 'Pengaturan Menu',\n 'body' => 'Menus'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.3',\n 'icon' => 'key',\n 'name' => 'permission',\n 'uri' => 'admin/permission',\n 'title' => 'Roles & Permissions',\n 'body' => 'Permissions'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.1-1',\n 'name' => 'setting',\n 'icon' => '',\n 'uri' => 'admin/setting/global/update',\n 'title' => 'Pengaturan Global',\n 'body' => 'Global'\n ]\n ];\n\n for ($i = 0; $i < count($menus); $i++) {\n $menus[$i] = factory(\\App\\Menu::class)->create($menus[$i]);\n }\n\n $menus[0]->roles()->attach(3);\n $menus[1]->roles()->attach(3);\n $menus[2]->roles()->attach(2);\n $menus[3]->roles()->attach(2);\n $menus[4]->roles()->attach(2);\n $menus[5]->roles()->attach(1);\n $menus[6]->roles()->attach(1);\n $menus[7]->roles()->attach(1);\n }", "function topbar($menuItem, $navItems)\n{\n\n // Contains the nav bar items\n $navItems = array(\n 'Group Target Setter' => '/blocks/group_targets/view2.php',\n 'Change Target Status' => '/blocks/group_targets/set2.php',\n 'Group Profile' => '/blocks/group_targets/group2.php',\n 'Unit Tracker' => '/blocks/group_targets/tracker2.php',\n// 'Import Feeds' => $siteUrl . '/jobshop/feeds/process_feeds.php',\n// 'View Applications' => $siteUrl . '/jobshop/processing/index.php',\n// 'Featured Jobs' => $siteUrl . '/jobshop/slider/index.php',\n );\n\n echo '<div class=\"noprint\">';\n echo '<div class=\"topbar\">';\n echo '<div class=\"topbar-inner\">';\n echo '<div class=\"container-fluid\">';\n echo '<a class=\"brand\" href=\"#\">Group Target Setter v2.0</a>';\n echo '<ul class=\"nav\">';\n //print_r($navItems);\n foreach ($navItems as $key => $item) {\n\n // echo $key . ' ' . $item;\n\n if ($menuItem != $key) {\n $active = '';\n } elseif ($menuItem == $key) {\n $active = ' class=\"active\"';\n }\n\n echo '<li ', $active, '><a href=\"', $item, '\">', $key, '</a></li>';\n }\n\n echo '</ul>';\n // echo '<p class=\"pull-right\">Logged in as <a href=\"#\">username</a></p>';';\n echo '</div>';\n echo '</div>';\n echo '</div>';\n echo '</div>';\n\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}", "function add_sub_menu($arr)\n\t{\n\t\tif (empty($arr[\"parent\"]))\n\t\t{\n\t\t\t$arr[\"parent\"] = $this->menu_id;\n\t\t}\n\t\t$arr[\"sub_menu_id\"] = $arr[\"name\"];\n\t\t$baseurl = $this->cfg[\"baseurl\"];\n\t\t$rv = '<a class=\"menuItem\" href=\"\" onclick=\"return false;\"\n\t\t\t onmouseover=\"menuItemMouseover(event, \\''.$arr[\"sub_menu_id\"].'\\');\">\n\t\t\t\t<span class=\"menuItemText\">'.$arr[\"text\"].'</span>\n\t\t\t\t<span class=\"menuItemArrow\"><img style=\"border:0px\" src=\"'.$baseurl.\n\t\t\t\t'/automatweb/images/arr.gif\" alt=\"\"></span></a>';\n\n\t\tif (isset($this->menus[$arr[\"parent\"]]))\n\t\t{\n\t\t\t$this->menus[$arr[\"parent\"]] .= $rv;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->menus[$arr[\"parent\"]] = $rv;\n\t\t}\n\t\t\n\t\tif (!isset($this->items[$arr[\"name\"]]))\n\t\t{\n\t\t\t$this->items[$arr[\"name\"]] = array();\n\t\t}\n\t\tif (!isset($this->items[$arr[\"parent\"]]))\n\t\t{\n\t\t\t$this->items[$arr[\"parent\"]] = array();\n\t\t}\n\t\t$arr[\"html\"] = html::href(array(\"caption\" => $arr[\"text\"]));\n\t\t$this->items[$arr[\"parent\"]][] = $arr;\n\t}", "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}", "function arr_add_menu($arr_ipt){\n\t\t$type_map = array(\n\t\t\t'image' =>'图片',\n\t\t\t'elem' =>'元素',\n\t\t\t'maga' =>'杂志',\n\t\t\t'text' =>'文本',\n\t\t\t\n\t\t\t);\n\t\tforeach($arr_ipt as $k =>$v){\n\t\t\t$mode_word = !$v['mode'] ? '手动模式' :'自动模式';\n\t\t\t$arr_ipt[$k]['type'] = $type_map[$arr_ipt[$k]['type']];\n\t\t\t$arr_ipt[$k]['mode'] = '<a class=\"thickbox slotlist\" href = \"/slotlist/switchmode/'.$v['id'].'\" >'.$mode_word.'</a>';\n\t\t\t$arr_ipt[$k]['showall'] ='<a href = \"/slotlist/edit/'.$v['id'].'/m\" >('.$arr_ipt[$k]['adnumm'].'个)编辑</a>';\n\t\t\t$arr_ipt[$k]['showrand'] ='<a href = \"/slotlist/edit/'.$v['id'].'/a\">('.$arr_ipt[$k]['adnuma'].'个)编辑</a>';\n\t\t\t$arr_ipt[$k]['edit'] ='<a href = \"/slotlist/edit/'.$v['id'].'\" class=\"thickbox slotlist\"><font color=\"gray\">查看</font></a>';\n\t\t\t$arr_ipt[$k]['del'] ='<a href = \"/slotlist/del/'.$v['id'].'\" class=\"thickbox slotlist\"><font color=\"gray\">删除</font></a>';\n\t\t\n\t\t}\n\t\treturn $arr_ipt;\n\t}", "public static function run()\n {\n $Menus = [\n ['id' => '1' , 'name' => 'ManagementTools' ,'status' => 1 , 'menu_id' => 1, 'icon' => 'fa-cog'],\n ['id' => '2' , 'name' => 'Application' ,'status' => 1 , 'menu_id' => 2, 'icon' => 'fa-suitcase'],\n ['id' => '3' , 'name' => 'ManageUsers' ,'status' => 1 , 'menu_id' => 1, 'url' => 'users', 'icon' => 'fa-user'],\n ['id' => '4' , 'name' => 'ManagePermission' ,'status' => 1 , 'menu_id' => 1, 'url' => 'permissions', 'icon' => 'fa-wrench'],\n ['id' => '5' , 'name' => 'ManageRoles' ,'status' => 1 , 'menu_id' => 1, 'url' => 'roles', 'icon' => 'fa-lock'],\n ['id' => '6' , 'name' => 'ManageMenu' ,'status' => 1 , 'menu_id' => 1, 'url' => 'menus', 'icon' => 'fa-th-list'],\n ['id' => '7' , 'name' => 'Master' ,'status' => 1 , 'menu_id' => 2],\n ['id' => '8' , 'name' => 'ClientMenu' ,'status' => 1 , 'menu_id' => 2],\n ['id' => '9' , 'name' => 'Inspection' ,'status' => 1 , 'menu_id' => 2],\n ['id' => '10' , 'name' => 'Profession' ,'status' => 1 , 'menu_id' => 7 , 'url' => 'professions'],\n ['id' => '11' , 'name' => 'InspectorType' ,'status' => 1 , 'menu_id' => 7 , 'url' => 'inspectortypes'],\n ['id' => '12' , 'name' => 'InspectionType' ,'status' => 1 , 'menu_id' => 7 , 'url' => 'inspectiontypes'],\n ['id' => '13' , 'name' => 'InspectionSubtype' ,'status' => 1 , 'menu_id' => 7 , 'url' => 'inspectionsubtypes'],\n ['id' => '14' , 'name' => 'Client' ,'status' => 1 , 'menu_id' => 8 , 'url' => 'clients'],\n ['id' => '15' , 'name' => 'Headquarters' ,'status' => 1 , 'menu_id' => 8 , 'url' => 'headquarters'],\n ['id' => '16' , 'name' => 'Company' ,'status' => 1 , 'menu_id' => 8 , 'url' => 'companies'],\n ['id' => '17' , 'name' => 'Contract' ,'status' => 1 , 'menu_id' => 8 , 'url' => 'contracts'],\n ['id' => '18' , 'name' => 'Inspector' ,'status' => 1 , 'menu_id' => 9 , 'url' => 'inspectors'],\n ['id' => '19' , 'name' => 'InspectorAgenda' ,'status' => 1 , 'menu_id' => 9 , 'url' => 'inspectoragendas'],\n ['id' => '20' , 'name' => 'Inspectionappointment' ,'status' => 1 , 'menu_id' => 9 , 'url' => 'inspectionappointments'],\n ['id' => '21' , 'name' => 'Format' ,'status' => 1 , 'menu_id' => 9 , 'url' => 'formats'],\n ['id' => '22' , 'name' => 'Preformato' ,'status' => 1 , 'menu_id' => 7, 'url' => 'preformatos'],\n\n ];\n\n\t\tforeach ($Menus as $Menu) {\n\t\t\tMenu::create($Menu);\n\t\t}\n }", "function subMenu($title_arr, $links_arr, $attr_arr = array()) {\n\t\t$return = $this->beginSubMenu();\n\t\t$return .= $this->printSubMenu($title_arr, $links_arr, $attr_arr);\n\t\t$return .= $this->endSubMenu();\n\t\treturn $return;\n\t}", "public function makeMenu() {}", "function getMenuItems()\n {\n }", "function createMenu($arr_menu, $args = array() ){\n krsort($arr_menu);\n foreach ($arr_menu as $k => &$item) {\n if (!empty($item['parent'])) {\n $parent = $item['parent'];\n if (empty($arr_menu[$parent]['childs'])) {\n $arr_menu[$parent]['childs'] = array();\n }\n //2\n array_unshift($arr_menu[$parent]['childs'],$item);\n unset($arr_menu[$k]);\n }\n }\n //3\n ksort($arr_menu);\n\n // filter menu by user role\n $av_menu = menuAvailable($arr_menu);\n foreach ($arr_menu as $key => $value) {\n if(in_array($key, $av_menu))\n unset($arr_menu[$key]);\n }\n\n // echo \"<pre>\";\n // print_r($av_menu);\n // print_r($arr_menu);\n // echo \"</pre>\";\n // exit();\n\n buildMenu($arr_menu, $args);\n\n}", "public function getParentMenuArr() {}", "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 build () {\n foreach ( $this->items as $item ) {\n if ( $item->id() == $this->current->id() ) {\n $this->menu[]=$item;\n $this->appendChildren();\n } else if ( $item->parent_id() == $this->current->parent_id() ) {\n $this->menu[]=$item;\n }\n }\n reset ( $this->menu );\n }", "static function CreateMenuItem(array $item)\r\n\t\t{\r\n\t\t\tif (!empty($item[sub]))\r\n\t\t\t{\r\n\t\t\t\techo \"<li><a href='$item[url]' class = '$item[class]' title = '$item[tip]' $item[attributes]>$item[text]</a>\";\r\n\t\t\t\techo \"<ul>\";\r\n\t\t\t\t\tforeach ($item[sub] as $sub)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tself::CreateMenuItem($sub);\r\n\t\t\t\t\t}\r\n\t\t\t\techo \"</ul></li>\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo \"<li><a href='$item[url]' class = '$item[class]' title = '$item[tip]' $item[attributes]>$item[text]</a></li>\";\r\n\t\t\t}\r\n\t\t}", "function usermin_createmenuitems()\n{\n $menubar['user'] = array(\"href\" => \"?user\", \"label\" => \"My Details\");\n $menubar['history'] = array(\"href\" => \"?history\", \"label\" => \"My History\");\n $menubar['logout'] = array(\"href\" => \"?logoff\", \"label\" => \"Logoff\");\n return $menubar;\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}", "private function packMenus()\n {\n $menus = include_once __DIR__ . '/elements/menus.php';\n if (!is_array($menus)) {\n $this->modx->log(modX::LOG_LEVEL_ERROR, 'Cannot build menus');\n } else {\n foreach ($menus as $menu) {\n $this->builder->putVehicle($this->builder->createVehicle($menu, [\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::UNIQUE_KEY => 'text',\n xPDOTransport::RELATED_OBJECTS => true,\n xPDOTransport::RELATED_OBJECT_ATTRIBUTES => [\n 'Action' => [\n xPDOTransport::PRESERVE_KEYS => false,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::UNIQUE_KEY => ['namespace', 'controller']\n ]\n ]\n ]));\n $this->modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($menus) . ' menus.');\n }\n }\n }", "public function menubuilder($con=\"\",$userRole = 2,$flag = \"\",$usergroup)\n\t{ \t\t\t\n\t\t$uploadPath = BASE_URL.'public/media/images/menuIcons/';\n\t\t\n\t\t$menuheightclass= '';\n\t\t$groupbasedclass = '';\n\t\t$ulclass = '';\n\t\t\n\t\tif($usergroup =='' || $usergroup == MANAGEMENT_GROUP)\n\t\t{\n\t\t\t$menuheightclass = '';\n\t\t\t$groupbasedclass = '';\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\t$menuheightclass = 'menuheight';\n\t\t\t$groupbasedclass = '-common';\n\t\t\t$ulclass = 'new-roles'; \n\t\t}\t\n\t\t\t\n\t\t$menu_model = new Default_Model_Menu();\n\t\t$marr = $menu_model->getgroup_formenu($usergroup, $userRole, '');\n\t\t$active_menus = $menu_model->getisactivemenus();\n\t\t$act_menus = array();\n\t\tif(!empty($active_menus))\n\t\t{\n\t\t\tforeach($active_menus as $act)\n\t\t\t{\n\t\t\t\t$act_menus[$act['id']] = $act;\n\t\t\t}\n\t\t}\n\t\t$menuarr = $marr['tmpArr'];\n /*** removing icons in the menu 07-08-2015 - START - ***\n\t \n\t $parent_menu_class = array(SITECONFIGURATION => 'site-configuration',EMPLOYEECONFIGURATION => \"employee-configuration\",\n SITEPREFERENCE => \"site-preferences\",ORGANIZATION => \"organization-menu\",\n USERMANAGEMENT => \"user-management\",HUMANRESOURCE => \"hr-module\",RESOURCEREQUISITION => \"req-module\",\n EMPLOYEESELFSERVICE => \"ess-module\",BGCHECKS => \"bg-module\",\n REPORTS => \"report-module\",MANAGEMODULE => \"manage-module\",SERVICEDESK => 'service-desk',\n PERFORMANCEAPPRAISAL => \"perf-app\",FEED_FORWARD => \"feed-forward\",DASHBOARD_MENU => \"dashboard\",ANNOUNCEMENTS => \"\" \n );\n\t\t$parent_menu_selected_class = array(\n SITECONFIGURATION => 'sitec-selected',EMPLOYEECONFIGURATION => \"employeec-selected\",\n SITEPREFERENCE => \"sitep-selected\",ORGANIZATION => \"organization-selected\",\n USERMANAGEMENT => \"user-selected\",HUMANRESOURCE => \"hr-selected\",RESOURCEREQUISITION => \"req-selected\",\n EMPLOYEESELFSERVICE => \"ess-selected\",BGCHECKS => \"bg-selected\",\n REPORTS => \"report-selected\",MANAGEMODULE => \"manage-selected\",\n SERVICEDESK => 'service-selected',PERFORMANCEAPPRAISAL => \"perf-app-selected\",FEED_FORWARD => 'feed-forward-selected',DASHBOARD_MENU => \"dashboard-selected\",ANNOUNCEMENTS => \"\" \n\t\t\t);\n\t\t\t\n\t\t$tour_menu_class = array(SITECONFIGURATION => 'tour_siteconfiguration',\n EMPLOYEECONFIGURATION => \"tour_employeeconfigurations\",\n SITEPREFERENCE => \"tour_sitepreferences\",ORGANIZATION => \"tour_organization\",\n USERMANAGEMENT => \"tour_usermanagement\",HUMANRESOURCE => \"tour_humanresource\",\n RESOURCEREQUISITION => \"tour_requisition\",EMPLOYEESELFSERVICE => \"tour_employeeselfservice\",\n BGCHECKS => \"tour_backgroundchecks\",REPORTS => \"tour_reports\",\n MANAGEMODULE =>\"tour_managemodules\",SERVICEDESK => 'tour_service',PERFORMANCEAPPRAISAL => \"tour_performanceappraisal\",\n FEED_FORWARD => 'tour_feedforward',DASHBOARD_MENU => \"tour_dashboard\" ,ANNOUNCEMENTS => \"tour_dashboard\" \n );\n\n\t\t ******* removing icons in the menu 07-08-2015 - END - ***/\n\t\t\n\t\t$parent_menu_class = array(SITECONFIGURATION => '',EMPLOYEECONFIGURATION => \"\",\n SITEPREFERENCE => \"\",ORGANIZATION => \"\",\n USERMANAGEMENT => \"\",HUMANRESOURCE => \"\",PRESENSI => \"\",RESOURCEREQUISITION => \"\",\n EMPLOYEESELFSERVICE => \"\",BGCHECKS => \"\",\n REPORTS => \"\",MANAGEMODULE => \"\",SERVICEDESK => '',\n PERFORMANCEAPPRAISAL => \"\",FEED_FORWARD => \"\",DASHBOARD_MENU => \"\",ANNOUNCEMENTS => \"\",TIMEMANAGEMENT => \"\",\n EXPENSES=>\"\", ASSETS =>\"\", DISCIPLINARY=>\"\"\n );\n\t\t$parent_menu_selected_class = array(\n SITECONFIGURATION => '',EMPLOYEECONFIGURATION => \"\",\n SITEPREFERENCE => \"\",ORGANIZATION => \"\",\n USERMANAGEMENT => \"\",HUMANRESOURCE => \"\",PRESENSI => \"\",RESOURCEREQUISITION => \"\",\n EMPLOYEESELFSERVICE => \"\",BGCHECKS => \"\",\n REPORTS => \"\",MANAGEMODULE => \"\",\n SERVICEDESK => '',PERFORMANCEAPPRAISAL => \"\",FEED_FORWARD => '',DASHBOARD_MENU => \"\",ANNOUNCEMENTS => \"\",TIMEMANAGEMENT => \"\",EXPENSES => \"\", \n ASSETS =>\"\", DISCIPLINARY=>\"\" \n\t\t\t);\n\t\t\t\n\t\t$tour_menu_class = array(SITECONFIGURATION => 'tour_siteconfiguration',\n EMPLOYEECONFIGURATION => \"tour_employeeconfigurations\",\n SITEPREFERENCE => \"tour_sitepreferences\",ORGANIZATION => \"tour_organization\",\n USERMANAGEMENT => \"tour_usermanagement\",HUMANRESOURCE => \"tour_humanresource\",PRESENSI => \"tour_presensi\",\n RESOURCEREQUISITION => \"tour_requisition\",EMPLOYEESELFSERVICE => \"tour_employeeselfservice\",\n BGCHECKS => \"tour_backgroundchecks\",REPORTS => \"tour_reports\",\n MANAGEMODULE =>\"tour_managemodules\",SERVICEDESK => 'tour_service',PERFORMANCEAPPRAISAL => \"tour_performanceappraisal\",\n FEED_FORWARD => 'tour_feedforward',DASHBOARD_MENU => \"tour_dashboard\" ,ANNOUNCEMENTS => \"tour_dashboard\",\n TIMEMANAGEMENT => \"tour_timemanagement\" ,EXPENSES=>\"tour_expenses\", \n ASSETS=>\"tour_assets\", DISCIPLINARY=>\"tour_disciplinary\"\n );\n\n\t\t$childs_menu = \"\";\n\t\t$parent_menu = \"<div class='home_menu'><div role='main' class='menu-head main\".$menuheightclass.\"' id='menu-shadow' style='display:none;'>\n\t\t\t\t<ul id='main_ul' class='menu flex'>\";\n\t\t$clas_drag = ($con == 'settings')? ' draggable-reports-li ': ''; // Add draggable class for dashbord \n\t\t\n\t\t/*** commented to remove menu icon 07-08-2015 - START - ***\n\t\t$parent_menu .= \"<li id='main_parent_\".DASHBOARD_MENU.\"' super-parent = 'main_parent_\".DASHBOARD_MENU.\"' class = '\".$clas_drag.\"clickable_menu \".$parent_menu_selected_class[DASHBOARD_MENU].\"-main \".$tour_menu_class[DASHBOARD_MENU].\"' menu-url ='\".BASE_URL.\"welcome' selected-class = '\".$parent_menu_selected_class[DASHBOARD_MENU].\"' > <a id='\".DASHBOARD_MENU.\"' ><span class='scroll-menu dashboard dashboard-selected-common super_selected'></span><b>Dashboard</b></a></li>\";\n\t\t*** commented to remove menu icon 07-08-2015 - END - ***/\n\t\t$parent_menu .= \"<li id='main_parent_\".DASHBOARD_MENU.\"' super-parent = 'main_parent_\".DASHBOARD_MENU.\"' class = '\".$clas_drag.\"clickable_menu \".$parent_menu_selected_class[DASHBOARD_MENU].\"-main \".$tour_menu_class[DASHBOARD_MENU].\"' menu-url ='\".BASE_URL.\"welcome' selected-class = '\".$parent_menu_selected_class[DASHBOARD_MENU].\"' > <a id='\".DASHBOARD_MENU.\"' ><b>Dashboard</b></a></li>\";\n\t\t\n\t\tforeach($menuarr as $menuid => $data)\n\t\t{\t\t\t\n\t\t\t\n $for_childs_str = \"\";\n $parent_url = rtrim(BASE_URL,\"/\").$data['url'];\n\n\t\t\t\t\tif(isset($data['childs']) && count($data['childs']) > 0)\n {\t\t\t \n $for_childs_str = \"div_mchilds_\".$menuid;\n $parent_url = \"\";\n $childs_menu .= \"<div class='side-menu \".$for_childs_str.\"' style='display:none;'>\n\t\t\t\t\t\t\t\t\t<ul>\";\n foreach($data['childs'] as $ch_menu_id => $ch_menu_data)\n {\n \tif(isset($ch_menu_data['childs']) && count($ch_menu_data['childs']) > 0)\n {\n $childs_menu .= \"<li class='acc_li'><span class='acc_li_toggle' id='acc_li_toggle_\".$ch_menu_data['id'].\"' onclick='togglesubmenus(\".$ch_menu_data['id'].\");'><b>\".$ch_menu_data['menuName'].\"</b></span><ul>\";\n\t\t\t\t\t\t\t\t\n foreach($ch_menu_data['childs'] as $ch2_menu_id => $ch2_menu_data)\n {\n\t\t\t\t\t\t\t\t\tif($con == 'settings')\n {\n\t\t\t\t\t\t\t\t\t\tif($ch2_menu_id == MANAGE_POLICY_DOCS)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t/** policy document categories is not built as menu items \n\t\t\t\t\t\t\t\t\t\t\t** for settings page\n\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\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$childs_menu .= \"<li class = 'clickable_menu' super-parent = 'main_parent_\".$menuid.\"' menu-url = '\".rtrim(BASE_URL,\"/\").$ch2_menu_data['url'].\"' parent-div = '\".$for_childs_str.\"'><a id=\".$ch2_menu_data['id'].\"\t\thref='javascript:void(0);'>\".$ch2_menu_data['menuName'].\"</a></li>\";\n\t\t\t\t\t\t\t\t\t\t}\n }\n\t\t\t\t\t\t\t\t\telse if($ch2_menu_id == MANAGE_POLICY_DOCS)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/** to build policy document categories as menu items **/\n\t\t\t\t\t\t\t\t\t\t$childs_menu .= sapp_Helper::viewPolicyDocuments('menu');\n\t\t\t\t\t\t\t\t\t}\n else\n {\n $childs_menu .= \"<li class = 'clickable_menu' primary_parent = '\".$ch2_menu_data['parent'].\"' super-parent = 'main_parent_\".$menuid.\"' menu-url = '\".rtrim(BASE_URL,\"/\").$ch2_menu_data['url'].\"' parent-div = '\".$for_childs_str.\"'><a id=\".$ch2_menu_data['id'].\" href='\".rtrim(BASE_URL,\"/\").$ch2_menu_data['url'].\"/'>\".$ch2_menu_data['menuName'].\"</a></li>\";\n \n }\n }\n $childs_menu .= \"</ul></li>\";\n }\n else \n {\n\t\t\t\t\t\t\t\tif($con == 'settings')\n {\n\t\t\t\t\t\t\t\t\tif($menuid == SERVICEDESK && $ch_menu_id == SD_TRANS)\n { \n $storage = new Zend_Auth_Storage_Session();\n $sess_data = $storage->read();\n $childs_menu .= sapp_Helper::service_header($sess_data, 'menusettings');\n } \n\t\t\t\t\t\t\t\t\telse if($menuid == MANAGE_POLICY_DOCS)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/** policy document categories is not built as menu items \n\t\t\t\t\t\t\t\t\t\t** for settings page\n\t\t\t\t\t\t\t\t\t\t**/\n\t\t\t\t\t\t\t\t\t}\n else\n {\n $childs_menu .= \"<li class = 'clickable_menu single-menu' super-parent = 'main_parent_\".$menuid.\"' menu-url = '\".rtrim(BASE_URL,\"/\").$ch_menu_data['url'].\"' parent-div = '\".$for_childs_str.\"'><a id=\".$ch_menu_data['id'].\" href='javascript:void(0);'>\".$ch_menu_data['menuName'].\"</a></li>\";\n }\n }\n else\n {\n if($menuid == SERVICEDESK && $ch_menu_id == SD_TRANS)\n { \n $storage = new Zend_Auth_Storage_Session();\n $sess_data = $storage->read();\n $childs_menu .= sapp_Helper::service_header($sess_data, 'menu');\n } \n\t\t\t\t\t\t\t\t\telse if($menuid == MANAGE_POLICY_DOCS)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/** to build policy document categories as menu items **/\n\t\t\t\t\t\t\t\t\t\t$childs_menu .= sapp_Helper::viewPolicyDocuments('menu');\n\t\t\t\t\t\t\t\t\t}\n else\n {\n \t$condition = ($ch_menu_data['id'] == 168)? \"<span class='beta_menu'></span>\" : \"\";\n $childs_menu .= \"<li class = 'clickable_menu single-menu' super-parent = 'main_parent_\".$menuid.\"' menu-url = '\".rtrim(BASE_URL,\"/\").$ch_menu_data['url'].\"' parent-div = '\".$for_childs_str.\"'><a id=\".$ch_menu_data['id'].\" href='\".rtrim(BASE_URL,\"/\").$ch_menu_data['url'].\"/'>\".$ch_menu_data['menuName'].$condition.\"</a></li>\";\n }\n\t\t\t\t\t\t\t\t\t\n }\n }\n } \n $childs_menu .= \"</ul></div>\";\n }\n \n $super_str = \"\";$dummy_parent_div = \"\";\n if($menuid == SITEPREFERENCE)\n {\n $super_str = \" super-parent = 'main_parent_\".$menuid.\"' \";\n $dummy_parent_div = \"parent-div = 'dummy'\";\n }\n \n if($con == 'settings')\n {\n $parent_menu .= \"<li id='main_parent_\".$menuid.\"' \".$dummy_parent_div.\" \".$super_str.\" super-parent = 'main_parent_\".$menuid.\"' class = 'draggable-reports-li clickable_menu \".$parent_menu_selected_class[$menuid].($groupbasedclass!=''?\"-main-common \":\"-main \").$tour_menu_class[$menuid].\"' menu-url ='\".$parent_url.\"' for-childs = '\".$for_childs_str.\"' selected-class = '\".(($groupbasedclass!='')?$parent_menu_selected_class[$menuid].\"-common\":$parent_menu_selected_class[$menuid]).\"'><a id='\".$menuid.\"'><span class='scroll-menu \".(($groupbasedclass!='')?$parent_menu_class[$menuid].\"-common\":$parent_menu_class[$menuid]).\"'></span><b>\".$data['menuName'].\"</b></a></li>\";\n }\n else \n {\n\t\t\t\t\t\t// && $menuid != EXPENSES\n\t\t\t\t\t\tif($menuid != TIMEMANAGEMENT)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groupclass= \"\";\n\t\t\t\t\t\t\t$parent_menu .= \"<li id='main_parent_\".$menuid.\"' \".$dummy_parent_div.\" \".$super_str.\" super-parent = 'main_parent_\".$menuid.\"' class = 'clickable_menu \".$parent_menu_selected_class[$menuid].($groupbasedclass!=''?\"-main-common \":\"-main \").$tour_menu_class[$menuid].\"' menu-url ='\".$parent_url.\"' for-childs = '\".$for_childs_str.\"' selected-class = '\".(($groupbasedclass!='')?$parent_menu_selected_class[$menuid].\"-common\":$parent_menu_selected_class[$menuid]).\"'><a id='\".$menuid.\"'><span class='scroll-menu \".(($groupbasedclass!='')?$parent_menu_class[$menuid].\"-common\":$parent_menu_class[$menuid]).\"'></span><b>\".$data['menuName'].\"</b></a></li>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n }\n \t\t\t \t\t\t\n\t\t}//end of for loop\n\t\t\n\t\t//for time management\n\t\tif(isset($act_menus[TIMEMANAGEMENT]) && $act_menus[TIMEMANAGEMENT]['isactive'] == 1 && $usergroup!=USERS_GROUP)\n\t\t{\n\t\t\t$parent_menu .= \"<li id='main_parent_\".TIMEMANAGEMENT.\"' super-parent = 'main_parent_\".TIMEMANAGEMENT.\"' class = '\".$clas_drag.\"clickable_menu \".$parent_menu_selected_class[TIMEMANAGEMENT].\"-main \".$tour_menu_class[TIMEMANAGEMENT].\"' menu-url ='\".BASE_URL.\"timemanagement' selected-class = '\".$parent_menu_selected_class[TIMEMANAGEMENT].\"' > <a id='\".TIMEMANAGEMENT.\"' ><b>\".$act_menus[TIMEMANAGEMENT]['menuName'].\"</b></a></li>\";\n\t\t}\n\t\t\n\t\t\n\t\t/*if(isset($act_menus[EXPENSES]) && $act_menus[EXPENSES]['isactive'] == 1 && $usergroup!=USERS_GROUP)\n\t\t{\n\t\t\t$parent_menu .= \"<li id='main_parent_\".EXPENSES.\"' super-parent = 'main_parent_\".EXPENSES.\"' class = '\".$clas_drag.\"clickable_menu \".$parent_menu_selected_class[EXPENSES].\"-main \".$tour_menu_class[EXPENSES].\"' menu-url ='\".BASE_URL.\"expenses' selected-class = '\".$parent_menu_selected_class[EXPENSES].\"' > <a id='\".EXPENSES.\"' ><b>\".$act_menus[EXPENSES]['menuName'].\"</b></a></li>\";\n\t\t}*/\n\t\t\n\t\t\n\t/*\tif(isset($act_menus[ASSETS]) && $act_menus[ASSETS]['isactive'] == 1 && $usergroup!=USERS_GROUP)\n\t\t{\n\t\t\t$parent_menu .= \"<li id='main_parent_\".ASSETS.\"' super-parent = 'main_parent_\".ASSETS.\"' class = '\".$clas_drag.\"clickable_menu \".$parent_menu_selected_class[ASSETS].\"-main \".$tour_menu_class[ASSETS].\"' menu-url ='\".BASE_URL.\"assets/assets' selected-class = '\".$parent_menu_selected_class[ASSETS].\"' > <a id='\".ASSETS.\"' ><b>\".$act_menus[ASSETS]['menuName'].\"</b></a></li>\";\n\t\t}*/\n\t\t\n\t\t\n\t\tif(($userRole == SUPERADMIN || $usergroup == MANAGEMENT_GROUP) && $con != 'settings')\n\t\t{\t\t\n /*** removing icon for Logs menu item 17-08-2015 - START --- ****\n\t\t\t $parent_menu .= \"<li selected-class='log-selected' id='main_parent_logs' class='clickable_menu log-selected-main tour_logs' menu-url='' for-childs = 'div_mchilds_logs'><span class='scroll-menu log-module'></span><b>Logs</b></li>\";\n **** END ****/\n\t\t\t $parent_menu .= \"<li selected-class='log-selected' id='main_parent_logs' class='clickable_menu log-selected-main tour_logs' menu-url='' for-childs = 'div_mchilds_logs'><b>Logs</b></li>\";\n\n\t\t\t/**\n\t\t\t * \n\t\t\t * Logs links are static so <a> tags are required for these static links. \n\t\t\t * Remaingin links are dynamic (Exists in database)\n\t\t\t * @var String - HTML markup\n\t\t\t */\n $childs_menu .= \"<div class='side-menu div_mchilds_logs' style='display:none;'>\n\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t<li super-parent = 'main_parent_logs' parent-div='div_mchilds_logs' class = 'clickable_menu single-menu' menu-url = '\".BASE_URL.\"logmanager'><a href='\".BASE_URL.\"logmanager'>Activity Log</a></li>\n\t\t\t\t\t\t\t\t<li super-parent = 'main_parent_logs' parent-div='div_mchilds_logs' class = 'clickable_menu single-menu' menu-url = '\".BASE_URL.\"userloginlog'><a href='\".BASE_URL.\"userloginlog'>User Log</a></li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t </div>\";\n\t\t}\n\t\t$parent_menu .= \" </ul>\n\t\t\t </div></div>\n\t\t\";\t\t\t\t \n\t\t\n\t\t\treturn array('parent_menu' => $parent_menu,'childs_menu' => $childs_menu);\n \n\t}", "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 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}", "function add_main_menu_item($options = array(), $parent = '')\n{\n $default_options = array(\n 'name',\n 'permission',\n 'icon',\n 'url',\n 'id'\n );\n $order = '';\n if (isset($options['order'])) {\n $order = $options['order'];\n unset($options['order']);\n }\n $data = array();\n for ($i = 0; $i < count($default_options); $i++) {\n if (isset($options[$default_options[$i]])) {\n $data[$default_options[$i]] = $options[$default_options[$i]];\n } else {\n $data[$default_options[$i]] = '';\n }\n }\n $menu = get_option('aside_menu_active');\n $menu = json_decode($menu);\n // check if the id exists\n if ($data['id'] == '') {\n $data['id'] = slug_it($data['name']);\n }\n $total_exists = 0;\n foreach ($menu->aside_menu_active as $item) {\n if ($item->id == $data['id']) {\n $total_exists++;\n }\n }\n if ($total_exists > 0) {\n return false;\n }\n $_data = new stdClass();\n foreach ($data as $key => $val) {\n $_data->{$key} = $val;\n }\n\n $data = $_data;\n if ($parent == '') {\n if ($order == '') {\n array_push($menu->aside_menu_active, $data);\n } else {\n if ($order == 1) {\n array_unshift($menu->aside_menu_active, array());\n } else {\n $order = $order - 1;\n array_splice($menu->aside_menu_active, $order, 0, array(\n ''\n ));\n }\n $menu->aside_menu_active[$order] = $_data;\n }\n } else {\n $i = 0;\n foreach ($menu->aside_menu_active as $item) {\n if ($item->id == $parent) {\n if (!isset($item->children)) {\n $menu->aside_menu_active[$i]->children = array();\n $menu->aside_menu_active[$i]->children[] = $data;\n break;\n } else {\n if ($order == '') {\n $menu->aside_menu_active[$i]->children[] = $data;\n } else {\n if ($order == 1) {\n array_unshift($menu->aside_menu_active[$i]->children, array());\n } else {\n $order = $order - 1;\n array_splice($menu->aside_menu_active[$i]->children, $order, 0, array(\n ''\n ));\n }\n $menu->aside_menu_active[$i]->children[$order] = $data;\n }\n break;\n }\n }\n $i++;\n }\n }\n if (update_option('aside_menu_active', json_encode($menu))) {\n return true;\n }\n\n return false;\n}", "public function buildMenu($params)\n {\n\n $iconMenu = '<i class=\"icon-reorder\" ></i>';\n $iconClose = '<i class=\"icon-remove \" ></i>';\n $iconEntity = $this->view->icon('control/entity.png' , 'Entity' );\n\n $entries = new TArray();\n\n $this->content = <<<HTML\n\n <div class=\"inline\" >\n <button\n class=\"wcm wcm_control_dropmenu wgt-button\"\n id=\"{$this->id}-control\"\n wgt_drop_box=\"{$this->id}\" ><i class=\"icon-reorder\" ></i> {$this->view->i18n->l('Menu','wbf.label')}</button>\n <var id=\"{$this->id}-control-cfg-dropmenu\" >{\"triggerEvent\":\"mouseover\",\"closeOnLeave\":\"true\"}</var>\n </div>\n\n <div class=\"wgt-dropdownbox\" id=\"{$this->id}\" >\n <ul>\n <li>\n <a class=\"wgtac_close\" ><i class=\"icon-remove\" ></i> {$this->view->i18n->l('Close', 'wbf.label')}</a>\n </li>\n </ul>\n </div>\n\nHTML;\n\n $this->content .= $this->crumbs;\n\n $this->content .= <<<HTML\n<div class=\"right\" >\n <input\n type=\"text\"\n id=\"wgt-input-webfrap_navigation_search-tostring\"\n name=\"key\"\n class=\"large wcm wcm_ui_autocomplete wgt-ignore\" />\n <var class=\"wgt-settings\" >\n {\n \"url\" : \"ajax.php?c=Webfrap.Navigation.search&amp;key=\",\n \"type\" : \"ajax\"\n }\n </var>\n <button\n id=\"wgt-button-webfrap_navigation_search\"\n class=\"wgt-button append\"\n >\n <i class=\"icon-search\" ></i> Search\n </button>\n\n</div>\nHTML;\n\n }", "function ITMenu()\n{\n\tglobal $orderedIT;\n\tglobal $canChange;\n\n\techo \"<div class='ITMenu'>\n\" . \"<p style='margin-bottom:2px'>\" . I18(\"Visualiser par plateformes:\") . \"</p>\n\t<ul>\" . PHP_EOL;\n\necho \"\t<li>\" . PHP_EOL;\nnameBatch('GENERIC', $canChange);\necho \"\t</li>\" . PHP_EOL;\n\n\t$bigNames = false;\n\t$letters = array();\n\n\t//take the letters and separate the misc\n\t//make sure we only take letters that are used\n\tforeach ($orderedIT as $batchname => $batch)\n\t{\n\t\tif ($batchname==='GENERIC') continue;\n\n\t\tif (strlen($batchname)!=3 AND !in_array($batchname, NOTMISC))\n\t\t{\n\t\t\t$bigNames = true;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!in_array(strtoupper($batchname[0]), $letters))\n\t\t{\n\t\t\t$letters[] = strtoupper($batchname[0]);\n\t\t}\n\t}\n\n\tsort($letters);\n\n\t//display the letters on the menu\n\tforeach ($letters as $elem)\n\t{\n\techo \"\t<li id='_letter$elem'>\n\t\t\t<a href='javascript:void(0)' onclick='toggle(\\\"letter$elem\\\", \\\"_letter$elem\\\");'>$elem</a>\t\t\n\t\t</li>\" . PHP_EOL;\n\t}\n\n\t//add the misc\n\tif ($bigNames)\n\t{\n\techo \"\t<li id='_misc'>\n\t\t\t<a href='javascript:void(0)' onclick='toggle(\\\"misc\\\", \\\"_misc\\\");'>Misc.</a>\t\n\t\t</li>\";\n\t}\n\n\necho \"\t</ul>\n\n</div>\";\n\n}", "function buildPowerTrailMenu($menuArray)\n{\n\n // <li class=\"topmenu\"><a href=\"javascript:void(0)\" style=\"height:16px;line-height:16px;\"><span>Item 1</span></a>\n // <ul>\n // <li class=\"subfirst\"><a href=\"javascript:void(0)\">Item 1 0</a></li>\n // <li class=\"sublast\"><a href=\"javascript:void(0)\">Item 1 1</a></li>\n // </ul></li>\n // <li class=\"topmenu\"><a href=\"javascript:void(0)\" style=\"height:16px;line-height:16px;\">Item 3</a></li>\n // <li class=\"topmenu\"><a href=\"javascript:void(0)\" style=\"height:16px;line-height:16px;\">Item 2</a></li>\n\n $menu = '';\n foreach ($menuArray as $key => $menuItem) {\n $menu .= '<li class=\"topmenu\"><a href=\"' . $menuItem['script'] . '?ptAction=' . $menuItem['action'] . '\" style=\"height:16px;line-height:16px;\">' . $menuItem['name'] . '</a></li>';\n }\n return $menu;\n}", "protected function makeActionMenu() {}", "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}", "public static function core_menu(){\r\n\t\t$menu = array();\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','dashboard']);\r\n\t\tarray_push($menu,[$url, _('Dashboard')]);\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','plugins']);\r\n\t\tarray_push($menu,[$url, _('Plugins')]);\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','regandlang']);\r\n\t\tarray_push($menu,[$url, _('Regional and Languages')]);\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','basic_settings']);\r\n\t\tarray_push($menu,[$url, _('Basic Settings')]);\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','themes']);\r\n\t\tarray_push($menu,[$url, _('Apperance')]);\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','blocks']);\r\n\t\tarray_push($menu,[$url, _('Blocks')]);\r\n\t\t$ret = array();\r\n\t\tarray_push($ret, ['<span class=\"glyphicon glyphicon-tasks\" aria-hidden=\"true\"></span>' , _('Administrator')]);\r\n\t\tarray_push($ret,$menu);\r\n\t\treturn $ret;\r\n\t}", "public function obtenerElementosMenu();", "function Htmls_HRef_Menu($id,$title,$links,$titles=array(),$args=array(),$btitles=array())\n {\n $nperline=8;\n if (!empty($args[ \"NPerLine\" ])) { $nperline=$args[ \"NPerLine\" ]; }\n \n $class=\"ptablemenu\";\n if (!empty($args[ \"Class\" ])) { $class=$args[ \"Class\" ]; }\n \n $inactiveclass=\"inactivemenuitem\";\n if (!empty($args[ \"ClassInactive\" ])) { $inactiveclass=$args[ \"ClassInactive\" ]; }\n \n $title=\"menutitle\";\n if (!empty($args[ \"Title\" ])) { $titleclass=$args[ \"Title\" ]; }\n \n $current=\"\";\n if (!empty($args[ \"Current\" ])) { $current=$args[ \"Current\" ]; }\n \n if (is_array($titles) && count($titles)>0)\n {\n $hrefs=\n $this->Htmls_HRef_List\n (\n $links,\n $titles,\n $args=array\n (\n \"Class\" => $class,\n \"ClassInactive\" => $inactiveclass,\n \"Current\" => $current,\n ),\n $btitles\n );\n }\n else\n {\n $hrefs=$links;\n }\n\n $hhrefs=array();\n $rhrefs=array();\n for ($n=0;$n<count($hrefs);$n++)\n {\n if ($nperline>0 && ($n%$nperline)==($nperline-1))\n {\n $list=$rhrefs;\n array_push($list,$hrefs[$n]);\n array_push($hhrefs,$list);\n\n $rhrefs=array();\n }\n else\n {\n array_push($rhrefs,$hrefs[$n]); \n }\n }\n\n if (count($rhrefs)>0)\n {\n array_push($hhrefs,$rhrefs);\n }\n\n ##$hhrefs is now list of lists, max nperline in each\n $html=array();\n\n foreach ($hhrefs as $hrid => $rhrefs)\n {\n $rhtml=array();\n array_push($html,\"[\");\n \n $first=True;\n foreach ($rhrefs as $rhref)\n {\n if (!$first)\n {\n array_push($html,\"|\");\n }\n array_push($html,$rhref);\n $first=False;\n }\n\n #array_push($html,$rhtml); \n array_push($html,\"]\");\n }\n\n return\n $this->Htmls_Tag\n (\n \"CENTER\",\n $html,\n array\n (\n \"ID\" => $id,\n )\n );\n }", "function build () {\n foreach ( $this->items as $item ) {\n if ( $item->isRoot() ) {\n $this->menu[]=$item;\n $this->appendChildren($item);\n }\n }\n reset ( $this->menu );\n }", "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 }", "public function prepareMenuData($keysArrSize,$menuId,$level)\n\t{\t\t\n\t\t$uploadPath = DOMAIN.'public/media/images/menuIcons/';\t\n\t\t$menu_id = $this->tmpMenuDataArr[$menuId]['id'];\n\t\t$menu_name = $this->tmpMenuDataArr[$menuId]['menuName'];\n\t\t$ParentId = $this->tmpMenuDataArr[$menuId]['parent'];\n\t\t$menu_link = BASE_URL.$this->tmpMenuDataArr[$menuId]['url'];\n\t\t$menu_icon = $this->tmpMenuDataArr[$menuId]['iconPath'];\n\t\t\n\t\tif($menu_icon != '')\n\t\t\t$src = $uploadPath.$menu_icon;\n\t\telse\n\t\t\t$src = DOMAIN.'public/media/images/home_icon.png';\n\n\t\t$class_name = '';\n\t\tif($keysArrSize > 0)\n\t\t\t$class_name = 'menutag parentmenu';\n\t\telse\n\t\t\t$class_name = 'childelement menutag';\t\t\t\t\n\t\n\t\t/* To remove href and put onclick javascript void for parent menus */\n\t\t$actionData = '';\n\t\tif($menu_link == BASE_URL.'#') \n\t\t\t$actionData = \"onclick = 'javascript:void(0);'\";\n\t\telse\n\t\t\t$actionData = \"href='\".$menu_link.\"'\";\t\n\n\t\tif($level == 1)\n\t\t{\n\t\t\tif($keysArrSize == 0) //Lines 137 to 142 added - Display of menu name with 30 characters, if the menu doesn't have children\n\t\t\t{\n\t\t\t\tif(strlen($menu_name) > 31)\n\t\t\t\t$strMenuName = substr($menu_name,0,31).\"...\";\n\t\t\t\telse $strMenuName = $menu_name;\n\t\t\t}\n\t\t\telse if(strlen($menu_name) > 21)\n\t\t\t\t$strMenuName = substr($menu_name,0,21).\"...\";\n\t\t\telse\n\t\t\t\t$strMenuName = $menu_name;\n\t\t\t\n\t\t}\n\t\telse if($keysArrSize == 0)\n\t\t{\n\t\t\tif(strlen($menu_name) > 33)\n\t\t\t\t$strMenuName = substr($menu_name,0,33).\"...\";\n\t\t\telse\n\t\t\t\t$strMenuName = $menu_name;\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(strlen($menu_name) > 23)\n\t\t\t\t$strMenuName = substr($menu_name,0,23).\"...\";\t\t\t\t\n\t\t\telse\n\t\t\t\t$strMenuName = $menu_name;\n\t\t\t\n\t\t}\t\t\t\t\n\t\t$this->class_name = $class_name;\n\t\t$this->actionData = $actionData;\n\t\t$this->strMenuName = $strMenuName;\n\t\t$this->src = $src;\n\t\t$this->menu_name = $menu_name;\n\t}", "function appendChildren () {\n $this->menu[]=new Marker('start');\n foreach ( $this->items as $item ) {\n if ( $item->parent_id() == $this->current->id() ) {\n $this->menu[]=$item;\n }\n }\n $check=end($this->menu);\n if ( $check->isStart() )\n array_pop($this->menu);\n else\n $this->menu[]=new Marker('end');\n }", "function add_setup_menu_item($options = array(), $parent = '')\n{\n $default_options = array(\n 'name',\n 'permission',\n 'icon',\n 'url',\n 'id'\n );\n $order = '';\n if (isset($options['order'])) {\n $order = $options['order'];\n unset($options['order']);\n }\n $data = array();\n for ($i = 0; $i < count($default_options); $i++) {\n if (isset($options[$default_options[$i]])) {\n $data[$default_options[$i]] = $options[$default_options[$i]];\n } else {\n $data[$default_options[$i]] = '';\n }\n }\n if ($data['id'] == '') {\n $data['id'] = slug_it($data['name']);\n }\n\n $menu = get_option('setup_menu_active');\n $menu = json_decode($menu);\n // check if the id exists\n if ($data['id'] == '') {\n $data['id'] = slug_it($data['name']);\n }\n $total_exists = 0;\n foreach ($menu->setup_menu_active as $item) {\n if ($item->id == $data['id']) {\n $total_exists++;\n }\n }\n if ($total_exists > 0) {\n return false;\n }\n $_data = new stdClass();\n foreach ($data as $key => $val) {\n $_data->{$key} = $val;\n }\n $data = $_data;\n if ($parent == '') {\n if ($order == 1) {\n array_unshift($menu->setup_menu_active, array());\n } else {\n $order = $order - 1;\n array_splice($menu->setup_menu_active, $order, 0, array(\n ''\n ));\n }\n $menu->setup_menu_active[$order] = $_data;\n } else {\n $i = 0;\n foreach ($menu->setup_menu_active as $item) {\n if ($item->id == $parent) {\n if (!isset($item->children)) {\n $menu->setup_menu_active[$i]->children = array();\n $menu->setup_menu_active[$i]->children[] = $data;\n break;\n } else {\n $menu->setup_menu_active[$i]->children[] = $data;\n break;\n }\n }\n $i++;\n }\n }\n if (update_option('setup_menu_active', json_encode($menu))) {\n return true;\n }\n\n return false;\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 }", "private function _showPublic(){\n $omenu = D('Menu');\n $amodules = $omenu->getModules();\n $this->assign('modules',$amodules);\n $amenu = $omenu->getMenuByModelName(MODULE_NAME);\n $asubNav = array();\n $amenus = array();\n $asubmenus = array();\n $temp = array();\n foreach($amenu as $v){\n if(!$this->_auth($v['name'])) continue;\n switch(count(explode(',',$v['level']))){\n case 2:\n $amenus[$v['id']] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n 'icon' => $v['icon']\n );\n if(MODULE_NAME == $v['name']){\n $anav[] = array(\n 'title' => $amodules[$v['pId']]['title'],\n 'URL' => $amodules[$v['pId']]['URL'],\n 'icon' => $amodules[$v['pId']]['icon']\n );\n $anav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n $amenus[$v['id']]['active'] = true;\n $icon = $v['icon'];\n }else{\n $amenus[$v['id']]['active'] = false;\n }\n break;\n case 3:\n $amenus[$v['pId']]['submenu'][$v['id']] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n if($foundSubNav){\n $stop = true;\n break;\n }else{\n $asubNav = array();\n }\n\n if($v['name'] == MODULE_NAME.'_'.ACTION_NAME){\n $bnatchNav || $bmatchNav = true;\n $foundSubNav = true;\n $anav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n 'class' => 'current'\n );\n $tcontentTitle = $v['title'];\n }else{\n $temp = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n );\n $bmatchNav && $bmatchNav = false;\n }\n break;\n case 4:\n if($foundSubNav && $stop) break;\n if($bmatchNav){\n $asubNav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n $tsubContentTitle = $tcontentTitle;\n }else{\n $asubNav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n //$tsubContentTitle = $temp['name'];\n if(MODULE_NAME.'_'.ACTION_NAME == $v['name']){\n $foundSubNav = true;\n $tsubContentTitle = $v['title'];\n $tcontentTitle = $temp['title'];\n $anav[] = array(\n 'title' => $temp['title'],\n 'URL' => $temp['URL']\n );\n $anav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n 'class' => 'current'\n );\n $asubNav[count($asubNav)-1]['active'] = true;\n }\n }\n break;\n }\n }\n $this->assign('menu',$amenus);\n $this->assign('nav',$anav);\n $this->assign('contentTitle',$tcontentTitle);\n $this->assign('subnav',$asubNav);\n $this->assign('subContentTitle',$tsubContentTitle);\n $this->assign('icon',$icon);\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 }", "function render_menu($arrMenu, $slot = \"left\") {\n if (!empty($arrMenu)) {\n foreach ($arrMenu as $menuobj) {\n $path = trim($menuobj['path'], \"/\");\n\n if (PageAccessManager::GetPageAccess($path) == 'AUTHORIZED') {\n\n if (empty($menuobj['submenu'])) {\n ?>\n <b-nav-item to=\"/<?php echo ($path); ?>\">\n <?php echo (!empty($menuobj['icon']) ? $menuobj['icon'] : null); ?> \n <?php echo $menuobj['label']; ?>\n </b-nav-item>\n <?php\n } else {\n $smenu = $menuobj['submenu'];\n ?>\n <b-nav-item-dropdown right>\n <template slot=\"button-content\">\n <?php echo (!empty($menuobj['icon']) ? $menuobj['icon'] : null); ?> \n <?php echo $menuobj['label']; ?>\n <?php if (!empty($smenu)) { ?><i class=\"caret\"></i><?php } ?>\n </template>\n <?php\n if (!empty($smenu)) {\n render_submenu($smenu);\n }\n ?>\n </b-nav-item-dropdown>\n <?php\n }\n }\n }\n }\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 }", "function buildMenu($array, $args = array(), $has_parent = false ) {\n // extract($args);\n\n if($has_parent){\n echo '<ul class=\"sub\">';\n } else {\n echo '<ul class=\"'.$args['menu_class'].'\" id=\"'.$args['menu_id'].'\">';\n }\n\n foreach ($array as $item) {\n $li_class = (!empty($item['childs'])) ? 'sub-menu' : '';\n\n echo '<li class=\"'.$li_class.'\"><a href=\"'.$item['link'].'\"><i class=\"fa '.$item['icon'].'\"></i> <span>'.$item['title'].'</span>';\n if (!empty($item['childs'])) {\n // close <a> tag before create new ul\n echo \"</a>\";\n buildMenu($item['childs'], array('menu_class' => '', 'menu_id', ''), true );\n }\n echo '</a></li>';\n }\n echo '</ul>';\n}", "public function writeMenu() {}", "public function run()\n {\n $menus = [\n\n /*\n * Admin\n */\n [\n 'name' => 'Заявки и запросы',\n 'link' => '/admin/',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Заявки OSS',\n 'link' => '/admin/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Запросы SIB',\n 'link' => '/admin/be-partner-requests',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Пользователи',\n 'link' => '/admin/users',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Online Smart System',\n 'link' => '/admin/oss',\n 'icon' => 'fa fa-lg fa-fw fa-database',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Абонементы',\n 'link' => '/admin/oss/subscriptions',\n 'icon' => 'fa fa-fw fa-ticket',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Смена куратора',\n 'link' => '/admin/oss/change-curator',\n 'icon' => 'fa fa-lg fa-fw fa-refresh',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Новости',\n 'link' => '/admin/oss/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение',\n 'link' => '/admin/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpERA',\n 'link' => '/admin/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'SIB',\n 'link' => '/admin/sib',\n 'icon' => 'fa fa-lg fa-fw fa-briefcase',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Новости компании',\n 'link' => '/admin/sib/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Линейка событий',\n 'link' => '/admin/sib/events',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Промо и акции',\n 'link' => '/admin/sib/promos',\n 'icon' => 'fa fa-lg fa-fw fa-gift',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Документация',\n 'link' => '/admin/sib/documents',\n 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Отчеты',\n 'link' => '/admin/reports',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Финансовая аналитика',\n 'link' => '/admin/reports/financial-analytics',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Рейтинг чеков',\n 'link' => '/admin/reports/check-ratings',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'ФЦ за период',\n 'link' => '/admin/reports/fc-per-period',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'ФЦ по фин. периодам',\n 'link' => '/admin/reports/fc-per-fp',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'История ББС',\n 'link' => '/admin/reports/bbs-history',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'История выплат',\n 'link' => '/admin/reports/payment-history',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Баллы по бинару',\n 'link' => '/admin/reports/binary-points',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Настройки',\n 'link' => '/admin/settings',\n 'icon' => 'fa fa-lg fa-fw fa-cog',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Журнал',\n 'link' => '/admin/journal',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Тестирование',\n 'link' => '/admin/test',\n 'icon' => 'fa fa-lg fa-fw fa-cogs',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n\n\n /*\n * SIB\n */\n [\n 'name' => 'Финансы',\n 'link' => '/finance',\n 'icon' => 'fa fa-lg fa-fw fa-money',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Активность',\n 'link' => '/finance/activity',\n 'icon' => 'fa fa-lg fa-fw fa-clock-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк',\n 'link' => '/finance/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Платежный календарь',\n 'link' => '/finance/payment-calendar',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Лично приглашенные',\n 'link' => '/personal-invited',\n 'icon' => 'fa fa-lg fa-fw fa-share-alt fa-rotate-90',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Классическая схема',\n 'link' => '/classic',\n 'icon' => 'fa fa-lg fa-fw fa-chain',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Я и моя команда',\n 'link' => '/me-and-my-team',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Online Smart System',\n 'link' => '/oss',\n 'icon' => 'fa fa-lg fa-fw fa-database',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Новости OSS',\n 'link' => '/oss/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение OSS',\n 'link' => '/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Абонементы OSS',\n 'link' => '/oss/products',\n 'icon' => 'fa fa-lg fa-fw fa-ticket',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpERA',\n 'link' => '/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Соревнования OSS',\n 'link' => '/oss/competitions',\n 'icon' => 'fa fa-lg fa-fw fa-trophy',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Заявки OSS',\n 'link' => '/oss/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Команда OSS',\n 'link' => '/oss/teams',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк OSS',\n 'link' => '/oss/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Образование',\n 'link' => '/education',\n 'icon' => 'fa fa-lg fa-fw fa-book',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Партнёрское',\n 'link' => '/education/partners',\n 'icon' => 'fa fa-lg fa-fw fa-briefcase',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Школа ERA',\n 'link' => '/education/school-era',\n 'icon' => 'fa fa-lg fa-fw fa-heart-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Информация',\n 'link' => '/info',\n 'icon' => 'fa fa-lg fa-fw fa-info-circle',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Новости компании',\n 'link' => '/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Линейка событий',\n 'link' => '/info/events',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Промо и акции',\n 'link' => '/info/promos',\n 'icon' => 'fa fa-lg fa-fw fa-gift',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Документы (файлы)',\n 'link' => '/info/documents',\n 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n\n\n /*\n * OSS\n */\n [\n 'name' => 'Новости',\n 'link' => '/oss/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение',\n 'link' => '/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Абонементы',\n 'link' => '/oss/products',\n 'icon' => 'fa fa-lg fa-fw fa-ticket',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpEra',\n 'link' => '/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Соревнования',\n 'link' => '/oss/competitions',\n 'icon' => 'fa fa-lg fa-fw fa-trophy',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Заявки',\n 'link' => '/oss/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Команда',\n 'link' => '/oss/teams',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк',\n 'link' => '/oss/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Информация',\n 'link' => '/oss/info',\n 'icon' => 'fa fa-lg fa-fw fa-info-circle',\n 'cabinet_id' => 3,\n 'children' => [\n// [\n// 'name' => 'Документация',\n// 'link' => '/oss/info/documents',\n// 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n// 'cabinet_id' => 3,\n// 'children' => [],\n// ],\n [\n 'name' => 'Контакты',\n 'link' => '/oss/info/contacts',\n 'icon' => 'fa fa-lg fa-fw fa-phone',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n ],\n ],\n\n /*\n * Common\n */\n [\n 'name' => 'Мой профиль',\n 'link' => '/profile',\n 'icon' => 'fa fa-lg fa-fw fa-cog',\n 'cabinet_id' => null,\n 'children' => [],\n ],\n ];\n\n foreach ($menus as $menu) {\n $this->menuCreate($menu);\n }\n }", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "static function CreateMenu(array $elements)\r\n\t\t{\r\n\t\t\techo '<script language=\"JavaScript\" type=\"text/javascript\" src=\"/spherus_framework/core/classes/HorizontalMenu/c_config.js\"></script>';\r\n\t\t\techo '<script language=\"JavaScript\" type=\"text/javascript\" src=\"/spherus_framework/core/classes/HorizontalMenu/c_smartmenus.js\"></script>';\r\n\t\t\techo '<link type=\"text/css\" rel=\"stylesheet\" href=\"/./spherus_framework/core/classes/HorizontalMenu/horizontal_menu.css\"/>';\r\n\t\t\t\r\n\t\t\techo \"<div class='clearFix' style='padding:0px; background:#FFFFFF;'>\r\n\t\t\t\t <ul id='Menu1' class='MM' style='padding:0px; margin: 0px; background:#FFFFFF; border:1px solid #5c5c5c;'>\";\r\n\t\t\t\r\n\t\t\tforeach ($elements as $element)\r\n\t\t\t{\r\n\t\t\t\tself::CreateMenuItem($element);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \" </ul>\r\n\t\t\t\t </div>\";\r\n\t\t}", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"RAD Facility\", \"LIBRARIES\", \"_rad_facility\");\n module::set_menu($this->module, \"RAD DX Codes\", \"LIBRARIES\", \"_rad_dxcodes\");\n module::set_menu($this->module, \"RAD DX Codes\", \"LIBRARIES\", \"_rad_\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "protected function menus()\n {\n\n }", "public function run()\n {\n $input = [\n [\n 'slug' => 'top-nav',\n 'items' => '[{\"name\":\"Home\",\"value\":{\"name\":\"home\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"page\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"1\"},{\"name\":\"Exchange\",\"value\":{\"name\":\"exchange.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"2\"},{\"name\":\"My Wallets\",\"value\":{\"name\":\"user.wallets.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"3\"},{\"name\":\"My Orders\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"4\"},{\"name\":\"Open Order\",\"value\":{\"name\":\"user.open.order\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"4\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"5\"},{\"name\":\"All Orders\",\"value\":{\"name\":\"user.orders.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"4\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"6\"},{\"name\":\"Trade Histories\",\"value\":{\"name\":\"my-trade-history\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"4\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"7\"},{\"name\":\"Support\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"8\"},{\"name\":\"Ticket List\",\"value\":{\"name\":\"tickets.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"8\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"9\"},{\"name\":\"New Ticket\",\"value\":{\"name\":\"tickets.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"8\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"10\"},{\"name\":\"Blog\",\"value\":{\"name\":\"blog.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"11\"}]',\n 'created_at' => Date::now(),\n 'updated_at' => Date::now()\n ],\n [\n 'slug' => 'side-nav',\n 'items' => '[{\"name\":\"Home\",\"value\":{\"name\":\"home\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"page\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"1\"},{\"name\":\"Dashboard\",\"value\":{\"name\":\"admin.dashboard\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"2\"},{\"name\":\"Application Control\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"3\"},{\"name\":\"Application Settings\",\"value\":{\"name\":\"application-settings.edit\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"3\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"4\"},{\"name\":\"Role Management\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"3\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"5\"},{\"name\":\"Role List\",\"value\":{\"name\":\"roles.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"5\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"6\"},{\"name\":\"Add New Role\",\"value\":{\"name\":\"roles.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"5\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"7\"},{\"name\":\"Language Management\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"3\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"8\"},{\"name\":\"Language Settings\",\"value\":{\"name\":\"languages.settings\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"8\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"9\"},{\"name\":\"Language List\",\"value\":{\"name\":\"languages.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"8\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"10\"},{\"name\":\"Add New Language\",\"value\":{\"name\":\"languages.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"8\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"11\"},{\"name\":\"Menu Manager\",\"value\":{\"name\":\"menu-manager.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"3\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"12\"},{\"name\":\"Log Viewer\",\"value\":{\"name\":\"logs.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"3\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"13\"},{\"name\":\"Notice Management\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"3\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"14\"},{\"name\":\"Notice List\",\"value\":{\"name\":\"notices.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"14\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"15\"},{\"name\":\"Add New Notice\",\"value\":{\"name\":\"notices.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"14\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"16\"},{\"name\":\"Check Node Status\",\"value\":{\"name\":\"admin.node-status.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"3\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"17\"},{\"name\":\"User Management\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"18\"},{\"name\":\"User List\",\"value\":{\"name\":\"admin.users.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"18\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"19\"},{\"name\":\"Add New User\",\"value\":{\"name\":\"admin.users.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"18\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"20\"},{\"name\":\"KYC Management\",\"value\":{\"name\":\"kyc-management.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"21\"},{\"name\":\"Ticket Management\",\"value\":{\"name\":\"admin.tickets.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"22\"},{\"name\":\"Coin Management\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"23\"},{\"name\":\"Coin List\",\"value\":{\"name\":\"coins.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"23\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"24\"},{\"name\":\"Add New Coin\",\"value\":{\"name\":\"coins.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"23\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"25\"},{\"name\":\"Coin Pair Management\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"26\"},{\"name\":\"Coin Pair List\",\"value\":{\"name\":\"coin-pairs.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"26\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"27\"},{\"name\":\"Add New Coin Pair\",\"value\":{\"name\":\"coin-pairs.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"26\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"28\"},{\"name\":\"System Wallet Management\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"29\"},{\"name\":\"Wallet List\",\"value\":{\"name\":\"admin.system-wallets.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"29\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"30\"},{\"name\":\"System Bank Management\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"31\"},{\"name\":\"System Bank List\",\"value\":{\"name\":\"system-banks.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"31\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"32\"},{\"name\":\"Add New System Bank\",\"value\":{\"name\":\"system-banks.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"31\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"33\"},{\"name\":\"Withdrawal Management\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"34\"},{\"name\":\"Review Withdrawals\",\"value\":{\"name\":\"admin.review.withdrawals.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"34\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"35\"},{\"name\":\"Withdrawal Histories\",\"value\":{\"name\":\"admin.history.withdrawals.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"34\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"36\"},{\"name\":\"Deposit Management\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"37\"},{\"name\":\"Review Bank Deposits\",\"value\":{\"name\":\"admin.review.bank-deposits.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"37\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"38\"},{\"name\":\"Deposit Histories\",\"value\":{\"name\":\"admin.history.deposits.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"37\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"39\"},{\"name\":\"Ethereum Deposit Histories\",\"value\":{\"name\":\"admin.history.ethereum-deposits.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"37\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"40\"},{\"name\":\"Blog Management\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"41\"},{\"name\":\"Post\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"41\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"42\"},{\"name\":\"Post List\",\"value\":{\"name\":\"posts.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"42\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"43\"},{\"name\":\"Add New Post\",\"value\":{\"name\":\"posts.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"42\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"44\"},{\"name\":\"Categories\",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"41\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"45\"},{\"name\":\"Category List\",\"value\":{\"name\":\"post-categories.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"45\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"46\"},{\"name\":\"Add New Category\",\"value\":{\"name\":\"post-categories.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"45\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"47\"},{\"name\":\"Page Management \",\"value\":{\"name\":\"javascript:;\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"48\"},{\"name\":\"Page List\",\"value\":{\"name\":\"admin.pages.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"48\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"49\"},{\"name\":\"Add New Page\",\"value\":{\"name\":\"admin.pages.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"48\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"50\"}]',\n 'created_at' => Date::now(),\n 'updated_at' => Date::now()\n ],\n [\n 'slug' => 'profile-nav',\n 'items' => '[{\"name\":\"MY Profile\",\"value\":{\"name\":\"profile.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"1\"},{\"name\":\"Preference Setting\",\"value\":{\"name\":\"preference.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"2\"},{\"name\":\"Google 2FA\",\"value\":{\"name\":\"profile.google-2fa.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"3\"},{\"name\":\"KYC Verifications\",\"value\":{\"name\":\"kyc-verifications.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"4\"},{\"name\":\"Change Password\",\"value\":{\"name\":\"profile.change-password\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"5\"},{\"name\":\"Referral Link\",\"value\":{\"name\":\"referral.link.show\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"6\"},{\"name\":\"Referral Users\",\"value\":{\"name\":\"referral.users\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"7\"},{\"name\":\"Referral Earnings\",\"value\":{\"name\":\"referral.earnings\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"8\"},{\"name\":\"My Banks\",\"value\":{\"name\":\"bank-accounts.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"9\"},{\"name\":\"Add New Bank\",\"value\":{\"name\":\"bank-accounts.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"10\"},{\"name\":\"Access Token\",\"value\":{\"name\":\"personal-access-tokens.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"11\"},{\"name\":\"Create Access Token\",\"value\":{\"name\":\"personal-access-tokens.create\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"12\"},{\"name\":\"Recent Activities\",\"value\":{\"name\":\"my-activities.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"13\"}]',\n 'created_at' => Date::now(),\n 'updated_at' => Date::now()\n ],\n [\n 'slug' => 'footer-nav-one',\n 'items' => '[{\"name\":\"About Us\",\"value\":{\"name\":\"about-us\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"page\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"1\"},{\"name\":\"Terms And Conditions\",\"value\":{\"name\":\"terms-and-conditions\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"page\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"2\"},{\"name\":\"Privacy Policy\",\"value\":{\"name\":\"privacy-policy\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"page\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"3\"},{\"name\":\"Referral Programs\",\"value\":{\"name\":\"referral-programs\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"page\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"4\"}]',\n 'created_at' => Date::now(),\n 'updated_at' => Date::now()\n ],\n [\n 'slug' => 'footer-nav-two',\n 'items' => '[{\"name\":\"Exchange\",\"value\":{\"name\":\"exchange.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"1\"},{\"name\":\"Public API\",\"value\":{\"name\":\"public-api\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"page\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"2\"},{\"name\":\"Private API\",\"value\":{\"name\":\"private-api\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"page\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"3\"},{\"name\":\"Blog\",\"value\":{\"name\":\"blog.index\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"route\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"4\"},{\"name\":\"Fees\",\"value\":{\"name\":\"\\/fees\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"5\"}]',\n 'created_at' => Date::now(),\n 'updated_at' => Date::now()\n ],\n [\n 'slug' => 'footer-nav-three',\n 'items' => '[{\"name\":\"Facebook\",\"value\":{\"name\":\"https:\\/\\/www.facebook.com\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"1\"},{\"name\":\"Twitter\",\"value\":{\"name\":\"https:\\/\\/twitter.com\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"2\"},{\"name\":\"Blockchain Explorer\",\"value\":{\"name\":\"https:\\/\\/www.blockchain.com\\/explorer\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"3\"},{\"name\":\"YouTube\",\"value\":{\"name\":\"https:\\/\\/www.youtube.com\\/\"},\"class\":\"\",\"icon\":\"\",\"beginning_text\":\"\",\"ending_text\":\"\",\"type\":\"link\",\"parent_id\":\"0\",\"new_tab\":\"0\",\"mega_menu\":\"0\",\"order\":\"4\"}]',\n 'created_at' => Date::now(),\n 'updated_at' => Date::now()\n ],\n ];\n\n foreach ($input as $value) {\n Cache::forever(\"navigation:\" . $value['slug'], json_decode($value['items'], true));\n }\n\n DB::table('navigations')->truncate();\n DB::table('navigations')->insert($input);\n }", "function menus();", "protected function prepareMenuItemsForRootlineMenu() {}", "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 }", "public function add_menus()\n {\n }", "function dropdown_menu($p_title, $p_items, $p_color = '', $p_icon = '', $p_class = ''){\n\t$t_padding_button = '0px';\n\t$t_padding_icon_left = '0px';\n\t$t_padding_icon_right = '10px';\n\n\tif($p_color == ''){\n\t\t$t_padding_button = '10px';\n\t\t$t_padding_icon_left = '5px';\n\t\t$t_padding_icon_right = '5px';\n\t}\n\n\t# button group and navigation bar header\n\techo '<div class=\"btn-group\">';\n\techo '<ul class=\"nav ace-nav\" style=\"padding-left:'. $t_padding_button . ';padding-right:' . $t_padding_button . '\">';\n\n\t# color\n\tif($p_color != '')\n\t\techo '<li class=\"' . $p_color . '\">';\n\n\techo '<a data-toggle=\"dropdown\" href=\"#\" class=\"dropdown-toggle\">';\n\n\t# title icon\n\tif($p_icon != '')\n\t\techo '<i class=\"ace-icon fa ' . $p_icon . '\" style=\"padding-right:' . $t_padding_icon_right . '\"></i>';\n\n\t# title\n\techo $p_title . '<i class=\"ace-icon ' . $p_color . ' fa fa-angle-down\" style=\"padding-left:' . $t_padding_icon_left . '\"></i>';\n\techo '</a>';\n\n\t# menu items\n\techo '<ul class=\"dropdown-menu scrollable-menu ' . $p_class . '\">';\n\n\tforeach($p_items as $t_item){\n\t\t$t_label = $t_item['label'];\n\t\t$t_data = $t_item['data'];\n\n\t\tif($t_label == 'header'){\n\t\t\techo '<li class=\"dropdown-header\">' . $t_data . '</li>';\n\t\t}\n\t\telse if($t_label == 'divider'){\n\t\t\techo '<li class=\"divider\"/>';\n\t\t}\n\t\telse if($t_label == 'bare'){\n\t\t\techo $t_data;\n\t\t}\n\t\telse{\n\t\t\t$t_class = '';\n\n\t\t\tif(isset($t_data['class']))\n\t\t\t\t$t_class = 'class=\"' . $t_data['class'] . '\"';\n\n\t\t\techo '<li><a ' . $t_class . ' href=\"' . $t_data['link'] . '\">';\n\n\t\t\tif(isset($t_data['icon']) && $t_data['icon'] != '')\n\t\t\t\techo '<i class=\"ace-icon fa ' . $t_data['icon'] . '\" style=\"padding-right:5px\"></i>';\n\t\t\t\t\n\t\t\techo $t_label;\n\t\t\techo '</a></li>';\n\t\t}\n\t}\n\n\techo '</ul>';\n\n\tif($p_color)\n\t\techo '</li>';\n\n\techo '</ul>';\n\techo '</div>';\n}", "protected function createMenuEntriesForTbeModulesExt() {}", "protected function createMenuEntriesForTbeModulesExt() {}", "function menu_builder(){\n $v_result;\n require_once('dbconn.php');\n $mysql_conn = conn();\n try{\n $sql_menu = \" select \".\n \" pid, \".\n \" case when id = pid then \".\n \" 'root' \".\n \" else \".\n \" 'leaf' \".\n \" end as root_leaf, \".\n \" item_name, item_url, \".\n \" js_function_name \".\n \" from rrb_sys_menu \".\n \" where status = 1 \".\n \" order by id \";\n $mysql_conn->query(\"SET NAMES 'utf8'\");\n\n $v_i= 0;\n if ($results_menu=$mysql_conn->query($sql_menu) ) {\n while ($row_menu = mysqli_fetch_assoc($results_menu)){\n\n if ($row_menu['root_leaf'] == \"leaf\") {\n $v_i=$v_i+1;\n if ($v_i == 1){\n $v_menu_text2 = $v_menu_text2.\"{text: '\".$row_menu['item_name'] .\"' ,handler: \".$row_menu['js_function_name'] . \"}\\n\";\n } else {\n $v_menu_text2 = $v_menu_text2.\",{text: '\".$row_menu['item_name'] .\"' ,handler: \".$row_menu['js_function_name'] . \"}\\n\";\n };\n $v_menu_functions = $v_menu_functions .\"function \". $row_menu['js_function_name'] .\"(item){ window.location = '\". $row_menu['item_url'] .\"'; }\\n\";\n }; \n\n\n }\n\n $v_menu_text1 = \"var menu = new Ext.menu.Menu({ style: {overflow: 'visible'},\n items: [\";\n $v_menu_text3 = \" ] });\";\n\n\n $v_result = $v_menu_functions .\" \". $v_menu_text1 .\" \".$v_menu_text2.\" \". $v_menu_text3;\n\n \n \n }else{\n $v_result = \"{success:false,errors:{reason:'Ошибка! '}}\";\n }\n \n } catch (Exception $e){\n echo 'Выброшено исключение: ', $e->getMessage(), \"\\n\";\n }\n$mysql_conn->close(); \nreturn $v_result; \n \n \n \n}", "function MyMod_Items_Menu_Horisontal($args,$items,$argskey,$idkey=\"ID\",$namekeys=array(),$titlekeys=array(),$title=\"\",$current=0,$anchor=\"\")\n {\n return\n $this->HRefMenu\n (\n $title,\n $this->MyMod_Items_Menu_HRefs\n (\n $args,\n $items,\n $argskey,\n $idkey,\n $namekeys,\n $titlekeys,\n $title,\n $current,\n $anchor\n )\n );\n \n }", "function appendChildren ($item) {\n if (array_key_exists($item->name(),$this->parents)) {\n $this->menu[]=new Marker('start');\n foreach ( $this->children[$item->name()] as $child ) {\n $this->menu[]=$child;\n $this->appendChildren($child);\n }\n $check=end($this->menu);\n if ( $check->isStart() )\n array_pop($this->menu);\n else\n $this->menu[]=new Marker('end');\n }\n }", "public function hook_menu() {\n\n $items = array();\n \n // Add a notification page...\n $items['thumbwhere/content_collection_item/notify'] = array(\n 'title' => 'Notifications Callback for \"ContentCollectionItem\" Entity',\n 'page callback' => '_thumbwhere_content_collection_item_notify',\n 'access arguments' => array(\n 'send thumbwhere contentcollectionitem notifications'\n ),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n ); \n \n $id_count = count(explode('/', $this->path));\n $wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;\n\n $items[$this->path] = array(\n 'title' => 'ContentCollectionItem',\n 'description' => 'Add edit and update thumbwhere_contentcollectionitems.',\n 'page callback' => 'system_admin_menu_block_page',\n 'access arguments' => array('access administration pages'),\n 'file path' => drupal_get_path('module', 'system'),\n 'file' => 'system.admin.inc',\n );\n\n // Change the overview menu type for the list of thumbwhere_contentcollectionitems.\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollectionItem',\n 'title' => 'Add',\n 'description' => 'Add a new ContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollectionitem_create(array('type' => 'thumbwhere_contentcollectionitem'))),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollectionitem'),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n\n/*\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollectionItem',\n 'title' => 'Add',\n\t 'description' => 'Add a new ContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_add_page',\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit'),\n 'type' => MENU_NORMAL_ITEM,\n 'weight' => 20,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n\n );\n*/ \n/*\n $items[$this->path . '/add/' . 'thumbwhere_contentcollectionitem'] = array(\n 'title' => 'Add ' . 'ThumbWhereContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollectionitem_create(array('type' => 'thumbwhere_contentcollectionitem'))),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollectionitem'),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n*/\n // Loading and editing thumbwhere_contentcollectionitem entities\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard] = array(\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'weight' => 0,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard . '/edit'] = array(\n 'title' => 'Edit',\n 'type' => MENU_DEFAULT_LOCAL_TASK,\n 'weight' => -10,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n );\n\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard . '/delete'] = array(\n 'title' => 'Delete',\n 'page callback' => 'thumbwhere_contentcollectionitem_delete_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'type' => MENU_LOCAL_TASK,\n 'context' => MENU_CONTEXT_INLINE,\n 'weight' => 10,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n // Menu item for viewing thumbwhere_contentcollectionitems\n $items['thumbwhere_contentcollectionitem/' . $wildcard] = array(\n //'title' => 'Title',\n 'title callback' => 'thumbwhere_contentcollectionitem_page_title',\n 'title arguments' => array(1),\n 'page callback' => 'thumbwhere_contentcollectionitem_page_view',\n 'page arguments' => array(1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('view', 1),\n 'type' => MENU_CALLBACK,\n );\n return $items;\n }", "public function getMenu();", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Notifiable Diseases\", \"LIBRARIES\", \"_notifiable\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "public function create()\n {\n $buttons = [\n [\n \"name\" => \"舍得茶馆\",\n \"sub_button\" => [\n [\n \"type\" => \"view\",\n \"name\" => \"节目预告\",\n \"url\" => \"http://www.soso.com/\"\n ],\n [\n \"type\" => \"view\",\n \"name\" => \"在线购票\",\n \"url\" => \"http://ming.cure4.net/getseats/1\"\n ],\n [\n \"type\" => \"view\",\n \"name\" => \"往期集锦\",\n \"url\" => \"http://v.qq.com/\"\n ],\n ],\n ],\n ];\n// $buttons = [\n// [\n// \"type\" => \"click\",\n// \"name\" => \"茶文雅集\",\n// \"key\" => \"CHA_WEN_YA_JI\",\n// \"sub_button\" => [\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"微杂志\",\n//// \"url\" => \"http://www.soso.com/\"\n//// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"掌柜说\",\n//// \"url\" => \"http://v.qq.com/\"\n//// ],\n//// [\n//// \"type\" => \"click\",\n//// \"name\" => \"文章搜索\",\n//// \"key\" => \"V1001_GOOD\"\n//// ],\n// ],\n//\n// ],\n// [\n// \"type\" => \"click\",\n// \"name\" => \"舍得茶馆\",\n// \"key\" => \"SHE_DE_CHA_GUAN\",\n// \"sub_button\" => [\n// [\n// \"type\" => \"view\",\n// \"name\" => \"节目预告\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"在线购票\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"往期集锦\",\n// \"key\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// ],\n// ],\n// [\n// \"type\" => \"click\",\n// \"name\" => \"茗品荟萃\",\n// \"key\" => \"MING_PIN_HUI_CUI\",\n// \"sub_button\" => [\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"在线商城\",\n//// \"url\" => \"http://www.soso.com/\"\n//// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"本月推荐\",\n//// \"url\" => \"http://v.qq.com/\"\n//// ],\n//// [\n//// \"type\" => \"click\",\n//// \"name\" => \"寻茶记\",\n//// \"key\" => \"V1001_GOOD\"\n//// ],\n// ],\n// ],\n// ];\n $this->menu->add($buttons);\n }", "abstract protected function getMenuTree();", "public function modMenu() {}", "public function modMenu() {}", "public function modMenu() {}", "function okr_module_init_menu_items()\n{\n $CI = &get_instance();\n \n if(has_permission('okr','','view') || is_admin() || has_permission('okr','','view_own')){\n $CI->app_menu->add_sidebar_menu_item('OKR', [\n 'name' => _l('okr'),\n 'icon' => 'fa fa-crosshairs', \n 'position' => 30,\n ]);\n\n $CI->app_menu->add_sidebar_children_item('OKR', [\n 'slug' => 'okr_dashboard',\n 'name' => _l('okr_dashboard'),\n 'icon' => 'fa fa-pie-chart',\n 'href' => admin_url('okr/dashboard'),\n 'position' => 1,\n ]);\n\n $CI->app_menu->add_sidebar_children_item('OKR', [\n 'slug' => 'okr_report',\n 'name' => _l('okr_report'),\n 'icon' => 'fa fa-signal',\n 'href' => admin_url('okr/report'),\n 'position' => 2,\n ]);\n\n $CI->app_menu->add_sidebar_children_item('OKR', [\n 'slug' => 'okrs',\n 'name' => _l('okrs'),\n 'icon' => 'fa fa-crosshairs',\n 'href' => admin_url('okr/okrs'),\n 'position' => 3,\n ]);\n\n $CI->app_menu->add_sidebar_children_item('OKR', [\n 'slug' => 'okr_checkin',\n 'name' => _l('okr_checkin'),\n 'icon' => 'fa fa-calendar-check-o',\n 'href' => admin_url('okr/checkin'),\n 'position' => 4,\n ]);\n\n \n }\n if(is_admin()){\n $CI->app_menu->add_sidebar_children_item('OKR', [\n 'slug' => 'okr_setting',\n 'name' => _l('okr_setting'),\n 'icon' => 'fa fa-cog',\n 'href' => admin_url('okr/setting'),\n 'position' => 5,\n ]);\n }\n \n}", "public function makeMenu(){\n\n //Label & class definition\n $idDiv = \"sub-menu\";\n $classUl = \"menu\";\n $classLi = \"stdanimation1_2\";\n $classSpan = \"stdanimation1_2\";\n $classA = \"stdanimation1_4\";\n\n //array mit link, icon, label\n // mit i übersetzen\n $naviArray[] = array(\"link\" => \"index.php?view=home\", \"icon\" => \"icon_house_alt\", \"label\" => \"Home\" );\n $naviArray[] = array(\"link\" => \"index.php?view=profile\", \"icon\" => \"icon_profile\", \"label\" => \"Profile\" );\n $naviArray[] = array(\"link\" => \"index.php?view=categories\", \"icon\" => \"icon_tag\", \"label\" => \"Categories\" );\n $naviArray[] = array(\"link\" => \"index.php?view=shoppingcart\", \"icon\" => \"icon_cart\", \"label\" => \"Shopping Cart\" );\n $naviArray[] = array(\"link\" => \"index.php?view=wishlist\", \"icon\" => \"icon_gift\", \"label\" => \"Wishlist\" );\n $naviArray[] = array(\"link\" => \"index.php?view=hotlist\", \"icon\" => \"icon_grid-2x2\", \"label\" => \"Hotlist\" );\n\n\n $linkList = \"\";\n\n //create a list item for every array found\n foreach($naviArray as $navipoint){\n //do translation\n $navipoint[\"label\"] = i($navipoint[\"label\"]);\n\n $linkList .= '\n <li class=\"'.$classLi.'\">\n <span class=\"'.$classSpan.' '.$navipoint[\"icon\"].'\"></span>\n <a class=\"'.$classSpan.'\" href=\"'.$navipoint[\"link\"].'\">'.$navipoint[\"label\"].'</a>\n </li>\n ';\n }\n\n $html = \"\";\n $html = '<div id=\"'.$idDiv.'\">\n <ul class=\"'.$classUl.'\">\n '.$linkList.'\n </ul>\n </div>';\n\n return $html;\n\n\n\n /*\n return '<div id=\"sub-menu\">\n <ul class=\"menu\">\n <li class=\"stdanimation\">\n <span class=\"stdanimation1_2 icon_house_alt\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=home\">Home</a>\n </li>\n <li class=\"stdanimation\">\n <span class=\"stdanimation1_2 icon_profile\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=profile\">Profil</a>\n </li>\n <li class=\"stdanimation1_4\">\n <span class=\"stdanimation1_4 icon_tag\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=categorie\">Kategorien</a>\n </li>\n <li class=\"stdanimation\">\n <span class=\"stdanimation1_2 icon_cart\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=shoppingcart\" >Shopping Cart</a>\n </li>\n <li class=\"stdanimation1_4\">\n <span class=\"stdanimation1_4 icon_gift\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=shop\">Ipsum</a>\n </li>\n <li class=\"stdanimation1_4\">\n <span class=\"stdanimation1_4 icon_grid-2x2\"></span>\n <a class=\"stdanimation1_4\">Doloret</a>\n </li>\n </ul>\n </div>';\n*/\n}", "public static function menus(): array\n {\n return [];\n }", "public function setMenuContent(array $menu);", "function econsole_get_buttons($modulename, $ids=''){\r\n\t$btn = \"\";\r\n\tif(!empty($ids)){\r\n\t\t$modules = split(\",\",$ids);\r\n\t\tforeach($modules as $module){\r\n\t\t\t$instance = get_record(\"course_modules\", \"id\", $module, \"\", \"\", \"\", \"\", \"instance\");\r\n\t\t\t$name = get_record($modulename, \"id\", $instance->instance, \"\", \"\", \"\", \"\", \"name\");\t\t\t\r\n\t\t\t//OnMouse: replaceImage();\r\n\t\t \t$btn .= \"<a href=\\\"#\\\"><img src=\\\"theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif\\\" alt=\\\"\\\" title=\\\"\\\" class=\\\"btn\\\" border=\\\"0\\\" onMouseOver=\\\"Javascript: replaceImage(this, 'theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\"over.gif');\\\" onMouseOut=\\\"Javascript: replaceImage(this, 'theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif'); hideTitle();\\\" onClick=\\\"Javascript: window.parent.document.getElementById('mainFrame').src='../\".$modulename.\"/view.php?id=\".$module.\"';\\\" onMouseMove=\\\"showTitleRight(event,'\".$name->name.\"','');\\\"></a>&nbsp;\";\r\n\t\t\t//OnMouse: changeDimensions();\r\n\t\t \t//$btn .= \"<a href=\\\"#\\\"><img src=\\\"theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif\\\" alt=\\\"\\\" title=\\\"\\\" class=\\\"btn\\\" style=\\\"width: 28; height: 28\\\"; border=\\\"0\\\" onMouseOver=\\\"Javascript: changeDimensions(this, '+4', '+4');\\\" onMouseOut=\\\"Javascript: changeDimensions(this, '-4', '-4'); hideTitle();\\\" onClick=\\\"Javascript: window.parent.opener.location.href='../\".$modulename.\"/view.php?id=\".$module.\"';\\\" onMouseMove=\\\"showTitle(event,'\".$name->name.\"','');\\\"></a>&nbsp;\";\r\n\t\t}\r\n\t}else{\r\n \t\t$btn = \"<img src=\\\"theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif\\\" alt=\\\"\\\" title=\\\"\\\" border=\\\"0\\\" class=\\\"transparent\\\">&nbsp;\";\r\n\t}\r\n\treturn $btn;\r\n}", "public function createMenu()\n {\n $parent = $this->Menu()->findOneBy(['label' => 'Artikel']);\n\n $this->createMenuItem(\n [\n 'label' => 'Custom sort',\n 'controller' => 'CustomSort',\n 'action' => 'Index',\n 'active' => 0,\n 'class' => 'sprite-blue-document-text-image',\n 'parent' => $parent,\n 'position' => 6,\n ]\n );\n }", "function createMenu($sourceArr, $parents = 0) {\r\n\t//recursiveMenu ( $sourceArr, $parents = 0, &$newMenu );\r\n\treturn str_replace ( '<ul></ul>', '', $newMenu );\r\n}", "function buildMenu($parent, $menu)\n {\n $html = \"\";\n if (isset($menu['parents'][$parent])) {\n foreach ($menu['parents'][$parent] as $itemId) {\n $href = '';\n $title_text = '';\n $active = '';\n if (!isset($menu['parents'][$itemId])) {\n $href = $this->url . $menu['items'][$itemId][$this->link_Column];\n $title_text = stripslashes($menu['items'][$itemId][$this->title_Column]);\n if ($this->active_link == $menu['items'][$itemId][$this->link_Column]) {\n $active = $this->active_class;\n }\n\n $parent_html = str_replace(array('{href}', '{link_text}', '{title}', '{has_child}', '{active_class}'), array($href, $title_text, $title_text, $this->has_child_html, $active), $this->parent_li_start);\n\n if (count($this->search) > 0) {\n foreach ($this->search as $k => $s) {\n $parent_html = str_replace($s, $menu['items'][$itemId][$this->replace[$k]], $parent_html);\n }\n }\n $html .= $parent_html;\n\n if (!empty($this->call_func)) {\n $html .= call_user_func($this->call_func, $menu['items'][$itemId], $this->selected);\n }\n $html .= $this->parent_li_end;\n\n }\n if (isset($menu['parents'][$itemId])) {\n $href = $this->url . $menu['items'][$itemId][$this->link_Column];\n $title_text = stripslashes($menu['items'][$itemId][$this->title_Column]);\n if ($this->active_link == $menu['items'][$itemId][$this->link_Column]) {\n $active = $this->active_class;\n }\n\n $parent_html = str_replace(array('{href}', '{link_text}', '{title}', '{has_child}', '{active_class}'), array($href, $title_text, $title_text, $this->has_child_html,$active), $this->child_li_start);\n if (count($this->search) > 0) {\n foreach ($this->search as $k => $s) {\n $parent_html = str_replace($s, $menu['items'][$itemId][$this->replace[$k]], $parent_html);\n }\n }\n $html .= $parent_html;\n if (!empty($this->call_func)) {\n $html .= call_user_func($this->call_func, $menu['items'][$itemId], $this->selected);\n }\n\n $html .= $this->child_ul_start;\n $html .= $this->buildMenu($itemId, $menu);\n $html .= $this->child_ul_end;\n $html .= $this->child_li_end;\n\n }\n }\n }\n return $html;\n }", "public function startup(){\r\n $pagesresult = $this->getDatabase()->query(\"SELECT * FROM `topnav_pages`\");\r\n //Select links to be displayed on the navigation\r\n $linksresult = $this->getDatabase()->query(\"SELECT * FROM `topnav_links`\");\r\n \r\n $this->data['buttons'] = array();\r\n \r\n //Fetch pages\r\n while($row = $pagesresult->fetch_array()){\r\n $button = $this->getDatabase()->query(\"SELECT page_id,lang_code,page_title,page_content FROM `pages_content` WHERE `page_id` = '{$row['page_id']}' AND `lang_code` = '\".$this->getLanguage()->getLangCode().\"'\");\r\n $button = $button->fetch_array();\r\n \r\n $this->data['buttons'][] = array(\"title\"=>\"{$button['page_title']}\",\"href\" => \"?act=general/page&amp;p={$row['id']}\", \"sort\" => \"{$row['sort']}\");\r\n }\r\n \r\n //Fetch links\r\n while($row = $linksresult->fetch_array()){\r\n //Get the actual label for this button from the database in the current used lang\r\n $button = $this->getDatabase()->query(\"SELECT `title` FROM `topnav_links_labels` WHERE `link_id` = '{$row['id']}' AND `lang_code` = '\".$this->getLanguage()->getLangCode().\"' LIMIT 1\");\r\n if($button->num_rows == 1){\r\n $button = $button->fetch_array()['title'];\r\n $this->data['buttons'][] = array(\"title\" => \"{$button}\", \"href\" => $row['href'], \"sort\" => $row['sort']);\r\n }\r\n \r\n }\r\n \r\n \r\n //Sort the buttons according to the sort mentioned before.\r\n //The sort function checks for values, and if the value returned is positive the items are being swapped.\r\n usort($this->data['buttons'],function($a,$b){\r\n return intval($a['sort']) - intval($b['sort']);\r\n });\r\n \r\n }", "public function addArray($item)\n {\n $pos = count($this->_menu);\n if (!$pos || ($pos - 1 != max(array_keys($this->_menu)))) {\n $pos = count($this->_menu);\n }\n\n if (!isset($item['url'])) {\n $item['url'] = new Horde_Url();\n } elseif (!($item['url'] instanceof Horde_Url)) {\n $item['url'] = new Horde_Url($item['url']);\n }\n\n $this->_menu[$pos] = array_merge(array(\n 'class' => '',\n 'icon' => '',\n 'icon_path' => null,\n 'onclick' => null,\n 'target' => '',\n 'text' => ''\n ), $item);\n\n return $pos;\n }", "public function init() {\n $this->modulesInTopMenu = array(\n 'admin' => array('admin', 'admin/account', 'admin/rbac', 'admin/scheduler', 'admin/sys', 'admin/i18n', 'admin/seo'),\n 'nivoSlider'=>array('admin/nivoSlider'),\n );\n /* Top menu */\n $this->topMenus = array(\n array('label' => 'General', 'url' => array('/admin/default/index'), 'active' => in_array(Yii::app()->controller->module->id, $this->modulesInTopMenu['admin'])),\n array('label' => 'Nivo Slider', 'url' => array('/admin/nivoSlider/sliderImage'), 'active' => in_array(Yii::app()->controller->module->id, $this->modulesInTopMenu['nivoSlider'])),\n array('label' => 'Logout', 'url' => array('/site/logout'), 'itemOptions' => array('style' => 'float:right')),\n );\n\n /* Sidebar Items */\n $this->sidebarItems = array(\n 'admin' => array(\n array('name' => 'RBAC - Account Management', 'items' => array(\n array('label' => 'Manage accounts', 'url' => array('/admin/account/act/admin'), 'active' => Common::checkMCA('admin/account', 'act', 'admin')),\n array('label' => 'Accounts Statistics', 'url' => array('/admin/account/act/statistics'), 'active' => Common::checkMCA('admin/account', 'act', 'statistics')),\n array('label' => 'Add New Authorization', 'url' => array('/admin/rbac/action/create'), 'active' => Common::checkMCA('admin/rbac', 'action', 'create')),\n array('label' => 'Manage RBAC', 'url' => array('/admin/rbac/action/admin'), 'active' => Common::checkMCA('admin/rbac', 'action', 'admin')),\n array('label' => 'Users Activities', 'url' => array('/admin/account/userLog/admin'), 'active' => Common::checkMCA('admin/account', 'userLog', 'admin')),\n ),\n ),\n array('name' => 'I18N', 'items' => array(\n array('label' => 'Add New Language', 'url' => array('/admin/i18n/action/create'), 'active' => Common::checkMCA('admin/i18n', 'action', 'create')),\n array('label' => 'Manage Languages', 'url' => array('/admin/i18n/action/admin'), 'active' => Common::checkMCA('admin/i18n', 'action', 'admin')),\n )\n ),\n array('name' => 'Scheduler', 'items' => array(\n array('label' => 'Add New System Scheduler', 'url' => array('/admin/scheduler/action/create'), 'active' => Common::checkMCA('admin/scheduler', 'action', 'create')),\n array('label' => 'Manage System Scheduler', 'url' => array('/admin/scheduler/action/admin'), 'active' => Common::checkMCA('admin/scheduler', 'action', 'admin')),\n )\n ),\n array('name' => 'System Information', 'items' => array(\n array('label' => 'View Information', 'url' => array('/admin/sys/action/info'), 'active' => Common::checkMCA('admin/sys', 'action', 'info')),\n array('label' => 'View System logs', 'url' => array('/admin/sys/action/listLog'), 'active' => Common::checkMCA('admin/sys', 'action', 'listLog')),\n array('label' => 'View User Agents', 'url' => array('/admin/sys/action/userAgent'), 'active' => Common::checkMCA('admin/sys', 'action', 'userAgent')),\n array('label' => 'View Email Queues', 'url' => array('/admin/sys/action/emailQueue'), 'active' => Common::checkMCA('admin/sys', 'action', 'emailQueue')),\n array('label' => 'General Settings', 'url' => array('/admin/sys/action/setting'), 'active' => Common::checkMCA('admin/sys', 'action', 'setting')),\n array('label' => 'Clear Cache', 'url' => array('/admin/default/clearCache'), 'active' => Common::checkMCA('admin', 'action', 'clearCache')),\n )\n ),\n\n array('name' => 'Static Pages', 'items' => array(\n array('label' => 'About', 'url' => array('/admin/default/staticPage', 'page' => 'about')),\n array('label' => 'Site Disclaimer', 'url' => array('/admin/default/staticPage', 'page' => 'disclaimer')),\n array('label' => 'Privacy Policy', 'url' => array('/admin/default/staticPage', 'page' => 'privacyPolicy')),\n array('label' => 'Guidelines', 'url' => array('/admin/default/staticPage', 'page' => 'guidelines')),\n )\n ),\n ),\n 'nivoSlider' => array(\n array('name' => 'Nivo Slider', 'items' => array(\n array('label' => 'Manage', 'url' => array('/admin/nivoSlider/sliderImage/admin'), 'active' => Common::checkMCA('admin/nivoSlider', 'sliderImage', 'admin')),\n array('label' => 'Create', 'url' => array('/admin/nivoSlider/sliderImage/create'), 'active' => Common::checkMCA('admin/nivoSlider', 'sliderImage', 'create')),\n ),\n ),\n ), \n );\n }", "public function hook_menu() {\n\n $items = array();\n \n // Add a notification page...\n $items['thumbwhere/content_collection/notify'] = array(\n 'title' => 'Notifications Callback for \"ContentCollection\" Entity',\n 'page callback' => '_thumbwhere_content_collection_notify',\n 'access arguments' => array(\n 'send thumbwhere contentcollection notifications'\n ),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n ); \n \n $id_count = count(explode('/', $this->path));\n $wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;\n\n $items[$this->path] = array(\n 'title' => 'ContentCollection',\n 'description' => 'Add edit and update thumbwhere_contentcollections.',\n 'page callback' => 'system_admin_menu_block_page',\n 'access arguments' => array('access administration pages'),\n 'file path' => drupal_get_path('module', 'system'),\n 'file' => 'system.admin.inc',\n );\n\n // Change the overview menu type for the list of thumbwhere_contentcollections.\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollection',\n 'title' => 'Add',\n 'description' => 'Add a new ContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollection_create(array('type' => 'thumbwhere_contentcollection'))),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollection'),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n\n/*\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollection',\n 'title' => 'Add',\n\t 'description' => 'Add a new ContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_add_page',\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit'),\n 'type' => MENU_NORMAL_ITEM,\n 'weight' => 20,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n\n );\n*/ \n/*\n $items[$this->path . '/add/' . 'thumbwhere_contentcollection'] = array(\n 'title' => 'Add ' . 'ThumbWhereContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollection_create(array('type' => 'thumbwhere_contentcollection'))),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollection'),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n*/\n // Loading and editing thumbwhere_contentcollection entities\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard] = array(\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'weight' => 0,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard . '/edit'] = array(\n 'title' => 'Edit',\n 'type' => MENU_DEFAULT_LOCAL_TASK,\n 'weight' => -10,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n );\n\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard . '/delete'] = array(\n 'title' => 'Delete',\n 'page callback' => 'thumbwhere_contentcollection_delete_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'type' => MENU_LOCAL_TASK,\n 'context' => MENU_CONTEXT_INLINE,\n 'weight' => 10,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n // Menu item for viewing thumbwhere_contentcollections\n $items['thumbwhere_contentcollection/' . $wildcard] = array(\n //'title' => 'Title',\n 'title callback' => 'thumbwhere_contentcollection_page_title',\n 'title arguments' => array(1),\n 'page callback' => 'thumbwhere_contentcollection_page_view',\n 'page arguments' => array(1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('view', 1),\n 'type' => MENU_CALLBACK,\n );\n return $items;\n }", "public function run()\n {\n // base tables\n Menu::truncate();\n Menu::insert(\n [\n [\n \"parent_id\" => 0,\n \"order\" => 1,\n \"title\" => \"Dashboard\",\n \"icon\" => \"fas fa-chart-pie\",\n \"uri\" => \"/\",\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 0,\n \"order\" => 11,\n \"title\" => \"Admin\",\n \"icon\" => \"fas fa-user-secret\",\n \"uri\" => NULL,\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 2,\n \"order\" => 13,\n \"title\" => \"Users\",\n \"icon\" => \"fas fa-user\",\n \"uri\" => \"auth/users\",\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 2,\n \"order\" => 14,\n \"title\" => \"Menu\",\n \"icon\" => \"fas fa-tree\",\n \"uri\" => \"auth/menu\",\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 2,\n \"order\" => 12,\n \"title\" => \"ProductUnits\",\n \"icon\" => \"fab fa-codiepie\",\n \"uri\" => \"product-units\",\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 10,\n \"order\" => 5,\n \"title\" => \"SKU管理\",\n \"icon\" => \"fas fa-align-center\",\n \"uri\" => \"stock-units\",\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 0,\n \"order\" => 4,\n \"title\" => \"供应链\",\n \"icon\" => \"fas fa-ambulance\",\n \"uri\" => NULL,\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 10,\n \"order\" => 6,\n \"title\" => \"供应商\",\n \"icon\" => \"fas fa-bars\",\n \"uri\" => \"suppliers\",\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 10,\n \"order\" => 7,\n \"title\" => \"采购单\",\n \"icon\" => \"fas fa-shopping-cart\",\n \"uri\" => \"purchase-orders\",\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 0,\n \"order\" => 2,\n \"title\" => \"销售\",\n \"icon\" => \"fab fa-sellsy\",\n \"uri\" => NULL,\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 13,\n \"order\" => 3,\n \"title\" => \"订单\",\n \"icon\" => \"fab fa-first-order\",\n \"uri\" => \"/shop-orders\",\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 10,\n \"order\" => 8,\n \"title\" => \"仓库管理\",\n \"icon\" => \"fas fa-warehouse\",\n \"uri\" => \"/warehouses\",\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 17,\n \"order\" => 10,\n \"title\" => \"省市区\",\n \"icon\" => \"fas fa-city\",\n \"uri\" => \"china-areas\",\n \"group\" => NULL\n ],\n [\n \"parent_id\" => 0,\n \"order\" => 9,\n \"title\" => \"其他\",\n \"icon\" => \"fas fa-circle\",\n \"uri\" => NULL,\n \"group\" => NULL\n ]\n ]\n );\n // finish\n }", "function cp_menu_array($menu)\n\t{\n\t\tif (ee()->extensions->last_call !== FALSE)\n\t\t{\n\t\t\t$menu = ee()->extensions->last_call;\n\t\t}\n\n\t\t// If this isn't a Super Admin, let's check to see if they can modify\n\t\t// the RTE module\n\t\tif (ee()->session->userdata('group_id') != 1)\n\t\t{\n\t\t\t$access = (bool) ee()->db->select('COUNT(m.module_id) AS count')\n\t\t\t\t->from('modules m')\n\t\t\t\t->join('module_member_groups mmg', 'm.module_id = mmg.module_id')\n\t\t\t\t->where(array(\n\t\t\t\t\t'mmg.group_id' \t=> ee()->session->userdata('group_id'),\n\t\t\t\t\t'm.module_name' => ucfirst($this->module)\n\t\t\t\t))\n\t\t\t\t->get()\n\t\t\t\t->row('count');\n\n\t\t\t$has_access = $access AND ee()->cp->allowed_group('can_access_addons');\n\t\t}\n\n\t\tif (ee()->session->userdata('group_id') == 1 OR $has_access)\n\t\t{\n\t\t\tee()->lang->loadfile($this->module);\n\t\t\t$menu['admin']['admin_content']['rte_settings'] = BASE.AMP.'C=addons_modules'.AMP.'M=show_module_cp'.AMP.'module='.$this->module;\n\t\t}\n\n\t\treturn $menu;\n\t}", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Drug Formulation\", \"LIBRARIES\", \"_drug_formulation\");\n module::set_menu($this->module, \"Drug Preparation\", \"LIBRARIES\", \"_drug_preparation\");\n module::set_menu($this->module, \"Drug Manufacturer\", \"LIBRARIES\", \"_drug_manufacturer\");\n module::set_menu($this->module, \"Drug Source\", \"LIBRARIES\", \"_drug_source\");\n module::set_menu($this->module, \"Drugs\", \"LIBRARIES\", \"_drugs\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Drug Formulation\", \"LIBRARIES\", \"_drug_formulation\");\n module::set_menu($this->module, \"Drug Preparation\", \"LIBRARIES\", \"_drug_preparation\");\n module::set_menu($this->module, \"Drug Manufacturer\", \"LIBRARIES\", \"_drug_manufacturer\");\n module::set_menu($this->module, \"Drug Source\", \"LIBRARIES\", \"_drug_source\");\n module::set_menu($this->module, \"Drugs\", \"LIBRARIES\", \"_drugs\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "public function adminSubMenus()\n {\n $subMenu = array(\n array(\n 'class_name' => 'AdminKbPushSettings',\n 'name' => $this->l('General Settings'),\n 'active' => 1,\n// 'parent_id' => Tab::getIdFromClassName('AdminKbPushConfiguration')\n ),\n array(\n 'class_name' => 'AdminKbPushTemplates',\n 'name' => $this->l('Templates'),\n 'active' => 1,\n// 'parent_id' => Tab::getIdFromClassName('AdminKbPushConfiguration')\n ),\n array(\n 'class_name' => 'AdminKbPushNotification',\n 'name' => $this->l('Push Notification'),\n 'active' => 1,\n// 'parent_id' => Tab::getIdFromClassName('AdminKbPushConfiguration')\n ),\n array(\n 'class_name' => 'AdminKbPushDelayNotification',\n 'name' => $this->l('Delay Push Notification'),\n 'active' => 1,\n// 'parent_id' => Tab::getIdFromClassName('AdminKbPushConfiguration')\n ),\n array(\n 'class_name' => 'AdminKbPushSubscribers',\n 'name' => $this->l('Subscribers'),\n 'active' => 1,\n// 'parent_id' => Tab::getIdFromClassName('AdminKbPushConfiguration')\n ),\n array(\n 'class_name' => 'AdminKbPushProductSubscribers',\n 'name' => $this->l('Product Subscribers'),\n 'active' => 1,\n// 'parent_id' => Tab::getIdFromClassName('AdminKbPushConfiguration')\n ),\n array(\n 'class_name' => 'AdminKbPushHistory',\n 'name' => $this->l('History'),\n 'active' => 1,\n// 'parent_id' => Tab::getIdFromClassName('AdminKbPushConfiguration')\n ),\n array(\n 'class_name' => 'AdminKbPushStatistics',\n 'name' => $this->l('Statistics'),\n 'active' => 1,\n// 'parent_id' => Tab::getIdFromClassName('AdminKbPushConfiguration')\n ),\n );\n\n return $subMenu;\n }", "protected function generateModuleMenu() {}", "function Outputmenu($page) {\n \n \n// the dummy container menu is used to have a fake menu behind the original one to keep every div floating in any direction in line and without overlapping\n echo' <div class=\"dummycontainermenu\">';\n echo' <div class=\"logo\">\n <a href=\"index.php\"><img src=\"\\Coursework1PaulLucianCosareanu\\Images\\Logo.png\" alt=\"Italian Trulli\"></a>\n \n </div>\n </div>'; \n\n// container menu is the container in which the actual menu and the logo is placed\n echo' <div class=\"containermenu\">';\n// logo is the container of the logo and the a href within the container is the actual logo populating the container\n echo' <div class=\"logo\">\n\n <a href=\"index.php\"><img src=\"\\Coursework1PaulLucianCosareanu\\Images\\Logo.png\" alt=\"Italian Trulli\"></a>\n \n </div>';\n\n// the class menu is a container in which the buttons/ links towards all the other pages are displayed\n echo' <div class=\"menu\">';\n\n $pathimagex=\"/Coursework1PaulLucianCosareanu/Images/\"; //the path of the images, problems with writing, php took certain symbols combined as commands\n $linkNames = array(\"Home\", \"Details\", \"Ranking\", \"Game\", \"Contact\", \"User\"); //array of Link names, the names which are displayed in the menu\n $linkAddresses = array(\"index.php\", \"DescriptionPage.php\", \"RankingPage.php\", \"GamePage.php\", \"ContactPage.php\");//array of the main pages\n $iconNames = array(\"Home\", \"Details\", \"Ranking\", \"Game\", \"Contact\"); // second part of the path of the images, these images are the icons within the menu\n\n //Output navigation\n for ($x = 0; $x < count($linkNames); $x++) {\n //algorith for output navigation short description\n if($linkNames[$x]!=\"User\"){ //for every x going from 0 to the number of link names, important x< link names total\n echo '<a '; //if the linknames are different than \"user\",starts printing the menu up to the user but not including the User. then if the link name is the same with the $page which is parsed\n if ($linkNames[$x] == $page) { //from anymainpage.php then it takes the class selected,meaning that if you press the home button for example\n echo 'class=\"selected\" '; //the color of the text will become black because you are situated on that page, it clears out after you visit another page,\n } //after everything is printed and the array[x] takes the user value, the user dropdown code is printed\n \n \n // output icons in specific menu buttons, the algorith checks if the name of the link is the same with the name of the icon, if yes then prints\n for($y=0; $y<count($iconNames); $y++){ \n if($linkNames[$x] == $iconNames[$y]){ \n echo 'href=\"'.$linkAddresses[$x].'\"><img class=\"test\" src=\"'.$pathimagex.$iconNames[$y].'.png\"> ' . $linkNames[$x] . '</a>';\n }\n }\n // end of output icons in specific menu buttons \n\n // if linkname is user then the dropdown html with it's according icon is printed\n }else if($linkNames[$x]==\"User\"){\n echo'<div class=\"dropdown\" >\n <button class=\"dropbtn\" id=\"dropdown1\" style=\"display:inline\"><img class=\"test\" src=\"\\Coursework1PaulLucianCosareanu\\Images\\User.png\">User</button>\n <div class=\"dropdown-content\">\n <a href=\"Login.php\">Log In</a>\n <a href=\"Register.php\">Register</a>\n </div>\n </div>';\n echo'<div class=\"dropdown\" >\n <button class=\"dropbtn\" id=\"dropdown2\" style=\"display:none;\"><img class=\"test\" src=\"\\Coursework1PaulLucianCosareanu\\Images\\User.png\" style=\"float:left\";><div id=\"username\" style=\"float:left\";>User</div></button>\n <div class=\"dropdown-content\">\n <a href=\"index.php\" onclick=\"logoutuser()\">Log Out</a>\n </div>\n </div>';\n\n } \n }\n echo'</div>';\n echo'</div>\n <script src=\"./Javascript/Loggedinout.js\" type=\"text/javascript\"></script>';\n}", "public function buildMenu() {\n $content = array();\n\n $headers = array(\n t(\"Menu keuze\"),\n t(\"Functie\"), \n );\n $rows[] = array(\n t(\"<b>Tabel beheer</b>\"),\n t(\"\"),\n );\n $rows[]= array(\n t(\"<a href= ezac/leden/>Leden administratie</a>\"),\n t(\"Inzage en wijzigen leden informatie\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/leden/update>Lid toevoegen</a>\"),\n t(\"Invoeren gegevens nieuw lid\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/kisten/>Vloot administratie</a>\"),\n t(\"Inzage en wijzigen vloot informatie\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/kisten/update>Kist toevoegen</a>\"),\n t(\"Invoeren gegevens nieuw vliegtuig\"),\n );\n $rows[] = array(\n t(\"<b>Startadministratie</b>\"),\n t(\"\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/starts>Startadministratie</a>\"),\n t(\"Overzicht startadministratie\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/starts/create/>Start invoer</a>\"),\n t(\"Invoeren nieuwe start\"),\n );\n $rows[] = array(\n t(\"<b>Voortgang / Bevoegdheden administratie</b>\"),\n t(\"\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/vba>Overzicht</a>\"),\n t(\"Overzicht VBA gegevens\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/vba>Invoeren</a>\"),\n t(\"Invoeren verslagen en bevoegdheden\"),\n );\n\n $table = array(\n '#type' => 'table',\n '#caption' => t(\"EZAC administratie hoofdmenu\"),\n '#header' => $headers,\n '#rows' => $rows,\n '#empty' => t('Geen gegevens beschikbaar.'),\n '#sticky' => TRUE,\n '#prefix' => '<div id=\"menu-div\">',\n '#suffix' => '</div>',\n '#weight' => 2,\n );\n\n return $table;\n }", "function erp_build_menu( $items, $active, $component, $dropdown = false ) {\n\n\n //check capability\n $items = array_filter( $items, function( $item ) {\n if ( !isset( $item['capability'] ) ) {\n return false;\n }\n return current_user_can( $item['capability'] );\n } );\n\n //sort items for position\n uasort( $items, function ( $a, $b ) {\n return $a['position'] > $b['position'];\n } );\n\n $html = '<ul class=\"erp-nav -primary erp-hide-print\">';\n\n if ( $dropdown ) {\n $html = '<ul class=\"erp-nav-dropdown\">';\n }\n foreach ( $items as $item ) {\n\n $link = add_query_arg( [ 'page' => 'erp-'.$component, 'section' => $item['slug'] ], admin_url( 'admin.php' ) );\n\n $class = $active == $item['slug'] ? 'active ' : '';\n\n if ( $dropdown ) {\n $link = add_query_arg( [ 'page' => 'erp-' . $component, 'section' => $item['parent'], 'sub-section' => $item['slug'] ], admin_url( 'admin.php' ) );\n $class .= ( !empty( $_GET['sub-section'] ) && $_GET['sub-section'] == $item['slug'] ) ? 'active ' : '';\n }\n\n if ( !empty( $item['direct_link'] ) ) {\n $link = $item['direct_link'];\n }\n\n $submenu = '';\n\n if ( isset( $item['submenu'] ) ) {\n $class.= \"dropdown-nav\";\n $submenu .= erp_build_menu( $item['submenu'], $active, $component, true );\n }\n\n $html .= sprintf( '<li class=\"%s\"><a href=\"%s\">%s</a>%s</li>', $class, $link, $item['title'], $submenu );\n }\n\n $html .= '</ul>';\n\n return $html;\n}", "function trimestral_module_init_menu_items()\n{\n $CI = &get_instance();\n\n $CI->app->add_quick_actions_link([\n 'name' => _l('trimestral_name'),\n 'url' => 'trimestral',\n ]);\n\n $CI->app_menu->add_sidebar_children_item('utilities', [\n 'slug' => 'trimestral',\n 'name' => _l('trimestral_name'),\n 'href' => admin_url('trimestral'),\n ]);\n}", "public function hook_menu() {\n\n $items = array();\n \n // Add a notification page...\n $items['thumbwhere/host/notify'] = array(\n 'title' => 'Notifications Callback for \"Host\" Entity',\n 'page callback' => '_thumbwhere_host_notify',\n 'access arguments' => array(\n 'send thumbwhere host notifications'\n ),\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n ); \n \n $id_count = count(explode('/', $this->path));\n $wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;\n\n $items[$this->path] = array(\n 'title' => 'Host',\n 'description' => 'Add edit and update thumbwhere_hosts.',\n 'page callback' => 'system_admin_menu_block_page',\n 'access arguments' => array('access administration pages'),\n 'file path' => drupal_get_path('module', 'system'),\n 'file' => 'system.admin.inc',\n );\n\n // Change the overview menu type for the list of thumbwhere_hosts.\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a Host',\n 'title' => 'Add',\n 'description' => 'Add a new Host',\n 'page callback' => 'thumbwhere_host_form_wrapper',\n 'page arguments' => array(thumbwhere_host_create(array('type' => 'thumbwhere_host'))),\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_host'),\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n\n/*\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a Host',\n 'title' => 'Add',\n\t 'description' => 'Add a new Host',\n 'page callback' => 'thumbwhere_host_add_page',\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('edit'),\n 'type' => MENU_NORMAL_ITEM,\n 'weight' => 20,\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n\n );\n*/ \n/*\n $items[$this->path . '/add/' . 'thumbwhere_host'] = array(\n 'title' => 'Add ' . 'ThumbWhereHost',\n 'page callback' => 'thumbwhere_host_form_wrapper',\n 'page arguments' => array(thumbwhere_host_create(array('type' => 'thumbwhere_host'))),\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_host'),\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n*/\n // Loading and editing thumbwhere_host entities\n $items[$this->path . '/thumbwhere_host/' . $wildcard] = array(\n 'page callback' => 'thumbwhere_host_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'weight' => 0,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n $items[$this->path . '/thumbwhere_host/' . $wildcard . '/edit'] = array(\n 'title' => 'Edit',\n 'type' => MENU_DEFAULT_LOCAL_TASK,\n 'weight' => -10,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n );\n\n $items[$this->path . '/thumbwhere_host/' . $wildcard . '/delete'] = array(\n 'title' => 'Delete',\n 'page callback' => 'thumbwhere_host_delete_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'type' => MENU_LOCAL_TASK,\n 'context' => MENU_CONTEXT_INLINE,\n 'weight' => 10,\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n // Menu item for viewing thumbwhere_hosts\n $items['thumbwhere_host/' . $wildcard] = array(\n //'title' => 'Title',\n 'title callback' => 'thumbwhere_host_page_title',\n 'title arguments' => array(1),\n 'page callback' => 'thumbwhere_host_page_view',\n 'page arguments' => array(1),\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('view', 1),\n 'type' => MENU_CALLBACK,\n );\n return $items;\n }", "function getMenuArrays( $table, $key, $title, $w='1', $order='', $parent=-1, $level=0 ) {\r\n\t\r\n\tglobal $db;\r\n\t\r\n\t$ids = array();\r\n\t$titles = array();\r\n\t\r\n\t$indent = '--';\r\n\t\r\n\t$where = 'where '.$w;\r\n\t\r\n\tif ( $parent != -1 ) {\r\n\t\t$where .= \" and parent='$parent'\";\r\n\t\t$parentField = ', parent';\r\n\t}\r\n\t\r\n\tif ( !$order )\r\n\t\t$order = $title;\r\n\t\t\r\n\t$items = $db->getAll( \"select $key, $title $parentField from $table $where order by $order\" );\r\n\t\r\n\tif ( is_array( $items ) && count( $items ) )\r\n\tforeach ( $items as $idx=>$item ) {\r\n\t\t$ids[] = $item[$key];\r\n\t\t$titles[] = str_pad( $item[$title], strlen( $indent ) * $level + strlen( $item[$title] ), $indent, STR_PAD_LEFT );\r\n\t\t\r\n\t\tif ( $parent != -1 ) {\r\n\t\t\tlist( $i, $t ) = getMenuArrays( $table, $key, $title, $w, $order, $item['id'], $level+1 );\r\n\t\t\t$ids = array_append( $ids, $i );\r\n\t\t\t$titles = array_append( $titles, $t );\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn array( $ids, $titles );\r\n}" ]
[ "0.70731425", "0.6663052", "0.63483536", "0.62827134", "0.62827134", "0.62827134", "0.62827134", "0.62827134", "0.62827134", "0.62025917", "0.6186268", "0.61815566", "0.6144312", "0.61430544", "0.6093278", "0.609304", "0.60840833", "0.60700303", "0.6066067", "0.60537887", "0.60503674", "0.6048846", "0.6038304", "0.5981221", "0.59807956", "0.5978054", "0.5977582", "0.59765625", "0.5962155", "0.5924681", "0.59176207", "0.59118575", "0.58866215", "0.5886434", "0.58848214", "0.5869919", "0.5869637", "0.58609354", "0.5848659", "0.58448154", "0.583301", "0.5832726", "0.5827626", "0.5826207", "0.58032024", "0.5794984", "0.5789422", "0.5778959", "0.5767789", "0.5752785", "0.57447094", "0.57437515", "0.57432675", "0.57432675", "0.57425475", "0.57320595", "0.5729502", "0.5729491", "0.57289505", "0.5727459", "0.5714181", "0.5698629", "0.5680099", "0.56686914", "0.56572324", "0.56572324", "0.56510925", "0.5649101", "0.5648832", "0.56474483", "0.5621164", "0.5618792", "0.56167847", "0.5603693", "0.5601414", "0.5601294", "0.56005603", "0.5599881", "0.55995893", "0.55992573", "0.55866766", "0.5583271", "0.5580643", "0.556627", "0.556401", "0.55610365", "0.5559746", "0.5558775", "0.55582863", "0.5556198", "0.5550481", "0.55485207", "0.55485207", "0.554637", "0.5545859", "0.55445886", "0.55398583", "0.5524145", "0.5518268", "0.5509162", "0.5508415" ]
0.0
-1
/ Create the top line
public function setHeader() { $dt = date('j M, Y'); $name_header = ''; $ao = new Application_Model_DbTable_AuditOwner(); if ($this->usertype != '') { $name_header = "&nbsp {$this->userfullname}"; } $complete_user = array('ADMIN','USER','APPROVER'); $complete_audit = ''; $audit_id = $this->audit['audit_id']; logit("audit: " . print_r($this->audit, true)); $complete_audit .= <<<"END" <li class="divider"></li> <li class="tri"><span style="color:black;padding-left: 15px;"> With Selected Audit:</span></li> END; # incomplete and owned audit OR not incomplete audit can be viewed if (($this->audit['status'] == 'INCOMPLETE' && $this->audit['owner']) || $this->audit['status'] != 'INCOMPLETE') { $complete_audit .= <<<"END" <!li class="divider"></li--> <li><a href="{$this->baseurl}/audit/view"><span title=".icon .icon-color .icon-book " class="icon icon-color icon-book"></span> View Audit</a></li> END; } # only incomplete and owned audit can be edited if ($this->audit['status'] == 'INCOMPLETE' && $this->audit['owner']) { $complete_audit .= <<<"END" <!--li class="divider"></li--> <li><a href="{$this->baseurl}/audit/edit/"><span title=".icon .icon-color .icon-edit " class="icon icon-color icon-edit"></span> Edit Audit</a></li> END; } if (in_array($this->usertype, $complete_user)) { $complete_audit .= <<<"END" <!--li class="divider"></li--> <li><a href="{$this->baseurl}/audit/exportdata"><span title=".icon .icon-color .icon-extlink " class="icon icon-color icon-extlink"></span> Export Audit Data</a></li> END; if ($this->audit['owner']) { # $ao->isOwned($audit_id, $this->userid)) { $complete_audit .= <<<"END" <li><a href="{$this->baseurl}/audit/delete" onclick=" return confirm('Do you want to delete Selected Audit?');"> <span title=".icon .icon-color .icon-trash " class="icon icon-color icon-trash"></span> Delete Audit</a></li> END; } $complete_audit .= <<<"END" <li class="divider"></li> <li class="tri"><span style="color:black;padding-left: 15px;"> Change Audit State:</span></li> END; if ($this->audit['status'] == 'INCOMPLETE' && $ao->isOwned($audit_id, $this->userid)) { $complete_audit .= <<<"END" <li><a href="{$this->baseurl}/audit/complete"> <span title=".icon .icon-color .icon-locked " class="icon icon-color icon-locked"></span> Mark Audit Complete</a></li> END; } if ($this->audit['status'] == 'COMPLETE' && $ao->isOwned($audit_id, $this->userid)) { $complete_audit .= <<<"END" <li><a href="{$this->baseurl}/audit/incomplete"> <span title=".icon .icon-color .icon-unlocked " class="icon icon-color icon-unlocked"></span> Mark Audit Incomplete</a></li> END; } if ($this->audit['status'] == 'COMPLETE' && $this->usertype == 'APPROVER') { $complete_audit .= <<<"END" <li><a href="{$this->baseurl}/audit/finalize" onclick=" return confirm('Do you want to finalize Audit (#{$this->audit['audit_id']}-{$this->audit['tag']})?');"><span title=".icon .icon-color .icon-sent " class="icon icon-color icon-sent"></span> Mark Audit Finalized</a></li> <li><a href="{$this->baseurl}/audit/reject" onclick=" return confirm('Do you want to reject Audit (#{$this->audit['audit_id']}-{$this->audit['tag']})?');"><span title=".icon .icon-color .icon-cross " class="icon icon-color icon-cross"></span> Mark Audit Rejected</a></li> END; } } $this->header = <<<"END" <div class="navbar"> <div class="navbar-inner"> <div class="container-fluid"> <a class="brand" href="{$this->baseurl}{$this->mainpage}"> <span title=".icon .icon-black .icon-check " class="icon icon-black icon-check"></span> <span>eChecklist</span> </a> END; $newuser = ''; if ($this->usertype != '') { if ($this->usertype == 'ADMIN') { $newuser = <<<"END" <li><a href="{$this->baseurl}/user/create"> <span title=".icon .icon-green .icon-user " class="icon icon-green icon-user"></span> New User</a></li> END; } $this->header = $this->header . <<<"END" <div class="btn-group pull-left" style="margin-left:100px;"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <span title=".icon .icon-blue .icon-clipboard " class="icon icon-blue icon-clipboard"></span> <span class="hidden-phone">Audit</span> <span class="caret"></span></a> <ul class="dropdown-menu"> END; if (in_array($this->usertype, $complete_user)) { $this->header .= <<<"END" <li><a href="{$this->baseurl}/audit/create"><span title=".icon .icon-green .icon-clipboard " class="icon icon-green icon-clipboard"></span> New Audit</a></li> END; } $this->header .= <<<"END" <li><a href="{$this->baseurl}/audit/search"><span title=".icon .icon-blue .icon-search " class="icon icon-blue icon-search"></span> Search for Audit</a></li> {$complete_audit} <li class="divider"></li> <li><a href="{$this->baseurl}/audit/runreports"><span title=".icon .icon-color .icon-newwin " class="icon icon-color icon-newwin"></span> Run Reports</a></li> END; if (in_array($this->usertype, $complete_user)) { $this->header .= <<<"END" <li class="divider"></li> <li><a href="{$this->baseurl}/audit/import"><span title=".icon .icon-blue .icon-import " class="icon icon-blue icon-archive"></span> Import Audit</a></li> END; } $this->header .= <<<"END" </ul> </div> <div class="btn-group pull-left"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <span title=".icon .icon-blue .icon-tag " class="icon icon-blue icon-tag"></span> <span class="hidden-phone">Lab</span> <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="{$this->baseurl}/lab/create"><span title=".icon .icon-green .icon-tag " class="icon icon-green icon-tag"></span> New Lab</a></li> <li><a href="{$this->baseurl}/lab/select"><span title=".icon .icon-blue .icon-search " class="icon icon-blue icon-search"></span> Select a Lab</a></li> <li class="divider"></li> <li><a href="{$this->baseurl}/lab/edit"><span title=".icon .icon-blue .icon-search " class="icon icon-blue icon-search"></span> Edit Selected Lab</a></li> </ul> </div> <div class="btn-group pull-left"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <span title=".icon .icon-blue .icon-user " class="icon icon-blue icon-user"></span> <span class="hidden-phone">User</span> <span class="caret"></span></a> <ul class="dropdown-menu"> {$newuser} <li><a href="{$this->baseurl}/user/find"><span title=".icon .icon-blue .icon-search " class="icon icon-blue icon-search"></span>Find User</a></li> </ul> </div> <!--div class="btn-group pull-left"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <span title=".icon .icon-blue .icon-flag " class="icon icon-blue icon-flag"></span> <span class="hidden-phone">Language</span> <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="{$this->baseurl}/language/switch/EN"><span title=".icon .icon-green .icon-flag " class="icon icon-green icon-flag"></span> English</a></li> <li><a href="{$this->baseurl}/language/switch/FR"><span title=".icon .icon-green .icon-flag " class="icon icon-green icon-flag"></span> French</a></li> <li><a href="{$this->baseurl}/language/switch/VI"><span title=".icon .icon-green .icon-flag " class="icon icon-green icon-flag"></span> Vietnamese</a></li> </ul> </div--> <!-- user dropdown starts --> <div class="btn-group pull-right"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <span title=".icon .icon-orange .icon-user " class="icon icon-orange icon-user"></span> <span class="hidden-phone"> {$name_header}</span> <span class="caret"></span> </a> <ul class="dropdown-menu"> <li><a href="{$this->baseurl}/user/profile"><span title=".icon .icon-blue .icon-contacts " class="icon icon-blue icon-contacts"></span> Profile</a></li> <li><a href="{$this->baseurl}/user/changepw"><span title=".icon .icon-blue .icon-contacts " class="icon icon-blue icon-contacts"></span> Change Password</a></li> <li class="divider"></li> <li><a href="{$this->baseurl}/user/logout">Logout</a></li> </ul> </div> <!-- user dropdown ends --> END; $auditinfo = ''; //if ($this->dialog_name == 'audit/edit') { $auditinfo = "<div style=\"margin:6px 0 6px 20px;padding-right:5px;\">Selected Audit: {$this->showaudit}</div>"; //} $this->header .= <<<"END" <div style="display:inline-block;"> <div style="margin:6px 0px 6px 20px;padding-right:5px;">Selected Lab: {$this->showlab}</div> {$auditinfo} <div style="clear:both;"></div></div> END; } else { $this->header = $this->header . <<<"END" <div class="btn-group pull-left" style="margin-left:100px;"> <a class="btn" href="{$this->baseurl}/user/login"><span title=".icon .icon-blue .icon-contacts " class="icon icon-blue icon-contacts"></span> Login</a></div> END; } $this->header = $this->header . <<<"END" </div> </div> <!-- style="clear:both;"></div --> </div> END; $this->view->header = $this->header; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function writeTop()\n {\n }", "public function writeTop() {}", "function mainTop(){\n\t\techo \"<table align='center' cellpadding='0' cellspacing='0' width='\".$this->width.\"'>\\n<tr>\\n<td width='\".$this->width.\"' class='main-bg'>\\n\";\n\t}", "private function createOrd()\n {\n $point1 = new Point(\n $this->style->canvas->left,\n $this->style->canvas->top - $this->style->axes->ord->marginY\n );\n\n $point2 = new Point(\n $point1->x,\n $this->style->canvas->top + $this->style->canvas->height\n );\n\n return $this->getLine(\n $point1,\n $point2,\n $this->style->axes->ord->color,\n $this->style->axes->ord->thickness\n );\n }", "public function Header(){\n\t\t$this->lineFeed(10);\n\t}", "function Header() {\r\n // print the title\r\n $this->SetTitleFont();\r\n $this->Cell(100, 8, $this->title, 0, 0, \"L\");\r\n\r\n // print the author\r\n $this->SetAuthorFont();\r\n $this->Cell(0, 8, $this->author, 0, 0, \"R\");\r\n\r\n // header line\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, 17, 190, 0.2, \"F\");\r\n $this->Rect(10, 17.5, 190, 0.2, \"F\");\r\n $this->Ln(14);\r\n }", "public function __Header(){\n $this->Ln(5);\n $this->SetDrawColor(160,160,160);\n $this->SetFillColor(230,230,230);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',7);\n $this->SetX(($this->w - $this->_tWidth)/2);\n foreach($this->_fields as $field)\n $this->Cell($field[\"size\"],5,$field[\"header\"],1,0,\"C\",true);\n $this->Ln();\n }", "function Header() {\n $this->AddFont('Gotham-M','B','gotham-medium.php'); \n //seteamos el titulo que aparecera en el navegador \n $this->SetTitle(utf8_decode('Toma de Protesta Candidato PVEM'));\n\n //linea que simplemente me marca la mitad de la hoja como referencia\n \t$this->Line(139.5,$this->getY(),140,250);\n\n \t//bajamos la cabecera 13 espacios\n $this->Ln(10);\n //seteamos la fuente, el color de texto, y el color de fondo de el titulo\n $this->SetFont('Gotham-M','B',11);\n $this->SetTextColor(255,255,255);\n $this->SetFillColor(73, 168, 63);\n //escribimos titulo\n $this->Cell(0,5,utf8_decode('Toma de Protesta Candidato PVEM'),0,0,'C',1); //el completo es 279 bueno 280 /2 = 140 si seran 10 de cada borde, entonces 120\n\n $this->Ln();\n }", "public function Header()\r\n\t{\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14);\r\n\t\t$this->Cell(170,7,\"Date :: \". $this->today_date ,1,0,'C');\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14); \r\n\t\t$this->MultiCell(170,8,\"Room Things Report \\n\".$this->title,1,'C');\r\n\t\t$this->Ln(5);\r\n\r\n\t}", "function Header() \n { \n\n list($r, $b, $g) = $this->xheadercolor; \n $this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top \n $this->SetFillColor($r, $b, $g); \n $this->SetTextColor(0 , 0, 0); \n $this->Cell(0,20, '', 0,1,'C', 1); \n $this->Text(15,26,$this->xheadertext ); \n }", "function newsroom_elated_get_header_top() {\n\n $params = array(\n 'column_widths' => '33-33-33',\n 'show_header_top' => newsroom_elated_options()->getOptionValue('top_bar') == 'yes' ? true : false,\n 'top_bar_in_grid' => newsroom_elated_options()->getOptionValue('top_bar_in_grid') == 'yes' ? true : false\n );\n\n $params = apply_filters('newsroom_elated_header_top_params', $params);\n\n newsroom_elated_get_module_template_part('templates/parts/header-top', 'header', '', $params);\n }", "public function getLineGap() {}", "function blankMiddleBox($header,$subline,$body){\n\t\techo \"<div class='side-body-bg'>\\n\";\n\t\techo \"<span class='scapmain'>$header</span>\\n\";\n\t\techo \"<br />\\n\";\n\t\techo \"<span class='poster'>$subline</span>\\n\";\n\t\techo \"</div>\\n\";\n\t\techo \"<div class='tbl'>$body</div>\\n\";\n\t\techo \"<br />\\n\";\n\t}", "function pushHeadline ($text) {\n\t\t$this->_roof[\"cuerpo\"][] = $text;\n\t}", "function Header(){\n\t\t$linha = 5;\n\t\t// define o X e Y na pagina\n\t\t$this->SetXY(10,10);\n\t\t// cria um retangulo que comeca na coordenada X,Y e\n\t\t// tem 190 de largura e 265 de altura, sendo neste caso,\n\t\t// a borda da pagina\n\t\t$this->Rect(10,10,190,265);\n\t\t\n\t\t// define a fonte a ser utilizada\n\t\t$this->SetFont('Arial', 'B', 8);\n\t\t$this->SetXY(11,11);\n\t\t\n\t\t// imprime uma celula com bordas opcionais, cor de fundo e texto.\n\t\t$agora = date(\"G:i:s\");\n\t\t$hoje = date(\"d/m/Y\");\n\t\t$this->Cell(10,$linha,$agora,0,0,'C');\n\t\t$this->Cell(150,$linha,'..:: Fatec Bauru - Relatorio de Cursos da Fatec ::..',0,0,'C');\n\t\t$this->Cell(30,$linha,$hoje,0,0,'C');\n\t\t\n\t\t// quebra de linha\n\t\t$this->ln();\n\t\t$this->SetFillColor(232,232,232);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->SetFont('Arial', 'B', 8);\n\n\t\t$this->Cell(10,4,'ID','LTR',0,'C',1);\n\t\t$this->Cell(140,4,'Nome do Curso','LTR',0,'C',1);\n\t\t$this->Cell(40,4,'Periodo','LTR',0,'C',1);\n\t}", "private function traceLine() {\n $this->lineJump();\n $this->currentPage->rectangle(self::HMARGIN + $this->hOffset, $this->PAGE_HEIGHT - self::VMARGIN - $this->vOffset, $this->PAGE_WIDTH - 2*$this->hOffset - 2*self::HMARGIN, 1);\n $this->currentPage->stroke();\n }", "protected function makeBeforeInfo()\n {\n $this->setY($this->layout['contentMarginTopP1']);\n $this->renderInfo($this->content['beforeInfo'] ?? []);\n }", "function headingLine($msg) {\n echo terminal_style(str_pad($msg . ' ', 120, '=') . \"\\n\\n\", \"light-cyan\");\n}", "function MidHead($title)\n {\n // Arial bold 15\n $this->SetFont('Arial','B',15);\n // Calculate width of title and position\n $w = $this->GetStringWidth($title)+6;\n $this->SetX((210-$w)/2);\n // Colors of frame, background and text\n $this->SetDrawColor(0,80,180);\n $this->SetFillColor(230,230,0);\n //$this->SetTextColor(220,50,50);\n // Thickness of frame (1 mm)\n $this->SetLineWidth(1);\n // Title\n $this->Cell($w,9,$title,1,1,'C',true);\n // Line break\n $this->Ln(10);\n }", "function Header()\n{\n $this->SetFont('Arial','B',15);\n // Move to the right\n $this->Cell(80);\n // Framed title\n\t$this->SetDrawColor(0,80,180);\n $this->SetFillColor(230,230,0);\n $this->SetTextColor(220,50,50);\n // Thickness of frame (1 mm)\n $this->SetLineWidth(1);\n\t$this->Cell($w,9,$title,1,1,'C',true);\n $this->Cell(30,10,'Title',1,0,'C');\n // Line break\n $this->Ln(40);\n}", "private function _initializeLine() {\n\t\t$this->_text[$this->_lineNumber]['x']=0;\n\t\t$this->_text[$this->_lineNumber]['width']=0;\n\t\t$this->_text[$this->_lineNumber]['height']=0;\n\t\t$this->_text[$this->_lineNumber]['alignment']=null;\n\t}", "function header (){\n\t\t$this->setfont('Arial','B', 16);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'WANANCHI', 0, 0, 'C');\n\t\t$this->Ln(10);\n\t\t$this->setfont('Arial','',12);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'INFORMATION',0, 0, 'C');\n\t\t$this->Ln(30);\n\t}", "function _fillTop()\n {\n return $this->_top + $this->_padding['top'];\n }", "protected function makeTitle()\n {\n $this->setY($this->layout['titleMarginTop']);\n $this->setFont('', 'B', $this->layout['titleFontSize']);\n $this->write($this->layout['titleCellHeight'], $this->content['title']);\n $this->setFont('', '', $this->layout['fontSize']);\n }", "protected function determineRootline() {}", "protected function determineRootline() {}", "private function writeMarginTop(): void\n {\n $record = 0x0028; // Record identifier\n $length = 0x0008; // Bytes to follow\n\n $margin = $this->phpSheet->getPageMargins()->getTop(); // Margin in inches\n\n $header = pack('vv', $record, $length);\n $data = pack('d', $margin);\n if (self::getByteOrder()) { // if it's Big Endian\n $data = strrev($data);\n }\n\n $this->append($header . $data);\n }", "private function generateHead(){\n echo '<div class=\"panel panel-default\">';\n echo '<div class=\"panel-heading\">';\n echo '<h1 class=\"panel-title\"><span class=\"glyphicon glyphicon-flag\"></span>Your last orders</h1>';\n echo '</div>';\n echo '<div class=\"panel-body\">';\n }", "public function hr()\n {\n echo str_repeat(\"-\", 80) . \"\\n\";\n }", "function Header() {\n if(empty($this->title) || $this->PageNo() == 1) return;\n $oldColor = $this->TextColor;\n $this->SetTextColor(PDF_HEADER_COLOR['red'],\n PDF_HEADER_COLOR['green'],\n PDF_HEADER_COLOR['blue']);\n $x = $this->GetX();\n $y = $this->GetY();\n $this->SetY(10, false);\n $this->SetFont('', 'B');\n $this->Cell(0, 10, $this->title);\n $this->SetFont('', '');\n $this->SetXY($x, $y);\n $this->TextColor = $oldColor;\n }", "function Header()\t{\n\n\t\tif (! empty ($this->Watermark)) {\n\t\t\t$this->SetFont('Arial','B',50);\n \t$this->SetTextColor(255,192,203);\n \t\t$this->RotatedText(35,190, $this->Watermark, 45);\n \t\t$this->RotatedText(40,210, \"Election will be held in 2020\", 45);\n \t\t$this->SetTextColor(0,0,0);\n\t\t}\n\t\t\n $this->SetFont('Arial','B',24);\n $this->Ln(15);\n $this->Cell(0,0, \"CERTIFICATE OF ACCEPTANCE\",0,0,'C');\n $this->Ln(13);\n $this->Cell(0,0, strtoupper($this->party) . \" PARTY\",0,0,'C');\t\t\n $this->Ln(15); \n \n\t\t$YLocation_new = $Top_Corner_Y = $this->GetY() - 1.5; \n \t\t$this->SetY($Top_Corner_Y); \n \t$MyTop = $YLocation = $this->GetY();\n \n \t$this->Line($this->Line_Left, $YLocation - 0.1, $this->Line_Right, $YLocation - 0.1); \n \t$this->Ln(2.8);\n\t \t\t\t\n $YLocation = $this->GetY() - 1.5 ;\n \n $Botton_Corner_Y = $this->GetY();\n\n\n \t\t$this->Ln(10); \n\t\t$this->SetFont('Arial','', 18); \n\t\t$this->SetX(10);\n\t\t$this->MultiCell(190, 8, \"I, \" . $this->CandidateName . \", residing at \" . $this->CandidateAddress . \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" having been designated/nominated by the \" . $this->party . \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" Party, as a candidate for the office of \" . $this->PublicOffice . \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\", do hereby accept such designation/nomination and consent to be \" . \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"such candidate of such party at a \" . $this->TypeOffice . \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" election to be held on \" . $this->ElectionDate . \".\");\n \t\n \n\t\t$this->SetXY(10, 135); \n\t\t$this->MultiCell(0, 10, \"____________________\\nDate\");\n\t\t$this->SetXY(110, 135); \n\t\t$this->MultiCell(0, 10, \"_________________________\\nSignature of Candidate\");\n\t\t \t\t\n\t\t \t\t\n \t$this->Ln(7);\n \n \t$this->SetX(10); $this->MultiCell(0, 10, \"State of New York\");\n \t$this->SetX(10); $this->MultiCell(0, 8, \"County of \" . $this->PubNotaryCounty . \" : ss:\");\n\t\t$this->Ln(4.5);\n \t\n \t \t$this->SetX(10); \n \t$this->MultiCell(190, 8, \"On this \" . $this->PubNotaryDay . \" day of \" . $this->PubNotaryMonth . \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\", before me personally appeared \" . $this->CandidateName . \", to me known and known \" .\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\" to me to be the individual described therein, and who executed the foregoing instrument, \" .\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\" and acknowledged to me that he/she executed the same.\");\n \t\n \n\t\t$this->SetXY(110, 245); \n\t\t$this->MultiCell(0, 10, \"_________________________\\nNotary Public\");\n \n\t\t\n \n\t}", "function Header()\n{\n\tglobal $title;\n\t$this->Ln(5);\n}", "function Header()\n\t\t{\n\t\t\t$this->SetFont('Helvetica','B',18);\n\t\t\t$this->SetTextColor(184,10,10);\n\t\t\t$this->Cell(30);\n\t\t\t$this->Cell(120,10,utf8_decode(\"Mensajes Contestados\"),0,0,'C');\n\t\t\t$this->Ln(20);\n\t\t}", "function Header()\n\t{\n\t\t// Police Arial gras 24\n\t\t$this->SetTextColor(255,10,22);\n\t\t$this->SetFont('Arial','B',14);\n\t\t// Décalage à droite\n\t\t$this->Cell(10);\n\t\t// Titre (ligne,titre)\n\t\t$this->Cell('',10,'Liste des employes',0,0,'C');\n\t\t// Saut de ligne\n\t\t$this->Ln(20);\n\t}", "public function setLabelOnTop()\n {\n $this->horizontal = false;\n $this->col1 = 12;\n $this->col2 = 12;\n return $this;\n }", "function to_the_top()\r\n{\r\n return \"\\n \"\r\n . \"<div style=\\\"text-align: right;\\\">\\n\"\r\n . \"<a href=\\\"#top\\\">\"\r\n . \"<img src=\\\"\".base_url().\"images/go-up.png\\\" \"\r\n . \"border=\\\"0\\\" style=\\\"vertical-align: middle;\\\"> \" . T_('go_up')\r\n . \"</a>\\n\"\r\n . \"</div>\\n\\n\";\r\n}", "public function newLine() {\n\t\t$this->_section=0;\n\t\t$this->_lineNumber++;\n\t\t$this->_text[$this->_lineNumber]=array();\n\t\t$this->_text[$this->_lineNumber][0]['text']='';\n\t\t$this->_text[$this->_lineNumber][0]['encoding']='';\n\t\t$this->_text[$this->_lineNumber][0]['font']=$this->_font;\n\t\t$this->_text[$this->_lineNumber][0]['fontSize']=$this->_fontSize;\n\t\t$this->_text[$this->_lineNumber][0]['width']=0;\n\n\t\t\n\t\t$this->_initializeLine();\n\t\t\n\t\t$this->_text[$this->_lineNumber]['alignment']=$this->_text[$this->_lineNumber-1]['alignment'];\n\t\t//add the last cell's height to the auto height if we have an auto-height box.\n\t\tif ($this->isAutoHeight()) {\n\t\t\t$this->_autoHeight+=$this->_text[$this->_lineNumber-1]['height'];\n\t\t}\n\t}", "function Header()\r\n{\r\n $this->SetFont('Arial','B',15);\r\n // Move to the right\r\n $this->Cell(80);\r\n // Framed title\r\n //$this->Cell(30,10,'Title',1,0,'C');\r\n // Line break\r\n $this->Ln(15);\r\n}", "function klippe_mikado_get_header_top() {\n\t\t$params = array(\n\t\t\t'show_header_top' => klippe_mikado_is_top_bar_enabled(),\n\t\t\t'show_header_top_background_div' => klippe_mikado_get_meta_field_intersect( 'header_type' ) == 'header-box' ? true : false,\n\t\t\t'top_bar_in_grid' => klippe_mikado_get_meta_field_intersect( 'top_bar_in_grid' ) == 'yes' ? true : false,\n\t\t\t'top_bar_skin' => klippe_mikado_get_meta_field_intersect( 'top_bar_skin' ),\n\t\t);\n\t\t\n\t\t$params = apply_filters( 'klippe_mikado_header_top_params', $params );\n\t\t\n\t\tklippe_mikado_get_module_template_part( 'templates/top-header', 'header/types/top-header', '', $params );\n\t}", "function drawTableLine($data_len=0) {\n\techo \" \" . str_repeat(\"-\", $data_len + 10) . \"\\r\\n\";\n}", "function listYLineDiagram($yleft, $ytop)\n{\n $result = array();\n $sum = $yleft;\n for ($i=0; $i < 7; $i++) {;\n $result[] = array('ymargin_left' => $sum, 'ymargin_top' => $ytop);\n $sum += 50;\n }\n\n return $result;\n}", "private function getTitleLineString()\n\t{\n\t\t$title = Html::tag('title', $this->items['title']) . \"\\n\";\n\t\t\n\t\treturn $title;\n\t}", "static public function go_to_top_link() {\n\t\t$text = (self::$language === 'de' ? 'nach oben' : 'top');\n\t\treturn '<p class=\"center\">' . PHP_EOL\n\t\t . '\t<a href=\"#top\"><img alt=\"' . $text . '\" title=\"' . $text . '\" class=\"arrow_up {PNGCSS}\" src=\"{IMAGE_URL}/arrow_up.png\" width=\"15\" height=\"22\" /></a>' . PHP_EOL\n\t\t . '</p>' . PHP_EOL ;\n\t}", "function Header()\n\t{\n\t\t$this->cabecera_esp();\n\t\t$this->Ln();\n\t}", "private function getOgHeadLineString()\n\t{\n\t\t$prefix = 'og: http://ogp.me/ns# fb: http://ogp.me/fb# article: http://ogp.me/article#';\n\t\t\n\t\treturn sprintf('<head prefix=\"%s\">', $prefix) . \"\\n\";\n\t}", "public function setTop($stri_top) {\t$this->stri_top = $stri_top ;}", "private function createCreatureTop()\n {\n\n }", "function Ln($h='')\n\t\t{\n\t\t\t$this->x=$this->lMargin;\n\t\t\tif(is_string($h)) $this->y+=$this->lasth;\n\t\t\telse $this->y+=$h;\n\t\t}", "private function setRedTopBorder(){\n\t\techo \"decor| TopBorder RED \\n\";\n\t}", "function makeHeader(){\n\tglobal $pdf;\n\t\n\t// logo\n\t$pdf->Image('img/mepbro-pdf.png', 27, 27, 218);\n\t\n\t// title box\n\t$pdf->SetFillColor(51,102,255);\n\t$pdf->Rect(263, 27, 323, 72, 'F');\n\t// title lines\n\t$pdf->SetTextColor(255,255,255);\n\t$pdf->SetFont('Helvetica','B',34);\n\t$pdf->SetXY(263, 31);\n\t$pdf->Cell(323,36,'HOSE TEST', 0, 1, 'C');\n\t$pdf->SetXY(263, 64);\n\t$pdf->Cell(323,36,'CERTIFICATE', 0, 1, 'C');\n\t\n\treturn 126;\n\t\n}", "public function getOedhline()\n {\n return $this->oedhline;\n }", "private function generateHeading()\n {\n //get current dimensions\n\t\t$highestRow = $this->objWorksheet->getHighestRow(); // e.g. 10\n\t\t$highestColumn = $this->objWorksheet->getHighestColumn(); // e.g 'F'\n\n\t\t$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);\n\n\t\t//insert row on top\n\t\t$this->objWorksheet->insertNewRowBefore(1,2);\n\n\t\t//merge cells\n\t\t$this->objWorksheet->mergeCells(\"A1:\".$highestColumn.\"1\");\n\n\t\t//set the text for header\n\t\t$this->objWorksheet->setCellValue(\"A1\", $this->_headingText);\n\t\t$this->objWorksheet->getStyle('A1')->getAlignment()->setWrapText(true);\n\t\t$this->objWorksheet->getRowDimension('1')->setRowHeight(48);\n\n //Apply style\n\t\t$this->objWorksheet->getStyle(\"A1\")->applyFromArray($this->_headingStyleArray);\n }", "function Header()\n\t{\n\t\t$this->Image('../imagenes/logo.jpg',15,10,40);\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->SetXY(70,15)\t;\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','L');\n\t//\t$this->MultiCell(190,5,\"CABLE, C.A.\",'0','L');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->SetX(70)\t;\n\t\t$this->MultiCell(190,5,strtoupper(_(tipo_serv())),'0','L');\n\t\t//$this->Ln(8);\n\t}", "protected function draw_groupsHeaderHorizontal()\n {\n // $this->output->setColumnNo(0);\n $lastcolumno = $this->output->getColumnNo();\n $this->output->setColumnNo(0);\n $this->draw_groupsHeader();\n $this->output->setColumnNo($lastcolumno);\n $this->currentRowTop = $this->output->getLastBandEndY();\n \n //output print group\n //set callback use next page instead\n // echo 'a'; \n }", "function Header() //Encabezado\r\n {\r\n $this->SetFont('Arial','B',9);\r\n \r\n \r\n $this->Line(10,10,206,10);\r\n $this->Line(10,35.5,206,35.5);\r\n \r\n // $this->Cell(30,25,'',0,0,'C',$this->Image('imagenes/logo_publistika.jpg', 152,12, 19));\r\n $this->Cell(111,25,'',0,0,'C', $this->Image('imagenes/logo_publistika.jpg',70,12,80));\r\n //$this->Cell(40,25,'',0,0,'C',$this->Image('images/logoDerecha.png', 175, 12, 19));\r\n \r\n //Se da un salto de línea de 25\r\n $this->Ln(25);\r\n }", "function newsroom_elated_header_top_bar_styles() {\n\n $background_color = newsroom_elated_options()->getOptionValue('top_bar_background_color');\n $top_bar_styles = array();\n\n if($background_color !== '') {\n $top_bar_styles['background-color'] = $background_color;\n }\n\n if(newsroom_elated_options()->getOptionValue('top_bar_bottom_border') == 'yes'){\n if(newsroom_elated_options()->getOptionValue('top_bar_bottom_border_color') !== \"\"){\n $top_bar_styles['border-bottom'] = '1px solid '.newsroom_elated_options()->getOptionValue('top_bar_bottom_border_color');\n }else{\n // it is enabled by default\n }\n }\n elseif(newsroom_elated_options()->getOptionValue('top_bar_bottom_border') == 'no'){\n $top_bar_styles['border-bottom'] = 'none';\n }\n\n echo newsroom_elated_dynamic_css('.eltd-top-bar', $top_bar_styles);\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 top() {\n return '<div class=\"top\"><a href=\"#credits\">[Top]</a></div>';\n}", "function kml_arrow($time_begin, $time_end, $x1, $y1, $x2, $y2, $depth, $head_angle, $color) {\n\n\t$x_adj = ($x2-$x1)*0.00006/pow((pow(($x1-$x2), 2) + pow(($y1-$y2),2)), 0.5);\n\n\t$y_adj = ($y2-$y1)*0.00006/pow((pow(($x1-$x2), 2) + pow(($y1-$y2),2)), 0.5);\n\n\n //The following draws a line\n\techo '<Placemark>'; \n\t\techo '<styleUrl>#'.$color. '</styleUrl> \n\t\t<LineString>\t \n\t\t\t<altitudeMode>absolute</altitudeMode> \n\t\t\t<coordinates>';\n\t\t\techo $x1. \",\". $y1. \",$depth \\n\";\n\t\t\techo ($x2 - $x_adj*2.067). \",\". ($y2 - $y_adj*2.067). \",$depth \\n\";\n\t\t\techo '</coordinates> \n\t\t</LineString>\n\t\t<TimeSpan id=\"ID'. $x2. $depth. '\">';\n\t\t\techo '<begin>'.$time_begin.'</begin> ';\n\t\t\techo '<end>'.$time_end.'</end> ';\n\t\techo '</TimeSpan>\n\t</Placemark> ';\n\n\t// The following is a arrow head.\n\techo '<GroundOverlay>\n\t\t<Icon> \n\t\t\t<href>http://tabs1.gerg.tamu.edu/tglo/testpages/ADCP/arrow-head.png</href>\n\t\t</Icon>';\n\t\n\techo '<TimeSpan id=\"ID'. $x2. $depth. 'ID\">';\n\t\techo '<begin>'.$time_begin.'</begin> ';\n\t\techo '<end>'.$time_end.'</end>'. \"\\n\";\n\techo '</TimeSpan>';\n\techo \"\\n\";\n\n\n\techo '<LatLonBox>\t\n \t<north>'. ($y2 - $y_adj + 0.00006) . '</north> \n\t\t<south>'. ($y2 - $y_adj - 0.00006) . '</south> \n\t\t<east>'. ($x2 - $x_adj + 0.000066) . '</east> \n\t\t<west>'. ($x2 - $x_adj - 0.000066) . '</west> ' ; \n\t\techo '<rotation>'. $head_angle. '</rotation> \n\t </LatLonBox> ';\n\techo '<altitude>'. $depth. '</altitude>';\n\techo '<altitudeMode>absolute</altitudeMode> \n\t</GroundOverlay>';\n\n\t}", "abstract protected function determineRootline() ;", "public function addBorderLine()\r\n {\r\n $this->rowIndex++;\r\n $this->data[$this->rowIndex] = self::HR;\r\n\r\n return $this;\r\n }", "function msdlab_pre_header(){\n print '<div class=\"pre-header\">\n <div class=\"wrap\">';\n do_action('msdlab_pre_header');\n print '\n </div>\n </div>';\n }", "public function Header(){\n $ci =& get_instance();\n // Select Arial bold 15\n $this->AddFont('Futura-Medium');\n $this->SetFont('Futura-Medium','',16);\n // Move to the right\n //$this->Cell(80);\n // Framed title\n // Logo\n $this->Image(asset_url() . \"images/logo.png\",11,5,0,20);\n $this->Ln(15);\n $this->Cell(0,10,\"GetYourGames\",0,1,'L');\n $this->SetFont('Futura-Medium','',12);\n $this->Cell(0,10,site_url(),0,1,\"L\");\n $this->Ln(5);\n $this->SetFont('Futura-Medium','',18);\n $this->Cell(0,10,utf8_decode($this->title),0,1,'C');\n // Line break\n $this->Ln(10);\n $this->SetFont('Futura-Medium','',11);\n $this->Cell(15,10,utf8_decode('#'),'B',0,'C');\n $this->Cell(100,10,utf8_decode($ci->lang->line('table_product')),'B',0,'L');\n $this->Cell(30,10,utf8_decode($ci->lang->line('table_qty')),'B',0,'L');\n $this->Cell(40,10,utf8_decode($ci->lang->line('table_subtotal')),'B',1,'L');\n\n $this->Ln(2);\n }", "function Header()\n\t{\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->MultiCell(190,7,strtoupper(_('listado de clientes para cortes')),'0','C');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,strtoupper(_('fecha')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,strtoupper(_('hora')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t}", "function showBegin( $appctx )\n\t{\n\t\t$appctx->Plus() ;\n\t\t$appctx->Indent() ;\n\t\techo( \"<span id=\\\"$this->idx\\\" class=\\\"nodelabel\\\" >\\n\") ;\n\t}", "static public function insert_go_to_top_link() {\n\t\techo self::go_to_top_link();\n\t}", "function listSmall_YlineDiagram($yleft, $ytop)\n{\n $sum = $yleft;\n for ($i=0; $i <= 60 ; $i++) {\n $result[] = array('y_small_margin_left' => $sum, 'y_small_margin_top' => $ytop);\n $sum += 5;\n }\n\n return $result;\n}", "public function row_top($name)\n {\n $out = \"<tr><td width=\\\"100%\\\" colspan=\\\"2\\\" bgcolor=\\\"#C0C0C0\\\">\".$name.\"</td></tr>\\n\";\n return $out;\n }", "function\tsetupHeaderMid( $_frm) {\n\n\t\t$_frm->addLine( \"Kommissionierung\", $this->defParaFmt) ;\n\t\t$_frm->addLine( sprintf( \"Kommission Nr. %s, %s\", $this->myCustomerCommission->CustomerCommissionNo, $this->myCustomerCommission->Datum), $this->defParaFmt) ;\n\n\t\t/**\n\t\t * draw the separating line between the header and the document content\n\t\t */\n\t\t$this->myfpdf->Line( $_frm->horOffs, $_frm->verOffs + $_frm->height + mmToPt( 1.0),\n\t\t\t\t\t\t\t\t$_frm->horOffs + $_frm->width, $_frm->verOffs + $_frm->height + mmToPt( 1.0)) ;\n\t}", "function Header() {\n\t\tif (is_null($this->_tplIdx)) {\n\t\t\t$this->setSourceFile('gst3.pdf');\n\t\t\t$this->_tplIdx = $this->importPage(1);\n\t\t}\n\t\t$this->useTemplate($this->_tplIdx);\n\n\t\t$this->SetFont('freesans', 'B', 9);\n\t\t$this->SetTextColor(255);\n\t\t$this->SetXY(60.5, 24.8);\n\t\t$this->Cell(0, 8.6, \"TCPDF and FPDI\");\n\t}", "public function Header()\n {\n // Set custom header and footer\n $this->setCustomHeader();\n\n if (array_key_exists($this->category, $this->categories)) {\n $title = $this->categories[$this->category]['name'];\n } else {\n $title = '';\n }\n\n $this->SetTextColor(0, 0, 0);\n $this->SetFont($this->currentFont, 'B', 18);\n\n if (0 < PMF_String::strlen($this->customHeader)) {\n $this->writeHTMLCell(0, 0, '', '', $this->customHeader);\n $this->Ln();\n $this->writeHTMLCell(0, 0, '', '', html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 0, false, true, 'C');\n } else {\n $this->MultiCell(0, 10, html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 'C', 0);\n $this->SetMargins(PDF_MARGIN_LEFT, $this->getLastH() + 5, PDF_MARGIN_RIGHT);\n }\n }", "private function generateHead() {\n echo '<h3><span class=\"glyphicon glyphicon-camera\"></span> Images</h3>';\n echo '<div class=\"row\">';\n }", "function Header() {\n $this->SetFont('Helvetica', 'B', 18);\n //Judul dalam bingkai\n $this->Cell(0, 5, 'Daftar Hasil Seleksi Calon Siswa Baru', 0, 1, 'C');\n $this->SetFont('Helvetica', 'B', 16);\n $this->Cell(0, 15, 'Sekolah Dasar', 0, 0, 'C');\n //Ganti baris\n $this->Ln(20);\n }", "private function printHead()\n\t{\n\t\t$out = '<?xml version=\"1.0\" encoding=\"utf-8\"?>' . \"\\n\";\n\t\t$out .= $this->head . PHP_EOL;;\t\t\t\n\t\techo $out;\n\t}", "function finalizeTopSection() {\n\t$returnVal = \"\";\n\t$returnVal .= '<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css\" integrity=\"sha384-TX8t27EcRE3E/ihU7zmQxVncDAy5uIKz4rEkgIXeM>';\n\t$returnVal .= \"<!doctype html>\\n\";\n\t$returnVal .= \"<html lang=\\\"en\\\">\\n\";\n\t$returnVal .= \"<head><title>\";\n\t$returnVal .= $this->_title;\n\t$returnVal .= \"</title>\\n\";\n $returnVal .= $this->_headSection;\n\t$returnVal .= \"</head>\\n\";\n\t$returnVal .= \"<body>\\n\";\n\n\t$this->_top = $returnVal;\n\n}", "protected function firstLine( string $topName ): void {\n\t\t$this->e->phpPrologue( 'Wikimedia\\IDLeDOM\\Stub' );\n\n\t\t$this->nl( 'use Exception;' );\n\t\t$this->e->emitMarker( 'UseStatements' );\n\t\t$this->nl();\n\t\t$this->nl( \"trait $topName {\" );\n\n\t\t$parent = $this->gen->def( $topName )['inheritance'] ?? null;\n\t\tforeach ( $this->gen->mixins( $topName ) as $m ) {\n\t\t\t// Emit as comment for use by test framework. But each stub\n\t\t\t// should only declare its own methods, not recursively define\n\t\t\t// methods of a parent\n\t\t\tif ( $m !== $parent ) {\n\t\t\t\t$this->nl( \"// use \\\\Wikimedia\\\\IDLeDOM\\\\Stub\\\\$m;\" );\n\t\t\t}\n\t\t}\n\t\t$this->nl();\n\t\t$this->nl( '// Underscore is used to avoid conflicts with DOM-reserved names' );\n\t\t$this->nl( '// phpcs:disable PSR2.Methods.MethodDeclaration.Underscore' );\n\t\t$this->nl( '// phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName' );\n\t\t$this->nl();\n\t\t$this->nl( '/**' );\n\t\t$this->nl( ' * @return Exception' );\n\t\t$this->nl( ' */' );\n\t\t$this->nl( 'abstract protected function _unimplemented() : Exception;' );\n\t\t$this->nl();\n\t\t$this->nl( '// phpcs:enable' );\n\t\t$this->nl();\n\t}", "public function hr() {\n return ('--------------------------------------------------------------------');\n }", "function build_html_table_top(){\n\t\t\n\t\t$output = '';\n\t\t\n\t\t$output .= '\n\t\t\t\t\t<table style=\"border: 1px solid #FFFFFF; width:100%; table-layout: fixed;\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 11%;\"><font color=\"ffd700\">Date Visited</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 11%;\"><font color=\"ffd700\">IP Address</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 7%;\"><font color=\"ffd700\">OS</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 7%;\"><font color=\"ffd700\">Browser Name</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 8%;\"><font color=\"ffd700\">Browser Version</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 15%;\"><font color=\"ffd700\">Referer Page</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 15%;\"><font color=\"ffd700\">Request Page</font></th>\n\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\n\t\treturn $output;\n\t\t\n\t}", "function generateTitle($header, $data)\n\t{\n\t\t$this->SetFillColor(63,73,204);\n\t\t$this->SetTextColor(255);\n\t\t$this->SetDrawColor(18,0,0);\n\t\t$this->SetLineWidth(.1);\n\t\t$this->SetFont('','B');\n\t\t// Header\n\t\t$w = array(70, 25, 30, 20,30,35,25);\n\t\tfor($i=0;$i<count($header);$i++)\n\t\t\t$this->Cell($w[$i],7,$header[$i],1,0,'C',true);\n\t\t$this->Ln();\n\t\t// Color and font restoration\n\t\t$this->SetFillColor(224,235,255);\n\t\t$this->SetTextColor(0);\n\t\t$this->SetFont('');\n\t\t// Data\n\t\t$fill = false;\n\t\tforeach($data as $row)\n\t\t{\n\t\t\t$this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);\n/*\t\t\t$this->Cell($w[1],6,$row[1],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[2],6,$row[2],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[3],6,$row[3],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[4],6,$row[4],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[5],6,$row[5],'LR',0,'C',$fill);*/\n\t\t\t$this->Ln();\n\t\t\t$fill = !$fill;\n\t\t}\n\t\t// Closing line\n\t\t$this->Cell(array_sum($w),0,'','T');\n\t}", "function print_A_Line( $AText )\r\n\t{\r\n\t\tstatic $iCount = 1;\r\n\t\r\n\t\techo \"<h1>\" . $iCount . \".\" . $AText .\"</h1>\\n\";\r\n\t\t$iCount ++;\r\n\t}", "public function Header(){\n $this->Image(base_url().'vendors/images/admin-text-dark.png',13,14,0);\n $this->SetFont('Arial','B',25);\n $this->Cell(0,14,'FACTURA DE PAGO',0,0,'C');\n $this->Ln(20);\n }", "public function getStartLine()\n\t{\n\t\treturn null;\n\t}", "public function emptyLine()\n\t{\n\t\t//return \"\\t\\t\\t\".'<td colspan=\"2\">&nbsp;</td>'.\"\\n\";\n\t}", "function drawHeader(){\n switch ($this->doing){\n case 'budget_byProjects':\n case 'myguests':\n if (!(@$this->t instanceof b_table)){\n\t$this->dbg('CANCEL header');\n\t$this->t = new b_table_dummy();\n }\n break;\n\n default:\n parent::drawHeader();\n break;\n }\n }", "public function drawEndHeaderPanel()\r\n {\r\n echo '</div>';\r\n }", "function magazinevibe_edge_get_footer_top() {\n\n\t\t$parameters = array();\n\n\t\t$parameters['footer_in_grid'] = (magazinevibe_edge_options()->getOptionValue('footer_in_grid') == 'yes') ? true : false;\n\t\t$parameters['footer_top_classes'] = (magazinevibe_edge_options()->getOptionValue('footer_in_grid') == 'yes') ? '' : 'edgtf-footer-top-full';\n\t\t$parameters['footer_top_columns'] = magazinevibe_edge_options()->getOptionValue('footer_top_columns');\n\n\t\tmagazinevibe_edge_get_module_template_part('templates/parts/footer-top', 'footer', '', $parameters);\n\t}", "function generate_top_bar() {\n\t\tif ( ! is_active_sidebar( 'top-bar' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<div <?php generate_do_element_classes( 'top_bar' ); ?>>\n\t\t\t<div class=\"inside-top-bar<?php if ( 'contained' == generate_get_option( 'top_bar_inner_width' ) ) echo ' grid-container grid-parent'; ?>\">\n\t\t\t\t<?php dynamic_sidebar( 'top-bar' ); ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "public function Header() {\r\n\t\t$this->SetLeftMargin( 20 );\r\n\t\t$this->SetFillColor( 255, 255, 255 );\r\n\t\t\r\n\t\tswitch ($this->plantilla) {\r\n\t\t\tcase 1:\r\n\t\t\t$this->EncabezadoFBM1_Info();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t$this->EncabezadoFBM1();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 3:\r\n\t\t\t$this->EncabezadoFBM2();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 4:\r\n\t\t\t$this->EncabezadoFBM3();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 5:\r\n\t\t\t//$this->SetLeftMargin( 10 );\r\n\t\t\t$y1 = $this->getY();\r\n\t\t\t$x1 = $this->getX();\r\n\t\t\t$this->Celda(75, 23, '', 1, 0, '', true);\r\n\t\t\t$y2 = $this->getY();\r\n\t\t\t$x2 = $this->getX();\r\n\t\t\t$this->Celda(150, 23, '', 1, 0, '', true);\r\n\t\t\t$y3 = $this->getY();\r\n\t\t\t$x3 = $this->getX();\r\n\t\t\t$this->Celda(28, 23, '', 1, 1, '', true);\r\n\t\t\t$y4 = $this->getY();\r\n\t\t\t$x4 = $this->getX();\r\n\t\t\t$this->setY($y1);\r\n\t\t\t$this->setX($x1);\r\n\t\t\t$this->Image( 'images/logo_medium.png', 22, 11, 68 );\r\n\t\t\t$this->setY($y2+5);\r\n\t\t\t$this->setX($x2+1);\r\n\t\t\t$this->Formato( 'Helvetica', 'B', 10 );\r\n\t\t\t$this->Celda(162, 6, 'Formulario B.M.4', 0, 1, 'C', true);\r\n\t\t\t$this->Formato( 'Helvetica', '', 8 );\r\n\t\t\t$this->setX($x2+1);\r\n\t\t\t$this->Celda(162, 8, 'Resumen de la Cuenta de Bienes', 0, 1, 'C', true);\r\n\t\t\t$this->setY($y3);\r\n\t\t\t$this->setX($x3);\r\n\t\t\t$this->Celda(31, 8, 'HOJA Nro.', 1, 1, 'C', true);\r\n\t\t\t$this->setX($x3);\r\n\t\t\t$this->Celda(31, 15, $this->header['hoja'], 1, 1, 'C', true);\r\n\t\t\t$this->setY($y4);\r\n\t\t\t$this->setX($x4);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 6:\r\n\t\t\t$this->EncabezadoFBM5();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function updateRootline() {}", "function Header()\n{\n\t$this->Image('recursos/logo.jpg', 20, 20, 180 );\n\t$this->SetFont('Arial','',10);\n\t$this->Text(20,14,'',0,'C', 0);\n\t$this->Ln(30);\n}", "public function Header() {\r\n $this->varcave->logger->debug('Create PDF top header');\r\n\t\tif ($this->noheader){\r\n\t\t\treturn true;\r\n\t\t}\r\n // Logo\r\n\t\t$this->setFont($this->font, 'BI', 8, '', 'false');\r\n\t\t$this->Image($this->headerImg,4,4,170);\r\n\t\t\r\n\t\t//text box after header image\r\n\t\t$this->RoundedRect(172,4,35,10,3.5,'D');\r\n\t\t$this->SetXY(173,5);\r\n\t\t$this->cell(0,3, LNE::pdf_caveRef . ': ' . $this->cavedata['caveRef'],0);\r\n\t\t$this->SetXY(173,9);\r\n\t\t//If pagegroup is on set group page number, or set a global PDF page number \r\n\t\tif ( $this->pagegroups == false )\r\n\t\t{\r\n\t\t\t$this->cell(0,3,LNE::pdf_page. ': '. $this->getAliasNumPage() . '/' . $this->getAliasNbPages(),0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->cell(0,3,LNE::pdf_page .': '. $this->getPageGroupAlias(). '-'.$this->getPageNumGroupAlias() ,0);\r\n\t\t}\r\n\t\t\r\n }", "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nOrganizational Units\nMAINHEADING;\n }", "public function Header(){\n if(count($this->_groups)){\n $this->SetFont('Arial','B',8);\n $this->SetDrawColor(160,160,160);\n $this->SetTextColor(160,160,160);\n $grp = array();\n foreach(array_keys($this->_groups) as $field){\n if(empty($this->_groups[$field][\"currentMsg\"])||!$this->_changePage){\n $grp[] = \"{grp_$field}\";\n }else{\n $grp[] = $this->_groups[$field][\"currentMsg\"];\n }\n }\n $grp = join($grp,\" / \");\n $this->Cell(0,4,$grp,'B',1,'L');\n $this->Ln(4);\n }\n $date = new Date();\n $this->SetTextColor(100);\n $this->SetFillColor(245);\n $this->SetY(4);\n $this->SetFont('Arial','B',10);\n //$str = \"Elaborado el \".$date->getYear().\" - \".$date->getMonthName().\" - \".$date->getDay().\" del \".date(\"H:i:s\");\n $this->ln();\n $this->ln();\n $this->ln();\n $this->ln();\n $str = \"Fecha: \".$date->getYear().\" - \".$date->getMonth().\" - \".$date->getDay();\n $x = $this->GetStringWidth($str);\n $this->Cell($x+10,5,$str,0,0,'L');\n // $this->Cell(0,5,Session::getData(\"nomcaj\"),\"B\",\"R\",'R');\n $this->ln();\n $this->ln();\n $this->ln();\n $this->SetTextColor(0);\n $this->SetFont('Arial','B',12);\n if(is_array($this->_titulo)){\n foreach($this->_titulo as $titulo){\n $w=$this->GetStringWidth($titulo);\n $this->SetX(($this->w - $w) / 2);\n $this->Cell($w,5,$titulo,0,1,'C');\n }\n }else{\n $w=$this->GetStringWidth($this->_titulo);\n $this->SetX(($this->w - $w) / 2);\n $this->Cell($w,5,$this->_titulo,0,1,'C');\n }\n $this->Ln();\n $this->Ln();\n $this->SetTextColor(100);\n $this->SetFont('Arial','',9);\n $this->Cell(0,2,'',0,1,'C');\n //$this->Image(\"public/img/portal/logo_mercurio_report.jpg\",14,11,60,13);\n //$this->Image(\"public/img/portal/logo_sys_report.jpg\",140,11,60,15);\n if(!count($this->_groups)||$this->_changePage){\n $this->__Header();\n $this->_changePage = false;\n }else{\n $this->__Header();\n }\n }", "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nGROUP BY Command\nMAINHEADING;\n }", "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nScripting in Bash Shell\nMAINHEADING;\n }", "private function initializeSecondLine()\n {\n foreach ($this->arrDefFromXmlFile['Field'] as $value) {\n $this->strSecondLine .= $value['Label'] . ';';\n }\n\n // Letztes Semikolon abschneiden.\n $this->strSecondLine = substr($this->strSecondLine, 0, -1);\n\n // Zeilenende einfügen.\n $this->strSecondLine = $this->strSecondLine . PHP_EOL;\n\n }", "function Header(){\r\n\t\t//Aqui va el encabezado\r\n\t\tif ($this->iSector==98){\r\n\t\t\tp_FuenteGrandeV2($this,'B');\r\n\t\t\t$this->Cell($this->iAnchoLibre,5,utf8_decode('Información de depuración'), 0, 0, 'C');\r\n\t\t\t$this->Ln();\r\n\t\t\treturn;\r\n\t\t\t}\r\n\t\t$iConFondo=0;\r\n\t\tif ($this->sFondo!=''){\r\n\t\t\tif (file_exists($this->sFondo)){\r\n\t\t\t\t$this->Image($this->sFondo, 0, 0, $this->iAnchoFondo);\r\n\t\t\t\t$iConFondo=1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t$yPos=$this->GetY();\r\n\t\tif ($yPos<$this->iBordeEncabezado){\r\n\t\t\t$this->SetY($this->iBordeEncabezado);\r\n\t\t\t}\r\n\t\tif ($iConFondo==0){\r\n\t\t\tp_TituloEntidad($this, false);\r\n\t\t\t}else{\r\n\t\t\tp_FuenteGrandeV2($this,'B');\r\n\t\t\t}\r\n\t\tif ($this->iReporte==1902){\r\n\t\t\t//Ubique aqui los componentes adicionales del encabezado\r\n\t\t\t$this->Cell($this->iAnchoLibre,5,'Eventos '.$this->sRefRpt, 0, 0, 'C');\r\n\t\t\t$this->Ln();\r\n\t\t\t}\r\n\t\t$yPos=$this->GetY();\r\n\t\tif ($yPos<$this->iBordeSuperior){\r\n\t\t\t$this->SetY($this->iBordeSuperior);\r\n\t\t\t}\r\n\t\t}", "public function getLeaderLine() {}", "function bethel_do_header_right_top() {\n\tgenesis_widget_area ('header-right-top', array ('before' => '<div id=\"bethel-header-right-top\">', 'after' => '</div>'));\n}", "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nOverview of the Android Ecosystem\nMAINHEADING;\n }", "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nSQL Basics\nMAINHEADING;\n }" ]
[ "0.6666886", "0.6521405", "0.64529616", "0.6407904", "0.62402135", "0.6112981", "0.60777473", "0.6031556", "0.602862", "0.60093904", "0.5955672", "0.5924286", "0.59222615", "0.5911457", "0.58768445", "0.5871204", "0.5857616", "0.58297503", "0.5819533", "0.5818537", "0.57886845", "0.57842565", "0.5761137", "0.5731543", "0.5730572", "0.572781", "0.57240367", "0.57183415", "0.57037246", "0.5681267", "0.5680393", "0.56781036", "0.56772774", "0.5675396", "0.5664774", "0.5660541", "0.5659273", "0.5595076", "0.5587976", "0.558657", "0.5570959", "0.5569965", "0.5567806", "0.55651844", "0.55643976", "0.5553567", "0.5552359", "0.5544572", "0.5535537", "0.55293816", "0.5527774", "0.55273193", "0.55231106", "0.55131716", "0.5502024", "0.5500137", "0.5499499", "0.5482196", "0.5482158", "0.54801214", "0.5479336", "0.54790485", "0.5466488", "0.54583156", "0.5454138", "0.54359955", "0.54196244", "0.54160345", "0.54140556", "0.540379", "0.540158", "0.5399249", "0.5393817", "0.53936327", "0.5387156", "0.5378397", "0.53702027", "0.5369279", "0.53449464", "0.53440994", "0.533767", "0.53354347", "0.5333611", "0.53318083", "0.53217584", "0.53053916", "0.5302869", "0.5292548", "0.5291572", "0.5290241", "0.5288234", "0.5278486", "0.5277123", "0.5273534", "0.52645534", "0.52626884", "0.526122", "0.5255586", "0.5254892", "0.524805", "0.5246315" ]
0.0
-1
Given the dialog rows, create the dialog using field templates to create individual rows
function calculate_dialog($drows, $value, $title, $langtag, $formtype = 'table') { require_once 'modules/Checklist/fillout.php'; $tlist = getTranslatables($langtag); $tout = array(); $this->importall = "{$this->baseurl}/audit/importall"; $this->import2lab = "{$this->baseurl}/audit/import2lab"; $this->cancelimport = "{$this->baseurl}/audit/cancelimport"; $title = $drows[0]['title']; $tout[] = <<<"END" <div style="margin-left:200px;"><h1 style="margin-bottom:10px;">{$title} <button id="helpbutton" onclick="return toggleHelp();">Help</button> </h1> </div> <div style="margin:15px 0;"> END; $tout[] = '<table border=0 style="width:900px;">'; $hid = array(); foreach($drows as $row) { $pos = $row['position']; // if ($pos ==0) continue; $type = $row['field_type']; $arow = array(); $field_label = get_lang_text($row['field_label'], '', ''); // , $row ['ltdefault'], $row ['ltlang'] ); $arow['field_label'] = $field_label . ':'; $arow['varname'] = $row['field_name']; $varname = $arow['varname']; $arow['baseurl'] = $this->baseurl; $arow['field_length'] = 0; //$row['field_length']; $info = $row['info']; switch ($type) { case '' : logit("ROW: " . print_r($row, true)); break; case 'hidden' : $val = get_arrval($value, $varname, ''); $hid[] = "<input type=\"hidden\" name=\"{$varname}\" value=\"{$val}\">"; break; case 'file' : $tout[] = <<<"END" <tr> <td class="n f right" style="width:200px;"> <td class="n f" style="width:600px;"> <input type="hidden" name="MAX_FILE_SIZE" value="1000000" /> {$field_label}: <input name="uploadedfile" type="file" /> </td> </tr> END; break; case 'text' : $info = str_replace('"', '\"', $info); // logit("TEXT: {$info}"); $audit = $this->audit; eval("\$lines = \"$info\"; "); $tout[] = <<<"END" <tr> <td class="n f right" style="width:200px;"> <td class="n f" style="width:600px;"><div id="help2" style="font-size:1.4em;line-height:1.3em;">{$lines}</div></td> </tr> END; break; case 'info' : $tout[] = <<<"END" <tr> <td class="n f right" style="width:200px;"> <td class="n f" style="width:600px;"><div id="help" style="display:none;">{$info}</div></td> </tr> END; break; case 'info2' : $tout[] = <<<"END" <tr> <td class="n f right" style="width:200px;"> <td class="n f" style="width:600px;"><div id="help2" style="">{$info}</div></td> </tr> END; break; case 'heading' : $tout[] = <<<"END" <tr> <td class="n f right" style="width:50px;"> <td class="n f" style="width:750px;"><h3>{$field_label}</h3></td> </tr> END; break; case 'submit_button' : $arow['field_label'] = $field_label; //$arow['baseurl'] = $baseurl; $arow['homeurl'] = "{$this->baseurl}/audit/main"; // logit("HURL: {$arow['homeurl']}"); $field_label = ''; default : $inp = call_user_func("dialog_{$type}", $arow, $value, $tlist); $tout[] = <<<"END" <tr> <td class="n f right" style="width:300px;"> <label for="{$varname}" style="" class="inp">{$field_label}</label> </td><td class="n f" style="width:500px;">{$inp}</td> </tr> END; } } $tout[] = '</table></div></div>'; $tout[] = implode("\n", $hid); // logit('dialog: '. print_r($tout, true)); return implode("\n", $tout); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function make_form_row(){\n\t\t$index = $this->col_index;\n\t\t# remove the * at the start of the first line\n\t\t$this->col_data = preg_replace(\"/^\\*/\",\"\",$this->col_data);\n\t\t# split the lines and remove the * from each. The value in each line goes into the array $values\n\t\t$values = preg_split(\"/\\n\\*?/\", $this->col_data);\n\t\t# pad the values array to make sure there are 3 entries\n\t\t$values = array_pad($values, 3, \"\");\n\t\t\n\t\t/*\n\t\tmake three input boxes. TableEdit takes row input from an input array named field a \n\t\tvalue for a particular field[$index] can be an array\n\t\t\tfield[$index][] is the field name\n\t\t\t40 is the length of the box\n\t\t\t$value is the value for the ith line\n\t\t \n\t\t */\n\t\t $form = ''; #initialize\n\t\t foreach($values as $i => $value){\n\t\t\t$form .= \"$i:\".XML::input(\"field[$index][]\",40,$value, array('maxlength'=>255)).\"<br>\\n\";\n\t\t}\n\t\treturn $form;\n\t\n\t}", "function make_form_row(){\n\t\tswitch($this->fieldType){\n\t\t\tcase 'id':\n\t\t\t\treturn $this->obo_id();\n\t\t\t\tbreak;\n\t\t\tcase 'term':\n\t\t\t\treturn $this->obo_term();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$form = parent::make_form_row();\n\t\t\n\t\t}\n\t\treturn $form;\n\t\n\t}", "private function _make_row($data) {\n $options = array(\n \"id\" => $data->fid_cust\n );\n\n $query = $this->Master_Customers_model->get_details($options)->row();\n $value = $this->Sales_Invoices_model->get_invoices_total_summary($data->id);\n $originalDate = $data->inv_date;\n $newDate = date(\"d-M-Y\", strtotime($originalDate));\n $row_data = array(\n \n anchor(get_uri(\"sales/s_invoices/view/\" . $data->id.\"/\".str_replace(\"/\", \"-\", $data->code)), \"#\".$data->code),\n modal_anchor(get_uri(\"master/customers/view/\" . $data->fid_cust), $query->name, array(\"class\" => \"view\", \"title\" => \"Customers \".$query->name, \"data-post-id\" => $data->fid_cust)),\n $this->_get_invoices_status_label($data),\n $data->email_to,\n $newDate,\n $data->currency,\n to_currency($value->invoice_total)\n\n );\n\n if($data->status != \"posting\"){\n $row_data[] = anchor(get_uri(\"sales/s_invoices/edit/\".$data->id), \"<i class='fa fa-pencil'></i>\", array(\"class\" => \"edit\", \"title\" => lang('edit_client')))\n . js_anchor(\"<i class='fa fa-times fa-fw'></i>\", array('title' => lang('delete_client'), \"class\" => \"delete\", \"data-id\" => $data->id, \"data-action-url\" => get_uri(\"sales/s_invoices/delete\"), \"data-action\" => \"delete\"));\n\n }\n $row_data[] = anchor(get_uri(\"sales/s_invoices/view/\").$data->id, \"<i class='fa fa-eye'></i>\", array(\"class\" => \"view\", \"title\" => lang('view'), \"data-post-id\" => $data->id));\n\n return $row_data;\n }", "function buildRows(&$rows ) {\n require_once 'CRM/Utils/HilreportsUtils.php';\n $this->modifyColumnHeaders( );\n $this->calculateAantalContacts();\n $this->setCustomGroupIdExtraGegevens();\n $rowNumber = 0;\n /*\n * eerste rij met totalen\n */\n $rows[$rowNumber]['label'] = \"<strong>TOTAAL:</strong>\";\n $rows[$rowNumber]['aantal'] = $this->_aantalContacts;\n $rows[$rowNumber]['percentage'] = \"100%\";\n $rowNumber++;\n $this->_aantalRijen++;\n /*\n * build rows for land van herkomst\n */\n $this->insertEmptyLine($rowNumber, $rows);\n $this->insertHeaderLine($rowNumber, $rows, \"Land van herkomst:\");\n $this->addRowsLandVanHerkomst($rows, $rowNumber);\n /*\n * build rows for economische status\n */\n $this->insertEmptyLine($rowNumber, $rows);\n $this->insertHeaderLine($rowNumber, $rows, \"Economische status\");\n $this->addRowsOptionValue($rows, $rowNumber, \"Economische status\", \"econ_status\");\n /*\n * build rows for burgerlijke staat\n */\n $this->insertEmptyLine($rowNumber, $rows);\n $this->insertHeaderLine($rowNumber, $rows, \"Burgerlijke staat\");\n $this->addRowsOptionValue($rows, $rowNumber, \"Burgerlijke staat\", \"burg_staat\");\n /*\n * build rows for ethnisch culturele achtergrond\n */\n $this->insertEmptyLine($rowNumber, $rows);\n $this->insertHeaderLine($rowNumber, $rows, \"Ethnisch/culturele achtergrond\");\n $this->addRowsOptionValue($rows, $rowNumber, \"Ethnisch/culturele achtergrond\", \"cult_ethn\");\n /*\n * build rows for nationaliteit\n */\n $this->insertEmptyLine($rowNumber, $rows);\n $this->insertHeaderLine($rowNumber, $rows, \"Nationaliteit\");\n $this->addRowsText($rows, $rowNumber, \"nationaliteit\");\n /*\n * build rows for geslacht\n */\n $this->_optionGroupId = 3;\n $this->insertEmptyLine($rowNumber, $rows);\n $this->insertHeaderLine($rowNumber, $rows, \"Geslacht:\");\n $this->addRowsOptionValue($rows, $rowNumber, \"\", \"geslacht\");\n }", "public static function formrow(){\n\n\n $forms = \"<tr class='row100 body'>\\n\";\n $forms .= \"<td class='cell100 column1'>\";\n return $forms;\n }", "private function fillTemplate() {\n\t\tglobal $tpl;\n\t\t$tpl->addCss('./Customizing/global/plugins/Services/Repository/RepositoryObject/Review/templates/default/css/Review.css');\n\t\t$path_to_il_tpl = ilPlugin::getPluginObject(IL_COMP_SERVICE, 'Repository', 'robj', 'Review')->getDirectory();\n\t\t$custom_tpl = new ilTemplate(\"tpl.matrix_row.html\", true, true, $path_to_il_tpl);\n foreach ((array) $this->checkboxes as $chbox) {\n\t\t\t$chbox->insert($custom_tpl);\n }\n\n\t\t$this->setHTML($custom_tpl->get());\n }", "public function display_rows() {\n\n\t\t// Get the records registered in the prepare_items method\n\t\t$records = $this->items;\n\n\t\t// Get the columns registered in the get_columns and get_sortable_columns methods\n\t\tlist( $columns, $hidden ) = $this->get_column_info();\n\n\t\t// Loop for each record\n\t\tif ( ! empty( $records ) ) {\n\t\t\tforeach ( $records as $rec ) {\n\n\t\t\t\t// Open the line\n\t\t\t\techo '<tr id=\"record_' . $rec->ID . '\">';\n\t\t\t\tforeach ( $columns as $column_name => $column_display_name ) {\n\n\t\t\t\t\t// Style attributes for each col\n\t\t\t\t\t$class = \"class='$column_name column-$column_name'\";\n\t\t\t\t\t$style = '';\n\t\t\t\t\tif ( in_array( $column_name, $hidden ) ) {\n\t\t\t\t\t\t$style = ' style=\"display:none;\"';\n\t\t\t\t\t}\n\t\t\t\t\t$attributes = $class . $style;\n\n\t\t\t\t\tswitch ( $column_name ) {\n\t\t\t\t\t\tcase 'title':\n\t\t\t\t\t\t\t$edit_link = admin_url( 'admin.php?page=wo_edit_client&id=' . $rec->ID );\n\t\t\t\t\t\t\techo '<td ' . $attributes . '><strong><a href=\"' . $edit_link . '\" title=\"Edit\">' . stripslashes( $rec->post_title ) . '</a></strong>\n\t\t\t\t\t\t<div class=\"row-actions\">\n\t\t\t\t\t\t<span class=\"edit\"><a href=\"' . $edit_link . '\" title=\"' . __( 'Edit Client', 'wp-oauth' ) . '\">' . __( 'Edit', 'wp-oauth' ) . '</a> | </span>\n\t\t\t\t\t\t<span class=\"trash\"><a class=\"submitdelete\" title=\"' . __( 'delete this client', 'wp-oauth' ) . '\" onclick=\"wo_remove_client(\\'' . $rec->ID . '\\');\" href=\"#\">' . __( 'Delete', 'wp-oauth' ) . '</a> </span>';\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// case \"user_id\": echo '<td '.$attributes.'>'.stripslashes($rec->user_id).'</td>'; break;\n\t\t\t\t\t\tcase 'client_id':\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . get_post_meta( $rec->ID, 'client_id', true ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Close the line\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t}\n\t}", "function bot_wtc_output_rows() // outputs the rows for the html table in the bot_wtc_tab\n{\n\tglobal $bot_items;\n\n\t$selectInput_for_position = array('insertBefore'=>'before','insertAfter'=>'after'); // position values for the txp function selectInput\n\t$db_values = bot_wtc_fetch_db(); // array of values from the db\n\n $destination_selectInput = bot_all_items_selectinput();\n\t$items_selectInput = bot_contextual_selectinput();\n\n\t// builds rows for new item sections list\n\t$sections= bot_get_sections(); // get sections array\n\t$new_item_sections_rows = '';\n\tforeach ($sections as $key => $value) {\n\t\t$new_item_sections_row = '<label>'.checkbox('new_item_sections[]', $key, '0').$value.'</label><br />';\n\t\t$new_item_sections_rows .= $new_item_sections_row;\n }\n $new_item_sections_rows .= '<p ><a href=\"#\" class=\"bot_all\">'.gTxt(\"all\").'</a> | <a href=\"#\" class=\"bot_none\">'.gTxt(\"none\").'</a></p>'; // hide all/none\n\n\t// new item insertion\n\t$rows = \"\";\n\t$input_row = tr(\n\t\ttd(selectInput('new_item',bot_contextual_selectinput(), '', '1'), '', 'bot_hilight')\n\t\t.td(selectInput('new_item_position', $selectInput_for_position, '', '1'))\n\t\t.td(selectInput('new_item_destination',bot_all_items_selectinput(), '', '1'))\n\t\t.td('<p><a href=\"#\" class=\"bot_push\">'.gTxt(\"tag_section_list\").'</a></p><div class=\"bot_collapse\">'.$new_item_sections_rows.'</div>')\n\t\t.td(finput('text','new_item_class', ''))\n\t\t.td()\n\t\t);\n\t\t$rows .= $input_row;\n\n\t// other rows - output if at least one record was already set\n\tif ($db_values){\n\t\tfor ($i = 0; $i < count( $db_values ); $i++){\n\t\t\t// data for \"sections to show\" selectinput - decides wether a section is checked or not\n\t\t\t$bot_hide_in_this_sections_array = explode('|', $db_values[$i]['sections']);\n\t\t\t$item_sections_rows = '';\n\t\t\tforeach ($sections as $key => $value) { // if section is in db mark as checked\n\t\t\t $checked = in_array($key, $bot_hide_in_this_sections_array) ? '1': '0';\n\t\t\t\t$item_sections_row = '<label>'.checkbox('bot_wtc_sections_for_id_'.$db_values[$i]['id'].'[]', $key, $checked).$value.'</label><br />';\n\t\t\t\t$item_sections_rows .= $item_sections_row;\n\t\t }\n\t\t $item_sections_rows .= '<p><a href=\"#\" class=\"bot_all\">'.gTxt(\"all\").'</a> | <a href=\"#\" class=\"bot_none\">'.gTxt(\"none\").'</a></p>'; // hide all/none\n\t\t\t$single_row = tr(\n\t\t\ttd(selectInput('item[]',bot_contextual_selectinput($db_values[$i]['item']), $db_values[$i]['item'],'0'), '', 'bot_hilight')\n\t\t\t.td(selectInput('item_position[]', $selectInput_for_position, $db_values[$i]['position'], '1'))\n\t\t\t.td(selectInput('item_destination[]',bot_all_items_selectinput(), $db_values[$i]['destination'],'1'))\n \t\t\t.td('<p><a href=\"#\" class=\"bot_push\">'.gTxt(\"tag_section_list\").'</a></p><div class=\"bot_collapse\">'.$item_sections_rows.'</div>')\n\t\t\t.td(finput('text', 'item_class[]', $db_values[$i]['class']))\n\t\t\t.td(checkbox('bot_delete_id[]', $db_values[$i]['id'], '0').'<label for=\"bot_delete_id\"> '.gTxt('delete').'</label>'))\n\t\t\t.hInput('bot_wtc_id[]', $db_values[$i]['id']);\n\n\t\t\t$rows .= $single_row;\n\t\t}\n\t};\n\treturn $rows;\n}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->AddUrl = $this->GetAddUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\t\t$this->ListUrl = $this->GetListUrl();\n\t\t$this->SetupOtherOptions();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// empleado_id\n\t\t// codigo\n\t\t// cui\n\t\t// nombre\n\t\t// apellido\n\t\t// direccion\n\t\t// departamento_origen_id\n\t\t// municipio_id\n\t\t// telefono_residencia\n\t\t// telefono_celular\n\t\t// fecha_nacimiento\n\t\t// nacionalidad\n\t\t// estado_civil\n\t\t// sexo\n\t\t// igss\n\t\t// nit\n\t\t// licencia_conducir\n\t\t// area_id\n\t\t// departmento_id\n\t\t// seccion_id\n\t\t// puesto_id\n\t\t// observaciones\n\t\t// tipo_sangre_id\n\t\t// estado\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// codigo\n\t\t$this->codigo->ViewValue = $this->codigo->CurrentValue;\n\t\t$this->codigo->ViewCustomAttributes = \"\";\n\n\t\t// cui\n\t\t$this->cui->ViewValue = $this->cui->CurrentValue;\n\t\t$this->cui->ViewCustomAttributes = \"\";\n\n\t\t// nombre\n\t\t$this->nombre->ViewValue = $this->nombre->CurrentValue;\n\t\t$this->nombre->ViewCustomAttributes = \"\";\n\n\t\t// apellido\n\t\t$this->apellido->ViewValue = $this->apellido->CurrentValue;\n\t\t$this->apellido->ViewCustomAttributes = \"\";\n\n\t\t// direccion\n\t\t$this->direccion->ViewValue = $this->direccion->CurrentValue;\n\t\t$this->direccion->ViewCustomAttributes = \"\";\n\n\t\t// departamento_origen_id\n\t\tif (strval($this->departamento_origen_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`departamento_origen_id`\" . ew_SearchString(\"=\", $this->departamento_origen_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `departamento_origen_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento_origen`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->departamento_origen_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->departamento_origen_id->ViewValue = $this->departamento_origen_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->departamento_origen_id->ViewValue = $this->departamento_origen_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->departamento_origen_id->ViewValue = NULL;\n\t\t}\n\t\t$this->departamento_origen_id->ViewCustomAttributes = \"\";\n\n\t\t// municipio_id\n\t\tif (strval($this->municipio_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`municipio_id`\" . ew_SearchString(\"=\", $this->municipio_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `municipio_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `municipio`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->municipio_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->municipio_id->ViewValue = $this->municipio_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->municipio_id->ViewValue = $this->municipio_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->municipio_id->ViewValue = NULL;\n\t\t}\n\t\t$this->municipio_id->ViewCustomAttributes = \"\";\n\n\t\t// telefono_residencia\n\t\t$this->telefono_residencia->ViewValue = $this->telefono_residencia->CurrentValue;\n\t\t$this->telefono_residencia->ViewCustomAttributes = \"\";\n\n\t\t// telefono_celular\n\t\t$this->telefono_celular->ViewValue = $this->telefono_celular->CurrentValue;\n\t\t$this->telefono_celular->ViewCustomAttributes = \"\";\n\n\t\t// fecha_nacimiento\n\t\t$this->fecha_nacimiento->ViewValue = $this->fecha_nacimiento->CurrentValue;\n\t\t$this->fecha_nacimiento->ViewValue = ew_FormatDateTime($this->fecha_nacimiento->ViewValue, 7);\n\t\t$this->fecha_nacimiento->ViewCustomAttributes = \"\";\n\n\t\t// nacionalidad\n\t\tif (strval($this->nacionalidad->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`nacionalidad_id`\" . ew_SearchString(\"=\", $this->nacionalidad->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `nacionalidad_id`, `nacionalidad` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `nacionalidad`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->nacionalidad, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->nacionalidad->ViewValue = $this->nacionalidad->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->nacionalidad->ViewValue = $this->nacionalidad->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->nacionalidad->ViewValue = NULL;\n\t\t}\n\t\t$this->nacionalidad->ViewCustomAttributes = \"\";\n\n\t\t// estado_civil\n\t\t$this->estado_civil->ViewValue = $this->estado_civil->CurrentValue;\n\t\tif (strval($this->estado_civil->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`estado_civil_id`\" . ew_SearchString(\"=\", $this->estado_civil->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `estado_civil_id`, `estado_civil` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estado_civil`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->estado_civil, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->estado_civil->ViewValue = $this->estado_civil->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->estado_civil->ViewValue = $this->estado_civil->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->estado_civil->ViewValue = NULL;\n\t\t}\n\t\t$this->estado_civil->ViewCustomAttributes = \"\";\n\n\t\t// sexo\n\t\t$this->sexo->ViewValue = $this->sexo->CurrentValue;\n\t\tif (strval($this->sexo->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`sexo_id`\" . ew_SearchString(\"=\", $this->sexo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `sexo_id`, `sexo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sexo`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->sexo, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->sexo->ViewValue = $this->sexo->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->sexo->ViewValue = $this->sexo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->sexo->ViewValue = NULL;\n\t\t}\n\t\t$this->sexo->ViewCustomAttributes = \"\";\n\n\t\t// igss\n\t\t$this->igss->ViewValue = $this->igss->CurrentValue;\n\t\t$this->igss->ViewCustomAttributes = \"\";\n\n\t\t// nit\n\t\t$this->nit->ViewValue = $this->nit->CurrentValue;\n\t\t$this->nit->ViewCustomAttributes = \"\";\n\n\t\t// licencia_conducir\n\t\t$this->licencia_conducir->ViewValue = $this->licencia_conducir->CurrentValue;\n\t\t$this->licencia_conducir->ViewCustomAttributes = \"\";\n\n\t\t// area_id\n\t\t$this->area_id->ViewValue = $this->area_id->CurrentValue;\n\t\tif (strval($this->area_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`area_id`\" . ew_SearchString(\"=\", $this->area_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `area_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `area`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->area_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->area_id->ViewValue = $this->area_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->area_id->ViewValue = $this->area_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->area_id->ViewValue = NULL;\n\t\t}\n\t\t$this->area_id->ViewCustomAttributes = \"\";\n\n\t\t// departmento_id\n\t\tif (strval($this->departmento_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`departamento_id`\" . ew_SearchString(\"=\", $this->departmento_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `departamento_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->departmento_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->departmento_id->ViewValue = $this->departmento_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->departmento_id->ViewValue = $this->departmento_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->departmento_id->ViewValue = NULL;\n\t\t}\n\t\t$this->departmento_id->ViewCustomAttributes = \"\";\n\n\t\t// seccion_id\n\t\tif (strval($this->seccion_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`seccion_id`\" . ew_SearchString(\"=\", $this->seccion_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `seccion_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `seccion`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->seccion_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->seccion_id->ViewValue = $this->seccion_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->seccion_id->ViewValue = $this->seccion_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->seccion_id->ViewValue = NULL;\n\t\t}\n\t\t$this->seccion_id->ViewCustomAttributes = \"\";\n\n\t\t// puesto_id\n\t\tif (strval($this->puesto_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`puesto_id`\" . ew_SearchString(\"=\", $this->puesto_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `puesto_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `puesto`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->puesto_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->puesto_id->ViewValue = $this->puesto_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->puesto_id->ViewValue = $this->puesto_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->puesto_id->ViewValue = NULL;\n\t\t}\n\t\t$this->puesto_id->ViewCustomAttributes = \"\";\n\n\t\t// observaciones\n\t\t$this->observaciones->ViewValue = $this->observaciones->CurrentValue;\n\t\t$this->observaciones->ViewCustomAttributes = \"\";\n\n\t\t// tipo_sangre_id\n\t\tif (strval($this->tipo_sangre_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`tipo_sangre_id`\" . ew_SearchString(\"=\", $this->tipo_sangre_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `tipo_sangre_id`, `tipo_sangre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_sangre`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipo_sangre_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->tipo_sangre_id->ViewValue = $this->tipo_sangre_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipo_sangre_id->ViewValue = $this->tipo_sangre_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipo_sangre_id->ViewValue = NULL;\n\t\t}\n\t\t$this->tipo_sangre_id->ViewCustomAttributes = \"\";\n\n\t\t// estado\n\t\t$this->estado->ViewValue = $this->estado->CurrentValue;\n\t\t$this->estado->ViewCustomAttributes = \"\";\n\n\t\t\t// codigo\n\t\t\t$this->codigo->LinkCustomAttributes = \"\";\n\t\t\t$this->codigo->HrefValue = \"\";\n\t\t\t$this->codigo->TooltipValue = \"\";\n\n\t\t\t// cui\n\t\t\t$this->cui->LinkCustomAttributes = \"\";\n\t\t\t$this->cui->HrefValue = \"\";\n\t\t\t$this->cui->TooltipValue = \"\";\n\n\t\t\t// nombre\n\t\t\t$this->nombre->LinkCustomAttributes = \"\";\n\t\t\t$this->nombre->HrefValue = \"\";\n\t\t\t$this->nombre->TooltipValue = \"\";\n\n\t\t\t// apellido\n\t\t\t$this->apellido->LinkCustomAttributes = \"\";\n\t\t\t$this->apellido->HrefValue = \"\";\n\t\t\t$this->apellido->TooltipValue = \"\";\n\n\t\t\t// direccion\n\t\t\t$this->direccion->LinkCustomAttributes = \"\";\n\t\t\t$this->direccion->HrefValue = \"\";\n\t\t\t$this->direccion->TooltipValue = \"\";\n\n\t\t\t// departamento_origen_id\n\t\t\t$this->departamento_origen_id->LinkCustomAttributes = \"\";\n\t\t\t$this->departamento_origen_id->HrefValue = \"\";\n\t\t\t$this->departamento_origen_id->TooltipValue = \"\";\n\n\t\t\t// municipio_id\n\t\t\t$this->municipio_id->LinkCustomAttributes = \"\";\n\t\t\t$this->municipio_id->HrefValue = \"\";\n\t\t\t$this->municipio_id->TooltipValue = \"\";\n\n\t\t\t// telefono_residencia\n\t\t\t$this->telefono_residencia->LinkCustomAttributes = \"\";\n\t\t\t$this->telefono_residencia->HrefValue = \"\";\n\t\t\t$this->telefono_residencia->TooltipValue = \"\";\n\n\t\t\t// telefono_celular\n\t\t\t$this->telefono_celular->LinkCustomAttributes = \"\";\n\t\t\t$this->telefono_celular->HrefValue = \"\";\n\t\t\t$this->telefono_celular->TooltipValue = \"\";\n\n\t\t\t// fecha_nacimiento\n\t\t\t$this->fecha_nacimiento->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_nacimiento->HrefValue = \"\";\n\t\t\t$this->fecha_nacimiento->TooltipValue = \"\";\n\n\t\t\t// nacionalidad\n\t\t\t$this->nacionalidad->LinkCustomAttributes = \"\";\n\t\t\t$this->nacionalidad->HrefValue = \"\";\n\t\t\t$this->nacionalidad->TooltipValue = \"\";\n\n\t\t\t// estado_civil\n\t\t\t$this->estado_civil->LinkCustomAttributes = \"\";\n\t\t\t$this->estado_civil->HrefValue = \"\";\n\t\t\t$this->estado_civil->TooltipValue = \"\";\n\n\t\t\t// sexo\n\t\t\t$this->sexo->LinkCustomAttributes = \"\";\n\t\t\t$this->sexo->HrefValue = \"\";\n\t\t\t$this->sexo->TooltipValue = \"\";\n\n\t\t\t// igss\n\t\t\t$this->igss->LinkCustomAttributes = \"\";\n\t\t\t$this->igss->HrefValue = \"\";\n\t\t\t$this->igss->TooltipValue = \"\";\n\n\t\t\t// nit\n\t\t\t$this->nit->LinkCustomAttributes = \"\";\n\t\t\t$this->nit->HrefValue = \"\";\n\t\t\t$this->nit->TooltipValue = \"\";\n\n\t\t\t// licencia_conducir\n\t\t\t$this->licencia_conducir->LinkCustomAttributes = \"\";\n\t\t\t$this->licencia_conducir->HrefValue = \"\";\n\t\t\t$this->licencia_conducir->TooltipValue = \"\";\n\n\t\t\t// area_id\n\t\t\t$this->area_id->LinkCustomAttributes = \"\";\n\t\t\t$this->area_id->HrefValue = \"\";\n\t\t\t$this->area_id->TooltipValue = \"\";\n\n\t\t\t// departmento_id\n\t\t\t$this->departmento_id->LinkCustomAttributes = \"\";\n\t\t\t$this->departmento_id->HrefValue = \"\";\n\t\t\t$this->departmento_id->TooltipValue = \"\";\n\n\t\t\t// seccion_id\n\t\t\t$this->seccion_id->LinkCustomAttributes = \"\";\n\t\t\t$this->seccion_id->HrefValue = \"\";\n\t\t\t$this->seccion_id->TooltipValue = \"\";\n\n\t\t\t// puesto_id\n\t\t\t$this->puesto_id->LinkCustomAttributes = \"\";\n\t\t\t$this->puesto_id->HrefValue = \"\";\n\t\t\t$this->puesto_id->TooltipValue = \"\";\n\n\t\t\t// observaciones\n\t\t\t$this->observaciones->LinkCustomAttributes = \"\";\n\t\t\t$this->observaciones->HrefValue = \"\";\n\t\t\t$this->observaciones->TooltipValue = \"\";\n\n\t\t\t// tipo_sangre_id\n\t\t\t$this->tipo_sangre_id->LinkCustomAttributes = \"\";\n\t\t\t$this->tipo_sangre_id->HrefValue = \"\";\n\t\t\t$this->tipo_sangre_id->TooltipValue = \"\";\n\n\t\t\t// estado\n\t\t\t$this->estado->LinkCustomAttributes = \"\";\n\t\t\t$this->estado->HrefValue = \"\";\n\t\t\t$this->estado->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "protected function createDialog() {\n $dialog = parent::createDialog();\n $dialog->fields = $this->builder()->getFields();\n return $dialog;\n }", "function ReplaceContentOneRow( $row, $template_html )\n{\n //replace fields with values in template\n $content = $template_html;\n foreach($row as $field => $value)\n {\n $content = str_replace(\"@@$field@@\", $value, $content);\n }\n\n return $content;\n}", "function ReplaceContentOneRow( $row, $template_html )\n{\n //replace fields with values in template\n $content = $template_html;\n foreach($row as $field => $value)\n {\n $content = str_replace(\"@@$field@@\", $value, $content);\n }\n\n return $content;\n}", "function RenderRow() {\r\n\t\tglobal $Security, $Language, $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t$this->AddUrl = $this->GetAddUrl();\r\n\t\t$this->EditUrl = $this->GetEditUrl();\r\n\t\t$this->CopyUrl = $this->GetCopyUrl();\r\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\r\n\t\t$this->ListUrl = $this->GetListUrl();\r\n\t\t$this->SetupOtherOptions();\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// Dni_Tutor\r\n\t\t// Apellidos_Nombres\r\n\t\t// Edad\r\n\t\t// Domicilio\r\n\t\t// Tel_Contacto\r\n\t\t// Fecha_Nac\r\n\t\t// Cuil\r\n\t\t// MasHijos\r\n\t\t// Id_Estado_Civil\r\n\t\t// Id_Sexo\r\n\t\t// Id_Relacion\r\n\t\t// Id_Ocupacion\r\n\t\t// Lugar_Nacimiento\r\n\t\t// Id_Provincia\r\n\t\t// Id_Departamento\r\n\t\t// Id_Localidad\r\n\t\t// Fecha_Actualizacion\r\n\t\t// Usuario\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t// Dni_Tutor\r\n\t\t$this->Dni_Tutor->ViewValue = $this->Dni_Tutor->CurrentValue;\r\n\t\t$this->Dni_Tutor->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Apellidos_Nombres\r\n\t\t$this->Apellidos_Nombres->ViewValue = $this->Apellidos_Nombres->CurrentValue;\r\n\t\t$this->Apellidos_Nombres->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Edad\r\n\t\t$this->Edad->ViewValue = $this->Edad->CurrentValue;\r\n\t\t$this->Edad->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Domicilio\r\n\t\t$this->Domicilio->ViewValue = $this->Domicilio->CurrentValue;\r\n\t\t$this->Domicilio->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Tel_Contacto\r\n\t\t$this->Tel_Contacto->ViewValue = $this->Tel_Contacto->CurrentValue;\r\n\t\t$this->Tel_Contacto->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Fecha_Nac\r\n\t\t$this->Fecha_Nac->ViewValue = $this->Fecha_Nac->CurrentValue;\r\n\t\t$this->Fecha_Nac->ViewValue = ew_FormatDateTime($this->Fecha_Nac->ViewValue, 7);\r\n\t\t$this->Fecha_Nac->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Cuil\r\n\t\t$this->Cuil->ViewValue = $this->Cuil->CurrentValue;\r\n\t\t$this->Cuil->ViewCustomAttributes = \"\";\r\n\r\n\t\t// MasHijos\r\n\t\tif (strval($this->MasHijos->CurrentValue) <> \"\") {\r\n\t\t\t$this->MasHijos->ViewValue = $this->MasHijos->OptionCaption($this->MasHijos->CurrentValue);\r\n\t\t} else {\r\n\t\t\t$this->MasHijos->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->MasHijos->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Estado_Civil\r\n\t\tif (strval($this->Id_Estado_Civil->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Estado_Civil`\" . ew_SearchString(\"=\", $this->Id_Estado_Civil->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Estado_Civil`, `Descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estado_civil`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Estado_Civil->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Estado_Civil, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Estado_Civil->ViewValue = $this->Id_Estado_Civil->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Estado_Civil->ViewValue = $this->Id_Estado_Civil->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Estado_Civil->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Estado_Civil->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Sexo\r\n\t\tif (strval($this->Id_Sexo->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Sexo`\" . ew_SearchString(\"=\", $this->Id_Sexo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Sexo`, `Descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sexo_personas`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Sexo->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Sexo, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Sexo->ViewValue = $this->Id_Sexo->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Sexo->ViewValue = $this->Id_Sexo->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Sexo->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Sexo->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Relacion\r\n\t\tif (strval($this->Id_Relacion->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Relacion`\" . ew_SearchString(\"=\", $this->Id_Relacion->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Relacion`, `Desripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_relacion_alumno_tutor`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Relacion->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Relacion, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t$sSqlWrk .= \" ORDER BY `Desripcion` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Relacion->ViewValue = $this->Id_Relacion->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Relacion->ViewValue = $this->Id_Relacion->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Relacion->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Relacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Ocupacion\r\n\t\tif (strval($this->Id_Ocupacion->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Ocupacion`\" . ew_SearchString(\"=\", $this->Id_Ocupacion->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Ocupacion`, `Descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `ocupacion_tutor`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Ocupacion->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Ocupacion, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Ocupacion->ViewValue = $this->Id_Ocupacion->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Ocupacion->ViewValue = $this->Id_Ocupacion->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Ocupacion->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Ocupacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Lugar_Nacimiento\r\n\t\t$this->Lugar_Nacimiento->ViewValue = $this->Lugar_Nacimiento->CurrentValue;\r\n\t\t$this->Lugar_Nacimiento->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Provincia\r\n\t\tif (strval($this->Id_Provincia->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Provincia`\" . ew_SearchString(\"=\", $this->Id_Provincia->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Provincia`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincias`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Provincia->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Provincia, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Provincia->ViewValue = $this->Id_Provincia->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Provincia->ViewValue = $this->Id_Provincia->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Provincia->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Provincia->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Departamento\r\n\t\tif (strval($this->Id_Departamento->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Departamento`\" . ew_SearchString(\"=\", $this->Id_Departamento->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Departamento`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Departamento->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Departamento, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Departamento->ViewValue = $this->Id_Departamento->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Departamento->ViewValue = $this->Id_Departamento->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Departamento->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Departamento->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Localidad\r\n\t\tif (strval($this->Id_Localidad->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Localidad`\" . ew_SearchString(\"=\", $this->Id_Localidad->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Localidad`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `localidades`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Localidad->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Localidad, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Localidad->ViewValue = $this->Id_Localidad->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Localidad->ViewValue = $this->Id_Localidad->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Localidad->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Localidad->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Fecha_Actualizacion\r\n\t\t$this->Fecha_Actualizacion->ViewValue = $this->Fecha_Actualizacion->CurrentValue;\r\n\t\t$this->Fecha_Actualizacion->ViewValue = ew_FormatDateTime($this->Fecha_Actualizacion->ViewValue, 7);\r\n\t\t$this->Fecha_Actualizacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Usuario\r\n\t\t$this->Usuario->ViewValue = $this->Usuario->CurrentValue;\r\n\t\t$this->Usuario->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Dni_Tutor\r\n\t\t\t$this->Dni_Tutor->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Dni_Tutor->HrefValue = \"\";\r\n\t\t\t$this->Dni_Tutor->TooltipValue = \"\";\r\n\r\n\t\t\t// Apellidos_Nombres\r\n\t\t\t$this->Apellidos_Nombres->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Apellidos_Nombres->HrefValue = \"\";\r\n\t\t\t$this->Apellidos_Nombres->TooltipValue = \"\";\r\n\r\n\t\t\t// Edad\r\n\t\t\t$this->Edad->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Edad->HrefValue = \"\";\r\n\t\t\t$this->Edad->TooltipValue = \"\";\r\n\r\n\t\t\t// Domicilio\r\n\t\t\t$this->Domicilio->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Domicilio->HrefValue = \"\";\r\n\t\t\t$this->Domicilio->TooltipValue = \"\";\r\n\r\n\t\t\t// Tel_Contacto\r\n\t\t\t$this->Tel_Contacto->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Tel_Contacto->HrefValue = \"\";\r\n\t\t\t$this->Tel_Contacto->TooltipValue = \"\";\r\n\r\n\t\t\t// Fecha_Nac\r\n\t\t\t$this->Fecha_Nac->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Fecha_Nac->HrefValue = \"\";\r\n\t\t\t$this->Fecha_Nac->TooltipValue = \"\";\r\n\r\n\t\t\t// Cuil\r\n\t\t\t$this->Cuil->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Cuil->HrefValue = \"\";\r\n\t\t\t$this->Cuil->TooltipValue = \"\";\r\n\r\n\t\t\t// MasHijos\r\n\t\t\t$this->MasHijos->LinkCustomAttributes = \"\";\r\n\t\t\t$this->MasHijos->HrefValue = \"\";\r\n\t\t\t$this->MasHijos->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Estado_Civil\r\n\t\t\t$this->Id_Estado_Civil->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Estado_Civil->HrefValue = \"\";\r\n\t\t\t$this->Id_Estado_Civil->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Sexo\r\n\t\t\t$this->Id_Sexo->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Sexo->HrefValue = \"\";\r\n\t\t\t$this->Id_Sexo->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Relacion\r\n\t\t\t$this->Id_Relacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Relacion->HrefValue = \"\";\r\n\t\t\t$this->Id_Relacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Ocupacion\r\n\t\t\t$this->Id_Ocupacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Ocupacion->HrefValue = \"\";\r\n\t\t\t$this->Id_Ocupacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Lugar_Nacimiento\r\n\t\t\t$this->Lugar_Nacimiento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Lugar_Nacimiento->HrefValue = \"\";\r\n\t\t\t$this->Lugar_Nacimiento->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Provincia\r\n\t\t\t$this->Id_Provincia->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Provincia->HrefValue = \"\";\r\n\t\t\t$this->Id_Provincia->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Departamento\r\n\t\t\t$this->Id_Departamento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Departamento->HrefValue = \"\";\r\n\t\t\t$this->Id_Departamento->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Localidad\r\n\t\t\t$this->Id_Localidad->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Localidad->HrefValue = \"\";\r\n\t\t\t$this->Id_Localidad->TooltipValue = \"\";\r\n\r\n\t\t\t// Fecha_Actualizacion\r\n\t\t\t$this->Fecha_Actualizacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Fecha_Actualizacion->HrefValue = \"\";\r\n\t\t\t$this->Fecha_Actualizacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Usuario\r\n\t\t\t$this->Usuario->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Usuario->HrefValue = \"\";\r\n\t\t\t$this->Usuario->TooltipValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function make_table ($rows){\n if (($rows['supply_type'] == 'prepaid' \n && $rows['status'] == 'initiated') ||\n ($rows['supply_type'] == 'postpaid' \n && $rows['status'] == 'supplied')){ // Only display Prepaid supplies that have been initiated and Postpaid supplies that have been delivered\n $pay = '<a href=\"pay.php?supply_id='.$rows['id'].'\" target=\"pay_frame\"> \n <small data-toggle=\"modal\" data-target=\"#payModal\">Pay</small>\n </a>'; // Open the transfer iframe in a Modal window\n } else {\n $pay = '<small class=\"text-danger\">Pay</small>';\n }\n\n\n\n\n $row = '\n <tr>\n <td>'.$rows['supplier_name'].'</td>\n <td>'.$rows['quantity_desc'].' of <strong>'.$rows['item_name'].'</strong></td>\n <td>'.$rows['status'].' ('.$rows['supply_type'].')</td>\n <td>N'.number_format($rows['amount'],2,\".\",\",\").'</td>\n <td>'.$rows['supply_order_date'].'</td>\n <td>'.$pay.'</td>\n </tr>\n ';\n return $row;\n }", "protected function constructGrid()\n {\n // jquery script for loading first page of grid\n $table = \"\n <script type=\\\"text/javascript\\\">\n // load first page\n WschangeModelPagination(\n '$this->_id',\n '$this->_action',\n '$this->_modelName',\n '$this->noDataText',\n $this->itemsPerPage,\n $this->showEdit,\n '$this->_order',\n '$this->_formId',\n 0,\n '$this->_id'+'_0',\n '$this->_edit_action',\n '$this->_delete_action'\n );\n </script>\n \";\n\n // container for edit dialog\n if ($this->showEdit) {\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'\"></div>';\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'_new\"></div>';\n }\n\n // title\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-1\">';\n $table .= '<h1>'.$this->_model->metaName.'</h1>';\n $table .= '</div>';\n $table .= '</div>';\n\n // add and search controls\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-2\">';\n $table .= '<form class=\"uk-form uk-form-horizontal\">';\n $table .= '<fieldset data-uk-margin>';\n // new item button\n if ($this->showEdit) {\n $table .= '<button class=\"uk-button uk-button-success\"'\n .' data-uk-modal=\"{target:\\'#'.$this->_formId\n .'_new\\', center:true}\"'\n .' id=\"btn_create_'.$this->_id.'\"'\n .' type=\"button\" onclick=\"WseditModelID('\n .'\\''.$this->_formId.'_new\\', '\n .'\\''.$this->_modelName.'\\', '\n .'0, \\''.$this->_edit_action.'\\')\">';\n $table .= '<i class=\"uk-icon-plus\"></i>';\n $table .= '</button>';\n }\n // search control\n $table .= '<input';\n $table .= ' type=\"text\" id=\"search_'.$this->_id.'\"';\n $table .= '/>';\n $table .= '<button class=\"uk-button\"'\n .' id=\"btn_search_'.$this->_id\n .'\" type=\"button\" onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .'0, \\''.$this->_id.'\\'+\\'_0\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\">';\n $table .= '<i class=\"uk-icon-search\"></i>';\n $table .= '</button>';\n\n $table .= '</fieldset>';\n $table .= '</form>';\n $table .= '</div>';\n $table .= '</div>';\n\n // Grid View table\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-1-1\">';\n $table .= '<div class=\"uk-overflow-container\">';\n $table .= '<table class=\"uk-table uk-table-hover uk-table-striped\">';\n $table .= '<thead>';\n $table .= '<tr>';\n foreach ($this->_model->columns as $column) {\n if (!in_array($column, $this->_model->hiddenColumns)) {\n if (isset($this->_model->columnHeaders[$column])) {\n $table .= '<th>'\n .$this->_model->columnHeaders[$column];\n $table .= '</th>';\n } else {\n $table .= '<th>'.$column.'</th>';\n }\n }\n }\n if ($this->showEdit) {\n $table .= '<th></th>';\n }\n $table .= '</tr>';\n $table .= '</thead>';\n\n // container of table data loaded from AJAX request\n $table .= '<tbody id=\"'.$this->_id.'\"></tbody>';\n\n // end of grid table\n $table .= '</table>';\n $table .= '</div>';\n $table .= '</div>';\n $table .= '</div>';\n\n // get number ow rows from query so that we can make pager\n $db = new WsDatabase();\n $countQuery = 'SELECT COUNT(*) AS nrows FROM '.$this->_model->tableName;\n $result = $db->query($countQuery);\n $this->nRows = intval($result[0]['nrows']);\n $db->close();\n\n // number of items in pager\n $nPages = $this->getPagination($this->nRows);\n\n // construct pager\n $table .= '<ul class=\"uk-pagination uk-pagination-left\">';\n // links to pages\n for ($i = 0; $i < $nPages; $i++) {\n $table .= '<li>';\n $table .= '\n <a id=\"'.$this->_id.'_'.$i.'\"\n href=\"javascript:void(0)\"\n onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .$i.',\\''.$this->_id.'_'.$i.'\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\"/>'\n .($i+1).'</a>';\n $table .= '</li>';\n }\n // end of pager\n $table .= '</ul>';\n\n // end of master div element\n $table .= '<br/>';\n\n $table .= '<script type=\"text/javascript\">'\n .'$(\"#search_'.$this->_id.'\").keydown(function(event) {'\n .' if(event.keyCode == 13) {'\n .' event.preventDefault();'\n .' $(\"#btn_search_'.$this->_id.'\").click();'\n .' }'\n .'});'\n .'</script>';\n\n unset($i, $nPages, $db, $result, $countQuery);\n return $table;\n }", "function _getSiteImportTableHTML($fields, $values = array())\n\t{\n\t\t\n\t\t$headlines = array(\n\t\t\tarray(\n\t\t\t\"dat\" => $GLOBALS[\"l_siteimport\"][\"fieldName\"]\n\t\t), array(\n\t\t\t\"dat\" => $GLOBALS[\"l_siteimport\"][\"startMark\"]\n\t\t), array(\n\t\t\t\"dat\" => $GLOBALS[\"l_siteimport\"][\"endMark\"]\n\t\t)\n\t\t);\n\t\t\n\t\t$content = array();\n\t\tif (count($fields) > 0) {\n\t\t\t$i = 0;\n\t\t\tforeach ($fields as $name => $type) {\n\t\t\t\t$row = array();\n\t\t\t\t$row[0][\"dat\"] = htmlspecialchars($name) . '<input type=\"hidden\" name=\"fields[' . $i . '][name]\" value=\"' . htmlspecialchars(\n\t\t\t\t\t\t$name) . '\">';\n\t\t\t\t$index = $this->_getIndexOfValues($values, $name);\n\t\t\t\tif ($index > -1) {\n\t\t\t\t\t$valpre = $values[$index][\"pre\"];\n\t\t\t\t\t$valpost = $values[$index][\"post\"];\n\t\t\t\t} else {\n\t\t\t\t\t$valpre = \"\";\n\t\t\t\t\t$valpost = \"\";\n\t\t\t\t}\n\t\t\t\t$row[1][\"dat\"] = '<textarea name=\"fields[' . $i . '][pre]\" style=\"width:160px;height:80px\" wrap=\"off\">' . htmlspecialchars(\n\t\t\t\t\t\t$valpre) . '</textarea>';\n\t\t\t\t$row[2][\"dat\"] = '<textarea name=\"fields[' . $i . '][post]\" style=\"width:160px;height:80px\" wrap=\"off\">' . htmlspecialchars(\n\t\t\t\t\t\t$valpost) . '</textarea>';\n\t\t\t\tarray_push($content, $row);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\treturn htmlDialogBorder3(420, 270, $content, $headlines, \"middlefont\", \"\", \"\", \"fields\", \"margin-top:5px;\");\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\t\t// fecha_tamizaje\n\t\t// id_centro\n\t\t// apellidopaterno\n\t\t// apellidomaterno\n\t\t// nombre\n\t\t// ci\n\t\t// fecha_nacimiento\n\t\t// dias\n\t\t// semanas\n\t\t// meses\n\t\t// sexo\n\t\t// discapacidad\n\t\t// id_tipodiscapacidad\n\t\t// resultado\n\t\t// resultadotamizaje\n\t\t// tapon\n\t\t// tipo\n\t\t// repetirprueba\n\t\t// observaciones\n\t\t// id_apoderado\n\t\t// id_referencia\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// id\n\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// fecha_tamizaje\n\t\t$this->fecha_tamizaje->ViewValue = $this->fecha_tamizaje->CurrentValue;\n\t\t$this->fecha_tamizaje->ViewValue = ew_FormatDateTime($this->fecha_tamizaje->ViewValue, 0);\n\t\t$this->fecha_tamizaje->ViewCustomAttributes = \"\";\n\n\t\t// id_centro\n\t\tif (strval($this->id_centro->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_centro->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `institucionesdesalud`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_centro->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_centro, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_centro->ViewValue = $this->id_centro->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_centro->ViewValue = $this->id_centro->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_centro->ViewValue = NULL;\n\t\t}\n\t\t$this->id_centro->ViewCustomAttributes = \"\";\n\n\t\t// apellidopaterno\n\t\t$this->apellidopaterno->ViewValue = $this->apellidopaterno->CurrentValue;\n\t\t$this->apellidopaterno->ViewCustomAttributes = \"\";\n\n\t\t// apellidomaterno\n\t\t$this->apellidomaterno->ViewValue = $this->apellidomaterno->CurrentValue;\n\t\t$this->apellidomaterno->ViewCustomAttributes = \"\";\n\n\t\t// nombre\n\t\t$this->nombre->ViewValue = $this->nombre->CurrentValue;\n\t\t$this->nombre->ViewCustomAttributes = \"\";\n\n\t\t// ci\n\t\t$this->ci->ViewValue = $this->ci->CurrentValue;\n\t\t$this->ci->ViewCustomAttributes = \"\";\n\n\t\t// fecha_nacimiento\n\t\t$this->fecha_nacimiento->ViewValue = $this->fecha_nacimiento->CurrentValue;\n\t\t$this->fecha_nacimiento->ViewValue = ew_FormatDateTime($this->fecha_nacimiento->ViewValue, 0);\n\t\t$this->fecha_nacimiento->ViewCustomAttributes = \"\";\n\n\t\t// dias\n\t\t$this->dias->ViewValue = $this->dias->CurrentValue;\n\t\t$this->dias->ViewCustomAttributes = \"\";\n\n\t\t// semanas\n\t\t$this->semanas->ViewValue = $this->semanas->CurrentValue;\n\t\t$this->semanas->ViewCustomAttributes = \"\";\n\n\t\t// meses\n\t\t$this->meses->ViewValue = $this->meses->CurrentValue;\n\t\t$this->meses->ViewCustomAttributes = \"\";\n\n\t\t// sexo\n\t\tif (strval($this->sexo->CurrentValue) <> \"\") {\n\t\t\t$this->sexo->ViewValue = $this->sexo->OptionCaption($this->sexo->CurrentValue);\n\t\t} else {\n\t\t\t$this->sexo->ViewValue = NULL;\n\t\t}\n\t\t$this->sexo->ViewCustomAttributes = \"\";\n\n\t\t// discapacidad\n\t\t$this->discapacidad->ViewValue = $this->discapacidad->CurrentValue;\n\t\tif (strval($this->discapacidad->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->discapacidad->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `discapacidad`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->discapacidad->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->discapacidad, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->discapacidad->ViewValue = $this->discapacidad->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->discapacidad->ViewValue = $this->discapacidad->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->discapacidad->ViewValue = NULL;\n\t\t}\n\t\t$this->discapacidad->ViewCustomAttributes = \"\";\n\n\t\t// id_tipodiscapacidad\n\t\t$this->id_tipodiscapacidad->ViewValue = $this->id_tipodiscapacidad->CurrentValue;\n\t\t$this->id_tipodiscapacidad->ViewCustomAttributes = \"\";\n\n\t\t// resultado\n\t\t$this->resultado->ViewValue = $this->resultado->CurrentValue;\n\t\t$this->resultado->ViewCustomAttributes = \"\";\n\n\t\t// resultadotamizaje\n\t\t$this->resultadotamizaje->ViewValue = $this->resultadotamizaje->CurrentValue;\n\t\t$this->resultadotamizaje->ViewCustomAttributes = \"\";\n\n\t\t// tapon\n\t\tif (strval($this->tapon->CurrentValue) <> \"\") {\n\t\t\t$this->tapon->ViewValue = $this->tapon->OptionCaption($this->tapon->CurrentValue);\n\t\t} else {\n\t\t\t$this->tapon->ViewValue = NULL;\n\t\t}\n\t\t$this->tapon->ViewCustomAttributes = \"\";\n\n\t\t// tipo\n\t\tif (strval($this->tipo->CurrentValue) <> \"\") {\n\t\t\t$this->tipo->ViewValue = $this->tipo->OptionCaption($this->tipo->CurrentValue);\n\t\t} else {\n\t\t\t$this->tipo->ViewValue = NULL;\n\t\t}\n\t\t$this->tipo->ViewCustomAttributes = \"\";\n\n\t\t// repetirprueba\n\t\tif (strval($this->repetirprueba->CurrentValue) <> \"\") {\n\t\t\t$this->repetirprueba->ViewValue = $this->repetirprueba->OptionCaption($this->repetirprueba->CurrentValue);\n\t\t} else {\n\t\t\t$this->repetirprueba->ViewValue = NULL;\n\t\t}\n\t\t$this->repetirprueba->ViewCustomAttributes = \"\";\n\n\t\t// observaciones\n\t\t$this->observaciones->ViewValue = $this->observaciones->CurrentValue;\n\t\t$this->observaciones->ViewCustomAttributes = \"\";\n\n\t\t// id_apoderado\n\t\tif ($this->id_apoderado->VirtualValue <> \"\") {\n\t\t\t$this->id_apoderado->ViewValue = $this->id_apoderado->VirtualValue;\n\t\t} else {\n\t\tif (strval($this->id_apoderado->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_apoderado->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombres` AS `DispFld`, `apellidopaterno` AS `Disp2Fld`, `apellidopaterno` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `apoderado`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_apoderado->LookupFilters = array(\"dx1\" => '`nombres`', \"dx2\" => '`apellidopaterno`', \"dx3\" => '`apellidopaterno`');\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_apoderado, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$arwrk[3] = $rswrk->fields('Disp3Fld');\n\t\t\t\t$this->id_apoderado->ViewValue = $this->id_apoderado->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_apoderado->ViewValue = $this->id_apoderado->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_apoderado->ViewValue = NULL;\n\t\t}\n\t\t}\n\t\t$this->id_apoderado->ViewCustomAttributes = \"\";\n\n\t\t// id_referencia\n\t\tif ($this->id_referencia->VirtualValue <> \"\") {\n\t\t\t$this->id_referencia->ViewValue = $this->id_referencia->VirtualValue;\n\t\t} else {\n\t\tif (strval($this->id_referencia->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_referencia->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombrescentromedico` AS `DispFld`, `nombrescompleto` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `referencia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_referencia->LookupFilters = array(\"dx1\" => '`nombrescentromedico`', \"dx2\" => '`nombrescompleto`');\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_referencia, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$this->id_referencia->ViewValue = $this->id_referencia->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_referencia->ViewValue = $this->id_referencia->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_referencia->ViewValue = NULL;\n\t\t}\n\t\t}\n\t\t$this->id_referencia->ViewCustomAttributes = \"\";\n\n\t\t\t// fecha_tamizaje\n\t\t\t$this->fecha_tamizaje->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_tamizaje->HrefValue = \"\";\n\t\t\t$this->fecha_tamizaje->TooltipValue = \"\";\n\n\t\t\t// id_centro\n\t\t\t$this->id_centro->LinkCustomAttributes = \"\";\n\t\t\t$this->id_centro->HrefValue = \"\";\n\t\t\t$this->id_centro->TooltipValue = \"\";\n\n\t\t\t// apellidopaterno\n\t\t\t$this->apellidopaterno->LinkCustomAttributes = \"\";\n\t\t\t$this->apellidopaterno->HrefValue = \"\";\n\t\t\t$this->apellidopaterno->TooltipValue = \"\";\n\n\t\t\t// apellidomaterno\n\t\t\t$this->apellidomaterno->LinkCustomAttributes = \"\";\n\t\t\t$this->apellidomaterno->HrefValue = \"\";\n\t\t\t$this->apellidomaterno->TooltipValue = \"\";\n\n\t\t\t// nombre\n\t\t\t$this->nombre->LinkCustomAttributes = \"\";\n\t\t\t$this->nombre->HrefValue = \"\";\n\t\t\t$this->nombre->TooltipValue = \"\";\n\n\t\t\t// ci\n\t\t\t$this->ci->LinkCustomAttributes = \"\";\n\t\t\t$this->ci->HrefValue = \"\";\n\t\t\t$this->ci->TooltipValue = \"\";\n\n\t\t\t// fecha_nacimiento\n\t\t\t$this->fecha_nacimiento->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_nacimiento->HrefValue = \"\";\n\t\t\t$this->fecha_nacimiento->TooltipValue = \"\";\n\n\t\t\t// dias\n\t\t\t$this->dias->LinkCustomAttributes = \"\";\n\t\t\t$this->dias->HrefValue = \"\";\n\t\t\t$this->dias->TooltipValue = \"\";\n\n\t\t\t// semanas\n\t\t\t$this->semanas->LinkCustomAttributes = \"\";\n\t\t\t$this->semanas->HrefValue = \"\";\n\t\t\t$this->semanas->TooltipValue = \"\";\n\n\t\t\t// meses\n\t\t\t$this->meses->LinkCustomAttributes = \"\";\n\t\t\t$this->meses->HrefValue = \"\";\n\t\t\t$this->meses->TooltipValue = \"\";\n\n\t\t\t// sexo\n\t\t\t$this->sexo->LinkCustomAttributes = \"\";\n\t\t\t$this->sexo->HrefValue = \"\";\n\t\t\t$this->sexo->TooltipValue = \"\";\n\n\t\t\t// discapacidad\n\t\t\t$this->discapacidad->LinkCustomAttributes = \"\";\n\t\t\t$this->discapacidad->HrefValue = \"\";\n\t\t\t$this->discapacidad->TooltipValue = \"\";\n\n\t\t\t// id_tipodiscapacidad\n\t\t\t$this->id_tipodiscapacidad->LinkCustomAttributes = \"\";\n\t\t\t$this->id_tipodiscapacidad->HrefValue = \"\";\n\t\t\t$this->id_tipodiscapacidad->TooltipValue = \"\";\n\n\t\t\t// resultado\n\t\t\t$this->resultado->LinkCustomAttributes = \"\";\n\t\t\t$this->resultado->HrefValue = \"\";\n\t\t\t$this->resultado->TooltipValue = \"\";\n\n\t\t\t// resultadotamizaje\n\t\t\t$this->resultadotamizaje->LinkCustomAttributes = \"\";\n\t\t\t$this->resultadotamizaje->HrefValue = \"\";\n\t\t\t$this->resultadotamizaje->TooltipValue = \"\";\n\n\t\t\t// tapon\n\t\t\t$this->tapon->LinkCustomAttributes = \"\";\n\t\t\t$this->tapon->HrefValue = \"\";\n\t\t\t$this->tapon->TooltipValue = \"\";\n\n\t\t\t// tipo\n\t\t\t$this->tipo->LinkCustomAttributes = \"\";\n\t\t\t$this->tipo->HrefValue = \"\";\n\t\t\t$this->tipo->TooltipValue = \"\";\n\n\t\t\t// repetirprueba\n\t\t\t$this->repetirprueba->LinkCustomAttributes = \"\";\n\t\t\t$this->repetirprueba->HrefValue = \"\";\n\t\t\t$this->repetirprueba->TooltipValue = \"\";\n\n\t\t\t// observaciones\n\t\t\t$this->observaciones->LinkCustomAttributes = \"\";\n\t\t\t$this->observaciones->HrefValue = \"\";\n\t\t\t$this->observaciones->TooltipValue = \"\";\n\n\t\t\t// id_apoderado\n\t\t\t$this->id_apoderado->LinkCustomAttributes = \"\";\n\t\t\t$this->id_apoderado->HrefValue = \"\";\n\t\t\t$this->id_apoderado->TooltipValue = \"\";\n\n\t\t\t// id_referencia\n\t\t\t$this->id_referencia->LinkCustomAttributes = \"\";\n\t\t\t$this->id_referencia->HrefValue = \"\";\n\t\t\t$this->id_referencia->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\n\t\t\t// fecha_tamizaje\n\t\t\t$this->fecha_tamizaje->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->fecha_tamizaje->EditCustomAttributes = \"\";\n\t\t\t$this->fecha_tamizaje->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->fecha_tamizaje->AdvancedSearch->SearchValue, 0), 8));\n\t\t\t$this->fecha_tamizaje->PlaceHolder = ew_RemoveHtml($this->fecha_tamizaje->FldCaption());\n\n\t\t\t// id_centro\n\t\t\t$this->id_centro->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_centro->EditCustomAttributes = \"\";\n\n\t\t\t// apellidopaterno\n\t\t\t$this->apellidopaterno->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->apellidopaterno->EditCustomAttributes = \"\";\n\t\t\t$this->apellidopaterno->EditValue = ew_HtmlEncode($this->apellidopaterno->AdvancedSearch->SearchValue);\n\t\t\t$this->apellidopaterno->PlaceHolder = ew_RemoveHtml($this->apellidopaterno->FldCaption());\n\n\t\t\t// apellidomaterno\n\t\t\t$this->apellidomaterno->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->apellidomaterno->EditCustomAttributes = \"\";\n\t\t\t$this->apellidomaterno->EditValue = ew_HtmlEncode($this->apellidomaterno->AdvancedSearch->SearchValue);\n\t\t\t$this->apellidomaterno->PlaceHolder = ew_RemoveHtml($this->apellidomaterno->FldCaption());\n\n\t\t\t// nombre\n\t\t\t$this->nombre->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nombre->EditCustomAttributes = \"\";\n\t\t\t$this->nombre->EditValue = ew_HtmlEncode($this->nombre->AdvancedSearch->SearchValue);\n\t\t\t$this->nombre->PlaceHolder = ew_RemoveHtml($this->nombre->FldCaption());\n\n\t\t\t// ci\n\t\t\t$this->ci->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->ci->EditCustomAttributes = \"\";\n\t\t\t$this->ci->EditValue = ew_HtmlEncode($this->ci->AdvancedSearch->SearchValue);\n\t\t\t$this->ci->PlaceHolder = ew_RemoveHtml($this->ci->FldCaption());\n\n\t\t\t// fecha_nacimiento\n\t\t\t$this->fecha_nacimiento->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->fecha_nacimiento->EditCustomAttributes = \"\";\n\t\t\t$this->fecha_nacimiento->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->fecha_nacimiento->AdvancedSearch->SearchValue, 0), 8));\n\t\t\t$this->fecha_nacimiento->PlaceHolder = ew_RemoveHtml($this->fecha_nacimiento->FldCaption());\n\n\t\t\t// dias\n\t\t\t$this->dias->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->dias->EditCustomAttributes = \"\";\n\t\t\t$this->dias->EditValue = ew_HtmlEncode($this->dias->AdvancedSearch->SearchValue);\n\t\t\t$this->dias->PlaceHolder = ew_RemoveHtml($this->dias->FldCaption());\n\n\t\t\t// semanas\n\t\t\t$this->semanas->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->semanas->EditCustomAttributes = \"\";\n\t\t\t$this->semanas->EditValue = ew_HtmlEncode($this->semanas->AdvancedSearch->SearchValue);\n\t\t\t$this->semanas->PlaceHolder = ew_RemoveHtml($this->semanas->FldCaption());\n\n\t\t\t// meses\n\t\t\t$this->meses->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->meses->EditCustomAttributes = \"\";\n\t\t\t$this->meses->EditValue = ew_HtmlEncode($this->meses->AdvancedSearch->SearchValue);\n\t\t\t$this->meses->PlaceHolder = ew_RemoveHtml($this->meses->FldCaption());\n\n\t\t\t// sexo\n\t\t\t$this->sexo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->sexo->EditCustomAttributes = \"\";\n\t\t\t$this->sexo->EditValue = $this->sexo->Options(TRUE);\n\n\t\t\t// discapacidad\n\t\t\t$this->discapacidad->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->discapacidad->EditCustomAttributes = \"\";\n\t\t\t$this->discapacidad->EditValue = ew_HtmlEncode($this->discapacidad->AdvancedSearch->SearchValue);\n\t\t\tif (strval($this->discapacidad->AdvancedSearch->SearchValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->discapacidad->AdvancedSearch->SearchValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `discapacidad`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->discapacidad->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->discapacidad, $sWhereWrk); // Call Lookup Selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = ew_HtmlEncode($rswrk->fields('DispFld'));\n\t\t\t\t\t$this->discapacidad->EditValue = $this->discapacidad->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->discapacidad->EditValue = ew_HtmlEncode($this->discapacidad->AdvancedSearch->SearchValue);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->discapacidad->EditValue = NULL;\n\t\t\t}\n\t\t\t$this->discapacidad->PlaceHolder = ew_RemoveHtml($this->discapacidad->FldCaption());\n\n\t\t\t// id_tipodiscapacidad\n\t\t\t$this->id_tipodiscapacidad->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_tipodiscapacidad->EditCustomAttributes = \"\";\n\t\t\t$this->id_tipodiscapacidad->EditValue = ew_HtmlEncode($this->id_tipodiscapacidad->AdvancedSearch->SearchValue);\n\t\t\t$this->id_tipodiscapacidad->PlaceHolder = ew_RemoveHtml($this->id_tipodiscapacidad->FldCaption());\n\n\t\t\t// resultado\n\t\t\t$this->resultado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->resultado->EditCustomAttributes = \"\";\n\t\t\t$this->resultado->EditValue = ew_HtmlEncode($this->resultado->AdvancedSearch->SearchValue);\n\t\t\t$this->resultado->PlaceHolder = ew_RemoveHtml($this->resultado->FldCaption());\n\n\t\t\t// resultadotamizaje\n\t\t\t$this->resultadotamizaje->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->resultadotamizaje->EditCustomAttributes = \"\";\n\t\t\t$this->resultadotamizaje->EditValue = ew_HtmlEncode($this->resultadotamizaje->AdvancedSearch->SearchValue);\n\t\t\t$this->resultadotamizaje->PlaceHolder = ew_RemoveHtml($this->resultadotamizaje->FldCaption());\n\n\t\t\t// tapon\n\t\t\t$this->tapon->EditCustomAttributes = \"\";\n\t\t\t$this->tapon->EditValue = $this->tapon->Options(FALSE);\n\n\t\t\t// tipo\n\t\t\t$this->tipo->EditCustomAttributes = \"\";\n\t\t\t$this->tipo->EditValue = $this->tipo->Options(FALSE);\n\n\t\t\t// repetirprueba\n\t\t\t$this->repetirprueba->EditCustomAttributes = \"\";\n\t\t\t$this->repetirprueba->EditValue = $this->repetirprueba->Options(FALSE);\n\n\t\t\t// observaciones\n\t\t\t$this->observaciones->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->observaciones->EditCustomAttributes = \"\";\n\t\t\t$this->observaciones->EditValue = ew_HtmlEncode($this->observaciones->AdvancedSearch->SearchValue);\n\t\t\t$this->observaciones->PlaceHolder = ew_RemoveHtml($this->observaciones->FldCaption());\n\n\t\t\t// id_apoderado\n\t\t\t$this->id_apoderado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_apoderado->EditCustomAttributes = \"\";\n\t\t\t$this->id_apoderado->EditValue = ew_HtmlEncode($this->id_apoderado->AdvancedSearch->SearchValue);\n\t\t\t$this->id_apoderado->PlaceHolder = ew_RemoveHtml($this->id_apoderado->FldCaption());\n\n\t\t\t// id_referencia\n\t\t\t$this->id_referencia->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_referencia->EditCustomAttributes = \"\";\n\t\t\t$this->id_referencia->EditValue = ew_HtmlEncode($this->id_referencia->AdvancedSearch->SearchValue);\n\t\t\t$this->id_referencia->PlaceHolder = ew_RemoveHtml($this->id_referencia->FldCaption());\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) // Add/Edit/Search row\n\t\t\t$this->SetupFieldTitles();\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function buildWidgets(&$table,$row) {\n //print_r($this);\n $this->table = &$table;\n $widgets = array(\n // format:\n //name display, width, pos , span , \n 'name' => array(null, 1 , 1),\n 'type' => array(null, 2 , 1),\n 'length' => array(null, 3 , 1),\n 'notnull' => array('n', 4 , 1),\n 'isIndex' => array('I', 5 , 1),\n 'sequence' => array('+', 6 , 1),\n 'unique' => array('u', 7 , 1),\n 'default' => array(null, 8 , 2)\n \n );\n \n foreach ($widgets as $string=>$config) {\n \n switch($string) {\n \n case 'name':\n case 'length':\n case 'default':\n $this->widgets[$string] = &new GtkEntry;\n $this->widgets[$string]->set_text((string) $this->$string);\n $this->widgets[$string]->connect('changed',array(&$this,'callbackSetValue'),$string);\n $this->widgets[$string]->connect('leave-notify-event', array(&$this->table->database,'save'));\n if ($string == 'name') {\n $this->widgets[$string]->connect_after('drag_begin',array(&$this,'callbackNamePressed'));\n $this->widgets[$string]->connect_after('drag-end',array(&$this,'callbackNameReleased'));\n $this->widgets[$string]->show();\n //$this->widgets[$string]->show();\n // $this->widgets[$string]->realize();\n $this->widgets[$string]->connect('drag_data_get', array(&$this,'callbackDropAsk'));\n $this->widgets[$string]->drag_source_set(\n GDK_BUTTON1_MASK|GDK_BUTTON3_MASK, \n array(array('text/plain', 0, -1)),\n GDK_ACTION_COPY\n );\n $this->widgets[$string]->connect('drag_data_received', array(&$this,'callbackDropReceived'));\n $this->widgets[$string]->drag_dest_set(\n GTK_DEST_DEFAULT_ALL, \n array(array('text/plain', 0, -1)) ,\n GDK_ACTION_COPY);\n\n }\n break;\n \n case 'type':\n $this->widgets[$string] = &new GtkEntry;\n $this->widgets[$string]->set_text((string) $this->$string);\n $this->widgets[$string]->connect('button-press-event',array(&$this,'callbackTypePressed'),$string);\n $this->widgets[$string]->set_editable(false); \n break;\n case 'notnull':\n case 'isIndex':\n case 'sequence':\n case 'unique':\n $this->widgets[$string] = &new GtkToggleButton($config[0]);\n $this->widgets[$string]->set_active((int) $this->$string);\n $this->widgets[$string]->connect('toggled',array(&$this,'callbackSetValue'),$string);\n \n break;\n case 'delete':\n $this->widgets[$string] = &new GtkButton('X');\n $this->widgets[$string]->connect('pressed',array(&$this,'callbackRowDelete'));\n break;\n \n } \n \n \n $this->table->addCell($this->widgets[$string],$config[1],$row, $config[2], GTK_EXPAND|GTK_FILL);\n $this->widgets[$string]->show();\n }\n $this->setSizes();\n \n $this->deleteMenuItem = &new GtkMenuItem($this->name);\n $this->deleteMenuItem->show();\n $this->deleteMenuItem->connect('activate',array(&$this,'callbackRowDelete'));\n $this->table->deleteMenu->add( $this->deleteMenuItem);\n $this->setVisable();\n \n \n \n }", "private function _make_item_row($data) {\n $item = \"<b>$data->title</b>\";\n if ($data->description) {\n $item.=\"<br /><span>\" . nl2br($data->description) . \"</span><br><span style='float:right;'>\".$data->category.\"<span>\";\n }\n $type = $data->unit_type ? $data->unit_type : \"\";\n\n $val = $this->Sales_Invoices_model->get_details(array(\"id\" => $data->fid_invoices))->row();\n\n if($val->status != \"posting\"){\n return array(\n modal_anchor(get_uri(\"sales/s_invoices/item_modal_form\"), \"<i class='fa fa-pencil'></i>\", array(\"class\" => \"edit\", \"title\" => lang('edit_invoice'), \"data-post-id\" => $data->id)).js_anchor(\"<i class='fa fa-times fa-fw'></i>\", array('title' => lang('delete'), \"class\" => \"delete\", \"data-id\" => $data->id, \"data-action-url\" => get_uri(\"sales/s_invoices/delete_item\"), \"data-action\" => \"delete\")),\n $item,\n to_decimal_format($data->quantity) . \" \" . $type,\n to_currency($data->rate),\n to_currency($data->total),\n\n\n );\n\n }else{\n return array(\n \"&nbsp;\",\n $item,\n to_decimal_format($data->quantity) . \" \" . $type,\n to_currency($data->rate),\n to_currency($data->total)\n\n \n\n );\n\n }\n }", "public function manageAddRow(array &$vars) \n {\n $view = $this->getView('add_row');\n Loader::loadHelpers($view, array('Form', 'Html', 'Widget'));\n\n $view->set('vars', (object) $vars);\n return $view->fetch();\n }", "public function renderCreateModalHTML()\n {\n $input_form = \"<div class=\\\"form-group\\\">\n <label for=\\\"{{label}}\\\">{{label}}</label>\n <input type=\\\"{{type}}\\\" class=\\\"form-control\\\" id=\\\"create_input_{{label}}\\\">\n </div>\";\n $break_line = \"\\n\";\n\n $form_result = \"\";\n $columns = $this->getShowColumnCreateModal();\n foreach ($columns as $name => $type) {\n $input_type = 'text';\n\n if ($type == \"bigint\" OR $type == \"integer\"){\n $input_type = 'number';\n }elseif ($type == \"string\"){\n $input_type = 'text';\n }elseif ($type == \"datetime\"){\n $input_type = 'datetime-local';\n }\n\n $one_form = str_replace(\n [\n '{{label}}','{{type}}'\n ],\n [\n $name, $input_type\n ],\n $input_form\n );\n $form_result = $form_result.$one_form.$break_line;\n }\n\n return $form_result;\n }", "function create_row($name, $type, $description, $pattern) {\n $id = strtolower(preg_replace('/[^\\w\\-\\.]+/', '', str_replace(' ', '-', $name)));\n $id = str_replace('.', '-', $id); // periods break the js code, because they are not valid in selector ids\n\n $row = '<div class=\"row border-bottom align-items-center\">';\n $row .= '<div class=\"col-12 col-md-3 small-h\">';\n $row .= '<h4 id=\"' . $id . '\" class=\"module-row-name-id\">';\n $row .= '<code>' . $name . '</code>';\n $row .= '<span class=\"text-muted\"> (' . $type . ')</span>';\n $row .=\n '<a href=#' .\n $id .\n ' class=\"header-link scroll_to_link me-2\"><span class=\"fas fa-link\" aria-hidden=\"true\"></span></a>';\n $row .= '</h4>';\n $row .= '</div>';\n $row .= '<div class=\" col-12 col-md' . ($pattern != '' ? '-5' : '-7') . '\">';\n $row .= '<span class=\"small\">' . parse_md($description)['content'] . '</span>';\n $row .= '</div>';\n $row .= '<div class=\"col-12 col-md' . ($pattern != '' ? '-4' : '-1') . ' ms-auto\">';\n if ($pattern != '') {\n $row .= '<code class=\"float-end\">' . $pattern . '</code>';\n }\n $row .= '</div>';\n\n $row .= '</div>';\n return $row;\n}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\n\t\t$this->id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// nombre_contacto\n\t\t// name\n\t\t// lastname\n\t\t// email\n\t\t// address\n\t\t// phone\n\t\t// cell\n\t\t// is_active\n\n\t\t$this->is_active->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// created_at\n\t\t// id_sucursal\n\t\t// documentos\n\n\t\t$this->documentos->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DateModified\n\t\t$this->DateModified->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DateDeleted\n\t\t$this->DateDeleted->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// CreatedBy\n\t\t$this->CreatedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// ModifiedBy\n\t\t$this->ModifiedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DeletedBy\n\t\t$this->DeletedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// latitud\n\t\t$this->latitud->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// longitud\n\t\t$this->longitud->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipoinmueble\n\t\t// id_ciudad_inmueble\n\t\t// id_provincia_inmueble\n\t\t// imagen_inmueble01\n\n\t\t$this->imagen_inmueble01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble02\n\t\t// imagen_inmueble03\n\t\t// imagen_inmueble04\n\t\t// imagen_inmueble05\n\t\t// imagen_inmueble06\n\n\t\t$this->imagen_inmueble06->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble07\n\t\t$this->imagen_inmueble07->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble08\n\t\t$this->imagen_inmueble08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipovehiculo\n\t\t// id_ciudad_vehiculo\n\t\t// id_provincia_vehiculo\n\t\t// imagen_vehiculo01\n\n\t\t$this->imagen_vehiculo01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo02\n\t\t// imagen_vehiculo03\n\n\t\t$this->imagen_vehiculo03->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo04\n\t\t$this->imagen_vehiculo04->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo05\n\t\t// imagen_vehiculo06\n\t\t// imagen_vehiculo07\n\t\t// imagen_vehiculo08\n\n\t\t$this->imagen_vehiculo08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipomaquinaria\n\t\t// id_ciudad_maquinaria\n\t\t// id_provincia_maquinaria\n\t\t// imagen_maquinaria01\n\n\t\t$this->imagen_maquinaria01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_maquinaria02\n\t\t// imagen_maquinaria03\n\t\t// imagen_maquinaria04\n\n\t\t$this->imagen_maquinaria04->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_maquinaria05\n\t\t// imagen_maquinaria06\n\t\t// imagen_maquinaria07\n\t\t// imagen_maquinaria08\n\n\t\t$this->imagen_maquinaria08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipomercaderia\n\t\t// imagen_mercaderia01\n\t\t// documento_mercaderia\n\t\t// tipoespecial\n\t\t// imagen_tipoespecial01\n\t\t// email_contacto\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// nombre_contacto\n\t\t$this->nombre_contacto->ViewValue = $this->nombre_contacto->CurrentValue;\n\t\t$this->nombre_contacto->ViewCustomAttributes = \"\";\n\n\t\t// name\n\t\t$this->name->ViewValue = $this->name->CurrentValue;\n\t\t$this->name->ViewCustomAttributes = \"\";\n\n\t\t// lastname\n\t\t$this->lastname->ViewValue = $this->lastname->CurrentValue;\n\t\t$this->lastname->ViewCustomAttributes = \"\";\n\n\t\t// email\n\t\t$this->_email->ViewValue = $this->_email->CurrentValue;\n\t\t$this->_email->ViewCustomAttributes = \"\";\n\n\t\t// address\n\t\t$this->address->ViewValue = $this->address->CurrentValue;\n\t\t$this->address->ViewCustomAttributes = \"\";\n\n\t\t// phone\n\t\t$this->phone->ViewValue = $this->phone->CurrentValue;\n\t\t$this->phone->ViewCustomAttributes = \"\";\n\n\t\t// cell\n\t\t$this->cell->ViewValue = $this->cell->CurrentValue;\n\t\t$this->cell->ViewCustomAttributes = \"\";\n\n\t\t// created_at\n\t\t$this->created_at->ViewValue = $this->created_at->CurrentValue;\n\t\t$this->created_at->ViewValue = ew_FormatDateTime($this->created_at->ViewValue, 17);\n\t\t$this->created_at->ViewCustomAttributes = \"\";\n\n\t\t// id_sucursal\n\t\tif (strval($this->id_sucursal->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_sucursal->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sucursal`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_sucursal->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`id`='\".$_SESSION[\"sucursal\"].\"'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_sucursal, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_sucursal->ViewValue = $this->id_sucursal->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_sucursal->ViewValue = $this->id_sucursal->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_sucursal->ViewValue = NULL;\n\t\t}\n\t\t$this->id_sucursal->ViewCustomAttributes = \"\";\n\n\t\t// tipoinmueble\n\t\tif (strval($this->tipoinmueble->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipoinmueble->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipoinmueble->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='INMUEBLE'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipoinmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipoinmueble->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipoinmueble->ViewValue .= $this->tipoinmueble->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipoinmueble->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipoinmueble->ViewValue = $this->tipoinmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipoinmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->tipoinmueble->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_inmueble\n\t\tif (strval($this->id_ciudad_inmueble->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_inmueble->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_inmueble->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_inmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_inmueble->ViewValue = $this->id_ciudad_inmueble->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_inmueble->ViewValue = $this->id_ciudad_inmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_inmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_inmueble->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_inmueble\n\t\tif (strval($this->id_provincia_inmueble->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_inmueble->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_inmueble->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_inmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_inmueble->ViewValue = $this->id_provincia_inmueble->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_inmueble->ViewValue = $this->id_provincia_inmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_inmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_inmueble->ViewCustomAttributes = \"\";\n\n\t\t// tipovehiculo\n\t\tif (strval($this->tipovehiculo->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipovehiculo->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipovehiculo->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='VEHICULO'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipovehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipovehiculo->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipovehiculo->ViewValue .= $this->tipovehiculo->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipovehiculo->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipovehiculo->ViewValue = $this->tipovehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipovehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->tipovehiculo->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_vehiculo\n\t\tif (strval($this->id_ciudad_vehiculo->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_vehiculo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_vehiculo->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_vehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_vehiculo->ViewValue = $this->id_ciudad_vehiculo->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_vehiculo->ViewValue = $this->id_ciudad_vehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_vehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_vehiculo->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_vehiculo\n\t\tif (strval($this->id_provincia_vehiculo->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_vehiculo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_vehiculo->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_vehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_vehiculo->ViewValue = $this->id_provincia_vehiculo->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_vehiculo->ViewValue = $this->id_provincia_vehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_vehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_vehiculo->ViewCustomAttributes = \"\";\n\n\t\t// tipomaquinaria\n\t\tif (strval($this->tipomaquinaria->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipomaquinaria->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipomaquinaria->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='MAQUINARIA'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipomaquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipomaquinaria->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipomaquinaria->ViewValue .= $this->tipomaquinaria->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipomaquinaria->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipomaquinaria->ViewValue = $this->tipomaquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipomaquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->tipomaquinaria->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_maquinaria\n\t\tif (strval($this->id_ciudad_maquinaria->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_maquinaria->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_maquinaria->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_maquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_maquinaria->ViewValue = $this->id_ciudad_maquinaria->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_maquinaria->ViewValue = $this->id_ciudad_maquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_maquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_maquinaria->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_maquinaria\n\t\tif (strval($this->id_provincia_maquinaria->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_maquinaria->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_maquinaria->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_maquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_maquinaria->ViewValue = $this->id_provincia_maquinaria->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_maquinaria->ViewValue = $this->id_provincia_maquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_maquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_maquinaria->ViewCustomAttributes = \"\";\n\n\t\t// tipomercaderia\n\t\tif (strval($this->tipomercaderia->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipomercaderia->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`id_tipoinmueble`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `id_tipoinmueble`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipomercaderia->LookupFilters = array();\n\t\t$lookuptblfilter = \"`tipo`='MERCADERIA'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipomercaderia, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipomercaderia->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipomercaderia->ViewValue .= $this->tipomercaderia->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipomercaderia->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipomercaderia->ViewValue = $this->tipomercaderia->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipomercaderia->ViewValue = NULL;\n\t\t}\n\t\t$this->tipomercaderia->ViewCustomAttributes = \"\";\n\n\t\t// documento_mercaderia\n\t\t$this->documento_mercaderia->ViewValue = $this->documento_mercaderia->CurrentValue;\n\t\t$this->documento_mercaderia->ViewCustomAttributes = \"\";\n\n\t\t// tipoespecial\n\t\tif (strval($this->tipoespecial->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipoespecial->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`id_tipoinmueble`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `id_tipoinmueble`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipoespecial->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='ESPECIAL'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipoespecial, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipoespecial->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipoespecial->ViewValue .= $this->tipoespecial->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipoespecial->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipoespecial->ViewValue = $this->tipoespecial->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipoespecial->ViewValue = NULL;\n\t\t}\n\t\t$this->tipoespecial->ViewCustomAttributes = \"\";\n\n\t\t// email_contacto\n\t\tif (strval($this->email_contacto->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`login`\" . ew_SearchString(\"=\", $this->email_contacto->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `login`, `nombre` AS `DispFld`, `apellido` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `oficialcredito`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->email_contacto->LookupFilters = array(\"dx1\" => '`nombre`', \"dx2\" => '`apellido`');\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->email_contacto, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$this->email_contacto->ViewValue = $this->email_contacto->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->email_contacto->ViewValue = $this->email_contacto->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->email_contacto->ViewValue = NULL;\n\t\t}\n\t\t$this->email_contacto->ViewCustomAttributes = \"\";\n\n\t\t\t// nombre_contacto\n\t\t\t$this->nombre_contacto->LinkCustomAttributes = \"\";\n\t\t\t$this->nombre_contacto->HrefValue = \"\";\n\t\t\t$this->nombre_contacto->TooltipValue = \"\";\n\n\t\t\t// name\n\t\t\t$this->name->LinkCustomAttributes = \"\";\n\t\t\t$this->name->HrefValue = \"\";\n\t\t\t$this->name->TooltipValue = \"\";\n\n\t\t\t// lastname\n\t\t\t$this->lastname->LinkCustomAttributes = \"\";\n\t\t\t$this->lastname->HrefValue = \"\";\n\t\t\t$this->lastname->TooltipValue = \"\";\n\n\t\t\t// email\n\t\t\t$this->_email->LinkCustomAttributes = \"\";\n\t\t\t$this->_email->HrefValue = \"\";\n\t\t\t$this->_email->TooltipValue = \"\";\n\n\t\t\t// address\n\t\t\t$this->address->LinkCustomAttributes = \"\";\n\t\t\t$this->address->HrefValue = \"\";\n\t\t\t$this->address->TooltipValue = \"\";\n\n\t\t\t// phone\n\t\t\t$this->phone->LinkCustomAttributes = \"\";\n\t\t\t$this->phone->HrefValue = \"\";\n\t\t\t$this->phone->TooltipValue = \"\";\n\n\t\t\t// cell\n\t\t\t$this->cell->LinkCustomAttributes = \"\";\n\t\t\t$this->cell->HrefValue = \"\";\n\t\t\t$this->cell->TooltipValue = \"\";\n\n\t\t\t// created_at\n\t\t\t$this->created_at->LinkCustomAttributes = \"\";\n\t\t\t$this->created_at->HrefValue = \"\";\n\t\t\t$this->created_at->TooltipValue = \"\";\n\n\t\t\t// id_sucursal\n\t\t\t$this->id_sucursal->LinkCustomAttributes = \"\";\n\t\t\t$this->id_sucursal->HrefValue = \"\";\n\t\t\t$this->id_sucursal->TooltipValue = \"\";\n\n\t\t\t// tipoinmueble\n\t\t\t$this->tipoinmueble->LinkCustomAttributes = \"\";\n\t\t\t$this->tipoinmueble->HrefValue = \"\";\n\t\t\t$this->tipoinmueble->TooltipValue = \"\";\n\n\t\t\t// tipovehiculo\n\t\t\t$this->tipovehiculo->LinkCustomAttributes = \"\";\n\t\t\t$this->tipovehiculo->HrefValue = \"\";\n\t\t\t$this->tipovehiculo->TooltipValue = \"\";\n\n\t\t\t// tipomaquinaria\n\t\t\t$this->tipomaquinaria->LinkCustomAttributes = \"\";\n\t\t\t$this->tipomaquinaria->HrefValue = \"\";\n\t\t\t$this->tipomaquinaria->TooltipValue = \"\";\n\n\t\t\t// tipomercaderia\n\t\t\t$this->tipomercaderia->LinkCustomAttributes = \"\";\n\t\t\t$this->tipomercaderia->HrefValue = \"\";\n\t\t\t$this->tipomercaderia->TooltipValue = \"\";\n\n\t\t\t// tipoespecial\n\t\t\t$this->tipoespecial->LinkCustomAttributes = \"\";\n\t\t\t$this->tipoespecial->HrefValue = \"\";\n\t\t\t$this->tipoespecial->TooltipValue = \"\";\n\n\t\t\t// email_contacto\n\t\t\t$this->email_contacto->LinkCustomAttributes = \"\";\n\t\t\t$this->email_contacto->HrefValue = \"\";\n\t\t\t$this->email_contacto->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\n\t\t\t// nombre_contacto\n\t\t\t$this->nombre_contacto->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nombre_contacto->EditCustomAttributes = \"\";\n\t\t\t$this->nombre_contacto->EditValue = ew_HtmlEncode($this->nombre_contacto->AdvancedSearch->SearchValue);\n\t\t\t$this->nombre_contacto->PlaceHolder = ew_RemoveHtml($this->nombre_contacto->FldTitle());\n\n\t\t\t// name\n\t\t\t$this->name->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->name->EditCustomAttributes = \"\";\n\t\t\t$this->name->EditValue = ew_HtmlEncode($this->name->AdvancedSearch->SearchValue);\n\t\t\t$this->name->PlaceHolder = ew_RemoveHtml($this->name->FldTitle());\n\n\t\t\t// lastname\n\t\t\t$this->lastname->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->lastname->EditCustomAttributes = \"\";\n\t\t\t$this->lastname->EditValue = ew_HtmlEncode($this->lastname->AdvancedSearch->SearchValue);\n\t\t\t$this->lastname->PlaceHolder = ew_RemoveHtml($this->lastname->FldTitle());\n\n\t\t\t// email\n\t\t\t$this->_email->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->_email->EditCustomAttributes = \"\";\n\t\t\t$this->_email->EditValue = ew_HtmlEncode($this->_email->AdvancedSearch->SearchValue);\n\t\t\t$this->_email->PlaceHolder = ew_RemoveHtml($this->_email->FldTitle());\n\n\t\t\t// address\n\t\t\t$this->address->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->address->EditCustomAttributes = \"\";\n\t\t\t$this->address->EditValue = ew_HtmlEncode($this->address->AdvancedSearch->SearchValue);\n\t\t\t$this->address->PlaceHolder = ew_RemoveHtml($this->address->FldTitle());\n\n\t\t\t// phone\n\t\t\t$this->phone->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->phone->EditCustomAttributes = \"\";\n\t\t\t$this->phone->EditValue = ew_HtmlEncode($this->phone->AdvancedSearch->SearchValue);\n\t\t\t$this->phone->PlaceHolder = ew_RemoveHtml($this->phone->FldTitle());\n\n\t\t\t// cell\n\t\t\t$this->cell->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->cell->EditCustomAttributes = \"\";\n\t\t\t$this->cell->EditValue = ew_HtmlEncode($this->cell->AdvancedSearch->SearchValue);\n\t\t\t$this->cell->PlaceHolder = ew_RemoveHtml($this->cell->FldTitle());\n\n\t\t\t// created_at\n\t\t\t$this->created_at->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->created_at->EditCustomAttributes = \"\";\n\t\t\t$this->created_at->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->created_at->AdvancedSearch->SearchValue, 17), 17));\n\t\t\t$this->created_at->PlaceHolder = ew_RemoveHtml($this->created_at->FldTitle());\n\n\t\t\t// id_sucursal\n\t\t\t$this->id_sucursal->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_sucursal->EditCustomAttributes = \"\";\n\n\t\t\t// tipoinmueble\n\t\t\t$this->tipoinmueble->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipoinmueble->EditCustomAttributes = \"\";\n\n\t\t\t// tipovehiculo\n\t\t\t$this->tipovehiculo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipovehiculo->EditCustomAttributes = \"\";\n\n\t\t\t// tipomaquinaria\n\t\t\t$this->tipomaquinaria->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipomaquinaria->EditCustomAttributes = \"\";\n\n\t\t\t// tipomercaderia\n\t\t\t$this->tipomercaderia->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipomercaderia->EditCustomAttributes = \"\";\n\n\t\t\t// tipoespecial\n\t\t\t$this->tipoespecial->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipoespecial->EditCustomAttributes = \"\";\n\n\t\t\t// email_contacto\n\t\t\t$this->email_contacto->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->email_contacto->EditCustomAttributes = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) // Add/Edit/Search row\n\t\t\t$this->SetupFieldTitles();\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function PKG_OptionPageRender($layout)\n{\n\tfor ($i=0; $i < count($layout); $i++)\n\t\t{\n\t\t\tswitch($layout[$i]['type'])\n\t\t\t\t{\n\t\t\t\t\tcase \"text\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo(\"<tr><td colspan=\\\"2\\\">\".$layout[$i]['text'].\"</td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\t\t\t\t\tcase \"line\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo(\"<tr><td colspan=\\\"2\\\"><hr></td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\t\t\t\t\tcase \"title\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo(\"<tr><td colspan=\\\"2\\\"><br><span class=\\\"title\\\">\".$layout[$i]['text'].\"</span><hr></td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\t\t\t\t\tcase \"infobox\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$infoBox = MSG_showMessageBoxHeader(\"infotable\",$layout[$i]['text'],700,true).MSG_showMessageBoxFooter(true);\n\t\t\t\t\t\t\techo(\"<tr><td colspan=\\\"2\\\">$infoBox</td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\tcase \"inputline\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Define the dialog element\n\t\t\t\t\t\t\t$layout[$i]['value'] = HTML_input($layout[$i]['name'], $layout['allvalues'][$layout[$i]['name']], $layout[$i]['size'], $layout[$i]['maxlength'], INPUT_TYPE_text);\n\n\t\t\t\t\t\t\t//Show it\n\t\t\t\t\t\t\techo(\"<tr><td>\".$layout[$i]['text'].\"</td><td>\".constant($layout[$i]['name']).\"</td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\n\t\t\t\t\tcase \"selection\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$arr = array();\n\n\t\t\t\t\t\t\t//Generate the array for the options\n\t\t\t\t\t\t\tfor ($nr=0; isset($layout[$i][\"option\".$nr]); $nr++)\n\t\t\t\t\t\t\t\t$arr[$layout[$i]['option'.$nr]] = $layout[$i]['option'.$nr];\n\n\t\t\t\t\t\t\t//Define the dialog element\n\t\t\t\t\t\t\t$layout[$i]['value'] = HTML_selection($layout[$i]['name'], $arr, SELTYPE_selection, true, $layout['allvalues'][$layout[$i]['name']]);\n\n\t\t\t\t\t\t\t//Show it\n\t\t\t\t\t\t\techo(\"<tr><td>\".$layout[$i]['text'].\"</td><td>\".constant($layout[$i]['name']).\"</td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\t\t\t\t\tcase \"textarea\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$layout[$i]['value'] = HTML_textArea($layout[$i]['name'], $layout[$i]['cols'], $layout[$i]['rows'], $layout['allvalues'][$layout[$i]['name']]);\n\n\t\t\t\t\t\t\t//Show it\n\t\t\t\t\t\t\techo(\"<tr><td>\".$layout[$i]['text'].\"</td><td>\".constant($layout[$i]['name']).\"</td></tr>\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\t\t\t\t};\n\t\t};\n}", "function RenderRow() {\r\n\t\tglobal $Security, $Language, $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Call Row_Rendering event\r\n\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// Id_Reasignacion\r\n\t\t// Titular_Original\r\n\t\t// Dni\r\n\t\t// NroSerie\r\n\t\t// Nuevo_Titular\r\n\t\t// Dni_Nuevo_Tit\r\n\t\t// Id_Motivo_Reasig\r\n\t\t// Observacion\r\n\t\t// Fecha_Reasignacion\r\n\t\t// Usuario\r\n\t\t// Fecha_Actualizacion\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t// Id_Reasignacion\r\n\t\t$this->Id_Reasignacion->ViewValue = $this->Id_Reasignacion->CurrentValue;\r\n\t\t$this->Id_Reasignacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Titular_Original\r\n\t\t$this->Titular_Original->ViewValue = $this->Titular_Original->CurrentValue;\r\n\t\tif (strval($this->Titular_Original->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Apellidos_Nombres`\" . ew_SearchString(\"=\", $this->Titular_Original->CurrentValue, EW_DATATYPE_MEMO, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Apellidos_Nombres`, `Apellidos_Nombres` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `personas`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Titular_Original->LookupFilters = array(\"dx1\" => \"`Apellidos_Nombres`\");\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Titular_Original, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Titular_Original->ViewValue = $this->Titular_Original->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Titular_Original->ViewValue = $this->Titular_Original->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Titular_Original->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Titular_Original->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Dni\r\n\t\t$this->Dni->ViewValue = $this->Dni->CurrentValue;\r\n\t\t$this->Dni->ViewCustomAttributes = \"\";\r\n\r\n\t\t// NroSerie\r\n\t\t$this->NroSerie->ViewValue = $this->NroSerie->CurrentValue;\r\n\t\tif (strval($this->NroSerie->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`NroSerie`\" . ew_SearchString(\"=\", $this->NroSerie->CurrentValue, EW_DATATYPE_STRING, \"\");\r\n\t\t$sSqlWrk = \"SELECT `NroSerie`, `NroSerie` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `equipos`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->NroSerie->LookupFilters = array(\"dx1\" => \"`NroSerie`\");\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->NroSerie, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->NroSerie->ViewValue = $this->NroSerie->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->NroSerie->ViewValue = $this->NroSerie->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->NroSerie->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->NroSerie->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Nuevo_Titular\r\n\t\t$this->Nuevo_Titular->ViewValue = $this->Nuevo_Titular->CurrentValue;\r\n\t\tif (strval($this->Nuevo_Titular->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Apellidos_Nombres`\" . ew_SearchString(\"=\", $this->Nuevo_Titular->CurrentValue, EW_DATATYPE_MEMO, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Apellidos_Nombres`, `Apellidos_Nombres` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `personas`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Nuevo_Titular->LookupFilters = array(\"dx1\" => \"`Apellidos_Nombres`\");\r\n\t\t$lookuptblfilter = \"`NroSerie`='0'\";\r\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Nuevo_Titular, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Nuevo_Titular->ViewValue = $this->Nuevo_Titular->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Nuevo_Titular->ViewValue = $this->Nuevo_Titular->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Nuevo_Titular->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Nuevo_Titular->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Dni_Nuevo_Tit\r\n\t\t$this->Dni_Nuevo_Tit->ViewValue = $this->Dni_Nuevo_Tit->CurrentValue;\r\n\t\t$this->Dni_Nuevo_Tit->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Motivo_Reasig\r\n\t\tif (strval($this->Id_Motivo_Reasig->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Motivo_Reasig`\" . ew_SearchString(\"=\", $this->Id_Motivo_Reasig->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Motivo_Reasig`, `Descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `motivo_reasignacion`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Motivo_Reasig->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Motivo_Reasig, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Motivo_Reasig->ViewValue = $this->Id_Motivo_Reasig->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Motivo_Reasig->ViewValue = $this->Id_Motivo_Reasig->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Motivo_Reasig->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Motivo_Reasig->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Observacion\r\n\t\t$this->Observacion->ViewValue = $this->Observacion->CurrentValue;\r\n\t\t$this->Observacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Fecha_Reasignacion\r\n\t\t$this->Fecha_Reasignacion->ViewValue = $this->Fecha_Reasignacion->CurrentValue;\r\n\t\t$this->Fecha_Reasignacion->ViewValue = ew_FormatDateTime($this->Fecha_Reasignacion->ViewValue, 7);\r\n\t\t$this->Fecha_Reasignacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Usuario\r\n\t\t$this->Usuario->ViewValue = $this->Usuario->CurrentValue;\r\n\t\t$this->Usuario->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Fecha_Actualizacion\r\n\t\t$this->Fecha_Actualizacion->ViewValue = $this->Fecha_Actualizacion->CurrentValue;\r\n\t\t$this->Fecha_Actualizacion->ViewValue = ew_FormatDateTime($this->Fecha_Actualizacion->ViewValue, 0);\r\n\t\t$this->Fecha_Actualizacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Id_Reasignacion\r\n\t\t\t$this->Id_Reasignacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Reasignacion->HrefValue = \"\";\r\n\t\t\t$this->Id_Reasignacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Titular_Original\r\n\t\t\t$this->Titular_Original->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Titular_Original->HrefValue = \"\";\r\n\t\t\t$this->Titular_Original->TooltipValue = \"\";\r\n\r\n\t\t\t// Dni\r\n\t\t\t$this->Dni->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Dni->HrefValue = \"\";\r\n\t\t\t$this->Dni->TooltipValue = \"\";\r\n\r\n\t\t\t// NroSerie\r\n\t\t\t$this->NroSerie->LinkCustomAttributes = \"\";\r\n\t\t\t$this->NroSerie->HrefValue = \"\";\r\n\t\t\t$this->NroSerie->TooltipValue = \"\";\r\n\r\n\t\t\t// Nuevo_Titular\r\n\t\t\t$this->Nuevo_Titular->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Nuevo_Titular->HrefValue = \"\";\r\n\t\t\t$this->Nuevo_Titular->TooltipValue = \"\";\r\n\r\n\t\t\t// Dni_Nuevo_Tit\r\n\t\t\t$this->Dni_Nuevo_Tit->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Dni_Nuevo_Tit->HrefValue = \"\";\r\n\t\t\t$this->Dni_Nuevo_Tit->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Motivo_Reasig\r\n\t\t\t$this->Id_Motivo_Reasig->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Motivo_Reasig->HrefValue = \"\";\r\n\t\t\t$this->Id_Motivo_Reasig->TooltipValue = \"\";\r\n\r\n\t\t\t// Observacion\r\n\t\t\t$this->Observacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Observacion->HrefValue = \"\";\r\n\t\t\t$this->Observacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Fecha_Reasignacion\r\n\t\t\t$this->Fecha_Reasignacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Fecha_Reasignacion->HrefValue = \"\";\r\n\t\t\t$this->Fecha_Reasignacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Usuario\r\n\t\t\t$this->Usuario->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Usuario->HrefValue = \"\";\r\n\t\t\t$this->Usuario->TooltipValue = \"\";\r\n\r\n\t\t\t// Fecha_Actualizacion\r\n\t\t\t$this->Fecha_Actualizacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Fecha_Actualizacion->HrefValue = \"\";\r\n\t\t\t$this->Fecha_Actualizacion->TooltipValue = \"\";\r\n\t\t} elseif ($this->RowType == EW_ROWTYPE_SEARCH) { // Search row\r\n\r\n\t\t\t// Id_Reasignacion\r\n\t\t\t$this->Id_Reasignacion->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Id_Reasignacion->EditCustomAttributes = \"\";\r\n\t\t\t$this->Id_Reasignacion->EditValue = ew_HtmlEncode($this->Id_Reasignacion->AdvancedSearch->SearchValue);\r\n\t\t\t$this->Id_Reasignacion->PlaceHolder = ew_RemoveHtml($this->Id_Reasignacion->FldCaption());\r\n\r\n\t\t\t// Titular_Original\r\n\t\t\t$this->Titular_Original->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Titular_Original->EditCustomAttributes = \"\";\r\n\t\t\t$this->Titular_Original->EditValue = ew_HtmlEncode($this->Titular_Original->AdvancedSearch->SearchValue);\r\n\t\t\tif (strval($this->Titular_Original->AdvancedSearch->SearchValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Apellidos_Nombres`\" . ew_SearchString(\"=\", $this->Titular_Original->AdvancedSearch->SearchValue, EW_DATATYPE_MEMO, \"\");\r\n\t\t\t$sSqlWrk = \"SELECT `Apellidos_Nombres`, `Apellidos_Nombres` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `personas`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Titular_Original->LookupFilters = array(\"dx1\" => \"`Apellidos_Nombres`\");\r\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t$this->Lookup_Selecting($this->Titular_Original, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$arwrk = array();\r\n\t\t\t\t\t$arwrk[1] = ew_HtmlEncode($rswrk->fields('DispFld'));\r\n\t\t\t\t\t$this->Titular_Original->EditValue = $this->Titular_Original->DisplayValue($arwrk);\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Titular_Original->EditValue = ew_HtmlEncode($this->Titular_Original->AdvancedSearch->SearchValue);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Titular_Original->EditValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Titular_Original->PlaceHolder = ew_RemoveHtml($this->Titular_Original->FldCaption());\r\n\r\n\t\t\t// Dni\r\n\t\t\t$this->Dni->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Dni->EditCustomAttributes = \"\";\r\n\t\t\t$this->Dni->EditValue = ew_HtmlEncode($this->Dni->AdvancedSearch->SearchValue);\r\n\t\t\t$this->Dni->PlaceHolder = ew_RemoveHtml($this->Dni->FldCaption());\r\n\r\n\t\t\t// NroSerie\r\n\t\t\t$this->NroSerie->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->NroSerie->EditCustomAttributes = \"\";\r\n\t\t\t$this->NroSerie->EditValue = ew_HtmlEncode($this->NroSerie->AdvancedSearch->SearchValue);\r\n\t\t\tif (strval($this->NroSerie->AdvancedSearch->SearchValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`NroSerie`\" . ew_SearchString(\"=\", $this->NroSerie->AdvancedSearch->SearchValue, EW_DATATYPE_STRING, \"\");\r\n\t\t\t$sSqlWrk = \"SELECT `NroSerie`, `NroSerie` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `equipos`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->NroSerie->LookupFilters = array(\"dx1\" => \"`NroSerie`\");\r\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t$this->Lookup_Selecting($this->NroSerie, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$arwrk = array();\r\n\t\t\t\t\t$arwrk[1] = ew_HtmlEncode($rswrk->fields('DispFld'));\r\n\t\t\t\t\t$this->NroSerie->EditValue = $this->NroSerie->DisplayValue($arwrk);\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->NroSerie->EditValue = ew_HtmlEncode($this->NroSerie->AdvancedSearch->SearchValue);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->NroSerie->EditValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->NroSerie->PlaceHolder = ew_RemoveHtml($this->NroSerie->FldCaption());\r\n\r\n\t\t\t// Nuevo_Titular\r\n\t\t\t$this->Nuevo_Titular->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Nuevo_Titular->EditCustomAttributes = \"\";\r\n\t\t\t$this->Nuevo_Titular->EditValue = ew_HtmlEncode($this->Nuevo_Titular->AdvancedSearch->SearchValue);\r\n\t\t\tif (strval($this->Nuevo_Titular->AdvancedSearch->SearchValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Apellidos_Nombres`\" . ew_SearchString(\"=\", $this->Nuevo_Titular->AdvancedSearch->SearchValue, EW_DATATYPE_MEMO, \"\");\r\n\t\t\t$sSqlWrk = \"SELECT `Apellidos_Nombres`, `Apellidos_Nombres` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `personas`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Nuevo_Titular->LookupFilters = array(\"dx1\" => \"`Apellidos_Nombres`\");\r\n\t\t\t$lookuptblfilter = \"`NroSerie`='0'\";\r\n\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\r\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t$this->Lookup_Selecting($this->Nuevo_Titular, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$arwrk = array();\r\n\t\t\t\t\t$arwrk[1] = ew_HtmlEncode($rswrk->fields('DispFld'));\r\n\t\t\t\t\t$this->Nuevo_Titular->EditValue = $this->Nuevo_Titular->DisplayValue($arwrk);\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Nuevo_Titular->EditValue = ew_HtmlEncode($this->Nuevo_Titular->AdvancedSearch->SearchValue);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Nuevo_Titular->EditValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Nuevo_Titular->PlaceHolder = ew_RemoveHtml($this->Nuevo_Titular->FldCaption());\r\n\r\n\t\t\t// Dni_Nuevo_Tit\r\n\t\t\t$this->Dni_Nuevo_Tit->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Dni_Nuevo_Tit->EditCustomAttributes = \"\";\r\n\t\t\t$this->Dni_Nuevo_Tit->EditValue = ew_HtmlEncode($this->Dni_Nuevo_Tit->AdvancedSearch->SearchValue);\r\n\t\t\t$this->Dni_Nuevo_Tit->PlaceHolder = ew_RemoveHtml($this->Dni_Nuevo_Tit->FldCaption());\r\n\r\n\t\t\t// Id_Motivo_Reasig\r\n\t\t\t$this->Id_Motivo_Reasig->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Id_Motivo_Reasig->EditCustomAttributes = \"\";\r\n\t\t\tif (trim(strval($this->Id_Motivo_Reasig->AdvancedSearch->SearchValue)) == \"\") {\r\n\t\t\t\t$sFilterWrk = \"0=1\";\r\n\t\t\t} else {\r\n\t\t\t\t$sFilterWrk = \"`Id_Motivo_Reasig`\" . ew_SearchString(\"=\", $this->Id_Motivo_Reasig->AdvancedSearch->SearchValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t\t}\r\n\t\t\t$sSqlWrk = \"SELECT `Id_Motivo_Reasig`, `Descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `motivo_reasignacion`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Id_Motivo_Reasig->LookupFilters = array();\r\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t$this->Lookup_Selecting($this->Id_Motivo_Reasig, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\t$this->Id_Motivo_Reasig->EditValue = $arwrk;\r\n\r\n\t\t\t// Observacion\r\n\t\t\t$this->Observacion->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Observacion->EditCustomAttributes = \"\";\r\n\t\t\t$this->Observacion->EditValue = ew_HtmlEncode($this->Observacion->AdvancedSearch->SearchValue);\r\n\t\t\t$this->Observacion->PlaceHolder = ew_RemoveHtml($this->Observacion->FldCaption());\r\n\r\n\t\t\t// Fecha_Reasignacion\r\n\t\t\t$this->Fecha_Reasignacion->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Fecha_Reasignacion->EditCustomAttributes = \"\";\r\n\t\t\t$this->Fecha_Reasignacion->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->Fecha_Reasignacion->AdvancedSearch->SearchValue, 7), 7));\r\n\t\t\t$this->Fecha_Reasignacion->PlaceHolder = ew_RemoveHtml($this->Fecha_Reasignacion->FldCaption());\r\n\r\n\t\t\t// Usuario\r\n\t\t\t$this->Usuario->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Usuario->EditCustomAttributes = \"\";\r\n\t\t\t$this->Usuario->EditValue = ew_HtmlEncode($this->Usuario->AdvancedSearch->SearchValue);\r\n\t\t\t$this->Usuario->PlaceHolder = ew_RemoveHtml($this->Usuario->FldCaption());\r\n\r\n\t\t\t// Fecha_Actualizacion\r\n\t\t\t$this->Fecha_Actualizacion->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Fecha_Actualizacion->EditCustomAttributes = \"\";\r\n\t\t\t$this->Fecha_Actualizacion->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->Fecha_Actualizacion->AdvancedSearch->SearchValue, 0), 8));\r\n\t\t\t$this->Fecha_Actualizacion->PlaceHolder = ew_RemoveHtml($this->Fecha_Actualizacion->FldCaption());\r\n\t\t}\r\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$this->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function genSubmitRow(){\n\t\t$row = array();\n\t\tarray_pad($row, sizeof($this->table[0]), '');\n\n\t\tif($this->state->isNewEntry()){\n\t\t\t$textField = 'text';\n\t\t\t$row[0] = $this->translator->markupAttributes('input', '',array('type'=>'text', 'name'=>'user'));\n\t\t\t$row[1] = $this->translator->markupAttributes('input','',array('type'=>'submit', 'name'=>'submit', 'value'=>'Submit'));\n\n\n\t\t\tfor($count = 2; $count < sizeof($this->table[0]); $count++) $row[$count] = $this->translator->markupAttributes('input', '',array('type'=>'checkbox', 'name'=>$count));\n\t\t\n\t\t}\n\t\telse{\n\t\t\t$row[0] = '';\n\t\t\t$row[1] = $this->translator->markupAttributes('input','',array('type'=>'submit', 'name'=>'new', 'value'=>'New'));\n\n\t\t\tfor($count = 2; $count < sizeof($this->table[0]); $count++) $row[$count] = '';\n\t\t}\n\n\t\treturn $row;\n\t}", "public function modalContent() {\n\n $fields = array( __( 'Template Rule Settings', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ) => array() );\n $sKey = key( $fields );\n\n //------------------------------------------------------------------\n // GENERIC PARAM\n //------------------------------------------------------------------\n\n $helpContent = $this->helpContent( __( 'Choose the value of this generic param.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ),\n __( 'Choose the value of this generic param. It is set only for process flowing, and it is not used anywhere in your WordPress environment.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ) );\n\n $fields[$sKey][] = array(\n array(\n 'type' => WPDKUIControlType::CUSTOM,\n 'content' => $helpContent\n )\n );\n\n $fields[$sKey][] = array(\n array(\n 'type' => WPDKUIControlType::TEXT,\n 'name' => $this->_model->id() . '-generic-param',\n 'value' => $this->_model->genericParam(),\n 'label' => array(\n 'value' => __( 'Generic Param', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ),\n 'data' => array( 'placement' => 'right' )\n ),\n 'size' => 24,\n 'title' => __( 'Enter the value of this generic param. It is set only for process flowing, and it is not used anywhere in your WordPress environment.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN )\n )\n );\n\n $layout = new WPDKUIControlsLayout( $fields );\n\n // Build output buffer\n $outputBuffer = '<form name=\"' . $this->_model->id() . '-form\" method=\"POST\" action=\"\">' .\n $layout->html() .\n '</form>';\n\n return $outputBuffer;\n\n }", "public function manageAddRow(array &$vars)\n {\n // Load the view into this object, so helpers can be automatically added to the view\n $this->view = new View('add_row', 'default');\n $this->view->base_uri = $this->base_uri;\n $this->view->setDefaultView('components' . DS . 'modules' . DS . 'ispapi' . DS);\n\n // Load the helpers required for this view\n Loader::loadHelpers($this, ['Form', 'Html', 'Widget']);\n\n // Set unspecified checkboxes\n if (!empty($vars)) {\n if (empty($vars['sandbox'])) {\n $vars['sandbox'] = 'false';\n }\n }\n\n $this->view->set('vars', (object)$vars);\n\n return $this->view->fetch();\n }", "function build_row($row)\n{\n\t$name = $row->getColumnVal('Name');\n\t$id = $row->getColumnVal('Id');\n\n\t// Setup the columns you want to work with\n\t$idCol = $row->getCol('Id');\n\t$nameCol = $row->getCol('Name');\n\t$actionCol = $row->getCol('Action');\n\t$typeCol = $row->getCol('Type');\n\n\t// Set some HTML properties on the give column\n\t$idCol->setProp('width','50');\n\t$typeCol->setProp('width','50');\n\t$typeCol->addClass('center');\n\n\t// Add some CSS classes to the action column\n\t$actionCol\n\t\t-> addClass('center')\n\t\t-> addClass('btn');\n\n\t// Add an action link to the Action column\n\t$row->addLink('Action', \"examples.php?id=$id\", '[edit]', \"\", \"no-un\");\n\t$row->addLink('Action', \"examples.php?id=$id\", '[delete]', \"\", \"no-un\");\n\n\t// Set an ID on the row\n\t$row->setProp('id', \"tr_$id\");\n\n\t// set the background of the strawberry column to black\n\tif($name == \"Strawberry\")\n\t{\n\t\t// get an instance of the column and set a css class\n\t\t$nameCol->addClass('strawberry');\n\t}\n\n\t// set the background of the entire shoe row to red\n\tif($name == \"Chocolate\")\t\n\t{\n\t\t$row->addClass('chocolate');\n\t}\n\n\t// change one of the cell values\n\tif($name == \"Banana\")\t\n\t{\n\t\t$row->setVal('Name', $name . \" (favorite) <img src='https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcROTNegrNoPzMFMcpQ4pl7tko9LMwgoXuZyjTmX8vpUuPS_RfZr' />\");\n\t}\n\n\treturn $row;\n}", "public function generate()\n {\n switch ($this->sColumn) {\n case 'description':\n $this->oForm->addElement(\n new Textarea(\n t('Description:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,20,4000)',\n 'value' => $this->sVal,\n 'validation' => new Str(20, 4000),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'punchline':\n $this->oForm->addElement(\n new Textbox(\n t('Punchline/Headline:'),\n 'punchline',\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,5,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(5, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'country':\n $this->oForm->addElement(\n new Country(\n t('Country:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'value' => $this->sVal,\n 'required' => 1\n ]\n )\n );\n break;\n\n case 'city':\n $this->oForm->addElement(\n new Textbox(\n t('City:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'state':\n $this->oForm->addElement(\n new Textbox(\n t('State/Province:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'zipCode':\n $this->oForm->addElement(\n new Textbox(\n t('Postal Code:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,15)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 15)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'middleName':\n $this->oForm->addElement(\n new Textbox(\n t('Middle Name:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('name'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'value' => $this->sVal,\n 'validation' => new Name\n ]\n )\n );\n $this->addCheckErrSpan('name');\n break;\n\n case 'height':\n $this->oForm->addElement(\n new Height(\n t('Height:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'weight':\n $this->oForm->addElement(\n new Weight(\n t('Weight:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'website':\n case 'socialNetworkSite':\n $sLabel = $this->sColumn === 'socialNetworkSite' ? t('Social Media Profile:') : t('Website:');\n $sDesc = $this->sColumn === 'socialNetworkSite' ? t('The URL of your social profile, such as Facebook, Instagram, Snapchat, LinkedIn, ...') : t('Your Personal Website/Blog (any promotional/affiliated contents will be removed)');\n $this->oForm->addElement(\n new Url(\n $sLabel,\n $this->sColumn, [\n 'id' => $this->getFieldId('url'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'description' => $sDesc,\n 'value' => $this->sVal\n ]\n )\n );\n $this->addCheckErrSpan('url');\n break;\n\n case 'phone':\n $this->oForm->addElement(\n new Phone(\n t('Phone Number:'),\n $this->sColumn,\n array_merge(\n [\n 'id' => $this->getFieldId('phone'),\n 'onblur' => 'CValid(this.value, this.id)',\n 'value' => $this->sVal,\n ],\n self::setCustomValidity(\n t('Enter full number with area code.')\n ),\n )\n )\n );\n $this->addCheckErrSpan('phone');\n break;\n\n default:\n $sLangKey = strtolower($this->sColumn);\n $sClass = '\\PFBC\\Element\\\\' . $this->getFieldType();\n $this->oForm->addElement(new $sClass(t($sLangKey), $this->sColumn, ['value' => $this->sVal]));\n }\n\n return $this->oForm;\n }", "public function render_page() {\n $form_id=str_replace(' ','',$this->form_name).'Form';\n $form_field_ids=array();\n $html='';\n $associated_upload_field=NULL;\n foreach ($this->page_fields as $single_group) {\n foreach($single_group['fields'] as $single_field) {\n if($single_field['field_type']==\"upload\") {\n $associated_upload_field=$single_field;\n \n }\n }\n }\n \n //sort out the dialog first\n if($this->id_field != '') {\n \n $sql_result=$this->db->query($this->selector_query);\n $table_data=\"\";\n \n foreach($sql_result as $row) {\n $table_data.=\"<tr id='\".$row[$this->id_field].\"'>\";\n foreach($this->selector_field_list as $selector_field) {\n $table_data.=\"<td>\".$row[$selector_field].\"</td>\";\n }\n $table_data.=\"</tr>\";\n }\n \n $html.='<div id=\"'.str_replace(' ','_',$this->form_name).'_dialog\" title=\"Dialog Title\">';\n //put the html together for the selector and send it off with the JS\n $html.='<table id=\"'.str_replace(' ','_',$this->form_name).'_'.$this->id_field.'_selector\" class=\"display\" cellspacing=\"0\"\" width=\"100%\"><thead><tr>';\n foreach($this->selector_field_list as $field) {\n $html.='<th>'.$field.'</th>';\n }\n $html.='</tr></thead></tbody>'.$table_data.\"</tbody></table>\";\n $html.='</div>';\n }\n \n \n \n \n \n //add the start of the form using a table for layout\n $upload_warning_field_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),str_replace(' ','_',$associated_upload_field['field_name'])));\n $html.='\n <form id=\"'.$form_id.'\" method=\"POST\" >';\n if (!is_null($associated_upload_field)) {\n $html.='<div id=\"'.$upload_warning_field_id.'_dialog\"></div>';\n }\n $html.='\n <table class=\"page_container\">\n <tr><td colspan=\"2\"><h1>'.$this->form_name.'</h1></td></tr>';\n \n //iterate over the fields, and groups of fields, and render the form\n foreach ($this->page_fields as $single_group) {\n $sub_heading=ucwords($single_group['sub_heading']);\n \n //add the sub heading for this group of fields\n $html.='<tr><th colspan=\"2\" class=\"sub_heading\"><h2>'.$sub_heading.'</h2></th></tr>';\n \n //add the fields, including the sub headings, for this grouping\n foreach($single_group['fields'] as $single_field) {\n \n //set the id that will be used to extract data from this field in JS and define it on the page\n $input_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),str_replace(' ','_',$single_field['field_name'])));\n $form_field_ids[str_replace(' ','_',$single_field['field_name'])]=$input_id;\n //add each field into the HTML\n switch ($single_field['field_type']) {\n //for a text field, that is to be on a single row\n case 'text':\n $html.='<tr><th class=\"left_col\">'.ucwords($single_field['field_name']).'</th><td><input id=\"'.$input_id.'\" type=\"text\" style=\"width:'.$single_field['length'].'px;\" /></td></tr>\n <tr><th></th><td><span id=\"'.$input_id.'_error\"></span></td></tr>';\n break;\n \n //for a text field, that is to be on a single row\n case 'currency':\n $html.='<tr><th class=\"left_col\">'.ucwords($single_field['field_name']).' $</th><td><input id=\"'.$input_id.'\" type=\"text\" style=\"width:'.$single_field['length'].'px;\" /></td></tr>\n <tr><th></th><td><span id=\"'.$input_id.'_error\"></span></td></tr>';\n break;\n \n //for a text area which is supposed to be multiple rows and columns\n case 'textarea':\n $html.='<tr><th class=\"left_col\">'.ucwords($single_field['field_name']).'</th><td><textarea id=\"'.$input_id.'\" cols=\"'.$single_field['columns'].'\" rows=\"'.$single_field['rows'].'\"></textarea></td></tr>\n <tr><th></th><td><span id=\"'.$input_id.'_error\"></span></td></tr>';\n break;\n \n //for a label area which gets its content from another field\n case 'annotation':\n //TODO: test annotation types on something other than an upload field\n //'field_name'=>$field_name,\n //'field_type'=>'annotation',\n //'length'=>$field_length,\n //'lookup_no_match'=>$no_match_value,\n //'lookup_query'=>$lookup_query,\n //'anchor'=>$anchor\n $anchors=explode('|',$single_field['anchor']);\n $html.='<tr><th class=\"left_col\">'.ucwords($single_field['field_name']).'</th><td><input id=\"'.$input_id.'\" disabled type=\"text\" style=\"width:'.$single_field['length'].'px;\" /></td></tr>\n <tr><th></th><td><span id=\"'.$input_id.'_error\"></span></td></tr>';\n $lookup_data=$this->db->query($single_field['lookup_query']);\n \n if ($anchors[2]==\"mime_type\") {\n $anchor_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),str_replace(' ','_',$anchors[1]),'fileToUpload'));\n $annotation_js='\n var mime_type=$(\"#'.$anchor_id.'\")[0].files[0].type;\n var document_lookup={';\n foreach($lookup_data as $single_entry) {\n $annotation_js.='\"'.$single_entry['data_key'].'\":\"'.$single_entry['data_value'].'\",';\n }\n $annotation_js.='};\n var converted_type=document_lookup[mime_type];\n if (converted_type==null) {\n converted_type=\"'.$single_field['lookup_no_match'].'\";\n }\n $(\"#'.$input_id.'\").val(converted_type);';\n \n $this->annotations[]=$annotation_js;\n }\n \n \n break;\n \n //for an upload field which gets its content with a file input\n case 'upload':\n $html.='<tr><td>\n <input style=\"display:none\" type=\"file\" id=\"'.$input_id.'_fileToUpload\" />\n <label class=\"file_upload_label\" for=\"'.$input_id.'_fileToUpload\">'.$single_field['upload_button_text'].'</label>\n </td><td>\n <input id=\"'.$input_id.'_filename\" disabled type=\"text\" placeholder=\"'.$single_field['placeholder'].'\" style=\"width: '.$single_field['length'].'px;\" />\n </td></tr>';\n //need a maximum upload size hidden field somewhere\n $html.='<input type=\"hidden\" id=\"'.$input_id.'_max_filesize\" value=\"'.$single_field['max_size'].'\" />';\n \n //also need an error message container here\n $html.='<tr><td colspan=\"2\">\n <div id=\"'.$input_id.'_error_message_container\" class=\"ui-widget\">\n <div class=\"ui-state-error ui-corner-all\" style=\"padding: 0 .7em;\"> \n <p><span class=\"ui-icon ui-icon-alert\" style=\"float: left; margin-right: .3em;\"></span><strong>Alert:</strong><span id=\"'.$input_id.'_error_message\"></span></p>\n </div></div></td></tr>';\n \n break;\n \n //for a combo or drop down box which should have a lookup defined\n case 'combo':\n //'combodata'=>'salutation|salutation_id|description'\n $html.='<tr><th class=\"left_col\">'.ucwords($single_field['field_name']).'</th><td><select id=\"'.$input_id.'\">';\n $combo_fields=explode('|',$single_field['combodata']);\n $queryResult=$this->db->query(\"select * from \".$combo_fields[0]);\n foreach ($queryResult as $row) {\n $html.='<option value=\"'.$row[$combo_fields[1]].'\">'.ucwords($row[$combo_fields[2]]).'</option>';\n }\n $html.='</select></td></tr><tr><th></th><td><span id=\"'.$input_id.'_error\"></span></td></tr>';\n break;\n }\n }\n }\n \n //add the buttons\n $counter=1;\n foreach($this->buttons as $button) {\n \n //at the start, if the column count is odd, start a new line for the buttons\n if($counter%2!=0) {\n $html.='<tr>';\n }\n \n //right column check and set TD class\n $this_class='left_col button_row';\n if ($counter%2==0) {\n $this_class='right_col button_row';\n }\n \n //place the button\n $this_button_id=implode('',array(str_replace(' ','',$this->form_name), $button, 'Button')); //clientDeleteCancelButton\n if (in_array($button,$this->available_buttons)) {\n $html.='<td class=\"'.$this_class.'\"><button type=\"button\" id=\"'.$this_button_id.'\">'.ucwords($button).'</button></td>';\n }\n else {\n error_log(\"BasicForm: Unable to interpret button request from basic_form->render_page call, button requested was: \".$button);\n }\n \n //after the counter increases, if the counter is odd, we need to close this line of buttons\n $counter+=1;\n if($counter%2!=0) {\n $html.='</tr>';\n }\n }\n \n //finish off the button rows if there were an odd number of buttons, and the row ender above (inside the loop) didnt fire\n if($counter%2==0) {\n $html.='</tr>';\n }\n \n //close the table, set an identifier field if required, ie, a hidden id field for updates or removes from the DB and close the form.\n $html.='</table>';\n if($this->id_field != '') {\n $this_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),$this->id_field));\n $html.='<input id=\"'.$this_id.'\" type=\"hidden\" value=\"'.$this->id_field_value.'\" />';\n }\n $html.='</form>';\n \n //make the javascript part of the response\n $js='<script>\n $(document).ready(function () {\n ';\n \n //if a hidden id field has been added and a value set, then we need to render a selector window to populate the table correctly\n if($this->id_field != '') {\n $js.='\n \n //define the data table\n var table=$(\"#'.str_replace(' ','_',$this->form_name).'_'.$this->id_field.'_selector\").DataTable({paging: true, searching: true, destroy: true});\n \n //setup the dialog box for this use case\n $( \"#'.str_replace(' ','_',$this->form_name).'_dialog\" ).dialog({autoOpen: false,width: 700,modal: true,\n buttons: [\n {\n text: \"Select\",\n click: function() {\n var rowSelected=$(\".selected\").attr(\"id\");\n if (!rowSelected) {\n alert(\"You need to select a row by clicking on it first.\");\n }\n else {\n load_data_into_form(rowSelected);\n }\n }\n },\n {\n text: \"Cancel\",\n click: function() {\n $( this ).dialog( \"destroy\" ).remove();\n close_current_tab();\n }\n }\n ]\n });\n \n //toggle selected row\n $(\"#'.str_replace(' ','_',$this->form_name).'_'.$this->id_field.'_selector tbody\").on( \"click\", \"tr\", function () {\n if ( $(this).hasClass(\"selected\") ) {\n $(this).removeClass(\"selected\");\n }\n else {\n table.$(\"tr.selected\").removeClass(\"selected\");\n $(this).addClass(\"selected\");\n }\n });\n \n //load the record into the form\n function load_data_into_form(selected_id) {\n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n data:{\n page:\"'.$this->feature.'_Load_'.str_replace(' ','_',$this->form_name).'_Data\",\n '.$this->id_field.':selected_id,\n }\n })\n .done(function(e) {\n var data=JSON.parse(e);';\n \n \n \n \n \n $first_done=false;\n foreach($this->full_field_list as $field) {\n if($field==$this->id_field) {\n $js.='\n $(\"#content_'.$this->feature.'_'.str_replace(' ','_',$this->form_name).'_'.$field.'\").val(data[\"'.$field.'\"]);\n $(\"#content_'.$this->feature.'_'.str_replace(' ','_',$this->form_name).'_'.$field.'\").trigger(\"change\");';\n }\n else {\n $js.='$(\"#content_'.$this->feature.'_'.str_replace(' ','_',$this->form_name).'_'.$field.'\").val(data[\"'.$field.'\"]);';\n }\n $first_done=true;\n }\n $js.='$(\"#'.str_replace(' ','_',$this->form_name).'_dialog\").dialog( \"destroy\" ).remove();\n });\n }';\n \n $js.='\n $(\"#'.str_replace(' ','_',$this->form_name).'_dialog\").dialog(\"option\",\"title\",\"'.$this->selector_title.'\");\n $(\"#'.str_replace(' ','_',$this->form_name).'_dialog\").dialog(\"open\");\n ';\n }\n \n \n \n //add the validation function, if required\n $validate_page_name=implode('_',array($this->feature,'Validate',str_replace(' ','_',ucwords($this->form_name))));\n if (count($this->validators)>0) {\n $js.='\n function '.$validate_page_name.'_validate() {\n //hide all validation fields, in case they were populated last time\n ';\n foreach($form_field_ids as $field_name=>$field_id) {\n if (in_array($field_name,$this->validators)) {\n $js.='$(\"#'.$field_id.'_error\").hide();';\n }\n }\n $js.='\n var id_lookups={';\n foreach($form_field_ids as $field_name=>$field_id) {\n if (in_array($field_name,$this->validators)) {\n $js.='\"'.$field_name.'\":\"'.$field_id.'\",';\n }\n }\n $js.='};\n \n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n data: \n {\n page:\"'.$validate_page_name.'\",';\n foreach($form_field_ids as $field_name=>$field_id) {\n if (in_array($field_name,$this->validators)) {\n $js.=$field_name.':$(\"#'.$field_id.'\").val(),';\n }\n }\n $js.=' }\n })\n .done(function(e){\n //if e is true, then there is nothing to do, otherwise, \n var errors=JSON.parse(e);\n //if theres no errors, return true\n if (Object.keys(errors).length==0) {\n blind_submit();\n }\n //populate the error messages, and return false\n for (var error in errors) {\n if (errors.hasOwnProperty(error)) {\n var this_id=id_lookups[error];\n $(\"#\"+this_id+\"_error\").html(\"<p style=\\'color:red;\\'>\"+errors[error]+\"</p>\");\n $(\"#\"+this_id+\"_error\").show();\n }\n }\n });\n }\n ';\n }\n \n //add any button responders needed\n foreach ($this->buttons as $button) {\n if (in_array($button,$this->available_buttons)) {\n $button_id=implode('',array(str_replace(' ','',$this->form_name), $button, 'Button'));;\n \n //javascript response to the CANCEL button\n if ($button=='cancel') {\n $js.='\n $(\"#'.$button_id.'\").click(function() {\n close_current_tab();\n });';\n }\n //javascript response to the SAVE button\n if ($button=='save') {\n $page_string=implode('_',array($this->feature,'Submit',str_replace(' ','_',ucwords($this->form_name))));\n $js.='//handle the save button\n $(\"#'.$button_id.'\").click(function() {\n ';\n //if there is validation on this form, use the validation function generated above, otherwise use the blind submit\n if (count($this->validators)>0) {\n $js.=$validate_page_name.'_validate();\n });';\n }\n else {\n $js.='blind_submit();\n });';\n }\n \n //define the blind submit function\n $js.='\n function blind_submit() {\n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n data: \n {\n page:\"'.$page_string.'\",';\n foreach($form_field_ids as $field_name=>$field_id) {\n $js.=$field_name.':$(\"#'.$field_id.'\").val(),';\n }\n $js.=' }\n })\n .done(function(e){\n var tabs=$(\"div#tabs ul\").children();\n for (var i=0; i<tabs.length; i++) {\n if ($(\"div#tabs ul\").children()[i].getAttribute(\"aria-controls\")==\"about\") {\n $(\"div#about\").append(e);\n }\n }\n close_current_tab();\n });\n }';\n \n }\n \n //javascript repsponse to the DELETE button\n if ($button=='delete') {\n $page_string=implode('_',array($this->feature,'Delete',str_replace(' ','_',ucwords($this->form_name))));\n $js.='//handle the delete button\n $(\"#'.$button_id.'\").click(function() {\n ';\n //if there is validation on this form, use the validation function generated above, otherwise use the blind submit\n if (count($this->validators)>0) {\n $js.=$validate_page_name.'_validate();\n });';\n }\n else {\n $js.='blind_submit();\n });';\n } \n //define the blind submit function\n $js.='\n function blind_submit() {\n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n data: \n {\n page:\"'.$page_string.'\",';\n $js.=$this->id_field.':$(\"#'.implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),$this->id_field)).'\").val(),';\n $js.=' }\n })\n .done(function(e){\n var tabs=$(\"div#tabs ul\").children();\n for (var i=0; i<tabs.length; i++) {\n if ($(\"div#tabs ul\").children()[i].getAttribute(\"aria-controls\")==\"about\") {\n $(\"div#about\").append(e);\n }\n }\n close_current_tab();\n });\n }';\n }\n \n //javascript response to an UPLOAD button, meant to be used in conjunction with a form containing a file upload field\n if($button=='upload') {\n $associated_upload_field=NULL;\n foreach ($this->page_fields as $single_group) {\n foreach($single_group['fields'] as $single_field) {\n if($single_field['field_type']==\"upload\") {\n $associated_upload_field=$single_field;\n \n }\n }\n }\n $field_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name)));//,str_replace(' ','_',$associated_upload_field['field_name'])\n $upload_field_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),str_replace(' ','_',$associated_upload_field['field_name'])));\n $this_button_id=implode('',array(str_replace(' ','',$this->form_name), $button, 'Button'));\n $js.='\n //hide the error container at page load\n $(\"#'.$upload_field_id.'_error_message_container\").hide();\n \n //handle any hooks in the filename update changes\n $(\"#'.$upload_field_id.'_fileToUpload\").change(function(){\n if ($(\"#'.$upload_field_id.'_fileToUpload\")[0].files.length>0) {\n $(\"#'.$upload_field_id.'_filename\").val($(\"#'.$upload_field_id.'_fileToUpload\")[0].files[0].name);';\n \n //check for annotations\n foreach($this->annotations as $single_hook) {\n $js.=$single_hook;\n }\n \n $js.='}\n $(\"#'.$upload_field_id.'_error_message_container\").hide();\n });\n \n //handle the upload button\n $(\"#'.$button_id.'\").click(function(e) {\n e.preventDefault();\n if ($(\"#'.$upload_field_id.'_fileToUpload\")[0].files.length>0) {\n var file_size=$(\"#'.$upload_field_id.'_fileToUpload\")[0].files[0].size;\n var allowed_filesize=parseInt($(\"#'.$upload_field_id.'_max_filesize\").val());\n if(file_size<=allowed_filesize) {\n var mydata=new FormData();\n mydata.append(\"page\",\"'.implode('_',array($this->feature,'Submit',str_replace(' ','_',ucwords($this->form_name)))).'\");\n ';\n \n //add field submission data\n foreach ($this->page_fields as $single_group) {\n foreach($single_group['fields'] as $single_field) {\n if ($single_field['field_type']=='text' or $single_field['field_type']=='currency' or $single_field['field_type']=='textarea' or $single_field['field_type']=='annotation' or $single_field['field_type']=='combo') {\n $js.='mydata.append(\"'.str_replace(' ','_',$single_field['field_name']).'\",$(\"#'.$field_id.'_'.str_replace(' ','_',$single_field['field_name']).'\").val());';\n }\n if ($single_field['field_type']=='upload') {\n $js.='mydata.append(\"datafile\",$(\"#'.$upload_field_id.'_fileToUpload\")[0].files[0]);';\n }\n \n }\n }\n \n $js.='\n $( \"#'.$upload_field_id.'_dialog\" ).dialog({\n autoOpen: true,\n closeOnEscape: false,\n title: \"File uploading in progress...\",\n width: 400,\n height: 0,\n modal: true,\n });\n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n enctype: \"multipart/form-data\",\n data: mydata,\n cache: false,\n processData: false,\n contentType: false,\n })\n .done(function(e){\n //the response may start with an error string, or success string, we need to handle wither case appropriately\n $( \"#'.$upload_field_id.'_dialog\" ).dialog( \"destroy\" ).remove();\n if (e.length>=5 && e.substr(0,5)==\"error\") {\n $(\"#'.$upload_field_id.'_error_message\").html(e.substr(5));\n $(\"#'.$upload_field_id.'_error_message_container\").show();\n }\n else if (e.length>=7 && e.substr(0,7)==\"success\") {\n var tabs=$(\"div#tabs ul\").children();\n for (var i=0; i<tabs.length; i++) {\n if ($(\"div#tabs ul\").children()[i].getAttribute(\"aria-controls\")==\"about\") {\n $(\"div#about\").append(e.substr(7));\n }\n }\n close_current_tab();\n }\n });\n }\n else {\n var reported_file_size=file_size;\n if (file_size>1000 && file_size<=1000000) {\n reported_file_size=Math.round(file_size/1000);\n reported_file_size+=\"KB\";\n }\n else if(file_size>1000000 && file_size<=1000000000) {\n reported_file_size=(file_size/1000000).toFixed(1);\n reported_file_size+=\"MB\";\n }\n else if(file_size>1000000000 && file_size<=1000000000000) {\n reported_file_size=(file_size/1000000000).toFixed(1);\n reported_file_size+=\"GB\";\n }\n $(\"#'.$field_id.'_error_message\").html(\"Filesize of \"+reported_file_size+\" is too big\");\n $(\"#'.$field_id.'_error_message_container\").show();\n }\n }\n else {\n alert(\"Choose a file to upload first\");\n }\n });';\n }\n \n //javascript response to the UPDATE button\n if ($button=='update') {\n $page_string=implode('_',array($this->feature,'Update',str_replace(' ','_',ucwords($this->form_name))));\n $js.='//handle the update button\n $(\"#'.$button_id.'\").click(function() {\n ';\n //if there is validation on this form, use the validation function generated above, otherwise use the blind submit\n if (count($this->validators)>0) {\n $js.=$validate_page_name.'_validate();\n });';\n }\n else {\n $js.='blind_submit();\n });';\n } \n //define the blind submit function\n $js.='\n function blind_submit() {\n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n data: \n {\n page:\"'.$page_string.'\",';\n foreach($form_field_ids as $field_name=>$field_id) {\n $js.=$field_name.':$(\"#'.$field_id.'\").val(),';\n }\n $js.=$this->id_field.':$(\"#'.implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),$this->id_field)).'\").val(),';\n $js.=' }\n })\n .done(function(e){\n var tabs=$(\"div#tabs ul\").children();\n for (var i=0; i<tabs.length; i++) {\n if ($(\"div#tabs ul\").children()[i].getAttribute(\"aria-controls\")==\"about\") {\n $(\"div#about\").append(e);\n }\n }\n close_current_tab();\n });\n };';\n }\n }\n else {\n error_log(\"BasicForm: Unable to interpret button request from basic_form->render_page call, button requested was: \".$button);\n }\n }\n \n //close off and finalise the JS\n $js.='});</script>';\n return $js.$html;\n }", "private function buildControls(array $row)\n\t{\n\t\t\t\t\t\t\tif (count($this->controls) > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo '<td class=\"tbl-controls\">';\n\t\t\t\t\t\t\t\t\tforeach ($this->controls as $ctl)\n\t\t\t\t\t\t\t\t\t\techo $this->parseVariables($row, $ctl);\n\t\t\t\t\t\t\t\t\techo '</td>';\n}\n}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Convert decimal values if posted back\r\n\r\n\t\tif ($this->PrecioUnitario->FormValue == $this->PrecioUnitario->CurrentValue && is_numeric(ew_StrToFloat($this->PrecioUnitario->CurrentValue)))\r\n\t\t\t$this->PrecioUnitario->CurrentValue = ew_StrToFloat($this->PrecioUnitario->CurrentValue);\r\n\r\n\t\t// Convert decimal values if posted back\r\n\t\tif ($this->MontoDescuento->FormValue == $this->MontoDescuento->CurrentValue && is_numeric(ew_StrToFloat($this->MontoDescuento->CurrentValue)))\r\n\t\t\t$this->MontoDescuento->CurrentValue = ew_StrToFloat($this->MontoDescuento->CurrentValue);\r\n\r\n\t\t// Convert decimal values if posted back\r\n\t\tif ($this->Precio_SIM->FormValue == $this->Precio_SIM->CurrentValue && is_numeric(ew_StrToFloat($this->Precio_SIM->CurrentValue)))\r\n\t\t\t$this->Precio_SIM->CurrentValue = ew_StrToFloat($this->Precio_SIM->CurrentValue);\r\n\r\n\t\t// Convert decimal values if posted back\r\n\t\tif ($this->Monto->FormValue == $this->Monto->CurrentValue && is_numeric(ew_StrToFloat($this->Monto->CurrentValue)))\r\n\t\t\t$this->Monto->CurrentValue = ew_StrToFloat($this->Monto->CurrentValue);\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// Id_Venta_Eq\r\n\t\t// CLIENTE\r\n\t\t// Id_Articulo\r\n\t\t// Acabado_eq\r\n\t\t// Num_IMEI\r\n\t\t// Num_ICCID\r\n\t\t// Num_CEL\r\n\t\t// Causa\r\n\t\t// Con_SIM\r\n\t\t// Observaciones\r\n\t\t// PrecioUnitario\r\n\t\t// MontoDescuento\r\n\t\t// Precio_SIM\r\n\t\t// Monto\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// Id_Venta_Eq\r\n\t\t\t$this->Id_Venta_Eq->ViewValue = $this->Id_Venta_Eq->CurrentValue;\r\n\t\t\t$this->Id_Venta_Eq->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CLIENTE\r\n\t\t\t$this->CLIENTE->ViewValue = $this->CLIENTE->CurrentValue;\r\n\t\t\t$this->CLIENTE->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\tif (strval($this->Id_Articulo->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Id_Articulo`\" . ew_SearchString(\"=\", $this->Id_Articulo->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `Id_Articulo`, `Articulo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `ca_articulos`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Articulo`\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Id_Articulo->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Id_Articulo->ViewValue = $this->Id_Articulo->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Articulo->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Id_Articulo->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->ViewValue = $this->Acabado_eq->CurrentValue;\r\n\t\t\t$this->Acabado_eq->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->ViewValue = $this->Num_IMEI->CurrentValue;\r\n\t\t\t$this->Num_IMEI->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->ViewValue = $this->Num_ICCID->CurrentValue;\r\n\t\t\t$this->Num_ICCID->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->ViewValue = $this->Num_CEL->CurrentValue;\r\n\t\t\t$this->Num_CEL->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\tif (strval($this->Causa->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Causa->CurrentValue) {\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(1) <> \"\" ? $this->Causa->FldTagCaption(1) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(2) <> \"\" ? $this->Causa->FldTagCaption(2) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(3):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(3) <> \"\" ? $this->Causa->FldTagCaption(3) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(4):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(4) <> \"\" ? $this->Causa->FldTagCaption(4) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Causa->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Causa->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\tif (strval($this->Con_SIM->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Con_SIM->CurrentValue) {\r\n\t\t\t\t\tcase $this->Con_SIM->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Con_SIM->ViewValue = $this->Con_SIM->FldTagCaption(1) <> \"\" ? $this->Con_SIM->FldTagCaption(1) : $this->Con_SIM->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Con_SIM->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Con_SIM->ViewValue = $this->Con_SIM->FldTagCaption(2) <> \"\" ? $this->Con_SIM->FldTagCaption(2) : $this->Con_SIM->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Con_SIM->ViewValue = $this->Con_SIM->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Con_SIM->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Con_SIM->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->ViewValue = $this->Observaciones->CurrentValue;\r\n\t\t\t$this->Observaciones->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->ViewValue = $this->PrecioUnitario->CurrentValue;\r\n\t\t\t$this->PrecioUnitario->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->ViewValue = $this->MontoDescuento->CurrentValue;\r\n\t\t\t$this->MontoDescuento->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->ViewValue = $this->Precio_SIM->CurrentValue;\r\n\t\t\t$this->Precio_SIM->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->ViewValue = $this->Monto->CurrentValue;\r\n\t\t\t$this->Monto->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CLIENTE\r\n\t\t\t$this->CLIENTE->LinkCustomAttributes = \"\";\r\n\t\t\t$this->CLIENTE->HrefValue = \"\";\r\n\t\t\t$this->CLIENTE->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\t$this->Id_Articulo->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Articulo->HrefValue = \"\";\r\n\t\t\t$this->Id_Articulo->TooltipValue = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Acabado_eq->HrefValue = \"\";\r\n\t\t\t$this->Acabado_eq->TooltipValue = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Num_IMEI->HrefValue = \"\";\r\n\t\t\t$this->Num_IMEI->TooltipValue = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Num_ICCID->HrefValue = \"\";\r\n\t\t\t$this->Num_ICCID->TooltipValue = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Num_CEL->HrefValue = \"\";\r\n\t\t\t$this->Num_CEL->TooltipValue = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\t$this->Causa->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Causa->HrefValue = \"\";\r\n\t\t\t$this->Causa->TooltipValue = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\t$this->Con_SIM->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Con_SIM->HrefValue = \"\";\r\n\t\t\t$this->Con_SIM->TooltipValue = \"\";\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Observaciones->HrefValue = \"\";\r\n\t\t\t$this->Observaciones->TooltipValue = \"\";\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->LinkCustomAttributes = \"\";\r\n\t\t\t$this->PrecioUnitario->HrefValue = \"\";\r\n\t\t\t$this->PrecioUnitario->TooltipValue = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->MontoDescuento->HrefValue = \"\";\r\n\t\t\t$this->MontoDescuento->TooltipValue = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Precio_SIM->HrefValue = \"\";\r\n\t\t\t$this->Precio_SIM->TooltipValue = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Monto->HrefValue = \"\";\r\n\t\t\t$this->Monto->TooltipValue = \"\";\r\n\t\t} elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row\r\n\r\n\t\t\t// CLIENTE\r\n\t\t\t$this->CLIENTE->EditCustomAttributes = \"\";\r\n\t\t\t$this->CLIENTE->EditValue = $this->CLIENTE->CurrentValue;\r\n\t\t\t$this->CLIENTE->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\t$this->Id_Articulo->EditCustomAttributes = \"\";\r\n\t\t\tif (strval($this->Id_Articulo->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Id_Articulo`\" . ew_SearchString(\"=\", $this->Id_Articulo->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `Id_Articulo`, `Articulo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `ca_articulos`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Articulo`\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Id_Articulo->EditValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Id_Articulo->EditValue = $this->Id_Articulo->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Articulo->EditValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Id_Articulo->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->EditCustomAttributes = \"\";\r\n\t\t\t$this->Acabado_eq->EditValue = $this->Acabado_eq->CurrentValue;\r\n\t\t\t$this->Acabado_eq->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->EditCustomAttributes = \"\";\r\n\t\t\t$this->Num_IMEI->EditValue = $this->Num_IMEI->CurrentValue;\r\n\t\t\t$this->Num_IMEI->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->EditCustomAttributes = \"onchange= 'ValidaICCID(this);' \";\r\n\t\t\t$this->Num_ICCID->EditValue = $this->Num_ICCID->CurrentValue;\r\n\t\t\t$this->Num_ICCID->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->EditCustomAttributes = \"\";\r\n\t\t\t$this->Num_CEL->EditValue = $this->Num_CEL->CurrentValue;\r\n\t\t\t$this->Num_CEL->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\t$this->Causa->EditCustomAttributes = \"\";\r\n\t\t\tif (strval($this->Causa->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Causa->CurrentValue) {\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(1) <> \"\" ? $this->Causa->FldTagCaption(1) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(2) <> \"\" ? $this->Causa->FldTagCaption(2) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(3):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(3) <> \"\" ? $this->Causa->FldTagCaption(3) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(4):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(4) <> \"\" ? $this->Causa->FldTagCaption(4) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Causa->EditValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Causa->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\t$this->Con_SIM->EditCustomAttributes = \"\";\r\n\t\t\t$arwrk = array();\r\n\t\t\t$arwrk[] = array($this->Con_SIM->FldTagValue(1), $this->Con_SIM->FldTagCaption(1) <> \"\" ? $this->Con_SIM->FldTagCaption(1) : $this->Con_SIM->FldTagValue(1));\r\n\t\t\t$arwrk[] = array($this->Con_SIM->FldTagValue(2), $this->Con_SIM->FldTagCaption(2) <> \"\" ? $this->Con_SIM->FldTagCaption(2) : $this->Con_SIM->FldTagValue(2));\r\n\t\t\t$this->Con_SIM->EditValue = $arwrk;\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->EditCustomAttributes = 'class=\"mayusculas\" onchange=\"conMayusculas(this)\" autocomplete=\"off\" ';\r\n\t\t\t$this->Observaciones->EditValue = ew_HtmlEncode($this->Observaciones->CurrentValue);\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->EditCustomAttributes = \"\";\r\n\t\t\t$this->PrecioUnitario->EditValue = $this->PrecioUnitario->CurrentValue;\r\n\t\t\t$this->PrecioUnitario->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->EditCustomAttributes = \"\";\r\n\t\t\t$this->MontoDescuento->EditValue = $this->MontoDescuento->CurrentValue;\r\n\t\t\t$this->MontoDescuento->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->EditCustomAttributes = \"\";\r\n\t\t\t$this->Precio_SIM->EditValue = $this->Precio_SIM->CurrentValue;\r\n\t\t\t$this->Precio_SIM->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->EditCustomAttributes = \"\";\r\n\t\t\t$this->Monto->EditValue = $this->Monto->CurrentValue;\r\n\t\t\t$this->Monto->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Edit refer script\r\n\t\t\t// CLIENTE\r\n\r\n\t\t\t$this->CLIENTE->HrefValue = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\t$this->Id_Articulo->HrefValue = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->HrefValue = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->HrefValue = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->HrefValue = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->HrefValue = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\t$this->Causa->HrefValue = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\t$this->Con_SIM->HrefValue = \"\";\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->HrefValue = \"\";\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->HrefValue = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->HrefValue = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->HrefValue = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->HrefValue = \"\";\r\n\t\t}\r\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$this->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "public function generateRows(){\n $alphabet = $this->generateAlphabet();\n $this->refreshRows();\n for ($i = 0; $i < $this->nbRows; $i++){\n $row = new BlockRow();\n if ($this->rowLabel === 2){\n $name = ''.($i+1);\n $row->setName($name);\n } else {\n $row->setName($alphabet[$i]);\n }\n $row->setBlock($this);\n $row->setNbSeats($this->getNbSeatsPerRow());\n $row->setNumerotationSystem($this->getSeatLabel());\n $this->addRow($row);\n }\n $this->generateSeats();\n }", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// tgl\n\t\t// no_spp\n\t\t// jns_spp\n\t\t// kd_mata\n\t\t// urai\n\t\t// jmlh\n\t\t// jmlh1\n\t\t// jmlh2\n\t\t// jmlh3\n\t\t// jmlh4\n\t\t// nm_perus\n\t\t// alamat\n\t\t// npwp\n\t\t// pimpinan\n\t\t// bank\n\t\t// rek\n\t\t// nospm\n\t\t// tglspm\n\t\t// ppn\n\t\t// ps21\n\t\t// ps22\n\t\t// ps23\n\t\t// ps4\n\t\t// kodespm\n\t\t// nambud\n\t\t// nppk\n\t\t// nipppk\n\t\t// prog\n\t\t// prog1\n\t\t// bayar\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// tgl\n\t\t$this->tgl->ViewValue = $this->tgl->CurrentValue;\n\t\t$this->tgl->ViewValue = ew_FormatDateTime($this->tgl->ViewValue, 0);\n\t\t$this->tgl->ViewCustomAttributes = \"\";\n\n\t\t// no_spp\n\t\t$this->no_spp->ViewValue = $this->no_spp->CurrentValue;\n\t\t$this->no_spp->ViewCustomAttributes = \"\";\n\n\t\t// jns_spp\n\t\t$this->jns_spp->ViewValue = $this->jns_spp->CurrentValue;\n\t\t$this->jns_spp->ViewCustomAttributes = \"\";\n\n\t\t// kd_mata\n\t\t$this->kd_mata->ViewValue = $this->kd_mata->CurrentValue;\n\t\t$this->kd_mata->ViewCustomAttributes = \"\";\n\n\t\t// urai\n\t\t$this->urai->ViewValue = $this->urai->CurrentValue;\n\t\t$this->urai->ViewCustomAttributes = \"\";\n\n\t\t// jmlh\n\t\t$this->jmlh->ViewValue = $this->jmlh->CurrentValue;\n\t\t$this->jmlh->ViewCustomAttributes = \"\";\n\n\t\t// jmlh1\n\t\t$this->jmlh1->ViewValue = $this->jmlh1->CurrentValue;\n\t\t$this->jmlh1->ViewCustomAttributes = \"\";\n\n\t\t// jmlh2\n\t\t$this->jmlh2->ViewValue = $this->jmlh2->CurrentValue;\n\t\t$this->jmlh2->ViewCustomAttributes = \"\";\n\n\t\t// jmlh3\n\t\t$this->jmlh3->ViewValue = $this->jmlh3->CurrentValue;\n\t\t$this->jmlh3->ViewCustomAttributes = \"\";\n\n\t\t// jmlh4\n\t\t$this->jmlh4->ViewValue = $this->jmlh4->CurrentValue;\n\t\t$this->jmlh4->ViewCustomAttributes = \"\";\n\n\t\t// nm_perus\n\t\t$this->nm_perus->ViewValue = $this->nm_perus->CurrentValue;\n\t\t$this->nm_perus->ViewCustomAttributes = \"\";\n\n\t\t// alamat\n\t\t$this->alamat->ViewValue = $this->alamat->CurrentValue;\n\t\t$this->alamat->ViewCustomAttributes = \"\";\n\n\t\t// npwp\n\t\t$this->npwp->ViewValue = $this->npwp->CurrentValue;\n\t\t$this->npwp->ViewCustomAttributes = \"\";\n\n\t\t// pimpinan\n\t\t$this->pimpinan->ViewValue = $this->pimpinan->CurrentValue;\n\t\t$this->pimpinan->ViewCustomAttributes = \"\";\n\n\t\t// bank\n\t\t$this->bank->ViewValue = $this->bank->CurrentValue;\n\t\t$this->bank->ViewCustomAttributes = \"\";\n\n\t\t// rek\n\t\t$this->rek->ViewValue = $this->rek->CurrentValue;\n\t\t$this->rek->ViewCustomAttributes = \"\";\n\n\t\t// nospm\n\t\t$this->nospm->ViewValue = $this->nospm->CurrentValue;\n\t\t$this->nospm->ViewCustomAttributes = \"\";\n\n\t\t// tglspm\n\t\t$this->tglspm->ViewValue = $this->tglspm->CurrentValue;\n\t\t$this->tglspm->ViewValue = ew_FormatDateTime($this->tglspm->ViewValue, 0);\n\t\t$this->tglspm->ViewCustomAttributes = \"\";\n\n\t\t// ppn\n\t\t$this->ppn->ViewValue = $this->ppn->CurrentValue;\n\t\t$this->ppn->ViewCustomAttributes = \"\";\n\n\t\t// ps21\n\t\t$this->ps21->ViewValue = $this->ps21->CurrentValue;\n\t\t$this->ps21->ViewCustomAttributes = \"\";\n\n\t\t// ps22\n\t\t$this->ps22->ViewValue = $this->ps22->CurrentValue;\n\t\t$this->ps22->ViewCustomAttributes = \"\";\n\n\t\t// ps23\n\t\t$this->ps23->ViewValue = $this->ps23->CurrentValue;\n\t\t$this->ps23->ViewCustomAttributes = \"\";\n\n\t\t// ps4\n\t\t$this->ps4->ViewValue = $this->ps4->CurrentValue;\n\t\t$this->ps4->ViewCustomAttributes = \"\";\n\n\t\t// kodespm\n\t\t$this->kodespm->ViewValue = $this->kodespm->CurrentValue;\n\t\t$this->kodespm->ViewCustomAttributes = \"\";\n\n\t\t// nambud\n\t\t$this->nambud->ViewValue = $this->nambud->CurrentValue;\n\t\t$this->nambud->ViewCustomAttributes = \"\";\n\n\t\t// nppk\n\t\t$this->nppk->ViewValue = $this->nppk->CurrentValue;\n\t\t$this->nppk->ViewCustomAttributes = \"\";\n\n\t\t// nipppk\n\t\t$this->nipppk->ViewValue = $this->nipppk->CurrentValue;\n\t\t$this->nipppk->ViewCustomAttributes = \"\";\n\n\t\t// prog\n\t\t$this->prog->ViewValue = $this->prog->CurrentValue;\n\t\t$this->prog->ViewCustomAttributes = \"\";\n\n\t\t// prog1\n\t\t$this->prog1->ViewValue = $this->prog1->CurrentValue;\n\t\t$this->prog1->ViewCustomAttributes = \"\";\n\n\t\t// bayar\n\t\t$this->bayar->ViewValue = $this->bayar->CurrentValue;\n\t\t$this->bayar->ViewCustomAttributes = \"\";\n\n\t\t\t// tgl\n\t\t\t$this->tgl->LinkCustomAttributes = \"\";\n\t\t\t$this->tgl->HrefValue = \"\";\n\t\t\t$this->tgl->TooltipValue = \"\";\n\n\t\t\t// no_spp\n\t\t\t$this->no_spp->LinkCustomAttributes = \"\";\n\t\t\t$this->no_spp->HrefValue = \"\";\n\t\t\t$this->no_spp->TooltipValue = \"\";\n\n\t\t\t// jns_spp\n\t\t\t$this->jns_spp->LinkCustomAttributes = \"\";\n\t\t\t$this->jns_spp->HrefValue = \"\";\n\t\t\t$this->jns_spp->TooltipValue = \"\";\n\n\t\t\t// kd_mata\n\t\t\t$this->kd_mata->LinkCustomAttributes = \"\";\n\t\t\t$this->kd_mata->HrefValue = \"\";\n\t\t\t$this->kd_mata->TooltipValue = \"\";\n\n\t\t\t// urai\n\t\t\t$this->urai->LinkCustomAttributes = \"\";\n\t\t\t$this->urai->HrefValue = \"\";\n\t\t\t$this->urai->TooltipValue = \"\";\n\n\t\t\t// jmlh\n\t\t\t$this->jmlh->LinkCustomAttributes = \"\";\n\t\t\t$this->jmlh->HrefValue = \"\";\n\t\t\t$this->jmlh->TooltipValue = \"\";\n\n\t\t\t// jmlh1\n\t\t\t$this->jmlh1->LinkCustomAttributes = \"\";\n\t\t\t$this->jmlh1->HrefValue = \"\";\n\t\t\t$this->jmlh1->TooltipValue = \"\";\n\n\t\t\t// jmlh2\n\t\t\t$this->jmlh2->LinkCustomAttributes = \"\";\n\t\t\t$this->jmlh2->HrefValue = \"\";\n\t\t\t$this->jmlh2->TooltipValue = \"\";\n\n\t\t\t// jmlh3\n\t\t\t$this->jmlh3->LinkCustomAttributes = \"\";\n\t\t\t$this->jmlh3->HrefValue = \"\";\n\t\t\t$this->jmlh3->TooltipValue = \"\";\n\n\t\t\t// jmlh4\n\t\t\t$this->jmlh4->LinkCustomAttributes = \"\";\n\t\t\t$this->jmlh4->HrefValue = \"\";\n\t\t\t$this->jmlh4->TooltipValue = \"\";\n\n\t\t\t// nm_perus\n\t\t\t$this->nm_perus->LinkCustomAttributes = \"\";\n\t\t\t$this->nm_perus->HrefValue = \"\";\n\t\t\t$this->nm_perus->TooltipValue = \"\";\n\n\t\t\t// alamat\n\t\t\t$this->alamat->LinkCustomAttributes = \"\";\n\t\t\t$this->alamat->HrefValue = \"\";\n\t\t\t$this->alamat->TooltipValue = \"\";\n\n\t\t\t// npwp\n\t\t\t$this->npwp->LinkCustomAttributes = \"\";\n\t\t\t$this->npwp->HrefValue = \"\";\n\t\t\t$this->npwp->TooltipValue = \"\";\n\n\t\t\t// pimpinan\n\t\t\t$this->pimpinan->LinkCustomAttributes = \"\";\n\t\t\t$this->pimpinan->HrefValue = \"\";\n\t\t\t$this->pimpinan->TooltipValue = \"\";\n\n\t\t\t// bank\n\t\t\t$this->bank->LinkCustomAttributes = \"\";\n\t\t\t$this->bank->HrefValue = \"\";\n\t\t\t$this->bank->TooltipValue = \"\";\n\n\t\t\t// rek\n\t\t\t$this->rek->LinkCustomAttributes = \"\";\n\t\t\t$this->rek->HrefValue = \"\";\n\t\t\t$this->rek->TooltipValue = \"\";\n\n\t\t\t// nospm\n\t\t\t$this->nospm->LinkCustomAttributes = \"\";\n\t\t\t$this->nospm->HrefValue = \"\";\n\t\t\t$this->nospm->TooltipValue = \"\";\n\n\t\t\t// tglspm\n\t\t\t$this->tglspm->LinkCustomAttributes = \"\";\n\t\t\t$this->tglspm->HrefValue = \"\";\n\t\t\t$this->tglspm->TooltipValue = \"\";\n\n\t\t\t// ppn\n\t\t\t$this->ppn->LinkCustomAttributes = \"\";\n\t\t\t$this->ppn->HrefValue = \"\";\n\t\t\t$this->ppn->TooltipValue = \"\";\n\n\t\t\t// ps21\n\t\t\t$this->ps21->LinkCustomAttributes = \"\";\n\t\t\t$this->ps21->HrefValue = \"\";\n\t\t\t$this->ps21->TooltipValue = \"\";\n\n\t\t\t// ps22\n\t\t\t$this->ps22->LinkCustomAttributes = \"\";\n\t\t\t$this->ps22->HrefValue = \"\";\n\t\t\t$this->ps22->TooltipValue = \"\";\n\n\t\t\t// ps23\n\t\t\t$this->ps23->LinkCustomAttributes = \"\";\n\t\t\t$this->ps23->HrefValue = \"\";\n\t\t\t$this->ps23->TooltipValue = \"\";\n\n\t\t\t// ps4\n\t\t\t$this->ps4->LinkCustomAttributes = \"\";\n\t\t\t$this->ps4->HrefValue = \"\";\n\t\t\t$this->ps4->TooltipValue = \"\";\n\n\t\t\t// kodespm\n\t\t\t$this->kodespm->LinkCustomAttributes = \"\";\n\t\t\t$this->kodespm->HrefValue = \"\";\n\t\t\t$this->kodespm->TooltipValue = \"\";\n\n\t\t\t// nambud\n\t\t\t$this->nambud->LinkCustomAttributes = \"\";\n\t\t\t$this->nambud->HrefValue = \"\";\n\t\t\t$this->nambud->TooltipValue = \"\";\n\n\t\t\t// nppk\n\t\t\t$this->nppk->LinkCustomAttributes = \"\";\n\t\t\t$this->nppk->HrefValue = \"\";\n\t\t\t$this->nppk->TooltipValue = \"\";\n\n\t\t\t// nipppk\n\t\t\t$this->nipppk->LinkCustomAttributes = \"\";\n\t\t\t$this->nipppk->HrefValue = \"\";\n\t\t\t$this->nipppk->TooltipValue = \"\";\n\n\t\t\t// prog\n\t\t\t$this->prog->LinkCustomAttributes = \"\";\n\t\t\t$this->prog->HrefValue = \"\";\n\t\t\t$this->prog->TooltipValue = \"\";\n\n\t\t\t// prog1\n\t\t\t$this->prog1->LinkCustomAttributes = \"\";\n\t\t\t$this->prog1->HrefValue = \"\";\n\t\t\t$this->prog1->TooltipValue = \"\";\n\n\t\t\t// bayar\n\t\t\t$this->bayar->LinkCustomAttributes = \"\";\n\t\t\t$this->bayar->HrefValue = \"\";\n\t\t\t$this->bayar->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "private function mod_prep($row){\n $meta = new dbMeta(); \n $cols = $meta->get_tabel_columns(); // array w/ all metadata \n $form_array_mod = $meta->buildFormArray($cols); // make to nice form ready\n // insert the values to the form array for mod form\n foreach($row as $k => $v) {\n $form_array_mod[$k]['VALUE'] = $v;\n } \n \n update_form($form_array_mod); // returns array ready to be processed \n }", "protected function create_me(&$vals)\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\tif($this->editmode == 1){\t\r\n\t\t\t//includes the JS to delete pics && the iframe to it\r\n\t\t\t$this->includes(0, \"pictureshow.php\");\r\n\t\t\t$this->start_label();\r\n\t\t\t\r\n\t\t\techo \"<a class=\\\"ccms_headeditlink\\\" href=\\\"\";\r\n\t\t\techo \"javascript:ccms_open_uplwindow(320, 290, 'pictureshow_upl', \".$this->register_filehandler().\")\\\">\";\r\n\t\t\techo \"Add</a>\";\r\n\t\t\t$this->stop_label_head();\r\n\t\t}\r\n\t\t//the javascript to open the view popup\r\n\t\t$this->includes('pictureshow_show');\r\n\r\n\r\n\t\t$pictures = count($vals);\r\n\t\t$missing = $pictures%$this->preview_cols;\r\n\t\t$trs = ($pictures-$missing)/$this->preview_cols;\r\n\t\t\r\n\t\techo \"\\n\\n<table\"; \r\n\t\tif(!empty($this->tablestyle))\r\n\t\t\techo \" class=\\\"\".$this->tablestyle.\"\\\"\";\r\n\t\techo \" id=\\\"ccms_\".$this->objectname.\"_tbl\\\">\\n\";\t\r\n\r\n\r\n\t\tfor($i=0;$i<$trs;$i++){\r\n\t\t\t?><tr><?php\r\n\t\t\tfor($j=0;$j<$this->preview_cols;$j++){\r\n\t\t\t\t$cur =& $vals[($i*$this->preview_cols+$j)];\r\n\t\t\t\t$this->write_pre_td($cur);\r\n\t\t\t}\r\n\t\t\t?></tr><?php\r\n\t\t}\r\n\r\n\t\tif($missing > 0){\r\n\t\t\t?><tr><?php\r\n\t\t\tfor($i = 0;$i<$this->preview_cols;$i++){\r\n\t\t\t\tif($missing > $i){\r\n\t\t\t\t\t$cur =& $vals[($pictures-$missing+$i)];\r\n\t\t\t\t\t$this->write_pre_td($cur);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t?></tr><?php\r\n\t\t}\r\n\t\t\r\n\t\techo \"\\n</table>\"; \r\n\t\t\r\n\t\tif($this->editmode == 1){\r\n\t\t\t$this->end_label();\r\n\t\t}\r\n\r\n\t}", "function table_table_row($values,$escape=false)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\tif (($escape) && ((!is_object($value)) || ($value->pure_lang!==true)))\n\t\t\t$value=make_string_tempcode(escape_html(is_object($value)?$value->evaluate():$value));\n\n\t\t$cells->attach(do_template('TABLE_TABLE_ROW_CELL',array('_GUID'=>'700a982eb2262149295816ddee91b0e7','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_ROW',array('_GUID'=>'a4efacc07ecb165e37c355559f476ae9','CELLS'=>$cells));\n}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t$this->ViewUrl = $this->GetViewUrl();\r\n\t\t$this->EditUrl = $this->GetEditUrl();\r\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\r\n\t\t$this->CopyUrl = $this->GetCopyUrl();\r\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\r\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// identries\r\n\t\t// domain_id\r\n\t\t// hash_content\r\n\t\t// fuente\r\n\t\t// published\r\n\t\t// updated\r\n\t\t// categorias\r\n\t\t// titulo\r\n\t\t// contenido\r\n\t\t// id\r\n\t\t// islive\r\n\t\t// thumbnail\r\n\t\t// reqdate\r\n\t\t// author\r\n\t\t// trans_en\r\n\t\t// trans_es\r\n\t\t// trans_fr\r\n\t\t// trans_it\r\n\t\t// fid\r\n\t\t// fmd5\r\n\t\t// tool_id\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// identries\r\n\t\t\t$this->identries->ViewValue = $this->identries->CurrentValue;\r\n\t\t\t$this->identries->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// domain_id\r\n\t\t\tif (strval($this->domain_id->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`id_domains`\" . ew_SearchString(\"=\", $this->domain_id->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `id_domains`, `dominio` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `domains`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->domain_id->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->domain_id->ViewValue = $this->domain_id->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->domain_id->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->domain_id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// hash_content\r\n\t\t\t$this->hash_content->ViewValue = $this->hash_content->CurrentValue;\r\n\t\t\t$this->hash_content->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// fuente\r\n\t\t\t$this->fuente->ViewValue = $this->fuente->CurrentValue;\r\n\t\t\t$this->fuente->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// published\r\n\t\t\t$this->published->ViewValue = $this->published->CurrentValue;\r\n\t\t\t$this->published->ViewValue = ew_FormatDateTime($this->published->ViewValue, 5);\r\n\t\t\t$this->published->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// updated\r\n\t\t\t$this->updated->ViewValue = $this->updated->CurrentValue;\r\n\t\t\t$this->updated->ViewValue = ew_FormatDateTime($this->updated->ViewValue, 5);\r\n\t\t\t$this->updated->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// categorias\r\n\t\t\t$this->categorias->ViewValue = $this->categorias->CurrentValue;\r\n\t\t\t$this->categorias->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// titulo\r\n\t\t\t$this->titulo->ViewValue = $this->titulo->CurrentValue;\r\n\t\t\t$this->titulo->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// id\r\n\t\t\t$this->id->ViewValue = $this->id->CurrentValue;\r\n\t\t\t$this->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// islive\r\n\t\t\t$this->islive->ViewValue = $this->islive->CurrentValue;\r\n\t\t\t$this->islive->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// thumbnail\r\n\t\t\t$this->thumbnail->ViewValue = $this->thumbnail->CurrentValue;\r\n\t\t\t$this->thumbnail->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// reqdate\r\n\t\t\t$this->reqdate->ViewValue = $this->reqdate->CurrentValue;\r\n\t\t\t$this->reqdate->ViewValue = ew_FormatDateTime($this->reqdate->ViewValue, 5);\r\n\t\t\t$this->reqdate->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// author\r\n\t\t\t$this->author->ViewValue = $this->author->CurrentValue;\r\n\t\t\t$this->author->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// trans_en\r\n\t\t\t$this->trans_en->ViewValue = $this->trans_en->CurrentValue;\r\n\t\t\t$this->trans_en->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// trans_es\r\n\t\t\t$this->trans_es->ViewValue = $this->trans_es->CurrentValue;\r\n\t\t\t$this->trans_es->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// trans_fr\r\n\t\t\t$this->trans_fr->ViewValue = $this->trans_fr->CurrentValue;\r\n\t\t\t$this->trans_fr->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// trans_it\r\n\t\t\t$this->trans_it->ViewValue = $this->trans_it->CurrentValue;\r\n\t\t\t$this->trans_it->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// fid\r\n\t\t\t$this->fid->ViewValue = $this->fid->CurrentValue;\r\n\t\t\t$this->fid->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// fmd5\r\n\t\t\t$this->fmd5->ViewValue = $this->fmd5->CurrentValue;\r\n\t\t\t$this->fmd5->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// tool_id\r\n\t\t\t$this->tool_id->ViewValue = $this->tool_id->CurrentValue;\r\n\t\t\t$this->tool_id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// identries\r\n\t\t\t$this->identries->LinkCustomAttributes = \"\";\r\n\t\t\t$this->identries->HrefValue = \"\";\r\n\t\t\t$this->identries->TooltipValue = \"\";\r\n\r\n\t\t\t// titulo\r\n\t\t\t$this->titulo->LinkCustomAttributes = \"\";\r\n\t\t\t$this->titulo->HrefValue = \"\";\r\n\t\t\t$this->titulo->TooltipValue = \"\";\r\n\r\n\t\t\t// id\r\n\t\t\t$this->id->LinkCustomAttributes = \"\";\r\n\t\t\t$this->id->HrefValue = \"\";\r\n\t\t\t$this->id->TooltipValue = \"\";\r\n\r\n\t\t\t// islive\r\n\t\t\t$this->islive->LinkCustomAttributes = \"\";\r\n\t\t\t$this->islive->HrefValue = \"\";\r\n\t\t\t$this->islive->TooltipValue = \"\";\r\n\r\n\t\t\t// tool_id\r\n\t\t\t$this->tool_id->LinkCustomAttributes = \"\";\r\n\t\t\t$this->tool_id->HrefValue = \"\";\r\n\t\t\t$this->tool_id->TooltipValue = \"\";\r\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\r\n\r\n\t\t\t// identries\r\n\t\t\t// titulo\r\n\r\n\t\t\t$this->titulo->EditCustomAttributes = \"\";\r\n\t\t\t$this->titulo->EditValue = ew_HtmlEncode($this->titulo->CurrentValue);\r\n\r\n\t\t\t// id\r\n\t\t\t$this->id->EditCustomAttributes = \"\";\r\n\t\t\t$this->id->EditValue = ew_HtmlEncode($this->id->CurrentValue);\r\n\r\n\t\t\t// islive\r\n\t\t\t$this->islive->EditCustomAttributes = \"\";\r\n\t\t\t$this->islive->EditValue = ew_HtmlEncode($this->islive->CurrentValue);\r\n\r\n\t\t\t// tool_id\r\n\t\t\t$this->tool_id->EditCustomAttributes = \"\";\r\n\t\t\t$this->tool_id->EditValue = ew_HtmlEncode($this->tool_id->CurrentValue);\r\n\r\n\t\t\t// Edit refer script\r\n\t\t\t// identries\r\n\r\n\t\t\t$this->identries->HrefValue = \"\";\r\n\r\n\t\t\t// titulo\r\n\t\t\t$this->titulo->HrefValue = \"\";\r\n\r\n\t\t\t// id\r\n\t\t\t$this->id->HrefValue = \"\";\r\n\r\n\t\t\t// islive\r\n\t\t\t$this->islive->HrefValue = \"\";\r\n\r\n\t\t\t// tool_id\r\n\t\t\t$this->tool_id->HrefValue = \"\";\r\n\t\t}\r\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$this->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Call Row_Rendering event\r\n\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// Id\r\n\t\t// Nama\r\n\t\t// Alamat\r\n\t\t// Jumlah\r\n\t\t// Provinsi\r\n\t\t// Area\r\n\t\t// CP\r\n\t\t// NoContact\r\n\t\t// Tanggal\r\n\t\t// Jam\r\n\t\t// Vechicle\r\n\t\t// Type\r\n\t\t// Site\r\n\t\t// Status\r\n\t\t// UserID\r\n\t\t// TglInput\r\n\t\t// visit\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// Id\r\n\t\t\t$this->Id->ViewValue = $this->Id->CurrentValue;\r\n\t\t\t$this->Id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Nama\r\n\t\t\t$this->Nama->ViewValue = $this->Nama->CurrentValue;\r\n\t\t\t$this->Nama->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Jumlah\r\n\t\t\t$this->Jumlah->ViewValue = $this->Jumlah->CurrentValue;\r\n\t\t\t$this->Jumlah->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Provinsi\r\n\t\t\tif (strval($this->Provinsi->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->Provinsi->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `id`, `NamaProv` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provinsi`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Provinsi, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Provinsi->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Provinsi->ViewValue = $this->Provinsi->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Provinsi->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Provinsi->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Area\r\n\t\t\tif (strval($this->Area->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->Area->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `id`, `Kota` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `kota`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Area, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Area->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Area->ViewValue = $this->Area->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Area->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Area->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CP\r\n\t\t\t$this->CP->ViewValue = $this->CP->CurrentValue;\r\n\t\t\t$this->CP->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// NoContact\r\n\t\t\t$this->NoContact->ViewValue = $this->NoContact->CurrentValue;\r\n\t\t\t$this->NoContact->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Tanggal\r\n\t\t\t$this->Tanggal->ViewValue = $this->Tanggal->CurrentValue;\r\n\t\t\t$this->Tanggal->ViewValue = ew_FormatDateTime($this->Tanggal->ViewValue, 7);\r\n\t\t\t$this->Tanggal->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Jam\r\n\t\t\t$this->Jam->ViewValue = $this->Jam->CurrentValue;\r\n\t\t\t$this->Jam->ViewValue = ew_FormatDateTime($this->Jam->ViewValue, 4);\r\n\t\t\t$this->Jam->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Vechicle\r\n\t\t\tif (strval($this->Vechicle->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Vechicle->CurrentValue) {\r\n\t\t\t\t\tcase $this->Vechicle->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Vechicle->ViewValue = $this->Vechicle->FldTagCaption(1) <> \"\" ? $this->Vechicle->FldTagCaption(1) : $this->Vechicle->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Vechicle->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Vechicle->ViewValue = $this->Vechicle->FldTagCaption(2) <> \"\" ? $this->Vechicle->FldTagCaption(2) : $this->Vechicle->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Vechicle->ViewValue = $this->Vechicle->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Vechicle->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Vechicle->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Type\r\n\t\t\tif (strval($this->Type->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Id`\" . ew_SearchString(\"=\", $this->Type->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `Id`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `typepengunjung`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Type, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Type->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Type->ViewValue = $this->Type->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Type->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Type->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Site\r\n\t\t\tif (strval($this->Site->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Site->CurrentValue) {\r\n\t\t\t\t\tcase $this->Site->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Site->ViewValue = $this->Site->FldTagCaption(1) <> \"\" ? $this->Site->FldTagCaption(1) : $this->Site->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Site->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Site->ViewValue = $this->Site->FldTagCaption(2) <> \"\" ? $this->Site->FldTagCaption(2) : $this->Site->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Site->ViewValue = $this->Site->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Site->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Site->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Status\r\n\t\t\tif (strval($this->Status->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Status->CurrentValue) {\r\n\t\t\t\t\tcase $this->Status->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Status->ViewValue = $this->Status->FldTagCaption(1) <> \"\" ? $this->Status->FldTagCaption(1) : $this->Status->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Status->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Status->ViewValue = $this->Status->FldTagCaption(2) <> \"\" ? $this->Status->FldTagCaption(2) : $this->Status->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Status->ViewValue = $this->Status->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Status->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Status->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// UserID\r\n\t\t\t$this->_UserID->ViewValue = $this->_UserID->CurrentValue;\r\n\t\t\t$this->_UserID->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// TglInput\r\n\t\t\t$this->TglInput->ViewValue = $this->TglInput->CurrentValue;\r\n\t\t\t$this->TglInput->ViewValue = ew_FormatDateTime($this->TglInput->ViewValue, 7);\r\n\t\t\t$this->TglInput->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// visit\r\n\t\t\tif (strval($this->visit->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->visit->CurrentValue) {\r\n\t\t\t\t\tcase $this->visit->FldTagValue(1):\r\n\t\t\t\t\t\t$this->visit->ViewValue = $this->visit->FldTagCaption(1) <> \"\" ? $this->visit->FldTagCaption(1) : $this->visit->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->visit->FldTagValue(2):\r\n\t\t\t\t\t\t$this->visit->ViewValue = $this->visit->FldTagCaption(2) <> \"\" ? $this->visit->FldTagCaption(2) : $this->visit->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->visit->ViewValue = $this->visit->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->visit->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->visit->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Nama\r\n\t\t\t$this->Nama->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Nama->HrefValue = \"\";\r\n\t\t\t$this->Nama->TooltipValue = \"\";\r\n\r\n\t\t\t// Provinsi\r\n\t\t\t$this->Provinsi->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Provinsi->HrefValue = \"\";\r\n\t\t\t$this->Provinsi->TooltipValue = \"\";\r\n\r\n\t\t\t// Area\r\n\t\t\t$this->Area->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Area->HrefValue = \"\";\r\n\t\t\t$this->Area->TooltipValue = \"\";\r\n\r\n\t\t\t// CP\r\n\t\t\t$this->CP->LinkCustomAttributes = \"\";\r\n\t\t\t$this->CP->HrefValue = \"\";\r\n\t\t\t$this->CP->TooltipValue = \"\";\r\n\r\n\t\t\t// Tanggal\r\n\t\t\t$this->Tanggal->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Tanggal->HrefValue = \"\";\r\n\t\t\t$this->Tanggal->TooltipValue = \"\";\r\n\r\n\t\t\t// Vechicle\r\n\t\t\t$this->Vechicle->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Vechicle->HrefValue = \"\";\r\n\t\t\t$this->Vechicle->TooltipValue = \"\";\r\n\r\n\t\t\t// Type\r\n\t\t\t$this->Type->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Type->HrefValue = \"\";\r\n\t\t\t$this->Type->TooltipValue = \"\";\r\n\r\n\t\t\t// Site\r\n\t\t\t$this->Site->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Site->HrefValue = \"\";\r\n\t\t\t$this->Site->TooltipValue = \"\";\r\n\r\n\t\t\t// Status\r\n\t\t\t$this->Status->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Status->HrefValue = \"\";\r\n\t\t\t$this->Status->TooltipValue = \"\";\r\n\r\n\t\t\t// visit\r\n\t\t\t$this->visit->LinkCustomAttributes = \"\";\r\n\t\t\t$this->visit->HrefValue = \"\";\r\n\t\t\t$this->visit->TooltipValue = \"\";\r\n\t\t} elseif ($this->RowType == EW_ROWTYPE_SEARCH) { // Search row\r\n\r\n\t\t\t// Nama\r\n\t\t\t$this->Nama->EditCustomAttributes = \"\";\r\n\t\t\t$this->Nama->EditValue = ew_HtmlEncode($this->Nama->AdvancedSearch->SearchValue);\r\n\t\t\t$this->Nama->PlaceHolder = ew_RemoveHtml($this->Nama->FldCaption());\r\n\r\n\t\t\t// Provinsi\r\n\t\t\t$this->Provinsi->EditCustomAttributes = \"\";\r\n\t\t\t$sFilterWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `id`, `NamaProv` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `provinsi`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Provinsi, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\r\n\t\t\t$this->Provinsi->EditValue = $arwrk;\r\n\r\n\t\t\t// Area\r\n\t\t\t$this->Area->EditCustomAttributes = \"\";\r\n\t\t\t$sFilterWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `id`, `Kota` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, `Prov` AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `kota`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Area, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\r\n\t\t\t$this->Area->EditValue = $arwrk;\r\n\r\n\t\t\t// CP\r\n\t\t\t$this->CP->EditCustomAttributes = \"\";\r\n\t\t\t$this->CP->EditValue = ew_HtmlEncode($this->CP->AdvancedSearch->SearchValue);\r\n\t\t\t$this->CP->PlaceHolder = ew_RemoveHtml($this->CP->FldCaption());\r\n\r\n\t\t\t// Tanggal\r\n\t\t\t$this->Tanggal->EditCustomAttributes = \"\";\r\n\t\t\t$this->Tanggal->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->Tanggal->AdvancedSearch->SearchValue, 7), 7));\r\n\t\t\t$this->Tanggal->PlaceHolder = ew_RemoveHtml($this->Tanggal->FldCaption());\r\n\t\t\t$this->Tanggal->EditCustomAttributes = \"\";\r\n\t\t\t$this->Tanggal->EditValue2 = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->Tanggal->AdvancedSearch->SearchValue2, 7), 7));\r\n\t\t\t$this->Tanggal->PlaceHolder = ew_RemoveHtml($this->Tanggal->FldCaption());\r\n\r\n\t\t\t// Vechicle\r\n\t\t\t$this->Vechicle->EditCustomAttributes = \"\";\r\n\t\t\t$arwrk = array();\r\n\t\t\t$arwrk[] = array($this->Vechicle->FldTagValue(1), $this->Vechicle->FldTagCaption(1) <> \"\" ? $this->Vechicle->FldTagCaption(1) : $this->Vechicle->FldTagValue(1));\r\n\t\t\t$arwrk[] = array($this->Vechicle->FldTagValue(2), $this->Vechicle->FldTagCaption(2) <> \"\" ? $this->Vechicle->FldTagCaption(2) : $this->Vechicle->FldTagValue(2));\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\r\n\t\t\t$this->Vechicle->EditValue = $arwrk;\r\n\r\n\t\t\t// Type\r\n\t\t\t$this->Type->EditCustomAttributes = \"\";\r\n\t\t\t$sFilterWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Id`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `typepengunjung`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Type, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\r\n\t\t\t$this->Type->EditValue = $arwrk;\r\n\r\n\t\t\t// Site\r\n\t\t\t$this->Site->EditCustomAttributes = \"\";\r\n\t\t\tif (!$Security->IsAdmin() && $Security->IsLoggedIn() && !$this->UserIDAllow(\"search\")) { // Non system admin\r\n\t\t\t$sFilterWrk = \"\";\r\n\t\t\t$sFilterWrk = $GLOBALS[\"user\"]->AddUserIDFilter(\"\");\r\n\t\t\t$sSqlWrk = \"SELECT `site`, `site` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `user`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Site, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\r\n\t\t\t$this->Site->EditValue = $arwrk;\r\n\t\t\t} else {\r\n\t\t\t$arwrk = array();\r\n\t\t\t$arwrk[] = array($this->Site->FldTagValue(1), $this->Site->FldTagCaption(1) <> \"\" ? $this->Site->FldTagCaption(1) : $this->Site->FldTagValue(1));\r\n\t\t\t$arwrk[] = array($this->Site->FldTagValue(2), $this->Site->FldTagCaption(2) <> \"\" ? $this->Site->FldTagCaption(2) : $this->Site->FldTagValue(2));\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\r\n\t\t\t$this->Site->EditValue = $arwrk;\r\n\t\t\t}\r\n\r\n\t\t\t// Status\r\n\t\t\t$this->Status->EditCustomAttributes = \"\";\r\n\t\t\t$arwrk = array();\r\n\t\t\t$arwrk[] = array($this->Status->FldTagValue(1), $this->Status->FldTagCaption(1) <> \"\" ? $this->Status->FldTagCaption(1) : $this->Status->FldTagValue(1));\r\n\t\t\t$arwrk[] = array($this->Status->FldTagValue(2), $this->Status->FldTagCaption(2) <> \"\" ? $this->Status->FldTagCaption(2) : $this->Status->FldTagValue(2));\r\n\t\t\t$this->Status->EditValue = $arwrk;\r\n\r\n\t\t\t// visit\r\n\t\t\t$this->visit->EditCustomAttributes = \"\";\r\n\t\t\t$arwrk = array();\r\n\t\t\t$arwrk[] = array($this->visit->FldTagValue(1), $this->visit->FldTagCaption(1) <> \"\" ? $this->visit->FldTagCaption(1) : $this->visit->FldTagValue(1));\r\n\t\t\t$arwrk[] = array($this->visit->FldTagValue(2), $this->visit->FldTagCaption(2) <> \"\" ? $this->visit->FldTagCaption(2) : $this->visit->FldTagValue(2));\r\n\t\t\t$this->visit->EditValue = $arwrk;\r\n\t\t}\r\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$this->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function render_wizard() {\n\t\t$lines=array();\n\n\t\t$action = explode(':',$this->wizard->modData['wizAction']);\n\t\tif ($action[0]=='edit')\t{\n\t\t\t$this->regNewEntry($this->sectionID, $action[1]);\n\t\t\t$lines = $this->catHeaderLines($lines, $this->sectionID, $this->wizard->options[$this->sectionID], '<strong>Edit Plugin #'.$action[1].'</strong>', $action[1]);\n\t\t\t$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];\n\t\t\t$ffPrefix = '['.$this->sectionID.']['.$action[1].']';\n\n\t\t\t\t// Enter title of the plugin\n\t\t\t$subContent='<strong>Enter a title for the plugin:</strong><br />'.\n\t\t\t\t$this->renderStringBox_lang('title',$ffPrefix,$piConf);\n\t\t\t$lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';\n\n\t\t\t\t// Position\n\t\t\tif (is_array($this->wizard->wizArray['fields']))\t{\n\t\t\t\t$optValues = array(\n\t\t\t\t\t'0' => '',\n\t\t\t\t);\n\t\t\t\tforeach($this->wizard->wizArray['fields'] as $kk => $fC)\t{\n\t\t\t\t\tif ($fC['which_table']=='tt_content')\t{\n\t\t\t\t\t\t$optValues[$kk]=($fC['title']?$fC['title']:'Item '.$kk).' ('.count($fC['fields']).' fields)';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (count($optValues)>1)\t{\n\t\t\t\t\t$subContent='<strong>Apply a set of extended fields</strong><br />\n\t\t\t\t\t\tIf you have configured a set of extra fields (Extend existing Tables) for the tt_content table, you can have them assigned to this plugin.\n\t\t\t\t\t\t<br />'.\n\t\t\t\t\t\t$this->renderSelectBox($ffPrefix.'[apply_extended]',$piConf['apply_extended'],$optValues);\n\t\t\t\t\t$lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';\n\t\t\t\t}\n\t\t\t}\n/*\n\t\t\t\t// Insert Plugin\n\t\t\tif (is_array($this->wizard->wizArray['tables']))\t{\n\t\t\t\t$optValues = array(\n\t\t\t\t\t'0' => '',\n\t\t\t\t);\n\t\t\t\tforeach($this->wizard->wizArray['tables'] as $kk => $fC)\t{\n\t\t\t\t\t$optValues[$kk]=($fC['tablename']||$fC['title']?$fC['title'].' ('.$this->returnName($this->wizard->extKey,'tables').($fC['tablename']?'_'.$fC['tablename']:'').')':'Item '.$kk).' ('.count($fC['fields']).' fields)';\n\t\t\t\t}\n\t\t\t\t$subContent='<strong>Example Code Generation</strong><br />'.\n\t\t\t\t\t\t'If you have configured custom tables you can select one of the tables to list by default as an example:<br />'.\n\t\t\t\t\t\t$this->renderSelectBox($ffPrefix.'[list_default]',$piConf['list_default'],$optValues);\n\t\t\t\t$lines[] = '<tr><td><hr /></td></tr>';\n\t\t\t $lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';\n\t\t\t}\n*/\n\n\t\t\t$subContent='<strong>New Content Element Wizard</strong><br />'.\n\t\t\t $this->renderCheckBox($ffPrefix.'[plus_wiz]',$piConf['plus_wiz']).\n\t\t\t\t'Add icon to \\'New Content Element\\' wizard<br />'.\n\t\t\t\t'Write a description for the entry (if any):<br />'.\n\t\t\t\t$this->renderStringBox_lang('plus_wiz_description',$ffPrefix,$piConf)\n\t\t\t\t;\n\t\t\t$lines[] = '<tr><td><hr /></td></tr>';\n\t\t\t$lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';\n\n\t\t\t$subContent='<strong>Code Layout Selection</strong><br />'.\n\t\t\t $this->renderSelectBox($ffPrefix.'[code_sel]',$piConf['code_sel'],\n\t\t\t\t$this->renderer_select);\n\t\t\t$lines[] = '<tr><td><hr /></td></tr>';\n\t\t\t$lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';\n\n\t\t\t\t/* create default controller */\n\t\t\tif(!isset($piConf[done])) {\n\t\t\t\t$ctr_cnt = count($this->wizard->wizArray['mvccontroller'])+1;\n\t\t\t\t$this->regNewEntry('mvccontroller', $ctr_cnt);;\n\t\t\t\t$this->wizard->wizArray['mvccontroller'][$ctr_cnt] = array('plugin'=>$action[1],'title'=>'default'.$action[1]);\n\t\t\t\t$piConf[done] = 1;\n\t\t\t}\n\t\t\t$lines[] = '<input type=\"hidden\" name=\"kickstarter[wizArray_upd]'.$ffPrefix.'[done]\" value=\"'.$piConf[done].'\" />';\n\t\t}\n\n\t\t$content = '<table border=0 cellpadding=2 cellspacing=2>'.implode(\"\\n\",$lines).'</table>';\n\t\treturn $content;\n\t}", "function makeTemplateRowsForMsg($allMessage) {\n global $user;\n\n foreach($allMessage as $message) {\n $row = new Template(__DIR__ . '/../view/message.tpl');\n\n $login = $message['senderId'] === $user->getId() ? 'You' : '<b>SUPPORT</b>';\n $class = '';\n\n if ($message['senderId'] !== $user->getId()) {\n $class = $message['isRead'] == 0 ? \" class='notRead'\" : '';\n }\n\n foreach ($message as $key => $value) {\n $row->add($key, $value);\n $row->add('login', $login);\n $row->add('class', $class);\n }\n $rowsTemplateMsg[] = $row;\n }\n $rowsMessages = Template::joinTemplates($rowsTemplateMsg);\n return $rowsMessages;\n}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language, $fs_multijoin_v;\r\n\r\n\t\t// Initialize URLs\r\n\t\t$this->ViewUrl = $fs_multijoin_v->ViewUrl();\r\n\t\t$this->EditUrl = $fs_multijoin_v->EditUrl();\r\n\t\t$this->InlineEditUrl = $fs_multijoin_v->InlineEditUrl();\r\n\t\t$this->CopyUrl = $fs_multijoin_v->CopyUrl();\r\n\t\t$this->InlineCopyUrl = $fs_multijoin_v->InlineCopyUrl();\r\n\t\t$this->DeleteUrl = $fs_multijoin_v->DeleteUrl();\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$fs_multijoin_v->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// id\r\n\r\n\t\t$fs_multijoin_v->id->CellCssStyle = \"\"; $fs_multijoin_v->id->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->id->CellAttrs = array(); $fs_multijoin_v->id->ViewAttrs = array(); $fs_multijoin_v->id->EditAttrs = array();\r\n\r\n\t\t// mount\r\n\t\t$fs_multijoin_v->mount->CellCssStyle = \"\"; $fs_multijoin_v->mount->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->mount->CellAttrs = array(); $fs_multijoin_v->mount->ViewAttrs = array(); $fs_multijoin_v->mount->EditAttrs = array();\r\n\r\n\t\t// path\r\n\t\t$fs_multijoin_v->path->CellCssStyle = \"\"; $fs_multijoin_v->path->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->path->CellAttrs = array(); $fs_multijoin_v->path->ViewAttrs = array(); $fs_multijoin_v->path->EditAttrs = array();\r\n\r\n\t\t// parent\r\n\t\t$fs_multijoin_v->parent->CellCssStyle = \"\"; $fs_multijoin_v->parent->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->parent->CellAttrs = array(); $fs_multijoin_v->parent->ViewAttrs = array(); $fs_multijoin_v->parent->EditAttrs = array();\r\n\r\n\t\t// deprecated\r\n\t\t$fs_multijoin_v->deprecated->CellCssStyle = \"\"; $fs_multijoin_v->deprecated->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->deprecated->CellAttrs = array(); $fs_multijoin_v->deprecated->ViewAttrs = array(); $fs_multijoin_v->deprecated->EditAttrs = array();\r\n\r\n\t\t// name\r\n\t\t$fs_multijoin_v->name->CellCssStyle = \"\"; $fs_multijoin_v->name->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->name->CellAttrs = array(); $fs_multijoin_v->name->ViewAttrs = array(); $fs_multijoin_v->name->EditAttrs = array();\r\n\r\n\t\t// snapshot\r\n\t\t$fs_multijoin_v->snapshot->CellCssStyle = \"\"; $fs_multijoin_v->snapshot->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->snapshot->CellAttrs = array(); $fs_multijoin_v->snapshot->ViewAttrs = array(); $fs_multijoin_v->snapshot->EditAttrs = array();\r\n\r\n\t\t// tapebackup\r\n\t\t$fs_multijoin_v->tapebackup->CellCssStyle = \"\"; $fs_multijoin_v->tapebackup->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->tapebackup->CellAttrs = array(); $fs_multijoin_v->tapebackup->ViewAttrs = array(); $fs_multijoin_v->tapebackup->EditAttrs = array();\r\n\r\n\t\t// diskbackup\r\n\t\t$fs_multijoin_v->diskbackup->CellCssStyle = \"\"; $fs_multijoin_v->diskbackup->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->diskbackup->CellAttrs = array(); $fs_multijoin_v->diskbackup->ViewAttrs = array(); $fs_multijoin_v->diskbackup->EditAttrs = array();\r\n\r\n\t\t// type\r\n\t\t$fs_multijoin_v->type->CellCssStyle = \"\"; $fs_multijoin_v->type->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->type->CellAttrs = array(); $fs_multijoin_v->type->ViewAttrs = array(); $fs_multijoin_v->type->EditAttrs = array();\r\n\r\n\t\t// CONTACT\r\n\t\t$fs_multijoin_v->CONTACT->CellCssStyle = \"\"; $fs_multijoin_v->CONTACT->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->CONTACT->CellAttrs = array(); $fs_multijoin_v->CONTACT->ViewAttrs = array(); $fs_multijoin_v->CONTACT->EditAttrs = array();\r\n\r\n\t\t// CONTACT2\r\n\t\t$fs_multijoin_v->CONTACT2->CellCssStyle = \"\"; $fs_multijoin_v->CONTACT2->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->CONTACT2->CellAttrs = array(); $fs_multijoin_v->CONTACT2->ViewAttrs = array(); $fs_multijoin_v->CONTACT2->EditAttrs = array();\r\n\r\n\t\t// RESCOMP\r\n\t\t$fs_multijoin_v->RESCOMP->CellCssStyle = \"\"; $fs_multijoin_v->RESCOMP->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->RESCOMP->CellAttrs = array(); $fs_multijoin_v->RESCOMP->ViewAttrs = array(); $fs_multijoin_v->RESCOMP->EditAttrs = array();\r\n\t\tif ($fs_multijoin_v->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// id\r\n\t\t\t$fs_multijoin_v->id->ViewValue = $fs_multijoin_v->id->CurrentValue;\r\n\t\t\t$fs_multijoin_v->id->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->id->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// mount\r\n\t\t\t$fs_multijoin_v->mount->ViewValue = $fs_multijoin_v->mount->CurrentValue;\r\n\t\t\t$fs_multijoin_v->mount->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->mount->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->mount->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// path\r\n\t\t\t$fs_multijoin_v->path->ViewValue = $fs_multijoin_v->path->CurrentValue;\r\n\t\t\t$fs_multijoin_v->path->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->path->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->path->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// parent\r\n\t\t\t$fs_multijoin_v->parent->ViewValue = $fs_multijoin_v->parent->CurrentValue;\r\n\t\t\t$fs_multijoin_v->parent->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->parent->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->parent->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// deprecated\r\n\t\t\t$fs_multijoin_v->deprecated->ViewValue = $fs_multijoin_v->deprecated->CurrentValue;\r\n\t\t\t$fs_multijoin_v->deprecated->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->deprecated->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->deprecated->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// name\r\n\t\t\t$fs_multijoin_v->name->ViewValue = $fs_multijoin_v->name->CurrentValue;\r\n\t\t\t$fs_multijoin_v->name->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->name->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->name->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// snapshot\r\n\t\t\t$fs_multijoin_v->snapshot->ViewValue = $fs_multijoin_v->snapshot->CurrentValue;\r\n\t\t\t$fs_multijoin_v->snapshot->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->snapshot->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->snapshot->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// tapebackup\r\n\t\t\t$fs_multijoin_v->tapebackup->ViewValue = $fs_multijoin_v->tapebackup->CurrentValue;\r\n\t\t\t$fs_multijoin_v->tapebackup->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->tapebackup->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->tapebackup->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// diskbackup\r\n\t\t\t$fs_multijoin_v->diskbackup->ViewValue = $fs_multijoin_v->diskbackup->CurrentValue;\r\n\t\t\t$fs_multijoin_v->diskbackup->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->diskbackup->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->diskbackup->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$fs_multijoin_v->type->ViewValue = $fs_multijoin_v->type->CurrentValue;\r\n\t\t\t$fs_multijoin_v->type->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->type->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->type->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CONTACT\r\n\t\t\t$fs_multijoin_v->CONTACT->ViewValue = $fs_multijoin_v->CONTACT->CurrentValue;\r\n\t\t\t$fs_multijoin_v->CONTACT->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CONTACT2\r\n\t\t\t$fs_multijoin_v->CONTACT2->ViewValue = $fs_multijoin_v->CONTACT2->CurrentValue;\r\n\t\t\t$fs_multijoin_v->CONTACT2->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT2->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT2->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// RESCOMP\r\n\t\t\t$fs_multijoin_v->RESCOMP->ViewValue = $fs_multijoin_v->RESCOMP->CurrentValue;\r\n\t\t\t$fs_multijoin_v->RESCOMP->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->RESCOMP->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->RESCOMP->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// id\r\n\t\t\t$fs_multijoin_v->id->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->id->TooltipValue = \"\";\r\n\r\n\t\t\t// mount\r\n\t\t\t$fs_multijoin_v->mount->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->mount->TooltipValue = \"\";\r\n\r\n\t\t\t// path\r\n\t\t\t$fs_multijoin_v->path->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->path->TooltipValue = \"\";\r\n\r\n\t\t\t// parent\r\n\t\t\t$fs_multijoin_v->parent->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->parent->TooltipValue = \"\";\r\n\r\n\t\t\t// deprecated\r\n\t\t\t$fs_multijoin_v->deprecated->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->deprecated->TooltipValue = \"\";\r\n\r\n\t\t\t// name\r\n\t\t\t$fs_multijoin_v->name->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->name->TooltipValue = \"\";\r\n\r\n\t\t\t// snapshot\r\n\t\t\t$fs_multijoin_v->snapshot->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->snapshot->TooltipValue = \"\";\r\n\r\n\t\t\t// tapebackup\r\n\t\t\t$fs_multijoin_v->tapebackup->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->tapebackup->TooltipValue = \"\";\r\n\r\n\t\t\t// diskbackup\r\n\t\t\t$fs_multijoin_v->diskbackup->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->diskbackup->TooltipValue = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$fs_multijoin_v->type->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->type->TooltipValue = \"\";\r\n\r\n\t\t\t// CONTACT\r\n\t\t\t$fs_multijoin_v->CONTACT->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT->TooltipValue = \"\";\r\n\r\n\t\t\t// CONTACT2\r\n\t\t\t$fs_multijoin_v->CONTACT2->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT2->TooltipValue = \"\";\r\n\r\n\t\t\t// RESCOMP\r\n\t\t\t$fs_multijoin_v->RESCOMP->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->RESCOMP->TooltipValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($fs_multijoin_v->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$fs_multijoin_v->Row_Rendered();\r\n\t}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t$this->ViewUrl = $this->GetViewUrl();\r\n\t\t$this->EditUrl = $this->GetEditUrl();\r\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\r\n\t\t$this->CopyUrl = $this->GetCopyUrl();\r\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\r\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// Id_Proveedor\r\n\t\t// RazonSocial\r\n\t\t// RFC\r\n\t\t// NombreContacto\r\n\t\t// CalleYNumero\r\n\t\t// Colonia\r\n\t\t// Poblacion\r\n\t\t// Municipio_Delegacion\r\n\t\t// Id_Estado\r\n\t\t// CP\r\n\t\t// EMail\r\n\t\t// Telefonos\r\n\t\t// Celular\r\n\t\t// Fax\r\n\t\t// Banco\r\n\t\t// NumCuenta\r\n\t\t// CLABE\r\n\t\t// Maneja_Papeleta\r\n\t\t// Observaciones\r\n\t\t// Maneja_Activacion_Movi\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// RazonSocial\r\n\t\t\t$this->RazonSocial->ViewValue = $this->RazonSocial->CurrentValue;\r\n\t\t\t$this->RazonSocial->ViewValue = strtoupper($this->RazonSocial->ViewValue);\r\n\t\t\t$this->RazonSocial->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// NombreContacto\r\n\t\t\t$this->NombreContacto->ViewValue = $this->NombreContacto->CurrentValue;\r\n\t\t\t$this->NombreContacto->ViewValue = strtoupper($this->NombreContacto->ViewValue);\r\n\t\t\t$this->NombreContacto->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Poblacion\r\n\t\t\t$this->Poblacion->ViewValue = $this->Poblacion->CurrentValue;\r\n\t\t\t$this->Poblacion->ViewValue = strtoupper($this->Poblacion->ViewValue);\r\n\t\t\t$this->Poblacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Id_Estado\r\n\t\t\tif (strval($this->Id_Estado->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Id_estado`\" . ew_SearchString(\"=\", $this->Id_Estado->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `Id_estado`, `Estado` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `li_estados`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Estado` Asc\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Id_Estado->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Id_Estado->ViewValue = $this->Id_Estado->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Estado->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Id_Estado->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Telefonos\r\n\t\t\t$this->Telefonos->ViewValue = $this->Telefonos->CurrentValue;\r\n\t\t\t$this->Telefonos->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Celular\r\n\t\t\t$this->Celular->ViewValue = $this->Celular->CurrentValue;\r\n\t\t\t$this->Celular->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Maneja_Papeleta\r\n\t\t\tif (strval($this->Maneja_Papeleta->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Maneja_Papeleta->CurrentValue) {\r\n\t\t\t\t\tcase $this->Maneja_Papeleta->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Maneja_Papeleta->ViewValue = $this->Maneja_Papeleta->FldTagCaption(1) <> \"\" ? $this->Maneja_Papeleta->FldTagCaption(1) : $this->Maneja_Papeleta->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Maneja_Papeleta->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Maneja_Papeleta->ViewValue = $this->Maneja_Papeleta->FldTagCaption(2) <> \"\" ? $this->Maneja_Papeleta->FldTagCaption(2) : $this->Maneja_Papeleta->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Maneja_Papeleta->ViewValue = $this->Maneja_Papeleta->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Maneja_Papeleta->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Maneja_Papeleta->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Maneja_Activacion_Movi\r\n\t\t\tif (strval($this->Maneja_Activacion_Movi->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Maneja_Activacion_Movi->CurrentValue) {\r\n\t\t\t\t\tcase $this->Maneja_Activacion_Movi->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Maneja_Activacion_Movi->ViewValue = $this->Maneja_Activacion_Movi->FldTagCaption(1) <> \"\" ? $this->Maneja_Activacion_Movi->FldTagCaption(1) : $this->Maneja_Activacion_Movi->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Maneja_Activacion_Movi->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Maneja_Activacion_Movi->ViewValue = $this->Maneja_Activacion_Movi->FldTagCaption(2) <> \"\" ? $this->Maneja_Activacion_Movi->FldTagCaption(2) : $this->Maneja_Activacion_Movi->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Maneja_Activacion_Movi->ViewValue = $this->Maneja_Activacion_Movi->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Maneja_Activacion_Movi->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Maneja_Activacion_Movi->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// RazonSocial\r\n\t\t\t$this->RazonSocial->LinkCustomAttributes = \"\";\r\n\t\t\t$this->RazonSocial->HrefValue = \"\";\r\n\t\t\t$this->RazonSocial->TooltipValue = \"\";\r\n\r\n\t\t\t// NombreContacto\r\n\t\t\t$this->NombreContacto->LinkCustomAttributes = \"\";\r\n\t\t\t$this->NombreContacto->HrefValue = \"\";\r\n\t\t\t$this->NombreContacto->TooltipValue = \"\";\r\n\r\n\t\t\t// Poblacion\r\n\t\t\t$this->Poblacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Poblacion->HrefValue = \"\";\r\n\t\t\t$this->Poblacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Estado\r\n\t\t\t$this->Id_Estado->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Estado->HrefValue = \"\";\r\n\t\t\t$this->Id_Estado->TooltipValue = \"\";\r\n\r\n\t\t\t// Telefonos\r\n\t\t\t$this->Telefonos->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Telefonos->HrefValue = \"\";\r\n\t\t\t$this->Telefonos->TooltipValue = \"\";\r\n\r\n\t\t\t// Celular\r\n\t\t\t$this->Celular->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Celular->HrefValue = \"\";\r\n\t\t\t$this->Celular->TooltipValue = \"\";\r\n\r\n\t\t\t// Maneja_Papeleta\r\n\t\t\t$this->Maneja_Papeleta->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Maneja_Papeleta->HrefValue = \"\";\r\n\t\t\t$this->Maneja_Papeleta->TooltipValue = \"\";\r\n\r\n\t\t\t// Maneja_Activacion_Movi\r\n\t\t\t$this->Maneja_Activacion_Movi->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Maneja_Activacion_Movi->HrefValue = \"\";\r\n\t\t\t$this->Maneja_Activacion_Movi->TooltipValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function createEditForm_getItemRow($xmlArray, $relFileRef, $labelKey, $alwaysTextarea = false) {\n\t\tGLOBAL $LANG;\n\n\t\t\t// Initialize:\n\t\t$dataArray = $xmlArray['data'];\n\t\t$editLang = $this->MOD_SETTINGS['editLang'];\n\t\t$elName = 'lldat['.$relFileRef.']['.$editLang.']['.$labelKey.']';\n\n\t\t\t// If editLang is selected (always...?)\n\t\tif ($editLang)\t{\n\n\t\t\t\t// Init row data:\n\t\t\t$tCells = array();\n\t\t\t$tCells[] = '<td>['.htmlspecialchars($labelKey).']</td>';\t\t// Key\n\n\t\t\t\t// Link selector:\n\t\t\t$selector = '';\n\t\t\tif ($xmlArray['meta']['type'] == 'CSH' && preg_match('/\\.seeAlso$/',$labelKey))\t{\n\t\t\t\t$opt = array();\n\t\t\t\t\t$opt[] = '\n\t\t\t\t\t\t<option value=\"\">'.$LANG->getLL('see_also').'</option>';\n\t\t\t\t\t$opt[] = '\n\t\t\t\t\t\t<option value=\"[Link Title] | http://..../\">'.$LANG->getLL('add_regular_url').'</option>';\n\t\t\t\tsort($this->cshLinks);\n\t\t\t\tforeach($this->cshLinks as $link)\t{\n\t\t\t\t\t$opt[] = '\n\t\t\t\t\t\t<option value=\"'.$link.'\">'.$link.'</option>';\n\t\t\t\t}\n\n\t\t\t\t$onChange = \"\n\t\t\t\t\tdocument.forms.llxmlform['\".$elName.\"'].value =\n\t\t\t\t\t\tdocument.forms.llxmlform['\".$elName.\"'].value +\n\t\t\t\t\t\t(document.forms.llxmlform['\".$elName.\"'].value ? ', \\\\n' : '') +\n\t\t\t\t\t\tthis.options[this.selectedIndex].value;\n\t\t\t\t\tthis.selectedIndex = 0;\n\t\t\t\t\treturn false;\n\t\t\t\t\";\n\t\t\t\t$selector = '\n\t\t\t\t\t<br/>\n\t\t\t\t\t<select name=\"_\" onchange=\"'.htmlspecialchars($onChange).'\">\n\t\t\t\t\t'.implode('',$opt).'\n\t\t\t\t\t</select>\n\t\t\t\t';\n\t\t\t}\n\n\t\t\t\t// Image selector:\n\t\t\tif ($xmlArray['meta']['type'] == 'CSH' && preg_match('/\\.image$/',$labelKey))\t{\n\t\t\t\t$opt = array();\n\t\t\t\t\t$opt[] = '\n\t\t\t\t\t\t<option value=\"\">'.$LANG->getLL('image').'</option>';\n\t\t\t\t$images = t3lib_div::getFilesInDir(PATH_site.dirname($relFileRef).'/cshimages','gif,jpg,jpeg,png',1);\n\t\t\t\t$this->lastImages = array();\n\t\t\t\tforeach($images as $link)\t{\n\t\t\t\t\t$link = preg_replace('/.*ext\\//','EXT:',$link);\n\t\t\t\t\t$this->lastImages[] = $link;\n\t\t\t\t\t$opt[] = '\n\t\t\t\t\t\t<option value=\"'.$link.'\">'.$link.'</option>';\n\t\t\t\t}\n\n\t\t\t\t$onChange = \"\n\t\t\t\t\tdocument.forms.llxmlform['\".$elName.\"'].value =\n\t\t\t\t\t\tdocument.forms.llxmlform['\".$elName.\"'].value +\n\t\t\t\t\t\t(document.forms.llxmlform['\".$elName.\"'].value ? ', \\\\n' : '') +\n\t\t\t\t\t\tthis.options[this.selectedIndex].value;\n\t\t\t\t\tthis.selectedIndex = 0;\n\t\t\t\t\treturn false;\n\t\t\t\t\";\n\t\t\t\t$selector = '\n\t\t\t\t\t<br/>\n\t\t\t\t\t<select name=\"_\" onchange=\"'.htmlspecialchars($onChange).'\">\n\t\t\t\t\t'.implode('',$opt).'\n\t\t\t\t\t</select>\n\t\t\t\t';\n\n\t\t\t\t\t// Show images:\n\t\t\t\t$images = t3lib_div::trimExplode(',',$dataArray['default'][$labelKey],1);\n\t\t\t\tif (count($images))\t{\n\t\t\t\t\t$descrArray = explode(chr(10),$dataArray['default'][preg_replace('/^_/','',$labelKey).'_descr'],count($images));\n\t\t\t\t\tforeach($images as $kk => $ref)\t{\n\t\t\t\t\t\t$image = t3lib_div::getFileAbsFileName($ref);\n\t\t\t\t\t\tif ($image)\t{\n\t\t\t\t\t\t\t$imageRelPath = '../'.substr($image,strlen(PATH_site));\n\t\t\t\t\t\t\t$this->lastImages_count[$ref]++;\n\n\t\t\t\t\t\t\t$selector.='\n\t\t\t\t\t\t\t\t<hr/>'.$ref.'<br/>\n\t\t\t\t\t\t\t\t<img src=\"'.$GLOBALS['BACK_PATH'].$imageRelPath.'\" alt=\"\" style=\"border:1px solid black;\" />\n\t\t\t\t\t\t\t\t<p><b>'.$LANG->getLL('description').'</b> <em>'.htmlspecialchars($descrArray[$kk]).'</em></p>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$selector.='\n\t\t\t\t\t\t\t\t<hr/>'.$ref.' <b>'.$LANG->getLL('not_found').'</b><br/>\n\t\t\t\t\t\t\t\t<p><b>'.$LANG->getLL('description').'</b> <em>'.htmlspecialchars($descrArray[$kk]).'</em></p>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\t// Default description:\n\t\t\tif ($editLang == 'default')\t{\n\t\t\t\t$contextLabel = $LANG->getLL('context').'<input name=\"'.htmlspecialchars('labelContext['.$relFileRef.']['.$labelKey.']').'\" '.$GLOBALS['TBE_TEMPLATE']->formWidth(30).' value=\"'.htmlspecialchars(trim($xmlArray['meta']['labelContext'][$labelKey])).'\" />';\n\t\t\t} else {\n\t\t\t\tif (is_array($dataArray['default'][$labelKey])) {\n\t\t\t\t\tprintf(\"D \\$labelKey=$labelKey, \\$editLang=$editLang, \\$relFileRef=$relFileRef\\n\");\n\t\t\t\t}\n\t\t\t\tif (is_array($xmlArray['meta']['labelContext'][$labelKey])) {\n\t\t\t\t\tprintf(\"X \\$labelKey=$labelKey, \\$editLang=$editLang, \\$relFileRef=$relFileRef\\n\");\n\t\t\t\t}\n\t\t\t\t$contextLabel = nl2br(htmlspecialchars($dataArray['default'][$labelKey])).\n\t\t\t\t\t($xmlArray['meta']['labelContext'][$labelKey] ? '<hr/>'.$LANG->getLL('context').'<em>'.htmlspecialchars($xmlArray['meta']['labelContext'][$labelKey]).'</em>' : '');\n\t\t\t}\n\t\t\t$tCells[] = '<td>'.\n\t\t\t\t$contextLabel.\n\t\t\t\t$selector.\n\t\t\t\t'</td>';\n\n\n\t\t\t\t// Prepare status of the label:\n\t\t\t$bgcolor = '';\n\t\t\t$color = '#000';\n\t\t\tif (strlen(trim($dataArray[$editLang][$labelKey])))\t{\n\t\t\t\t$orig_hash = $xmlArray['orig_hash'][$editLang][$labelKey];\n\t\t\t\t$new_hash = t3lib_div::md5int($dataArray['default'][$labelKey]);\n\t\t\t\tif ($editLang!='default' && $orig_hash != $new_hash)\t{\n\t\t\t\t\tif (!$orig_hash)\t{\n\t\t\t\t\t\t$st = $LANG->getLL('status_interrogation');\n\t\t\t\t\t\t$bgcolor = '#ff6600';\n\t\t\t\t\t\t$this->labelStatus[$editLang][$relFileRef]['unknown'][] = $labelKey;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$st = $LANG->getLL('status_changed');\n\t\t\t\t\t\t$bgcolor = '#ff6666';\n\t\t\t\t\t\t$this->labelStatus[$editLang][$relFileRef]['changed'][] = $labelKey;\n\n\t\t\t\t\t\tif (strlen(trim($xmlArray['orig_text'][$editLang][$labelKey])))\t{\n\t\t\t\t\t\t\t$diffEngine = t3lib_div::makeInstance('t3lib_diff');\n\t\t\t\t\t\t\t$diffHTML = $diffEngine->makeDiffDisplay(\n\t\t\t\t\t\t\t\t\t\t\t$xmlArray['orig_text'][$editLang][$labelKey],\n\t\t\t\t\t\t\t\t\t\t\t$dataArray['default'][$labelKey]\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$st.='<div style=\"width:200px; background-color:white;\">'.$diffHTML.'</div>';\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$st = $LANG->getLL('status_ok');\n\t\t\t\t\t$bgcolor = '#009900';\n\t\t\t\t\t$color=\"#fff\";\n\t\t\t\t\t$this->labelStatus[$editLang][$relFileRef]['ok'][] = $labelKey;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$st = $LANG->getLL('status_new');\n\t\t\t\t$bgcolor = '#6666ff';\n\t\t\t\t$this->labelStatus[$editLang][$relFileRef]['new'][] = $labelKey;\n\t\t\t}\n\n\n\t\t\t\t// Editing field:\n\t\t\t$elValue = trim($dataArray[$editLang][$labelKey]);\n\t\t\t$elValueDefault = trim($dataArray['default'][$labelKey]);\n\n\t\tif (count(explode(chr(10),$elValue))>=2 || count(explode(chr(10),$elValueDefault))>=2 || $alwaysTextarea)\t{\n\t\t\t\t$wrapOff = substr($labelKey,-8)=='.seeAlso' ? 'off' : '';\n\t\t\t\tif (empty($elValue)) $line=round(strlen($elValueDefault)/70); else $line=round(strlen($elValue)/70);\n\t\t\t\t$formElement = '<textarea name=\"'.htmlspecialchars($elName).'\" rows=\"'.$line.'\" wrap=\"'.$wrapOff.'\" '.$GLOBALS['TBE_TEMPLATE']->formWidthText(50,'',$wrapOff).'>'.t3lib_div::formatForTextarea($elValue).'</textarea>';\n\n\t\t\t}\n\t\t\telse if (strlen($elValue)>100 ||strlen($elValueDefault)>100) {\n\t\t\t\t$line=round(strlen($elValue)/70);\n\t\t\t\t$formElement = '<textarea name=\"'.htmlspecialchars($elName).'\" rows=\"'.$line.'\" '.$GLOBALS['TBE_TEMPLATE']->formWidthText(50,'','').'>'.t3lib_div::formatForTextarea($elValue).'</textarea>';\n\t\t\t} else {\n\t\t\t\t$formElement = '<input name=\"'.htmlspecialchars($elName).'\" '.$GLOBALS['TBE_TEMPLATE']->formWidth(50).' value=\"'.htmlspecialchars($elValue).'\" />';\n\t\t\t}\n\t\t\t$tCells[] = '<td bgcolor=\"'.$bgcolor.'\">'.$formElement.'</td>';\n\n\t\t\t\t// Status label:\n\t\t\t$tCells[] = '<td bgcolor=\"'.$bgcolor.'\" style=\"color:'.$color.';text-align:center;\">'.$st.'</td>';\n\n\t\t\t\t// Additional support languages:\n\t\t\tforeach($this->langKeys as $langK)\t{\n\t\t\t\tif ($this->MOD_SETTINGS['addLang_'.$langK])\t{\n\t\t\t\t\t$tCells[] = '<td>'.nl2br(htmlspecialchars($dataArray[$langK][$labelKey])).'</td>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\t// Return row:\n\t\t\treturn '\n\t\t\t\t<tr class=\"bgColor4'.(($this->counter++)%2 ? '-20' : '').'\">\n\t\t\t\t\t'.implode('\n\t\t\t\t\t',$tCells).'\n\t\t\t\t</tr>';\n\t\t}\n\t}", "public static function buildTemplateTable()\r\n\t{\r\n\t\tglobal $lang;\r\n\t\t// Check if we're on the setup page in the Control Center\r\n\t\t$isSetupPage = (PAGE == self::CC_TEMPLATE_PAGE);\r\n\t\t// Store template projects in array\r\n\t\t$templateList = self::getTemplateList();\r\n\t\t// Initialize varrs\r\n\t\t$row_data = array();\r\n\t\t$headers = array();\r\n\t\t$i = 0;\r\n\t\t$textLengthTruncate = 230;\r\n\t\t// Loop through array of templates\r\n\t\tforeach ($templateList as $this_pid=>$attr)\r\n\t\t{\r\n\t\t\t// If not enabled yet, then do not display on Create Project page\r\n\t\t\tif (!$isSetupPage && !$attr['enabled']) continue;\t\t\r\n\t\t\t// If description is very long, truncate what is visible initially and add link to view entire text\r\n\t\t\tif (strlen($attr['description']) > $textLengthTruncate) {\r\n\t\t\t\t$textCutoffPosition = strrpos(substr($attr['description'], 0, $textLengthTruncate), \" \");\r\n\t\t\t\tif ($textCutoffPosition === false) $textCutoffPosition = $textLengthTruncate;\r\n\t\t\t\t$descr1 = substr($attr['description'], 0, $textCutoffPosition);\r\n\t\t\t\t$descr2 = substr($attr['description'], $textCutoffPosition);\r\n\t\t\t\t$attr['description'] = $descr1 . RCView::span('', \"... \") . \r\n\t\t\t\t\t\t\t\t\t\tRCView::a(array('href'=>'javascript:;','style'=>'text-decoration:underline;font-size:10px;','onclick'=>\"$(this).prev('span').hide();$(this).hide().next('span').show();\"), \r\n\t\t\t\t\t\t\t\t\t\t\t$lang['create_project_94']\r\n\t\t\t\t\t\t\t\t\t\t) .\r\n\t\t\t\t\t\t\t\t\t\tRCView::span(array('style'=>'display:none;'), $descr2);\r\n\t\t\t}\r\n\t\t\t// Set radio button (create project page) OR edit/delete icons (control center)\r\n\t\t\tif ($isSetupPage) {\r\n\t\t\t\t$actionItem = \tRCView::a(array('href'=>'javascript:;','onclick'=>\"projectTemplateAction('prompt_addedit',$this_pid);\"), \r\n\t\t\t\t\t\t\t\t\tRCView::img(array('src'=>'pencil.png','title'=>$lang['create_project_90']))\r\n\t\t\t\t\t\t\t\t) .\r\n\t\t\t\t\t\t\t\tRCView::a(array('style'=>'margin-left:3px;','href'=>'javascript:;','onclick'=>\"projectTemplateAction('prompt_delete',$this_pid);\"), \r\n\t\t\t\t\t\t\t\t\tRCView::img(array('src'=>'cross.png','title'=>$lang['create_project_93']))\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\t$actionItem = RCView::radio(array('name'=>'copyof','value'=>$this_pid));\r\n\t\t\t}\r\n\t\t\t// Add this project as a row\r\n\t\t\t$row_data[$i][] = $actionItem;\r\n\t\t\tif ($isSetupPage) {\r\n\t\t\t\t$row_data[$i][] = RCView::a(array('href'=>'javascript:;','onclick'=>\"projectTemplateAction('prompt_addedit',$this_pid);\"), \r\n\t\t\t\t\t\t\t\t\tRCView::img(array('src'=>($attr['enabled'] ? 'star.png' : 'star_empty.png'),'title'=>$lang['create_project_90']))\r\n\t\t\t\t\t\t\t\t );\r\n\t\t\t}\r\n\t\t\t$row_data[$i][] = RCView::div(array('style'=>'color:#800000;padding:0;white-space:normal;word-wrap:normal;line-height:12px;'), $attr['title']);\r\n\t\t\t$row_data[$i][] = RCView::div(array('style'=>'padding:0;white-space:normal;word-wrap:normal;line-height:12px;'), $attr['description']);\r\n\t\t\t// Increment counter\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t// If no templates exist, then give message \r\n\t\tif (empty($row_data))\r\n\t\t{\r\n\t\t\t$row_data[$i][] = \"\";\r\n\t\t\tif ($isSetupPage) $row_data[$i][] = \"\";\r\n\t\t\t$row_data[$i][] = RCView::div(array('style'=>'padding:0;white-space:normal;word-wrap:normal;'), $lang['create_project_77']);\r\n\t\t\t$row_data[$i][] = \"\";\r\n\t\t}\r\n\t\t// \"Add templates\" button\r\n\t\t$addTemplatesBtn = ((SUPER_USER && !$isSetupPage)\r\n\t\t\t\t\t\t\t? \t// Create New Project page\r\n\t\t\t\t\t\t\t\tRCView::div(array('style'=>'float:right;padding:5px 0 0;'),\r\n\t\t\t\t\t\t\t\t\tRCView::button(array('class'=>'jqbuttonsm','style'=>'color:green;','onclick'=>\"window.location.href=app_path_webroot+'\".self::CC_TEMPLATE_PAGE.\"';return false;\"), \r\n\t\t\t\t\t\t\t\t\t\tRCView::img(array('src'=>'plus_small2.png')) . $lang['create_project_78']\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: \r\n\t\t\t\t\t\t\t\t(!$isSetupPage ? \"\" : \r\n\t\t\t\t\t\t\t\t\t// Control Center\r\n\t\t\t\t\t\t\t\t\tRCView::div(array('style'=>'float:right;padding:0 200px 5px 0;'),\r\n\t\t\t\t\t\t\t\t\t\tRCView::button(array('class'=>'jqbuttonmed','style'=>'color:green;','onclick'=>\"projectTemplateAction('prompt_addedit')\"), \r\n\t\t\t\t\t\t\t\t\t\t\tRCView::img(array('src'=>'add.png','style'=>'vertical-align:middle')) . \r\n\t\t\t\t\t\t\t\t\t\t\tRCView::span(array('style'=>'vertical-align:middle'), $lang['create_project_83'])\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);\r\n\t\t// Width & height\r\n\t\t$width = 720;\r\n\t\t$height = ($isSetupPage) ? 500 : 200;\r\n\t\t// Set table headers and attributes\r\n\t\t// First column (radios or edit/delete icons)\r\n\t\t$headers[] = array(42, ($isSetupPage ? \"\" : RCView::div(array('style'=>'font-size:10px;padding:0;white-space:normal;word-wrap:normal;color:#777777;font-family:tahoma;line-height:10px;'), $lang['create_project_74'])), \"center\");\r\n\t\tif ($isSetupPage) {\r\n\t\t\t// Column for Enabled stars\r\n\t\t\t$headers[] = array(43, $lang['create_project_104'], 'center');\r\n\t\t}\r\n\t\t// Title column\r\n\t\t$headers[] = array(163, RCView::b($lang['create_project_73']) . RCView::SP . RCView::SP . RCView::SP . $lang['create_project_103']);\r\n\t\t// Discription column\r\n\t\t$headers[] = array(461 - ($isSetupPage ? 55 : 0), RCView::b($lang['create_project_69']));\r\n\t\t// Title\r\n\t\t$title = RCView::div(array('style'=>'float:left;padding:1px 0 12px 5px;font-weight:bold;'),\r\n\t\t\t\t\tRCView::span(array('style'=>'font-size:12px;color:#800000;'), \r\n\t\t\t\t\t\t($isSetupPage ? $lang['create_project_81'] : RCView::img(array('src'=>'star.png','class'=>'imgfix')) . $lang['create_project_66'])\r\n\t\t\t\t\t) . \r\n\t\t\t\t\t($isSetupPage ? '' : RCView::span(array('style'=>'font-weight:normal;margin-left:10px;'), $lang['create_project_65']))\r\n\t\t\t\t ) . \r\n\t\t\t\t $addTemplatesBtn;\r\n\t\t// Render table and return its html\r\n\t\treturn renderGrid(\"template_projects_list\", $title, $width, $height, $headers, $row_data, true, true, false);\r\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->AddUrl = $this->GetAddUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\t\t$this->ListUrl = $this->GetListUrl();\n\t\t$this->SetupOtherOptions();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// unid\n\t\t// u_id\n\t\t// acl_id\n\t\t// Title\n\t\t// LV\n\t\t// Type\n\t\t// ResetTime\n\t\t// ResetType\n\t\t// CompleteTask\n\t\t// Occupation\n\t\t// Target\n\t\t// Data\n\t\t// Reward_Gold\n\t\t// Reward_Diamonds\n\t\t// Reward_EXP\n\t\t// Reward_Goods\n\t\t// Info\n\t\t// DATETIME\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// unid\n\t\t$this->unid->ViewValue = $this->unid->CurrentValue;\n\t\t$this->unid->ViewCustomAttributes = \"\";\n\n\t\t// u_id\n\t\t$this->u_id->ViewValue = $this->u_id->CurrentValue;\n\t\t$this->u_id->ViewCustomAttributes = \"\";\n\n\t\t// acl_id\n\t\t$this->acl_id->ViewValue = $this->acl_id->CurrentValue;\n\t\t$this->acl_id->ViewCustomAttributes = \"\";\n\n\t\t// Title\n\t\t$this->Title->ViewValue = $this->Title->CurrentValue;\n\t\t$this->Title->ViewCustomAttributes = \"\";\n\n\t\t// LV\n\t\t$this->LV->ViewValue = $this->LV->CurrentValue;\n\t\t$this->LV->ViewCustomAttributes = \"\";\n\n\t\t// Type\n\t\t$this->Type->ViewValue = $this->Type->CurrentValue;\n\t\t$this->Type->ViewCustomAttributes = \"\";\n\n\t\t// ResetTime\n\t\t$this->ResetTime->ViewValue = $this->ResetTime->CurrentValue;\n\t\t$this->ResetTime->ViewCustomAttributes = \"\";\n\n\t\t// ResetType\n\t\t$this->ResetType->ViewValue = $this->ResetType->CurrentValue;\n\t\t$this->ResetType->ViewCustomAttributes = \"\";\n\n\t\t// CompleteTask\n\t\t$this->CompleteTask->ViewValue = $this->CompleteTask->CurrentValue;\n\t\t$this->CompleteTask->ViewCustomAttributes = \"\";\n\n\t\t// Occupation\n\t\t$this->Occupation->ViewValue = $this->Occupation->CurrentValue;\n\t\t$this->Occupation->ViewCustomAttributes = \"\";\n\n\t\t// Target\n\t\t$this->Target->ViewValue = $this->Target->CurrentValue;\n\t\t$this->Target->ViewCustomAttributes = \"\";\n\n\t\t// Data\n\t\t$this->Data->ViewValue = $this->Data->CurrentValue;\n\t\t$this->Data->ViewCustomAttributes = \"\";\n\n\t\t// Reward_Gold\n\t\t$this->Reward_Gold->ViewValue = $this->Reward_Gold->CurrentValue;\n\t\t$this->Reward_Gold->ViewCustomAttributes = \"\";\n\n\t\t// Reward_Diamonds\n\t\t$this->Reward_Diamonds->ViewValue = $this->Reward_Diamonds->CurrentValue;\n\t\t$this->Reward_Diamonds->ViewCustomAttributes = \"\";\n\n\t\t// Reward_EXP\n\t\t$this->Reward_EXP->ViewValue = $this->Reward_EXP->CurrentValue;\n\t\t$this->Reward_EXP->ViewCustomAttributes = \"\";\n\n\t\t// Reward_Goods\n\t\t$this->Reward_Goods->ViewValue = $this->Reward_Goods->CurrentValue;\n\t\t$this->Reward_Goods->ViewCustomAttributes = \"\";\n\n\t\t// Info\n\t\t$this->Info->ViewValue = $this->Info->CurrentValue;\n\t\t$this->Info->ViewCustomAttributes = \"\";\n\n\t\t// DATETIME\n\t\t$this->DATETIME->ViewValue = $this->DATETIME->CurrentValue;\n\t\t$this->DATETIME->ViewValue = ew_FormatDateTime($this->DATETIME->ViewValue, 0);\n\t\t$this->DATETIME->ViewCustomAttributes = \"\";\n\n\t\t\t// unid\n\t\t\t$this->unid->LinkCustomAttributes = \"\";\n\t\t\t$this->unid->HrefValue = \"\";\n\t\t\t$this->unid->TooltipValue = \"\";\n\n\t\t\t// u_id\n\t\t\t$this->u_id->LinkCustomAttributes = \"\";\n\t\t\t$this->u_id->HrefValue = \"\";\n\t\t\t$this->u_id->TooltipValue = \"\";\n\n\t\t\t// acl_id\n\t\t\t$this->acl_id->LinkCustomAttributes = \"\";\n\t\t\t$this->acl_id->HrefValue = \"\";\n\t\t\t$this->acl_id->TooltipValue = \"\";\n\n\t\t\t// Title\n\t\t\t$this->Title->LinkCustomAttributes = \"\";\n\t\t\t$this->Title->HrefValue = \"\";\n\t\t\t$this->Title->TooltipValue = \"\";\n\n\t\t\t// LV\n\t\t\t$this->LV->LinkCustomAttributes = \"\";\n\t\t\t$this->LV->HrefValue = \"\";\n\t\t\t$this->LV->TooltipValue = \"\";\n\n\t\t\t// Type\n\t\t\t$this->Type->LinkCustomAttributes = \"\";\n\t\t\t$this->Type->HrefValue = \"\";\n\t\t\t$this->Type->TooltipValue = \"\";\n\n\t\t\t// ResetTime\n\t\t\t$this->ResetTime->LinkCustomAttributes = \"\";\n\t\t\t$this->ResetTime->HrefValue = \"\";\n\t\t\t$this->ResetTime->TooltipValue = \"\";\n\n\t\t\t// ResetType\n\t\t\t$this->ResetType->LinkCustomAttributes = \"\";\n\t\t\t$this->ResetType->HrefValue = \"\";\n\t\t\t$this->ResetType->TooltipValue = \"\";\n\n\t\t\t// CompleteTask\n\t\t\t$this->CompleteTask->LinkCustomAttributes = \"\";\n\t\t\t$this->CompleteTask->HrefValue = \"\";\n\t\t\t$this->CompleteTask->TooltipValue = \"\";\n\n\t\t\t// Occupation\n\t\t\t$this->Occupation->LinkCustomAttributes = \"\";\n\t\t\t$this->Occupation->HrefValue = \"\";\n\t\t\t$this->Occupation->TooltipValue = \"\";\n\n\t\t\t// Target\n\t\t\t$this->Target->LinkCustomAttributes = \"\";\n\t\t\t$this->Target->HrefValue = \"\";\n\t\t\t$this->Target->TooltipValue = \"\";\n\n\t\t\t// Data\n\t\t\t$this->Data->LinkCustomAttributes = \"\";\n\t\t\t$this->Data->HrefValue = \"\";\n\t\t\t$this->Data->TooltipValue = \"\";\n\n\t\t\t// Reward_Gold\n\t\t\t$this->Reward_Gold->LinkCustomAttributes = \"\";\n\t\t\t$this->Reward_Gold->HrefValue = \"\";\n\t\t\t$this->Reward_Gold->TooltipValue = \"\";\n\n\t\t\t// Reward_Diamonds\n\t\t\t$this->Reward_Diamonds->LinkCustomAttributes = \"\";\n\t\t\t$this->Reward_Diamonds->HrefValue = \"\";\n\t\t\t$this->Reward_Diamonds->TooltipValue = \"\";\n\n\t\t\t// Reward_EXP\n\t\t\t$this->Reward_EXP->LinkCustomAttributes = \"\";\n\t\t\t$this->Reward_EXP->HrefValue = \"\";\n\t\t\t$this->Reward_EXP->TooltipValue = \"\";\n\n\t\t\t// Reward_Goods\n\t\t\t$this->Reward_Goods->LinkCustomAttributes = \"\";\n\t\t\t$this->Reward_Goods->HrefValue = \"\";\n\t\t\t$this->Reward_Goods->TooltipValue = \"\";\n\n\t\t\t// Info\n\t\t\t$this->Info->LinkCustomAttributes = \"\";\n\t\t\t$this->Info->HrefValue = \"\";\n\t\t\t$this->Info->TooltipValue = \"\";\n\n\t\t\t// DATETIME\n\t\t\t$this->DATETIME->LinkCustomAttributes = \"\";\n\t\t\t$this->DATETIME->HrefValue = \"\";\n\t\t\t$this->DATETIME->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderEditRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// IDXDAFTAR\n\t\t$this->IDXDAFTAR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IDXDAFTAR->EditCustomAttributes = \"\";\n\t\t$this->IDXDAFTAR->EditValue = $this->IDXDAFTAR->CurrentValue;\n\t\t$this->IDXDAFTAR->ViewCustomAttributes = \"\";\n\n\t\t// TGLREG\n\t\t$this->TGLREG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TGLREG->EditCustomAttributes = \"\";\n\t\t$this->TGLREG->EditValue = $this->TGLREG->CurrentValue;\n\t\t$this->TGLREG->EditValue = ew_FormatDateTime($this->TGLREG->EditValue, 0);\n\t\t$this->TGLREG->ViewCustomAttributes = \"\";\n\n\t\t// NOMR\n\t\t$this->NOMR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOMR->EditCustomAttributes = \"\";\n\t\t$this->NOMR->EditValue = $this->NOMR->CurrentValue;\n\t\tif (strval($this->NOMR->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`NOMR`\" . ew_SearchString(\"=\", $this->NOMR->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `NOMR`, `NOMR` AS `DispFld`, `NAMA` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_pasien`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->NOMR->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->NOMR, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$this->NOMR->EditValue = $this->NOMR->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->NOMR->EditValue = $this->NOMR->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->NOMR->EditValue = NULL;\n\t\t}\n\t\t$this->NOMR->ViewCustomAttributes = \"\";\n\n\t\t// KETERANGAN\n\t\t$this->KETERANGAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KETERANGAN->EditCustomAttributes = \"\";\n\t\t$this->KETERANGAN->EditValue = $this->KETERANGAN->CurrentValue;\n\t\t$this->KETERANGAN->ViewCustomAttributes = \"\";\n\n\t\t// NOKARTU_BPJS\n\t\t$this->NOKARTU_BPJS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOKARTU_BPJS->EditCustomAttributes = \"\";\n\t\t$this->NOKARTU_BPJS->EditValue = $this->NOKARTU_BPJS->CurrentValue;\n\t\t$this->NOKARTU_BPJS->ViewCustomAttributes = \"\";\n\n\t\t// NOKTP\n\t\t$this->NOKTP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOKTP->EditCustomAttributes = \"\";\n\t\t$this->NOKTP->EditValue = $this->NOKTP->CurrentValue;\n\t\t$this->NOKTP->ViewCustomAttributes = \"\";\n\n\t\t// KDDOKTER\n\t\t$this->KDDOKTER->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KDDOKTER->EditCustomAttributes = \"\";\n\t\t$this->KDDOKTER->EditValue = $this->KDDOKTER->CurrentValue;\n\t\tif (strval($this->KDDOKTER->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KDDOKTER`\" . ew_SearchString(\"=\", $this->KDDOKTER->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KDDOKTER`, `NAMADOKTER` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_dokter`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDDOKTER->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDDOKTER, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDDOKTER->EditValue = $this->KDDOKTER->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDDOKTER->EditValue = $this->KDDOKTER->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDDOKTER->EditValue = NULL;\n\t\t}\n\t\t$this->KDDOKTER->ViewCustomAttributes = \"\";\n\n\t\t// KDPOLY\n\t\t$this->KDPOLY->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KDPOLY->EditCustomAttributes = \"\";\n\t\tif (strval($this->KDPOLY->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->KDPOLY->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `kode`, `nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_poly`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDPOLY->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDPOLY, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDPOLY->EditValue = $this->KDPOLY->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDPOLY->EditValue = $this->KDPOLY->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDPOLY->EditValue = NULL;\n\t\t}\n\t\t$this->KDPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KDRUJUK\n\t\t$this->KDRUJUK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KDRUJUK->EditCustomAttributes = \"\";\n\t\t$this->KDRUJUK->EditValue = $this->KDRUJUK->CurrentValue;\n\t\tif (strval($this->KDRUJUK->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDRUJUK->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_rujukan`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDRUJUK->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDRUJUK, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDRUJUK->EditValue = $this->KDRUJUK->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDRUJUK->EditValue = $this->KDRUJUK->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDRUJUK->EditValue = NULL;\n\t\t}\n\t\t$this->KDRUJUK->ViewCustomAttributes = \"\";\n\n\t\t// KDCARABAYAR\n\t\t$this->KDCARABAYAR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KDCARABAYAR->EditCustomAttributes = \"\";\n\t\t$this->KDCARABAYAR->EditValue = $this->KDCARABAYAR->CurrentValue;\n\t\tif (strval($this->KDCARABAYAR->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDCARABAYAR->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_carabayar`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDCARABAYAR->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDCARABAYAR, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDCARABAYAR->EditValue = $this->KDCARABAYAR->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDCARABAYAR->EditValue = $this->KDCARABAYAR->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDCARABAYAR->EditValue = NULL;\n\t\t}\n\t\t$this->KDCARABAYAR->ViewCustomAttributes = \"\";\n\n\t\t// NOJAMINAN\n\t\t$this->NOJAMINAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOJAMINAN->EditCustomAttributes = \"\";\n\t\t$this->NOJAMINAN->EditValue = $this->NOJAMINAN->CurrentValue;\n\t\t$this->NOJAMINAN->ViewCustomAttributes = \"\";\n\n\t\t// SHIFT\n\t\t$this->SHIFT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->SHIFT->EditCustomAttributes = \"\";\n\t\t$this->SHIFT->EditValue = $this->SHIFT->CurrentValue;\n\t\t$this->SHIFT->ViewCustomAttributes = \"\";\n\n\t\t// STATUS\n\t\t$this->STATUS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->STATUS->EditCustomAttributes = \"\";\n\t\t$this->STATUS->EditValue = $this->STATUS->CurrentValue;\n\t\t$this->STATUS->ViewCustomAttributes = \"\";\n\n\t\t// KETERANGAN_STATUS\n\t\t$this->KETERANGAN_STATUS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KETERANGAN_STATUS->EditCustomAttributes = \"\";\n\t\t$this->KETERANGAN_STATUS->EditValue = $this->KETERANGAN_STATUS->CurrentValue;\n\t\t$this->KETERANGAN_STATUS->ViewCustomAttributes = \"\";\n\n\t\t// PASIENBARU\n\t\t$this->PASIENBARU->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PASIENBARU->EditCustomAttributes = \"\";\n\t\t$this->PASIENBARU->EditValue = $this->PASIENBARU->CurrentValue;\n\t\t$this->PASIENBARU->ViewCustomAttributes = \"\";\n\n\t\t// NIP\n\t\t$this->NIP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NIP->EditCustomAttributes = \"\";\n\t\t$this->NIP->EditValue = $this->NIP->CurrentValue;\n\t\t$this->NIP->ViewCustomAttributes = \"\";\n\n\t\t// MASUKPOLY\n\t\t$this->MASUKPOLY->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MASUKPOLY->EditCustomAttributes = \"\";\n\t\t$this->MASUKPOLY->EditValue = $this->MASUKPOLY->CurrentValue;\n\t\t$this->MASUKPOLY->EditValue = ew_FormatDateTime($this->MASUKPOLY->EditValue, 4);\n\t\t$this->MASUKPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KELUARPOLY\n\t\t$this->KELUARPOLY->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KELUARPOLY->EditCustomAttributes = \"\";\n\t\t$this->KELUARPOLY->EditValue = $this->KELUARPOLY->CurrentValue;\n\t\t$this->KELUARPOLY->EditValue = ew_FormatDateTime($this->KELUARPOLY->EditValue, 4);\n\t\t$this->KELUARPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KETRUJUK\n\t\t$this->KETRUJUK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KETRUJUK->EditCustomAttributes = \"\";\n\t\t$this->KETRUJUK->EditValue = $this->KETRUJUK->CurrentValue;\n\t\t$this->KETRUJUK->ViewCustomAttributes = \"\";\n\n\t\t// KETBAYAR\n\t\t$this->KETBAYAR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KETBAYAR->EditCustomAttributes = \"\";\n\t\t$this->KETBAYAR->EditValue = $this->KETBAYAR->CurrentValue;\n\t\t$this->KETBAYAR->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_NAMA\n\t\t$this->PENANGGUNGJAWAB_NAMA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_NAMA->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_NAMA->EditValue = $this->PENANGGUNGJAWAB_NAMA->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_NAMA->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_HUBUNGAN\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditValue = $this->PENANGGUNGJAWAB_HUBUNGAN->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_ALAMAT\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditValue = $this->PENANGGUNGJAWAB_ALAMAT->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_PHONE\n\t\t$this->PENANGGUNGJAWAB_PHONE->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_PHONE->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_PHONE->EditValue = $this->PENANGGUNGJAWAB_PHONE->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_PHONE->ViewCustomAttributes = \"\";\n\n\t\t// JAMREG\n\t\t$this->JAMREG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JAMREG->EditCustomAttributes = \"\";\n\t\t$this->JAMREG->EditValue = $this->JAMREG->CurrentValue;\n\t\t$this->JAMREG->EditValue = ew_FormatDateTime($this->JAMREG->EditValue, 0);\n\t\t$this->JAMREG->ViewCustomAttributes = \"\";\n\n\t\t// BATAL\n\t\t$this->BATAL->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BATAL->EditCustomAttributes = \"\";\n\t\t$this->BATAL->EditValue = $this->BATAL->CurrentValue;\n\t\t$this->BATAL->ViewCustomAttributes = \"\";\n\n\t\t// NO_SJP\n\t\t$this->NO_SJP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NO_SJP->EditCustomAttributes = \"\";\n\t\t$this->NO_SJP->EditValue = $this->NO_SJP->CurrentValue;\n\t\t$this->NO_SJP->ViewCustomAttributes = \"\";\n\n\t\t// NO_PESERTA\n\t\t$this->NO_PESERTA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NO_PESERTA->EditCustomAttributes = \"\";\n\t\t$this->NO_PESERTA->EditValue = $this->NO_PESERTA->CurrentValue;\n\t\t$this->NO_PESERTA->ViewCustomAttributes = \"\";\n\n\t\t// NOKARTU\n\t\t$this->NOKARTU->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOKARTU->EditCustomAttributes = \"\";\n\t\t$this->NOKARTU->EditValue = $this->NOKARTU->CurrentValue;\n\t\t$this->NOKARTU->ViewCustomAttributes = \"\";\n\n\t\t// TANGGAL_SEP\n\t\t$this->TANGGAL_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TANGGAL_SEP->EditCustomAttributes = \"\";\n\t\t$this->TANGGAL_SEP->EditValue = $this->TANGGAL_SEP->CurrentValue;\n\t\t$this->TANGGAL_SEP->EditValue = ew_FormatDateTime($this->TANGGAL_SEP->EditValue, 0);\n\t\t$this->TANGGAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// TANGGALRUJUK_SEP\n\t\t$this->TANGGALRUJUK_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TANGGALRUJUK_SEP->EditCustomAttributes = \"\";\n\t\t$this->TANGGALRUJUK_SEP->EditValue = $this->TANGGALRUJUK_SEP->CurrentValue;\n\t\t$this->TANGGALRUJUK_SEP->EditValue = ew_FormatDateTime($this->TANGGALRUJUK_SEP->EditValue, 0);\n\t\t$this->TANGGALRUJUK_SEP->ViewCustomAttributes = \"\";\n\n\t\t// KELASRAWAT_SEP\n\t\t$this->KELASRAWAT_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KELASRAWAT_SEP->EditCustomAttributes = \"\";\n\t\t$this->KELASRAWAT_SEP->EditValue = $this->KELASRAWAT_SEP->CurrentValue;\n\t\t$this->KELASRAWAT_SEP->ViewCustomAttributes = \"\";\n\n\t\t// MINTA_RUJUKAN\n\t\t$this->MINTA_RUJUKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MINTA_RUJUKAN->EditCustomAttributes = \"\";\n\t\t$this->MINTA_RUJUKAN->EditValue = $this->MINTA_RUJUKAN->CurrentValue;\n\t\t$this->MINTA_RUJUKAN->ViewCustomAttributes = \"\";\n\n\t\t// NORUJUKAN_SEP\n\t\t$this->NORUJUKAN_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NORUJUKAN_SEP->EditCustomAttributes = \"\";\n\t\t$this->NORUJUKAN_SEP->EditValue = $this->NORUJUKAN_SEP->CurrentValue;\n\t\t$this->NORUJUKAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// PPKRUJUKANASAL_SEP\n\t\t$this->PPKRUJUKANASAL_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PPKRUJUKANASAL_SEP->EditCustomAttributes = \"\";\n\t\t$this->PPKRUJUKANASAL_SEP->EditValue = $this->PPKRUJUKANASAL_SEP->CurrentValue;\n\t\t$this->PPKRUJUKANASAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// NAMAPPKRUJUKANASAL_SEP\n\t\t$this->NAMAPPKRUJUKANASAL_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NAMAPPKRUJUKANASAL_SEP->EditCustomAttributes = \"\";\n\t\t$this->NAMAPPKRUJUKANASAL_SEP->EditValue = $this->NAMAPPKRUJUKANASAL_SEP->CurrentValue;\n\t\t$this->NAMAPPKRUJUKANASAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// PPKPELAYANAN_SEP\n\t\t$this->PPKPELAYANAN_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PPKPELAYANAN_SEP->EditCustomAttributes = \"\";\n\t\t$this->PPKPELAYANAN_SEP->EditValue = $this->PPKPELAYANAN_SEP->CurrentValue;\n\t\t$this->PPKPELAYANAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// JENISPERAWATAN_SEP\n\t\t$this->JENISPERAWATAN_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JENISPERAWATAN_SEP->EditCustomAttributes = \"\";\n\t\t$this->JENISPERAWATAN_SEP->EditValue = $this->JENISPERAWATAN_SEP->CurrentValue;\n\t\t$this->JENISPERAWATAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// CATATAN_SEP\n\t\t$this->CATATAN_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->CATATAN_SEP->EditCustomAttributes = \"\";\n\t\t$this->CATATAN_SEP->EditValue = $this->CATATAN_SEP->CurrentValue;\n\t\t$this->CATATAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// DIAGNOSAAWAL_SEP\n\t\t$this->DIAGNOSAAWAL_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->DIAGNOSAAWAL_SEP->EditCustomAttributes = \"\";\n\t\t$this->DIAGNOSAAWAL_SEP->EditValue = $this->DIAGNOSAAWAL_SEP->CurrentValue;\n\t\t$this->DIAGNOSAAWAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// NAMADIAGNOSA_SEP\n\t\t$this->NAMADIAGNOSA_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NAMADIAGNOSA_SEP->EditCustomAttributes = \"\";\n\t\t$this->NAMADIAGNOSA_SEP->EditValue = $this->NAMADIAGNOSA_SEP->CurrentValue;\n\t\t$this->NAMADIAGNOSA_SEP->ViewCustomAttributes = \"\";\n\n\t\t// LAKALANTAS_SEP\n\t\t$this->LAKALANTAS_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->LAKALANTAS_SEP->EditCustomAttributes = \"\";\n\t\t$this->LAKALANTAS_SEP->EditValue = $this->LAKALANTAS_SEP->CurrentValue;\n\t\t$this->LAKALANTAS_SEP->ViewCustomAttributes = \"\";\n\n\t\t// LOKASILAKALANTAS\n\t\t$this->LOKASILAKALANTAS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->LOKASILAKALANTAS->EditCustomAttributes = \"\";\n\t\t$this->LOKASILAKALANTAS->EditValue = $this->LOKASILAKALANTAS->CurrentValue;\n\t\t$this->LOKASILAKALANTAS->ViewCustomAttributes = \"\";\n\n\t\t// USER\n\t\t$this->USER->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->USER->EditCustomAttributes = \"\";\n\t\t$this->USER->EditValue = $this->USER->CurrentValue;\n\t\t$this->USER->ViewCustomAttributes = \"\";\n\n\t\t// tanggal\n\t\t$this->tanggal->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->tanggal->EditCustomAttributes = \"\";\n\t\t$this->tanggal->EditValue = $this->tanggal->CurrentValue;\n\t\t$this->tanggal->ViewCustomAttributes = \"\";\n\n\t\t// bulan\n\t\t$this->bulan->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->bulan->EditCustomAttributes = \"\";\n\t\tif (strval($this->bulan->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`bulan_id`\" . ew_SearchString(\"=\", $this->bulan->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `bulan_id`, `bulan_nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_bulan`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->bulan->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->bulan, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->bulan->EditValue = $this->bulan->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->bulan->EditValue = $this->bulan->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->bulan->EditValue = NULL;\n\t\t}\n\t\t$this->bulan->ViewCustomAttributes = \"\";\n\n\t\t// tahun\n\t\t$this->tahun->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->tahun->EditCustomAttributes = \"\";\n\t\t$this->tahun->EditValue = $this->tahun->CurrentValue;\n\t\t$this->tahun->ViewCustomAttributes = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "protected function _createRowContainer()\n\t{\n\t\tif ($this->_tbody == null) {\n\t\t\t$this->_tbody = new HtmlElement('tbody');\n\t\t\t$this->addElement($this->_tbody);\t\t\t\n\t\t}\t\t\n\t}", "function RenderEditRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// rid\n\t\t$this->rid->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->rid->EditCustomAttributes = \"\";\n\t\t$this->rid->EditValue = $this->rid->CurrentValue;\n\t\t$this->rid->ViewCustomAttributes = \"\";\n\n\t\t// usn\n\t\t$this->usn->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->usn->EditCustomAttributes = \"\";\n\t\t$this->usn->EditValue = $this->usn->CurrentValue;\n\t\t$this->usn->PlaceHolder = ew_RemoveHtml($this->usn->FldCaption());\n\n\t\t// name\n\t\t$this->name->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->name->EditCustomAttributes = \"\";\n\t\t$this->name->EditValue = $this->name->CurrentValue;\n\t\t$this->name->PlaceHolder = ew_RemoveHtml($this->name->FldCaption());\n\n\t\t// sc1\n\t\t$this->sc1->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc1->EditCustomAttributes = \"\";\n\t\t$this->sc1->EditValue = $this->sc1->CurrentValue;\n\t\t$this->sc1->PlaceHolder = ew_RemoveHtml($this->sc1->FldCaption());\n\n\t\t// s1\n\t\t$this->s1->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s1->EditCustomAttributes = \"\";\n\t\t$this->s1->EditValue = $this->s1->CurrentValue;\n\t\t$this->s1->PlaceHolder = ew_RemoveHtml($this->s1->FldCaption());\n\n\t\t// sc2\n\t\t$this->sc2->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc2->EditCustomAttributes = \"\";\n\t\t$this->sc2->EditValue = $this->sc2->CurrentValue;\n\t\t$this->sc2->PlaceHolder = ew_RemoveHtml($this->sc2->FldCaption());\n\n\t\t// s2\n\t\t$this->s2->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s2->EditCustomAttributes = \"\";\n\t\t$this->s2->EditValue = $this->s2->CurrentValue;\n\t\t$this->s2->PlaceHolder = ew_RemoveHtml($this->s2->FldCaption());\n\n\t\t// sc3\n\t\t$this->sc3->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc3->EditCustomAttributes = \"\";\n\t\t$this->sc3->EditValue = $this->sc3->CurrentValue;\n\t\t$this->sc3->PlaceHolder = ew_RemoveHtml($this->sc3->FldCaption());\n\n\t\t// s3\n\t\t$this->s3->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s3->EditCustomAttributes = \"\";\n\t\t$this->s3->EditValue = $this->s3->CurrentValue;\n\t\t$this->s3->PlaceHolder = ew_RemoveHtml($this->s3->FldCaption());\n\n\t\t// sc4\n\t\t$this->sc4->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc4->EditCustomAttributes = \"\";\n\t\t$this->sc4->EditValue = $this->sc4->CurrentValue;\n\t\t$this->sc4->PlaceHolder = ew_RemoveHtml($this->sc4->FldCaption());\n\n\t\t// s4\n\t\t$this->s4->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s4->EditCustomAttributes = \"\";\n\t\t$this->s4->EditValue = $this->s4->CurrentValue;\n\t\t$this->s4->PlaceHolder = ew_RemoveHtml($this->s4->FldCaption());\n\n\t\t// sc5\n\t\t$this->sc5->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc5->EditCustomAttributes = \"\";\n\t\t$this->sc5->EditValue = $this->sc5->CurrentValue;\n\t\t$this->sc5->PlaceHolder = ew_RemoveHtml($this->sc5->FldCaption());\n\n\t\t// s5\n\t\t$this->s5->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s5->EditCustomAttributes = \"\";\n\t\t$this->s5->EditValue = $this->s5->CurrentValue;\n\t\t$this->s5->PlaceHolder = ew_RemoveHtml($this->s5->FldCaption());\n\n\t\t// sc6\n\t\t$this->sc6->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc6->EditCustomAttributes = \"\";\n\t\t$this->sc6->EditValue = $this->sc6->CurrentValue;\n\t\t$this->sc6->PlaceHolder = ew_RemoveHtml($this->sc6->FldCaption());\n\n\t\t// s6\n\t\t$this->s6->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s6->EditCustomAttributes = \"\";\n\t\t$this->s6->EditValue = $this->s6->CurrentValue;\n\t\t$this->s6->PlaceHolder = ew_RemoveHtml($this->s6->FldCaption());\n\n\t\t// sc7\n\t\t$this->sc7->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc7->EditCustomAttributes = \"\";\n\t\t$this->sc7->EditValue = $this->sc7->CurrentValue;\n\t\t$this->sc7->PlaceHolder = ew_RemoveHtml($this->sc7->FldCaption());\n\n\t\t// s7\n\t\t$this->s7->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s7->EditCustomAttributes = \"\";\n\t\t$this->s7->EditValue = $this->s7->CurrentValue;\n\t\t$this->s7->PlaceHolder = ew_RemoveHtml($this->s7->FldCaption());\n\n\t\t// sc8\n\t\t$this->sc8->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc8->EditCustomAttributes = \"\";\n\t\t$this->sc8->EditValue = $this->sc8->CurrentValue;\n\t\t$this->sc8->PlaceHolder = ew_RemoveHtml($this->sc8->FldCaption());\n\n\t\t// s8\n\t\t$this->s8->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s8->EditCustomAttributes = \"\";\n\t\t$this->s8->EditValue = $this->s8->CurrentValue;\n\t\t$this->s8->PlaceHolder = ew_RemoveHtml($this->s8->FldCaption());\n\n\t\t// total\n\t\t$this->total->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->total->EditCustomAttributes = \"\";\n\t\t$this->total->EditValue = $this->total->CurrentValue;\n\t\t$this->total->PlaceHolder = ew_RemoveHtml($this->total->FldCaption());\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "private function build_item_data($groupie, $rows) {\n\t\t$rendered='';\n\t\t$item_count=0;\n\t\t$item_count_total=0;\n\t\t$rows_current=array();\n\t\t// process the item template (lowest levels only)\n\t\tif (($rows!=null) && ($groupie->item_template!=null)) {\n\t\t\t\n\t\t\t// if there is a field map defined, map the values from the row\n\t\t\t// into the control->attributes array\n\t\t\tif($groupie->control_attribute_map) {\n\t\t\t\t$map_items = $groupie->control_attribute_map->items;\n\n\t\t\t\tforeach($map_items as $item)\n\t\t\t\t{\t\n\t\t\t\t\tforeach($item->items as $attribute => $mapping)\n\t\t\t\t\t\t$this->attributes[$attribute] = $rows[0][$mapping];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t$template=$this->get_template($groupie->item_template);\n\t\t\t} catch (Exception $e) { \n\t\t\t\t// The only exception currently thrown is if the item template file isn't there\n\t\t\t\t// (in this case, we'll look for item.php in the same location)\n\t\t\t\t$item_segments = explode(\"/\", $groupie->item_template);\n\t\t\t\tarray_pop($item_segments); // ditch original file name\n\t\t\t\t$item_segments[] = \"item\"; // add default file \n\t\t\t\t$template=new Template(implode(\"/\", $item_segments));\n\t\t\t}\n\n\t\t\t$total_rows = count($rows);\n\t\t\tforeach($rows as $row) {\n\t\t\t\t$rendered.=$template->render(array('item' => $row, 'control' => $this, 'count' => $this->count, 'total_count' => $this->total_count, 'item_count' => $item_count, 'total_rows' => $total_rows));\n\t\t\t\t\n\t\t\t\t$this->current=&$row;\n\t\t\t\t\n\t\t\t\tif ($this->selected_id==$row['id'])\n\t\t\t\t\t$this->current_index=$this->count;\n\t\t\t\t\n\t\t\t\t$this->count++;\n\t\t\t\t$item_count++;\n\t\t\t\t$item_count_total++;\n\t\t\t}\n\t\t\t$rows_current=$rows;\n\t\t} else {\n\t\t\t//Keep on recursing as no item_templates present\n\t\t\t$out = $this->build_item($groupie, $rows);\n\t\t\t$rendered.=$out['content'];\n\t\t\t$item_count_total+=$out['count'];\n\t\t\t$rows_current+=$out['rows'];\n\t\t}\n\t\t\n\t\t// process the container if present, passing in all rendered content\n\t\tif ($groupie->container_template!=null) {\n\t\t\t$view=$this->get_template($groupie->container_template); //View($this->parent,$groupie->container_template); // shitloads faster to use Template\n\t\t\t$rendered=$view->render(array('current_index' => $this->current_index, 'total_count' => $this->total_count, 'count' => $this->count, 'control' => $this, 'content' => $rendered, 'item_count' => $item_count, 'item_count_total' => $item_count_total, 'items' => $rows_current, 'config' => $groupie));\n\t\t}\n\t\t\n\t\t$out = array('content'=>$rendered, 'count'=>$item_count_total, 'rows'=>$rows_current);\n\t\treturn $out;\n\t}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t$this->ViewUrl = $this->GetViewUrl();\r\n\t\t$this->EditUrl = $this->GetEditUrl();\r\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\r\n\t\t$this->CopyUrl = $this->GetCopyUrl();\r\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\r\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// idfb_posts\r\n\t\t// id\r\n\t\t// created_time\r\n\t\t// actions\r\n\t\t// icon\r\n\t\t// is_published\r\n\t\t// message\r\n\t\t// link\r\n\t\t// object_id\r\n\t\t// picture\r\n\t\t// privacy\r\n\t\t// promotion_status\r\n\t\t// timeline_visibility\r\n\t\t// type\r\n\t\t// updated_time\r\n\t\t// caption\r\n\t\t// description\r\n\t\t// name\r\n\t\t// source\r\n\t\t// from\r\n\t\t// to\r\n\t\t// comments\r\n\t\t// id_grupo\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// idfb_posts\r\n\t\t\t$this->idfb_posts->ViewValue = $this->idfb_posts->CurrentValue;\r\n\t\t\t$this->idfb_posts->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// id\r\n\t\t\t$this->id->ViewValue = $this->id->CurrentValue;\r\n\t\t\t$this->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// created_time\r\n\t\t\t$this->created_time->ViewValue = $this->created_time->CurrentValue;\r\n\t\t\t$this->created_time->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// actions\r\n\t\t\t$this->actions->ViewValue = $this->actions->CurrentValue;\r\n\t\t\t$this->actions->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// icon\r\n\t\t\t$this->icon->ViewValue = $this->icon->CurrentValue;\r\n\t\t\t$this->icon->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// is_published\r\n\t\t\t$this->is_published->ViewValue = $this->is_published->CurrentValue;\r\n\t\t\t$this->is_published->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// message\r\n\t\t\t$this->message->ViewValue = $this->message->CurrentValue;\r\n\t\t\t$this->message->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// link\r\n\t\t\t$this->link->ViewValue = $this->link->CurrentValue;\r\n\t\t\t$this->link->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// object_id\r\n\t\t\t$this->object_id->ViewValue = $this->object_id->CurrentValue;\r\n\t\t\t$this->object_id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// picture\r\n\t\t\t$this->picture->ViewValue = $this->picture->CurrentValue;\r\n\t\t\t$this->picture->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// privacy\r\n\t\t\t$this->privacy->ViewValue = $this->privacy->CurrentValue;\r\n\t\t\t$this->privacy->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// promotion_status\r\n\t\t\t$this->promotion_status->ViewValue = $this->promotion_status->CurrentValue;\r\n\t\t\t$this->promotion_status->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// timeline_visibility\r\n\t\t\t$this->timeline_visibility->ViewValue = $this->timeline_visibility->CurrentValue;\r\n\t\t\t$this->timeline_visibility->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$this->type->ViewValue = $this->type->CurrentValue;\r\n\t\t\t$this->type->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// updated_time\r\n\t\t\t$this->updated_time->ViewValue = $this->updated_time->CurrentValue;\r\n\t\t\t$this->updated_time->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// caption\r\n\t\t\t$this->caption->ViewValue = $this->caption->CurrentValue;\r\n\t\t\t$this->caption->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// description\r\n\t\t\t$this->description->ViewValue = $this->description->CurrentValue;\r\n\t\t\t$this->description->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// name\r\n\t\t\t$this->name->ViewValue = $this->name->CurrentValue;\r\n\t\t\t$this->name->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// source\r\n\t\t\t$this->source->ViewValue = $this->source->CurrentValue;\r\n\t\t\t$this->source->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// from\r\n\t\t\t$this->from->ViewValue = $this->from->CurrentValue;\r\n\t\t\t$this->from->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// to\r\n\t\t\t$this->to->ViewValue = $this->to->CurrentValue;\r\n\t\t\t$this->to->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// id_grupo\r\n\t\t\t$this->id_grupo->ViewValue = $this->id_grupo->CurrentValue;\r\n\t\t\t$this->id_grupo->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// created_time\r\n\t\t\t$this->created_time->LinkCustomAttributes = \"\";\r\n\t\t\t$this->created_time->HrefValue = \"\";\r\n\t\t\t$this->created_time->TooltipValue = \"\";\r\n\r\n\t\t\t// message\r\n\t\t\t$this->message->LinkCustomAttributes = \"\";\r\n\t\t\t$this->message->HrefValue = \"\";\r\n\t\t\t$this->message->TooltipValue = \"\";\r\n\r\n\t\t\t// link\r\n\t\t\t$this->link->LinkCustomAttributes = \"\";\r\n\t\t\t$this->link->HrefValue = \"\";\r\n\t\t\t$this->link->TooltipValue = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$this->type->LinkCustomAttributes = \"\";\r\n\t\t\t$this->type->HrefValue = \"\";\r\n\t\t\t$this->type->TooltipValue = \"\";\r\n\r\n\t\t\t// caption\r\n\t\t\t$this->caption->LinkCustomAttributes = \"\";\r\n\t\t\t$this->caption->HrefValue = \"\";\r\n\t\t\t$this->caption->TooltipValue = \"\";\r\n\r\n\t\t\t// description\r\n\t\t\t$this->description->LinkCustomAttributes = \"\";\r\n\t\t\t$this->description->HrefValue = \"\";\r\n\t\t\t$this->description->TooltipValue = \"\";\r\n\r\n\t\t\t// name\r\n\t\t\t$this->name->LinkCustomAttributes = \"\";\r\n\t\t\t$this->name->HrefValue = \"\";\r\n\t\t\t$this->name->TooltipValue = \"\";\r\n\r\n\t\t\t// source\r\n\t\t\t$this->source->LinkCustomAttributes = \"\";\r\n\t\t\t$this->source->HrefValue = \"\";\r\n\t\t\t$this->source->TooltipValue = \"\";\r\n\r\n\t\t\t// from\r\n\t\t\t$this->from->LinkCustomAttributes = \"\";\r\n\t\t\t$this->from->HrefValue = \"\";\r\n\t\t\t$this->from->TooltipValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function RenderRow() {\n\tglobal $conn, $Security, $dpp_proveedores;\n\n\t// Call Row Rendering event\n\t$dpp_proveedores->Row_Rendering();\n\n\t// Common render codes for all row types\n\t// provee_id\n\n\t$dpp_proveedores->provee_id->CellCssStyle = \"\";\n\t$dpp_proveedores->provee_id->CellCssClass = \"\";\n\n\t// provee_rut\n\t$dpp_proveedores->provee_rut->CellCssStyle = \"\";\n\t$dpp_proveedores->provee_rut->CellCssClass = \"\";\n\n\t// provee_dig\n\t$dpp_proveedores->provee_dig->CellCssStyle = \"\";\n\t$dpp_proveedores->provee_dig->CellCssClass = \"\";\n\n\t// provee_cat_juri\n\t$dpp_proveedores->provee_cat_juri->CellCssStyle = \"\";\n\t$dpp_proveedores->provee_cat_juri->CellCssClass = \"\";\n\n\t// provee_nombre\n\t$dpp_proveedores->provee_nombre->CellCssStyle = \"\";\n\t$dpp_proveedores->provee_nombre->CellCssClass = \"\";\n\n\t// provee_paterno\n\t$dpp_proveedores->provee_paterno->CellCssStyle = \"\";\n\t$dpp_proveedores->provee_paterno->CellCssClass = \"\";\n\n\t// provee_materno\n\t$dpp_proveedores->provee_materno->CellCssStyle = \"\";\n\t$dpp_proveedores->provee_materno->CellCssClass = \"\";\n\n\t// provee_dir\n\t$dpp_proveedores->provee_dir->CellCssStyle = \"\";\n\t$dpp_proveedores->provee_dir->CellCssClass = \"\";\n\n\t// provee_fono\n\t$dpp_proveedores->provee_fono->CellCssStyle = \"\";\n\t$dpp_proveedores->provee_fono->CellCssClass = \"\";\n\tif ($dpp_proveedores->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// provee_id\n\t\t$dpp_proveedores->provee_id->ViewValue = $dpp_proveedores->provee_id->CurrentValue;\n\t\t$dpp_proveedores->provee_id->CssStyle = \"\";\n\t\t$dpp_proveedores->provee_id->CssClass = \"\";\n\t\t$dpp_proveedores->provee_id->ViewCustomAttributes = \"\";\n\n\t\t// provee_rut\n\t\t$dpp_proveedores->provee_rut->ViewValue = $dpp_proveedores->provee_rut->CurrentValue;\n\t\t$dpp_proveedores->provee_rut->CssStyle = \"\";\n\t\t$dpp_proveedores->provee_rut->CssClass = \"\";\n\t\t$dpp_proveedores->provee_rut->ViewCustomAttributes = \"\";\n\n\t\t// provee_dig\n\t\t$dpp_proveedores->provee_dig->ViewValue = $dpp_proveedores->provee_dig->CurrentValue;\n\t\t$dpp_proveedores->provee_dig->CssStyle = \"\";\n\t\t$dpp_proveedores->provee_dig->CssClass = \"\";\n\t\t$dpp_proveedores->provee_dig->ViewCustomAttributes = \"\";\n\n\t\t// provee_cat_juri\n\t\tif (!is_null($dpp_proveedores->provee_cat_juri->CurrentValue)) {\n\t\t\tswitch ($dpp_proveedores->provee_cat_juri->CurrentValue) {\n\t\t\t\tcase \"Natural\":\n\t\t\t\t\t$dpp_proveedores->provee_cat_juri->ViewValue = \"Natural\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Juridica\":\n\t\t\t\t\t$dpp_proveedores->provee_cat_juri->ViewValue = \"Juridica\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$dpp_proveedores->provee_cat_juri->ViewValue = $dpp_proveedores->provee_cat_juri->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$dpp_proveedores->provee_cat_juri->ViewValue = NULL;\n\t\t}\n\t\t$dpp_proveedores->provee_cat_juri->CssStyle = \"\";\n\t\t$dpp_proveedores->provee_cat_juri->CssClass = \"\";\n\t\t$dpp_proveedores->provee_cat_juri->ViewCustomAttributes = \"\";\n\n\t\t// provee_nombre\n\t\t$dpp_proveedores->provee_nombre->ViewValue = $dpp_proveedores->provee_nombre->CurrentValue;\n\t\t$dpp_proveedores->provee_nombre->CssStyle = \"\";\n\t\t$dpp_proveedores->provee_nombre->CssClass = \"\";\n\t\t$dpp_proveedores->provee_nombre->ViewCustomAttributes = \"\";\n\n\t\t// provee_paterno\n\t\t$dpp_proveedores->provee_paterno->ViewValue = $dpp_proveedores->provee_paterno->CurrentValue;\n\t\t$dpp_proveedores->provee_paterno->CssStyle = \"\";\n\t\t$dpp_proveedores->provee_paterno->CssClass = \"\";\n\t\t$dpp_proveedores->provee_paterno->ViewCustomAttributes = \"\";\n\n\t\t// provee_materno\n\t\t$dpp_proveedores->provee_materno->ViewValue = $dpp_proveedores->provee_materno->CurrentValue;\n\t\t$dpp_proveedores->provee_materno->CssStyle = \"\";\n\t\t$dpp_proveedores->provee_materno->CssClass = \"\";\n\t\t$dpp_proveedores->provee_materno->ViewCustomAttributes = \"\";\n\n\t\t// provee_dir\n\t\t$dpp_proveedores->provee_dir->ViewValue = $dpp_proveedores->provee_dir->CurrentValue;\n\t\t$dpp_proveedores->provee_dir->CssStyle = \"\";\n\t\t$dpp_proveedores->provee_dir->CssClass = \"\";\n\t\t$dpp_proveedores->provee_dir->ViewCustomAttributes = \"\";\n\n\t\t// provee_fono\n\t\t$dpp_proveedores->provee_fono->ViewValue = $dpp_proveedores->provee_fono->CurrentValue;\n\t\t$dpp_proveedores->provee_fono->CssStyle = \"\";\n\t\t$dpp_proveedores->provee_fono->CssClass = \"\";\n\t\t$dpp_proveedores->provee_fono->ViewCustomAttributes = \"\";\n\n\t\t// provee_id\n\t\t$dpp_proveedores->provee_id->HrefValue = \"\";\n\n\t\t// provee_rut\n\t\t$dpp_proveedores->provee_rut->HrefValue = \"\";\n\n\t\t// provee_dig\n\t\t$dpp_proveedores->provee_dig->HrefValue = \"\";\n\n\t\t// provee_cat_juri\n\t\t$dpp_proveedores->provee_cat_juri->HrefValue = \"\";\n\n\t\t// provee_nombre\n\t\t$dpp_proveedores->provee_nombre->HrefValue = \"\";\n\n\t\t// provee_paterno\n\t\t$dpp_proveedores->provee_paterno->HrefValue = \"\";\n\n\t\t// provee_materno\n\t\t$dpp_proveedores->provee_materno->HrefValue = \"\";\n\n\t\t// provee_dir\n\t\t$dpp_proveedores->provee_dir->HrefValue = \"\";\n\n\t\t// provee_fono\n\t\t$dpp_proveedores->provee_fono->HrefValue = \"\";\n\t} elseif ($dpp_proveedores->RowType == EW_ROWTYPE_ADD) { // Add row\n\t} elseif ($dpp_proveedores->RowType == EW_ROWTYPE_EDIT) { // Edit row\n\t} elseif ($dpp_proveedores->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\t}\n\n\t// Call Row Rendered event\n\t$dpp_proveedores->Row_Rendered();\n}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// Id_tercero\n\t\t// nombre_tercero\n\t\t// direccion_tercero\n\t\t// telefono1_tercero\n\t\t// telefono2_tercero\n\t\t// fax_tercero\n\t\t// nit_tercero\n\t\t// tipo_tercero\n\t\t// e_mail_tercero\n\t\t// Contacto_tercero\n\t\t// gran_contrib_tercero\n\t\t// autoretenedor_tercero\n\t\t// activo_tercero\n\t\t// tercero_ registrado_por\n\t\t// reg_comun_tercero\n\t\t// responsable_materiales_tercero\n\t\t// grupo_nomina_tercero\n\t\t// tercero_ lider_Obra\n\t\t// tercero_nombre_lider\n\t\t// empresa_tercero\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// Id_tercero\n\t\t$this->Id_tercero->ViewValue = $this->Id_tercero->CurrentValue;\n\t\t$this->Id_tercero->ViewCustomAttributes = \"\";\n\n\t\t// nombre_tercero\n\t\t$this->nombre_tercero->ViewValue = $this->nombre_tercero->CurrentValue;\n\t\t$this->nombre_tercero->ViewCustomAttributes = \"\";\n\n\t\t// direccion_tercero\n\t\t$this->direccion_tercero->ViewValue = $this->direccion_tercero->CurrentValue;\n\t\t$this->direccion_tercero->ViewCustomAttributes = \"\";\n\n\t\t// telefono1_tercero\n\t\t$this->telefono1_tercero->ViewValue = $this->telefono1_tercero->CurrentValue;\n\t\t$this->telefono1_tercero->ViewCustomAttributes = \"\";\n\n\t\t// telefono2_tercero\n\t\t$this->telefono2_tercero->ViewValue = $this->telefono2_tercero->CurrentValue;\n\t\t$this->telefono2_tercero->ViewCustomAttributes = \"\";\n\n\t\t// fax_tercero\n\t\t$this->fax_tercero->ViewValue = $this->fax_tercero->CurrentValue;\n\t\t$this->fax_tercero->ViewCustomAttributes = \"\";\n\n\t\t// nit_tercero\n\t\t$this->nit_tercero->ViewValue = $this->nit_tercero->CurrentValue;\n\t\t$this->nit_tercero->ViewCustomAttributes = \"\";\n\n\t\t// tipo_tercero\n\t\t$this->tipo_tercero->ViewValue = $this->tipo_tercero->CurrentValue;\n\t\t$this->tipo_tercero->ViewCustomAttributes = \"\";\n\n\t\t// e_mail_tercero\n\t\t$this->e_mail_tercero->ViewValue = $this->e_mail_tercero->CurrentValue;\n\t\t$this->e_mail_tercero->ViewCustomAttributes = \"\";\n\n\t\t// Contacto_tercero\n\t\t$this->Contacto_tercero->ViewValue = $this->Contacto_tercero->CurrentValue;\n\t\t$this->Contacto_tercero->ViewCustomAttributes = \"\";\n\n\t\t// gran_contrib_tercero\n\t\t$this->gran_contrib_tercero->ViewValue = $this->gran_contrib_tercero->CurrentValue;\n\t\t$this->gran_contrib_tercero->ViewCustomAttributes = \"\";\n\n\t\t// autoretenedor_tercero\n\t\t$this->autoretenedor_tercero->ViewValue = $this->autoretenedor_tercero->CurrentValue;\n\t\t$this->autoretenedor_tercero->ViewCustomAttributes = \"\";\n\n\t\t// activo_tercero\n\t\t$this->activo_tercero->ViewValue = $this->activo_tercero->CurrentValue;\n\t\t$this->activo_tercero->ViewCustomAttributes = \"\";\n\n\t\t// tercero_ registrado_por\n\t\t$this->tercero__registrado_por->ViewValue = $this->tercero__registrado_por->CurrentValue;\n\t\t$this->tercero__registrado_por->ViewCustomAttributes = \"\";\n\n\t\t// reg_comun_tercero\n\t\t$this->reg_comun_tercero->ViewValue = $this->reg_comun_tercero->CurrentValue;\n\t\t$this->reg_comun_tercero->ViewCustomAttributes = \"\";\n\n\t\t// responsable_materiales_tercero\n\t\t$this->responsable_materiales_tercero->ViewValue = $this->responsable_materiales_tercero->CurrentValue;\n\t\t$this->responsable_materiales_tercero->ViewCustomAttributes = \"\";\n\n\t\t// grupo_nomina_tercero\n\t\t$this->grupo_nomina_tercero->ViewValue = $this->grupo_nomina_tercero->CurrentValue;\n\t\t$this->grupo_nomina_tercero->ViewCustomAttributes = \"\";\n\n\t\t// tercero_ lider_Obra\n\t\t$this->tercero__lider_Obra->ViewValue = $this->tercero__lider_Obra->CurrentValue;\n\t\t$this->tercero__lider_Obra->ViewCustomAttributes = \"\";\n\n\t\t// tercero_nombre_lider\n\t\t$this->tercero_nombre_lider->ViewValue = $this->tercero_nombre_lider->CurrentValue;\n\t\t$this->tercero_nombre_lider->ViewCustomAttributes = \"\";\n\n\t\t// empresa_tercero\n\t\t$this->empresa_tercero->ViewValue = $this->empresa_tercero->CurrentValue;\n\t\t$this->empresa_tercero->ViewCustomAttributes = \"\";\n\n\t\t\t// Id_tercero\n\t\t\t$this->Id_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->Id_tercero->HrefValue = \"\";\n\t\t\t$this->Id_tercero->TooltipValue = \"\";\n\n\t\t\t// nombre_tercero\n\t\t\t$this->nombre_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->nombre_tercero->HrefValue = \"\";\n\t\t\t$this->nombre_tercero->TooltipValue = \"\";\n\n\t\t\t// direccion_tercero\n\t\t\t$this->direccion_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->direccion_tercero->HrefValue = \"\";\n\t\t\t$this->direccion_tercero->TooltipValue = \"\";\n\n\t\t\t// telefono1_tercero\n\t\t\t$this->telefono1_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->telefono1_tercero->HrefValue = \"\";\n\t\t\t$this->telefono1_tercero->TooltipValue = \"\";\n\n\t\t\t// telefono2_tercero\n\t\t\t$this->telefono2_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->telefono2_tercero->HrefValue = \"\";\n\t\t\t$this->telefono2_tercero->TooltipValue = \"\";\n\n\t\t\t// fax_tercero\n\t\t\t$this->fax_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->fax_tercero->HrefValue = \"\";\n\t\t\t$this->fax_tercero->TooltipValue = \"\";\n\n\t\t\t// nit_tercero\n\t\t\t$this->nit_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->nit_tercero->HrefValue = \"\";\n\t\t\t$this->nit_tercero->TooltipValue = \"\";\n\n\t\t\t// tipo_tercero\n\t\t\t$this->tipo_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->tipo_tercero->HrefValue = \"\";\n\t\t\t$this->tipo_tercero->TooltipValue = \"\";\n\n\t\t\t// e_mail_tercero\n\t\t\t$this->e_mail_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->e_mail_tercero->HrefValue = \"\";\n\t\t\t$this->e_mail_tercero->TooltipValue = \"\";\n\n\t\t\t// Contacto_tercero\n\t\t\t$this->Contacto_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->Contacto_tercero->HrefValue = \"\";\n\t\t\t$this->Contacto_tercero->TooltipValue = \"\";\n\n\t\t\t// gran_contrib_tercero\n\t\t\t$this->gran_contrib_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->gran_contrib_tercero->HrefValue = \"\";\n\t\t\t$this->gran_contrib_tercero->TooltipValue = \"\";\n\n\t\t\t// autoretenedor_tercero\n\t\t\t$this->autoretenedor_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->autoretenedor_tercero->HrefValue = \"\";\n\t\t\t$this->autoretenedor_tercero->TooltipValue = \"\";\n\n\t\t\t// activo_tercero\n\t\t\t$this->activo_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->activo_tercero->HrefValue = \"\";\n\t\t\t$this->activo_tercero->TooltipValue = \"\";\n\n\t\t\t// tercero_ registrado_por\n\t\t\t$this->tercero__registrado_por->LinkCustomAttributes = \"\";\n\t\t\t$this->tercero__registrado_por->HrefValue = \"\";\n\t\t\t$this->tercero__registrado_por->TooltipValue = \"\";\n\n\t\t\t// reg_comun_tercero\n\t\t\t$this->reg_comun_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->reg_comun_tercero->HrefValue = \"\";\n\t\t\t$this->reg_comun_tercero->TooltipValue = \"\";\n\n\t\t\t// responsable_materiales_tercero\n\t\t\t$this->responsable_materiales_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->responsable_materiales_tercero->HrefValue = \"\";\n\t\t\t$this->responsable_materiales_tercero->TooltipValue = \"\";\n\n\t\t\t// grupo_nomina_tercero\n\t\t\t$this->grupo_nomina_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->grupo_nomina_tercero->HrefValue = \"\";\n\t\t\t$this->grupo_nomina_tercero->TooltipValue = \"\";\n\n\t\t\t// tercero_ lider_Obra\n\t\t\t$this->tercero__lider_Obra->LinkCustomAttributes = \"\";\n\t\t\t$this->tercero__lider_Obra->HrefValue = \"\";\n\t\t\t$this->tercero__lider_Obra->TooltipValue = \"\";\n\n\t\t\t// tercero_nombre_lider\n\t\t\t$this->tercero_nombre_lider->LinkCustomAttributes = \"\";\n\t\t\t$this->tercero_nombre_lider->HrefValue = \"\";\n\t\t\t$this->tercero_nombre_lider->TooltipValue = \"\";\n\n\t\t\t// empresa_tercero\n\t\t\t$this->empresa_tercero->LinkCustomAttributes = \"\";\n\t\t\t$this->empresa_tercero->HrefValue = \"\";\n\t\t\t$this->empresa_tercero->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "private function populateClientInfo(&$rows) {\n $company_url_template = Router::assemble('people_company', array(\n \t\t'company_id' => '-COMPANY-ID-',\n \t));\n \t\n foreach($rows as &$row) {\n \n $parent_table = TABLE_PREFIX . 'invoice_objects';\n $parent = DB::executeFirstRow(\"SELECT company_id FROM $parent_table WHERE id = ?\", $row['parent_id']);\n \n if($parent && $parent['company_id']) {\n $company_id = $parent['company_id'];\n $company_table = TABLE_PREFIX . 'companies';\n $company = DB::executeFirstRow(\"SELECT name FROM $company_table WHERE id = ?\", $company_id);\n \n $company_name = $company['name'];\n $company_url = str_replace('-COMPANY-ID-', $company_id, $company_url_template);\n \n }//if\n \n $parent = DataObjectPool::get($row['parent_type'], $row['parent_id']);\n \n $row['client'] = array();\n if($company) {\n $row['client']['id'] = $company_id;\n $row['client']['name'] = $company_name;\n $row['client']['view_url'] = $company_url;\n }//if\n } // foreach\n unset($row); // just in case\n }", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->AddUrl = $this->GetAddUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\t\t$this->ListUrl = $this->GetListUrl();\n\t\t$this->SetupOtherOptions();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// unid\n\t\t// u_id\n\t\t// acl_id\n\t\t// Name\n\t\t// Basics\n\t\t// HP\n\t\t// MP\n\t\t// AD\n\t\t// AP\n\t\t// Defense\n\t\t// Hit\n\t\t// Dodge\n\t\t// Crit\n\t\t// AbsorbHP\n\t\t// ADPTV\n\t\t// ADPTR\n\t\t// APPTR\n\t\t// APPTV\n\t\t// ImmuneDamage\n\t\t// Intro\n\t\t// ExclusiveSkills\n\t\t// TransferDemand\n\t\t// TransferLevel\n\t\t// FormerOccupation\n\t\t// Belong\n\t\t// AttackEffect\n\t\t// AttackTips\n\t\t// MagicResistance\n\t\t// IgnoreShield\n\t\t// DATETIME\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// unid\n\t\t$this->unid->ViewValue = $this->unid->CurrentValue;\n\t\t$this->unid->ViewCustomAttributes = \"\";\n\n\t\t// u_id\n\t\t$this->u_id->ViewValue = $this->u_id->CurrentValue;\n\t\t$this->u_id->ViewCustomAttributes = \"\";\n\n\t\t// acl_id\n\t\t$this->acl_id->ViewValue = $this->acl_id->CurrentValue;\n\t\t$this->acl_id->ViewCustomAttributes = \"\";\n\n\t\t// Name\n\t\t$this->Name->ViewValue = $this->Name->CurrentValue;\n\t\t$this->Name->ViewCustomAttributes = \"\";\n\n\t\t// Basics\n\t\t$this->Basics->ViewValue = $this->Basics->CurrentValue;\n\t\t$this->Basics->ViewCustomAttributes = \"\";\n\n\t\t// HP\n\t\t$this->HP->ViewValue = $this->HP->CurrentValue;\n\t\t$this->HP->ViewCustomAttributes = \"\";\n\n\t\t// MP\n\t\t$this->MP->ViewValue = $this->MP->CurrentValue;\n\t\t$this->MP->ViewCustomAttributes = \"\";\n\n\t\t// AD\n\t\t$this->AD->ViewValue = $this->AD->CurrentValue;\n\t\t$this->AD->ViewCustomAttributes = \"\";\n\n\t\t// AP\n\t\t$this->AP->ViewValue = $this->AP->CurrentValue;\n\t\t$this->AP->ViewCustomAttributes = \"\";\n\n\t\t// Defense\n\t\t$this->Defense->ViewValue = $this->Defense->CurrentValue;\n\t\t$this->Defense->ViewCustomAttributes = \"\";\n\n\t\t// Hit\n\t\t$this->Hit->ViewValue = $this->Hit->CurrentValue;\n\t\t$this->Hit->ViewCustomAttributes = \"\";\n\n\t\t// Dodge\n\t\t$this->Dodge->ViewValue = $this->Dodge->CurrentValue;\n\t\t$this->Dodge->ViewCustomAttributes = \"\";\n\n\t\t// Crit\n\t\t$this->Crit->ViewValue = $this->Crit->CurrentValue;\n\t\t$this->Crit->ViewCustomAttributes = \"\";\n\n\t\t// AbsorbHP\n\t\t$this->AbsorbHP->ViewValue = $this->AbsorbHP->CurrentValue;\n\t\t$this->AbsorbHP->ViewCustomAttributes = \"\";\n\n\t\t// ADPTV\n\t\t$this->ADPTV->ViewValue = $this->ADPTV->CurrentValue;\n\t\t$this->ADPTV->ViewCustomAttributes = \"\";\n\n\t\t// ADPTR\n\t\t$this->ADPTR->ViewValue = $this->ADPTR->CurrentValue;\n\t\t$this->ADPTR->ViewCustomAttributes = \"\";\n\n\t\t// APPTR\n\t\t$this->APPTR->ViewValue = $this->APPTR->CurrentValue;\n\t\t$this->APPTR->ViewCustomAttributes = \"\";\n\n\t\t// APPTV\n\t\t$this->APPTV->ViewValue = $this->APPTV->CurrentValue;\n\t\t$this->APPTV->ViewCustomAttributes = \"\";\n\n\t\t// ImmuneDamage\n\t\t$this->ImmuneDamage->ViewValue = $this->ImmuneDamage->CurrentValue;\n\t\t$this->ImmuneDamage->ViewCustomAttributes = \"\";\n\n\t\t// Intro\n\t\t$this->Intro->ViewValue = $this->Intro->CurrentValue;\n\t\t$this->Intro->ViewCustomAttributes = \"\";\n\n\t\t// ExclusiveSkills\n\t\t$this->ExclusiveSkills->ViewValue = $this->ExclusiveSkills->CurrentValue;\n\t\t$this->ExclusiveSkills->ViewCustomAttributes = \"\";\n\n\t\t// TransferDemand\n\t\t$this->TransferDemand->ViewValue = $this->TransferDemand->CurrentValue;\n\t\t$this->TransferDemand->ViewCustomAttributes = \"\";\n\n\t\t// TransferLevel\n\t\t$this->TransferLevel->ViewValue = $this->TransferLevel->CurrentValue;\n\t\t$this->TransferLevel->ViewCustomAttributes = \"\";\n\n\t\t// FormerOccupation\n\t\t$this->FormerOccupation->ViewValue = $this->FormerOccupation->CurrentValue;\n\t\t$this->FormerOccupation->ViewCustomAttributes = \"\";\n\n\t\t// Belong\n\t\t$this->Belong->ViewValue = $this->Belong->CurrentValue;\n\t\t$this->Belong->ViewCustomAttributes = \"\";\n\n\t\t// AttackEffect\n\t\t$this->AttackEffect->ViewValue = $this->AttackEffect->CurrentValue;\n\t\t$this->AttackEffect->ViewCustomAttributes = \"\";\n\n\t\t// AttackTips\n\t\t$this->AttackTips->ViewValue = $this->AttackTips->CurrentValue;\n\t\t$this->AttackTips->ViewCustomAttributes = \"\";\n\n\t\t// MagicResistance\n\t\t$this->MagicResistance->ViewValue = $this->MagicResistance->CurrentValue;\n\t\t$this->MagicResistance->ViewCustomAttributes = \"\";\n\n\t\t// IgnoreShield\n\t\t$this->IgnoreShield->ViewValue = $this->IgnoreShield->CurrentValue;\n\t\t$this->IgnoreShield->ViewCustomAttributes = \"\";\n\n\t\t// DATETIME\n\t\t$this->DATETIME->ViewValue = $this->DATETIME->CurrentValue;\n\t\t$this->DATETIME->ViewValue = ew_FormatDateTime($this->DATETIME->ViewValue, 0);\n\t\t$this->DATETIME->ViewCustomAttributes = \"\";\n\n\t\t\t// unid\n\t\t\t$this->unid->LinkCustomAttributes = \"\";\n\t\t\t$this->unid->HrefValue = \"\";\n\t\t\t$this->unid->TooltipValue = \"\";\n\n\t\t\t// u_id\n\t\t\t$this->u_id->LinkCustomAttributes = \"\";\n\t\t\t$this->u_id->HrefValue = \"\";\n\t\t\t$this->u_id->TooltipValue = \"\";\n\n\t\t\t// acl_id\n\t\t\t$this->acl_id->LinkCustomAttributes = \"\";\n\t\t\t$this->acl_id->HrefValue = \"\";\n\t\t\t$this->acl_id->TooltipValue = \"\";\n\n\t\t\t// Name\n\t\t\t$this->Name->LinkCustomAttributes = \"\";\n\t\t\t$this->Name->HrefValue = \"\";\n\t\t\t$this->Name->TooltipValue = \"\";\n\n\t\t\t// Basics\n\t\t\t$this->Basics->LinkCustomAttributes = \"\";\n\t\t\t$this->Basics->HrefValue = \"\";\n\t\t\t$this->Basics->TooltipValue = \"\";\n\n\t\t\t// HP\n\t\t\t$this->HP->LinkCustomAttributes = \"\";\n\t\t\t$this->HP->HrefValue = \"\";\n\t\t\t$this->HP->TooltipValue = \"\";\n\n\t\t\t// MP\n\t\t\t$this->MP->LinkCustomAttributes = \"\";\n\t\t\t$this->MP->HrefValue = \"\";\n\t\t\t$this->MP->TooltipValue = \"\";\n\n\t\t\t// AD\n\t\t\t$this->AD->LinkCustomAttributes = \"\";\n\t\t\t$this->AD->HrefValue = \"\";\n\t\t\t$this->AD->TooltipValue = \"\";\n\n\t\t\t// AP\n\t\t\t$this->AP->LinkCustomAttributes = \"\";\n\t\t\t$this->AP->HrefValue = \"\";\n\t\t\t$this->AP->TooltipValue = \"\";\n\n\t\t\t// Defense\n\t\t\t$this->Defense->LinkCustomAttributes = \"\";\n\t\t\t$this->Defense->HrefValue = \"\";\n\t\t\t$this->Defense->TooltipValue = \"\";\n\n\t\t\t// Hit\n\t\t\t$this->Hit->LinkCustomAttributes = \"\";\n\t\t\t$this->Hit->HrefValue = \"\";\n\t\t\t$this->Hit->TooltipValue = \"\";\n\n\t\t\t// Dodge\n\t\t\t$this->Dodge->LinkCustomAttributes = \"\";\n\t\t\t$this->Dodge->HrefValue = \"\";\n\t\t\t$this->Dodge->TooltipValue = \"\";\n\n\t\t\t// Crit\n\t\t\t$this->Crit->LinkCustomAttributes = \"\";\n\t\t\t$this->Crit->HrefValue = \"\";\n\t\t\t$this->Crit->TooltipValue = \"\";\n\n\t\t\t// AbsorbHP\n\t\t\t$this->AbsorbHP->LinkCustomAttributes = \"\";\n\t\t\t$this->AbsorbHP->HrefValue = \"\";\n\t\t\t$this->AbsorbHP->TooltipValue = \"\";\n\n\t\t\t// ADPTV\n\t\t\t$this->ADPTV->LinkCustomAttributes = \"\";\n\t\t\t$this->ADPTV->HrefValue = \"\";\n\t\t\t$this->ADPTV->TooltipValue = \"\";\n\n\t\t\t// ADPTR\n\t\t\t$this->ADPTR->LinkCustomAttributes = \"\";\n\t\t\t$this->ADPTR->HrefValue = \"\";\n\t\t\t$this->ADPTR->TooltipValue = \"\";\n\n\t\t\t// APPTR\n\t\t\t$this->APPTR->LinkCustomAttributes = \"\";\n\t\t\t$this->APPTR->HrefValue = \"\";\n\t\t\t$this->APPTR->TooltipValue = \"\";\n\n\t\t\t// APPTV\n\t\t\t$this->APPTV->LinkCustomAttributes = \"\";\n\t\t\t$this->APPTV->HrefValue = \"\";\n\t\t\t$this->APPTV->TooltipValue = \"\";\n\n\t\t\t// ImmuneDamage\n\t\t\t$this->ImmuneDamage->LinkCustomAttributes = \"\";\n\t\t\t$this->ImmuneDamage->HrefValue = \"\";\n\t\t\t$this->ImmuneDamage->TooltipValue = \"\";\n\n\t\t\t// Intro\n\t\t\t$this->Intro->LinkCustomAttributes = \"\";\n\t\t\t$this->Intro->HrefValue = \"\";\n\t\t\t$this->Intro->TooltipValue = \"\";\n\n\t\t\t// ExclusiveSkills\n\t\t\t$this->ExclusiveSkills->LinkCustomAttributes = \"\";\n\t\t\t$this->ExclusiveSkills->HrefValue = \"\";\n\t\t\t$this->ExclusiveSkills->TooltipValue = \"\";\n\n\t\t\t// TransferDemand\n\t\t\t$this->TransferDemand->LinkCustomAttributes = \"\";\n\t\t\t$this->TransferDemand->HrefValue = \"\";\n\t\t\t$this->TransferDemand->TooltipValue = \"\";\n\n\t\t\t// TransferLevel\n\t\t\t$this->TransferLevel->LinkCustomAttributes = \"\";\n\t\t\t$this->TransferLevel->HrefValue = \"\";\n\t\t\t$this->TransferLevel->TooltipValue = \"\";\n\n\t\t\t// FormerOccupation\n\t\t\t$this->FormerOccupation->LinkCustomAttributes = \"\";\n\t\t\t$this->FormerOccupation->HrefValue = \"\";\n\t\t\t$this->FormerOccupation->TooltipValue = \"\";\n\n\t\t\t// Belong\n\t\t\t$this->Belong->LinkCustomAttributes = \"\";\n\t\t\t$this->Belong->HrefValue = \"\";\n\t\t\t$this->Belong->TooltipValue = \"\";\n\n\t\t\t// AttackEffect\n\t\t\t$this->AttackEffect->LinkCustomAttributes = \"\";\n\t\t\t$this->AttackEffect->HrefValue = \"\";\n\t\t\t$this->AttackEffect->TooltipValue = \"\";\n\n\t\t\t// AttackTips\n\t\t\t$this->AttackTips->LinkCustomAttributes = \"\";\n\t\t\t$this->AttackTips->HrefValue = \"\";\n\t\t\t$this->AttackTips->TooltipValue = \"\";\n\n\t\t\t// MagicResistance\n\t\t\t$this->MagicResistance->LinkCustomAttributes = \"\";\n\t\t\t$this->MagicResistance->HrefValue = \"\";\n\t\t\t$this->MagicResistance->TooltipValue = \"\";\n\n\t\t\t// IgnoreShield\n\t\t\t$this->IgnoreShield->LinkCustomAttributes = \"\";\n\t\t\t$this->IgnoreShield->HrefValue = \"\";\n\t\t\t$this->IgnoreShield->TooltipValue = \"\";\n\n\t\t\t// DATETIME\n\t\t\t$this->DATETIME->LinkCustomAttributes = \"\";\n\t\t\t$this->DATETIME->HrefValue = \"\";\n\t\t\t$this->DATETIME->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\tglobal $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// userlevelid\n\t\t// userlevelname\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// userlevelid\n\t\t\t$this->userlevelid->ViewValue = $this->userlevelid->CurrentValue;\n\t\t\t$this->userlevelid->ViewCustomAttributes = \"\";\n\n\t\t\t// userlevelname\n\t\t\t$this->userlevelname->ViewValue = $this->userlevelname->CurrentValue;\n\t\t\t$this->userlevelname->ViewCustomAttributes = \"\";\n\n\t\t\t// userlevelid\n\t\t\t$this->userlevelid->LinkCustomAttributes = \"\";\n\t\t\t$this->userlevelid->HrefValue = \"\";\n\t\t\t$this->userlevelid->TooltipValue = \"\";\n\n\t\t\t// userlevelname\n\t\t\t$this->userlevelname->LinkCustomAttributes = \"\";\n\t\t\t$this->userlevelname->HrefValue = \"\";\n\t\t\t$this->userlevelname->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// userlevelid\n\t\t\t$this->userlevelid->EditCustomAttributes = \"\";\n\t\t\t$this->userlevelid->EditValue = ew_HtmlEncode($this->userlevelid->CurrentValue);\n\n\t\t\t// userlevelname\n\t\t\t$this->userlevelname->EditCustomAttributes = \"\";\n\t\t\t$this->userlevelname->EditValue = ew_HtmlEncode($this->userlevelname->CurrentValue);\n\n\t\t\t// Edit refer script\n\t\t\t// userlevelid\n\n\t\t\t$this->userlevelid->HrefValue = \"\";\n\n\t\t\t// userlevelname\n\t\t\t$this->userlevelname->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function addNewRow($item, $reservation, $order, $isEmployee)\n{\n?>\n\n <tr>\n <td><img src=\"<?= $item->image() ?>\" alt=\"Image of a(n) <?= $item->name() ?>\" height=100 width=100></img></td>\n <td><?= $item->name() ?></td>\n <td><?= $item->description() ?></td>\n <td><?= $item->price() ?></td>\n <?php if ($reservation != null && $order != null) { ?>\n <td>\n <?php\n if ($isEmployee) {\n ?>\n <form method=\"POST\" action=\"viewCustomerOrder.php?<?= Constants::PARAM_ACTION ?>=<?= Constants::ACTION_ADD_MENU_ITEM_TO_ORDER ?>&<?= Constants::PARAM_RESERVATION_ID ?>=<?= $reservation->resID() ?>&<?= Constants::PARAM_ORDER_ID ?>=<?= $order->id() ?>&<?= Constants::PARAM_ITEM_ID ?>=<?= $item->id() ?>\">\n <button type=\"submit\" class=\"btn btn-sm btn-primary\">Add to Order</button>\n </form>\n <?php\n } else {\n ?>\n <form method=\"POST\" action=\"menu.php?<?= Constants::PARAM_ACTION ?>=<?= Constants::ACTION_ADD_MENU_ITEM_TO_ORDER ?>&<?= Constants::PARAM_RESERVATION_ID ?>=<?= $reservation->resID() ?>&<?= Constants::PARAM_ORDER_ID ?>=<?= $order->id() ?>&<?= Constants::PARAM_ITEM_ID ?>=<?= $item->id() ?>\">\n <button type=\"submit\" class=\"btn btn-sm btn-primary\">Add to Order</button>\n </form>\n <?php\n }\n ?>\n </td>\n <?php } ?>\n </tr>\n<?php\n}", "function display_rows(){\n\n\t\t//Get the records registered in the prepare_items method\n\t\t$records = $this->items;\n\n\t\t//Get the columns registered in the get_columns and get_sortable_columns methods\n\t\tlist( $columns ) = $this->get_column_info();\n\n\t\t//Loop for each record\n\t\tif( ! empty( $records ) ){\n\n\t\t\tforeach( $records as $rec ){\n\n\t\t\t\t$position = ( $rec->post_order ) ? $rec->post_order : 0;\n\t\t\t\t$id = ( $rec->ID ) ? $rec->ID : 'N/A';\n\t\t\t\t$title = ( $rec->post_title ) ? $rec->post_title : 'N/A';\n\t\t\t\t$author = ( $rec->post_author ) ? $rec->post_author : 'N/A';\n\t\t\t\t$date = ( $rec->post_date ) ? $rec->post_date : 'N/A';\n\n\t\t\t\t//Open the line\n\t\t\t\techo '<tr id=\"record_' . $id . '\" class=\"draggable-tr\" data-order=\"' . $position . '\" data-post-id=\"' . $id . '\" draggable=\"true\">';\n\t\t\t\tforeach( $columns as $column_name => $column_display_name ){\n\n\n\t\t\t\t\t//Style attributes for each col\n\t\t\t\t\t$class = \"class='$column_name column-$column_name'\";\n\t\t\t\t\t$style = \"\";\n\t\t\t\t\tif( in_array( $column_name ) ){\n\t\t\t\t\t\t$style = ' style=\"display:none;\"';\n\t\t\t\t\t}\n\t\t\t\t\t$attributes = $class . $style;\n\n\n\t\t\t\t\t//Display the cell\n\t\t\t\t\tswitch( $column_name ){\n\t\t\t\t\t\tcase \"post_order\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $position ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_title\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $title ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_author\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( get_the_author_meta( 'nicename', $author ) ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_date\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . $date . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $id ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t}", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\tglobal $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// idservicio_medico_prestado\n\t\t// idcuenta\n\t\t// fecha_inicio\n\t\t// fecha_final\n\t\t// estado\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// idservicio_medico_prestado\n\t\t\t$this->idservicio_medico_prestado->ViewValue = $this->idservicio_medico_prestado->CurrentValue;\n\t\t\t$this->idservicio_medico_prestado->ViewCustomAttributes = \"\";\n\n\t\t\t// idcuenta\n\t\t\t$this->idcuenta->ViewValue = $this->idcuenta->CurrentValue;\n\t\t\t$this->idcuenta->ViewCustomAttributes = \"\";\n\n\t\t\t// fecha_inicio\n\t\t\t$this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue;\n\t\t\t$this->fecha_inicio->ViewCustomAttributes = \"\";\n\n\t\t\t// fecha_final\n\t\t\t$this->fecha_final->ViewValue = $this->fecha_final->CurrentValue;\n\t\t\t$this->fecha_final->ViewCustomAttributes = \"\";\n\n\t\t\t// estado\n\t\t\tif (strval($this->estado->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($this->estado->CurrentValue) {\n\t\t\t\t\tcase $this->estado->FldTagValue(1):\n\t\t\t\t\t\t$this->estado->ViewValue = $this->estado->FldTagCaption(1) <> \"\" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $this->estado->FldTagValue(2):\n\t\t\t\t\t\t$this->estado->ViewValue = $this->estado->FldTagCaption(2) <> \"\" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $this->estado->FldTagValue(3):\n\t\t\t\t\t\t$this->estado->ViewValue = $this->estado->FldTagCaption(3) <> \"\" ? $this->estado->FldTagCaption(3) : $this->estado->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->estado->ViewValue = $this->estado->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->estado->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->estado->ViewCustomAttributes = \"\";\n\n\t\t\t// idservicio_medico_prestado\n\t\t\t$this->idservicio_medico_prestado->LinkCustomAttributes = \"\";\n\t\t\t$this->idservicio_medico_prestado->HrefValue = \"\";\n\t\t\t$this->idservicio_medico_prestado->TooltipValue = \"\";\n\n\t\t\t// idcuenta\n\t\t\t$this->idcuenta->LinkCustomAttributes = \"\";\n\t\t\t$this->idcuenta->HrefValue = \"\";\n\t\t\t$this->idcuenta->TooltipValue = \"\";\n\n\t\t\t// fecha_inicio\n\t\t\t$this->fecha_inicio->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_inicio->HrefValue = \"\";\n\t\t\t$this->fecha_inicio->TooltipValue = \"\";\n\n\t\t\t// fecha_final\n\t\t\t$this->fecha_final->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_final->HrefValue = \"\";\n\t\t\t$this->fecha_final->TooltipValue = \"\";\n\n\t\t\t// estado\n\t\t\t$this->estado->LinkCustomAttributes = \"\";\n\t\t\t$this->estado->HrefValue = \"\";\n\t\t\t$this->estado->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderEditRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// gjd_id\n\t\t$this->gjd_id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->gjd_id->EditCustomAttributes = \"\";\n\t\t$this->gjd_id->EditValue = $this->gjd_id->CurrentValue;\n\t\t$this->gjd_id->ViewCustomAttributes = \"\";\n\n\t\t// gjm_id\n\t\t$this->gjm_id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->gjm_id->EditCustomAttributes = \"\";\n\t\tif ($this->gjm_id->getSessionValue() <> \"\") {\n\t\t\t$this->gjm_id->CurrentValue = $this->gjm_id->getSessionValue();\n\t\t$this->gjm_id->ViewValue = $this->gjm_id->CurrentValue;\n\t\t$this->gjm_id->ViewCustomAttributes = \"\";\n\t\t} else {\n\t\t$this->gjm_id->EditValue = $this->gjm_id->CurrentValue;\n\t\t$this->gjm_id->PlaceHolder = ew_RemoveHtml($this->gjm_id->FldCaption());\n\t\t}\n\n\t\t// peg_id\n\t\t$this->peg_id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->peg_id->EditCustomAttributes = \"\";\n\n\t\t// b_mn\n\t\t$this->b_mn->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_mn->EditCustomAttributes = \"\";\n\t\t$this->b_mn->EditValue = $this->b_mn->CurrentValue;\n\t\t$this->b_mn->PlaceHolder = ew_RemoveHtml($this->b_mn->FldCaption());\n\n\t\t// b_sn\n\t\t$this->b_sn->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_sn->EditCustomAttributes = \"\";\n\t\t$this->b_sn->EditValue = $this->b_sn->CurrentValue;\n\t\t$this->b_sn->PlaceHolder = ew_RemoveHtml($this->b_sn->FldCaption());\n\n\t\t// b_sl\n\t\t$this->b_sl->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_sl->EditCustomAttributes = \"\";\n\t\t$this->b_sl->EditValue = $this->b_sl->CurrentValue;\n\t\t$this->b_sl->PlaceHolder = ew_RemoveHtml($this->b_sl->FldCaption());\n\n\t\t// b_rb\n\t\t$this->b_rb->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_rb->EditCustomAttributes = \"\";\n\t\t$this->b_rb->EditValue = $this->b_rb->CurrentValue;\n\t\t$this->b_rb->PlaceHolder = ew_RemoveHtml($this->b_rb->FldCaption());\n\n\t\t// b_km\n\t\t$this->b_km->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_km->EditCustomAttributes = \"\";\n\t\t$this->b_km->EditValue = $this->b_km->CurrentValue;\n\t\t$this->b_km->PlaceHolder = ew_RemoveHtml($this->b_km->FldCaption());\n\n\t\t// b_jm\n\t\t$this->b_jm->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_jm->EditCustomAttributes = \"\";\n\t\t$this->b_jm->EditValue = $this->b_jm->CurrentValue;\n\t\t$this->b_jm->PlaceHolder = ew_RemoveHtml($this->b_jm->FldCaption());\n\n\t\t// b_sb\n\t\t$this->b_sb->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_sb->EditCustomAttributes = \"\";\n\t\t$this->b_sb->EditValue = $this->b_sb->CurrentValue;\n\t\t$this->b_sb->PlaceHolder = ew_RemoveHtml($this->b_sb->FldCaption());\n\n\t\t// l_mn\n\t\t$this->l_mn->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_mn->EditCustomAttributes = \"\";\n\t\t$this->l_mn->EditValue = $this->l_mn->CurrentValue;\n\t\t$this->l_mn->PlaceHolder = ew_RemoveHtml($this->l_mn->FldCaption());\n\n\t\t// l_sn\n\t\t$this->l_sn->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_sn->EditCustomAttributes = \"\";\n\t\t$this->l_sn->EditValue = $this->l_sn->CurrentValue;\n\t\t$this->l_sn->PlaceHolder = ew_RemoveHtml($this->l_sn->FldCaption());\n\n\t\t// l_sl\n\t\t$this->l_sl->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_sl->EditCustomAttributes = \"\";\n\t\t$this->l_sl->EditValue = $this->l_sl->CurrentValue;\n\t\t$this->l_sl->PlaceHolder = ew_RemoveHtml($this->l_sl->FldCaption());\n\n\t\t// l_rb\n\t\t$this->l_rb->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_rb->EditCustomAttributes = \"\";\n\t\t$this->l_rb->EditValue = $this->l_rb->CurrentValue;\n\t\t$this->l_rb->PlaceHolder = ew_RemoveHtml($this->l_rb->FldCaption());\n\n\t\t// l_km\n\t\t$this->l_km->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_km->EditCustomAttributes = \"\";\n\t\t$this->l_km->EditValue = $this->l_km->CurrentValue;\n\t\t$this->l_km->PlaceHolder = ew_RemoveHtml($this->l_km->FldCaption());\n\n\t\t// l_jm\n\t\t$this->l_jm->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_jm->EditCustomAttributes = \"\";\n\t\t$this->l_jm->EditValue = $this->l_jm->CurrentValue;\n\t\t$this->l_jm->PlaceHolder = ew_RemoveHtml($this->l_jm->FldCaption());\n\n\t\t// l_sb\n\t\t$this->l_sb->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_sb->EditCustomAttributes = \"\";\n\t\t$this->l_sb->EditValue = $this->l_sb->CurrentValue;\n\t\t$this->l_sb->PlaceHolder = ew_RemoveHtml($this->l_sb->FldCaption());\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "public function create_row($vars_get) {\n $tm = new dbMeta(); // manipulate the DB Show data\n $table_fields = $tm->get_col_names_no_pk(); // get col names for db insert\n \n // Clean the get vars with a white list so db and all are happy \n $white_list = $table_fields; // \n $list_of_keys = array_keys($vars_get); // From the get \n \n $diff = array_diff($list_of_keys,$white_list); // compare arrays for insert \n foreach ($diff as $d) {\t\t \n unset($vars_get[$d]); // ace the different\t\n }\n \n $database = new Database();\n // build insert fields \n $insert_fields = implode(\", \" ,$table_fields);\n $insert_fields = \"(\" . $insert_fields . \")\"; \n\n // build bind fields \n $array = NULL; \n foreach($table_fields as $b) {\n $array .= \":\". $b . \",\";\n }\n $bind_fields = rtrim($array, $charlist = ',');\n $bind_fields = \"(\" . $bind_fields . \")\"; \n\t\n // build the SQL\n $sql = \"INSERT INTO \" . TABLE_NAME . \" \". $insert_fields . \" VALUES \" . $bind_fields; \n \n $database->query($sql); \n\t\n // Run the bind statement in a loop \n foreach($vars_get as $k => $v) {\n $k = \":\" . $k; // add the :\n $database->bind($k, $v); \t\n }\n $database->execute(); \n $this->move_along();\n }", "protected function tableBodyHTML()\r\n\t{\r\n\t\tglobal $wpdb;\r\n\t\tglobal $WPGMZA_TABLE_NAME_CUSTOM_FIELDS;\r\n\t\t\r\n\t\t$fields = $wpdb->get_results(\"SELECT * FROM $WPGMZA_TABLE_NAME_CUSTOM_FIELDS\");\r\n\t\t\r\n\t\tforeach($fields as $obj)\r\n\t\t{\r\n\t\t\t?>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input readonly name=\"ids[]\" value=\"<?php echo $obj->id; ?>\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input name=\"names[]\" value=\"<?php echo addslashes($obj->name); ?>\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input class=\"wpgmza-fontawesome-iconpicker\" name=\"icons[]\" value=\"<?php echo $obj->icon; ?>\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->attributeTableHTML($obj);\r\n\t\t\t\t\t\r\n\t\t\t\t\t?>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t$options = array(\r\n\t\t\t\t\t\t'none'\t\t\t=> 'None',\r\n\t\t\t\t\t\t'text'\t\t\t=> 'Text',\r\n\t\t\t\t\t\t'dropdown'\t\t=> 'Dropdown',\r\n\t\t\t\t\t\t'checkboxes'\t=> 'Checkboxes'\r\n\t\t\t\t\t);\r\n\t\t\t\t\t?>\r\n\t\t\t\t\r\n\t\t\t\t\t<select name=\"widget_types[]\">\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\tforeach($options as $value => $text)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<option value=\"<?php echo $value; ?>\"\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\tif($obj->widget_type == $value)\r\n\t\t\t\t\t\t\t\techo ' selected=\"selected\"';\r\n\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<?php echo __($text, 'wp-google-maps'); ?>\r\n\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Use this filter to add options to the dropdown\r\n\t\t\t\t\t\t$custom_options = apply_filters('wpgmza_custom_fields_widget_type_options', $obj);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(is_string($custom_options))\r\n\t\t\t\t\t\t\techo $custom_options;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<button type='button' class='button wpgmza-delete-custom-field'><i class='fa fa-trash-o' aria-hidden='true'></i></button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<?php\r\n\t\t}\r\n\t}", "function theme_helper_import_field_table($form) {\n $header = $form['#node_import-columns'];\n $rows = array();\n $groups = array();\n\n foreach (element_children($form) as $child) {\n if (!isset($form[$child]['#type']) || $form[$child]['#type'] != 'value') {\n $title = check_plain($form[$child]['#title']);\n $description = $form[$child]['#description'];\n $group = isset($form[$child]['#node_import-group']) ? $form[$child]['#node_import-group'] : '';\n unset($form[$child]['#title']);\n unset($form[$child]['#description']);\n\n if (!isset($groups[$group])) {\n $groups[$group] = array();\n }\n\n $groups[$group][] = array(\n check_plain($title) . '<div class=\"description\">'. $description .'</div>',\n drupal_render($form[$child]),\n );\n }\n }\n\n if (isset($groups['']) && !empty($groups[''])) {\n $rows = array_merge($rows, $groups['']);\n }\n\n foreach ($groups as $group => $items) {\n if ($group !== '' && !empty($items)) {\n $rows[] = array(\n array('data' => $group, 'colspan' => 2, 'class' => 'region'),\n );\n $rows = array_merge($rows, $items);\n }\n }\n\n if (empty($rows)) {\n $rows[] = array(array('data' => $form['#node_import-empty'], 'colspan' => 2));\n }\n\n return theme('table', $header, $rows) . drupal_render($form);\n}", "public function create(Table $table, Row $row)\n {\n $cols = $table->cols;\n return view('rows.create_and_edit', compact('table', 'row', 'cols'));\n }", "function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->precio_item->FormValue == $this->precio_item->CurrentValue && is_numeric(ew_StrToFloat($this->precio_item->CurrentValue)))\n\t\t\t$this->precio_item->CurrentValue = ew_StrToFloat($this->precio_item->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->costo_item->FormValue == $this->costo_item->CurrentValue && is_numeric(ew_StrToFloat($this->costo_item->CurrentValue)))\n\t\t\t$this->costo_item->CurrentValue = ew_StrToFloat($this->costo_item->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->saldo_item->FormValue == $this->saldo_item->CurrentValue && is_numeric(ew_StrToFloat($this->saldo_item->CurrentValue)))\n\t\t\t$this->saldo_item->CurrentValue = ew_StrToFloat($this->saldo_item->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->precio_old_item->FormValue == $this->precio_old_item->CurrentValue && is_numeric(ew_StrToFloat($this->precio_old_item->CurrentValue)))\n\t\t\t$this->precio_old_item->CurrentValue = ew_StrToFloat($this->precio_old_item->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->costo_old_item->FormValue == $this->costo_old_item->CurrentValue && is_numeric(ew_StrToFloat($this->costo_old_item->CurrentValue)))\n\t\t\t$this->costo_old_item->CurrentValue = ew_StrToFloat($this->costo_old_item->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// Id_Item\n\t\t// codigo_item\n\t\t// nombre_item\n\t\t// und_item\n\t\t// precio_item\n\t\t// costo_item\n\t\t// tipo_item\n\t\t// marca_item\n\t\t// cod_marca_item\n\t\t// detalle_item\n\t\t// saldo_item\n\t\t// activo_item\n\t\t// maneja_serial_item\n\t\t// asignado_item\n\t\t// si_no_item\n\t\t// precio_old_item\n\t\t// costo_old_item\n\t\t// registra_item\n\t\t// fecha_registro_item\n\t\t// empresa_item\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// Id_Item\n\t\t$this->Id_Item->ViewValue = $this->Id_Item->CurrentValue;\n\t\t$this->Id_Item->ViewCustomAttributes = \"\";\n\n\t\t// codigo_item\n\t\t$this->codigo_item->ViewValue = $this->codigo_item->CurrentValue;\n\t\t$this->codigo_item->ViewCustomAttributes = \"\";\n\n\t\t// nombre_item\n\t\t$this->nombre_item->ViewValue = $this->nombre_item->CurrentValue;\n\t\t$this->nombre_item->ViewCustomAttributes = \"\";\n\n\t\t// und_item\n\t\t$this->und_item->ViewValue = $this->und_item->CurrentValue;\n\t\t$this->und_item->ViewCustomAttributes = \"\";\n\n\t\t// precio_item\n\t\t$this->precio_item->ViewValue = $this->precio_item->CurrentValue;\n\t\t$this->precio_item->ViewCustomAttributes = \"\";\n\n\t\t// costo_item\n\t\t$this->costo_item->ViewValue = $this->costo_item->CurrentValue;\n\t\t$this->costo_item->ViewCustomAttributes = \"\";\n\n\t\t// tipo_item\n\t\t$this->tipo_item->ViewValue = $this->tipo_item->CurrentValue;\n\t\t$this->tipo_item->ViewCustomAttributes = \"\";\n\n\t\t// marca_item\n\t\t$this->marca_item->ViewValue = $this->marca_item->CurrentValue;\n\t\t$this->marca_item->ViewCustomAttributes = \"\";\n\n\t\t// cod_marca_item\n\t\t$this->cod_marca_item->ViewValue = $this->cod_marca_item->CurrentValue;\n\t\t$this->cod_marca_item->ViewCustomAttributes = \"\";\n\n\t\t// detalle_item\n\t\t$this->detalle_item->ViewValue = $this->detalle_item->CurrentValue;\n\t\t$this->detalle_item->ViewCustomAttributes = \"\";\n\n\t\t// saldo_item\n\t\t$this->saldo_item->ViewValue = $this->saldo_item->CurrentValue;\n\t\t$this->saldo_item->ViewCustomAttributes = \"\";\n\n\t\t// activo_item\n\t\t$this->activo_item->ViewValue = $this->activo_item->CurrentValue;\n\t\t$this->activo_item->ViewCustomAttributes = \"\";\n\n\t\t// maneja_serial_item\n\t\t$this->maneja_serial_item->ViewValue = $this->maneja_serial_item->CurrentValue;\n\t\t$this->maneja_serial_item->ViewCustomAttributes = \"\";\n\n\t\t// asignado_item\n\t\t$this->asignado_item->ViewValue = $this->asignado_item->CurrentValue;\n\t\t$this->asignado_item->ViewCustomAttributes = \"\";\n\n\t\t// si_no_item\n\t\t$this->si_no_item->ViewValue = $this->si_no_item->CurrentValue;\n\t\t$this->si_no_item->ViewCustomAttributes = \"\";\n\n\t\t// precio_old_item\n\t\t$this->precio_old_item->ViewValue = $this->precio_old_item->CurrentValue;\n\t\t$this->precio_old_item->ViewCustomAttributes = \"\";\n\n\t\t// costo_old_item\n\t\t$this->costo_old_item->ViewValue = $this->costo_old_item->CurrentValue;\n\t\t$this->costo_old_item->ViewCustomAttributes = \"\";\n\n\t\t// registra_item\n\t\t$this->registra_item->ViewValue = $this->registra_item->CurrentValue;\n\t\t$this->registra_item->ViewCustomAttributes = \"\";\n\n\t\t// fecha_registro_item\n\t\t$this->fecha_registro_item->ViewValue = $this->fecha_registro_item->CurrentValue;\n\t\t$this->fecha_registro_item->ViewValue = ew_FormatDateTime($this->fecha_registro_item->ViewValue, 0);\n\t\t$this->fecha_registro_item->ViewCustomAttributes = \"\";\n\n\t\t// empresa_item\n\t\t$this->empresa_item->ViewValue = $this->empresa_item->CurrentValue;\n\t\t$this->empresa_item->ViewCustomAttributes = \"\";\n\n\t\t\t// Id_Item\n\t\t\t$this->Id_Item->LinkCustomAttributes = \"\";\n\t\t\t$this->Id_Item->HrefValue = \"\";\n\t\t\t$this->Id_Item->TooltipValue = \"\";\n\n\t\t\t// codigo_item\n\t\t\t$this->codigo_item->LinkCustomAttributes = \"\";\n\t\t\t$this->codigo_item->HrefValue = \"\";\n\t\t\t$this->codigo_item->TooltipValue = \"\";\n\n\t\t\t// nombre_item\n\t\t\t$this->nombre_item->LinkCustomAttributes = \"\";\n\t\t\t$this->nombre_item->HrefValue = \"\";\n\t\t\t$this->nombre_item->TooltipValue = \"\";\n\n\t\t\t// und_item\n\t\t\t$this->und_item->LinkCustomAttributes = \"\";\n\t\t\t$this->und_item->HrefValue = \"\";\n\t\t\t$this->und_item->TooltipValue = \"\";\n\n\t\t\t// precio_item\n\t\t\t$this->precio_item->LinkCustomAttributes = \"\";\n\t\t\t$this->precio_item->HrefValue = \"\";\n\t\t\t$this->precio_item->TooltipValue = \"\";\n\n\t\t\t// costo_item\n\t\t\t$this->costo_item->LinkCustomAttributes = \"\";\n\t\t\t$this->costo_item->HrefValue = \"\";\n\t\t\t$this->costo_item->TooltipValue = \"\";\n\n\t\t\t// tipo_item\n\t\t\t$this->tipo_item->LinkCustomAttributes = \"\";\n\t\t\t$this->tipo_item->HrefValue = \"\";\n\t\t\t$this->tipo_item->TooltipValue = \"\";\n\n\t\t\t// marca_item\n\t\t\t$this->marca_item->LinkCustomAttributes = \"\";\n\t\t\t$this->marca_item->HrefValue = \"\";\n\t\t\t$this->marca_item->TooltipValue = \"\";\n\n\t\t\t// cod_marca_item\n\t\t\t$this->cod_marca_item->LinkCustomAttributes = \"\";\n\t\t\t$this->cod_marca_item->HrefValue = \"\";\n\t\t\t$this->cod_marca_item->TooltipValue = \"\";\n\n\t\t\t// detalle_item\n\t\t\t$this->detalle_item->LinkCustomAttributes = \"\";\n\t\t\t$this->detalle_item->HrefValue = \"\";\n\t\t\t$this->detalle_item->TooltipValue = \"\";\n\n\t\t\t// saldo_item\n\t\t\t$this->saldo_item->LinkCustomAttributes = \"\";\n\t\t\t$this->saldo_item->HrefValue = \"\";\n\t\t\t$this->saldo_item->TooltipValue = \"\";\n\n\t\t\t// activo_item\n\t\t\t$this->activo_item->LinkCustomAttributes = \"\";\n\t\t\t$this->activo_item->HrefValue = \"\";\n\t\t\t$this->activo_item->TooltipValue = \"\";\n\n\t\t\t// maneja_serial_item\n\t\t\t$this->maneja_serial_item->LinkCustomAttributes = \"\";\n\t\t\t$this->maneja_serial_item->HrefValue = \"\";\n\t\t\t$this->maneja_serial_item->TooltipValue = \"\";\n\n\t\t\t// asignado_item\n\t\t\t$this->asignado_item->LinkCustomAttributes = \"\";\n\t\t\t$this->asignado_item->HrefValue = \"\";\n\t\t\t$this->asignado_item->TooltipValue = \"\";\n\n\t\t\t// si_no_item\n\t\t\t$this->si_no_item->LinkCustomAttributes = \"\";\n\t\t\t$this->si_no_item->HrefValue = \"\";\n\t\t\t$this->si_no_item->TooltipValue = \"\";\n\n\t\t\t// precio_old_item\n\t\t\t$this->precio_old_item->LinkCustomAttributes = \"\";\n\t\t\t$this->precio_old_item->HrefValue = \"\";\n\t\t\t$this->precio_old_item->TooltipValue = \"\";\n\n\t\t\t// costo_old_item\n\t\t\t$this->costo_old_item->LinkCustomAttributes = \"\";\n\t\t\t$this->costo_old_item->HrefValue = \"\";\n\t\t\t$this->costo_old_item->TooltipValue = \"\";\n\n\t\t\t// registra_item\n\t\t\t$this->registra_item->LinkCustomAttributes = \"\";\n\t\t\t$this->registra_item->HrefValue = \"\";\n\t\t\t$this->registra_item->TooltipValue = \"\";\n\n\t\t\t// fecha_registro_item\n\t\t\t$this->fecha_registro_item->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_registro_item->HrefValue = \"\";\n\t\t\t$this->fecha_registro_item->TooltipValue = \"\";\n\n\t\t\t// empresa_item\n\t\t\t$this->empresa_item->LinkCustomAttributes = \"\";\n\t\t\t$this->empresa_item->HrefValue = \"\";\n\t\t\t$this->empresa_item->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $t_tinbai_mainsite;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $t_tinbai_mainsite->ViewUrl();\n\t\t$this->EditUrl = $t_tinbai_mainsite->EditUrl();\n\t\t$this->InlineEditUrl = $t_tinbai_mainsite->InlineEditUrl();\n\t\t$this->CopyUrl = $t_tinbai_mainsite->CopyUrl();\n\t\t$this->InlineCopyUrl = $t_tinbai_mainsite->InlineCopyUrl();\n\t\t$this->DeleteUrl = $t_tinbai_mainsite->DeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$t_tinbai_mainsite->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// FK_CONGTY_ID\n\n\t\t$t_tinbai_mainsite->FK_CONGTY_ID->CellCssStyle = \"\"; $t_tinbai_mainsite->FK_CONGTY_ID->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->FK_CONGTY_ID->CellAttrs = array(); $t_tinbai_mainsite->FK_CONGTY_ID->ViewAttrs = array(); $t_tinbai_mainsite->FK_CONGTY_ID->EditAttrs = array();\n\n\t\t// FK_DMGIOITHIEU_ID\n\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->CellCssStyle = \"\"; $t_tinbai_mainsite->FK_DMGIOITHIEU_ID->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->CellAttrs = array(); $t_tinbai_mainsite->FK_DMGIOITHIEU_ID->ViewAttrs = array(); $t_tinbai_mainsite->FK_DMGIOITHIEU_ID->EditAttrs = array();\n\n\t\t// FK_DMTUYENSINH_ID\n\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->CellCssStyle = \"\"; $t_tinbai_mainsite->FK_DMTUYENSINH_ID->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->CellAttrs = array(); $t_tinbai_mainsite->FK_DMTUYENSINH_ID->ViewAttrs = array(); $t_tinbai_mainsite->FK_DMTUYENSINH_ID->EditAttrs = array();\n\n\t\t// FK_DTSVTUONGLAI_ID\n\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->CellCssStyle = \"\"; $t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->CellAttrs = array(); $t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->ViewAttrs = array(); $t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->EditAttrs = array();\n\n\t\t// FK_DTSVDANGHOC_ID\n\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->CellCssStyle = \"\"; $t_tinbai_mainsite->FK_DTSVDANGHOC_ID->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->CellAttrs = array(); $t_tinbai_mainsite->FK_DTSVDANGHOC_ID->ViewAttrs = array(); $t_tinbai_mainsite->FK_DTSVDANGHOC_ID->EditAttrs = array();\n\n\t\t// FK_DTCUUSV_ID\n\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->CellCssStyle = \"\"; $t_tinbai_mainsite->FK_DTCUUSV_ID->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->CellAttrs = array(); $t_tinbai_mainsite->FK_DTCUUSV_ID->ViewAttrs = array(); $t_tinbai_mainsite->FK_DTCUUSV_ID->EditAttrs = array();\n\n\t\t// FK_DTDOANHNGHIEP_ID\n\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->CellCssStyle = \"\"; $t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->CellAttrs = array(); $t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->ViewAttrs = array(); $t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->EditAttrs = array();\n\n\t\t// C_TITLE\n\t\t$t_tinbai_mainsite->C_TITLE->CellCssStyle = \"\"; $t_tinbai_mainsite->C_TITLE->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_TITLE->CellAttrs = array(); $t_tinbai_mainsite->C_TITLE->ViewAttrs = array(); $t_tinbai_mainsite->C_TITLE->EditAttrs = array();\n\n\t\t// C_HIT_MAINSITE\n\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->CellCssStyle = \"\"; $t_tinbai_mainsite->C_HIT_MAINSITE->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->CellAttrs = array(); $t_tinbai_mainsite->C_HIT_MAINSITE->ViewAttrs = array(); $t_tinbai_mainsite->C_HIT_MAINSITE->EditAttrs = array();\n\n\t\t// C_NEW_MYSEFLT\n\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->CellCssStyle = \"\"; $t_tinbai_mainsite->C_NEW_MYSEFLT->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->CellAttrs = array(); $t_tinbai_mainsite->C_NEW_MYSEFLT->ViewAttrs = array(); $t_tinbai_mainsite->C_NEW_MYSEFLT->EditAttrs = array();\n\n\t\t// C_COMMENT_MAINSITE\n\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->CellCssStyle = \"\"; $t_tinbai_mainsite->C_COMMENT_MAINSITE->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->CellAttrs = array(); $t_tinbai_mainsite->C_COMMENT_MAINSITE->ViewAttrs = array(); $t_tinbai_mainsite->C_COMMENT_MAINSITE->EditAttrs = array();\n\n\t\t// C_ORDER_MAINSITE\n\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->CellCssStyle = \"\"; $t_tinbai_mainsite->C_ORDER_MAINSITE->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->CellAttrs = array(); $t_tinbai_mainsite->C_ORDER_MAINSITE->ViewAttrs = array(); $t_tinbai_mainsite->C_ORDER_MAINSITE->EditAttrs = array();\n\n\t\t// C_STATUS_MAINSITE\n\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->CellCssStyle = \"\"; $t_tinbai_mainsite->C_STATUS_MAINSITE->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->CellAttrs = array(); $t_tinbai_mainsite->C_STATUS_MAINSITE->ViewAttrs = array(); $t_tinbai_mainsite->C_STATUS_MAINSITE->EditAttrs = array();\n\n\t\t// C_VISITOR_MAINSITE\n\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->CellCssStyle = \"\"; $t_tinbai_mainsite->C_VISITOR_MAINSITE->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->CellAttrs = array(); $t_tinbai_mainsite->C_VISITOR_MAINSITE->ViewAttrs = array(); $t_tinbai_mainsite->C_VISITOR_MAINSITE->EditAttrs = array();\n\n\t\t// C_ACTIVE_MAINSITE\n\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->CellCssStyle = \"\"; $t_tinbai_mainsite->C_ACTIVE_MAINSITE->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->CellAttrs = array(); $t_tinbai_mainsite->C_ACTIVE_MAINSITE->ViewAttrs = array(); $t_tinbai_mainsite->C_ACTIVE_MAINSITE->EditAttrs = array();\n\n\t\t// C_TIME_ACTIVE_MAINSITE\n\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->CellCssStyle = \"\"; $t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->CellAttrs = array(); $t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->ViewAttrs = array(); $t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->EditAttrs = array();\n\n\t\t// FK_NGUOIDUNGID_MAINSITE\n\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->CellCssStyle = \"\"; $t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->CellAttrs = array(); $t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->ViewAttrs = array(); $t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->EditAttrs = array();\n\n\t\t// C_NOTE\n\t\t$t_tinbai_mainsite->C_NOTE->CellCssStyle = \"\"; $t_tinbai_mainsite->C_NOTE->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_NOTE->CellAttrs = array(); $t_tinbai_mainsite->C_NOTE->ViewAttrs = array(); $t_tinbai_mainsite->C_NOTE->EditAttrs = array();\n\n\t\t// C_USER_ADD\n\t\t$t_tinbai_mainsite->C_USER_ADD->CellCssStyle = \"\"; $t_tinbai_mainsite->C_USER_ADD->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_USER_ADD->CellAttrs = array(); $t_tinbai_mainsite->C_USER_ADD->ViewAttrs = array(); $t_tinbai_mainsite->C_USER_ADD->EditAttrs = array();\n\n\t\t// C_ADD_TIME\n\t\t$t_tinbai_mainsite->C_ADD_TIME->CellCssStyle = \"\"; $t_tinbai_mainsite->C_ADD_TIME->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_ADD_TIME->CellAttrs = array(); $t_tinbai_mainsite->C_ADD_TIME->ViewAttrs = array(); $t_tinbai_mainsite->C_ADD_TIME->EditAttrs = array();\n\n\t\t// C_USER_EDIT\n\t\t$t_tinbai_mainsite->C_USER_EDIT->CellCssStyle = \"\"; $t_tinbai_mainsite->C_USER_EDIT->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_USER_EDIT->CellAttrs = array(); $t_tinbai_mainsite->C_USER_EDIT->ViewAttrs = array(); $t_tinbai_mainsite->C_USER_EDIT->EditAttrs = array();\n\n\t\t// C_EDIT_TIME\n\t\t$t_tinbai_mainsite->C_EDIT_TIME->CellCssStyle = \"\"; $t_tinbai_mainsite->C_EDIT_TIME->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->C_EDIT_TIME->CellAttrs = array(); $t_tinbai_mainsite->C_EDIT_TIME->ViewAttrs = array(); $t_tinbai_mainsite->C_EDIT_TIME->EditAttrs = array();\n\n\t\t// FK_EDITOR_ID\n\t\t$t_tinbai_mainsite->FK_EDITOR_ID->CellCssStyle = \"\"; $t_tinbai_mainsite->FK_EDITOR_ID->CellCssClass = \"\";\n\t\t$t_tinbai_mainsite->FK_EDITOR_ID->CellAttrs = array(); $t_tinbai_mainsite->FK_EDITOR_ID->ViewAttrs = array(); $t_tinbai_mainsite->FK_EDITOR_ID->EditAttrs = array();\n\t\tif ($t_tinbai_mainsite->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// PK_TINBAI_ID\n\t\t\t$t_tinbai_mainsite->PK_TINBAI_ID->ViewValue = $t_tinbai_mainsite->PK_TINBAI_ID->CurrentValue;\n\t\t\t$t_tinbai_mainsite->PK_TINBAI_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->PK_TINBAI_ID->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->PK_TINBAI_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_CONGTY_ID\n\t\t\tif (strval($t_tinbai_mainsite->FK_CONGTY_ID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`PK_MACONGTY` = \" . ew_AdjustSql($t_tinbai_mainsite->FK_CONGTY_ID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_TENCONGTY` FROM `t_congty`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_mainsite->FK_CONGTY_ID->ViewValue = $rswrk->fields('C_TENCONGTY');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_mainsite->FK_CONGTY_ID->ViewValue = $t_tinbai_mainsite->FK_CONGTY_ID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->FK_CONGTY_ID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->FK_CONGTY_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->FK_CONGTY_ID->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->FK_CONGTY_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_DMGIOITHIEU_ID\n\t\t\tif (strval($t_tinbai_mainsite->FK_DMGIOITHIEU_ID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`PK_DANHMUCGIOITHIEU` = \" . ew_AdjustSql($t_tinbai_mainsite->FK_DMGIOITHIEU_ID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_NAME` FROM `t_danhmucgioithieu`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->ViewValue = $rswrk->fields('C_NAME');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->ViewValue = $t_tinbai_mainsite->FK_DMGIOITHIEU_ID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_DMTUYENSINH_ID\n\t\t\tif (strval($t_tinbai_mainsite->FK_DMTUYENSINH_ID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`PK_DANHMUCTUYENSINH` = \" . ew_AdjustSql($t_tinbai_mainsite->FK_DMTUYENSINH_ID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_NAME` FROM `t_danhmuctuyensinh`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->ViewValue = $rswrk->fields('C_NAME');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->ViewValue = $t_tinbai_mainsite->FK_DMTUYENSINH_ID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_DTSVTUONGLAI_ID\n\t\t\tif (strval($t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`DTSVTUONGLAI_ID` = \" . ew_AdjustSql($t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_NAME` FROM `t_doituong_svtuonglai`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->ViewValue = $rswrk->fields('C_NAME');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->ViewValue = $t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_DTSVDANGHOC_ID\n\t\t\tif (strval($t_tinbai_mainsite->FK_DTSVDANGHOC_ID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`DTSVDANGHOC_ID` = \" . ew_AdjustSql($t_tinbai_mainsite->FK_DTSVDANGHOC_ID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_NAME` FROM `t_doituong_svdanghoc`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->ViewValue = $rswrk->fields('C_NAME');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->ViewValue = $t_tinbai_mainsite->FK_DTSVDANGHOC_ID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_DTCUUSV_ID\n\t\t\tif (strval($t_tinbai_mainsite->FK_DTCUUSV_ID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`DTCUUSV_ID` = \" . ew_AdjustSql($t_tinbai_mainsite->FK_DTCUUSV_ID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_NAME` FROM `t_doituong_cuusv`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->ViewValue = $rswrk->fields('C_NAME');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->ViewValue = $t_tinbai_mainsite->FK_DTCUUSV_ID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_DTDOANHNGHIEP_ID\n\t\t\tif (strval($t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`DTDOANHNGHIEP_ID` = \" . ew_AdjustSql($t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_NAME` FROM `t_doituong_doanhnghiep`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->ViewValue = $rswrk->fields('C_NAME');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->ViewValue = $t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TITLE\n\t\t\t$t_tinbai_mainsite->C_TITLE->ViewValue = $t_tinbai_mainsite->C_TITLE->CurrentValue;\n\t\t\t$t_tinbai_mainsite->C_TITLE->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_TITLE->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_TITLE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_HIT_MAINSITE\n\t\t\tif (strval($t_tinbai_mainsite->C_HIT_MAINSITE->CurrentValue) <> \"\") {\n\t\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->ViewValue = \"\";\n\t\t\t\t$arwrk = explode(\",\", strval($t_tinbai_mainsite->C_HIT_MAINSITE->CurrentValue));\n\t\t\t\tfor ($ari = 0; $ari < count($arwrk); $ari++) {\n\t\t\t\t\tswitch (trim($arwrk[$ari])) {\n\t\t\t\t\t\tcase \"0\":\n\t\t\t\t\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->ViewValue .= \"Không nổi bật\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->ViewValue .= \"Tin nổi bật trang chủ\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"2\":\n\t\t\t\t\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->ViewValue .= \"Tin nổi bật tuyển sinh\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"3\":\n\t\t\t\t\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->ViewValue .= \"Tin nổi bật sinh viên đang học\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->ViewValue .= trim($arwrk[$ari]);\n\t\t\t\t\t}\n\t\t\t\t\tif ($ari < count($arwrk)-1) $t_tinbai_mainsite->C_HIT_MAINSITE->ViewValue .= ew_ViewOptionSeparator($ari);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_NEW_MYSEFLT\n\t\t\tif (strval($t_tinbai_mainsite->C_NEW_MYSEFLT->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($t_tinbai_mainsite->C_NEW_MYSEFLT->CurrentValue) {\n\t\t\t\t\tcase \"0\":\n\t\t\t\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->ViewValue = \"Không là tin chúng tôi\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->ViewValue = \"<b>Tin chúng tôi </b>\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->ViewValue = $t_tinbai_mainsite->C_NEW_MYSEFLT->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->ViewCustomAttributes = \"\";\n\n\t\t\t// C_COMMENT_MAINSITE\n\t\t\tif (strval($t_tinbai_mainsite->C_COMMENT_MAINSITE->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($t_tinbai_mainsite->C_COMMENT_MAINSITE->CurrentValue) {\n\t\t\t\t\tcase \"0\":\n\t\t\t\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->ViewValue = \"Không cho phép\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->ViewValue = \"<b>Cho phép comnet</b>\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->ViewValue = $t_tinbai_mainsite->C_COMMENT_MAINSITE->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_ORDER_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->ViewValue = $t_tinbai_mainsite->C_ORDER_MAINSITE->CurrentValue;\n\t\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->ViewValue = ew_FormatDateTime($t_tinbai_mainsite->C_ORDER_MAINSITE->ViewValue, 11);\n\t\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_STATUS_MAINSITE\n\t\t\tif (strval($t_tinbai_mainsite->C_STATUS_MAINSITE->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($t_tinbai_mainsite->C_STATUS_MAINSITE->CurrentValue) {\n\t\t\t\t\tcase \"0\":\n\t\t\t\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->ViewValue = \"Không duyệt <img src=\\\"images/alert-small.gif\\\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->ViewValue = \"Đã duyệt <img src=\\\"images/icon-xac-thuc.jpg\\\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"2\":\n\t\t\t\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->ViewValue = \"Chờ duyệt <img src=\\\"images/new.gif\\\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->ViewValue = $t_tinbai_mainsite->C_STATUS_MAINSITE->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_VISITOR_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->ViewValue = $t_tinbai_mainsite->C_VISITOR_MAINSITE->CurrentValue;\n\t\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_ACTIVE_MAINSITE\n\t\t\tif (strval($t_tinbai_mainsite->C_ACTIVE_MAINSITE->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($t_tinbai_mainsite->C_ACTIVE_MAINSITE->CurrentValue) {\n\t\t\t\t\tcase \"0\":\n\t\t\t\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->ViewValue = \"<span style=\\\"color:red\\\">Không xuất bản</span>\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->ViewValue = \"<b>Xuất bản</b>\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->ViewValue = $t_tinbai_mainsite->C_ACTIVE_MAINSITE->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TIME_ACTIVE_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->ViewValue = $t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->CurrentValue;\n\t\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->ViewValue = ew_FormatDateTime($t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->ViewValue, 11);\n\t\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_NGUOIDUNGID_MAINSITE\n\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->ViewValue = $t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->CurrentValue;\n\t\t\tif (strval($t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`PK_NGUOIDUNG_ID` = \" . ew_AdjustSql($t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_HOTEN` FROM `t_nguoidung`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->ViewValue = $rswrk->fields('C_HOTEN');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->ViewValue = $t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_NOTE\n\t\t\t$t_tinbai_mainsite->C_NOTE->ViewValue = $t_tinbai_mainsite->C_NOTE->CurrentValue;\n\t\t\t$t_tinbai_mainsite->C_NOTE->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_NOTE->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_NOTE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_USER_ADD\n\t\t\t$t_tinbai_mainsite->C_USER_ADD->ViewValue = $t_tinbai_levelsite->C_USER_ADD->CurrentValue;\n\t\t\tif (strval($t_tinbai_mainsite->C_USER_ADD->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`PK_NGUOIDUNG_ID` = \" . ew_AdjustSql($t_tinbai_mainsite->C_USER_ADD->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_HOTEN` FROM `t_nguoidung`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n \n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n \n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_mainsite->C_USER_ADD->ViewValue = $rswrk->fields('C_HOTEN');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_mainsite->C_USER_ADD->ViewValue = $t_tinbai_mainsite->C_USER_ADD->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->C_USER_ADD->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->C_USER_ADD->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_USER_ADD->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_USER_ADD->ViewCustomAttributes = \"\";\n\n\n\t\t\t// C_ADD_TIME\n\t\t\t$t_tinbai_mainsite->C_ADD_TIME->ViewValue = $t_tinbai_mainsite->C_ADD_TIME->CurrentValue;\n\t\t\t$t_tinbai_mainsite->C_ADD_TIME->ViewValue = ew_FormatDateTime($t_tinbai_mainsite->C_ADD_TIME->ViewValue, 11);\n\t\t\t$t_tinbai_mainsite->C_ADD_TIME->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_ADD_TIME->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_ADD_TIME->ViewCustomAttributes = \"\";\n\n\t\t\t// C_USER_EDIT\n \n $t_tinbai_mainsite->C_USER_EDIT->ViewValue = $t_tinbai_levelsite->C_USER_EDIT->CurrentValue;\n\t\t\tif (strval($t_tinbai_mainsite->C_USER_ADD->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`PK_NGUOIDUNG_ID` = \" . ew_AdjustSql($t_tinbai_mainsite->C_USER_EDIT->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_HOTEN` FROM `t_nguoidung`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n \n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n \n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_mainsite->C_USER_EDIT->ViewValue = $rswrk->fields('C_HOTEN');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_mainsite->C_USER_EDIT->ViewValue = $t_tinbai_mainsite->C_USER_EDIT->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_mainsite->C_USER_ADD->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_mainsite->C_USER_EDIT->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_USER_EDIT->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_USER_EDIT->ViewCustomAttributes = \"\";\n \n\t\t\n\n\t\t\t// C_EDIT_TIME\n\t\t\t$t_tinbai_mainsite->C_EDIT_TIME->ViewValue = $t_tinbai_mainsite->C_EDIT_TIME->CurrentValue;\n\t\t\t$t_tinbai_mainsite->C_EDIT_TIME->ViewValue = ew_FormatDateTime($t_tinbai_mainsite->C_EDIT_TIME->ViewValue, 11);\n\t\t\t$t_tinbai_mainsite->C_EDIT_TIME->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->C_EDIT_TIME->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->C_EDIT_TIME->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_EDITOR_ID\n\t\t\t$t_tinbai_mainsite->FK_EDITOR_ID->ViewValue = $t_tinbai_mainsite->FK_EDITOR_ID->CurrentValue;\n\t\t\t$t_tinbai_mainsite->FK_EDITOR_ID->ViewValue = ew_FormatNumber($t_tinbai_mainsite->FK_EDITOR_ID->ViewValue, 0, -2, -2, -2);\n\t\t\t$t_tinbai_mainsite->FK_EDITOR_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_mainsite->FK_EDITOR_ID->CssClass = \"\";\n\t\t\t$t_tinbai_mainsite->FK_EDITOR_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_CONGTY_ID\n\t\t\t$t_tinbai_mainsite->FK_CONGTY_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->FK_CONGTY_ID->TooltipValue = \"\";\n\n\t\t\t// FK_DMGIOITHIEU_ID\n\t\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->TooltipValue = \"\";\n\n\t\t\t// FK_DMTUYENSINH_ID\n\t\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->TooltipValue = \"\";\n\n\t\t\t// FK_DTSVTUONGLAI_ID\n\t\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->TooltipValue = \"\";\n\n\t\t\t// FK_DTSVDANGHOC_ID\n\t\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->TooltipValue = \"\";\n\n\t\t\t// FK_DTCUUSV_ID\n\t\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->TooltipValue = \"\";\n\n\t\t\t// FK_DTDOANHNGHIEP_ID\n\t\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->TooltipValue = \"\";\n\n\t\t\t// C_TITLE\n\t\t\t$t_tinbai_mainsite->C_TITLE->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_TITLE->TooltipValue = \"\";\n\n\t\t\t// C_HIT_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->TooltipValue = \"\";\n\n\t\t\t// C_NEW_MYSEFLT\n\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->TooltipValue = \"\";\n\n\t\t\t// C_COMMENT_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->TooltipValue = \"\";\n\n\t\t\t// C_ORDER_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->TooltipValue = \"\";\n\n\t\t\t// C_STATUS_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->TooltipValue = \"\";\n\n\t\t\t// C_VISITOR_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->TooltipValue = \"\";\n\n\t\t\t// C_ACTIVE_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->TooltipValue = \"\";\n\n\t\t\t// C_TIME_ACTIVE_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->TooltipValue = \"\";\n\n\t\t\t// FK_NGUOIDUNGID_MAINSITE\n\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->TooltipValue = \"\";\n\n\t\t\t// C_NOTE\n\t\t\t$t_tinbai_mainsite->C_NOTE->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_NOTE->TooltipValue = \"\";\n\n\t\t\t// C_USER_ADD\n\t\t\t$t_tinbai_mainsite->C_USER_ADD->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_USER_ADD->TooltipValue = \"\";\n\n\t\t\t// C_ADD_TIME\n\t\t\t$t_tinbai_mainsite->C_ADD_TIME->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_ADD_TIME->TooltipValue = \"\";\n\n\t\t\t// C_USER_EDIT\n\t\t\t$t_tinbai_mainsite->C_USER_EDIT->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_USER_EDIT->TooltipValue = \"\";\n\n\t\t\t// C_EDIT_TIME\n\t\t\t$t_tinbai_mainsite->C_EDIT_TIME->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->C_EDIT_TIME->TooltipValue = \"\";\n\n\t\t\t// FK_EDITOR_ID\n\t\t\t$t_tinbai_mainsite->FK_EDITOR_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_mainsite->FK_EDITOR_ID->TooltipValue = \"\";\n\t\t} elseif ($t_tinbai_mainsite->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\n\t\t\t// FK_CONGTY_ID\n\t\t\t$t_tinbai_mainsite->FK_CONGTY_ID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `PK_MACONGTY`, `C_TENCONGTY`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `t_congty`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$t_tinbai_mainsite->FK_CONGTY_ID->EditValue = $arwrk;\n\n\t\t\t// FK_DMGIOITHIEU_ID\n\t\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `PK_DANHMUCGIOITHIEU`, `C_NAME`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `t_danhmucgioithieu`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->EditValue = $arwrk;\n\n\t\t\t// FK_DMTUYENSINH_ID\n\t\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `PK_DANHMUCTUYENSINH`, `C_NAME`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `t_danhmuctuyensinh`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->EditValue = $arwrk;\n\n\t\t\t// FK_DTSVTUONGLAI_ID\n\t\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `DTSVTUONGLAI_ID`, `C_NAME`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `t_doituong_svtuonglai`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->EditValue = $arwrk;\n\n\t\t\t// FK_DTSVDANGHOC_ID\n\t\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `DTSVDANGHOC_ID`, `C_NAME`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `t_doituong_svdanghoc`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->EditValue = $arwrk;\n\n\t\t\t// FK_DTCUUSV_ID\n\t\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `DTCUUSV_ID`, `C_NAME`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `t_doituong_cuusv`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->EditValue = $arwrk;\n\n\t\t\t// FK_DTDOANHNGHIEP_ID\n\t\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `DTDOANHNGHIEP_ID`, `C_NAME`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `t_doituong_doanhnghiep`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->EditValue = $arwrk;\n\n\t\t\t// C_TITLE\n\t\t\t$t_tinbai_mainsite->C_TITLE->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_mainsite->C_TITLE->EditValue = ew_HtmlEncode($t_tinbai_mainsite->C_TITLE->AdvancedSearch->SearchValue);\n\n\t\t\t// C_HIT_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t\n\t\t\t// C_HIT_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array(\"0\", \"Không là tin nổi bật\");\n\t\t\t$arwrk[] = array(\"1\", \"Tin nổi bật trang chủ\");\n\t\t\t$arwrk[] = array(\"2\", \"Tin nổi bật trang tuyển sinh\");\n\t\t\t$arwrk[] = array(\"3\", \"Tin nổi bật sinh viên đang học\");\n\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->EditValue = $arwrk;\n\n\t\t\t// C_NEW_MYSEFLT\n\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array(\"0\", \"Không \");\n\t\t\t$arwrk[] = array(\"1\", \"Tin chúng tôi\");\n\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->EditValue = $arwrk;\n\n\t\t\t// C_COMMENT_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array(\"0\", \"Không cho phép\");\n\t\t\t$arwrk[] = array(\"1\", \"Cho phép commnet facebook\");\n\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->EditValue = $arwrk;\n\n\t\t\t// C_ORDER_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($t_tinbai_mainsite->C_ORDER_MAINSITE->AdvancedSearch->SearchValue, 11), 11));\n\n\t\t\t// C_STATUS_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array(\"0\", \"Không duyệt\");\n\t\t\t$arwrk[] = array(\"1\", \"Đã duyệt\");\n $arwrk[] = array(\"2\", \"Chờ xét\");\n\t\t\t$arwrk[] = array(\"\", \"\");\n\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->EditValue = $arwrk;\n\n\t\t\t// C_VISITOR_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->EditValue = ew_HtmlEncode($t_tinbai_mainsite->C_VISITOR_MAINSITE->AdvancedSearch->SearchValue);\n\n\t\t\t// C_ACTIVE_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array(\"0\", \"khong active len mainsite\");\n\t\t\t$arwrk[] = array(\"1\", \"Active lenmainsite\");\n\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->EditValue = $arwrk;\n\n\t\t\t// C_TIME_ACTIVE_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->AdvancedSearch->SearchValue, 11), 11));\n\n\t\t\t// FK_NGUOIDUNGID_MAINSITE\n\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->EditValue = ew_HtmlEncode($t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->AdvancedSearch->SearchValue);\n\n\t\t\t// C_NOTE\n\t\t\t$t_tinbai_mainsite->C_NOTE->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_mainsite->C_NOTE->EditValue = ew_HtmlEncode($t_tinbai_mainsite->C_NOTE->AdvancedSearch->SearchValue);\n\n\t\t\t// C_USER_ADD\n\t\t\t$t_tinbai_mainsite->C_USER_ADD->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_mainsite->C_USER_ADD->EditValue = ew_HtmlEncode($t_tinbai_mainsite->C_USER_ADD->AdvancedSearch->SearchValue);\n\n\t\t\t// C_ADD_TIME\n\t\t\t$t_tinbai_mainsite->C_ADD_TIME->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_mainsite->C_ADD_TIME->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($t_tinbai_mainsite->C_ADD_TIME->AdvancedSearch->SearchValue, 11), 11));\n\n\t\t\t// C_USER_EDIT\n\t\t\t$t_tinbai_mainsite->C_USER_EDIT->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_mainsite->C_USER_EDIT->EditValue = ew_HtmlEncode($t_tinbai_mainsite->C_USER_EDIT->AdvancedSearch->SearchValue);\n\n\t\t\t// C_EDIT_TIME\n\t\t\t$t_tinbai_mainsite->C_EDIT_TIME->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_mainsite->C_EDIT_TIME->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($t_tinbai_mainsite->C_EDIT_TIME->AdvancedSearch->SearchValue, 11), 11));\n\n\t\t\t// FK_EDITOR_ID\n\t\t\t$t_tinbai_mainsite->FK_EDITOR_ID->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_mainsite->FK_EDITOR_ID->EditValue = ew_HtmlEncode($t_tinbai_mainsite->FK_EDITOR_ID->AdvancedSearch->SearchValue);\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($t_tinbai_mainsite->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$t_tinbai_mainsite->Row_Rendered();\n\t}", "public function auto_build_list_tbody($data){\r\n\t\t$list_tbody = \"<tbody>\";\r\n\t\t$i = 1;\r\n\t\tforeach ($data as $row) {\r\n\t\t\t$list_tbody .= '<tr>' .\r\n\t\t\t\t\"<td>\" . $i++ . \"</td>\";\r\n\t\t\tforeach ($this->model->table_fields as $list_field) {\r\n\t\t\t\tif ($list_field->get_visible_grid()) {\r\n\t\t\t\t\t//if($list_field->get_type()==Column::$COLUMN_TYPE_SELECT)\r\n\t\t\t\t\tif ($list_field->get_foreing_key()) {\r\n\t\t\t\t\t\t$select_data = $list_field->get_fk_entity()->get_select_data($row[$list_field->get_name()]);\r\n\t\t\t\t\t\t$list_tbody .= \"<td>\" . $select_data[0]['name'] . \"</td>\";\r\n\t\t\t\t\t} else if ($list_field->get_type() == Column::$COLUMN_TYPE_PASS) {\r\n\t\t\t\t\t\t$list_tbody .= \"<td>\" . (str_repeat('*', strlen($row[$list_field->get_name()]))) . \"</td>\";\r\n\t\t\t\t\t} else if (Column::$COLUMN_TYPE_ICONPICKER) {\r\n\t\t\t\t\t\t$list_tbody .= \"<td>\" . $row[$list_field->get_name()] .\r\n\t\t\t\t\t\t\t\" <i class='\" . $row[$list_field->get_name()] . \"'></i></td>\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$list_tbody .= \"<td>\" . $row[$list_field->get_name()] . \"</td>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$list_tbody .= \"<td class='text-center'>\" . ($this->model->crud_config['can_update'] ?\r\n\t\t\t\t\t\tComponent::edit_button($this->model->table_name, $row[$this->model->id_field]) : '') . \r\n\t\t\t\t\t($this->model->crud_config['can_delete'] ?\r\n\t\t\t\t\t\tComponent::delete_button($this->model->table_name, $row[$this->model->id_field]) : '') .\r\n\t\t\t\t\"</td>\" .\r\n\t\t\t\t\"</tr>\";\r\n\r\n\t\t}\r\n\t\treturn $list_tbody . \"</tbody>\";\r\n\t}", "function getForm($form, &$form_state, $disabled, $myvalues)\n {\n $form[\"data_entry_area1\"] = array(\n '#prefix' => \"\\n<section class='protocollib-admin raptor-dialog-table'>\\n\",\n '#suffix' => \"\\n</section>\\n\",\n );\n $form[\"data_entry_area1\"]['table_container'] = array(\n '#type' => 'item', \n '#prefix' => '<div class=\"raptor-dialog-table-container\">',\n '#suffix' => '</div>', \n '#tree' => TRUE,\n );\n\n\tglobal $base_url;\n $language_infer = new \\raptor_formulas\\LanguageInference();\n\t\t\n $showDeleteOption = $this->m_oUserInfo->hasPrivilege('REP1');\n $showAddOption = $this->m_oUserInfo->hasPrivilege('UNP1');\n \n $rows = \"\\n\";\n $result = db_select('raptor_protocol_lib', 'p')\n ->fields('p')\n ->orderBy('protocol_shortname')\n ->execute();\n foreach($result as $item) \n {\n $protocol_shortname = $item->protocol_shortname;\n if($item->original_file_upload_dt == NULL)\n {\n $docuploadedmarkup = 'No';\n } else {\n $docuploadedmarkup = '<span class=\"hovertips\" title=\"uploaded '\n .$item->original_filename\n .' on '\n .$item->original_file_upload_dt.'\">Yes</span>';\n }\n $keywords = $this->getFormattedKeywordsForTable($protocol_shortname);\n $active_markup = $item->active_yn == 1 ? '<b>Yes</b>' : 'No';\n $declaredHasContrast = $item->contrast_yn == 1 ? TRUE : FALSE;\n $hasSedation = $item->sedation_yn == 1 ? '<b>Yes</b>' : 'No';\n $hasRadioisotope = $item->sedation_yn == 1 ? '<b>Yes</b>' : 'No';\n $fullname = $item->name;\n $infered_hasContrast = $language_infer->inferContrastFromPhrase($fullname);\n $hasContrastMarkup = $declaredHasContrast ? '<b>Yes</b>' : 'No';\n if($infered_hasContrast !== NULL)\n {\n if(!(\n ($declaredHasContrast && $infered_hasContrast) || \n (!$declaredHasContrast && !$infered_hasContrast))\n )\n {\n if($infered_hasContrast)\n {\n $troublemsg = \"protocol long name implies YES contrast\";\n } else {\n $troublemsg = \"protocol long name implies NO contrast\";\n }\n $hasContrastMarkup = \"<span class='medical-health-warn' title='$troublemsg'>!!! $hasContrastMarkup !!!</span>\";\n }\n }\n if(!$showAddOption)\n {\n $addActionMarkup = '';\n $editActionMarkup = '';\n } else {\n $addActionMarkup = '<a href=\"'.$base_url.'/raptor/viewprotocollib?protocol_shortname='.$item->protocol_shortname.'\">View</a>';\n $editActionMarkup = '<a href=\"'.$base_url.'/raptor/editprotocollib?protocol_shortname='.$item->protocol_shortname.'\">Edit</a>';\n }\n if(!$showDeleteOption)\n {\n $deleteActionMarkup = '';\n } else {\n $deleteActionMarkup = '<a href=\"'.$base_url.'/raptor/deleteprotocollib?protocol_shortname='.$item->protocol_shortname.'\">Delete</a>';\n }\n $rows .= \"\\n\".'<tr>'\n . '<td>'.$protocol_shortname.'</td>'\n . '<td>'.$fullname.'</td>'\n . '<td>'.$active_markup.'</td>'\n . '<td>'.$hasContrastMarkup.'</td>'\n . '<td>'.$hasSedation.'</td>'\n . '<td>'.$hasRadioisotope.'</td>'\n . '<td>'.$item->modality_abbr.'</td>'\n . '<td>'.$item->version.'</td>'\n . '<td>'.$docuploadedmarkup.'</td>'\n . '<td>'.$keywords.'</td>'\n . \"<td>$addActionMarkup</td>\"\n . \"<td>$editActionMarkup</td>\"\n . \"<td>$deleteActionMarkup</td>\"\n . '</tr>';\n }\n\n $form[\"data_entry_area1\"]['table_container']['protocols'] = array('#type' => 'item',\n '#markup' => '<table id=\"my-raptor-dialog-table\" class=\"dataTable\">'\n . '<thead>'\n . '<tr>'\n . '<th title=\"System unique identifier for the protocol\">Short Name</th>'\n . '<th title=\"Full name of the protocol\">Long Name</th>'\n . '<th title=\"Only active protocols are available for use on new exams\">Is Active</th>'\n . '<th title=\"Has contrast\">C</th>'\n . '<th title=\"Has sedation\">S</th>'\n . '<th title=\"Has radioisotope\">R</th>'\n . '<th title=\"The equipment context for this protocol\">Modality</th>'\n . '<th title=\"Value increases with each saved edit\">Version</th>'\n . '<th title=\"The scanned document\">Doc Uploaded</th>'\n . '<th title=\"Keywords used for matching this protocol programatically\">Keywords</th>'\n . '<th title=\"Just view the protocol\">View</th>'\n . '<th title=\"Edit the protocol details\">Edit</th>'\n . '<th title=\"Remove this protocol from the library\">Delete</th>'\n . '</tr>'\n . '</thead>'\n . '<tbody>'\n . $rows\n . '</tbody>'\n . '</table>');\n \n $form['data_entry_area1']['action_buttons'] = array(\n '#type' => 'item', \n '#prefix' => '<div class=\"raptor-action-buttons\">',\n '#suffix' => '</div>', \n '#tree' => TRUE,\n );\n $form['data_entry_area1']['action_buttons']['createlink'] \n = array('#type' => 'item'\n , '#markup' => '<a class=\"button\" href=\"'\n .$base_url.'/raptor/addprotocollib\">Add Protocol</a>');\n\n $form['data_entry_area1']['action_buttons']['cancel'] = array('#type' => 'item'\n , '#markup' => '<input class=\"raptor-dialog-cancel\" type=\"button\" value=\"Exit\" />'); \n \n \n return $form;\n }", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\t\t// detail_jenis_spp\n\t\t// id_jenis_spp\n\t\t// status_spp\n\t\t// no_spp\n\t\t// tgl_spp\n\t\t// keterangan\n\t\t// jumlah_up\n\t\t// bendahara\n\t\t// nama_pptk\n\t\t// nip_pptk\n\t\t// kode_program\n\t\t// kode_kegiatan\n\t\t// kode_sub_kegiatan\n\t\t// tahun_anggaran\n\t\t// jumlah_spd\n\t\t// nomer_dasar_spd\n\t\t// tanggal_spd\n\t\t// id_spd\n\t\t// kode_rekening\n\t\t// nama_bendahara\n\t\t// nip_bendahara\n\t\t// no_spm\n\t\t// tgl_spm\n\t\t// status_spm\n\t\t// nama_bank\n\t\t// nomer_rekening_bank\n\t\t// npwp\n\t\t// pimpinan_blud\n\t\t// nip_pimpinan\n\t\t// no_sptb\n\t\t// tgl_sptb\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// id\n\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// detail_jenis_spp\n\t\tif (strval($this->detail_jenis_spp->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->detail_jenis_spp->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `detail_jenis_spp` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_jenis_detail_spp`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->detail_jenis_spp->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->detail_jenis_spp, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->detail_jenis_spp->ViewValue = $this->detail_jenis_spp->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->detail_jenis_spp->ViewValue = $this->detail_jenis_spp->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->detail_jenis_spp->ViewValue = NULL;\n\t\t}\n\t\t$this->detail_jenis_spp->ViewCustomAttributes = \"\";\n\n\t\t// id_jenis_spp\n\t\t$this->id_jenis_spp->ViewValue = $this->id_jenis_spp->CurrentValue;\n\t\t$this->id_jenis_spp->ViewCustomAttributes = \"\";\n\n\t\t// status_spp\n\t\tif (strval($this->status_spp->CurrentValue) <> \"\") {\n\t\t\t$this->status_spp->ViewValue = $this->status_spp->OptionCaption($this->status_spp->CurrentValue);\n\t\t} else {\n\t\t\t$this->status_spp->ViewValue = NULL;\n\t\t}\n\t\t$this->status_spp->ViewCustomAttributes = \"\";\n\n\t\t// no_spp\n\t\t$this->no_spp->ViewValue = $this->no_spp->CurrentValue;\n\t\t$this->no_spp->ViewCustomAttributes = \"\";\n\n\t\t// tgl_spp\n\t\t$this->tgl_spp->ViewValue = $this->tgl_spp->CurrentValue;\n\t\t$this->tgl_spp->ViewValue = ew_FormatDateTime($this->tgl_spp->ViewValue, 0);\n\t\t$this->tgl_spp->ViewCustomAttributes = \"\";\n\n\t\t// keterangan\n\t\t$this->keterangan->ViewValue = $this->keterangan->CurrentValue;\n\t\t$this->keterangan->ViewCustomAttributes = \"\";\n\n\t\t// jumlah_up\n\t\t$this->jumlah_up->ViewValue = $this->jumlah_up->CurrentValue;\n\t\t$this->jumlah_up->ViewCustomAttributes = \"\";\n\n\t\t// bendahara\n\t\t$this->bendahara->ViewValue = $this->bendahara->CurrentValue;\n\t\t$this->bendahara->ViewCustomAttributes = \"\";\n\n\t\t// nama_pptk\n\t\t$this->nama_pptk->ViewValue = $this->nama_pptk->CurrentValue;\n\t\t$this->nama_pptk->ViewCustomAttributes = \"\";\n\n\t\t// nip_pptk\n\t\t$this->nip_pptk->ViewValue = $this->nip_pptk->CurrentValue;\n\t\t$this->nip_pptk->ViewCustomAttributes = \"\";\n\n\t\t// kode_program\n\t\t$this->kode_program->ViewValue = $this->kode_program->CurrentValue;\n\t\t$this->kode_program->ViewCustomAttributes = \"\";\n\n\t\t// kode_kegiatan\n\t\t$this->kode_kegiatan->ViewValue = $this->kode_kegiatan->CurrentValue;\n\t\t$this->kode_kegiatan->ViewCustomAttributes = \"\";\n\n\t\t// kode_sub_kegiatan\n\t\t$this->kode_sub_kegiatan->ViewValue = $this->kode_sub_kegiatan->CurrentValue;\n\t\t$this->kode_sub_kegiatan->ViewCustomAttributes = \"\";\n\n\t\t// tahun_anggaran\n\t\t$this->tahun_anggaran->ViewValue = $this->tahun_anggaran->CurrentValue;\n\t\t$this->tahun_anggaran->ViewCustomAttributes = \"\";\n\n\t\t// jumlah_spd\n\t\t$this->jumlah_spd->ViewValue = $this->jumlah_spd->CurrentValue;\n\t\t$this->jumlah_spd->ViewCustomAttributes = \"\";\n\n\t\t// nomer_dasar_spd\n\t\t$this->nomer_dasar_spd->ViewValue = $this->nomer_dasar_spd->CurrentValue;\n\t\t$this->nomer_dasar_spd->ViewCustomAttributes = \"\";\n\n\t\t// tanggal_spd\n\t\t$this->tanggal_spd->ViewValue = $this->tanggal_spd->CurrentValue;\n\t\t$this->tanggal_spd->ViewValue = ew_FormatDateTime($this->tanggal_spd->ViewValue, 0);\n\t\t$this->tanggal_spd->ViewCustomAttributes = \"\";\n\n\t\t// id_spd\n\t\t$this->id_spd->ViewValue = $this->id_spd->CurrentValue;\n\t\t$this->id_spd->ViewCustomAttributes = \"\";\n\n\t\t// kode_rekening\n\t\t$this->kode_rekening->ViewValue = $this->kode_rekening->CurrentValue;\n\t\t$this->kode_rekening->ViewCustomAttributes = \"\";\n\n\t\t// nama_bendahara\n\t\t$this->nama_bendahara->ViewValue = $this->nama_bendahara->CurrentValue;\n\t\t$this->nama_bendahara->ViewCustomAttributes = \"\";\n\n\t\t// nip_bendahara\n\t\t$this->nip_bendahara->ViewValue = $this->nip_bendahara->CurrentValue;\n\t\t$this->nip_bendahara->ViewCustomAttributes = \"\";\n\n\t\t// no_spm\n\t\t$this->no_spm->ViewValue = $this->no_spm->CurrentValue;\n\t\t$this->no_spm->ViewCustomAttributes = \"\";\n\n\t\t// tgl_spm\n\t\t$this->tgl_spm->ViewValue = $this->tgl_spm->CurrentValue;\n\t\t$this->tgl_spm->ViewValue = ew_FormatDateTime($this->tgl_spm->ViewValue, 7);\n\t\t$this->tgl_spm->ViewCustomAttributes = \"\";\n\n\t\t// status_spm\n\t\tif (strval($this->status_spm->CurrentValue) <> \"\") {\n\t\t\t$this->status_spm->ViewValue = $this->status_spm->OptionCaption($this->status_spm->CurrentValue);\n\t\t} else {\n\t\t\t$this->status_spm->ViewValue = NULL;\n\t\t}\n\t\t$this->status_spm->ViewCustomAttributes = \"\";\n\n\t\t// nama_bank\n\t\tif (strval($this->nama_bank->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`rekening`\" . ew_SearchString(\"=\", $this->nama_bank->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `rekening`, `rekening` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_blud_rs`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->nama_bank->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->nama_bank, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->nama_bank->ViewValue = $this->nama_bank->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->nama_bank->ViewValue = $this->nama_bank->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->nama_bank->ViewValue = NULL;\n\t\t}\n\t\t$this->nama_bank->ViewCustomAttributes = \"\";\n\n\t\t// nomer_rekening_bank\n\t\t$this->nomer_rekening_bank->ViewValue = $this->nomer_rekening_bank->CurrentValue;\n\t\t$this->nomer_rekening_bank->ViewCustomAttributes = \"\";\n\n\t\t// npwp\n\t\t$this->npwp->ViewValue = $this->npwp->CurrentValue;\n\t\t$this->npwp->ViewCustomAttributes = \"\";\n\n\t\t// pimpinan_blud\n\t\t$this->pimpinan_blud->ViewValue = $this->pimpinan_blud->CurrentValue;\n\t\t$this->pimpinan_blud->ViewCustomAttributes = \"\";\n\n\t\t// nip_pimpinan\n\t\t$this->nip_pimpinan->ViewValue = $this->nip_pimpinan->CurrentValue;\n\t\t$this->nip_pimpinan->ViewCustomAttributes = \"\";\n\n\t\t// no_sptb\n\t\t$this->no_sptb->ViewValue = $this->no_sptb->CurrentValue;\n\t\t$this->no_sptb->ViewCustomAttributes = \"\";\n\n\t\t// tgl_sptb\n\t\t$this->tgl_sptb->ViewValue = $this->tgl_sptb->CurrentValue;\n\t\t$this->tgl_sptb->ViewValue = ew_FormatDateTime($this->tgl_sptb->ViewValue, 7);\n\t\t$this->tgl_sptb->ViewCustomAttributes = \"\";\n\n\t\t\t// id\n\t\t\t$this->id->LinkCustomAttributes = \"\";\n\t\t\t$this->id->HrefValue = \"\";\n\t\t\t$this->id->TooltipValue = \"\";\n\n\t\t\t// detail_jenis_spp\n\t\t\t$this->detail_jenis_spp->LinkCustomAttributes = \"\";\n\t\t\t$this->detail_jenis_spp->HrefValue = \"\";\n\t\t\t$this->detail_jenis_spp->TooltipValue = \"\";\n\n\t\t\t// no_spp\n\t\t\t$this->no_spp->LinkCustomAttributes = \"\";\n\t\t\t$this->no_spp->HrefValue = \"\";\n\t\t\t$this->no_spp->TooltipValue = \"\";\n\n\t\t\t// tgl_spp\n\t\t\t$this->tgl_spp->LinkCustomAttributes = \"\";\n\t\t\t$this->tgl_spp->HrefValue = \"\";\n\t\t\t$this->tgl_spp->TooltipValue = \"\";\n\n\t\t\t// keterangan\n\t\t\t$this->keterangan->LinkCustomAttributes = \"\";\n\t\t\t$this->keterangan->HrefValue = \"\";\n\t\t\t$this->keterangan->TooltipValue = \"\";\n\n\t\t\t// no_spm\n\t\t\t$this->no_spm->LinkCustomAttributes = \"\";\n\t\t\t$this->no_spm->HrefValue = \"\";\n\t\t\t$this->no_spm->TooltipValue = \"\";\n\n\t\t\t// tgl_spm\n\t\t\t$this->tgl_spm->LinkCustomAttributes = \"\";\n\t\t\t$this->tgl_spm->HrefValue = \"\";\n\t\t\t$this->tgl_spm->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "public function generate_fields( $post ) {\n\t\t$datos = get_post_meta($post->ID, $this->idMetaBox, true);\n\t\twp_nonce_field( 'repeatable_meta_box_nonce-'.$this->idMetaBox, 'repeatable_meta_box_nonce-'.$this->idMetaBox );\n\t\t?>\n\t\t<table id=\"repeatable-fieldset-one_<?=$this->idMetaBox?>\" width=\"100%\">\n\t\t<?php\n\t\t$i = 0;\n\t\t//rellenamos con los datos que tenemos guardados\n\t\tif(!empty($datos)){\n\t\t\tforeach($datos as $dato){\t\n\t\t\t\t$output = '<tr>';\n\t\t\t\t$output .= '<td>\n\t\t\t\t\t\t<span class=\"sort hndle\" style=\"float:left;\">\n\t\t\t\t\t\t\t<img src=\"'.get_template_directory_uri().'/img/move.png\" />&nbsp;&nbsp;&nbsp;</span>\n\t\t\t\t\t\t\t<a class=\"button remove-row_'.$this->idMetaBox.'\" href=\"#\">-</a>\n\t\t\t\t\t</td>';\n\t\t\t\tforeach($this->fields as $field){\t\t\t\t\n\t\t\t\t\tswitch ( $field['type'] ) {\n\t\t\t\t\t\tcase 'media':\n\t\t\t\t\t\t\t$output .= sprintf(\n\t\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t\t<input class=\"regular-text\" id=\"%s'.$i.'\" name=\"%s[]\" type=\"text\" value=\"%s\">\n\t\t\t\t\t\t\t\t\t<input class=\"button rational-metabox-media\" id=\"%s'.$i.'_button\" name=\"%s_button\" type=\"button\" value=\"Upload\" />\n\t\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t\t$dato[$field['id']],\n\t\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t\t$field['id']\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$output .= sprintf(\n\t\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t\t<input %s id=\"%s'.$i.'\" name=\"%s[]\" type=\"%s\" value=\"%s\">\n\t\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t\t$field['type'] !== 'color' ? 'class=\"regular-text\"' : '',\n\t\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\t\t\t$dato[$field['id']]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t\t$i++;\t\t\n\t\t\t\t$output .= '</tr>';\t\t\t\n\t\t\t\techo $output;\n\t\t\t}\n\t\t\t\n\t\t//si no tenemos datos mostramos los campos vacios\n\t\t}else{\n\t\t\t\n\t\t\t$input = '<tr>';\n\t\t\t$input = '<td>\n\t\t\t\t\t\t<span class=\"sort hndle\" style=\"float:left;\">\n\t\t\t\t\t\t\t<img src=\"'.get_template_directory_uri().'/img/move.png\" />&nbsp;&nbsp;&nbsp;</span>\n\t\t\t\t\t\t\t<a class=\"button remove-row_'.$this->idMetaBox.'\" href=\"#\">-</a>\n\t\t\t\t\t</td>';\n\t\t\tforeach($this->fields as $field){\t\t\t\t\n\t\t\t\tswitch ( $field['type'] ) {\n\t\t\t\t\tcase 'media':\n\t\t\t\t\t\t$input .= sprintf(\n\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t<input class=\"regular-text\" id=\"%s'.$i.'\" name=\"%s[]\" type=\"text\" value=\"\">\n\t\t\t\t\t\t\t\t<input class=\"button rational-metabox-media\" id=\"%s'.$i.'_button\" name=\"%s_button\" type=\"button\" value=\"Upload\" />\n\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id']\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$input .= sprintf(\n\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t<input %s id=\"%s'.$i.'\" name=\"%s[]\" type=\"%s\" value=\"\">\n\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t$field['type'] !== 'color' ? 'class=\"regular-text\"' : '',\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['type']\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t$input .= '</tr>';\t\t\t\n\t\t\techo $input;\t\n\t\t\t$i++;\t\n\t\t}\n\t\t?>\n\t\t<tr class=\"empty-row screen-reader-text <?=$this->idMetaBox?>\" data-id=\"<?=$i?>\">\n\t\t<?php\n\t\t\t$input = '<td>\n\t\t\t\t\t\t<span class=\"sort hndle\" style=\"float:left;\">\n\t\t\t\t\t\t\t<img src=\"'.get_template_directory_uri().'/img/move.png\" />&nbsp;&nbsp;&nbsp;</span>\n\t\t\t\t\t\t\t<a class=\"button remove-row_'.$this->idMetaBox.'\" href=\"#\">-</a>\n\t\t\t\t\t</td>';\n\t\t\tforeach($this->fields as $field){\n\t\t\t\tswitch ( $field['type'] ) {\n\t\t\t\t\tcase 'media':\n\t\t\t\t\t\t$input .= sprintf(\n\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t<input class=\"regular-text\" id=\"%s\" name=\"%s[]\" type=\"text\" value=\"\">\n\t\t\t\t\t\t\t\t<input class=\"button rational-metabox-media\" id=\"%s_button\" name=\"%s_button\" type=\"button\" value=\"Upload\" />\n\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id']\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$input .= sprintf(\n\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t<input %s id=\"%s\" name=\"%s[]\" type=\"%s\" value=\"\">\n\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t$field['type'] !== 'color' ? 'class=\"regular-text\"' : '',\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['type']\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\techo $input;\n\t\t?>\n\t\t</tr>\n\t\t</table>\n\t\t<p><a id=\"add-row_<?=$this->idMetaBox?>\" class=\"button\" href=\"#\">+</a></p>\n\t\t<?php\n\t}", "public function AgregarRegistro()\r\n {\r\n \r\n\t\r\n$tbl = <<<EOD\r\n\r\n<div id=\"jQueryDialog2\" style=\"\" title=\"Digita los campos\">\r\n<div id=\"wb_Form1\" style=\"position:absolute;left:16px;top:14px;z-index:3;\">\r\n<form name=\"FormBorrarItem\" method=\"post\" action=\"EditInv.php\" enctype=\"multipart/form-data\" target=\"_self\" id=\"Form1\">\r\n\r\nEOD;\r\n\r\nprint($tbl);\t\r\n\r\n\r\nfor($i=1; $i<$this->NumCols; $i++)\r\n\t\tprint('<input type=\"text\" style=\"width:243px;height:50px;line-height:70px;\" name=\"'.$this->NombreCol[$i].'\" value=\"\" placeholder=\"'.$this->NombreCol[$i].'\"> ');\r\n\t\t\r\n$tbl = <<<EOD\r\n\t\r\n\r\n<div id=\"Html1\" style=\"\">\r\n<input type=\"image\" src=\"iconos/aceptar1.png\" name=\"AgregarItem\" value=\"$this->tabla\"></div>\r\n</form>\r\n</div>\r\n</div>\t\r\n<div id=\"wb_Form2\" style=\"position:absolute;left:115px;top:6px;width:348px;height:178px;z-index:11;\">\r\n<form name=\"BorrarItem\" method=\"post\" action=\"EditInv.php\" enctype=\"multipart/form-data\" target=\"_self\" id=\"Form2\">\r\n<button id=\"AdvancedButton1\" type=\"submit\" name=\"cancelar\" value=\"$this->tabla;$idItem\" style=\"position:absolute;left:40px;top:56px;width:108px;height:108px;z-index:4;\">\r\n<div style=\"text-align:center\"></div>\r\n</button>\r\n\r\n<div id=\"wb_Text8\" style=\"position:absolute;left:56px;top:9px;width:253px;height:16px;z-index:6;text-align:center;\">\r\n<span style=\"color:#0000FF;font-family:'Bookman Old Style';font-size:13px;\"><strong><em>Vas a agregar un nuevo registro a la tabla $this->tabla</em></strong></span></div>\r\n\r\n</form>\r\n</div>\r\n\r\nEOD;\r\n\r\nprint($tbl);\t\r\n\t\r\n\t}", "function getForm($form, &$form_state, $disabled, $myvalues)\n {\n $form[\"data_entry_area1\"] = array(\n '#prefix' => \"\\n<section class='protocollib-admin raptor-dialog-table'>\\n\",\n '#suffix' => \"\\n</section>\\n\",\n );\n $form[\"data_entry_area1\"]['table_container'] = array(\n '#type' => 'item', \n '#prefix' => '<div class=\"raptor-dialog-table-container\">',\n '#suffix' => '</div>', \n '#tree' => TRUE,\n );\n\n \n $oDD = new \\raptor\\DashboardData($this->m_oContext);\n $oPSD = new \\raptor\\ProtocolSupportingData($this->m_oContext);\n $radiology_reports_detail = $oPSD->getRadiologyReportsDetail();\n $raptor_protocoldashboard = $oDD->getDashboardDetails();\n \n $patientDFN=$raptor_protocoldashboard['PatientID'];\n $patientICN=$raptor_protocoldashboard['mpiPid'];\n \n $rows = '';\n foreach($radiology_reports_detail as $data_row) \n {\n $reportID=$data_row['ReportID'];\n $caseNumber=$data_row['CaseNumber']; \n $rows .= \"\\n\".'<tr>'\n . '<td>'.$data_row[\"Title\"].'</td>'\n . '<td>'.$data_row[\"ReportedDate\"].'</td>'\n . '<td><a href=\"#\" class=\"raptor-details\">'.$data_row[\"Snippet\"].'</a>'.GetRadiologyReportsTab::raptor_print_details($data_row[\"Details\"]).'</td>'\n . '<td>'.GetRadiologyReportsTab::getImageInfoAsHTML($this->m_oContext, $patientDFN, $patientICN, $reportID, $caseNumber).'</td>'\n . '</tr>';\n }\n \n $form[\"data_entry_area1\"]['table_container']['reports'] = array('#type' => 'item',\n '#markup' => '<table id=\"my-raptor-dialog-table\" class=\"dataTable\">'\n . '<thead>'\n . '<tr>'\n . '<th>Title</th>'\n . '<th>Date</th>'\n . '<th>Details</th>'\n . '<th>Existing Images</th>'\n . '</tr>'\n . '</thead>'\n . '<tbody>'\n . $rows\n . '</tbody>'\n . '</table>');\n \n return $form;\n }", "private static function do_html_form_create($fields, $table){\n global $dbname;\n global $app_dir;\n $filename = Inflect::singularize($table);\n $form_str = '@extends(\\'layouts.bulma\\')'.\"\\n\";\n $form_str .= '@section(\\'title\\', \\'creating new '.Inflect::singularize($table).'\\')'.\"\\n\";\n $form_str .= '@section(\\'sidebar\\')'.\"\\n\";\n $form_str .= '@parent'.\"\\n\";\n $form_str .= '@endsection'.\"\\n\";\n $form_str .= '@section(\\'content\\')'.\"\\n\";\n $form_str .= '<form action=\"{{ route(\\''.$table.'.create\\') }}\" class=\"form container\" method=\"POST\" enctype=\"multipart/form-data\">';\n $form_str .= \"\\n\".' <h1 class=\"title is-3\">ADD '.strtoupper(str_replace(\"_\",\" \",Inflect::singularize($table))).'</h1>'.\"\\n\";\n foreach($fields as $field){\n $req = false;\n if(strpos($field[\"Type\"], \"int\")>-1 && $field[\"Key\"]!==\"MUL\"){\n if($field[\"Null\"]===\"NO\") $req = true;\n $form_str .= \" \".self::getInputField($field[\"Field\"], \"number\", $table, $req);\n }else if($field[\"Key\"] === \"MUL\"){\n $form_str .= \" \".self::getSelectField($field[\"Field\"], $table);\n }else if(strpos($field[\"Type\"], \"varchar\")>-1){\n if($field[\"Null\"]===\"NO\") $req = true;\n $form_str .= \" \".self::getInputField($field[\"Field\"], \"text\", $table, $req);\n }else if(strpos($field[\"Type\"], \"text\")>-1){\n $form_str .= \" \".self::getTextarea($field[\"Field\"], $table);\n }\n }\n $form_str .= self::getButtonGrp();\n $form_str .= \"</form>\\n@endsection\";\n $file_dir = $app_dir.\"/resources/views/$table\";\n $views_file = $app_dir.\"/resources/views/$table/create.blade.php\";\n if(is_readable($views_file)){\n file_put_contents($views_file, $form_str);\n }else{\n exec(\"mkdir $file_dir\");\n exec(\"chmod -R 755 $app_dir./resources/views/\");\n $fp = fopen($views_file,\"w+\");\n fwrite($fp, \"file created\", 128);\n fclose($fp);\n file_put_contents($views_file, $form_str);\n }\n }", "protected abstract function generateParagraphTypeBaseFields(Row $row);", "function ds_extras_vd_bundle_form($form, $form_state, $rows) {\n\n $options = array();\n $views = views_get_all_views();\n foreach ($views as $view_key => $view) {\n\n // Ignore disabled views.\n if (isset($view->disabled) && $view->disabled) {\n continue;\n }\n\n $get_view = views_get_view($view->name);\n\n // Loop through all displays.\n foreach ($view->display as $display_key => $display) {\n // Ignore default displays.\n if ($display_key == 'default') {\n continue;\n }\n\n $key = $view_key . '-' . $display_key;\n $name = drupal_ucfirst($view->name) . ': ' . $display->display_title;\n if (!isset($rows[$key])) {\n $options[$key] = $name . ' (Views template)';\n }\n $get_view->set_display($display_key);\n if ($get_view->display_handler->uses_fields() && !isset($rows[$key . '-fields'])) {\n $options[$key . '-fields'] = $name . ' (Fields)';\n }\n }\n }\n\n $form['vd'] = array(\n '#title' => t('Select view'),\n '#description' => t('Select a View that you want to manage with Display Suite. If a View uses fields you can also select that view to select a layout and position the fields. Note that html for the label and field are limited.'),\n '#type' => 'select',\n '#options' => $options,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Add'),\n );\n\n return $form;\n}", "function display_rows() {\n \n //Get the records registered in the prepare_items method\n $records = $this->items;\n \n //Get the columns registered in the get_columns and get_sortable_columns methods\n list( $columns, $hidden ) = $this->get_column_info();\n \n //Loop for each record\n if(!empty($records)){foreach($records as $rec){\n \n // Format the status output\n if ( strtotime($rec->until) <= 0 ) {\n $rec->until = false;\n } else {\n //$rec->until = __('Membership ended','wpwt').\": \".strftime('%Y-%m-%d',strtotime($rec->until));\n $rec->until = '&nbsp;|&nbsp;Active until '.strftime('%Y-%m-%d',strtotime($rec->until));\n }\n $rec->since = __('Applied','wpwt').\": \".strftime('%Y-%m-%d',strtotime($rec->since));\n \n // Pre-define the edit link\n //$editlink = '/wp-admin/link.php?action=edit&link_id='.(int)$rec->link_id;\n\n //Open the line\n echo \"<tr id=\\\"record_\".$rec->groupID.\"\\\" class=\\\"row-active-\".$rec->active.\"\\\">\\n\";\n foreach ( $columns as $column_name => $column_display_name ) {\n \n //Style attributes for each col\n $class = \"class='$column_name column-$column_name'\";\n \n // Create output in cell\n switch ( $column_name ) {\n case \"col_what\": echo \"<td \".$class.\">\".$this->show_what($rec).\"</td>\\n\"; break;\n case \"col_user\": echo \"<td \".$class.\">\".$this->add_actions($rec).\"</td>\\n\"; break;\n case \"col_groupName\": echo \"<td \".$class.\">\".$rec->groupName.\"</td>\\n\"; break;\n case \"col_application\": echo \"<td \".$class.\">\".$rec->application\n .\"<br><b>\".$rec->since.\"</b></td>\\n\"; break;\n }\n }\n \n //Close the line\n echo \"</tr>\\n\";\n }}\n }", "function renderTableRows($headers, $rows, $rowType= 2)\r\n{\r\n\tglobal $isArchive;\r\n\r\n\t$tr= '';\r\n\tif (!count($rows))// In case there is no registered row at all\r\n\t{\r\n\t\t$rows= array($headers);\r\n\t\tif ($rowType== 2) return '';\r\n\t}\r\n\tif ($rowType== 3) $rows= array($rows[0]);// Keep only one row to get the template for the last hidden empty row (used for js clone())\r\n\tforeach ($rows as $numRow => $row)\r\n\t{\r\n\t\t$td= '';\r\n\t\t$profit= 0;// Percentage\r\n\t\t$devtu= 0;// Theoretical\r\n\t\t$devtu_f= 0;// Final\r\n\t\t$completion= 0;\r\n\r\n\t\tforeach ($row as $cellNum => $cell)\r\n\t\t{\r\n $tdClass= isset($headers[$cellNum]->class)? $headers[$cellNum]->class : '';\r\n\r\n $cell= $rowType== 3? '' : $cell;\r\n $width= isset($headers[$cellNum]->width)? ' style=\"width:'.$headers[$cellNum]->width.'\"' : '';\r\n\r\n $td.= \"<td class=\\\"{$headers[$cellNum]->type} $tdClass\\\" $width><div>\";\r\n\r\n\t\t\tif ($tdClass== 'tasks') $td.= renderTaskCell($cell);\r\n\t\t\telse switch ($headers[$cellNum]->type)\r\n\t\t\t{\r\n\t\t\t\tcase 'text':\r\n\t\t\t\t\t$td.= '<input type=\"text\" value=\"'.$cell.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'range':\r\n\t\t\t\t\t$val= $rowType== 3? '' : (int)$cell;\r\n\t\t\t\t\t$text= $rowType== 3? '-' : $cell;\r\n\t\t\t\t\t$td.= '<input type=\"range\" value=\"'.$val.'\" min=\"'.$headers[$cellNum]->range->min.'\" max=\"'.$headers[$cellNum]->range->max.'\" step=\"'.$headers[$cellNum]->range->step.'\"/><span>'.$text.'</span>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\t$td.= '<input type=\"number\" min=\"'.$headers[$cellNum]->number->min.'\" value=\"'.$cell.'\" step=\"'.$headers[$cellNum]->number->step.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'date':\r\n\t\t\t\t\t$cell= !$cell && $headers[$cellNum]->default== 'today'? date('Y-m-d') : $cell;\r\n\t\t\t\t\t$td.= '<input type=\"date\" value=\"'.$cell.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'textarea':\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$td.= \"<textarea>$cell</textarea>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'select':\r\n\t\t\t\t\t$options= $headers[$cellNum]->select->options;\r\n\t\t\t\t\t$select= '';\r\n\t\t\t\t\tforeach ($options as $val => $opt)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$select.= '<option value=\"'.$val.'\"'.($cell==$val? ' selected=\"selected\"' : '').'>'.$opt.'</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$td.= \"<select>$select</select>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$td.= '</div></td>';\r\n\r\n\t\t\tif ($tdClass== 'devtu') $devtu= floatval($cell);\r\n\t\t\tif ($tdClass== 'devtu_f') $devtu_f= floatval($cell);\r\n\t\t\telseif ($tdClass== 'completion') $completion= intval($cell);\r\n\r\n\t\t}\r\n\r\n\t\tif ($completion== 100 && $devtu && $devtu_f) $profit= round((1-$devtu_f/$devtu)*100);\r\n\r\n\t\t$tr.= \"<tr>\r\n\t\t\t\t\t<td style=\\\"width:10px\\\" class=\\\"noContent handle\".($profit? ' profit i-tag' : '').\"\\\" data-profit=\\\"\".($profit> 0 ? '+'.$profit : $profit).\"%\\\">\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<span class=\\\"handle\\\"></span>\r\n\t\t\t\t\t\t\t<input type=\\\"checkbox\\\" class=\\\"toggle\\\"/>\r\n\t\t\t\t\t\t\t<label class=\\\"i-minus\\\" title=\\\"Mask\\\"></label>\r\n\t\t\t\t\t\t\t<button class=\\\"archive i-\".($isArchive? 'unarchive' : 'archive').\"\\\" title=\\\"\".($isArchive? 'Unarchive' : 'Archive').\"\\\"/></button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t$td\r\n\t\t\t\t</tr>\";\r\n\t}\r\n\tif ($rowType== 3) $tr.= \"<tr class=\\\"hidden\\\">\r\n\t\t\t\t\t\t\t\t<td style=\\\"width:10px\\\" class=\\\"noContent handle\\\">\r\n\t\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\\\"handle\\\"></span>\r\n\t\t\t\t\t\t\t\t\t\t<input type=\\\"checkbox\\\" class=\\\"toggle\\\"/>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\\\"i-minus\\\" title=\\\"Mask\\\"></label>\r\n\t\t\t\t\t\t\t\t\t\t<button class=\\\"archive i-\".($isArchive? 'unarchive' : 'archive').\"\\\" title=\\\"\".($isArchive? 'Unarchive' : 'Archive').\"\\\"></button>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t$td\r\n\t\t\t\t\t\t\t</tr>\";\r\n\treturn $tr;\r\n}", "function echoCreate($spec, $extra_data=[]) {\n\techo('<form class=\"tr\" method=\"POST\">');\n\tforeach($extra_data as $key => $value) {\n\t\techo('<input name=\"' . htmlspecialchars($key) . '\" type=\"hidden\" value=\"' . htmlspecialchars($value) . '\"></input>');\n\t}\n\tforeach($spec as $col) {\n\t\techo('<div class=\"td\"><input name=\"' . htmlspecialchars($col) . '\"></input></div>');\n\t}\n\techo('<div class=\"td\"><input type=\"submit\" name=\"action\" value=\"create\"></input></div>');\n\techo('</form>');\n}", "protected function _getRowTemplateHtml( $rowIndex = 0 ) {\n\t\t$html = '<li>';\n\t\t$html .= '<div style=\"border:1px solid #D6D6D6;padding: 10px 7px 32px;\">';\n\t\t$html .= '<div style=\"width:25%;float:left;text-align: center;\">';\n\t\t$html .= '<select style=\"width:220px;\" name=\"' . $this->getElement()\n\t\t ->getName() . '[method][]\" ' . $this->_getDisabled() . '>';\n\t\tforeach ($this->_getPaymentMethods() as $code => $label){\n\t\t\t$html .= '<option value=\"'.$code. '\" '\n\t\t\t . $this->_getSelected( 'method/' . $rowIndex, $code )\n\t\t\t . '>'.$label. '</option>';\n\t\t}\n\n\t\t$html .= '</select>';\n\t\t$html .= '</div>';\n\t\t$html .= '<div style=\"width:25%; float:left;text-align: center;\">';\n\t\t$html .= '<select style=\"width:100px;\" name=\"' . $this->getElement()\n\t\t ->getName() . '[type][]\" ' . $this->_getDisabled() . '>';\n\t\tforeach ($this->_getTypeOptions() as $code => $label){\n\t\t\t$html .= '<option value=\"'.$code. '\" '\n\t\t\t . $this->_getSelected( 'type/' . $rowIndex, $code )\n\t\t\t . '>'.$label. '</option>';\n\t\t}\n\n\t\t$html .= '</select>';\n\t\t$html .= '</div>';\n\t\t$html .= '<div style=\"width:25%;float:left;text-align: center;\">';\n\t\t$html .= '<input class=\"input-text\" style=\"width:120px;\" name=\"'\n\t\t . $this->getElement()->getName() . '[price][]\" value=\"'\n\t\t . $this->_getValue( 'price/' . $rowIndex ) . '\" ' . $this->_getDisabled() . '/> ';\n\t\t$html .= '</div>';\n\t\t$html .= $this->_getRemoveRowButtonHtml();\n\t\t$html .= '</div>';\n\t\t$html .= '</li>';\n\n\t\treturn $html;\n\t}", "protected function controlleradd_ins_buildinsertfields(&$arLines,$addToTranslation=1)\n {\n $arLines[] = \"\\t\\t\\$arFields = array(); \\$oAuxField = NULL; \\$oAuxLabel = NULL;\";\n //$arLines[] = \"\\t\\t\\$$this->sModelObjectName = new $this->sModelClassName();\";\n $arLines[] = \"\\t\\t\\$arFields[]= new AppHelperFormhead($this->sTranslatePrefix\".\"entity_new);\"; \n foreach($this->arFields as $sFieldName)\n {\n if(!in_array($sFieldName,$this->arNotInsert))\n { \n $sComment = \"\";\n if($this->do_comment($sFieldName)) $sComment=\"//\";\n \n $isIdForeign = $this->is_foreignkey($sFieldName);\n $sFieldType = $this->get_field_type($sFieldName);\n \n $sLabel = $this->sTranslatePrefix.\"ins_\".$this->get_translation_label($sFieldName);\n if($addToTranslation) $this->arTranslation[] = $sLabel; \n $sCamelName = sep_to_camel($sFieldName);\n $arLines[] = \"\\t\\t//$sFieldName\";\n \n if($isIdForeign)\n { \n $sObjectName = $this->fieldname_to_objectname($sFieldName);\n $sModelName = $this->fieldname_to_modelname($sFieldName);\n $arLines[] = \"\\t\\t$sComment\\$$sObjectName = new $sModelName();\";\n if(!$this->is_foreignkey_array($sFieldName))\n $arLines[] = \"\\t\\t$sComment\\$arOptions = \\$$sObjectName\".\"->get_picklist();\";\n else \n {\n $sType = str_replace(\"id_type_\",\"\",$sFieldName);\n $arLines[] = \"\\t\\t$sComment\\$arOptions = \\$$sObjectName\".\"->get_picklist_by_type(\\\"$sType\\\");\";\n }\n $arLines[] = \"\\t\\t$sComment\\$oAuxField = new HelperSelect(\\$arOptions,\\\"sel$sCamelName\\\",\\\"sel$sCamelName\\\");\";\n $arLines[] = \"\\t\\t$sComment\\$oAuxField->set_value_to_select(\\$this->get_post(\\\"sel$sCamelName\\\"));\";\n $arLines[] = \"\\t\\t$sComment\\$oAuxWrapper = new ApphelperControlGroup(\\$oAuxField,new HelperLabel(\\\"sel$sCamelName\\\",$sLabel));\";\n }\n elseif($this->is_primarykey($sFieldName))\n { \n $arLines[] = \"\\t\\t//\\$oAuxField = new HelperInputText(\\\"txt$sCamelName\\\",\\\"txt$sCamelName\\\");\";\n } \n else\n { \n $arLines[] = \"\\t\\t$sComment\\$oAuxField = new HelperInputText(\\\"txt$sCamelName\\\",\\\"txt$sCamelName\\\");\";\n }\n \n if($this->is_primarykey($sFieldName))\n $arLines[] = \"\\t\\t//\\$oAuxField->is_primarykey();\"; \n \n if($isIdForeign)\n {\n $arLines[] = \"\\t\\t$sComment\".\"if(\\$usePost) \\$oAuxField->set_value_to_select(\\$this->get_post(\\\"sel$sCamelName\\\"));\";\n $arLines[] = \"\\t\\t$sComment\\$oAuxLabel = new HelperLabel(\\\"sel$sCamelName\\\",$sLabel,\\\"lbl$sCamelName\\\");\";\n }\n elseif($this->is_primarykey($sFieldName))\n {\n $arLines[] = \"\\t\\t//if(\\$usePost) \\$oAuxField->set_value(\\$this->get_post(\\\"txt$sCamelName\\\"));\";\n } \n else \n { \n if($sFieldType==\"int\")\n { \n $arLines[] = \"\\t\\t$sComment\\$oAuxField->set_value(0);\";\n $arLines[] = \"\\t\\t$sComment\".\"if(\\$usePost) \\$oAuxField->set_value(dbbo_int(\\$this->get_post(\\\"txt$sCamelName\\\")));\";\n }\n elseif(in_array($sFieldType,$this->arDecimalTypes))\n { \n $arLines[] = \"\\t\\t$sComment\\$oAuxField->set_value(\\\"0.00\\\");\";\n $arLines[] = \"\\t\\t$sComment\".\"if(\\$usePost) \\$oAuxField->set_value(dbbo_numeric2(\\$this->get_post(\\\"txt$sCamelName\\\")));\";\n }\n else//string\n $arLines[] = \"\\t\\t$sComment\".\"if(\\$usePost) \\$oAuxField->set_value(\\$this->get_post(\\\"txt$sCamelName\\\"));\";\n \n $arLines[] = \"\\t\\t$sComment\\$oAuxLabel = new HelperLabel(\\\"txt$sCamelName\\\",$sLabel,\\\"lbl$sCamelName\\\");\";\n }\n $arLines[] = \"\\t\\t//\\$oAuxField->readonly();\\$oAuxField->add_class(\\\"readonly\\\");\";\n //$arLines[] = \"\\t\\t\\$oAuxLabel->add_class(\\\"labelreq\\\");\"; \n if($this->is_primarykey($sFieldName))\n $arLines[] = \"\\t\\t//\\$arFields[] = new ApphelperControlGroup(\\$oAuxField,\\$oAuxLabel);\";\n else \n $arLines[] = \"\\t\\t$sComment\\$arFields[] = new ApphelperControlGroup(\\$oAuxField,\\$oAuxLabel);\";\n }\n }//foreach arFields\n $this->arTranslation[] = $this->sTranslatePrefix.\"ins_savebutton\";\n $arLines[] = \"\\t\\t//SAVE BUTTON\";\n $arLines[] = \"\\t\\t\\$oAuxField = new HelperButtonBasic(\\\"butSave\\\",$this->sTranslatePrefix\".\"ins_savebutton);\";\n $arLines[] = \"\\t\\t\\$oAuxField->add_class(\\\"btn btn-primary\\\");\";\n $arLines[] = \"\\t\\t\\$oAuxField->set_js_onclick(\\\"insert();\\\");\";\n $arLines[] = \"\\t\\t\\$arFields[] = new ApphelperFormactions(array(\\$oAuxField));\";\n $arLines[] = \"\\t\\t//POST INFO\";\n $arLines[] = \"\\t\\t\\$oAuxField = new HelperInputHidden(\\\"hidAction\\\",\\\"hidAction\\\");\";\n $arLines[] = \"\\t\\t\\$arFields[] = \\$oAuxField;\";\n $arLines[] = \"\\t\\t\\$oAuxField = new HelperInputHidden(\\\"hidPostback\\\",\\\"hidPostback\\\");\";\n $arLines[] = \"\\t\\t\\$arFields[] = \\$oAuxField;\"; \n $arLines[] = \"\\t\\treturn \\$arFields;\"; \n }", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\t\t// period_id\n\t\t// person_id\n\t\t// tipejurnal_id\n\t\t// nomer\n\t\t// createon\n\t\t// keterangan\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// id\n\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// period_id\n\t\tif (strval($this->period_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->period_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `start` AS `DispFld`, `end` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `periode`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->period_id->LookupFilters = array(\"df1\" => \"7\", \"df2\" => \"7\");\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->period_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = ew_FormatDateTime($rswrk->fields('DispFld'), 7);\n\t\t\t\t$arwrk[2] = ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7);\n\t\t\t\t$this->period_id->ViewValue = $this->period_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->period_id->ViewValue = $this->period_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->period_id->ViewValue = NULL;\n\t\t}\n\t\t$this->period_id->ViewCustomAttributes = \"\";\n\n\t\t// person_id\n\t\t$this->person_id->ViewValue = $this->person_id->CurrentValue;\n\t\t$this->person_id->ViewCustomAttributes = \"\";\n\n\t\t// tipejurnal_id\n\t\tif (strval($this->tipejurnal_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->tipejurnal_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipejurnal`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipejurnal_id->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipejurnal_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->tipejurnal_id->ViewValue = $this->tipejurnal_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipejurnal_id->ViewValue = $this->tipejurnal_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipejurnal_id->ViewValue = NULL;\n\t\t}\n\t\t$this->tipejurnal_id->ViewCustomAttributes = \"\";\n\n\t\t// nomer\n\t\t$this->nomer->ViewValue = $this->nomer->CurrentValue;\n\t\t$this->nomer->ViewCustomAttributes = \"\";\n\n\t\t// createon\n\t\t$this->createon->ViewValue = $this->createon->CurrentValue;\n\t\t$this->createon->ViewValue = ew_FormatDateTime($this->createon->ViewValue, 7);\n\t\t$this->createon->ViewCustomAttributes = \"\";\n\n\t\t// keterangan\n\t\t$this->keterangan->ViewValue = $this->keterangan->CurrentValue;\n\t\t$this->keterangan->ViewCustomAttributes = \"\";\n\n\t\t\t// tipejurnal_id\n\t\t\t$this->tipejurnal_id->LinkCustomAttributes = \"\";\n\t\t\t$this->tipejurnal_id->HrefValue = \"\";\n\t\t\t$this->tipejurnal_id->TooltipValue = \"\";\n\n\t\t\t// nomer\n\t\t\t$this->nomer->LinkCustomAttributes = \"\";\n\t\t\t$this->nomer->HrefValue = \"\";\n\t\t\t$this->nomer->TooltipValue = \"\";\n\n\t\t\t// createon\n\t\t\t$this->createon->LinkCustomAttributes = \"\";\n\t\t\t$this->createon->HrefValue = \"\";\n\t\t\t$this->createon->TooltipValue = \"\";\n\n\t\t\t// keterangan\n\t\t\t$this->keterangan->LinkCustomAttributes = \"\";\n\t\t\t$this->keterangan->HrefValue = \"\";\n\t\t\t$this->keterangan->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// tipejurnal_id\n\t\t\t$this->tipejurnal_id->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipejurnal_id->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->tipejurnal_id->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->tipejurnal_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `id`, `nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipejurnal`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->tipejurnal_id->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->tipejurnal_id, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->tipejurnal_id->EditValue = $arwrk;\n\n\t\t\t// nomer\n\t\t\t$this->nomer->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nomer->EditCustomAttributes = \"\";\n\t\t\t$this->nomer->EditValue = ew_HtmlEncode($this->nomer->CurrentValue);\n\t\t\t$this->nomer->PlaceHolder = ew_RemoveHtml($this->nomer->FldCaption());\n\n\t\t\t// createon\n\t\t\t$this->createon->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->createon->EditCustomAttributes = \"style='width: 115px;'\";\n\t\t\t$this->createon->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->createon->CurrentValue, 7));\n\t\t\t$this->createon->PlaceHolder = ew_RemoveHtml($this->createon->FldCaption());\n\n\t\t\t// keterangan\n\t\t\t$this->keterangan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->keterangan->EditCustomAttributes = \"\";\n\t\t\t$this->keterangan->EditValue = ew_HtmlEncode($this->keterangan->CurrentValue);\n\t\t\t$this->keterangan->PlaceHolder = ew_RemoveHtml($this->keterangan->FldCaption());\n\n\t\t\t// Add refer script\n\t\t\t// tipejurnal_id\n\n\t\t\t$this->tipejurnal_id->LinkCustomAttributes = \"\";\n\t\t\t$this->tipejurnal_id->HrefValue = \"\";\n\n\t\t\t// nomer\n\t\t\t$this->nomer->LinkCustomAttributes = \"\";\n\t\t\t$this->nomer->HrefValue = \"\";\n\n\t\t\t// createon\n\t\t\t$this->createon->LinkCustomAttributes = \"\";\n\t\t\t$this->createon->HrefValue = \"\";\n\n\t\t\t// keterangan\n\t\t\t$this->keterangan->LinkCustomAttributes = \"\";\n\t\t\t$this->keterangan->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "public function makeAuditLines($rows, $options = array()) {\n $cb = false;\n $addsel = false;\n $cb = (get_arrval($options, 'cb', false)) ? true : false;\n $addsel = (get_arrval($options, 'addsel', false)) ? true : false;\n $rev_level = rev('getLevels', $this->tlist);\n $rev_affil = rev('getAffiliations', $this->tlist);\n $tout = array();\n\n $ct = 0;\n if ($cb) {\n /* $tout[] = <<<\"END\"\n<form method=\"post\" action=\"{$this->baseurl}/output/process\"\n enctype=\"multipart/form-data\" name=\"action\"\n id=\"action\">\nEND;\n*/\n }\n $tout[] = '<table style=\"margin-left:50px;color:black;\">';\n $tout[] = \"<tr class='even'>\";\n\n if ($cb) {\n $tout[] = \"<td style='width:55px;'><center>Select/<br />Deselect<br />All<br /><input type='checkbox' name='allcb' id='allcb'></center></td>\";\n } else {\n $tout[] = \"<td style='width:55px;'></td>\";\n }\n $tout[] = <<<\"END\"\n<td style='width:43px;font-weight:bold;padding:2px 0;'>Audit<br />Id</td>\n<td style='width:55px;font-weight:bold;'>Type</td>\n<td style='width:55px;font-weight:bold;'>SLMTA<br />Type</td>\n<td style='width:55px;font-weight:bold;'>Slipta<br />Off.</td>\n<td style='width:130px;font-weight:bold;'>Date</td>\n<td style='width:100px;font-weight:bold;'>Labnum</td>\n<td style='width:150px;font-weight:bold;'>Labname</td>\n<td style='width:85px;font-weight:bold;'>Country</td>\n<td style='width:100px;font-weight:bold;'>Level</td>\n<td style='width:145px;font-weight:bold;'>Affiliation</td>\n<td style='width:45px;font-weight:bold;'>Co-<br />hort<br />Id</td>\n<td style='width:92px;font-weight:bold;'>Status</td>\nEND;\n if (! $cb) {\n $tout[] = \"<td></td></tr>\";\n } else {\n $tout[] = \"</tr>\";\n }\n foreach($rows as $row) {\n logit('Audit: ' . print_r($row, true));\n if (! $row['owner'] && $row['status'] == 'INCOMPLETE') continue;\n //if ($)\n $ct ++;\n $cls = ($ct % 2 == 0) ? 'even' : 'odd';\n /*$edit = ($row['status'] == 'INCOMPLETE' && $row['owner']) ?\n \"<a href=\\\"{$this->baseurl}/audit/edit/{$row['audit_id']}/\\\" class=\\\"btn btn-mini btn-inverse\\\">Edit</a>\" : '';\n $view = \"<a href=\\\"{$this->baseurl}/audit/view/{$row['audit_id']}\\\" class=\\\"btn btn-mini btn-success\\\">View</a>\";\n */\n $adduser = '';\n if ($this->audit['audit_id'] != $row[\"audit_id\"]) {\n $selx = \"<a href=\\\"{$this->baseurl}/audit/choose/{$row[\"audit_id\"]}\\\" class=\\\"btn btn-mini btn-info\\\">Select</a>\";\n } else {\n $cls = 'hilight';\n $selx = \"<div style=\\\"color:red;\\\">Selected</div>\";\n }\n $tout[] = \"<tr class='{$cls} ' style=\\\"height:24px;\\\">\";\n if ($cb) {\n $name = \"cb_{$row['audit_id']}\";\n $tout[] = \"<td style='width:40px;padding:4px 0;'>\" .\n \"<center><input type='checkbox' name='{$name}' id='{$name}'></center></td>\";\n } else if ($addsel) {\n $butt = \"<a href=\\\"{$this->baseurl}/lab/choose/{$row['audit_id']}\\\"\" .\n \" class=\\\"btn btn-mini btn-success\\\">Select</a>\";\n $tout[] = \"<td style='width:40px;padding:2px 4px;'>{$butt}</td>\";\n } else {\n $tout[] = \"<td style='width:40px;padding:2px 4px;'>{$selx}</td>\";\n }\n $tout[] = <<<\"END\"\n<td>{$row['audit_id']}</td>\n<td>{$row['audit_type']}</td><td>{$row['slmta_type']}</td><td>{$row['slipta_official']}</td>\n<td>{$row['end_date']}</td>\n<td>{$row['labnum']}</td>\n<td>{$row['labname']}</td><td>{$row['country']}</td>\n<td><p class=\"small\">{$rev_level[$row['lablevel']]}</p></td>\n<td><p class=\"small\">{$rev_affil[$row['labaffil']]}</p></td>\n<td>{$row['cohort_id']}</td><td>{$row['status']}</td>\n\nEND;\n if (! $cb) {\n $tout[] = \"<td></td></tr>\";\n //{$export} {$delete}\n } else {\n $tout[] = \"</tr>\";\n }\n}\nif ($cb) {\n $tout[] = '<tr><td colspan=13 style=\"text-align:right;\" ><input class=\"input-xlarge submit\" type=\"submit\" name=\"doit\" value=\"Process Request\">';\n}\n$tout[] = '</table><div style=\"height: 65px;\">&nbsp;</div>' . '<div style=\"clear: both;\"></div>';\n/* if ($cb) {\n $tour[] = '</form>';\n }*/\n$lines = implode(\"\\n\", $tout);\nreturn $lines;\n }", "function theme_open_journal_issue_sections_form($variables) {\n $form = $variables['form'];\n\n drupal_add_tabledrag('issue-sections-form-table', 'order', 'sibling', 'section-weight');\n\n $rows = array();\n $headers = array('', t('Section'), t('Weight'), ('Operation'));\n\n foreach (element_children($form) as $key) {\n if ($key === 'section_more') {\n continue;\n }\n\n $form[$key]['weight']['#attributes']['class'] = array('section-weight');\n\n $form[$key]['title']['#prefix'] = '<div class=\"title-remove-wrapper\">';\n $form[$key]['remove']['#suffix'] = '</div>';\n\n $row = array();\n $row['data'] = array();\n $row['data'][] = array('class' => array('section-flag'));\n $row['data'][] = drupal_render($form[$key]['title']) . drupal_render($form[$key]['journals_wrapper']);\n $row['data'][] = drupal_render($form[$key]['weight']);\n $row['data'][] = drupal_render($form[$key]['remove']);\n $row['class'] = array('draggable');\n\n $rows[] = $row;\n }\n\n $output = theme('table', array(\n 'header' => $headers,\n 'rows' => $rows,\n 'attributes' => array('id' => 'issue-sections-form-table')\n ));\n $output .= drupal_render_children($form);\n return $output;\n}", "public function renderEditRow()\n\t{\n\t\tglobal $Security, $CurrentLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// id\n\t\t$this->id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->id->EditCustomAttributes = \"\";\n\t\t$this->id->EditValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// fecha\n\t\t$this->fecha->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fecha->EditCustomAttributes = \"\";\n\t\t$this->fecha->EditValue = FormatDateTime($this->fecha->CurrentValue, 8);\n\t\t$this->fecha->PlaceHolder = RemoveHtml($this->fecha->caption());\n\n\t\t// hora\n\t\t$this->hora->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->hora->EditCustomAttributes = \"\";\n\t\t$this->hora->EditValue = $this->hora->CurrentValue;\n\t\t$this->hora->PlaceHolder = RemoveHtml($this->hora->caption());\n\n\t\t// audio\n\t\t$this->audio->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->audio->EditCustomAttributes = \"\";\n\t\tif (!$this->audio->Raw)\n\t\t\t$this->audio->CurrentValue = HtmlDecode($this->audio->CurrentValue);\n\t\t$this->audio->EditValue = $this->audio->CurrentValue;\n\t\t$this->audio->PlaceHolder = RemoveHtml($this->audio->caption());\n\n\t\t// st\n\t\t$this->st->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->st->EditCustomAttributes = \"\";\n\t\tif (!$this->st->Raw)\n\t\t\t$this->st->CurrentValue = HtmlDecode($this->st->CurrentValue);\n\t\t$this->st->EditValue = $this->st->CurrentValue;\n\t\t$this->st->PlaceHolder = RemoveHtml($this->st->caption());\n\n\t\t// fechaHoraIni\n\t\t$this->fechaHoraIni->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechaHoraIni->EditCustomAttributes = \"\";\n\t\t$this->fechaHoraIni->EditValue = FormatDateTime($this->fechaHoraIni->CurrentValue, 8);\n\t\t$this->fechaHoraIni->PlaceHolder = RemoveHtml($this->fechaHoraIni->caption());\n\n\t\t// fechaHoraFin\n\t\t$this->fechaHoraFin->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechaHoraFin->EditCustomAttributes = \"\";\n\t\t$this->fechaHoraFin->EditValue = FormatDateTime($this->fechaHoraFin->CurrentValue, 8);\n\t\t$this->fechaHoraFin->PlaceHolder = RemoveHtml($this->fechaHoraFin->caption());\n\n\t\t// telefono\n\t\t$this->telefono->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->telefono->EditCustomAttributes = \"\";\n\t\tif (!$this->telefono->Raw)\n\t\t\t$this->telefono->CurrentValue = HtmlDecode($this->telefono->CurrentValue);\n\t\t$this->telefono->EditValue = $this->telefono->CurrentValue;\n\t\t$this->telefono->PlaceHolder = RemoveHtml($this->telefono->caption());\n\n\t\t// agente\n\t\t$this->agente->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->agente->EditCustomAttributes = \"\";\n\t\t$this->agente->EditValue = $this->agente->CurrentValue;\n\t\t$this->agente->PlaceHolder = RemoveHtml($this->agente->caption());\n\n\t\t// fechabo\n\t\t$this->fechabo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechabo->EditCustomAttributes = \"\";\n\t\t$this->fechabo->EditValue = FormatDateTime($this->fechabo->CurrentValue, 8);\n\t\t$this->fechabo->PlaceHolder = RemoveHtml($this->fechabo->caption());\n\n\t\t// agentebo\n\t\t$this->agentebo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->agentebo->EditCustomAttributes = \"\";\n\t\t$this->agentebo->EditValue = $this->agentebo->CurrentValue;\n\t\t$this->agentebo->PlaceHolder = RemoveHtml($this->agentebo->caption());\n\n\t\t// comentariosbo\n\t\t$this->comentariosbo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->comentariosbo->EditCustomAttributes = \"\";\n\t\t$this->comentariosbo->EditValue = $this->comentariosbo->CurrentValue;\n\t\t$this->comentariosbo->PlaceHolder = RemoveHtml($this->comentariosbo->caption());\n\n\t\t// IP\n\t\t$this->IP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IP->EditCustomAttributes = \"\";\n\t\tif (!$this->IP->Raw)\n\t\t\t$this->IP->CurrentValue = HtmlDecode($this->IP->CurrentValue);\n\t\t$this->IP->EditValue = $this->IP->CurrentValue;\n\t\t$this->IP->PlaceHolder = RemoveHtml($this->IP->caption());\n\n\t\t// actual\n\t\t$this->actual->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->actual->EditCustomAttributes = \"\";\n\t\tif (!$this->actual->Raw)\n\t\t\t$this->actual->CurrentValue = HtmlDecode($this->actual->CurrentValue);\n\t\t$this->actual->EditValue = $this->actual->CurrentValue;\n\t\t$this->actual->PlaceHolder = RemoveHtml($this->actual->caption());\n\n\t\t// completado\n\t\t$this->completado->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->completado->EditCustomAttributes = \"\";\n\t\tif (!$this->completado->Raw)\n\t\t\t$this->completado->CurrentValue = HtmlDecode($this->completado->CurrentValue);\n\t\t$this->completado->EditValue = $this->completado->CurrentValue;\n\t\t$this->completado->PlaceHolder = RemoveHtml($this->completado->caption());\n\n\t\t// 2_1_R\n\t\t$this->_2_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_1_R->EditCustomAttributes = \"\";\n\t\t$this->_2_1_R->EditValue = $this->_2_1_R->CurrentValue;\n\t\t$this->_2_1_R->PlaceHolder = RemoveHtml($this->_2_1_R->caption());\n\n\t\t// 2_2_R\n\t\t$this->_2_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_2_R->EditCustomAttributes = \"\";\n\t\t$this->_2_2_R->EditValue = $this->_2_2_R->CurrentValue;\n\t\t$this->_2_2_R->PlaceHolder = RemoveHtml($this->_2_2_R->caption());\n\n\t\t// 2_3_R\n\t\t$this->_2_3_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_3_R->EditCustomAttributes = \"\";\n\t\t$this->_2_3_R->EditValue = $this->_2_3_R->CurrentValue;\n\t\t$this->_2_3_R->PlaceHolder = RemoveHtml($this->_2_3_R->caption());\n\n\t\t// 3_4_R\n\t\t$this->_3_4_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_3_4_R->EditCustomAttributes = \"\";\n\t\t$this->_3_4_R->EditValue = $this->_3_4_R->CurrentValue;\n\t\t$this->_3_4_R->PlaceHolder = RemoveHtml($this->_3_4_R->caption());\n\n\t\t// 4_5_R\n\t\t$this->_4_5_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_5_R->EditCustomAttributes = \"\";\n\t\t$this->_4_5_R->EditValue = $this->_4_5_R->CurrentValue;\n\t\t$this->_4_5_R->PlaceHolder = RemoveHtml($this->_4_5_R->caption());\n\n\t\t// 4_6_R\n\t\t$this->_4_6_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_6_R->EditCustomAttributes = \"\";\n\t\t$this->_4_6_R->EditValue = $this->_4_6_R->CurrentValue;\n\t\t$this->_4_6_R->PlaceHolder = RemoveHtml($this->_4_6_R->caption());\n\n\t\t// 4_7_R\n\t\t$this->_4_7_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_7_R->EditCustomAttributes = \"\";\n\t\t$this->_4_7_R->EditValue = $this->_4_7_R->CurrentValue;\n\t\t$this->_4_7_R->PlaceHolder = RemoveHtml($this->_4_7_R->caption());\n\n\t\t// 4_8_R\n\t\t$this->_4_8_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_8_R->EditCustomAttributes = \"\";\n\t\t$this->_4_8_R->EditValue = $this->_4_8_R->CurrentValue;\n\t\t$this->_4_8_R->PlaceHolder = RemoveHtml($this->_4_8_R->caption());\n\n\t\t// 5_9_R\n\t\t$this->_5_9_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_9_R->EditCustomAttributes = \"\";\n\t\t$this->_5_9_R->EditValue = $this->_5_9_R->CurrentValue;\n\t\t$this->_5_9_R->PlaceHolder = RemoveHtml($this->_5_9_R->caption());\n\n\t\t// 5_10_R\n\t\t$this->_5_10_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_10_R->EditCustomAttributes = \"\";\n\t\t$this->_5_10_R->EditValue = $this->_5_10_R->CurrentValue;\n\t\t$this->_5_10_R->PlaceHolder = RemoveHtml($this->_5_10_R->caption());\n\n\t\t// 5_11_R\n\t\t$this->_5_11_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_11_R->EditCustomAttributes = \"\";\n\t\t$this->_5_11_R->EditValue = $this->_5_11_R->CurrentValue;\n\t\t$this->_5_11_R->PlaceHolder = RemoveHtml($this->_5_11_R->caption());\n\n\t\t// 5_12_R\n\t\t$this->_5_12_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_12_R->EditCustomAttributes = \"\";\n\t\t$this->_5_12_R->EditValue = $this->_5_12_R->CurrentValue;\n\t\t$this->_5_12_R->PlaceHolder = RemoveHtml($this->_5_12_R->caption());\n\n\t\t// 5_13_R\n\t\t$this->_5_13_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_13_R->EditCustomAttributes = \"\";\n\t\t$this->_5_13_R->EditValue = $this->_5_13_R->CurrentValue;\n\t\t$this->_5_13_R->PlaceHolder = RemoveHtml($this->_5_13_R->caption());\n\n\t\t// 5_14_R\n\t\t$this->_5_14_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_14_R->EditCustomAttributes = \"\";\n\t\t$this->_5_14_R->EditValue = $this->_5_14_R->CurrentValue;\n\t\t$this->_5_14_R->PlaceHolder = RemoveHtml($this->_5_14_R->caption());\n\n\t\t// 5_51_R\n\t\t$this->_5_51_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_51_R->EditCustomAttributes = \"\";\n\t\t$this->_5_51_R->EditValue = $this->_5_51_R->CurrentValue;\n\t\t$this->_5_51_R->PlaceHolder = RemoveHtml($this->_5_51_R->caption());\n\n\t\t// 6_15_R\n\t\t$this->_6_15_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_15_R->EditCustomAttributes = \"\";\n\t\t$this->_6_15_R->EditValue = $this->_6_15_R->CurrentValue;\n\t\t$this->_6_15_R->PlaceHolder = RemoveHtml($this->_6_15_R->caption());\n\n\t\t// 6_16_R\n\t\t$this->_6_16_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_16_R->EditCustomAttributes = \"\";\n\t\t$this->_6_16_R->EditValue = $this->_6_16_R->CurrentValue;\n\t\t$this->_6_16_R->PlaceHolder = RemoveHtml($this->_6_16_R->caption());\n\n\t\t// 6_17_R\n\t\t$this->_6_17_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_17_R->EditCustomAttributes = \"\";\n\t\t$this->_6_17_R->EditValue = $this->_6_17_R->CurrentValue;\n\t\t$this->_6_17_R->PlaceHolder = RemoveHtml($this->_6_17_R->caption());\n\n\t\t// 6_18_R\n\t\t$this->_6_18_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_18_R->EditCustomAttributes = \"\";\n\t\t$this->_6_18_R->EditValue = $this->_6_18_R->CurrentValue;\n\t\t$this->_6_18_R->PlaceHolder = RemoveHtml($this->_6_18_R->caption());\n\n\t\t// 6_19_R\n\t\t$this->_6_19_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_19_R->EditCustomAttributes = \"\";\n\t\t$this->_6_19_R->EditValue = $this->_6_19_R->CurrentValue;\n\t\t$this->_6_19_R->PlaceHolder = RemoveHtml($this->_6_19_R->caption());\n\n\t\t// 6_20_R\n\t\t$this->_6_20_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_20_R->EditCustomAttributes = \"\";\n\t\t$this->_6_20_R->EditValue = $this->_6_20_R->CurrentValue;\n\t\t$this->_6_20_R->PlaceHolder = RemoveHtml($this->_6_20_R->caption());\n\n\t\t// 6_52_R\n\t\t$this->_6_52_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_52_R->EditCustomAttributes = \"\";\n\t\t$this->_6_52_R->EditValue = $this->_6_52_R->CurrentValue;\n\t\t$this->_6_52_R->PlaceHolder = RemoveHtml($this->_6_52_R->caption());\n\n\t\t// 7_21_R\n\t\t$this->_7_21_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_7_21_R->EditCustomAttributes = \"\";\n\t\t$this->_7_21_R->EditValue = $this->_7_21_R->CurrentValue;\n\t\t$this->_7_21_R->PlaceHolder = RemoveHtml($this->_7_21_R->caption());\n\n\t\t// 8_22_R\n\t\t$this->_8_22_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_22_R->EditCustomAttributes = \"\";\n\t\t$this->_8_22_R->EditValue = $this->_8_22_R->CurrentValue;\n\t\t$this->_8_22_R->PlaceHolder = RemoveHtml($this->_8_22_R->caption());\n\n\t\t// 8_23_R\n\t\t$this->_8_23_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_23_R->EditCustomAttributes = \"\";\n\t\t$this->_8_23_R->EditValue = $this->_8_23_R->CurrentValue;\n\t\t$this->_8_23_R->PlaceHolder = RemoveHtml($this->_8_23_R->caption());\n\n\t\t// 8_24_R\n\t\t$this->_8_24_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_24_R->EditCustomAttributes = \"\";\n\t\t$this->_8_24_R->EditValue = $this->_8_24_R->CurrentValue;\n\t\t$this->_8_24_R->PlaceHolder = RemoveHtml($this->_8_24_R->caption());\n\n\t\t// 8_25_R\n\t\t$this->_8_25_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_25_R->EditCustomAttributes = \"\";\n\t\t$this->_8_25_R->EditValue = $this->_8_25_R->CurrentValue;\n\t\t$this->_8_25_R->PlaceHolder = RemoveHtml($this->_8_25_R->caption());\n\n\t\t// 9_26_R\n\t\t$this->_9_26_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_26_R->EditCustomAttributes = \"\";\n\t\t$this->_9_26_R->EditValue = $this->_9_26_R->CurrentValue;\n\t\t$this->_9_26_R->PlaceHolder = RemoveHtml($this->_9_26_R->caption());\n\n\t\t// 9_27_R\n\t\t$this->_9_27_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_27_R->EditCustomAttributes = \"\";\n\t\t$this->_9_27_R->EditValue = $this->_9_27_R->CurrentValue;\n\t\t$this->_9_27_R->PlaceHolder = RemoveHtml($this->_9_27_R->caption());\n\n\t\t// 9_28_R\n\t\t$this->_9_28_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_28_R->EditCustomAttributes = \"\";\n\t\t$this->_9_28_R->EditValue = $this->_9_28_R->CurrentValue;\n\t\t$this->_9_28_R->PlaceHolder = RemoveHtml($this->_9_28_R->caption());\n\n\t\t// 9_29_R\n\t\t$this->_9_29_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_29_R->EditCustomAttributes = \"\";\n\t\t$this->_9_29_R->EditValue = $this->_9_29_R->CurrentValue;\n\t\t$this->_9_29_R->PlaceHolder = RemoveHtml($this->_9_29_R->caption());\n\n\t\t// 9_30_R\n\t\t$this->_9_30_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_30_R->EditCustomAttributes = \"\";\n\t\t$this->_9_30_R->EditValue = $this->_9_30_R->CurrentValue;\n\t\t$this->_9_30_R->PlaceHolder = RemoveHtml($this->_9_30_R->caption());\n\n\t\t// 9_31_R\n\t\t$this->_9_31_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_31_R->EditCustomAttributes = \"\";\n\t\t$this->_9_31_R->EditValue = $this->_9_31_R->CurrentValue;\n\t\t$this->_9_31_R->PlaceHolder = RemoveHtml($this->_9_31_R->caption());\n\n\t\t// 9_32_R\n\t\t$this->_9_32_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_32_R->EditCustomAttributes = \"\";\n\t\t$this->_9_32_R->EditValue = $this->_9_32_R->CurrentValue;\n\t\t$this->_9_32_R->PlaceHolder = RemoveHtml($this->_9_32_R->caption());\n\n\t\t// 9_33_R\n\t\t$this->_9_33_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_33_R->EditCustomAttributes = \"\";\n\t\t$this->_9_33_R->EditValue = $this->_9_33_R->CurrentValue;\n\t\t$this->_9_33_R->PlaceHolder = RemoveHtml($this->_9_33_R->caption());\n\n\t\t// 9_34_R\n\t\t$this->_9_34_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_34_R->EditCustomAttributes = \"\";\n\t\t$this->_9_34_R->EditValue = $this->_9_34_R->CurrentValue;\n\t\t$this->_9_34_R->PlaceHolder = RemoveHtml($this->_9_34_R->caption());\n\n\t\t// 9_35_R\n\t\t$this->_9_35_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_35_R->EditCustomAttributes = \"\";\n\t\t$this->_9_35_R->EditValue = $this->_9_35_R->CurrentValue;\n\t\t$this->_9_35_R->PlaceHolder = RemoveHtml($this->_9_35_R->caption());\n\n\t\t// 9_36_R\n\t\t$this->_9_36_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_36_R->EditCustomAttributes = \"\";\n\t\t$this->_9_36_R->EditValue = $this->_9_36_R->CurrentValue;\n\t\t$this->_9_36_R->PlaceHolder = RemoveHtml($this->_9_36_R->caption());\n\n\t\t// 9_37_R\n\t\t$this->_9_37_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_37_R->EditCustomAttributes = \"\";\n\t\t$this->_9_37_R->EditValue = $this->_9_37_R->CurrentValue;\n\t\t$this->_9_37_R->PlaceHolder = RemoveHtml($this->_9_37_R->caption());\n\n\t\t// 9_38_R\n\t\t$this->_9_38_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_38_R->EditCustomAttributes = \"\";\n\t\t$this->_9_38_R->EditValue = $this->_9_38_R->CurrentValue;\n\t\t$this->_9_38_R->PlaceHolder = RemoveHtml($this->_9_38_R->caption());\n\n\t\t// 9_39_R\n\t\t$this->_9_39_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_39_R->EditCustomAttributes = \"\";\n\t\t$this->_9_39_R->EditValue = $this->_9_39_R->CurrentValue;\n\t\t$this->_9_39_R->PlaceHolder = RemoveHtml($this->_9_39_R->caption());\n\n\t\t// 10_40_R\n\t\t$this->_10_40_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_10_40_R->EditCustomAttributes = \"\";\n\t\t$this->_10_40_R->EditValue = $this->_10_40_R->CurrentValue;\n\t\t$this->_10_40_R->PlaceHolder = RemoveHtml($this->_10_40_R->caption());\n\n\t\t// 10_41_R\n\t\t$this->_10_41_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_10_41_R->EditCustomAttributes = \"\";\n\t\t$this->_10_41_R->EditValue = $this->_10_41_R->CurrentValue;\n\t\t$this->_10_41_R->PlaceHolder = RemoveHtml($this->_10_41_R->caption());\n\n\t\t// 11_42_R\n\t\t$this->_11_42_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_11_42_R->EditCustomAttributes = \"\";\n\t\t$this->_11_42_R->EditValue = $this->_11_42_R->CurrentValue;\n\t\t$this->_11_42_R->PlaceHolder = RemoveHtml($this->_11_42_R->caption());\n\n\t\t// 11_43_R\n\t\t$this->_11_43_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_11_43_R->EditCustomAttributes = \"\";\n\t\t$this->_11_43_R->EditValue = $this->_11_43_R->CurrentValue;\n\t\t$this->_11_43_R->PlaceHolder = RemoveHtml($this->_11_43_R->caption());\n\n\t\t// 12_44_R\n\t\t$this->_12_44_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_44_R->EditCustomAttributes = \"\";\n\t\t$this->_12_44_R->EditValue = $this->_12_44_R->CurrentValue;\n\t\t$this->_12_44_R->PlaceHolder = RemoveHtml($this->_12_44_R->caption());\n\n\t\t// 12_45_R\n\t\t$this->_12_45_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_45_R->EditCustomAttributes = \"\";\n\t\t$this->_12_45_R->EditValue = $this->_12_45_R->CurrentValue;\n\t\t$this->_12_45_R->PlaceHolder = RemoveHtml($this->_12_45_R->caption());\n\n\t\t// 12_46_R\n\t\t$this->_12_46_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_46_R->EditCustomAttributes = \"\";\n\t\t$this->_12_46_R->EditValue = $this->_12_46_R->CurrentValue;\n\t\t$this->_12_46_R->PlaceHolder = RemoveHtml($this->_12_46_R->caption());\n\n\t\t// 12_47_R\n\t\t$this->_12_47_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_47_R->EditCustomAttributes = \"\";\n\t\t$this->_12_47_R->EditValue = $this->_12_47_R->CurrentValue;\n\t\t$this->_12_47_R->PlaceHolder = RemoveHtml($this->_12_47_R->caption());\n\n\t\t// 12_48_R\n\t\t$this->_12_48_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_48_R->EditCustomAttributes = \"\";\n\t\t$this->_12_48_R->EditValue = $this->_12_48_R->CurrentValue;\n\t\t$this->_12_48_R->PlaceHolder = RemoveHtml($this->_12_48_R->caption());\n\n\t\t// 12_49_R\n\t\t$this->_12_49_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_49_R->EditCustomAttributes = \"\";\n\t\t$this->_12_49_R->EditValue = $this->_12_49_R->CurrentValue;\n\t\t$this->_12_49_R->PlaceHolder = RemoveHtml($this->_12_49_R->caption());\n\n\t\t// 12_50_R\n\t\t$this->_12_50_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_50_R->EditCustomAttributes = \"\";\n\t\t$this->_12_50_R->EditValue = $this->_12_50_R->CurrentValue;\n\t\t$this->_12_50_R->PlaceHolder = RemoveHtml($this->_12_50_R->caption());\n\n\t\t// 1__R\n\t\t$this->_1__R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_1__R->EditCustomAttributes = \"\";\n\t\t$this->_1__R->EditValue = $this->_1__R->CurrentValue;\n\t\t$this->_1__R->PlaceHolder = RemoveHtml($this->_1__R->caption());\n\n\t\t// 13_54_R\n\t\t$this->_13_54_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_R->EditValue = $this->_13_54_R->CurrentValue;\n\t\t$this->_13_54_R->PlaceHolder = RemoveHtml($this->_13_54_R->caption());\n\n\t\t// 13_54_1_R\n\t\t$this->_13_54_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_1_R->EditValue = $this->_13_54_1_R->CurrentValue;\n\t\t$this->_13_54_1_R->PlaceHolder = RemoveHtml($this->_13_54_1_R->caption());\n\n\t\t// 13_54_2_R\n\t\t$this->_13_54_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_2_R->EditValue = $this->_13_54_2_R->CurrentValue;\n\t\t$this->_13_54_2_R->PlaceHolder = RemoveHtml($this->_13_54_2_R->caption());\n\n\t\t// 13_55_R\n\t\t$this->_13_55_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_R->EditValue = $this->_13_55_R->CurrentValue;\n\t\t$this->_13_55_R->PlaceHolder = RemoveHtml($this->_13_55_R->caption());\n\n\t\t// 13_55_1_R\n\t\t$this->_13_55_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_1_R->EditValue = $this->_13_55_1_R->CurrentValue;\n\t\t$this->_13_55_1_R->PlaceHolder = RemoveHtml($this->_13_55_1_R->caption());\n\n\t\t// 13_55_2_R\n\t\t$this->_13_55_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_2_R->EditValue = $this->_13_55_2_R->CurrentValue;\n\t\t$this->_13_55_2_R->PlaceHolder = RemoveHtml($this->_13_55_2_R->caption());\n\n\t\t// 13_56_R\n\t\t$this->_13_56_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_R->EditValue = $this->_13_56_R->CurrentValue;\n\t\t$this->_13_56_R->PlaceHolder = RemoveHtml($this->_13_56_R->caption());\n\n\t\t// 13_56_1_R\n\t\t$this->_13_56_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_1_R->EditValue = $this->_13_56_1_R->CurrentValue;\n\t\t$this->_13_56_1_R->PlaceHolder = RemoveHtml($this->_13_56_1_R->caption());\n\n\t\t// 13_56_2_R\n\t\t$this->_13_56_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_2_R->EditValue = $this->_13_56_2_R->CurrentValue;\n\t\t$this->_13_56_2_R->PlaceHolder = RemoveHtml($this->_13_56_2_R->caption());\n\n\t\t// 12_53_R\n\t\t$this->_12_53_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_R->EditValue = $this->_12_53_R->CurrentValue;\n\t\t$this->_12_53_R->PlaceHolder = RemoveHtml($this->_12_53_R->caption());\n\n\t\t// 12_53_1_R\n\t\t$this->_12_53_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_1_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_1_R->EditValue = $this->_12_53_1_R->CurrentValue;\n\t\t$this->_12_53_1_R->PlaceHolder = RemoveHtml($this->_12_53_1_R->caption());\n\n\t\t// 12_53_2_R\n\t\t$this->_12_53_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_2_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_2_R->EditValue = $this->_12_53_2_R->CurrentValue;\n\t\t$this->_12_53_2_R->PlaceHolder = RemoveHtml($this->_12_53_2_R->caption());\n\n\t\t// 12_53_3_R\n\t\t$this->_12_53_3_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_3_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_3_R->EditValue = $this->_12_53_3_R->CurrentValue;\n\t\t$this->_12_53_3_R->PlaceHolder = RemoveHtml($this->_12_53_3_R->caption());\n\n\t\t// 12_53_4_R\n\t\t$this->_12_53_4_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_4_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_4_R->EditValue = $this->_12_53_4_R->CurrentValue;\n\t\t$this->_12_53_4_R->PlaceHolder = RemoveHtml($this->_12_53_4_R->caption());\n\n\t\t// 12_53_5_R\n\t\t$this->_12_53_5_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_5_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_5_R->EditValue = $this->_12_53_5_R->CurrentValue;\n\t\t$this->_12_53_5_R->PlaceHolder = RemoveHtml($this->_12_53_5_R->caption());\n\n\t\t// 12_53_6_R\n\t\t$this->_12_53_6_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_6_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_6_R->EditValue = $this->_12_53_6_R->CurrentValue;\n\t\t$this->_12_53_6_R->PlaceHolder = RemoveHtml($this->_12_53_6_R->caption());\n\n\t\t// 13_57_R\n\t\t$this->_13_57_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_R->EditValue = $this->_13_57_R->CurrentValue;\n\t\t$this->_13_57_R->PlaceHolder = RemoveHtml($this->_13_57_R->caption());\n\n\t\t// 13_57_1_R\n\t\t$this->_13_57_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_1_R->EditValue = $this->_13_57_1_R->CurrentValue;\n\t\t$this->_13_57_1_R->PlaceHolder = RemoveHtml($this->_13_57_1_R->caption());\n\n\t\t// 13_57_2_R\n\t\t$this->_13_57_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_2_R->EditValue = $this->_13_57_2_R->CurrentValue;\n\t\t$this->_13_57_2_R->PlaceHolder = RemoveHtml($this->_13_57_2_R->caption());\n\n\t\t// 13_58_R\n\t\t$this->_13_58_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_R->EditValue = $this->_13_58_R->CurrentValue;\n\t\t$this->_13_58_R->PlaceHolder = RemoveHtml($this->_13_58_R->caption());\n\n\t\t// 13_58_1_R\n\t\t$this->_13_58_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_1_R->EditValue = $this->_13_58_1_R->CurrentValue;\n\t\t$this->_13_58_1_R->PlaceHolder = RemoveHtml($this->_13_58_1_R->caption());\n\n\t\t// 13_58_2_R\n\t\t$this->_13_58_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_2_R->EditValue = $this->_13_58_2_R->CurrentValue;\n\t\t$this->_13_58_2_R->PlaceHolder = RemoveHtml($this->_13_58_2_R->caption());\n\n\t\t// 13_59_R\n\t\t$this->_13_59_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_R->EditValue = $this->_13_59_R->CurrentValue;\n\t\t$this->_13_59_R->PlaceHolder = RemoveHtml($this->_13_59_R->caption());\n\n\t\t// 13_59_1_R\n\t\t$this->_13_59_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_1_R->EditValue = $this->_13_59_1_R->CurrentValue;\n\t\t$this->_13_59_1_R->PlaceHolder = RemoveHtml($this->_13_59_1_R->caption());\n\n\t\t// 13_59_2_R\n\t\t$this->_13_59_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_2_R->EditValue = $this->_13_59_2_R->CurrentValue;\n\t\t$this->_13_59_2_R->PlaceHolder = RemoveHtml($this->_13_59_2_R->caption());\n\n\t\t// 13_60_R\n\t\t$this->_13_60_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_60_R->EditCustomAttributes = \"\";\n\t\t$this->_13_60_R->EditValue = $this->_13_60_R->CurrentValue;\n\t\t$this->_13_60_R->PlaceHolder = RemoveHtml($this->_13_60_R->caption());\n\n\t\t// 12_53_7_R\n\t\t$this->_12_53_7_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_7_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_7_R->EditValue = $this->_12_53_7_R->CurrentValue;\n\t\t$this->_12_53_7_R->PlaceHolder = RemoveHtml($this->_12_53_7_R->caption());\n\n\t\t// 12_53_8_R\n\t\t$this->_12_53_8_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_8_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_8_R->EditValue = $this->_12_53_8_R->CurrentValue;\n\t\t$this->_12_53_8_R->PlaceHolder = RemoveHtml($this->_12_53_8_R->caption());\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function display_rows() {\n\n //Récuperation des quotes\n $records = $this->items;\n\n //Récuperation des colonnes\n list( $columns, $hidden ) = $this->get_column_info();\n if(!empty($records)){\n //pour chaque quote\n foreach($records as $rec){\n\n echo '<tr id=\"record_'.$rec->id.'\">';\n foreach ( $columns as $column_name => $column_display_name ) {\n\n $class = \"class='$column_name column-$column_name'\";\n $style = \"\";\n if ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n $attributes = $class . $style;\n\n $editlink = '/wp-admin/link.php?action=edit&id='.(int)$rec->id;\n\n switch ( $column_name ) {\n case \"col_id\":\techo '<td '.$attributes.'>'.stripslashes($rec->id).'</td>';\tbreak;\n case \"col_author\": echo '<td '.$attributes.'>'.stripslashes($rec->author).'</td>'; break;\n case \"col_quote\": echo '<td '.$attributes.'>'.stripslashes($rec->quote).'</td>'; break;\n case \"col_action\": echo '<td '.$attributes.'><a class=\"button\" style=\"margin-right:10px;\" href=\"admin.php?page=add_funny_quotes&quote='.stripslashes($rec->id).'&action=edit\">Editer</a><a class=\"button\" onclick=\"return confirm(\\'Etes-vous sur de vouloir supprimer la quote ?\\')\" href=\"admin.php?page=add_funny_quotes&quote='.stripslashes($rec->id).'&action=delete\">Supprimer</a></td>'; break;\n }\n\n }\n\n echo'</tr>';\n\n }\n }\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 onRsformAfterCreatePlaceholders(array $args): void\n\t{\n\t\t$formId = $args['form']->FormId;\n\n\t\tif (!$this->hasRopaymentsFields($formId))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($args['values'] as $key => $value)\n\t\t{\n\t\t\tif (!strpos($value, ','))\n\t\t\t{\n\t\t\t\t$args['values'][$key] = Text::_(nl2br($value));\n\t\t\t}\n\t\t}\n\n\t\t$translations = RSFormProHelper::getTranslations('properties', $formId, $args['submission']->Lang);\n\t\t$singleProduct = RSFormProHelper::componentExists($formId, ROPAYMENTS_FIELD_PAYMENT_SINGLE_PRODUCT);\n\t\t$multipleProducts = RSFormProHelper::componentExists($formId, ROPAYMENTS_FIELD_PAYMENT_MULTIPLE_PRODUCTS);\n\t\t$total = RSFormProHelper::componentExists($formId, ROPAYMENTS_FIELD_PAYMENT_TOTAL);\n\t\t$inputProducts = RSFormProHelper::componentExists($formId, ROPAYMENTS_FIELD_PAYMENT_INPUT);\n\t\t$choosePayment = RSFormProHelper::componentExists($formId, ROPAYMENTS_FIELD_PAYMENT_CHOOSE);\n\t\t$discountField = RSFormProHelper::componentExists($formId, ROPAYMENTS_FIELD_PAYMENT_DISCOUNT);\n\n\t\tif (!empty($singleProduct))\n\t\t{\n\t\t\t$this->createSingleProductPlaceHolders($singleProduct, $translations, $args);\n\t\t}\n\n\t\tif (!empty($multipleProducts))\n\t\t{\n\t\t\t$this->createMultipleProductsPlaceHolders($multipleProducts, $translations, $args);\n\t\t}\n\n\t\tif (!empty($total))\n\t\t{\n\t\t\t$this->createTotalPlaceHolders($total, $translations, $args);\n\t\t}\n\n\t\tif (!empty($inputProducts))\n\t\t{\n\t\t\t$this->createInputProductsPlaceHolders($inputProducts, $translations, $args);\n\t\t}\n\n\t\tif (!empty($choosePayment))\n\t\t{\n\t\t\t$this->createChoosePaymentPlaceHolders($choosePayment, $args);\n\t\t}\n\n\t\tif (!empty($discountField))\n\t\t{\n\t\t\t$this->createDiscountPlaceHolders($discountField, $args);\n\t\t}\n\n\t\t$args['placeholders'][] = '{_STATUS:value}';\n\t\t$args['values'][] = isset($args['submission']->values['_STATUS'])\n\t\t\t? Text::_('PLG_RSFP_JDIDEAL_PAYMENT_STATUS_' . $args['submission']->values['_STATUS'])\n\t\t\t: '';\n\n\t\t$args['placeholders'][] = '{_STATUS:caption}';\n\t\t$args['values'][] = Text::_('PLG_RSFP_JDIDEAL_PAYMENT_STATUS');\n\n\t\t$args['placeholders'][] = '{_TRANSACTION_ID:value}';\n\t\t$args['values'][] = $args['submission']->values['_TRANSACTION_ID'] ?? '';\n\n\t\t$args['placeholders'][] = '{_TRANSACTION_ID:caption}';\n\t\t$args['values'][] = Text::_('PLG_RSFP_ROPAYMENTS_TRANSACTION_ID');\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->tarif->FormValue == $this->tarif->CurrentValue && is_numeric(ew_StrToFloat($this->tarif->CurrentValue)))\n\t\t\t$this->tarif->CurrentValue = ew_StrToFloat($this->tarif->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->bhp->FormValue == $this->bhp->CurrentValue && is_numeric(ew_StrToFloat($this->bhp->CurrentValue)))\n\t\t\t$this->bhp->CurrentValue = ew_StrToFloat($this->bhp->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\t\t// id_admission\n\t\t// nomr\n\t\t// statusbayar\n\t\t// kelas\n\t\t// tanggal\n\t\t// kode_tindakan\n\t\t// qty\n\t\t// tarif\n\t\t// bhp\n\t\t// user\n\t\t// nama_tindakan\n\t\t// kelompok_tindakan\n\t\t// kelompok1\n\t\t// kelompok2\n\t\t// kode_dokter\n\t\t// no_ruang\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// id\n\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// id_admission\n\t\t$this->id_admission->ViewValue = $this->id_admission->CurrentValue;\n\t\t$this->id_admission->ViewCustomAttributes = \"\";\n\n\t\t// nomr\n\t\t$this->nomr->ViewValue = $this->nomr->CurrentValue;\n\t\t$this->nomr->ViewCustomAttributes = \"\";\n\n\t\t// statusbayar\n\t\t$this->statusbayar->ViewValue = $this->statusbayar->CurrentValue;\n\t\t$this->statusbayar->ViewCustomAttributes = \"\";\n\n\t\t// kelas\n\t\t$this->kelas->ViewValue = $this->kelas->CurrentValue;\n\t\t$this->kelas->ViewCustomAttributes = \"\";\n\n\t\t// tanggal\n\t\t$this->tanggal->ViewValue = $this->tanggal->CurrentValue;\n\t\t$this->tanggal->ViewValue = ew_FormatDateTime($this->tanggal->ViewValue, 7);\n\t\t$this->tanggal->ViewCustomAttributes = \"\";\n\n\t\t// kode_tindakan\n\t\tif (strval($this->kode_tindakan->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->kode_tindakan->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `kode`, `nama_tindakan` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `vw_bill_ranap_data_tarif_tindakan`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->kode_tindakan->LookupFilters = array();\n\t\t$lookuptblfilter = \"`kelompok_tindakan`='5'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->kode_tindakan, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->kode_tindakan->ViewValue = $this->kode_tindakan->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->kode_tindakan->ViewValue = $this->kode_tindakan->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->kode_tindakan->ViewValue = NULL;\n\t\t}\n\t\t$this->kode_tindakan->ViewCustomAttributes = \"\";\n\n\t\t// qty\n\t\t$this->qty->ViewValue = $this->qty->CurrentValue;\n\t\t$this->qty->ViewCustomAttributes = \"\";\n\n\t\t// tarif\n\t\t$this->tarif->ViewValue = $this->tarif->CurrentValue;\n\t\t$this->tarif->ViewCustomAttributes = \"\";\n\n\t\t// bhp\n\t\t$this->bhp->ViewValue = $this->bhp->CurrentValue;\n\t\t$this->bhp->ViewCustomAttributes = \"\";\n\n\t\t// user\n\t\t$this->user->ViewValue = $this->user->CurrentValue;\n\t\t$this->user->ViewCustomAttributes = \"\";\n\n\t\t// nama_tindakan\n\t\t$this->nama_tindakan->ViewValue = $this->nama_tindakan->CurrentValue;\n\t\t$this->nama_tindakan->ViewCustomAttributes = \"\";\n\n\t\t// kelompok_tindakan\n\t\t$this->kelompok_tindakan->ViewValue = $this->kelompok_tindakan->CurrentValue;\n\t\t$this->kelompok_tindakan->ViewCustomAttributes = \"\";\n\n\t\t// kelompok1\n\t\t$this->kelompok1->ViewValue = $this->kelompok1->CurrentValue;\n\t\t$this->kelompok1->ViewCustomAttributes = \"\";\n\n\t\t// kelompok2\n\t\t$this->kelompok2->ViewValue = $this->kelompok2->CurrentValue;\n\t\t$this->kelompok2->ViewCustomAttributes = \"\";\n\n\t\t// kode_dokter\n\t\t$this->kode_dokter->ViewValue = $this->kode_dokter->CurrentValue;\n\t\t$this->kode_dokter->ViewCustomAttributes = \"\";\n\n\t\t// no_ruang\n\t\t$this->no_ruang->ViewValue = $this->no_ruang->CurrentValue;\n\t\t$this->no_ruang->ViewCustomAttributes = \"\";\n\n\t\t\t// id_admission\n\t\t\t$this->id_admission->LinkCustomAttributes = \"\";\n\t\t\t$this->id_admission->HrefValue = \"\";\n\t\t\t$this->id_admission->TooltipValue = \"\";\n\n\t\t\t// nomr\n\t\t\t$this->nomr->LinkCustomAttributes = \"\";\n\t\t\t$this->nomr->HrefValue = \"\";\n\t\t\t$this->nomr->TooltipValue = \"\";\n\n\t\t\t// statusbayar\n\t\t\t$this->statusbayar->LinkCustomAttributes = \"\";\n\t\t\t$this->statusbayar->HrefValue = \"\";\n\t\t\t$this->statusbayar->TooltipValue = \"\";\n\n\t\t\t// kelas\n\t\t\t$this->kelas->LinkCustomAttributes = \"\";\n\t\t\t$this->kelas->HrefValue = \"\";\n\t\t\t$this->kelas->TooltipValue = \"\";\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->LinkCustomAttributes = \"\";\n\t\t\t$this->tanggal->HrefValue = \"\";\n\t\t\t$this->tanggal->TooltipValue = \"\";\n\n\t\t\t// kode_tindakan\n\t\t\t$this->kode_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_tindakan->HrefValue = \"\";\n\t\t\t$this->kode_tindakan->TooltipValue = \"\";\n\n\t\t\t// qty\n\t\t\t$this->qty->LinkCustomAttributes = \"\";\n\t\t\t$this->qty->HrefValue = \"\";\n\t\t\t$this->qty->TooltipValue = \"\";\n\n\t\t\t// tarif\n\t\t\t$this->tarif->LinkCustomAttributes = \"\";\n\t\t\t$this->tarif->HrefValue = \"\";\n\t\t\t$this->tarif->TooltipValue = \"\";\n\n\t\t\t// bhp\n\t\t\t$this->bhp->LinkCustomAttributes = \"\";\n\t\t\t$this->bhp->HrefValue = \"\";\n\t\t\t$this->bhp->TooltipValue = \"\";\n\n\t\t\t// user\n\t\t\t$this->user->LinkCustomAttributes = \"\";\n\t\t\t$this->user->HrefValue = \"\";\n\t\t\t$this->user->TooltipValue = \"\";\n\n\t\t\t// nama_tindakan\n\t\t\t$this->nama_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->nama_tindakan->HrefValue = \"\";\n\t\t\t$this->nama_tindakan->TooltipValue = \"\";\n\n\t\t\t// kelompok_tindakan\n\t\t\t$this->kelompok_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok_tindakan->HrefValue = \"\";\n\t\t\t$this->kelompok_tindakan->TooltipValue = \"\";\n\n\t\t\t// kelompok1\n\t\t\t$this->kelompok1->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok1->HrefValue = \"\";\n\t\t\t$this->kelompok1->TooltipValue = \"\";\n\n\t\t\t// kelompok2\n\t\t\t$this->kelompok2->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok2->HrefValue = \"\";\n\t\t\t$this->kelompok2->TooltipValue = \"\";\n\n\t\t\t// kode_dokter\n\t\t\t$this->kode_dokter->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_dokter->HrefValue = \"\";\n\t\t\t$this->kode_dokter->TooltipValue = \"\";\n\n\t\t\t// no_ruang\n\t\t\t$this->no_ruang->LinkCustomAttributes = \"\";\n\t\t\t$this->no_ruang->HrefValue = \"\";\n\t\t\t$this->no_ruang->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// id_admission\n\t\t\t$this->id_admission->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_admission->EditCustomAttributes = \"\";\n\t\t\tif ($this->id_admission->getSessionValue() <> \"\") {\n\t\t\t\t$this->id_admission->CurrentValue = $this->id_admission->getSessionValue();\n\t\t\t$this->id_admission->ViewValue = $this->id_admission->CurrentValue;\n\t\t\t$this->id_admission->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->id_admission->EditValue = ew_HtmlEncode($this->id_admission->CurrentValue);\n\t\t\t$this->id_admission->PlaceHolder = ew_RemoveHtml($this->id_admission->FldCaption());\n\t\t\t}\n\n\t\t\t// nomr\n\t\t\t$this->nomr->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nomr->EditCustomAttributes = \"\";\n\t\t\tif ($this->nomr->getSessionValue() <> \"\") {\n\t\t\t\t$this->nomr->CurrentValue = $this->nomr->getSessionValue();\n\t\t\t$this->nomr->ViewValue = $this->nomr->CurrentValue;\n\t\t\t$this->nomr->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->nomr->EditValue = ew_HtmlEncode($this->nomr->CurrentValue);\n\t\t\t$this->nomr->PlaceHolder = ew_RemoveHtml($this->nomr->FldCaption());\n\t\t\t}\n\n\t\t\t// statusbayar\n\t\t\t$this->statusbayar->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->statusbayar->EditCustomAttributes = \"\";\n\t\t\tif ($this->statusbayar->getSessionValue() <> \"\") {\n\t\t\t\t$this->statusbayar->CurrentValue = $this->statusbayar->getSessionValue();\n\t\t\t$this->statusbayar->ViewValue = $this->statusbayar->CurrentValue;\n\t\t\t$this->statusbayar->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->statusbayar->EditValue = ew_HtmlEncode($this->statusbayar->CurrentValue);\n\t\t\t$this->statusbayar->PlaceHolder = ew_RemoveHtml($this->statusbayar->FldCaption());\n\t\t\t}\n\n\t\t\t// kelas\n\t\t\t$this->kelas->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelas->EditCustomAttributes = \"\";\n\t\t\tif ($this->kelas->getSessionValue() <> \"\") {\n\t\t\t\t$this->kelas->CurrentValue = $this->kelas->getSessionValue();\n\t\t\t$this->kelas->ViewValue = $this->kelas->CurrentValue;\n\t\t\t$this->kelas->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->kelas->EditValue = ew_HtmlEncode($this->kelas->CurrentValue);\n\t\t\t$this->kelas->PlaceHolder = ew_RemoveHtml($this->kelas->FldCaption());\n\t\t\t}\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tanggal->EditCustomAttributes = \"\";\n\t\t\t$this->tanggal->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->tanggal->CurrentValue, 7));\n\t\t\t$this->tanggal->PlaceHolder = ew_RemoveHtml($this->tanggal->FldCaption());\n\n\t\t\t// kode_tindakan\n\t\t\t$this->kode_tindakan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kode_tindakan->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->kode_tindakan->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->kode_tindakan->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `kode`, `nama_tindakan` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `vw_bill_ranap_data_tarif_tindakan`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->kode_tindakan->LookupFilters = array();\n\t\t\t$lookuptblfilter = \"`kelompok_tindakan`='5'\";\n\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->kode_tindakan, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->kode_tindakan->EditValue = $arwrk;\n\n\t\t\t// qty\n\t\t\t$this->qty->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->qty->EditCustomAttributes = \"\";\n\t\t\t$this->qty->EditValue = ew_HtmlEncode($this->qty->CurrentValue);\n\t\t\t$this->qty->PlaceHolder = ew_RemoveHtml($this->qty->FldCaption());\n\n\t\t\t// tarif\n\t\t\t$this->tarif->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tarif->EditCustomAttributes = \"\";\n\t\t\t$this->tarif->EditValue = ew_HtmlEncode($this->tarif->CurrentValue);\n\t\t\t$this->tarif->PlaceHolder = ew_RemoveHtml($this->tarif->FldCaption());\n\t\t\tif (strval($this->tarif->EditValue) <> \"\" && is_numeric($this->tarif->EditValue)) $this->tarif->EditValue = ew_FormatNumber($this->tarif->EditValue, -2, -1, -2, 0);\n\n\t\t\t// bhp\n\t\t\t$this->bhp->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->bhp->EditCustomAttributes = \"\";\n\t\t\t$this->bhp->EditValue = ew_HtmlEncode($this->bhp->CurrentValue);\n\t\t\t$this->bhp->PlaceHolder = ew_RemoveHtml($this->bhp->FldCaption());\n\t\t\tif (strval($this->bhp->EditValue) <> \"\" && is_numeric($this->bhp->EditValue)) $this->bhp->EditValue = ew_FormatNumber($this->bhp->EditValue, -2, -1, -2, 0);\n\n\t\t\t// user\n\t\t\t$this->user->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->user->EditCustomAttributes = \"\";\n\t\t\t$this->user->EditValue = ew_HtmlEncode($this->user->CurrentValue);\n\t\t\t$this->user->PlaceHolder = ew_RemoveHtml($this->user->FldCaption());\n\n\t\t\t// nama_tindakan\n\t\t\t$this->nama_tindakan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nama_tindakan->EditCustomAttributes = \"\";\n\t\t\t$this->nama_tindakan->EditValue = ew_HtmlEncode($this->nama_tindakan->CurrentValue);\n\t\t\t$this->nama_tindakan->PlaceHolder = ew_RemoveHtml($this->nama_tindakan->FldCaption());\n\n\t\t\t// kelompok_tindakan\n\t\t\t$this->kelompok_tindakan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelompok_tindakan->EditCustomAttributes = \"\";\n\t\t\t$this->kelompok_tindakan->EditValue = ew_HtmlEncode($this->kelompok_tindakan->CurrentValue);\n\t\t\t$this->kelompok_tindakan->PlaceHolder = ew_RemoveHtml($this->kelompok_tindakan->FldCaption());\n\n\t\t\t// kelompok1\n\t\t\t$this->kelompok1->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelompok1->EditCustomAttributes = \"\";\n\t\t\t$this->kelompok1->EditValue = ew_HtmlEncode($this->kelompok1->CurrentValue);\n\t\t\t$this->kelompok1->PlaceHolder = ew_RemoveHtml($this->kelompok1->FldCaption());\n\n\t\t\t// kelompok2\n\t\t\t$this->kelompok2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelompok2->EditCustomAttributes = \"\";\n\t\t\t$this->kelompok2->EditValue = ew_HtmlEncode($this->kelompok2->CurrentValue);\n\t\t\t$this->kelompok2->PlaceHolder = ew_RemoveHtml($this->kelompok2->FldCaption());\n\n\t\t\t// kode_dokter\n\t\t\t$this->kode_dokter->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kode_dokter->EditCustomAttributes = \"\";\n\t\t\t$this->kode_dokter->EditValue = ew_HtmlEncode($this->kode_dokter->CurrentValue);\n\t\t\t$this->kode_dokter->PlaceHolder = ew_RemoveHtml($this->kode_dokter->FldCaption());\n\n\t\t\t// no_ruang\n\t\t\t$this->no_ruang->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->no_ruang->EditCustomAttributes = \"\";\n\t\t\t$this->no_ruang->EditValue = ew_HtmlEncode($this->no_ruang->CurrentValue);\n\t\t\t$this->no_ruang->PlaceHolder = ew_RemoveHtml($this->no_ruang->FldCaption());\n\n\t\t\t// Add refer script\n\t\t\t// id_admission\n\n\t\t\t$this->id_admission->LinkCustomAttributes = \"\";\n\t\t\t$this->id_admission->HrefValue = \"\";\n\n\t\t\t// nomr\n\t\t\t$this->nomr->LinkCustomAttributes = \"\";\n\t\t\t$this->nomr->HrefValue = \"\";\n\n\t\t\t// statusbayar\n\t\t\t$this->statusbayar->LinkCustomAttributes = \"\";\n\t\t\t$this->statusbayar->HrefValue = \"\";\n\n\t\t\t// kelas\n\t\t\t$this->kelas->LinkCustomAttributes = \"\";\n\t\t\t$this->kelas->HrefValue = \"\";\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->LinkCustomAttributes = \"\";\n\t\t\t$this->tanggal->HrefValue = \"\";\n\n\t\t\t// kode_tindakan\n\t\t\t$this->kode_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_tindakan->HrefValue = \"\";\n\n\t\t\t// qty\n\t\t\t$this->qty->LinkCustomAttributes = \"\";\n\t\t\t$this->qty->HrefValue = \"\";\n\n\t\t\t// tarif\n\t\t\t$this->tarif->LinkCustomAttributes = \"\";\n\t\t\t$this->tarif->HrefValue = \"\";\n\n\t\t\t// bhp\n\t\t\t$this->bhp->LinkCustomAttributes = \"\";\n\t\t\t$this->bhp->HrefValue = \"\";\n\n\t\t\t// user\n\t\t\t$this->user->LinkCustomAttributes = \"\";\n\t\t\t$this->user->HrefValue = \"\";\n\n\t\t\t// nama_tindakan\n\t\t\t$this->nama_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->nama_tindakan->HrefValue = \"\";\n\n\t\t\t// kelompok_tindakan\n\t\t\t$this->kelompok_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok_tindakan->HrefValue = \"\";\n\n\t\t\t// kelompok1\n\t\t\t$this->kelompok1->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok1->HrefValue = \"\";\n\n\t\t\t// kelompok2\n\t\t\t$this->kelompok2->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok2->HrefValue = \"\";\n\n\t\t\t// kode_dokter\n\t\t\t$this->kode_dokter->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_dokter->HrefValue = \"\";\n\n\t\t\t// no_ruang\n\t\t\t$this->no_ruang->LinkCustomAttributes = \"\";\n\t\t\t$this->no_ruang->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function app_template_dialogs() {\n global $App;\n $continue = __('continue');\n $cancel = __('cancel');\n $ok = __('ok');\n $dialog_html = <<<HTML\n\n<div id=\"modal-warning\" class=\"abstract-modal-popup\" data-overlay-theme=\"b\">\n <div data-role=\"header\">\n <h1 id=\"modal-warning-label\"></h1>\n </div>\n <div id=\"modal-warning-body\" class=\"ui-content\" data-role=\"main\"></div>\n <div data-role=\"footer\">\n <a href=\"#\" class=\"modal-warning-close\" data-role=\"button\" data-transition=\"flow\">{$continue}</a>\n </div>\n</div>\n \n<div id=\"modal-dialog\" class=\"abstract-modal-popup\" data-overlay-theme=\"b\">\n <div data-role=\"header\">\n <h1 id=\"modal-dialog-label\"></h1>\n </div>\n <div id=\"modal-dialog-body\" class=\"ui-content\" data-role=\"main\"></div>\n <div data-role=\"footer\">\n <a href=\"#\" class=\"modal-dialog-close\" data-role=\"button\" data-inline=\"true\" data-transition=\"flow\">{$continue}</a>\n </div>\n</div>\n \n<div id=\"modal-confirm\" class=\"abstract-modal-popup\" data-overlay-theme=\"b\">\n <div data-role=\"header\">\n <h1 id=\"modal-confirm-label\"></h1>\n </div>\n <div id=\"modal-confirm-body\" class=\"ui-content\" data-role=\"main\"></div>\n <div data-role=\"footer\">\n <a href=\"#\" class=\"modal-confirm-cancel\" data-role=\"button\" data-inline=\"true\" data-transition=\"flow\">{$cancel}</a>\n <a href=\"#\" class=\"modal-confirm-ok\" data-role=\"button\" data-inline=\"true\" data-transition=\"flow\" data-theme=\"b\">{$ok}</a>\n </div>\n</div>\n\nHTML;\n\n return array(\n 'selector' \t=> $App->config('page_content_id'),\n 'pos_func' \t=> 'insertAfter',\n 'html'\t\t=> $dialog_html\n );\n}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Call Row_Rendering event\r\n\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// identries\r\n\t\t// domain_id\r\n\t\t// hash_content\r\n\t\t// fuente\r\n\t\t// published\r\n\t\t// updated\r\n\t\t// categorias\r\n\t\t// titulo\r\n\t\t// contenido\r\n\t\t// id\r\n\t\t// islive\r\n\t\t// thumbnail\r\n\t\t// reqdate\r\n\t\t// author\r\n\t\t// trans_en\r\n\t\t// trans_es\r\n\t\t// trans_fr\r\n\t\t// trans_it\r\n\t\t// fid\r\n\t\t// fmd5\r\n\t\t// tool_id\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// identries\r\n\t\t\t$this->identries->ViewValue = $this->identries->CurrentValue;\r\n\t\t\t$this->identries->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// domain_id\r\n\t\t\tif (strval($this->domain_id->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`id_domains`\" . ew_SearchString(\"=\", $this->domain_id->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `id_domains`, `dominio` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `domains`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->domain_id->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->domain_id->ViewValue = $this->domain_id->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->domain_id->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->domain_id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// hash_content\r\n\t\t\t$this->hash_content->ViewValue = $this->hash_content->CurrentValue;\r\n\t\t\t$this->hash_content->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// fuente\r\n\t\t\t$this->fuente->ViewValue = $this->fuente->CurrentValue;\r\n\t\t\t$this->fuente->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// published\r\n\t\t\t$this->published->ViewValue = $this->published->CurrentValue;\r\n\t\t\t$this->published->ViewValue = ew_FormatDateTime($this->published->ViewValue, 5);\r\n\t\t\t$this->published->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// updated\r\n\t\t\t$this->updated->ViewValue = $this->updated->CurrentValue;\r\n\t\t\t$this->updated->ViewValue = ew_FormatDateTime($this->updated->ViewValue, 5);\r\n\t\t\t$this->updated->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// categorias\r\n\t\t\t$this->categorias->ViewValue = $this->categorias->CurrentValue;\r\n\t\t\t$this->categorias->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// titulo\r\n\t\t\t$this->titulo->ViewValue = $this->titulo->CurrentValue;\r\n\t\t\t$this->titulo->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// id\r\n\t\t\t$this->id->ViewValue = $this->id->CurrentValue;\r\n\t\t\t$this->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// islive\r\n\t\t\t$this->islive->ViewValue = $this->islive->CurrentValue;\r\n\t\t\t$this->islive->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// thumbnail\r\n\t\t\t$this->thumbnail->ViewValue = $this->thumbnail->CurrentValue;\r\n\t\t\t$this->thumbnail->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// reqdate\r\n\t\t\t$this->reqdate->ViewValue = $this->reqdate->CurrentValue;\r\n\t\t\t$this->reqdate->ViewValue = ew_FormatDateTime($this->reqdate->ViewValue, 5);\r\n\t\t\t$this->reqdate->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// author\r\n\t\t\t$this->author->ViewValue = $this->author->CurrentValue;\r\n\t\t\t$this->author->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// trans_en\r\n\t\t\t$this->trans_en->ViewValue = $this->trans_en->CurrentValue;\r\n\t\t\t$this->trans_en->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// trans_es\r\n\t\t\t$this->trans_es->ViewValue = $this->trans_es->CurrentValue;\r\n\t\t\t$this->trans_es->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// trans_fr\r\n\t\t\t$this->trans_fr->ViewValue = $this->trans_fr->CurrentValue;\r\n\t\t\t$this->trans_fr->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// trans_it\r\n\t\t\t$this->trans_it->ViewValue = $this->trans_it->CurrentValue;\r\n\t\t\t$this->trans_it->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// fid\r\n\t\t\t$this->fid->ViewValue = $this->fid->CurrentValue;\r\n\t\t\t$this->fid->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// fmd5\r\n\t\t\t$this->fmd5->ViewValue = $this->fmd5->CurrentValue;\r\n\t\t\t$this->fmd5->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// tool_id\r\n\t\t\t$this->tool_id->ViewValue = $this->tool_id->CurrentValue;\r\n\t\t\t$this->tool_id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// identries\r\n\t\t\t$this->identries->LinkCustomAttributes = \"\";\r\n\t\t\t$this->identries->HrefValue = \"\";\r\n\t\t\t$this->identries->TooltipValue = \"\";\r\n\r\n\t\t\t// titulo\r\n\t\t\t$this->titulo->LinkCustomAttributes = \"\";\r\n\t\t\t$this->titulo->HrefValue = \"\";\r\n\t\t\t$this->titulo->TooltipValue = \"\";\r\n\r\n\t\t\t// id\r\n\t\t\t$this->id->LinkCustomAttributes = \"\";\r\n\t\t\t$this->id->HrefValue = \"\";\r\n\t\t\t$this->id->TooltipValue = \"\";\r\n\r\n\t\t\t// islive\r\n\t\t\t$this->islive->LinkCustomAttributes = \"\";\r\n\t\t\t$this->islive->HrefValue = \"\";\r\n\t\t\t$this->islive->TooltipValue = \"\";\r\n\r\n\t\t\t// tool_id\r\n\t\t\t$this->tool_id->LinkCustomAttributes = \"\";\r\n\t\t\t$this->tool_id->HrefValue = \"\";\r\n\t\t\t$this->tool_id->TooltipValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Call Row_Rendering event\r\n\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// id\r\n\t\t// datetime\r\n\t\t// script\r\n\t\t// user\r\n\t\t// action\r\n\t\t// table\r\n\t\t// field\r\n\t\t// keyvalue\r\n\t\t// oldvalue\r\n\t\t// newvalue\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// id\r\n\t\t\t$this->id->ViewValue = $this->id->CurrentValue;\r\n\t\t\t$this->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// datetime\r\n\t\t\t$this->datetime->ViewValue = $this->datetime->CurrentValue;\r\n\t\t\t$this->datetime->ViewValue = ew_FormatDateTime($this->datetime->ViewValue, 5);\r\n\t\t\t$this->datetime->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->ViewValue = $this->script->CurrentValue;\r\n\t\t\t$this->script->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->ViewValue = $this->user->CurrentValue;\r\n\t\t\t$this->user->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->ViewValue = $this->action->CurrentValue;\r\n\t\t\t$this->action->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->ViewValue = $this->_table->CurrentValue;\r\n\t\t\t$this->_table->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->ViewValue = $this->_field->CurrentValue;\r\n\t\t\t$this->_field->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->ViewValue = $this->keyvalue->CurrentValue;\r\n\t\t\t$this->keyvalue->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->ViewValue = $this->oldvalue->CurrentValue;\r\n\t\t\t$this->oldvalue->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->ViewValue = $this->newvalue->CurrentValue;\r\n\t\t\t$this->newvalue->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// datetime\r\n\t\t\t$this->datetime->LinkCustomAttributes = \"\";\r\n\t\t\t$this->datetime->HrefValue = \"\";\r\n\t\t\t$this->datetime->TooltipValue = \"\";\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->LinkCustomAttributes = \"\";\r\n\t\t\t$this->script->HrefValue = \"\";\r\n\t\t\t$this->script->TooltipValue = \"\";\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->LinkCustomAttributes = \"\";\r\n\t\t\t$this->user->HrefValue = \"\";\r\n\t\t\t$this->user->TooltipValue = \"\";\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->LinkCustomAttributes = \"\";\r\n\t\t\t$this->action->HrefValue = \"\";\r\n\t\t\t$this->action->TooltipValue = \"\";\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->LinkCustomAttributes = \"\";\r\n\t\t\t$this->_table->HrefValue = \"\";\r\n\t\t\t$this->_table->TooltipValue = \"\";\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->LinkCustomAttributes = \"\";\r\n\t\t\t$this->_field->HrefValue = \"\";\r\n\t\t\t$this->_field->TooltipValue = \"\";\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->LinkCustomAttributes = \"\";\r\n\t\t\t$this->keyvalue->HrefValue = \"\";\r\n\t\t\t$this->keyvalue->TooltipValue = \"\";\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->LinkCustomAttributes = \"\";\r\n\t\t\t$this->oldvalue->HrefValue = \"\";\r\n\t\t\t$this->oldvalue->TooltipValue = \"\";\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->LinkCustomAttributes = \"\";\r\n\t\t\t$this->newvalue->HrefValue = \"\";\r\n\t\t\t$this->newvalue->TooltipValue = \"\";\r\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\r\n\r\n\t\t\t// datetime\r\n\t\t\t$this->datetime->EditCustomAttributes = \"\";\r\n\t\t\t$this->datetime->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->datetime->CurrentValue, 5));\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->EditCustomAttributes = \"\";\r\n\t\t\t$this->script->EditValue = ew_HtmlEncode($this->script->CurrentValue);\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->EditCustomAttributes = \"\";\r\n\t\t\t$this->user->EditValue = ew_HtmlEncode($this->user->CurrentValue);\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->EditCustomAttributes = \"\";\r\n\t\t\t$this->action->EditValue = ew_HtmlEncode($this->action->CurrentValue);\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->EditCustomAttributes = \"\";\r\n\t\t\t$this->_table->EditValue = ew_HtmlEncode($this->_table->CurrentValue);\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->EditCustomAttributes = \"\";\r\n\t\t\t$this->_field->EditValue = ew_HtmlEncode($this->_field->CurrentValue);\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->EditCustomAttributes = \"\";\r\n\t\t\t$this->keyvalue->EditValue = ew_HtmlEncode($this->keyvalue->CurrentValue);\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->EditCustomAttributes = \"\";\r\n\t\t\t$this->oldvalue->EditValue = ew_HtmlEncode($this->oldvalue->CurrentValue);\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->EditCustomAttributes = \"\";\r\n\t\t\t$this->newvalue->EditValue = ew_HtmlEncode($this->newvalue->CurrentValue);\r\n\r\n\t\t\t// Edit refer script\r\n\t\t\t// datetime\r\n\r\n\t\t\t$this->datetime->HrefValue = \"\";\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->HrefValue = \"\";\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->HrefValue = \"\";\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->HrefValue = \"\";\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->HrefValue = \"\";\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->HrefValue = \"\";\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->HrefValue = \"\";\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->HrefValue = \"\";\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->HrefValue = \"\";\r\n\t\t}\r\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$this->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "private function newRow(){\n\t\t$r = new HtmlBox('tr');\n\t\tfor($i=0;$i<$this->col;$i++)\n\t\t\t$r->add(new HtmlBox('td')) ;\n\t\t$this->row++;\n\t\t$this->add($r);\n\t\treturn $this;\n\t}", "private function populateParentInfo(&$rows) {\n $invoice_url_template = Router::assemble('invoice', array('invoice_id' => '-INVOICE-ID-'));\n \t$project_url_template = Router::assemble('project', array('project_slug' => '-PROJECT-SLUG-'));\n\n foreach($rows as &$row) {\n $row['parent'] = array(\n 'name' => lang('Unknown'),\n 'view_url' => '#',\n );\n\n $row['project'] = array(\n 'id' => 0,\n 'name' => lang('Unknown'),\n 'view_url' => '#',\n );\n\n if($row['parent_type'] == 'Invoice') {\n $parent = DB::executeFirstRow('SELECT project_id, varchar_field_1 as number FROM ' . TABLE_PREFIX . 'invoice_objects WHERE id = ?', $row['parent_id']);\n\n if($parent) {\n $row['parent']['name'] = lang(':invoice_show_as #:invoice_num', array(\n 'invoice_show_as' => Invoices::printInvoiceAs(),\n 'invoice_num' => $parent['number']\n ));\n\n $row['parent']['view_url'] = str_replace('-INVOICE-ID-', $row['parent_id'], $invoice_url_template);\n } // if\n\n if($parent['project_id']) {\n $project = DB::executeFirstRow('SELECT id, name, slug FROM ' . TABLE_PREFIX . 'projects WHERE id = ? AND state >= ?', $parent['project_id'], STATE_ARCHIVED);\n\n if($project) {\n $row['project']['id'] = (integer) $project['id'];\n $row['project']['name'] = $project['name'];\n $row['project']['view_url'] = str_replace('-PROJECT-SLUG-', $project['slug'], $project_url_template);\n } // if\n } // if\n } // if\n } // foreach\n\n unset($row); // just in case\n }", "function edit($record=\"\", $fieldprefix=\"\") \n { \n global $config_atkroot; \n\n $id = $fieldprefix.$this->fieldName(); \n $this->registerKeyListener($id, KB_CTRLCURSOR); \n\n $result= '<textarea id=\"'.$id.'\" name=\"'.$id.'\" style=\"width: '.$this->m_size_array[0].'px; height: '.$this->m_size_array[1].'px;\" '. \n '>'.htmlspecialchars($record[$this->fieldName()]).'</textarea>'; \n\n $this->registerMce(); \n\n if(is_array($this->m_templates)) \n { \n $page = &atkPage::getInstance(); \n\n $js .= \"\\n\\nvar templates_{$this->m_name} = new Array(\"; \n $ui = &$this->m_ownerInstance->getUi(); \n foreach($this->m_templates as $template_key => $template_value) \n { \n $html_template = ereg_replace(\"[\\r\\t]\", '', $ui->render($template_value)); \n $html_template = ereg_replace(\"[\\n]\", '\\n', $html_template); \n $html_template = str_replace(\"'\", \"\\'\", $html_template); \n $html_template = str_replace(\" \", \" \", $html_template); \n $js .= \"'$html_template',\\n\"; \n } \n $js .= \"'a');\"; \n $js .= \"\\n\\nfunction AppendContent_{$this->m_name}(){\\n\"; \n $js .= \" var index = document.forms[0].template_choice_{$this->m_name}.selectedIndex;\\n\"; \n $js .= \" tinyMCE.execInstanceCommand('{$this->m_name}', 'mceInsertContent',false, templates_{$this->m_name}[index]);\\n\"; \n $js .= \"}\\n\"; \n $page->register_scriptcode($js); \n\n $result .= \"<br><select name=\\\"template_choice_{$this->m_name}\\\">\"; \n foreach($this->m_templates as $template_key => $template_value) \n { \n $result .= '<option value=\"'.$template_key.'\">'.$template_key.'</option>'; \n } \n $result .= '</select>'; \n $result .= \"<input type=\\\"button\\\" name=\\\"template_append\\\" value=\\\"\".text('mce_template_apply').\"\\\" onClick=\\\"AppendContent_{$this->m_name}()\\\">\"; \n } \n\n return $result; \n }", "public function makeLabLines($rows, $cb = false) {\n $rev_level = rev('getLevels', $this->tlist);\n $rev_affil = rev('getAffiliations', $this->tlist);\n $rev_type = rev('getLTypes', $this->tlist);\n $edit_users = array('ADMIN','USER','APPROVER');\n $ct = 0;\n $tout = array();\n $tout[] = '<table style=\"margin-left:50px;color:black;\">';\n $tout[] = \"<tr class='even'>\";\n if ($cb) {\n $first = \"<td style='width:55px;'>Select/<br />Deselect All</td>\";\n } else {\n $first = \"<td style='width:55px;'></td>\";\n }\n $etop = '';\n #if (in_array($this->usertype, $edit_users)) {\n # $etop = \"<td style='width:50px;'></td>\";\n #}\n $tout[] = <<<\"END\"\n{$first}\n<td style='width:100px;font-weight:bold;'>Lab Number</td>\n<td style='width:200px;font-weight:bold;'>Labname</td>\n<td style='width:85px;font-weight:bold;'>Country</td>\n<td style='width:100px;font-weight:bold;'>Level</td>\n<td style='width:145px;font-weight:bold;'>Affiliation</td>\n<td style='width:145px;font-weight:bold;'>SLMTA Lab Type</td>\n{$etop}</tr>\nEND;\n foreach($rows as $row) {\n //logit(\"LAB: \" . print_r($row, true));\n $ct ++;\n $cls = ($ct % 2 == 0) ? 'even' : 'odd';\n $edit = '';\n #if (in_array($this->usertype, $edit_users)) {\n # $edit = \"<a href=\\\"{$this->baseurl}/lab/edit/{$row['id']}\\\"\" .\n # \" class=\\\"btn btn-mini btn-warning\\\">Edit</a>\";\n #}\n $line = '';\n if ($cb) {\n $name = \"cb_{$row['id']}\";\n $line .= \"<td style='width:40px;padding:2px 0;'>\" .\n \"<input type='checkbox' name='{$name}' id='{$name}'></td>\";\n } else if ($this->labnum == $row['labnum']) {\n $cls = 'hilight';\n $line .= \"<td><div style=\\\"color:red;\\\">Selected</div></td>\";\n } else {\n $butt = \"<a href=\\\"{$this->baseurl}/lab/choose/{$row['id']}\\\"\" .\n \" class=\\\"btn btn-mini btn-success\\\">Select</a>\";\n $line .= \"<td style='width:55px;padding:2px 0;'>{$butt}</td>\";\n }\n //$tout[] = \"<tr class='{$cls}'>\";\n\n $tout[] = <<<\"END\"\n<tr class=\"{$cls}\">\n{$line}\n<td>{$row['labnum']}</td>\n<td>{$row['labname']}</td>\n<td>{$row['country']}</td>\n<td><p class=\"small\">{$rev_level[$row['lablevel']]}</p></td>\n<td><p class=\"small\">{$rev_affil[$row['labaffil']]}</p></td>\n<td><p class=\"small\">{$rev_type[$row['slmta_labtype']]}</p></td>\nEND;\n\n if ($edit != '')\n $tout[] = \"<td style='width:40px;padding:2px 0;'>{$edit}</td>\";\n $tout[] = '</tr>';\n // \"<td style='width:45px;font-weight:bold;'>SLMTA</td>\" .\n // <td>{$sl}</td>\n }\n\n $tout[] = '</table>';\n $this->view->showlines = implode(\"\\n\", $tout);\n }", "function render_row ($row_info, $lang)\n {\n global $func, $DB, $conf, $vnT;\n $row = $row_info;\n // Xu ly tung ROW\n $id = $row['id'];\n $row_id = \"row_\" . $id;\n //if ($id > 7) {\n $output['check_box'] = vnT_HTML::checkbox(\"del_id[]\", $id, 0, \" \");\n //}\n $link_edit = $this->linkUrl . \"&sub=edit&id={$id}\";\n $link_del = \"javascript:del_item('\" . $this->linkUrl . \"&sub=del&csrf_token=\".$_SESSION['vnt_csrf_token'].\"&id={$id}')\";\n $output['order'] = \"<input name=\\\"txt_Order[{$id}]\\\" type=\\\"text\\\" size=\\\"2\\\" maxlength=\\\"2\\\" style=\\\"text-align:center\\\" value=\\\"{$row['display_order']}\\\" onkeypress=\\\"return is_num(event,'txtOrder')\\\" onchange='javascript:do_check($id)' />\";\n $output['name'] = \"<a href=\\\"{$link_edit}\\\"><strong>\" . $row['name'] . \"</strong></a>\";\n $output['kichthuoc'] = $row['width'] . \" X \" . $row['height'];\n $arr_type_show = array(\n 0 => 'Theo chiều dọc' , \n 1 => 'Theo chiều ngang' , \n 2 => 'Marquee up' , \n 3 => 'Marquee down' , \n 4 => 'Marquee left' , \n 5 => 'Marquee right');\n $output['type_show'] = $arr_type_show[$row['type_show']];\n $output['align'] = $row['align'];\n $text_edit = \"ad_pos|title|id=\" . $id;\n $output['title'] = \"<strong><span id='edit-text-\" . $id . \"' onClick=\\\"quick_edit('edit-text-\" . $id . \"','$text_edit');\\\">\" . $func->HTML($row['title']) . \"</span></strong>\";\n\n\n $link_display = $this->linkUrl . $row['ext_link'].\"&csrf_token=\".$_SESSION['vnt_csrf_token'];\n if ($row['display'] == 1) {\n $display = \"<a class='i-display' href='\" . $link_display . \"&do_hidden=$id' data-toggle='tooltip' data-placement='top' title='\" . $vnT->lang['click_do_hidden'] . \"' ><i class='fa fa-eye' ></i></a>\";\n } else {\n $display = \"<a class='i-display' href='\" . $link_display . \"&do_display=$id' data-toggle='tooltip' data-placement='top' title='\" . $vnT->lang['click_do_display'] . \"' ><i class='fa fa-eye-slash' ></i></a>\";\n }\n\n\n $output['action'] = '<div class=\"action-buttons\"><input name=h_id[]\" type=\"hidden\" value=\"' . $id . '\" />';\n $output['action'] .= '<a href=\"' . $link_edit . '\" class=\"i-edit\" ><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></a>';\n $output['action'] .= $display;\n $output['action'] .= '<a href=\"' . $link_del . '\" class=\"i-del\" ><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i></a>';\n $output['action'] .= '</div>';\n\n return $output;\n }", "protected function _prepareRowsAction() {\n \n }", "public function makeControl($table, $row)\n {\n \n $rowUid = $row['uid'];\n if (ExtensionManagementUtility::isLoaded('version') && isset($row['_ORIG_uid'])) {\n $rowUid = $row['_ORIG_uid'];\n }\n $cells = [\n 'primary' => [],\n 'secondary' => []\n ];\n // If the listed table is 'pages' we have to request the permission settings for each page:\n $localCalcPerms = 0;\n if ($table === 'pages') {\n $localCalcPerms = $this->getBackendUserAuthentication()->calcPerms(BackendUtility::getRecord('pages', $row['uid']));\n }\n $permsEdit = $table === 'pages'\n && $this->getBackendUserAuthentication()->checkLanguageAccess(0)\n && $localCalcPerms & Permission::PAGE_EDIT\n || $table !== 'pages'\n && $this->calcPerms & Permission::CONTENT_EDIT\n && $this->getBackendUserAuthentication()->recordEditAccessInternals($table, $row);\n $permsEdit = $this->overlayEditLockPermissions($table, $row, $permsEdit);\n // \"Show\" link (only pages and tt_content elements)\n if ($table === 'pages' || $table === 'tt_content') {\n $onClick = $this->getOnClickForRow($table, $row);\n $viewAction = '<a class=\"btn btn-default\" href=\"#\" onclick=\"'\n . htmlspecialchars($onClick) . '\" title=\"' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage')) . '\">'\n . $this->iconFactory->getIcon('actions-view', Icon::SIZE_SMALL)->render() . '</a>';\n $this->addActionToCellGroup($cells, $viewAction, 'view');\n }\n // \"Edit\" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)\n if ($permsEdit) {\n $params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';\n $iconIdentifier = 'actions-open';\n if ($table === 'pages') {\n $iconIdentifier = 'actions-page-open';\n }\n $overlayIdentifier = !$this->isEditable($table) ? 'overlay-readonly' : null;\n $editAction = '<a class=\"btn btn-default\" href=\"#\" onclick=\"' . htmlspecialchars(BackendUtility::editOnClick($params, '', -1))\n . '\" title=\"' . htmlspecialchars($this->getLanguageService()->getLL('edit')) . '\">' . $this->iconFactory->getIcon($iconIdentifier, Icon::SIZE_SMALL, $overlayIdentifier)->render() . '</a>';\n } else {\n $editAction = $this->spaceIcon;\n }\n $this->addActionToCellGroup($cells, $editAction, 'edit');\n // \"Info\": (All records)\n $onClick = 'top.launchView(' . GeneralUtility::quoteJSvalue($table) . ', ' . (int)$row['uid'] . '); return false;';\n $viewBigAction = '<a class=\"btn btn-default\" href=\"#\" onclick=\"' . htmlspecialchars($onClick) . '\" title=\"' . htmlspecialchars($this->getLanguageService()->getLL('showInfo')) . '\">'\n . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL)->render() . '</a>';\n $this->addActionToCellGroup($cells, $viewBigAction, 'viewBig');\n // \"Move\" wizard link for pages/tt_content elements:\n if ($permsEdit && ($table === 'tt_content' || $table === 'pages')) {\n $onClick = 'return jumpExt(' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('move_element') . '&table=' . $table . '&uid=' . $row['uid']) . ');';\n $linkTitleLL = htmlspecialchars($this->getLanguageService()->getLL('move_' . ($table === 'tt_content' ? 'record' : 'page')));\n $icon = ($table === 'pages' ? $this->iconFactory->getIcon('actions-page-move', Icon::SIZE_SMALL) : $this->iconFactory->getIcon('actions-document-move', Icon::SIZE_SMALL));\n $moveAction = '<a class=\"btn btn-default\" href=\"#\" onclick=\"' . htmlspecialchars($onClick) . '\" title=\"' . $linkTitleLL . '\">' . $icon->render() . '</a>';\n $this->addActionToCellGroup($cells, $moveAction, 'move');\n }\n // If the table is NOT a read-only table, then show these links:\n if ($this->isEditable($table)) {\n // \"Revert\" link (history/undo)\n $moduleUrl = BackendUtility::getModuleUrl('record_history', ['element' => $table . ':' . $row['uid']]);\n $onClick = 'return jumpExt(' . GeneralUtility::quoteJSvalue($moduleUrl) . ',\\'#latest\\');';\n $historyAction = '<a class=\"btn btn-default\" href=\"#\" onclick=\"' . htmlspecialchars($onClick) . '\" title=\"'\n . htmlspecialchars($this->getLanguageService()->getLL('history')) . '\">'\n . $this->iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL)->render() . '</a>';\n /**\n * CUSTOM DONT SHOW HISTORY BUTTON\n * $this->addActionToCellGroup($cells, $historyAction, 'history');\n */ \n \n // Versioning:\n if (ExtensionManagementUtility::isLoaded('version') && ExtensionManagementUtility::isLoaded('compatibility7') && !ExtensionManagementUtility::isLoaded('workspaces')) {\n $vers = BackendUtility::selectVersionsOfRecord($table, $row['uid'], 'uid', $this->getBackendUserAuthentication()->workspace, false, $row);\n // If table can be versionized.\n if (is_array($vers)) {\n $href = BackendUtility::getModuleUrl('web_txversionM1', [\n 'table' => $table, 'uid' => $row['uid']\n ]);\n $versionAction = '<a class=\"btn btn-default\" href=\"' . htmlspecialchars($href) . '\" title=\"'\n . htmlspecialchars($this->getLanguageService()->getLL('displayVersions')) . '\">'\n . $this->iconFactory->getIcon('actions-version-page-open', Icon::SIZE_SMALL)->render() . '</a>';\n $this->addActionToCellGroup($cells, $versionAction, 'version');\n }\n }\n // \"Edit Perms\" link:\n if ($table === 'pages' && $this->getBackendUserAuthentication()->check('modules', 'system_BeuserTxPermission') && ExtensionManagementUtility::isLoaded('beuser')) {\n $href = BackendUtility::getModuleUrl('system_BeuserTxPermission') . '&id=' . $row['uid'] . '&tx_beuser_system_beusertxpermission[action]=edit' . $this->makeReturnUrl();\n $permsAction = '<a class=\"btn btn-default\" href=\"' . htmlspecialchars($href) . '\" title=\"'\n . htmlspecialchars($this->getLanguageService()->getLL('permissions')) . '\">'\n . $this->iconFactory->getIcon('actions-lock', Icon::SIZE_SMALL)->render() . '</a>'; \n $this->addActionToCellGroup($cells, $permsAction, 'perms');\n }\n // \"New record after\" link (ONLY if the records in the table are sorted by a \"sortby\"-row\n // or if default values can depend on previous record):\n if (($GLOBALS['TCA'][$table]['ctrl']['sortby'] || $GLOBALS['TCA'][$table]['ctrl']['useColumnsForDefaultValues']) && $permsEdit) {\n if ($table !== 'pages' && $this->calcPerms & Permission::CONTENT_EDIT || $table === 'pages' && $this->calcPerms & Permission::PAGE_NEW) {\n if ($this->showNewRecLink($table)) {\n $params = '&edit[' . $table . '][' . -($row['_MOVE_PLH'] ? $row['_MOVE_PLH_uid'] : $row['uid']) . ']=new';\n $icon = ($table === 'pages' ? $this->iconFactory->getIcon('actions-page-new', Icon::SIZE_SMALL) : $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL));\n $titleLabel = 'new';\n if ($GLOBALS['TCA'][$table]['ctrl']['sortby']) {\n $titleLabel .= ($table === 'pages' ? 'Page' : 'Record');\n }\n $newAction = '<a class=\"btn btn-default\" href=\"#\" onclick=\"' . htmlspecialchars(BackendUtility::editOnClick($params, '', -1))\n . '\" title=\"' . htmlspecialchars($this->getLanguageService()->getLL($titleLabel)) . '\">'\n . $icon->render() . '</a>';\n $this->addActionToCellGroup($cells, $newAction, 'new');\n }\n }\n }\n // \"Up/Down\" links\n if ($permsEdit && $GLOBALS['TCA'][$table]['ctrl']['sortby'] && !$this->sortField && !$this->searchLevels) {\n if (isset($this->currentTable['prev'][$row['uid']])) {\n // Up\n $params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . $this->currentTable['prev'][$row['uid']];\n $moveUpAction = '<a class=\"btn btn-default\" href=\"#\" onclick=\"'\n . htmlspecialchars('return jumpToUrl(' . BackendUtility::getLinkToDataHandlerAction($params, -1) . ');')\n . '\" title=\"' . htmlspecialchars($this->getLanguageService()->getLL('moveUp')) . '\">'\n . $this->iconFactory->getIcon('actions-move-up', Icon::SIZE_SMALL)->render() . '</a>';\n } else {\n $moveUpAction = $this->spaceIcon;\n }\n $this->addActionToCellGroup($cells, $moveUpAction, 'moveUp');\n\n if ($this->currentTable['next'][$row['uid']]) {\n // Down\n $params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . $this->currentTable['next'][$row['uid']];\n $moveDownAction = '<a class=\"btn btn-default\" href=\"#\" onclick=\"'\n . htmlspecialchars('return jumpToUrl(' . BackendUtility::getLinkToDataHandlerAction($params, -1) . ');')\n . '\" title=\"' . htmlspecialchars($this->getLanguageService()->getLL('moveDown')) . '\">'\n . $this->iconFactory->getIcon('actions-move-down', Icon::SIZE_SMALL)->render() . '</a>';\n } else {\n $moveDownAction = $this->spaceIcon;\n }\n $this->addActionToCellGroup($cells, $moveDownAction, 'moveDown');\n }\n // \"Hide/Unhide\" links:\n $hiddenField = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'];\n\n if (\n !empty($GLOBALS['TCA'][$table]['columns'][$hiddenField])\n && (empty($GLOBALS['TCA'][$table]['columns'][$hiddenField]['exclude'])\n || $this->getBackendUserAuthentication()->check('non_exclude_fields', $table . ':' . $hiddenField))\n ) {\n if (!$permsEdit || $this->isRecordCurrentBackendUser($table, $row)) {\n $hideAction = $this->spaceIcon;\n } else {\n $hideTitle = htmlspecialchars($this->getLanguageService()->getLL('hide' . ($table === 'pages' ? 'Page' : '')));\n $unhideTitle = htmlspecialchars($this->getLanguageService()->getLL('unHide' . ($table === 'pages' ? 'Page' : '')));\n if ($row[$hiddenField]) {\n $params = 'data[' . $table . '][' . $rowUid . '][' . $hiddenField . ']=0';\n $hideAction = '<a class=\"btn btn-default t3js-record-hide\" data-state=\"hidden\" href=\"#\"'\n . ' data-params=\"' . htmlspecialchars($params) . '\"'\n . ' title=\"' . $unhideTitle . '\"'\n . ' data-toggle-title=\"' . $hideTitle . '\">'\n . $this->iconFactory->getIcon('actions-edit-unhide', Icon::SIZE_SMALL)->render() . '</a>';\n } else {\n $params = 'data[' . $table . '][' . $rowUid . '][' . $hiddenField . ']=1';\n $hideAction = '<a class=\"btn btn-default t3js-record-hide\" data-state=\"visible\" href=\"#\"'\n . ' data-params=\"' . htmlspecialchars($params) . '\"'\n . ' title=\"' . $hideTitle . '\"'\n . ' data-toggle-title=\"' . $unhideTitle . '\">'\n . $this->iconFactory->getIcon('actions-edit-hide', Icon::SIZE_SMALL)->render() . '</a>';\n }\n }\n $this->addActionToCellGroup($cells, $hideAction, 'hide');\n }\n // \"Delete\" link:\n $disableDeleteTS = $this->getBackendUserAuthentication()->getTSConfig('options.disableDelete');\n $disableDelete = (bool) trim(isset($disableDeleteTS['properties'][$table]) ? $disableDeleteTS['properties'][$table] : $disableDeleteTS['value']);\n if ($permsEdit && !$disableDelete && ($table === 'pages' && $localCalcPerms & Permission::PAGE_DELETE || $table !== 'pages' && $this->calcPerms & Permission::CONTENT_EDIT)) {\n // Check if the record version is in \"deleted\" state, because that will switch the action to \"restore\"\n if ($this->getBackendUserAuthentication()->workspace > 0 && isset($row['t3ver_state']) && (int)$row['t3ver_state'] === 2) {\n $actionName = 'restore'; \n $refCountMsg = '';\n } else {\n $actionName = 'delete';\n $refCountMsg = BackendUtility::referenceCount(\n $table,\n $row['uid'],\n ' ' . $this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.referencesToRecord'),\n $this->getReferenceCount($table, $row['uid'])\n ) . BackendUtility::translationCount(\n $table,\n $row['uid'],\n ' ' . $this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.translationsOfRecord')\n );\n }\n\n if ($this->isRecordCurrentBackendUser($table, $row)) {\n $deleteAction = $this->spaceIcon;\n } else {\n $title = BackendUtility::getRecordTitle($table, $row);\n $warningText = $this->getLanguageService()->getLL($actionName . 'Warning') . ' \"' . $title . '\" ' . '[' . $table . ':' . $row['uid'] . ']' . $refCountMsg;\n\n $params = 'cmd[' . $table . '][' . $row['uid'] . '][delete]=1';\n $icon = $this->iconFactory->getIcon('actions-edit-' . $actionName, Icon::SIZE_SMALL)->render();\n $linkTitle = htmlspecialchars($this->getLanguageService()->getLL($actionName));\n $deleteAction = '<a class=\"btn btn-default t3js-record-delete\" href=\"#\" '\n . ' data-l10parent=\"' . htmlspecialchars($row['l10n_parent']) . '\"'\n . ' data-params=\"' . htmlspecialchars($params) . '\" data-title=\"' . htmlspecialchars($title) . '\"'\n . ' data-message=\"' . htmlspecialchars($warningText) . '\" title=\"' . $linkTitle . '\"'\n . '>' . $icon . '</a>';\n }\n } else {\n $deleteAction = $this->spaceIcon;\n }\n DebuggerUtility::var_dump($deleteAction, 'DeleteAction in Test Record List');\n $this->addActionToCellGroup($cells, $deleteAction, 'delete');\n // \"Levels\" links: Moving pages into new levels...\n if ($permsEdit && $table === 'pages' && !$this->searchLevels) {\n // Up (Paste as the page right after the current parent page)\n if ($this->calcPerms & Permission::PAGE_NEW) {\n $params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . -$this->id;\n $moveLeftAction = '<a class=\"btn btn-default\" href=\"#\" onclick=\"'\n . htmlspecialchars('return jumpToUrl(' . BackendUtility::getLinkToDataHandlerAction($params, -1) . ');')\n . '\" title=\"' . htmlspecialchars($this->getLanguageService()->getLL('prevLevel')) . '\">'\n . $this->iconFactory->getIcon('actions-move-left', Icon::SIZE_SMALL)->render() . '</a>';\n $this->addActionToCellGroup($cells, $moveLeftAction, 'moveLeft');\n }\n // Down (Paste as subpage to the page right above)\n if ($this->currentTable['prevUid'][$row['uid']]) {\n $localCalcPerms = $this->getBackendUserAuthentication()->calcPerms(BackendUtility::getRecord('pages', $this->currentTable['prevUid'][$row['uid']]));\n if ($localCalcPerms & Permission::PAGE_NEW) {\n $params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . $this->currentTable['prevUid'][$row['uid']];\n $moveRightAction = '<a class=\"btn btn-default\" href=\"#\" onclick=\"'\n . htmlspecialchars('return jumpToUrl(' . BackendUtility::getLinkToDataHandlerAction($params, -1) . ');')\n . '\" title=\"' . htmlspecialchars($this->getLanguageService()->getLL('nextLevel')) . '\">'\n . $this->iconFactory->getIcon('actions-move-right', Icon::SIZE_SMALL)->render() . '</a>';\n } else {\n $moveRightAction = $this->spaceIcon;\n }\n } else {\n $moveRightAction = $this->spaceIcon;\n }\n $this->addActionToCellGroup($cells, $moveRightAction, 'moveRight');\n }\n }\n /**\n * @hook recStatInfoHooks: Allows to insert HTML before record icons on various places\n */\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'])) {\n $stat = '';\n $_params = [$table, $row['uid']];\n foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] as $_funcRef) {\n $stat .= GeneralUtility::callUserFunction($_funcRef, $_params, $this);\n }\n $this->addActionToCellGroup($cells, $stat, 'stat');\n }\n /**\n * @hook makeControl: Allows to change control icons of records in list-module\n * @usage This hook method gets passed the current $cells array as third parameter.\n * This array contains values for the icons/actions generated for each record in Web>List.\n * Each array entry is accessible by an index-key.\n * The order of the icons is depending on the order of those array entries.\n */\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'])) {\n // for compatibility reason, we move all icons to the rootlevel\n // before calling the hooks\n foreach ($cells as $section => $actions) {\n foreach ($actions as $actionKey => $action) {\n $cells[$actionKey] = $action;\n }\n }\n foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData) {\n $hookObject = GeneralUtility::getUserObj($classData);\n if (!$hookObject instanceof RecordListHookInterface) {\n throw new \\UnexpectedValueException($classData . ' must implement interface ' . RecordListHookInterface::class, 1195567840);\n }\n $cells = $hookObject->makeControl($table, $row, $cells, $this);\n }\n // now sort icons again into primary and secondary sections\n // after all hooks are processed\n $hookCells = $cells;\n foreach ($hookCells as $key => $value) {\n if ($key === 'primary' || $key === 'secondary') {\n continue;\n }\n $this->addActionToCellGroup($cells, $value, $key);\n }\n }\n $output = '<!-- CONTROL PANEL: ' . $table . ':' . $row['uid'] . ' -->';\n foreach ($cells as $classification => $actions) {\n $visibilityClass = ($classification !== 'primary' && !$module->MOD_SETTINGS['bigControlPanel'] ? 'collapsed' : 'expanded');\n if ($visibilityClass === 'collapsed') {\n $cellOutput = '';\n foreach ($actions as $action) {\n $cellOutput .= $action;\n }\n $output .= ' <div class=\"btn-group\">' .\n '<span id=\"actions_' . $table . '_' . $row['uid'] . '\" class=\"btn-group collapse collapse-horizontal width\">' . $cellOutput . '</span>' .\n '<a href=\"#actions_' . $table . '_' . $row['uid'] . '\" class=\"btn btn-default collapsed\" data-toggle=\"collapse\" aria-expanded=\"false\"><span class=\"t3-icon fa fa-ellipsis-h\"></span></a>' .\n '</div>';\n } else {\n $output .= ' <div class=\"btn-group\" role=\"group\">' . implode('', $actions) . '</div>';\n }\n }\n return $output;\n }" ]
[ "0.6556198", "0.59870917", "0.5853361", "0.58523697", "0.58466697", "0.57442164", "0.56297654", "0.56246775", "0.56168485", "0.55968034", "0.5580604", "0.5580604", "0.55728126", "0.55656314", "0.55607", "0.5549679", "0.5540511", "0.55240744", "0.55177873", "0.55157965", "0.5498747", "0.5486041", "0.5480066", "0.54696697", "0.54664576", "0.5456584", "0.5443879", "0.54436094", "0.5436692", "0.54130995", "0.54119223", "0.5410794", "0.5395179", "0.53871095", "0.5371432", "0.53548473", "0.53445846", "0.5344402", "0.5343214", "0.53426826", "0.53247565", "0.53205776", "0.53170997", "0.5310044", "0.5302043", "0.5295892", "0.52935797", "0.5287544", "0.52817166", "0.5274991", "0.52681863", "0.5261966", "0.5258966", "0.52578205", "0.52574307", "0.5247802", "0.5238815", "0.52284724", "0.52163523", "0.5206094", "0.52040654", "0.5203034", "0.5197368", "0.5194808", "0.51897657", "0.5180436", "0.51791054", "0.5178249", "0.51654106", "0.51636934", "0.5160556", "0.5159745", "0.51577395", "0.51556265", "0.51532954", "0.51350814", "0.5134843", "0.51282865", "0.5125253", "0.5122784", "0.5121106", "0.5116038", "0.51151305", "0.51147354", "0.51073456", "0.5099002", "0.50978065", "0.5097027", "0.5096142", "0.5094406", "0.50908655", "0.50853294", "0.5084008", "0.5080682", "0.50795305", "0.5077534", "0.5072951", "0.507122", "0.5067636", "0.50621855" ]
0.5987105
1
/ Get the Dialog data
public function getDialogLines() { $dialog = new Application_Model_DbTable_Dialog(); $this->drows = $dialog->getDialogRows($this->dialog_name); // logit('DROWS: ' . print_r($this->drows, true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDialogHelper() {}", "public function getDialogList()\r\n {\r\n return $this->exec('dialog_list');\r\n }", "protected function createDialog() {\n $dialog = parent::createDialog();\n $dialog->fields = $this->builder()->getFields();\n return $dialog;\n }", "public function getPopupContent();", "function getCopyDialog()\n {\n $str = \"\";\n $smarty = get_smarty();\n $smarty->assign(\"cn\", set_post($this->cn));\n $str = $smarty->fetch(get_template_path(\"paste_deviceGeneric.tpl\",TRUE,dirname(__FILE__)));\n\n $ret = array();\n $ret['string'] = $str;\n $ret['status'] = \"\";\n return($ret);\n }", "public function getDataObject()\r\n {\r\n return $this->getElement()->getForm()->getDataObject();\r\n }", "private function getModalDataAttr()\n\t{\n\t\t$modal['show'] = true;\n\n\t\tif($this->dismissible === false){\n\t\t\t$modal['backdrop'] = \"static\";\n\t\t}\n\n\t\t# If there are logged dimensions for this modal for this user, use them\n\t\tResizable::setDimensions($this->data, $this->id);\n\n\t\treturn array_merge($this->data ?:[], [\n\t\t\t\"settings\" => $modal,\n\t\t\t\"draggable\" => $this->getDraggableSettings(),\n\t\t\t\"resizable\" => $this->getResizableSettings(),\n\t\t\t\"approve\" => $this->getApproveSettings(),\n\t\t]);\n\t}", "public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}", "public function data(){\r\n\t\treturn $this->_data;\r\n\t}", "public function data(){\n\n\t\treturn $this->_data;\n\n\t}", "private function getDataFromVk()\n\t{\n\t\t$apiHelper = new Api\\ApiHelper($this->exportId);\n\t\t$data = false;\n\t\t\n\t\tswitch ($this->type)\n\t\t{\n\t\t\tcase 'ALBUMS':\n\t\t\t\t$data = $apiHelper->getALbumsFromVk($this->getVkGroupId());\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'PRODUCTS':\n\t\t\t\t$data = $apiHelper->getProductsFromVk($this->getVkGroupId());\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "public function get_data() {\r\n\t\treturn $this->data;\r\n\t}", "public function get_data() {\n\t\treturn $this->data;\n\t}", "public function getPopup() {}", "function getData() {\n\t\treturn $this->data;\n\t}", "public function get_data();", "public function get_data() {\n return $this->_view;\n }", "function getData()\n\t{\n\t\tstatic $data;\n\t\tif (!is_object($data)) {\n\t\t\t$data = $this->_buildDataObject();\n\t\t}\n\t\treturn $data;\n\t}", "abstract public function getMenuData();", "public function data()\n {\n \tif (!isset($this->data)) {\n \t\t$this->setData();\n \t}\n \t\n \treturn $this->data->data();\n }", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "function get_data() {\r\n return $this->data;\r\n }", "public function get_data()\n {\n return $this->_data;\n }", "public function getDataAction () {\n\t\t$this->getAnswer();\n\t}", "public function getDataAction () {\n\t\t$this->getAnswer();\n\t}", "public function getData() {\r\n\t\treturn $this->_data;\r\n\t}", "public function get_data() {\r\n return $this->data;\r\n }", "public function getData(){\n\t\treturn $this->data;\n\t}", "public function getData(){\n\t\treturn $this->data;\n\t}", "public function getData(){\n\t\treturn $this->data;\n\t}", "public function get_data() {\n return $this->data;\n }", "public function get_data() {\n $data = parent::get_data();\n\n if (!empty($data)) {\n $data->settings = $this->tool->form_build_settings($data);\n }\n\n return $data;\n }", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->m_data->getData();\n\t}", "public function getActionData() {\r\n\t\treturn array(\r\n\t\t\t'packageID' => $this->packageID\r\n\t\t);\r\n\t}", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function getData()\n\t\t{\n\t\t\treturn $this->_data;\n\t\t}", "function getData()\n {\n return $this->_data;\n }", "public function getData()\n\t{\n\t\treturn $this->_data;\n\t}", "function getScriptData(){\n return CJSON::decode($this->_options['scriptData'][$this->getInputName()]);\n }", "public function data ()\n {\n return $this->_data;\n }", "public function data()\n {\n return $this->_data;\n }", "public function get_data()\n {\n return $this->form_data;\n }", "public function data()\n {\n return $this->data; \n }", "public function getData() {\n\t\treturn $this->data;\n\t}", "public function getData() {\n\t\treturn $this->data;\n\t}", "protected function getData() { }", "public function data()\n {\n return $this->data;\n }", "public function data()\n {\n return $this->data;\n }", "public function data()\n {\n return $this->data;\n }", "public function data()\n {\n return $this->data;\n }", "public function data()\n {\n return $this->data;\n }", "public function data()\n {\n return $this->data;\n }", "public function getSessionData()\n {\n return $this->getSession()->get(\"FormInfo.{$this->FormName()}.data\");\n }", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getdataAction()\n {\n $aa = $this->getServiceLocator()->get('Monappli\\Model\\Doc')->resultatAjax();\n $viewModel = new ViewModel();\n $viewModel->setVariables(array('key' => 'value'))\n ->setTerminal(true);\n return $viewModel;\n }", "public function getData()\n {\n }", "protected function loadFormData() \n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_squadmanagement.edit.war.data', array());\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\treturn $data;\n\t}", "protected function getData()\n {\n return $this->data;\n }", "public function get_data() {\n $data = parent::get_data();\n if ($data !== null) {\n }\n return $data;\n }", "public function getData(){\n\n return $this->data;\n }", "public function getDataForSetDialogue( $relid )\n\t{\n\t\t$return = array( 'frequencies' => $this->allowedFrequencies(),\n\t\t\t\t\t\t 'notifyType' => $this->getNotifyType(),\n\t\t\t\t\t\t 'vernacular' => $this->getVernacular()\n\t\t\t\t\t\t);\n\t\t\n\t\treturn $return;\n\t}", "public function getData()\r\n {\r\n }", "protected function getWindowOptions()\n {\n if (atkTheme::getInstance()->getAttribute('dialog_window_options', null) != null)\n return atkTheme::getInstance()->getAttribute('dialog_window_options'); \n else return '{}';\n }", "public function getData() {\n return $this->_data;\n }", "public function getData() {\n return $this->_data;\n }", "public function getData()\n {\n return self::$data;\n }", "public function data()\n {\n return $this->data;\n }", "public function getCollectedData();", "public static function getData()\n {\n return self::$data;\n }" ]
[ "0.6525185", "0.6356299", "0.6072315", "0.5912436", "0.575329", "0.56440127", "0.562397", "0.5606318", "0.55821", "0.5576171", "0.5540002", "0.55317986", "0.55278236", "0.55097884", "0.55063707", "0.5504301", "0.5499986", "0.54999334", "0.5489991", "0.54784936", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.5474387", "0.54588705", "0.54339224", "0.5417269", "0.5417269", "0.54082257", "0.5399019", "0.5396474", "0.5396474", "0.5396474", "0.53948975", "0.5390173", "0.5387336", "0.5387336", "0.5387336", "0.5387336", "0.5387336", "0.5386589", "0.53862834", "0.5381079", "0.5381079", "0.5381079", "0.5380431", "0.5378055", "0.53747153", "0.53707796", "0.5364608", "0.53516555", "0.53435636", "0.5339722", "0.5337051", "0.5329455", "0.5329455", "0.5319562", "0.5316641", "0.5316641", "0.5316641", "0.5316641", "0.5316641", "0.5316641", "0.531538", "0.53147566", "0.53147566", "0.53147566", "0.53147566", "0.52972937", "0.52960026", "0.5292001", "0.5291429", "0.5287274", "0.5281028", "0.52731204", "0.52688366", "0.52670354", "0.5264007", "0.5264007", "0.5261619", "0.5258183", "0.5255868", "0.5249747" ]
0.5741023
5
/ Create the dialog
public function makeDialog($value = array(''=>''), $morelines = '') { $this->getDialogLines(); // logit('makeDialog:'); $this->view->outlines = $this->calculate_dialog($this->drows, $value, $this->title, $this->view->langtag); if (is_array($this->error)) { logit('Error: ' . print_r($this->error, true)); $this->view->errorLines = implode("\n", $this->error); } else { $this->view->errorLines = ''; } $this->view->title = $this->title; if (isset($this->echecklistNamespace->flash)) { $this->view->flash = $this->echecklistNamespace->flash; // logit("FLASH: {$this->view->flash}"); $this->echecklistNamespace->flash = ''; // logit("there?: {$this->view->flash}"); } $this->view->outlines .= $morelines; $this->_helper->layout->setLayout('overall'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createDialog() {\n $dialog = parent::createDialog();\n $dialog->fields = $this->builder()->getFields();\n return $dialog;\n }", "function nc__dlg__create($src, $attrs){\n\n\t\t//output function name\n\t\tnc__util__func('class', 'nc__dlg__create');\n\n\t\t//start dialog\n\t\t$tmpDlgId = nc__dlg__start($attrs);\n\n\t\t//start iframe for showing dialog content\n\t\techo \"<iframe src='\" . $src . \"' style='padding: 10px 20px;'></iframe>\";\n\n\t\t//end dialog\n\t\tnc__dlg__end();\n\n\t\t//return dialog id\n\t\treturn $tmpDlgId;\n\n\t}", "protected function formCreate() {\n\t\t\t// Define the Simple Message Dialog Box\n\t\t\t$this->dlgSimpleMessage = new \\QCubed\\Project\\Jqui\\Dialog($this);\n\t\t\t$this->dlgSimpleMessage->Title = \"Hello World!\";\n\t\t\t$this->dlgSimpleMessage->Text = '<p><em>Hello, world!</em></p><p>This is a standard, no-frills dialog box.</p><p>Notice how the contents of the dialog '.\n\t\t\t\t'box can scroll, and notice how everything else in the application is grayed out.</p><p>Because we set <strong>MatteClickable</strong> to <strong>true</strong> ' .\n\t\t\t\t'(by default), you can click anywhere outside of this dialog box to \"close\" it.</p><p>Additional text here is just to help show the scrolling ' .\n\t\t\t\t'capability built-in to the panel/dialog box via the \"Overflow\" property of the control.</p>';\n\t\t\t$this->dlgSimpleMessage->AutoOpen = false;\n\n\t\t\t// Make sure this Dialog Box is \"hidden\"\n\t\t\t// Like any other \\QCubed\\Control\\Panel or QControl, this can be toggled using the \"Display\" or the \"Visible\" property\n\t\t\t$this->dlgSimpleMessage->Display = false;\n\n\t\t\t// The First \"Display Simple Message\" button will utilize an AJAX call to Show the Dialog Box\n\t\t\t$this->btnDisplaySimpleMessage = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnDisplaySimpleMessage->Text = t('Display Simple Message \\QCubed\\Project\\Jqui\\Dialog');\n\t\t\t$this->btnDisplaySimpleMessage->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnDisplaySimpleMessage_Click'));\n\n\t\t\t// The Second \"Display Simple Message\" button will utilize Client Side-only JavaScripts to Show the Dialog Box\n\t\t\t// (No postback/postajax is used)\n\t\t\t$this->btnDisplaySimpleMessageJsOnly = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnDisplaySimpleMessageJsOnly->Text = 'Display Simple Message \\QCubed\\Project\\Jqui\\Dialog (ClientSide Only)';\n\t\t\t$this->btnDisplaySimpleMessageJsOnly->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\ShowDialog($this->dlgSimpleMessage));\n\n\t\t\t$this->pnlAnswer = new \\QCubed\\Control\\Panel($this);\n\t\t\t$this->pnlAnswer->Text = 'Hmmm';\n\t\t\t\n\t\t\t$this->btnDisplayYesNo = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnDisplayYesNo->Text = t('Do you love me?');\n\t\t\t$this->btnDisplayYesNo->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('showYesNoClick'));\n\t\t\t\n\t\t\t\n\t\t\t// Define the CalculatorWidget example. passing in the Method Callback for whenever the Calculator is Closed\n\t\t\t// This is example uses \\QCubed\\Project\\Jqui\\Button's instead of the JQuery UI buttons\n\t\t\t$this->dlgCalculatorWidget = new CalculatorWidget($this);\n\t\t\t$this->dlgCalculatorWidget->setCloseCallback('btnCalculator_Close');\n\t\t\t$this->dlgCalculatorWidget->Title = \"Calculator Widget\";\n\t\t\t$this->dlgCalculatorWidget->AutoOpen = false;\n\t\t\t$this->dlgCalculatorWidget->Resizable = false;\n\t\t\t$this->dlgCalculatorWidget->Modal = false;\n\n\t\t\t// Setup the Value Textbox and Button for this example\n\t\t\t$this->txtValue = new \\QCubed\\Project\\Control\\TextBox($this);\n\n\t\t\t$this->btnCalculator = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnCalculator->Text = 'Show Calculator Widget';\n\t\t\t$this->btnCalculator->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnCalculator_Click'));\n\n\t\t\t// Validate on JQuery UI buttons\n\t\t\t$this->dlgValidation = new \\QCubed\\Project\\Jqui\\Dialog($this);\n\t\t\t$this->dlgValidation->AddButton ('OK', 'ok', true, true); // specify that this button causes validation and is the default button\n\t\t\t$this->dlgValidation->AddButton ('Cancel', 'cancel');\n\n\t\t\t// This next button demonstrates a confirmation button that is styled to the left side of the dialog box.\n\t\t\t// This is a QCubed addition to the jquery ui functionality\n\t\t\t$this->dlgValidation->AddButton ('Confirm', 'confirm', true, false, 'Are you sure?', array('class'=>'ui-button-left'));\n\t\t\t$this->dlgValidation->Width = 400; // Need extra room for buttons\n\n\t\t\t$this->dlgValidation->AddAction (new \\QCubed\\Event\\DialogButton(), new \\QCubed\\Action\\Ajax('dlgValidate_Click'));\n\t\t\t$this->dlgValidation->Title = 'Enter a number';\n\n\t\t\t// Set up a field to be auto rendered, so no template is needed\n\t\t\t$this->dlgValidation->AutoRenderChildren = true;\n\t\t\t$this->txtFloat = new \\QCubed\\Control\\FloatTextBox($this->dlgValidation);\n\t\t\t$this->txtFloat->Placeholder = 'Float only';\n\t\t\t$this->txtFloat->PreferredRenderMethod = 'RenderWithError'; // Tell the panel to use this method when rendering\n\n\t\t\t$this->btnValidation = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnValidation->Text = 'Show Validation Example';\n\t\t\t$this->btnValidation->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\ShowDialog($this->dlgValidation));\n\n\t\t\t/*** Alert examples ***/\n\n\t\t\t$this->btnErrorMessage = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnErrorMessage->Text = 'Show Error';\n\t\t\t$this->btnErrorMessage->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnErrorMessage_Click'));\n\n\t\t\t$this->btnInfoMessage = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnInfoMessage->Text = 'Get Info';\n\t\t\t$this->btnInfoMessage->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnGetInfo_Click'));\n\t\t}", "public function admin_creacion_contacto(){\n\n\t\t$this->layout = 'dialog';\n\n\t\t$data = $this->request->data;\n\n\t\t$id_dialog = 'main-dialog';\n\n\t\tif ( isset( $data['id_dialog'] ) ){\n\n\t\t\t$id_dialog = $data['id_dialog'];\n\t\t}\n\n\t\t$title = '';\n\n\t\tif ( isset( $data['title'] ) ){\n\n\t\t\t$title = $data['title'];\n\t\t}\n\n\t\t$classes = '';\n\n\t\tif ( isset( $data['classes'] ) ){\n\n\t\t\t$classes = $data['classes'];\n\t\t}\n\n\t\t$this->set('id_dialog', $id_dialog);\n\n\t\t$this->set('title', $title);\t\n\t\t\n\t\t$this->set('classes', $classes);\t\n\t}", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "function nc__dlg__start($attrs){\n\n\t\t//output function name\n\t\tnc__util__func('class', 'nc__dlg__start');\n\n\t\t//check if 'caption' is not defined among attributes\n\t\tif( array_key_exists(\"caption\", $attrs) == false ){\n\n\t\t\t//define default caption\n\t\t\t$attrs[\"caption\"] = \"dialog\";\n\n\t\t}\t//end if 'caption' is not defined among attributes\n\n\t\t//check if 'headCol' is not defined among attributes\n\t\tif( array_key_exists(\"headCol\", $attrs) == false ){\n\n\t\t\t//define default header's color\n\t\t\t$attrs[\"headCol\"] = \"#5cb85c\";\n\n\t\t}\t//end if 'headCol' is not defined among attributes\n\n\t\t//check if 'headTxtCol' is not defined among attributes\n\t\tif( array_key_exists(\"headTxtCol\", $attrs) == false ){\n\n\t\t\t//define default header's text color\n\t\t\t$attrs[\"headTxtCol\"] = \"white\";\n\n\t\t}\t//end if 'headTxtCol' is not defined among attributes\n\n\t\t//check if 'headTxtSize' is not defined among attributes\n\t\tif( array_key_exists(\"headTxtSize\", $attrs) == false ){\n\n\t\t\t//define default header's text size\n\t\t\t$attrs[\"headTxtSize\"] = \"30px\";\n\n\t\t}\t//end if 'headTxtSize' is not defined among attributes\n\n\t\t//check if 'needClose' is not defined among attributes\n\t\tif( array_key_exists(\"needClose\", $attrs) == false ){\n\n\t\t\t//define flag -- need close button\n\t\t\t$attrs[\"needClose\"] = true;\n\n\t\t}\t//end if 'needClose' is not defined among attributes\n\n\t\t//check if 'needMove' is not defined among attributes\n\t\tif( array_key_exists(\"needMove\", $attrs) == false ){\n\n\t\t\t//define flag -- need dialog to be moveable\n\t\t\t$attrs[\"needMove\"] = true;\n\n\t\t}\t//end if 'needMove' is not defined among attributes\n\n\t\t//check if 'needRefresh' is not defined among attributes\n\t\tif( array_key_exists(\"needRefresh\", $attrs) == false ){\n\n\t\t\t//define flag -- need top parent window to be refereshed\n\t\t\t$attrs[\"needRefresh\"] = false;\n\n\t\t}\t//end if 'needRefresh' is not defined among attributes\n\n\t\t//check if 'id' is not defined among attributes\n\t\tif( array_key_exists(\"id\", $attrs) == false ){\n\n\t\t\t//define unique id based on the page name and random number\n\t\t\t$attrs[\"id\"] = nc__util__getPHPFileName() . \"__dlg__\" . rand(1000,100000);\n\n\t\t}\t//end if 'id' is not defined among attributes\n\n\t\t//if need to move\n\t\tif( $attrs[\"needMove\"] || $attrs[\"needRefresh\"] ){\n\n\t\t\t//create JS section for making this dialog movable\n\t\t\techo \"<script>\" .\n\t\t\t\t\t\"$(document).ready(function(){\";\n\n\t\t\t\t\t\t//if need to be movable\n\t\t\t\t\t\tif( $attrs[\"needMove\"] ){\n\n\t\t\t\t\t\t\t//make div draggable\n\t\t\t\t\t\t\techo \"$('#\" . $attrs[\"id\"] . \"').draggable();\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//if need to refresh on exit\n\t\t\t\t\t\tif( $attrs[\"needRefresh\"] ){\n\n\t\t\t\t\t\t\t//make close button refresh top window\n\t\t\t\t\t\t\techo \"$('#\" . $attrs[\"id\"] . \"').find('.close').click(\" .\n\t\t\t\t\t\t\t\t\t\"function(e){\" .\n\t\t\t\t\t\t\t\t\t\t\"top.location.href = '';\" .\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}\n\n\t\t\t\t\techo \"});\" .\n\t\t\t\t\"</script>\";\n\n\t\t}\t//end if need to move\n\n\t\t//start dialog's bounding DIV (ends in another function)\n\t\techo \"<div class='modal fade' id='\" . $attrs[\"id\"] . \"' role='dialog'>\" .\n\n\t\t\t\t//dialog body (ends in another function)\n\t\t\t\t\"<div class='modal-dialog'>\" .\n\n\t\t\t\t\t//compose dialog content window (ends in another function)\n\t\t\t\t\t\"<div class='modal-content'>\" .\n\n\t\t\t\t\t\t//compose dialog header\n\t\t\t\t\t\t\"<div style='\" .\n\n\t\t\t\t\t\t\t//set header's background color\n\t\t\t\t\t\t\t\"background-color: \" . $attrs[\"headCol\"] . \";\" .\n\t\t\t\t\t\t\t//set header's text color\n\t\t\t\t\t\t\t\"color: \" . $attrs[\"headTxtCol\"] . \";\" .\n\t\t\t\t\t\t\t//set header's font size\n\t\t\t\t\t\t\t\"font-size: \" . $attrs[\"headTxtSize\"] . \";\" .\n\t\t\t\t\t\t\t//set padding around header\n\t\t\t\t\t\t\t\"padding: 10px 20px;\" .\n\n\t\t\t\t\t\t\"'>\";\n\n\t\t//if need to be closeable\n\t\tif( $attrs[\"needClose\"] ){\n\n\t\t\t\t\t\t\t//close button for dialog\n\t\t\t\t\t\t\techo \"<button type='button' class='close' data-dismiss='modal'>x</button>\";\n\n\t\t}\t//end if need to be closeable\n\n\t\t\t\t\t\t\t//caption\n\t\t\t\t\t\t\techo \"<h4>\" . $attrs[\"caption\"] . \"</h4>\" .\n\n\t\t\t\t\t\t//end dialog header\n\t\t\t\t\t\t\"</div>\" .\n\n\t\t\t\t\t\t//start content body (ends in another function)\n\t\t\t\t\t\t\"<div class='nc-dialog-outter' style='display: flex; margin: 20px;'>\";\n\n\t\t//return dialog id\n\t\treturn $attrs[\"id\"];\n\n\t}", "public function create()\n {\n $this->openModal();\n $this->resetInputFields();\n }", "public function create()\n {\n $this->openModal();\n $this->resetInputFields();\n }", "protected function getDialogHelper() {}", "public function __construct($message, $title = \"\", $width = 360, $height = 180)\n {\n //Um HTMLWindow para posicionar os obetos na tela\n //mudancas na aprencia de HTMLWindow tambem deve ser realizada em HTMLPanel\n $this->dialog = new HTMLWindow(\"$title\", $width, $height);\n $windowId = $this->dialog->getWindowId();\n $this->dialog->setPosition(\"40%\", \"40%\");\n //um painel HTMLPanel para dispor os objetos em HTMLWindow\n $panelWidth = $this->dialog->getWidth() - 15;\n $panelHeight = $this->dialog->getHeight() - 2;\n $this->panel = new HTMLPanel($panelWidth, $panelHeight);\n $this->panel->backgroundColor = \"#FAFAFB\";\n //$this->panel->padding = '5px';\n //CRIA OS BOTÕES PADRÕES DOS DIALOGS\n $this->btnConfirm = new HTMLElement('input');\n $this->btnConfirm->type = 'image';\n $this->btnConfirm->src = AppConfig::baseIcons() . 'button-ok-light.png';\n $this->btnConfirm->value = \"Confirmar\";\n $this->btnConfirm->style = 'border:0px;';\n $this->btnConfirm->title = 'Fechar Caixa de Diálogo.';\n\n $this->btnOk = new HTMLElement('input');\n $this->btnOk->type = 'image';\n $this->btnOk->src = AppConfig::baseIcons() . 'button-exit-light.png';\n $this->btnOk->{IMouseEvent::CLICK} = \"$('#$windowId').fadeOut('slow', function(){p=document.getElementById('$windowId');(p.parentNode.removeChild(p));});\";\n $this->btnOk->value = 'Sair';\n $this->btnOk->style = 'border:0px;';\n $this->btnOk->title = 'Fechar Caixa de Diálogo.';\n\n $this->btnCancel = new HTMLElement(\"input\");\n $this->btnCancel->type = 'image';\n $this->btnCancel->src = AppConfig::baseIcons() . 'button-cancel-light.png';\n $this->btnCancel->{IMouseEvent::CLICK} = \"$('#$windowId').fadeOut('slow', function(){p=document.getElementById('$windowId');(p.parentNode.removeChild(p));});\";\n $this->btnCancel->value = 'Cancelar';\n $this->btnCancel->style = 'border:0px;';\n\n\n $msgParagraph = new HTMLParagraph($message);\n $msgParagraph->style = \"font-family:Sans Serif;font-size:12px; padding-right: 10px; text-align:justify; \";\n $this->panel->appendChild($msgParagraph, 0, 80);\n }", "protected function makeJqWidget()\n {\n parent::makeJqWidget();\n Application::executeJsFunction('qc.dialog', $this->getJqControlId(), Application::PRIORITY_HIGH);\n }", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "public function createShowModal()\n {\n $this->resetValidation();\n $this->resetVars();\n $this->modalFormVisible = true;\n }", "protected function Form_Create() {\n\t\t\t// Define the Label\n\t\t\t$this->lblMessage = new QLabel($this);\n\t\t\t$this->lblMessage->Text = 'Click the button to change my message.';\n\n\t\t\t// Define the Button\n\t\t\t$this->btnButton = new QButton($this);\n\t\t\t$this->btnButton->Text = 'Click Me!';\n\n\t\t\t// Add a Click event handler to the button\n\t\t\t$this->btnButton->AddAction(new QClickEvent(), new QServerAction('btnButton_Click'));\n\t\t}", "public function create()\n {\n //KEMUDIAN DI DALAMNYA KITA MENJALANKAN FUNGSI UNTUK MENGOSONGKAN FIELD\n $this->resetFields();\n //DAN MEMBUKA MODAL\n $this->openModal();\n }", "public function create_new () {\n\t\t$dialog = new CocoaDialog($this->cocoa_dialog);\n\t\t$templates = array();\n\t\t\n\t\t// Find items in standard project templates\n\t\t$contents = directory_contents($this->standard_templates);\n\t\tforeach ($contents as $path) {\n\t\t\tif ($path != $this->standard_templates) {\n\t\t\t\t$items[] = basename($path);\n\t\t\t\t$templates[basename($path)] = $path;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Find items in user project templates\n\t\t$contents = directory_contents($this->user_templates);\n\t\tforeach ($contents as $path) {\n\t\t\tif ($path != $this->user_templates) {\n\t\t\t\t$items[] = basename($path);\n\t\t\t\t$templates[basename($path)] = $path;\n\t\t\t}\n\t\t}\n\n\t\t// Prompt to select template\n\t\tif ($selection = $dialog->standard_dropdown(\"New Project\", \"Choose a project template to start from.\", $items, false, false, false, false)) {\n\t\t\t//print($selection);\n\t\t\t\n\t\t\t// Prompt to save\n\t\t\tif ($path = $dialog->save_file(\"Save Project\", \"Choose a location to save the new project.\", null, null, null)) {\n\t\t\t\t$this->copy_template($templates[$selection], $path);\n\t\t\t}\n\t\t}\n\t}", "public function createShowModal()\n {\n $this->resetValidation();\n $this->reset();\n $this->showModalForm = true;\n }", "abstract public function createForm();", "abstract public function createForm();", "public function create()\n {\n return view($this->base_view.'popup.create');\n }", "public function init() {\n// parent::init();\n\n $id = $this->getId();\n if (isset($this->htmlOptions['id'])) {\n $id = $this->htmlOptions['id'];\n } else {\n $this->htmlOptions['id'] = $id;\n }\n\n $options = CJavaScript::encode($this->options);\n Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, \"jQuery('#{$id}').dialog($options);\");\n\n echo CHtml::button($this->linkText, // label\n array(\n 'onclick' => \"{addDialog(); jQuery('#{$id}').dialog('open');}\"));\n\n echo CHtml::openTag($this->tagName, $this->htmlOptions) . \"\\n\";\n \n echo CHtml::openTag('div', array('class' => 'resultContainer'));\n echo CHtml::closeTag('div');\n \n echo CHtml::script('function addDialog(){'\n . CHtml::ajax(array(\n 'url' => $this->url,\n 'data' => \"js:$(this).serialize()\",\n 'type' => 'post',\n 'dataType' => 'json',\n 'success' => \"function(data)\n {\n if (data.status == 'failure') {\n // Here is the trick: on submit-> once again this function!\n jQuery('#{$id} div.resultContainer').html(data.div);\n jQuery('#{$id} div.resultContainer form').submit(addDialog);\n }\n else if(data.status == 'success') {\n jQuery('#{$id} div.resultContainer').html(data.div);\n jQuery('\" . $this->parentElementSelector . \"').append('<option value=\\\"' + data.newObj.id + '\\\">' + data.newObj.value + '</option>');\n setTimeout(\\\"jQuery('#{$id}').dialog('close') \\\",500);\n }\n\n } \"\n )) . ';\n return false;}');\n }", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "public function admin_creacion_cliente(){\n\n\t\t$this->layout = 'dialog';\n\n\t\t$data = $this->request->data;\n\n\t\t$id_dialog = 'main-dialog';\n\n\t\tif ( isset( $data['id_dialog'] ) ){\n\n\t\t\t$id_dialog = $data['id_dialog'];\n\t\t}\n\n\t\t$title = '';\n\n\t\tif ( isset( $data['title'] ) ){\n\n\t\t\t$title = $data['title'];\n\t\t}\n\n\t\t$classes = '';\n\n\t\tif ( isset( $data['classes'] ) ){\n\n\t\t\t$classes = $data['classes'];\n\t\t}\n\n\t\t$this->set('id_dialog', $id_dialog);\n\n\t\t$this->set('title', $title);\t\n\t\t\n\t\t$this->set('classes', $classes);\n\n\t\t// Combos\n\n\t\t$this->loadModel('Region');\n\n\t\t$regiones = $this->Region->find('all');\n\n\t\tarray_walk($regiones, function(&$item){\n\n\t\t\t$item = $item['Region'];\n\t\t});\n\n\t\t$this->set('regiones', $regiones);\t\n\n\t\t$this->loadModel('Comuna');\n\n\t\t$comunas = $this->Comuna->find('all', array(\n\n\t\t\t\t'fields' \t=> array(\n\n\t\t\t\t\t'id',\n\t\t\t\t\t'ciudades_id',\n\t\t\t\t\t'nombre',\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\tarray_walk($comunas, function(&$item){\n\n\t\t\t$item = $item['Comuna'];\n\t\t});\n\n\t\t$this->set('comunas', $comunas);\n\t}", "public function createShowModal()\n {\n $this->resetValidation();\n $this->reset();\n $this->modalFormVisible = true;\n }", "public function createForm();", "public function createForm();", "public function create()\n {\n $Messages = CustomUtils::language_pack(session()->get('multi_lang'));\n\n $path = 'data/popup'; //첨부물 저장 경로\n if (!is_dir($path)) {\n @mkdir($path, 0755);\n @chmod($path, 0755);\n }\n\n //스마트 에디터 첨부파일 디렉토리 사용자 정의에 따라 변경 하기(관리 하기 편하게..)\n $directory = \"data/popup/editor\";\n setcookie('directory', $directory, (time() + 10800),\"/\"); //일단 3시간 잡음(3*60*60)\n\n return view('adm.popup.popupcreate',[\n ],$Messages::$mypage['mypage']);\n }", "public function createShowModal(){\n $this->modalFormVisible = true;\n }", "function initializeDeleteFileDialog() {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_msgdialog.php');\n $hidden = array(\n 'cmd' => $this->params['cmd'],\n 'file_id' => $this->params['file_id'],\n 'confirm' => 1,\n );\n $this->dialog = new base_msgdialog(\n $this,\n $this->paramName,\n $hidden,\n sprintf(\n $this->_gt('Do you really want to delete file \"%s\"?'),\n $this->currentFile['file_name']\n ),\n 'warning'\n );\n $this->dialog->msgs = &$this->msgs;\n $this->dialog->buttonTitle = 'Delete';\n }", "public function CreateForm();", "public function create()\n {\n $this->title .= ' create';\n $this->vars = array_add($this->vars, 'menuArray', $this->rep->makeArray());\n }", "public function create()\n {\n //see modal controller\n }", "public function create()\n {\n //see modal controller\n }", "public function create()\n {\n //see modal controller\n }", "public function create()\n {\n return view('popup::admin.popups.create');\n }", "public function createForm()\n {\n }", "public function createDialog() {\n $setId = $this->parameters()->get('set_id', 0);\n if ($setId > 0) {\n $loaded = $this->record()->load($setId);\n } else {\n $loaded = FALSE;\n }\n $dialog = new PapayaUiDialogDatabaseDelete($this->record());\n $dialog->papaya($this->papaya());\n $dialog->caption = new PapayaUiStringTranslated('Delete theme set');\n if ($loaded) {\n $dialog->parameterGroup($this->parameterGroup());\n $dialog->parameters($this->parameters());\n $dialog->hiddenFields()->merge(\n array(\n 'cmd' => 'set_delete',\n 'theme' => $this->parameters()->get('theme', ''),\n 'set_id' => $setId\n )\n );\n $dialog->fields[] = new PapayaUiDialogFieldInformation(\n new PapayaUiStringTranslated('Delete theme set'),\n 'places-trash'\n );\n $dialog->buttons[] = new PapayaUiDialogButtonSubmit(new PapayaUiStringTranslated('Delete'));\n $this->callbacks()->onExecuteSuccessful = array($this, 'callbackDeleted');\n } else {\n $dialog->fields[] = new PapayaUiDialogFieldMessage(\n PapayaMessage::TYPE_INFO, 'Theme set not found.'\n );\n }\n return $dialog;\n }", "function app_template_dialogs() {\n global $App;\n $continue = __('continue');\n $cancel = __('cancel');\n $ok = __('ok');\n $dialog_html = <<<HTML\n\n<div id=\"modal-warning\" class=\"abstract-modal-popup\" data-overlay-theme=\"b\">\n <div data-role=\"header\">\n <h1 id=\"modal-warning-label\"></h1>\n </div>\n <div id=\"modal-warning-body\" class=\"ui-content\" data-role=\"main\"></div>\n <div data-role=\"footer\">\n <a href=\"#\" class=\"modal-warning-close\" data-role=\"button\" data-transition=\"flow\">{$continue}</a>\n </div>\n</div>\n \n<div id=\"modal-dialog\" class=\"abstract-modal-popup\" data-overlay-theme=\"b\">\n <div data-role=\"header\">\n <h1 id=\"modal-dialog-label\"></h1>\n </div>\n <div id=\"modal-dialog-body\" class=\"ui-content\" data-role=\"main\"></div>\n <div data-role=\"footer\">\n <a href=\"#\" class=\"modal-dialog-close\" data-role=\"button\" data-inline=\"true\" data-transition=\"flow\">{$continue}</a>\n </div>\n</div>\n \n<div id=\"modal-confirm\" class=\"abstract-modal-popup\" data-overlay-theme=\"b\">\n <div data-role=\"header\">\n <h1 id=\"modal-confirm-label\"></h1>\n </div>\n <div id=\"modal-confirm-body\" class=\"ui-content\" data-role=\"main\"></div>\n <div data-role=\"footer\">\n <a href=\"#\" class=\"modal-confirm-cancel\" data-role=\"button\" data-inline=\"true\" data-transition=\"flow\">{$cancel}</a>\n <a href=\"#\" class=\"modal-confirm-ok\" data-role=\"button\" data-inline=\"true\" data-transition=\"flow\" data-theme=\"b\">{$ok}</a>\n </div>\n</div>\n\nHTML;\n\n return array(\n 'selector' \t=> $App->config('page_content_id'),\n 'pos_func' \t=> 'insertAfter',\n 'html'\t\t=> $dialog_html\n );\n}", "public function xadmin_createform() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$form_title = $args [1];\n\t\t$form_type = @$args [2] ? $args [2] : 'blank';\n\t\t\n\t\t/* Load Model */\n\t\t$form = $this->getModel ( 'form' );\n\t\t$this->session->returnto ( 'forms' );\n\t\t\n\t\t/* create the form */\n\t\t$form->createNewForm ( $form_title, $form_type );\n\t\t\n\t\t$this->loadPluginModel ( 'forms' );\n\t\t$plug = Plugins_Forms::getInstance ();\n\t\t\n\t\t$plug->_pluginList [$form_type]->onAfterCreateForm ( $form );\n\t\t\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( 'xforms' );\n\t\n\t}", "function addDialogXML() {\n static $added = FALSE;\n // get dialog XML if a dialog exists\n if (!($added) && isset($this->dialog)) {\n if (is_object($this->dialog)) {\n switch (get_class($this->dialog)) {\n case 'base_dialog':\n $dialogXML = $this->dialog->getDialogXML();\n break;\n case 'base_msgdialog':\n $dialogXML = $this->dialog->getMsgDialog();\n break;\n default:\n $this->addMsg(MSG_ERROR, $this->_gt('Internal Error: Invalid dialog.'));\n break;\n }\n } elseif (is_string($this->dialog) && $this->dialog != '') {\n $dialogXML = $this->dialog;\n }\n\n // add dialog xml to prefered dialog position (differs for mime and f&f)\n if (isset($dialogXML) && $dialogXML != '') {\n switch ($this->dialogPosition) {\n case 'right':\n $this->layout->addRight($dialogXML);\n break;\n case 'left':\n case 'center':\n default:\n $this->layout->add($dialogXML);\n break;\n }\n $added = TRUE;\n }\n }\n }", "public function modalContent() {\n\n $fields = array( __( 'Template Rule Settings', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ) => array() );\n $sKey = key( $fields );\n\n //------------------------------------------------------------------\n // GENERIC PARAM\n //------------------------------------------------------------------\n\n $helpContent = $this->helpContent( __( 'Choose the value of this generic param.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ),\n __( 'Choose the value of this generic param. It is set only for process flowing, and it is not used anywhere in your WordPress environment.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ) );\n\n $fields[$sKey][] = array(\n array(\n 'type' => WPDKUIControlType::CUSTOM,\n 'content' => $helpContent\n )\n );\n\n $fields[$sKey][] = array(\n array(\n 'type' => WPDKUIControlType::TEXT,\n 'name' => $this->_model->id() . '-generic-param',\n 'value' => $this->_model->genericParam(),\n 'label' => array(\n 'value' => __( 'Generic Param', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ),\n 'data' => array( 'placement' => 'right' )\n ),\n 'size' => 24,\n 'title' => __( 'Enter the value of this generic param. It is set only for process flowing, and it is not used anywhere in your WordPress environment.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN )\n )\n );\n\n $layout = new WPDKUIControlsLayout( $fields );\n\n // Build output buffer\n $outputBuffer = '<form name=\"' . $this->_model->id() . '-form\" method=\"POST\" action=\"\">' .\n $layout->html() .\n '</form>';\n\n return $outputBuffer;\n\n }", "function create()\n\t{\n\t\tif ($_GET[\"obj_id\"] != \"\")\n\t\t{\n\t\t\t$this->setTabs();\n\t\t}\n\t\tparent::create();\n\t}", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "private function _prepareLoginDialog()\n {\n $floatingDialog = new Point_Model_FloatingDialog();\n $dialogOptions = array(\n \t\t\t\t\t\t'title' \t\t=> 'Login',\n \t\t\t\t\t\t'id'\t\t\t=> 'login_form',\t\n \t\t\t\t\t\t'linkName'\t\t=> 'Sign in',\n \t\t\t\t\t\t'class'\t\t\t=> 'ui-state-default ui-corner-all',\n \t\t\t\t\t\t\n \t\t\t\t\t\t/* Button Style for the css */\n \t\t\t\t\t\t//style=\"padding: .4em 1em .4em 20px; text-decoration: none; position: relative;\"\n \t\t\t\t\t\t'linkCss'\t\t=> array( \n \t\t\t\t\t\t\t\t\t\t\t\t\t'font-size' \t=> '0.85em',\n \t\t\t\t\t\t\t\t\t\t\t\t\t'font-weight'\t=> 'bold',\n \t\t\t\t\t\t\t\t\t\t\t\t\t'line-height'\t=> '1.2em',\n \t\t\t\t\t\t\t\t\t\t\t\t\t'text-decoration'=>'none',\n \t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t\t=> '#fff',\n \t\t\t\t\t\t\t\t\t\t\t\t\t'background'\t=> '#88BBD4',\n \t\t\t\t\t\t\t\t\t\t\t\t\t'border'\t\t=> '1px solid #88BBE4',\n \t\t\t\t\t\t\t\t\t\t\t\t\t'padding'\t\t=> '.4em 1em .4em 20px',\n \t\t\t\t\t\t\t\t\t\t\t\t\t'position'\t\t=> 'relative'),\n \t\t\t\t\t\t/* Dialog settings */\n \t\t\t\t\t\t'settings'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width' \t=> 450,\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'height'\t=> 300,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'draggable'\t=> 'false',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'modal'\t\t=> 'true',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'resizable'\t=> 'false',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'autoOpen'\t=> 'false'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/*,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'buttons'\t=>\t'{\"Close\":function(){$(this).dialog(\"close\");}}'*/),\t\n\t\t\t\t\t\t\t\t'others'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'class' => '.signin')); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n return $this->view->userDialog = $floatingDialog->setView($this->view)\n \t\t\t\t\t\t\t\t\t\t \t\t->makeDialog($this->_getForm(), $dialogOptions);\n }", "public function dialog($aksi = 'cetak')\n\t{\n\t\t$data['aksi'] = ucwords($aksi);\n\t\t$data['pamong'] = $this->pamong_model->list_data();\n\t\t$data['form_action'] = site_url(\"kelompok/daftar/$aksi\");\n\n\t\t$this->load->view('global/ttd_pamong', $data);\n\t}", "protected function SetupPanel() {\n\t\t\t$this->mctAddress = AddressMetaControl::Create($this, $this->strUrlHashArgument, QMetaControlCreateType::CreateOnRecordNotFound);\n\n\t\t\t// Dialog Message\n\t\t\t$this->dlgMessage = new MessageDialog($this);\n\t\t\t$this->dlgMessage_Reset();\n\t\t\t$this->btnSave->RemoveAllActions(QClickEvent::EventName);\n\t\t\t$this->btnSave->AddAction(new QClickEvent(), new QShowDialogBox($this->dlgMessage));\n\t\t\t$this->btnSave->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnSave_Click'));\n\n\t\t\tif (!$this->mctAddress->EditMode) {\n\t\t\t\t// Trying to create a NEW address\n\t\t\t\t$this->mctAddress->Address->Person = $this->objPerson;\n\t\t\t\t$this->btnSave->Text = 'Create';\n\t\t\t} else {\n\t\t\t\t// Ensure the Address object belongs to the person\n\t\t\t\tif ($this->mctAddress->Address->PersonId != $this->objPerson->Id) {\n\t\t\t\t\treturn $this->ReturnTo('#contact');\n\t\t\t\t}\n\t\t\t\t$this->btnSave->Text = 'Update';\n\n\t\t\t\t$this->btnDelete = new QLinkButton($this);\n\t\t\t\t$this->btnDelete->Text = 'Delete';\n\t\t\t\t$this->btnDelete->CssClass = 'delete';\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to permenantly DELETE this record?'));\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnDelete_Click'));\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());\n\t\t\t}\n\n\t\t\t// Create Controls\n\t\t\t$this->lstAddressType = $this->mctAddress->lstAddressType_Create();\n\t\t\t$this->calDateUntilWhen = $this->mctAddress->calDateUntilWhen_Create();\n\t\t\t$this->calDateUntilWhen->MinimumYear = 2000;\n\t\t\t$this->calDateUntilWhen->MaximumYear = date('Y') + 10;\n\t\t\t$this->chkCurrentFlag = $this->mctAddress->chkCurrentFlag_Create();\n\n\t\t\t// Fixup \"Address Type\"\n\t\t\t$this->lstAddressType->GetItem(0)->Name = 'Previous Home';\n\t\t\tif (!$this->mctAddress->EditMode) $this->lstAddressType->AddSelectOneOption();\n\n\t\t\t$this->chkInvalidFlag = $this->mctAddress->chkInvalidFlag_Create();\n\t\t\t$this->txtAddress1 = $this->mctAddress->txtAddress1_Create();\n\t\t\t$this->txtAddress2 = $this->mctAddress->txtAddress2_Create();\n\t\t\t$this->txtAddress3 = $this->mctAddress->txtAddress3_Create();\n\t\t\t$this->txtCity = $this->mctAddress->txtCity_Create();\n\t\t\t$this->lstState = $this->mctAddress->lstState_Create();\n\t\t\t$this->txtZipCode = $this->mctAddress->txtZipCode_Create();\n\t\t\t$this->txtCountry = $this->mctAddress->txtCountry_Create();\n\t\t\t$this->txtInternationalState = $this->mctAddress->txtState_Create();\n\t\t\t$this->txtInternationalState->Visible = false;\n\t\t\t$this->chkInternationalFlag = $this->mctAddress->chkInternationalFlag_Create();\n\t\t\t$this->chkInternationalFlag->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'chkInternationalFlag_Click'));\n\t\t\t$this->chkInternationalFlag_Click();\n\t\t\t\n\t\t\t// Add Actions\n\t\t\t$this->lstAddressType->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'lstAddressType_Change'));\n\n\t\t\t// Setup Controls\n\t\t\t$this->lstAddressType_Change();\n\t\t}", "public function create()\n {\n $obj = new Obj();\n $this->authorize('create', $obj);\n\n return view('appl.'.$this->app.'.'.$this->module.'.createedit')\n ->with('stub','Create')\n ->with('obj',$obj)\n ->with('editor',true)\n ->with('datetimepicker',true)\n ->with('app',$this);\n }", "protected function formCreate() {\n\t\t$this->pxyLink = new \\QCubed\\Control\\Proxy($this);\n\t\t$this->pxyLink->AddAction(new \\QCubed\\Event\\MouseOver(), new \\QCubed\\Action\\Ajax('mouseOver'));\n\n\t\t// Define the DataGrid\n\t\t$this->tblProjects = new \\QCubed\\Project\\Control\\Table($this);\n\n\t\t// This css class is used to style alternate rows and the header, all in css\n\t\t$this->tblProjects->CssClass = 'simple_table';\n\n\t\t// Define Columns\n\n\t\t// Create a link column that shows the name of the project, and when clicked, calls back to this page with an id\n\t\t// of the item clicked on\n\t\t$this->tblProjects->CreateLinkColumn('Project', '->Name', \\QCubed\\Project\\Application::instance()->context()->scriptName(), ['intId'=>'->Id']);\n\n\t\t// Create a link column using a proxy\n\t\t$col = $this->tblProjects->CreateLinkColumn('Status', '->ProjectStatusType', $this->pxyLink, '->Id');\n\n\t\t$this->tblProjects->SetDataBinder('tblProjects_Bind');\n\n\t\t$this->pnlClick = new \\QCubed\\Control\\Panel($this);\n\n\t\tif (($intId = \\QCubed\\Project\\Application::instance()->context()->queryStringItem('intId')) && ($objProject = Project::Load($intId))) {\n\t\t\t$this->pnlClick->Text = 'You clicked on ' . $objProject->Name;\n\t\t}\n\n\t}", "function initializeFileEditDialog() {\n if (isset($this->params['file_id']) && $this->params['file_id'] != '' &&\n is_array($this->currentFile) && count($this->currentFile) > 0) {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_dialog.php');\n $data = $this->currentFile;\n $hidden = array(\n 'cmd' => 'edit_file',\n 'confirm' => 1,\n 'file_id' => $this->params['file_id'],\n );\n\n $captionFileTitle = 'Title';\n $captionFileDesrciption = 'Description';\n if (in_array($this->currentFile['mimetype'], $this->imageMimeTypes)) {\n if (defined('PAPAYA_MEDIA_CUTLINE_MODE') && PAPAYA_MEDIA_CUTLINE_MODE == 1) {\n $captionFileTitle = 'Title (Cutline)';\n }\n if (defined('PAPAYA_MEDIA_ALTTEXT_MODE') && PAPAYA_MEDIA_ALTTEXT_MODE == 1) {\n $captionFileDesrciption = 'Description (Alternative Text)';\n }\n }\n if (isset($this->currentFileData) &&\n is_array($this->currentFileData)) {\n if (isset($this->currentFileData['file_title']) &&\n trim($this->currentFileData['file_title']) != '') {\n $data['file_title'] = (string)$this->currentFileData['file_title'];\n }\n if (isset($this->currentFileData['file_description'])) {\n $data['file_description'] = $this->currentFileData['file_description'];\n }\n }\n if (isset($this->currentFile['file_sort'])) {\n $data['file_sort'] = $this->currentFile['file_sort'];\n }\n\n $owner = $this->getFileOwnerData($this->currentFile['file_id']);\n if (is_array($owner) && count($owner) > 0) {\n $surfername = '';\n if ($owner['surfer_givenname'] != '' && $owner['surfer_surname'] != '') {\n $surferName = $owner['surfer_surname'].', '.$owner['surfer_givenname'].' ';\n } elseif ($owner['surfer_surname'] != '' || $owner['surfer_givenname'] != '') {\n $surferName = $owner['surfer_givenname'].$owner['surfer_surname'].' ';\n }\n $surferName .= '['.$owner['surfer_handle'].']';\n } else {\n $surferName = $this->_gt('Unknown');\n }\n $fields = array(\n 'Language independent',\n 'file_name' => array('Filename', 'isNoHTML', TRUE, 'input', 100),\n 'file_created' => array('Created', 'isISODateTime', FALSE, 'datetime', 16),\n 'file_keywords' => array('Keywords', 'isNoHTML', FALSE, 'textarea', 6),\n 'owner' => array('Owner', 'isNoHTML', FALSE, 'disabled_input', 100, '', $surferName),\n 'file_sort' => array('Sorting', 'isNoHTML', TRUE, 'input', 100),\n 'Source',\n 'file_source' => array('Text', 'isNoHTML', FALSE, 'input', 400),\n 'file_source_url' => array('Url', 'isHttpX', FALSE, 'input', 1000),\n 'Properties',\n 'file_title' => array($captionFileTitle, 'isNoHTML', FALSE, 'input', 255),\n 'file_description' => array(\n $captionFileDesrciption, 'isSomeText', FALSE, 'simplerichtext', 10\n )\n );\n\n $this->dialog = new base_dialog($this, $this->paramName, $fields, $data, $hidden);\n $this->dialog->tokenKeySuffix = 'fileedit';\n $this->dialog->loadParams();\n $this->dialog->dialogTitle = $this->_gt('Edit file');\n $this->dialog->buttonTitle = 'Save';\n $this->dialog->inputFieldSize = 'large';\n }\n }", "function displayCreateScreen(&$conf)\t{\n\t\tif ($conf['create'] && !$conf['disableCreate'])\t{\n\t\t\t$pluginId=$conf['pluginId'];\n\t\t\t$templateCode = $this->cObj->getSubpart($this->templateCode, ((!$GLOBALS['TSFE']->loginUser||$conf['create.']['noSpecialLoginForm'])?'###TEMPLATE_CREATE'.$this->previewLabel.'###':'###TEMPLATE_CREATE_LOGIN'.$this->previewLabel.'###'));\n\t\t\t$failure = t3lib_div::_GP('noWarnings')?'':$this->failure;\n\t\t\tif (!$failure)\t$templateCode = $this->cObj->substituteSubpart($templateCode, '###SUB_REQUIRED_FIELDS_WARNING###', '');\n\t\t\t$templateCode = $this->removeRequired($templateCode,$failure);\n\t\t\t$this->metafeeditlib->setCObjects($conf,$this->markerArray,$templateCode);\n\t\t\t$markerArray = $this->cObj->fillInMarkerArray($this->markerArray, $this->dataArr, '', TRUE, 'FIELD_', FALSE);\n\t\t\t// Modif CBY to clear unset fields\n\t\t\t$fArr=t3lib_div::trimexplode(',',$this->conf['fieldList']);\n\t\t\tforeach($fArr as $fN) {\n\t\t\t\tif (in_array(substr($fN,0,11),array('--div--;Tab','--fsb--;FSB','--fse--;FSE'))) continue;\n\t\t\t\tif (!$this->dataArr[$fN]) $markerArray['###FIELD_'.$fN.'###']='';\n\t\t\t}\n\t\t\t$action=array();\n\t\t\t//<button type=\"submit\" name=\"doNotSave['.$pluginId.']\" value=\"donotsave\" '.$this->caller->pi_classParam('preview-donotsave').'>'.$this->metafeeditlib->getLL(\"create_preview_donotsave_label\",$conf).'</button>\n\t\t\t//<button type=\"submit\" name=\"submit['.$pluginId.']\" value=\"preview\"'.$this->caller->pi_classParam('preview-submit').'>'.$this->metafeeditlib->getLL(\"create_preview_submit_label\",$conf).'</button>\n\t\t\t//<table style=\"width:100%\"><tr><td align=\"left\"><div class=\"'.$this->caller->pi_getClassName('link').' '.$this->caller->pi_getClassName('link-back').'\"><a title=\"'.$this->metafeeditlib->getLL(\"back_label\",$conf).'\" href=\"###BACK_URL_HSC###\">'.$this->metafeeditlib->getLL(\"back_label\",$conf).'</a></div></td><td align=\"right\"><div class=\"'.$this->caller->pi_getClassName('link').' '.$this->caller->pi_getClassName('link-edit').'\"></div></td></tr></table>\n\t\t\t$action['DONOTSAVE']=$this->conf['disableCreate']?'':'<div class=\"'.$this->pi_getClassName('preview-donotsave').'\" ><button type=\"submit\" name=\"doNotSave['.$pluginId.']\" value=\"donotsave\" '.$this->pi_classParam('form-submit').'>'.$this->metafeeditlib->getLL(\"create_preview_donotsave_label\",$this->conf).'</button></div>';\n\t\t\t$action['PREVIEWSAVE']=$this->conf['disableCreate']?'':'<div class=\"'.$this->pi_getClassName('action-SAVE').'\" ><button type=\"submit\" name=\"submit['.$pluginId.']\" value=\"save\" '.$this->pi_classParam('form-submit').'>'.$this->metafeeditlib->getLL(\"create_preview_submit_label\",$this->conf).'</button></div>';\n\t\t\t$action['SAVE']=$this->conf['disableCreate']?'':'<div class=\"'.$this->pi_getClassName('action-SAVE').'\" ><button type=\"submit\" name=\"submit['.$pluginId.']\" value=\"'.($this->conf['create.']['preview']?'preview':'save').'\" '.$this->pi_classParam('form-submit').'>'.($this->conf['create.']['preview']?$this->metafeeditlib->getLL(\"create_submit_label\",$this->conf):$this->metafeeditlib->getLL(\"create_preview_submit_label\",$this->conf)).'</button></div>';\n\t\t\t$action['BACK']=$conf['ajax.']['ajaxOn']?'':'<div class=\"'.$this->pi_getClassName('link').' '.$this->pi_getClassName('link-create-login').'\"><div class=\"'.$this->pi_getClassName('link').' '.$this->pi_getClassName('link-back').'\"><a title=\"'.$this->metafeeditlib->getLL(\"back_label\",$conf).'\" href=\"###BACK_URL_HSC###\">'.$this->metafeeditlib->getLL(\"back_label\",$conf).'</a></div></div>';\n\t\t\tforeach($action as $key=>$act) {\n\t\t\t\t$markerArray['###ACTION-'.$key.'###']=$this->conf['no_action']?'':$this->cObj->substituteMarkerArray($act,$markerArray);\n\t\t\t}\n\t\t\t//$markerArray = $this->cObj->fillInMarkerArray($this->markerArray, $this->dataArr, '', TRUE, 'FIELD_', $conf['general.']['xhtml']);\n\t\t\tif ($conf['create.']['preview'] && !$this->previewLabel)\t{$markerArray['###HIDDENFIELDS###'].= '<input type=\"hidden\" name=\"preview['.$pluginId.']\" value=\"1\" />';}\n\t\t\t$content = $this->cObj->substituteMarkerArray($templateCode, $markerArray);\n\t\t\t$content.=$this->cObj->getUpdateJS($this->modifyDataArrForFormUpdate($this->dataArr), $this->theTable.'_form', 'FE['.$this->theTable.']', $this->conf['create.']['show_fields'].$this->additionalUpdateFields);\n\t\t} else { die('PLUGIN META FEEDIT : Create mode not allowed !');}\n\t\treturn $content;\n\t}", "public function getNewWindow() {}", "public function getNewWindow() {}", "public function create()\n {\n return View('nguoi_choi.xl_nguoi_choi');\n }", "public function create()\n {\n // return View::make('producto.partial.modal-producto');\n\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function new_menu () {\n\t\t$this->show_menu();\n\t\n\t\techo <<<EOT\n\t\t\t<div id=\"alert_box\">\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Name</td>\n\t\t\t\t\t<td><input type=\"text\" id=\"Name\" class=\"input\"><td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Beschreibung</td>\n\t\t\t\t\t<td><input type=\"text\" id=\"Beschreibung\" class=\"input\"><td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<span id=\"insert_menu\" class=\"action_span\">Hinzufügen</span>\n\t\t\t\t\t\t<span id=\"show_menu\" class=\"action_span\">Abbrechen</span>\n\t\t\t\t\t</td>\n\t\t\t</table>\n\t\t\t</div>\nEOT;\n\t}", "function create_new() {\n if($this->table_title != '' ) {\n $this->title = 'New ' . $this->table_title .\n $this->makeForm();\n }\n }", "protected function initDialog()\n {\n // We already know the TAN mode, so it will only fetch the BPD (anonymously) to verify it.\n $this->expectMessage(static::ANONYMOUS_INIT_REQUEST, static::ANONYMOUS_INIT_RESPONSE);\n $this->expectMessage(static::ANONYMOUS_END_REQUEST, static::ANONYMOUS_END_RESPONSE);\n\n // Then when we initialize a dialog, it's going to request a Kundensystem-ID and UPD.\n $this->expectMessage(static::SYNC_REQUEST, utf8_decode(static::SYNC_RESPONSE));\n $this->expectMessage(static::SYNC_END_REQUEST, static::SYNC_END_RESPONSE);\n // And finally it can initialize the main dialog.\n $this->expectMessage(static::INIT_REQUEST, utf8_decode(static::INIT_RESPONSE));\n\n $this->fints->selectTanMode(intval(self::TEST_TAN_MODE));\n $login = $this->fints->login();\n $login->ensureDone(); // No TAN required upon login.\n $this->assertAllMessagesSeen();\n }", "public function dialogAction(Request $request) {\n $action = $request->get('ACTION');\n $licenses = json_decode($request->get('LICENCES'), true);\n \n $aem = $this->get('morus_accetic.entity_manager'); // Get Accetic Entity Manager from service\n \n if ($action == 'NEW') {\n \n $unit = $aem->createUnit('customer');\n\n } else { \n $em = $this->getDoctrine()->getManager();\n $unit = $em->getRepository('MorusFasBundle:Unit')->find($action);\n foreach( $unit->getVehicles() as $vehicle) {\n if(($key = array_search($vehicle->getRegistrationNumber(), $licenses)) !== false) {\n unset($licenses[$key]);\n }\n }\n \n \n }\n \n foreach ($licenses as $license) {\n $vehicle = new \\Morus\\FasBundle\\Entity\\Vehicle();\n $vehicle->setRegistrationNumber($license);\n $unit->addVehicle($vehicle);\n $vehicle->setUnit($unit);\n }\n \n $form = $this->genDialogForm($unit);\n \n return $this->render('MorusFasBundle:Contacts:dialog.html.twig', array(\n 'unit' => $unit,\n 'form' => $form->createView(),\n ));\n }", "function getUploadDialog() {\n if ($this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_UPLOAD)) {\n $result = '';\n include_once(PAPAYA_INCLUDE_PATH.'system/base_dialog.php');\n $fields = array();\n $data = array();\n $hidden = array(\n 'confirm' => 1,\n 'folder_id' => $this->params['folder_id'],\n 'cmd' => 'upload',\n 'upload' => 1,\n );\n if (isset($this->params['file_id'])) {\n $hidden['file_id'] = $this->params['file_id'];\n }\n $dialog = new base_dialog($this, $this->paramName, $fields, $data, $hidden);\n $dialog->tokenKeySuffix = 'upload';\n $dialog->loadParams();\n\n include_once(PAPAYA_INCLUDE_PATH.'system/base_mediadb_rpc.php');\n $rpcObj = new base_mediadb_rpc;\n\n if (function_exists('uploadprogress_get_info')) {\n $progressBar = TRUE;\n } else {\n $progressBar = FALSE;\n }\n\n $this->layout->addScript('<script type=\"text/javascript\" src=\"script/xmlrpc.js\"></script>');\n $this->layout->addScript('<script type=\"text/javascript\" src=\"script/upload.js\"></script>');\n $this->layout->addScript(\n sprintf(\n '<script type=\"text/javascript\">\n var progressDialogTitle = \"%s\";\n var progressDialogStartMsg = \"%s\";\n var progressNoFileMsg = \"%s\";\n </script>',\n papaya_strings::escapeHTMLChars($this->_gt('Upload files')),\n papaya_strings::escapeHTMLChars($this->_gt('Starting upload...')),\n papaya_strings::escapeHTMLChars($this->_gt('No files to upload!'))\n )\n );\n\n if ($progressBar) {\n $result .= sprintf(\n '<dialog action=\"%s\" name=\"uploadform\" id=\"uploadform\" title=\"%s\"'.\n ' onsubmit=\"return startFileUpload(this);\" width=\"100%%\" type=\"file\"'.\n ' enctype=\"multipart/form-data\">'.LF,\n papaya_strings::escapeHTMLChars($this->getLink()),\n papaya_strings::escapeHTMLChars($this->_gt('Upload files'))\n );\n $result .= '<input type=\"hidden\" name=\"UPLOAD_IDENTIFIER\" id=\"UPLOAD_IDENTIFIER\"'.\n ' value=\"uniquid\" />'.LF;\n $result .= '<input type=\"hidden\" name=\"UPLOAD_JAVASCRIPT\" id=\"UPLOAD_JAVASCRIPT\"'.\n ' value=\"0\" />'.LF;\n } else {\n $result .= sprintf(\n '<dialog action=\"%s\" name=\"uploadform\" id=\"uploadform\" title=\"%s\" '.\n ' width=\"100%%\" type=\"file\" enctype=\"multipart/form-data\">'.LF,\n papaya_strings::escapeHTMLChars($this->getLink()),\n papaya_strings::escapeHTMLChars($this->_gt('Upload files'))\n );\n }\n $result .= sprintf(\n '<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"%d\" />'.LF,\n (int)$this->getMaxUploadSize()\n );\n $result .= $dialog->getHidden();\n $result .= '<lines class=\"dialogSmall\">'.LF;\n for ($i = 0; $i < $this->numUploadFields; $i++) {\n $result .= sprintf(\n '<line caption=\"%s %d\">'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('File')),\n $i + 1\n );\n $result .= sprintf(\n '<input type=\"file\" size=\"18\" class=\"dialogScale dialogFile\" id=\"%s_upload_%d\"'.\n ' name=\"%s[upload][%d]\" />'.LF,\n papaya_strings::escapeHTMLChars($this->paramName),\n (int)$i,\n papaya_strings::escapeHTMLChars($this->paramName),\n (int)$i\n );\n $result .= '</line>'.LF;\n if ($i == 0 && isset($this->currentFile) && is_array($this->currentFile)) {\n $result .= sprintf(\n '<line caption=\"%s\" align=\"center\">'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('Replace current file'))\n );\n $result .= sprintf(\n '<input type=\"checkbox\" name=\"%s[replace]\" value=\"1\" />'.LF,\n papaya_strings::escapeHTMLChars($this->paramName)\n );\n $result .= '</line>'.LF;\n }\n }\n $result .= '</lines>'.LF;\n $result .= sprintf(\n '<dlgbutton align=\"left\" value=\"\" caption=\"%s\" type=\"button\"'.\n ' hint=\"%s\" onclick=\"addUploadButton(\\'%s\\');\" image=\"%s\" mode=\"both\"/>'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('Add upload field')),\n papaya_strings::escapeHTMLChars(\n $this->_gt('Click this button to add another upload field.')\n ),\n papaya_strings::escapeHTMLChars($this->_gt('File')),\n papaya_strings::escapeHTMLChars($this->images['actions-generic-add'])\n );\n $result .= sprintf(\n '<dlgbutton value=\"%s\" id=\"upsub\" name=\"upsub\" />'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('Upload'))\n );\n $result .= '</dialog>'.LF;\n $this->layout->addRight($result);\n }\n }", "public function getCreate()\n\t{\n\t\t/*\n\t\t * Layout / View\n\t\t */\n\n\t\t$this->layout->content = View::make('admin.contract.create');\n\t}", "public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_presenca/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_presenca.create')\n;\n\t}", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "function PKG_OptionPageRender($layout)\n{\n\tfor ($i=0; $i < count($layout); $i++)\n\t\t{\n\t\t\tswitch($layout[$i]['type'])\n\t\t\t\t{\n\t\t\t\t\tcase \"text\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo(\"<tr><td colspan=\\\"2\\\">\".$layout[$i]['text'].\"</td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\t\t\t\t\tcase \"line\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo(\"<tr><td colspan=\\\"2\\\"><hr></td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\t\t\t\t\tcase \"title\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo(\"<tr><td colspan=\\\"2\\\"><br><span class=\\\"title\\\">\".$layout[$i]['text'].\"</span><hr></td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\t\t\t\t\tcase \"infobox\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$infoBox = MSG_showMessageBoxHeader(\"infotable\",$layout[$i]['text'],700,true).MSG_showMessageBoxFooter(true);\n\t\t\t\t\t\t\techo(\"<tr><td colspan=\\\"2\\\">$infoBox</td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\tcase \"inputline\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Define the dialog element\n\t\t\t\t\t\t\t$layout[$i]['value'] = HTML_input($layout[$i]['name'], $layout['allvalues'][$layout[$i]['name']], $layout[$i]['size'], $layout[$i]['maxlength'], INPUT_TYPE_text);\n\n\t\t\t\t\t\t\t//Show it\n\t\t\t\t\t\t\techo(\"<tr><td>\".$layout[$i]['text'].\"</td><td>\".constant($layout[$i]['name']).\"</td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\n\t\t\t\t\tcase \"selection\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$arr = array();\n\n\t\t\t\t\t\t\t//Generate the array for the options\n\t\t\t\t\t\t\tfor ($nr=0; isset($layout[$i][\"option\".$nr]); $nr++)\n\t\t\t\t\t\t\t\t$arr[$layout[$i]['option'.$nr]] = $layout[$i]['option'.$nr];\n\n\t\t\t\t\t\t\t//Define the dialog element\n\t\t\t\t\t\t\t$layout[$i]['value'] = HTML_selection($layout[$i]['name'], $arr, SELTYPE_selection, true, $layout['allvalues'][$layout[$i]['name']]);\n\n\t\t\t\t\t\t\t//Show it\n\t\t\t\t\t\t\techo(\"<tr><td>\".$layout[$i]['text'].\"</td><td>\".constant($layout[$i]['name']).\"</td></tr>\\n\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\t\t\t\t\tcase \"textarea\":\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$layout[$i]['value'] = HTML_textArea($layout[$i]['name'], $layout[$i]['cols'], $layout[$i]['rows'], $layout['allvalues'][$layout[$i]['name']]);\n\n\t\t\t\t\t\t\t//Show it\n\t\t\t\t\t\t\techo(\"<tr><td>\".$layout[$i]['text'].\"</td><td>\".constant($layout[$i]['name']).\"</td></tr>\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t};\n\n\t\t\t\t};\n\t\t};\n}", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "function showForm() {\n \tglobal $pluginpath;\n \t\n \tif ($this->idt == \"\") {\n \t //user is creating new template\n \t\t$title = MF_NEW_TEMPLATE;\n \t\t$this->action = 'createtempl';\n\t\t$btnText = MF_CREATE_TEMPLATE_BUTTON; \n \t} else {\n \t //user is editing old template\n \t\t$title = \tMF_CHANGE_TEMPLATE;\n \t\t$this->action = 'changetempl';\n\t\t$btnText = MF_CHANGE_FORUM_BUTTON;\n \t}\n \t\n\t$this->doHtmlSpecChars();\n\t\t\n\tinclude \"admin/tempForm.php\";\n \t\n }", "public function initTemplateSelectionForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\n\t\t// page name\n\t\t$hi = new ilHiddenInputGUI(\"page\");\n\t\t$hi->setValue($_GET[\"page\"]);\n\t\t$form->addItem($hi);\n\n\t\t// page template\n\t\t$radg = new ilRadioGroupInputGUI($lng->txt(\"wiki_page_template\"), \"page_templ\");\n\t\t$radg->setRequired(true);\n\n\t\tif ($this->object->getEmptyPageTemplate())\n\t\t{\n\t\t\t$op1 = new ilRadioOption($lng->txt(\"wiki_empty_page\"), 0);\n\t\t\t$radg->addOption($op1);\n\t\t}\n\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPageTemplate.php\");\n\t\t$wt = new ilWikiPageTemplate($this->object->getId());\n\t\t$ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES);\n\t\tforeach ($ts as $t)\n\t\t{\n\t\t\t$op = new ilRadioOption($t[\"title\"], $t[\"wpage_id\"]);\n\t\t\t$radg->addOption($op);\n\t\t}\n\n\t\t$form->addItem($radg);\n\n\t\t// save and cancel commands\n\t\t$form->addCommandButton(\"createPageUsingTemplate\", $lng->txt(\"wiki_create_page\"));\n\t\t$form->addCommandButton(\"cancelCreationPageUsingTemplate\", $lng->txt(\"cancel\"));\n\n\t\t$form->setTitle($lng->txt(\"wiki_new_page\").\": \".$_GET[\"page\"]);\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\n\t\treturn $form;\n\t}", "protected function showYesNoClick() {\n\n\t\t\t$dlgYesNo = new \\QCubed\\Project\\Jqui\\Dialog();\t// Note here there is no \"$this\" as the first parameter. By leaving this off, you\n\t\t\t\t\t\t\t\t\t\t// are telling QCubed to manage the dialog.\n\t\t\t$dlgYesNo->Text = t(\"Do you like QCubed?\");\n\t\t\t$dlgYesNo->AddButton ('Yes');\n\t\t\t$dlgYesNo->AddButton ('No');\n\t\t\t$dlgYesNo->AddAction (new \\QCubed\\Event\\DialogButton(), new \\QCubed\\Action\\Ajax ('dlgYesNo_Button'));\n\t\t\t$dlgYesNo->Resizable = false;\n\t\t\t$dlgYesNo->HasCloseButton = false;\n\t\t}", "public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_historico_atleta_cameponato/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_historico_atleta_cameponato.create')\n;\n\t}", "public static function createInstance()\n {\n return new DateGridSearchDialog('ISerializable', 'ISerializable', 'ISerializable');\n }", "public static function createInstance()\n {\n return new NumberGridSearchDialog('ISerializable', 'ISerializable', 'ISerializable');\n }", "public function create()\n {\n return view('backend.xeploai_cd.create');\n }", "abstract protected function _setNewForm();", "public static function _NEW(){\n\t\tLibMenuBar::startTable();\n\t\tLibMenuBar::cancel();\n\t\tLibMenuBar::spacer();\n\t\tLibMenuBar::help('screen.menus.new');\n\t\tLibMenuBar::endTable();\n\t}", "public function create()\n {\n return view('/interface.page.housing_communal.create');\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}", "function drawButtonsDefault() {\r\n global $objectClass, $planningType, $showListFilter;\r\n ?>\r\n <table style=\"width:10px\">\r\n <tr>\r\n <?php \r\n if ($planningType=='planning' or $planningType=='resource' or $planningType=='global' or $planningType=='version') {?>\r\n <td colspan=\"1\" width=\"51px\" style=\"<?php if (isNewGui()) echo 'padding-right: 5px;';?>\">\r\n <?php // ================================================================= NEW ?>\r\n <?php if ($planningType=='version') {?><div id =\"addNewActivity\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>;\"><?php } ?>\r\n <div dojoType=\"dijit.form.DropDownButton\"\r\n class=\"comboButton\" \r\n id=\"planningNewItem\" jsId=\"planningNewItem\" name=\"planningNewItem\" \r\n showlabel=\"false\" class=\"\" iconClass=\"dijitButtonIcon dijitButtonIconNew\"\r\n title=\"<?php echo i18n('comboNewButton');?>\">\r\n <span>title</span>\r\n <div dojoType=\"dijit.TooltipDialog\" class=\"white\" style=\"width:200px;\"> \r\n <div style=\"font-weight:bold; height:25px;text-align:center\"><?php echo i18n('comboNewButton');?> </div>\r\n <?php \r\n $arrayItems=array('Project','Activity','Milestone','Meeting','PeriodicMeeting','TestSession');\r\n if ($planningType=='resource' or $planningType=='version') $arrayItems=array('Activity');\r\n if ($planningType=='global') $arrayItems=array_merge($arrayItems,array('Ticket','Action','Decision','Delivery','Risk','Issue','Opportunity','Question'));\r\n foreach($arrayItems as $item) {\r\n $canCreate=securityGetAccessRightYesNo('menu' . $item,'create');\r\n if ($canCreate=='YES') {\r\n if (! securityCheckDisplayMenu(null,$item) ) {\r\n $canCreate='NO';\r\n }\r\n }\r\n if ($canCreate=='YES') {?>\r\n <div style=\"vertical-align:top;cursor:pointer;\" class=\"newGuiIconText\"\r\n onClick=\"addNewItem('<?php echo $item;?>');\" >\r\n <table width:\"100%\"><tr style=\"height:22px\" >\r\n <td style=\"vertical-align:top; width: 30px;padding-left:5px\"><?php echo formatIcon($item, 22, null, false);;?></td> \r\n <td style=\"vertical-align:top;padding-top:2px\"><?php echo i18n($item)?></td>\r\n </tr></table> \r\n </div>\r\n <div style=\"height:5px;\"></div>\r\n <?php \r\n } \r\n }?>\r\n </div>\r\n </div>\r\n <?php if ($planningType=='version') {?></div><?php } ?> \r\n </td> \r\n <?php\r\n } \r\n if ($planningType=='global') {?>\r\n <td colspan=\"1\" width=\"51px\" style=\"<?php if (isNewGui()) echo 'padding-right: 5px;';?>\">\r\n <?php drawGlobalItemsSelector();?>\r\n </td> \r\n <?php \r\n } \r\n $activeFilter=false;\r\n if (is_array(getSessionUser()->_arrayFilters)) {\r\n if (array_key_exists('Planning', getSessionUser()->_arrayFilters)) {\r\n if (count(getSessionUser()->_arrayFilters['Planning'])>0) {\r\n \t foreach (getSessionUser()->_arrayFilters['Planning'] as $filter) {\r\n \t\t if (!isset($filter['isDynamic']) or $filter['isDynamic']==\"0\") {\r\n \t\t\t $activeFilter=true;\r\n \t\t }\r\n \t }\r\n }\r\n }\r\n }\r\n ?>\r\n <?php \r\n if ($planningType=='planning' or $planningType=='resource' or $planningType=='version') {?>\r\n <td colspan=\"1\" width=\"55px\" style=\"padding-left:1px\";>\r\n <?php // ================================================================= FILTER ?>\r\n <?php if ($planningType=='version') {?><div id=\"listFilterAdvanced\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>;\"><?php }?>\r\n <button title=\"<?php echo i18n('advancedFilter')?>\" \r\n class=\"comboButton\"\r\n dojoType=\"dijit.form.DropDownButton\" \r\n id=\"listFilterFilter\" name=\"listFilterFilter\"\r\n iconClass=\"dijitButtonIcon icon<?php echo($activeFilter)?'Active':'';?>Filter\" showLabel=\"false\">\r\n <?php \r\n if(!isNewGui()){?>\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n showFilterDialog();\r\n </script>\r\n <script type=\"dojo/method\" event=\"onMouseEnter\" args=\"evt\">\r\n clearTimeout(closeFilterListTimeout);\r\n clearTimeout(openFilterListTimeout);\r\n openFilterListTimeout=setTimeout(\"dijit.byId('listFilterFilter').openDropDown();\",popupOpenDelay);\r\n </script>\r\n <script type=\"dojo/method\" event=\"onMouseLeave\" args=\"evt\">\r\n clearTimeout(openFilterListTimeout);\r\n closeFilterListTimeout=setTimeout(\"dijit.byId('listFilterFilter').closeDropDown();\",2000);\r\n </script>\r\n <?php \r\n }?>\r\n <div dojoType=\"dijit.TooltipDialog\" id=\"directFilterList\" style=\"z-index: 999999;<!-- display:none; --> position: absolute;\">\r\n <?php \r\n $objectClass='Planning';\r\n $dontDisplay=true;\r\n if(isNewGui())include \"../tool/displayQuickFilterList.php\";\r\n include \"../tool/displayFilterList.php\";\r\n if(!isNewGui()){?>\r\n <script type=\"dojo/method\" event=\"onMouseEnter\" args=\"evt\">\r\n clearTimeout(closeFilterListTimeout);\r\n clearTimeout(openFilterListTimeout);\r\n </script>\r\n <script type=\"dojo/method\" event=\"onMouseLeave\" args=\"evt\">\r\n dijit.byId('listFilterFilter').closeDropDown();\r\n </script>\r\n <?php \r\n }?>\r\n </div> \r\n </button>\r\n <?php if ($planningType=='version') {?></div><?php }?>\r\n </td>\r\n <?php \r\n }?> \r\n <td colspan=\"1\">\r\n <?php // ================================================================= COLUMNS SELECTOR ?> \r\n <div dojoType=\"dijit.form.DropDownButton\"\r\n id=\"planningColumnSelector\" jsId=\"planningColumnSelector\" name=\"planningColumnSelector\" \r\n showlabel=\"false\" class=\"comboButton\" iconClass=\"dijitButtonIcon dijitButtonIconColumn\" \r\n title=\"<?php echo i18n('columnSelector');?>\">\r\n <span>title</span>\r\n <?php \r\n $screenHeight=getSessionValue('screenHeight','1080');\r\n $columnSelectHeight=intval($screenHeight*0.6);?>\r\n <div dojoType=\"dijit.TooltipDialog\" id=\"planningColumnSelectorDialog\" class=\"white\" style=\"width:300px;\"> \r\n <script type=\"dojo/connect\" event=\"onHide\" data-dojo-args=\"evt\">\r\n if (dndMoveInProgress) { setTimeout('dijit.byId(\"planningColumnSelector\").openDropDown();',1); }\r\n </script>\r\n <div id=\"dndPlanningColumnSelector\" jsId=\"dndPlanningColumnSelector\" dojotype=\"dojo.dnd.Source\" \r\n dndType=\"column\" style=\"overflow-y:auto; max-height:<?php echo $columnSelectHeight;?>px; position:relative\"\r\n withhandles=\"true\" class=\"container\"> \r\n <?php \r\n if ($planningType=='portfolio') $portfolioPlanning=true;\r\n if ($planningType=='contract') $contractGantt=true;\r\n if ($planningType=='version') $versionPlanning=true;\r\n include('../tool/planningColumnSelector.php');?>\r\n </div>\r\n <div style=\"height:5px;\"></div> \r\n <div style=\"text-align: center;\"> \r\n <button title=\"\" dojoType=\"dijit.form.Button\" \r\n id=\"\" name=\"\" showLabel=\"true\"><?php echo i18n('buttonOK');?>\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n validatePlanningColumn();\r\n </script>\r\n </button>\r\n </div> \r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r\n<?php \r\n}", "public static function createInstance()\n {\n return new TextGridSearchDialog('ISerializable', 'ISerializable', 'ISerializable');\n }", "public function create()\n\t\t{\n\t\t\t$dosen_list = $this -> getDosenSelection();\n\t\t\treturn view('dosen.buku.create', compact('dosen_list'));\n\t\t}", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function getCreateBookModal(){\n\t\t$tags = Tag::all();\n\t \treturn View::make('createBookModal', array('tags'=>$tags));\n\t}", "function _NEW()\t{\n\t\tmosMenuBar::startTable();\n\t\tmosMenuBar::preview( 'modulewindow' );\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::save();\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::apply();\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::cancel();\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::help( 'screen.modules.new' );\n\t\tmosMenuBar::endTable();\n\t}", "function dialogue_get_post_actions() {\n return array('add entry','edit_entry','open');\n}", "public function authDialogAction()\n {\n // Get type\n $type = waRequest::request('type');\n $type = is_scalar($type) ? (string)$type : '';\n\n // All known form types\n $types = array('login', 'signup', 'forgotpassword', 'setpassword');\n\n // Unknown form type case\n if (!in_array($type, $types, true)) {\n return '';\n }\n\n // define contact_type (aka customer_type)\n\n $route_params = wa()->getRouting()->getRoute();\n $checkout_storefront_id = isset($route_params['checkout_storefront_id']) ? $route_params['checkout_storefront_id'] : '';\n $checkout_config = new shopCheckoutConfig($checkout_storefront_id);\n\n if ($checkout_config['customer']['type'] === 'company') {\n $contact_type = 'company';\n } elseif ($checkout_config['customer']['type'] === 'person') {\n $contact_type = 'person';\n } elseif ($checkout_config['customer']['type'] === 'person_and_company') {\n $contact_type = waRequest::request('contact_type') === 'company' ? 'company' : 'person';\n } else {\n $contact_type = 'person';\n }\n\n // Template path\n $template_path = wa()->getAppPath(\"templates/actions/frontend/order/form/dialog/{$type}.html\", 'shop');\n\n\n // Render itself\n $view = wa('shop')->getView();\n $old_vars = $view->getVars();\n $view->assign(array(\n 'type' => $type,\n 'contact_type' => $contact_type, // need for signup form, to signup contact of proper type\n 'hash' => waRequest::request('hash') // need for setpassword form\n ));\n $html = $view->fetch($template_path);\n $view->clearAllAssign();\n $view->assign($old_vars);\n\n // Result\n echo $html;\n exit;\n }", "public function create()\n {\n // I skip using this create function because I use a modal form for inserting data using modal in index view via index function.\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "public function makeHelpButton() {}", "public function create()\n\t{\n\t\treturn View::make(''.$this->common_name.'.create')->with('common_name',$this->common_name);\n\t}", "public function cerraModal(){\n\n $this->folio='';\n\n $this->nombre= ''; \n\n $this->apellido_p= '';\n\n $this->apellido_m= '';\n\n $this->puesto= ''; \n }", "function createApprentice() {\n\t\t\t\t\t$addForm = new h2o('views/addApprentice.html');\n\t\t\t\t\techo $addForm->render();\n\t\t\t\t}", "public function createView(){\n\t\t$vue = new View(\"Create\");\n\t\t$vue->generer();\n\t}", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function create()\n\t{\n\t\t// Set the title\n\t\t$this->template->title(lang('calendars:button:new_calendar'));\n\n\t\t// If this is a post, set the str_id\n\t\tif ($_POST)\n\t\t{\n\n\t\t\t// Set the str_id\n\t\t\t$_POST['str_id'] = rand_string(10);\n\n\t\t\t// Set default colors\n\t\t\tif ( empty($_POST['bg_color']) ) $_POST['bg_color'] = '3366cc';\n\t\t\tif ( empty($_POST['text_color']) ) $_POST['text_color'] = 'ffffff';\n\t\t\tif ( ! isset($_POST['sharing']) ) $_POST['sharing'] = NULL;\n\t\t}\n\n\t\t/* Start normal Streams_Core stuff\n\t\t----------------------------------------------------------------------------*/\n\n\t\t// Set some shit\n\t\t$extra = array(\n\t\t\t'return'\t\t\t=> 'admin/calendars',\n\t\t\t'success_message'\t=> lang('calendars:success:new_calendar'),\n\t\t\t'failure_message'\t=> lang('calendars:error:new_calendar'),\n\t\t\t'title'\t\t\t\t=> lang('calendars:button:new_calendar'),\n\t\t);\n\n\t\t// We will set these ourselves\n\t\t$skip = array('str_id');\n\n\t\t// Build it\n\t\t$this->streams->cp->entry_form('calendars', 'calendars', $mode = 'new', null, true, $extra, $skip, $this->_tabs);\n\t}", "public static function wp_link_dialog()\n {\n }" ]
[ "0.7593732", "0.7170996", "0.7111243", "0.66981536", "0.6662371", "0.6662371", "0.6662371", "0.6662371", "0.66160315", "0.6599571", "0.6599571", "0.6560312", "0.63280344", "0.6232092", "0.61839443", "0.61776173", "0.61298287", "0.60995287", "0.60743606", "0.6058387", "0.6047559", "0.6047559", "0.6033438", "0.6018237", "0.59793234", "0.5963129", "0.5961872", "0.59351563", "0.59351563", "0.58658016", "0.5798423", "0.57979274", "0.5785489", "0.57729554", "0.5755895", "0.5755895", "0.5755895", "0.5737056", "0.5720689", "0.5702847", "0.5687914", "0.5671228", "0.5665987", "0.5661653", "0.5652661", "0.56298465", "0.5602848", "0.55809575", "0.5575734", "0.5553235", "0.55498385", "0.5538943", "0.55360425", "0.5506407", "0.5506407", "0.5497959", "0.5497179", "0.5484639", "0.5484639", "0.5483244", "0.547157", "0.54587984", "0.5456093", "0.5447057", "0.5446745", "0.54358786", "0.5435408", "0.5435408", "0.54329616", "0.54308563", "0.5425487", "0.54237986", "0.54124707", "0.5407774", "0.5403638", "0.54002726", "0.53934556", "0.5376723", "0.5369244", "0.5367361", "0.53495455", "0.5338477", "0.53215414", "0.53194445", "0.5315231", "0.531291", "0.5309005", "0.53056675", "0.53052247", "0.5304666", "0.53010297", "0.53006077", "0.5295866", "0.52864176", "0.5283986", "0.52814615", "0.52799547", "0.527967", "0.5273156", "0.5269207" ]
0.5936938
27
/ Collect all the post data
public function collectData() { $dialog = new Application_Model_DbTable_Dialog(); $this->getDialogLines(); $ignore_list = array('','' /*, 'submit_button'*/ ); $this->error = array(); $this->error[] = "<table><tr><th colspan='2'>Fix the following errors and retry</td></tr>"; $errorct = 0; $this->data = array(); $formData = $this->getRequest(); foreach($this->drows as $row) { if ($row['position'] == 0) continue; $type = $row['field_type']; $varname = $row['field_name']; $field_label = $row['field_label']; $validate = $row['validate']; if (in_array($type, $ignore_list)) { continue; } // logit('IN: '. $formData->getPost($varname,'')); $this->data[$varname] = $formData->getPost($varname, ''); // VALIDATION HERE if ($validate) { $msg = call_user_func($validate, $this->data[$varname]); logit("VAL: {$varname} {$validate} {$this->data[$varname]} -- {$msg}"); if ($msg) { // Enter into error array $errorct ++; $this->error[] = "<tr><td class=\"rpad\"><b>{$field_label}:</b></td>" . "<td> <Span class=\"error\">{$msg}</span></td></tr>"; } } } $this->error[] = "</table>"; if ($errorct == 0) $this->error = array(); $this->handleCancel(); // logit("ECT: " . count($this->error)); if (count($this->error) > 0) { $this->echecklistNamespace->flash = 'Correct errors and retry'; $this->makeDialog($this->data); return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ParsePostData() {}", "public function parsePostData()\n {\n }", "protected function getPostValues() {}", "private function getPostData()\n {\n $postData = $this->request->getPostValue();\n\n /** Magento may adds the SID session parameter, depending on the store configuration.\n * We don't need or want to use this parameter, so remove it from the retrieved post data. */\n unset($postData['SID']);\n\n //Set original postdata before setting it to case lower.\n $this->originalPostData = $postData;\n\n //Create post data array, change key values to lower case.\n $postDataLowerCase = array_change_key_case($postData, CASE_LOWER);\n $this->postData = $postDataLowerCase;\n }", "function allPost()\n {\n $post = $this->unsafeAllPost();\n return array_map(array($this->sec, 'clean'), $post);\n }", "public function getPostVariables();", "abstract public function parsePostData() : array;", "public function get_post_data() {\n\t\tforeach($this->form_fields as $form_field_key => $form_field_value) {\n\t\t\tif ($form_field_value['type'] == \"select_card_types\") {\n\t\t\t\t$form_field_key_select_card_types = $this->plugin_id . $this->id . \"_\" . $form_field_key;\n\t\t\t\t$select_card_types_values = array();\n\t\t\t\t$_POST[$form_field_key_select_card_types] = $select_card_types_values;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $this->data ) && is_array( $this->data ) ) {\n\t\t\treturn $this->data;\n\t\t}\n\t\treturn $_POST;\n\t}", "private function collectData() {\n $this->Name = $this->sanitize($_POST['Name']);\n $this->Street1 = $this->sanitize($_POST['Street1']);\n $this->Street2 = $this->sanitize($_POST['Street2']);\n $this->CityName = $this->sanitize($_POST['CityName']);\n $this->StateOrProvince = $this->sanitize($_POST['StateOrProvince']);\n $this->Country = $this->sanitize($_POST['Country']);\n $this->PostalCode = $this->sanitize($_POST['PostalCode']);\n }", "public function getPostData() {\n \t\n \t// Return POST\n \treturn $this->oPostData;\n }", "protected function setPostData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "public function getPostData() :array\n {\n return empty($_POST) ? [] : $_POST;\n }", "public function getPosts() {\n return isset($_POST) ? $_POST : array();\n }", "public function get_post_data() {\n\t\treturn $this->post;\n\t}", "function populateFromPost()\n\t{\n\t}", "public static function allPost()\n {\n try {\n $form = [];\n foreach ($_POST as $name => $value) {\n $form[htmlspecialchars($name)] = htmlspecialchars($value);\n }\n return $form;\n } catch (Exception $e) {\n die($e);\n }\n }", "private function readPost(){\n\t\tIF(isset($_POST['eventName'])) { \n\t\t $this->eventName = trim(strip_tags($_POST['eventName']));\n\t\t}\n\t\tIF(isset($_POST['senderName'])) { \n\t\t $this->senderName = trim(strip_tags($_POST['senderName']));\n\t\t}\n\t\tIF(isset($_POST['senderEmail'])) {\n\t\t $this->senderEmail = trim(strip_tags(preg_replace(\"/[^0-9a-zA-ZäöüÄÖÜÈèÉéÂâáÁàÀíÍìÌâÂ@ \\-\\+\\_\\.]/\", \" \", $_POST['senderEmail'])));\n\t\t}\n\t\tIF(isset($_POST['validateEmail'])){\n\t\t $this->validateEmail = trim(strip_tags($_POST['validateEmail']));\n\t\t}\n\t\tIF(isset($_POST['senderPhone'])){\n\t\t $this->senderPhone = trim(strip_tags($_POST['senderPhone']));\n\t\t}\n\t\tIF(isset($_POST['numberOfTickets'])){\n\t\t $this->numberOfTickets = trim(strip_tags($_POST['numberOfTickets']));\n\t\t}\n\t\tIF(isset($_POST['paymentOption'])){\n\t\t $this->paymentOption = trim(strip_tags($_POST['paymentOption']));\n\t\t}\n\t\tIF(isset($_POST['otherPartyNames'])){\n\t\t $this->otherPartyNames = trim(strip_tags($_POST['otherPartyNames']));\n\t\t}\n\t\tIF(isset($_POST['pickupPoint'])){\n\t\t $this->pickupPoint = trim(strip_tags($_POST['pickupPoint']));\n\t\t} \n\t\tIF(isset($_POST['sittingNear'])){\n\t\t $this->sittingNear = trim(strip_tags($_POST['sittingNear']));\n\t\t}\n\t\tIF(isset($_POST['specialNeeds'])){\n\t\t $this->specialNeeds = trim(strip_tags($_POST['specialNeeds']));\n\t\t}\n\t}", "public function unsafeAllPost()\n {\n return $this->postvars;\n }", "public function parsePostData() {\n\t\t$dataset = DB::getInstance()->query('SELECT `id` FROM `'.PREFIX.'dataset` WHERE accountid = '.SessionAccountHandler::getId())->fetchAll();\n\n\t\tforeach ($dataset as $set) {\n\t\t\t$id = $set['id'];\n\t\t\t$modus = isset($_POST[$id.'_modus']) && $_POST[$id.'_modus'] == 'on' ? 2 : 1;\n\t\t\tif (isset($_POST[$id.'_modus_3']) && $_POST[$id.'_modus_3'] == 3)\n\t\t\t\t$modus = 3;\n\n\t\t\t$columns = array(\n\t\t\t\t'modus',\n\t\t\t\t'summary',\n\t\t\t\t'position',\n\t\t\t\t'style',\n\t\t\t\t'class'\n\t\t\t);\n\t\t\t$values = array(\n\t\t\t\t$modus,\n\t\t\t\t(isset($_POST[$id.'_summary']) && $_POST[$id.'_summary'] == 'on' ? 1 : 0),\n\t\t\t\tisset($_POST[$id.'_position']) ? (int)$_POST[$id.'_position'] : '',\n\t\t\t\tisset($_POST[$id.'_style']) ? htmlentities($_POST[$id.'_style']) : '',\n\t\t\t\tisset($_POST[$id.'_class']) ? htmlentities($_POST[$id.'_class']) : ''\n\t\t\t);\n\n\t\t\tDB::getInstance()->update('dataset', $id, $columns, $values);\n\t\t}\n\n\t\tCache::delete('Dataset');\n\t\tAjax::setReloadFlag(Ajax::$RELOAD_DATABROWSER);\n\t}", "public function valuesFromPost()\n {\n return $this->setDefaultValues($_POST);\n }", "private function processPostData() {\n\n if (isset($this->postDataArray['week']) && isset($this->postDataArray['year']))\n {\n\n $this->weekSelected = $this->cleanse_input($this->postDataArray['week']);\n $this->yearSelected = $this->cleanse_input($this->postDataArray['year']);\n }\n else\n {\n $this->weekSelected = $this->weeks[0];\n $this->yearSelected = $this->years[0];\n }\n }", "private function post_params() {\n return [\n 'title' => $this->params['title'],\n 'excerpt' => $this->params['excerpt'],\n 'content' => $this->params['content'],\n 'tags' => $this->params['tags']\n ];\n }", "private function postData()\n {\n $post = array_filter($this->post);\n\n return http_build_query($post);\n }", "public static function getPostData() {\n\n $DataObj = new stdClass();\n\n foreach ($_POST as $name => $value)\n $DataObj->$name = $value;\n\n return $DataObj;\n }", "protected function processPost() {\n\t\tif (isset($_POST['posted'])) {\n\t\t\t$this->is_save_request = TRUE;\n\t\t\tunset($_POST['posted']);\n\t\t}\n\n\t\t// process the remaining post vars\n\t\tif (0) deb(\"Survey1: processPost: POST = \", $_POST);\n\t\tforeach($_POST as $job_id=>$offer) {\n\t\t\tif ($job_id == 'username') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$job_name = get_job_name($job_id);\n\t\t\t// All offers except positive integers are treated as 0, meaning \"I don't want to do this job\"\n\t\t\tif ($offer == NULL || $offer < 0 || !is_numeric($offer)) $offer = 0;\n\t\t\tif (is_float($offer)) $offer = round($is_offer);\n\t\t\tif (0) deb(\"Survey1: processPost: job_name = offer: \", $job_name.\" = \".$offer);\n\t\t\t$this->results[$job_id] = $offer;\n\t\t}\n\t\tif (0) deb(\"Survey1: processPost: Results:\", $this->results);\n\t}", "function readFromPost() {\n\t\t$this->idt = requestVar('idt');\n\t\t$this->newIdt = requestVar('template');\n\t\t$this->description = requestVar('description');\n\t\t$this->postsHeader = requestVar('postListHeader');\n\t\t$this->postBody = requestVar('postBody');\n\t\t$this->postsFooter = requestVar('postListFooter');\n\t\t$this->formLogged = requestVar('formLogged');\n\t\t$this->form = requestVar('formNotLogged');\n\t\t$this->navigation = requestVar('navigation');\n\t\t$this->name = requestVar('nameNoUrl');\n\t\t$this->nameLin = requestVar('nameUrl');\n\t\t$this->memberName = requestVar('memberName');\n\t\t$this->date = requestVar('date');\n\t\t$this->time = requestVar('time'); \n\t\t$this->nextPage = requestVar('nextPage');\n\t\t$this->previousPage =requestVar('previousPage');\n\t\t$this->firstPage = requestVar('firstPage');\n\t\t$this->lastPage = requestVar('lastPage');\t\n\n\t\t$this->urlToLink = (requestVar('urlToLink') == 'yes') ? true : false;\n\t\t$this->emoToImg = \t (requestVar('emoToImg') == 'yes') ?true : false;\n\t\t$this->gravSize = \t (int)requestVar('gravSize');\n\t\t$this->gravDefault = requestVar('gravDefault');;\n\n\n\t\t\n\t\t$this->action = requestVar('action');\n\t}", "public static function manage_post_data(&$post) {\n\t\tif (count($post) > 0) {\n\t\t\tforeach ($post as $key => $value) {\n\t\t\t\t$key = Encryption::decrypt($key);\t\n\t\t\t\t$name = self::fetch_name($key);\n\t\t\t\t$errors[$name] = self::is_valid_request($key, $value);\n\t\t\t\t$output[$name] = self::apply_filters($key, $value);\n\t\t\t}\n\t\t\tself::$requested_data = $output;\n\t\t\tself::$errors = $errors;\n\t\t}\n\t\telse {\n\t\t\tself::$requested_data = false;\n\t\t}\n\t\t$post = array();\n\t}", "public function clearPostData()\n {\n $this->post_data = array();\n }", "public function GetFormPostedValues() {\n\t\t$req_fields=array(\"description\",\"date_open\",\"date_closed\");\n\n\t\tfor ($i=0;$i<count($req_fields);$i++) {\n\n\t\t\t//echo $_POST['application_id'];\n\t\t\tif (ISSET($_POST[$req_fields[$i]]) && !EMPTY($_POST[$req_fields[$i]])) {\n\t\t\t\t$this->SetVariable($req_fields[$i],EscapeData($_POST[$req_fields[$i]]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//echo \"<br>\".$this->req_fields[$i].\"<br>\";\n\t\t\t\t$this->$req_fields[$i]=\"\";\n\t\t\t}\n\t\t}\n\t}", "public function getPostParams()\n {\n return $this->post;\n }", "private function parsed_data()\n {\n $parsed_data = array();\r\n\r\n //post data\r\n $parsed_data['name'] = $this->input->post(\"name\", TRUE);\r\n $parsed_data['email'] = $this->input->post(\"email\", TRUE);\r\n $parsed_data['countryID'] = $this->input->post(\"country\", TRUE);\r\n $parsed_data['phone'] = $this->input->post(\"phone\", TRUE);\r\n $parsed_data['message'] = $this->input->post(\"message\", TRUE);\r\n $parsed_data['IP'] = $this->input->ip_address();\r\n $parsed_data['browser'] = $this->input->user_agent();\r\n //post data\r\n\r\n return $parsed_data;\n }", "public function getPostVars() {\n return $this->postvars;\n }", "function resetPostData() {\n\t\t$this->postData = Array ();\n\t}", "public function extract_data_post()\r\n {\r\n if(isset($_POST['search_term']) == true && empty($_POST['search_term']) == false){\r\n $text = filter_input(INPUT_POST, 'search_term', FILTER_SANITIZE_STRING);\r\n $search = $this->Ajax->extract($text);\r\n foreach ($search as $row) {\r\n echo '<li>'.$row['word'].'<li>';\r\n }\r\n }\r\n }", "private function loadPostParams()\n {\n if(isset($_POST)) {\n $this->postParams = $_POST;\n }\n }", "public function getRequestPostResults()\n\t{\n\t\treturn $this->request_post_results;\n\t}", "public function grabAllPost()\n {\n // grab all the posts\n $allPost = $this->dbCon->query(\"SELECT search_info_content, search_info_year FROM search_info\");\n \n return $allPost;\n }", "public function posts()\n {\n $post = filter_input_array(INPUT_POST);\n array_walk_recursive($post, function(&$value) {\n $value = JORequest::setAntiInjection($value);\n });\n return $post;\n }", "public function getPostValues() {\n $post_check_array = array(\n// submit action\n 'add' => array('filter' => FILTER_SANITIZE_STRING),\n 'update' => array('filter' => FILTER_SANITIZE_STRING),\n // List all update form fields !!!\n// event type name.\n 'datum' => array('filter' => FILTER_SANITIZE_STRING),\n 'prioriteit' => array('filter' => FILTER_SANITIZE_STRING),\n 'username' => array('filter' => FILTER_SANITIZE_STRING),\n 'user' => array('filter' => FILTER_SANITIZE_STRING),\n 'password' => array('filter' => FILTER_SANITIZE_STRING),\n // Help text\n 'status' => array('filter' => FILTER_SANITIZE_STRING),\n // Id of current row\n 'alarm_id' => array('filter' => FILTER_VALIDATE_INT),\n 'alarm_noticed' => array('filter' => FILTER_VALIDATE_INT),\n\t\t\t'alarm_origin' => array('filter' => FILTER_SANITIZE_STRING)\n );\n// Get filtered input:\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n// RTS\n return $inputs;\n }", "public function getPostArray()\n {\n return [\n 'name' => $this->name,\n 'message' => $this->message,\n 'iplog' => $this->iplog,\n 'timelog' => $this->timelog\n ];\n }", "public function getPostValues()\n {\n // Define the check for params\n $post_check_array = array(\n // submit action\n 'toevoegen' => array('filter' => FILTER_SANITIZE_STRING),\n 'bijwerken' => array('filter' => FILTER_SANITIZE_STRING),\n 'verwijderen' => array('filter' => FILTER_SANITIZE_STRING),\n // question\n 'vraag' => array('filter' => FILTER_SANITIZE_STRING),\n // question type (open or closed)\n 'vraagId' => array('filter' => FILTER_SANITIZE_INT),\n // question type (open or closed)\n 'vraagSoort' => array('filter' => FILTER_SANITIZE_STRING),\n // Education\n 'opleiding' => array('filter' => FILTER_SANITIZE_STRING),\n // question send time\n 'verstuurTijd' => array('filter' => FILTER_SANITIZE_STRING)\n );\n // Get filtered input:\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n // RTS\n return $inputs;\n }", "private function managePost()\n {\n // Do only react on POST requests\n if ($_SERVER['REQUEST_METHOD'] != 'POST' || empty($_POST)) {\n return;\n }\n\n /* @var $post \\Core\\Http\\Post\\Post */\n $this->di->mapService('core.http.post', '\\Core\\Http\\Post\\Post');\n\n $post = $this->di->get('core.http.post');\n\n // Setting the name of the session token that has to/gets sent with a form\n $post->setTokenName($this->config->get('Core', 'security.form.token'));\n\n // Validate posted token with session token\n if (!$post->validateCompareWithPostToken($this->di->get('core.security.form.token'))) {\n return;\n }\n\n // Some data cleanup\n $post->trimData();\n\n // Assingn app related post data to the corresponding app\n $post_data = $post->get();\n\n foreach ($post_data as $name => $data) {\n $app = $this->getAppInstance($name);\n $app->post->set($data);\n }\n }", "public function getPostParams()\n {\n return $this->request->all();\n }", "function getFromPost() {\r\n\t\t\r\n\t\t//Event Page variables.\r\n\t\t$this->name = $_POST['eventName'];\r\n\t\t$this->date = $_POST['eventDate'];\r\n\t\t$this->time = $_POST['eventTime'];\r\n\t\t$this->time_before = $_POST['time_before'];\r\n\t\t$this->freq = $_POST['frequency'];\r\n\t\t$this->notif_method = $_POST['method'];\r\n\t}", "public function posts()\n {\n // $name = 'Dipu';\n // $age = 25;\n\n // return 'Name: '. $name . ' Age: ' . $age;\n\n // Objects\n // $user = new stdClass();\n // $user->name = 'dipu';\n // $user->age = 25;\n\n // print_r($user);\n\n //Multiple data /Array\n $post[] = \"\";\n $single_post = new stdClass();\n\n $single_post->name = 'Dipu';\n $single_post->age = 25;\n $single_post->gender = 'male';\n array_push($post, $single_post);\n\n $single_post = new stdClass();\n\n $single_post->name = 'Munna';\n $single_post->age = 20;\n $single_post->gender = 'male';\n array_push($post, $single_post);\n\n print_r($post);\n\n }", "public function getPost(): array;", "function pull_post()\n\t{\n\t\t$this->preorderID = @$_POST['preorderID'];\n\t\tif ($this->preorderID) { $this->set_preorderID($this->preorderID); }\n\n\t\tif (@$_POST['itemID']) { $this->set_itemID(@$_POST['itemID']); }\n\n\t\t$active = (isset($_GET['active'])?$_GET['active']:@$_POST['active']);\n\t\tif (!strlen($active)) { $active = PRE_ACTIVE; }\n\t\t$this->active = $active;\n\n\t\tif (isset($_POST['info']))\n\t\t{\n\t\t\t$this->info = $_POST['info'];\n\t\t\twhile (list($key,$val) = each($this->info)) { $this->info[$key] = stripslashes($val); }\n\t\t\treset($this->info);\n\t\t}\n\n\t\tif (isset($_POST['customerinfo']))\n\t\t{\n\t\t\t$this->customerinfo = $_POST['customerinfo'];\n\t\t\twhile (list($key,$val) = each($this->customerinfo)) { $this->customerinfo[$key] = stripslashes($val); }\n\t\t\treset($this->customerinfo);\n\t\t}\n\n\t\tif (isset($_POST['customer_status']))\n\t\t{\n\t\t\t$this->customer_status = $_POST['customer_status'];\n\t\t\treset($this->customer_status);\n\t\t}\n\n\t\t$this->customerID = @$_POST['customerID'];\n\t}", "protected function _process_post()\n\t{\n\t\tforeach ($_POST as $k=>$v)\n\t\t{\n\t\t\tif (substr($k, 0, 3)=='_s_' && substr($k, -7)=='_action') {\n\t\t\t\t$this->_form_posted = substr($k, 3, -7);\n\t\t\t\t$this->_form_action = $v;\n\t\t\t} else {\n\t\t\t\t$this->vars[$k] = $v;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($_FILES as $k=>$v)\n\t\t{\n\t\t\tif ($v['error'] == UPLOAD_ERR_OK)\n\t\t\t{\n\t\t\t\tif (is_uploaded_file($v['tmp_name']))\n\t\t\t\t{\n\t\t\t\t\tif ($v['size'] != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_uploaded_files[$k] = UPLOAD_ERR_OK;\n\t\t\t\t\t\t$this->vars[$k] = '_uploaded_file_';\n\t\t\t\t\t\t$this->vars[$k.':name'] = preg_replace('@[\\\\\\\\/\\\\*]@', '', $v['name']);\n\t\t\t\t\t\t$this->vars[$k.':type'] = $v['type'];\n\t\t\t\t\t\t$this->vars[$k.':size'] = $v['size'];\n\t\t\t\t\t\t$this->vars[$k.':tmp_name'] = $v['tmp_name'];\n\t\t\t\t\t}\n\t\t\t\t\telse { $this->_uploaded_files[$k] = UPLOAD_ERR_NO_FILE; }\n\t\t\t\t}\n\t\t\t\telse { $this->_uploaded_files[$k] = UPLOAD_ERR_PARTIAL; }\n\t\t\t}\n\t\t\telseif ($v['error'] != UPLOAD_ERR_NO_FILE) {\n\t\t\t\t$this->_uploaded_files[$k] = $v['error'];\n\t\t\t}\n\t\t}\n\t}", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n // All keys are srings in array, merge it with defaults to override\r\r\n $this->e_data = array_merge($this->default_options, $this->e_data);\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "private function POST() {\n global $_POST;\n $postData = array();\n foreach($_POST as $key => $value) {\n $postData[$key] = $value;\n }\n $this -> response[\"response\"] = $postData;\n return;\n }", "public function process_post() {\n\t\t$name = $this->node->attr('name');\n\n\n\t\tif (!empty($_POST) && $this->get_post_value($name)) {\n//\t\t\t$this->value = $this->get_post_value($name);\n\t\t\t$this->value($this->get_post_value($name));\n\t\t}\n\t}", "public function getData()\n {\n return Post::find(request()->id);\n }", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "public function handleDataSubmission() {}", "protected function getFormData() {\n\t\treturn $this->stripNonPrintables(json_decode($this->request->postVar('Details'), true));\n\t}", "private function getPostData(): array\n {\n return [\n 'product' => [\n 'attribute_set_id' => '4',\n 'status' => '1',\n 'name' => 'Simple Product',\n 'sku' => 'simple',\n 'url_key' => 'simple-product',\n 'type_id' => \\Magento\\Catalog\\Model\\Product\\Type::TYPE_SIMPLE\n ],\n 'links' => [\n 'upsell' => [\n ['id' => '10'],\n ],\n 'crosssell' => [\n ['id' => '11'],\n ],\n 'related' => [\n ['id' => '12'],\n ],\n ]\n ];\n }", "public function getPostParams(): array\n {\n return $this->postParams;\n }", "public function getPostFields()\n {\n return $this->invokeWrappedIfEntityEnclosed(__FUNCTION__, func_get_args());\n }", "protected function getArrPost()\n {\n return $this->getServices()\n ->get(\\Application\\Service\\ServiceJsonPostRequest::class)\n ->setObjRequest(\n $this->getRequest()\n )\n ->getJsonPost();\n }", "private function setPostParameters() {\n\t\tforeach (array_keys($_POST) as $currentKey) {\n\t\t\t$this->postArray[$currentKey] = $_POST[$currentKey];\n\t\t}\n\t}", "public function getPostData(){\n for ($t=1; $t <3 ; $t++) {\n $str = \"team\".$t;\n if(!$this->checkPost($str)) return false;\n $str = \"score_team\".$t;\n if(!$this->checkPost($str)) return false;\n for ($p=1; $p <3 ; $p++) {\n $str = \"team\".$t.\"_player\".$p;\n if(!$this->checkPost($str)) return false;\n }\n }\n return true;\n }", "function unpack_post() {\n // Globals\n global $min_words;\n global $add_num;\n global $add_char;\n global $case_opt;\n global $separator;\n\n if (array_key_exists('min-words', $_POST)) {\n $min_words = $_POST['min-words'];\n }\n\n if (array_key_exists('add-num', $_POST)) {\n $add_num = True;\n }\n\n if (array_key_exists('add-char', $_POST)) {\n $add_char = True;\n }\n\n if (array_key_exists('separator', $_POST)) {\n $separator = $_POST['separator'];\n }\n\n if (array_key_exists('case-opt', $_POST)) {\n $case_opt = $_POST['case-opt'];\n }\n\n // Mostly just for testing\n return [$min_words, (int)$add_num, (int)$add_char, $separator, $case_opt];\n}", "function process_post()\n \t{\n \t\treturn $this->class_post->process_post();\n \t}", "protected function _processPost() {\r\n $this->_currentPage->processPost();\r\n }", "public function getFormData(){\n\n\t\t\t\n\t\t\t$expectedVariables = ['title','email','checkbox'];\n\n\n\t\t\tforeach ($expectedVariables as $variable) {\n\n\t\t\t\t// creating entries for error field\t\n\t\t\t\t$this->moviesuggest['errors'][$variable]=\"\";\n\n\t\t\t\t// move all $_POST values into MovieSuggest array\n\t\t\t\tif(isset($_POST[$variable])){\n\t\t\t\t\t$this->moviesuggest[$variable] = $_POST[$variable];\n\t\t\t\t}else{\n\t\t\t\t\t$this->moviesuggest[$variable] = \"\";\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// var_dump($moviesuggest);\n\t\t\t// die();\n\t}", "public function getPostContent();", "public function collectData()\n {\n $jsonSite = getContents($this->getJSONURI());\n\n $jsonFile = json_decode($jsonSite, true);\n $posts = $jsonFile['posts'];\n\n foreach ($posts as $post) {\n $item = $this->getItemFromPost($post);\n\n //empty when 'noreblogs' is checked and current post is a reblog.\n if (!empty($item)) {\n $this->items[] = $item;\n }\n }\n }", "function parseData(){\r\n\t\t$content = array();\r\n\t\t$this->page_id = $this->CFG->PostVars['pageid'];\r\n\t\tforeach($this->CFG->PostVars as $key=>$value){\r\n\t\t\tif(preg_match(\"/content_(.*)_(.*)/\", $key, $arr)){\r\n\t\t\t\t$field\t= $arr[1];\r\n\t\t\t\t$lang \t= $arr[2];\r\n\t\t\t\tif(is_array($content[$lang])){\r\n\t\t\t\t\t$content[$lang][$field] = $value;\r\n\t\t\t\t}\r\n\t\t\t\telse $content[$lang] = array($field => $value);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->content = $content;\r\n\t}", "function filterPostData()\n {\n /** Remove linked records if they are not set anymore **/\n foreach (array('UNL_MediaHub_Feed_NamespacedElements_itunes' => 'value',\n 'UNL_MediaHub_Feed_NamespacedElements_media' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_itunesu' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_itunes' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_media' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_geo' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_mediahub' => 'value') as $relation=>$field) {\n if (isset($this->post[$relation])) {\n foreach ($this->post[$relation] as $key=>$values) {\n if (empty($values[$field])\n && empty($values['attributes'])) {\n unset($this->post[$relation][$key]);\n }\n }\n }\n }\n unset($this->post['__unlmy_posttarget']);\n unset($this->post['MAX_FILE_SIZE']);\n unset($this->post['submit_existing']);\n }", "function handle_post($indata) {\n// showDebug('form_class POST:');\n// showArray($indata); \n return;\n }", "private function getCategoryPostData()\n {\n // Get data from form fields\n $this->data['category_title'] = $this->input->post('category_title');\n }", "protected function getPost(): array {\n\t\t$post = array_diff_key($this->request->getParams(), array_flip(array( '_METHOD', )));\n\n\t\treturn $post;\n\t}", "public function getPost()\n {\n if (!isset($this->_post)) {\n if (self::$_input && \\bbn\\Str::isJson(self::$_input)) {\n $this->_post = json_decode(self::$_input, 1);\n }\n elseif (!empty($_POST)) {\n $this->_post = $_POST;\n }\n\n if (!$this->_post) {\n $this->_post = [];\n }\n else {\n $this->_has_post = true;\n //$this->_post = bbn\\Str::correctTypes($this->_post);\n foreach ($this->_post as $k => $v) {\n if (X::indexOf($k, '_bbn_') === 0) {\n if (!defined(strtoupper(substr($k, 1)))) {\n define(strtoupper(substr($k, 1)), $v);\n }\n\n unset($this->_post[$k]);\n }\n }\n }\n }\n\n return $this->_post;\n }", "private static function getPostParams()\n\t{\n\t\treturn (count($_POST) > 0) ? $_POST : json_decode(file_get_contents('php://input'), true);\n\t}", "public function getPost ();", "public function getPostFields(): array\n {\n return $this->postFields;\n }", "private function getPostData() {\n\t\t$data = null;\n\t\t\n\t\t// Get from the POST global first\n\t\tif (empty($_POST)) {\n\t\t\t// For API calls we need to look at php://input\n\t\t\tif (!empty(file_get_contents('php://input'))) {\n\t\t\t\t$data = @json_decode(file_get_contents('php://input'), true);\n\t\t\t\tif ($data === false || $data === null) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//TODO: What is this for? isn't 'php://input' always empty at this point?\n\t\t\t\t$dataStr = file_get_contents('php://input');\n\t\t\t\tparse_str($dataStr, $data);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$data = $_POST;\n\t\t}\n\t\t\n\t\t// Normalize boolean values\n\t\tforeach ($data as $name => &$value) {\n\t\t\tif ($value === 'true') {\n\t\t\t\t$value = true;\n\t\t\t}\n\t\t\telse if ($value === 'false') {\n\t\t\t\t$value = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "protected function _initPostParameters()\n {\n $this->set('_post', new DataHolder($_POST));\n }", "public function setPostFields($data){\n\t\t$this->post = array();\n\t\t$this->addPostFields($data);\n\t}", "public function to_postdata()\n {\n return http_build_query($this->postFields);\n }", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->data = $this->data['value'];\r\r\n }\r\r\n }", "public static function checkPostData($data) {\n\t\t\t/* This method use the php function htmlentities for each values in $_POST and return an array with securised data */\n foreach ($data as $key => $value) {\n $data[$key] = htmlentities($value);\n }\n return $data;\n\t\t}", "public function paramsPost()\r\n {\r\n return $this->params_post;\r\n }", "function alle_post( $post) {\n //\n $output = '' ;\n \n //\t$this->post->input\n foreach( $post as $k => $v ) \n {\t\n $output .= '$'.$k.' &nbsp; = &nbsp; $this->input->post(\\''.$k.'\\', TRUE) ;<br />'.\"\\n\";\t\n }\n //-----/$this->post->input\n\n $output .= '<br /><br />'.\"\\n\" ;\t \n \n \n //\t$this->post->input\n foreach( $post as $k => $v ) \n {\t\n $output .= '$'. $k .' &nbsp; = &nbsp; '. $v .'<br />'.\"\\n\";\t\n }\n //-----/$this->post->input \n \n \n \n $output .= '<br /><br />'.\"\\n\" ;\t\t\t\n \n //\tdatabase\n foreach ($_POST as $k => $v) \n {\t\n if( $k <> 'submit')\n {\n $output .= '$this->db->set(\\''.$k.'\\', $'.$k.' ) ; '.\"<br />\\n\";\n }\t\t\n }\n //-----/database\n\t\t\t\n\t\t// $output .= '<br />'.\"\\n\" ;\n\t\t// $output .= '<br />'.\"\\n\" ; \n \n \n return $output ;\n //-----/\n }", "public function postDataArrayProvider()\n {\n\t$data_array = array(\n\t 'photo' => 'test.jpg',\n\t 'id' => 1,\n\t 'author' => 'Anonymous',\n\t 'subject' => '',\n\t 'updated' => 0,\n\t 'content' => 'Testing'\n\t);\n\treturn array(\n\t 'default' => array($data_array)\n\t);\n }", "public function addPostFields(array $post_data) {}", "function processPostVars()\n {\n $this->id = $_POST['id'];\n $this->login = trimStrip($_POST['login']);\n $this->surname = trimStrip($_POST['surname']);\n $this->firstname = trimStrip($_POST['firstname']);\n $this->hash = trimStrip($_POST['hash']);\n $this->yearno = (integer)trimStrip($_POST['yearno']);\n $this->groupno = (integer)trimStrip($_POST['groupno']);\n $this->email = trimStrip($_POST['email']);\n $this->calendaryear = intval($_POST['calendaryear']);\n $this->coeff = (float)$_POST['coeff'];\n }", "public function setPostParams()\n {\n if (!empty($_POST)) {\n foreach ($_POST as $title => $param) {\n $this->setPostParam($title, $param);\n }\n }\n }", "private static function postParams(): array\n {\n $postParams = [];\n\n if (!empty($_POST)) {\n $postParams = filter_input_array(INPUT_POST, FILTER_DEFAULT);\n }\n\n return $postParams;\n }", "public function parsePost($post){\n\t\t\n\t\t$postData = array();\n\t\t$postData['id'] = $post->id;\n\t\t$postData['title'] = $post->title;\n\t\t$postData['slug'] = $post->slug;\n\t\t$postData['url'] = Yii::app()->createAbsoluteUrl('/news/'.$post->id.'/'.$post->slug);\n\t\t$postData['description'] = $post->description;\n\t\t$postData['source'] = $post->source;\n\t\t$postData['source_title'] = $post->source_title;\n\t\t$postData['created_dt'] = $this->time2StringFormatted($post->created_dt);\n\t\t$postData['updated_dt'] = $this->time2StringFormatted($post->updated_dt);\n\t\t$postData['image'] = $post->image != '' ? Yii::app()->request->hostInfo . Yii::app()->request->baseUrl . '/static/' . $post->image : Yii::app()->request->hostInfo . Yii::app()->request->baseUrl . '/static/default_image.png';\n\t\t$postData['category'] = array();\n\t\tif($post->cat_id){\n\t\t\t$postData['category']['cat_id'] = $post->cat_id;\n\t\t\t$postData['category']['title'] = $post->Cat->title;\n\t\t}\n\t\t$postData['author'] = array();\n\t\tif($post->user_id){\n\t\t\t$postData['author']['user_id'] = $post->user_id;\n\t\t\t$postData['author']['user_full_name'] = $post->User->user_full_name;\n\t\t}\n\t\treturn $postData;\n\t\t\n\t}", "public function setup_postdata($post)\n {\n }", "public function getPost()\n {\n $request = $this->getRequest();\n return $request->getPost();\n }", "function get_post_data() {\n\t\tif (empty($this->post)) :\n\t\t\t$this->post = get_post( $this->id );\n\t\tendif;\n\t\t\n\t\treturn $this->post;\n\t}", "protected function getPostObject(): array\n {\n /** @var Input $oInput */\n $oInput = Factory::service('Input');\n /** @var Group $oUserGroupModel */\n $oUserGroupModel = Factory::model('UserGroup', Constants::MODULE_SLUG);\n /** @var Password $oUserPasswordModel */\n $oUserPasswordModel = Factory::model('UserPassword', Constants::MODULE_SLUG);\n\n return [\n 'slug' => $oInput->post('slug'),\n 'label' => $oInput->post('label'),\n 'description' => $oInput->post('description'),\n 'default_homepage' => $oInput->post('default_homepage'),\n 'registration_redirect' => $oInput->post('registration_redirect'),\n 'acl' => json_encode(\n array_values(\n array_filter(\n $oInput->post('is_superuser')\n ? [SuperUser::class]\n : (array) $oInput->post('acl'),\n )\n )\n ),\n 'password_rules' => $oUserPasswordModel->processRules($oInput->post('pw') ?: []),\n ];\n }", "function get_fields_from_post(){\n\t\t$prefix=\"\";\n\t\t$this->id_corp=$_SESSION['ident_corp'];\n\t\t$this->name=htmlentities($_POST[$prefix.$this->ddbb_name]);\n\t\t$this->name_web=htmlentities($_POST[$prefix.$this->ddbb_name_web]);\n\t\t$this->pvp=$_POST[$prefix.$this->ddbb_pvp];\n\t\t$this->tax=$_POST[$prefix.$this->ddbb_tax];\n\t\t$this->pvp_tax=$_POST[$prefix.$this->ddbb_pvp_tax];\n\t\t$this->descrip=htmlentities($_POST[$prefix.$this->ddbb_descrip]);\n\t\t$this->path_photo = $_SESSION['ruta_photo'];\n\t\t\n\n\t\t\n\t\t$this->get_categories_from_post();\n\n\t\treturn 0;\n\t}", "#[Pure]\n public function getRawPostData() {}", "protected function parseRequest()\n {\n $this->input = $this->request->getPostList()->toArray();\n }", "function processPostVars()\n {\n $this->id = $_POST['id'];\n $this->role = $_POST['role'];\n $this->firstname = trimStrip($_POST['firstname']);\n $this->surname = trimStrip($_POST['surname']);\n $this->email = trimStrip($_POST['email']);\n $this->login = trimStrip($_POST['login']);\n $this->password = trimStrip($_POST['pass1']);\n }", "public function obtenerListaPost()\n {\n // $post = new StdClass;\n // //////////////1.DATOS///////////////\n // $post->razonSocial = $_POST['razonSocial'];\n // $post->nombreFantasia = $_POST['nombreFantasia'];\n // $post->cuit = $_POST['cuit'];\n // $post->tipoPersona = $_POST['tipoPersona'];\n // if ($post->tipoPersona == 'organizaciones') {\n // $post->tipoPersona = 'Organización sin fines de lucro';\n // }else {\n // $post->tipoPersona = 'Pueblo originario';\n // }\n // /////////////2.RESUMEN GENERAL//////////////////\n // $post->proyectoResumen = $_POST['proyectoResumen'];\n // $post->gastosContraparteResumenGeneral = $_POST['gastosContraparteResumenGeneral'];\n // $post->gastosSubsidioResumenGeneral = $_POST['gastosSubsidioResumenGeneral'];\n // $post->gastosCapitalResumenGeneral = $_POST['gastosCapitalResumenGeneral'];\n // $post->gastosCorrientesResumenGeneral = $_POST['gastosCorrientesResumenGeneral'];\n // $post->totalesResumenGeneral = $_POST['totalesResumenGeneral'];\n // /////////////3.CAPITAL Y CORRIENTE///////////////\n // $post->totalGastosAdecuacionEdilicia = $_POST['totalGastosAdecuacionEdilicia'];\n // $post->totalGastosEquipamientoTecnologico = $_POST['totalGastosEquipamientoTecnologico'];\n // $post->totalGastosCapitalSubsidio = $_POST['totalGastosCapitalSubsidio'];\n // $post->totalGastosRrhhNoPermanentes = $_POST['totalGastosRrhhNoPermanentes'];\n // $post->totalGastosViaticos = $_POST['totalGastosViaticos'];\n // $post->totalGastosCorrientesSubsidio = $_POST['totalGastosCorrientesSubsidio'];\n // ////////4.Adecuacion edilicia///////////\n // $headerAdecuacion = array(\"Descripción de plan de obra\", \"Tiempo (dias)\", \"Desembolso (en pesos)\");\n // $post->adecuacionTransmision = $_POST['adecuacionTransmision'];//tabla\n // $post->totalAdecuacionTransmision = $_POST['totalAdecuacionTransmision'];\n // $post->adecuacionProduccion = $_POST['adecuacionProduccion'];//tabla\n // $post->totalAdecuacionProduccion = $_POST['totalAdecuacionProduccion'];\n // $post->adecuacionInfra = $_POST['adecuacionInfra'];//TABLA\n // $post->totalAdecuacionInfraestructura = $_POST['totalAdecuacionInfraestructura'];\n // ///////5.Equipamiento tecnologico/////////\n // $headerEquipamiento = array(\"Descripción equipamiento\", \"Cantidad\", \"Finalidad\" , \"Precio unitario\", \"Desembolso(en pesos)\");\n // $post->equipamientoProduccion = $_POST['equipamientoProduccion'];//tabla\n // $post->totalEquipamientoProduccion = $_POST['totalEquipamientoProduccion'];\n // $post->equipamientoTransmision = $_POST['equipamientoTransmision'];//tabla\n // $post->totalEquipamientoTransmision = $_POST['totalEquipamientoTransmision'];\n // $post->equipamientoInfra = $_POST['equipamientoInfra'];//TABLA\n // $post->totalEquipamientoInfra = $_POST['totalEquipamientoInfra'];\n // /////////6.Gastos corrientes///////////////\n // $headerNoPermanentes = array(\"Función\", \"Honorarios(en pesos)\", \"Tiempo(en meses)\", \"Desembolso(en pesos)\");\n // $post->rrhhNoPermanentes = $_POST['rrhhNoPermanentes'];//tabla\n // $post->totalRrhhNoPermanentes = $_POST['totalRrhhNoPermanentes'];\n // $headerViaticos = array(\"Descripción\", \"Desembolso(en pesos)\");\n // $post->viaticosPersonal = $_POST['viaticosPersonal'];//tabla\n // $post->totalViaticosPersonal = $_POST['totalViaticosPersonal'];\n // //////////7.Resumen contraparte///////////////\n // $post->totalRrhhPermanentesContraparteResumen = $_POST['totalRrhhPermanentesContraparteResumen'];\n // $post->serviciosContraparteResumen = $_POST['serviciosContraparteResumen'];\n // $post->otrosContraparteResumen = $_POST['otrosContraparteResumen'];\n // $post->totalContraparteResumen = $_POST['totalContraparteResumen'];\n // ///////////8.Detalle contraparte /////////////\n // $headerContraparte = array(\"Rubro\", \"Desembolso(en pesos)\");\n // $post->rrhhPermanentesContraparte = $_POST['rrhhPermanentesContraparte'];//tabla\n // $post->totalRrhhPermanentesContraparteDetalle = $_POST['totalRrhhPermanentesContraparteDetalle'];\n // $post->serviciosContraparte = $_POST['serviciosContraparte'];//tabla\n // $post->totalServicioContraparteDetalle = $_POST['totalServicioContraparteDetalle'];\n // $post->otrasErogacionesContraparte = $_POST['otrasErogacionesContraparte'];//TABLA\n // $post->totalOtrasErogacionesContraparteDetalle = $_POST['totalOtrasErogacionesContraparteDetalle'];\n // $post->totalFinalContraparte = $_POST['totalFinalContraparte'];\n // //////////9.presupuestos/////////////////\n // $headerPresupuestos = array(\"Datos de la empresa\", \"Desembolso(en pesos)\");\n // $post->presupuestos = $_POST['presupuestos'];//tabla\n // $post->minimoARespaldarPresupuestos = $_POST['minimoARespaldarPresupuestos'];\n // $post->totalRespaldadoPresupuestos = $_POST['totalRespaldadoPresupuestos'];\n //\n // return $post;\n }", "private function serialize(Post $post){\n \treturn array(\n \t'username'=>$post->getUsername(),\n \t'email'=>$post->getEmail(),\n \t'passw'=>$post->getPassword()\n \t); \n\t}", "public function getAllDataPost(){\n \t// DB::table('posts')->get();\n \t$data = Post::all();\n \t$data = ($data) ? $data->toArray() : [];\n \treturn $data;\n }" ]
[ "0.77749026", "0.76259905", "0.7518642", "0.71201485", "0.70722157", "0.7051765", "0.701587", "0.69846755", "0.69653994", "0.69574696", "0.6909821", "0.68143743", "0.6812603", "0.6812572", "0.6781472", "0.6742499", "0.67285055", "0.67215836", "0.6695002", "0.6666398", "0.66529584", "0.66046786", "0.6601703", "0.6574373", "0.656211", "0.6562083", "0.6549227", "0.6541698", "0.6537787", "0.65251607", "0.64613223", "0.6457178", "0.6448178", "0.6439232", "0.64382404", "0.64260155", "0.64244473", "0.6420129", "0.64116466", "0.6392004", "0.6388881", "0.63877267", "0.63867724", "0.63647276", "0.6344925", "0.63191384", "0.6299185", "0.6298147", "0.62796223", "0.6275766", "0.6260475", "0.62410235", "0.6239259", "0.6238593", "0.6237561", "0.6234339", "0.6220241", "0.6219827", "0.62101007", "0.6205597", "0.6205205", "0.62013733", "0.6195302", "0.6187287", "0.6184548", "0.61735815", "0.6162765", "0.61375064", "0.61333996", "0.61314094", "0.61281276", "0.6126084", "0.61248094", "0.61232555", "0.6110163", "0.6110094", "0.6067722", "0.60644513", "0.6060456", "0.6054592", "0.6029656", "0.60278654", "0.6023257", "0.6014631", "0.6007851", "0.6004177", "0.59968543", "0.59934783", "0.5986786", "0.5979821", "0.5972422", "0.59663457", "0.59596175", "0.59585273", "0.5957049", "0.5953364", "0.59525895", "0.5945907", "0.59399164", "0.59267163", "0.59136164" ]
0.0
-1
/ Collect all the post data
public function collectExtraData($prefix = '') { // logit('REST: ' . print_r($this->getRequest()->getPost(), true)); $vars = $this->getRequest()->getPost(); $lprefix = strlen($prefix); $out = array(); foreach($vars as $n => $v) { if (substr($n, 0, $lprefix) == $prefix) { // logit("MATCH: {$n} => {$v}"); $out[$n] = $v; } } $this->extra = $out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ParsePostData() {}", "public function parsePostData()\n {\n }", "protected function getPostValues() {}", "private function getPostData()\n {\n $postData = $this->request->getPostValue();\n\n /** Magento may adds the SID session parameter, depending on the store configuration.\n * We don't need or want to use this parameter, so remove it from the retrieved post data. */\n unset($postData['SID']);\n\n //Set original postdata before setting it to case lower.\n $this->originalPostData = $postData;\n\n //Create post data array, change key values to lower case.\n $postDataLowerCase = array_change_key_case($postData, CASE_LOWER);\n $this->postData = $postDataLowerCase;\n }", "function allPost()\n {\n $post = $this->unsafeAllPost();\n return array_map(array($this->sec, 'clean'), $post);\n }", "public function getPostVariables();", "abstract public function parsePostData() : array;", "public function get_post_data() {\n\t\tforeach($this->form_fields as $form_field_key => $form_field_value) {\n\t\t\tif ($form_field_value['type'] == \"select_card_types\") {\n\t\t\t\t$form_field_key_select_card_types = $this->plugin_id . $this->id . \"_\" . $form_field_key;\n\t\t\t\t$select_card_types_values = array();\n\t\t\t\t$_POST[$form_field_key_select_card_types] = $select_card_types_values;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $this->data ) && is_array( $this->data ) ) {\n\t\t\treturn $this->data;\n\t\t}\n\t\treturn $_POST;\n\t}", "private function collectData() {\n $this->Name = $this->sanitize($_POST['Name']);\n $this->Street1 = $this->sanitize($_POST['Street1']);\n $this->Street2 = $this->sanitize($_POST['Street2']);\n $this->CityName = $this->sanitize($_POST['CityName']);\n $this->StateOrProvince = $this->sanitize($_POST['StateOrProvince']);\n $this->Country = $this->sanitize($_POST['Country']);\n $this->PostalCode = $this->sanitize($_POST['PostalCode']);\n }", "public function getPostData() {\n \t\n \t// Return POST\n \treturn $this->oPostData;\n }", "protected function setPostData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "public function getPostData() :array\n {\n return empty($_POST) ? [] : $_POST;\n }", "public function getPosts() {\n return isset($_POST) ? $_POST : array();\n }", "public function get_post_data() {\n\t\treturn $this->post;\n\t}", "function populateFromPost()\n\t{\n\t}", "public static function allPost()\n {\n try {\n $form = [];\n foreach ($_POST as $name => $value) {\n $form[htmlspecialchars($name)] = htmlspecialchars($value);\n }\n return $form;\n } catch (Exception $e) {\n die($e);\n }\n }", "private function readPost(){\n\t\tIF(isset($_POST['eventName'])) { \n\t\t $this->eventName = trim(strip_tags($_POST['eventName']));\n\t\t}\n\t\tIF(isset($_POST['senderName'])) { \n\t\t $this->senderName = trim(strip_tags($_POST['senderName']));\n\t\t}\n\t\tIF(isset($_POST['senderEmail'])) {\n\t\t $this->senderEmail = trim(strip_tags(preg_replace(\"/[^0-9a-zA-ZäöüÄÖÜÈèÉéÂâáÁàÀíÍìÌâÂ@ \\-\\+\\_\\.]/\", \" \", $_POST['senderEmail'])));\n\t\t}\n\t\tIF(isset($_POST['validateEmail'])){\n\t\t $this->validateEmail = trim(strip_tags($_POST['validateEmail']));\n\t\t}\n\t\tIF(isset($_POST['senderPhone'])){\n\t\t $this->senderPhone = trim(strip_tags($_POST['senderPhone']));\n\t\t}\n\t\tIF(isset($_POST['numberOfTickets'])){\n\t\t $this->numberOfTickets = trim(strip_tags($_POST['numberOfTickets']));\n\t\t}\n\t\tIF(isset($_POST['paymentOption'])){\n\t\t $this->paymentOption = trim(strip_tags($_POST['paymentOption']));\n\t\t}\n\t\tIF(isset($_POST['otherPartyNames'])){\n\t\t $this->otherPartyNames = trim(strip_tags($_POST['otherPartyNames']));\n\t\t}\n\t\tIF(isset($_POST['pickupPoint'])){\n\t\t $this->pickupPoint = trim(strip_tags($_POST['pickupPoint']));\n\t\t} \n\t\tIF(isset($_POST['sittingNear'])){\n\t\t $this->sittingNear = trim(strip_tags($_POST['sittingNear']));\n\t\t}\n\t\tIF(isset($_POST['specialNeeds'])){\n\t\t $this->specialNeeds = trim(strip_tags($_POST['specialNeeds']));\n\t\t}\n\t}", "public function unsafeAllPost()\n {\n return $this->postvars;\n }", "public function parsePostData() {\n\t\t$dataset = DB::getInstance()->query('SELECT `id` FROM `'.PREFIX.'dataset` WHERE accountid = '.SessionAccountHandler::getId())->fetchAll();\n\n\t\tforeach ($dataset as $set) {\n\t\t\t$id = $set['id'];\n\t\t\t$modus = isset($_POST[$id.'_modus']) && $_POST[$id.'_modus'] == 'on' ? 2 : 1;\n\t\t\tif (isset($_POST[$id.'_modus_3']) && $_POST[$id.'_modus_3'] == 3)\n\t\t\t\t$modus = 3;\n\n\t\t\t$columns = array(\n\t\t\t\t'modus',\n\t\t\t\t'summary',\n\t\t\t\t'position',\n\t\t\t\t'style',\n\t\t\t\t'class'\n\t\t\t);\n\t\t\t$values = array(\n\t\t\t\t$modus,\n\t\t\t\t(isset($_POST[$id.'_summary']) && $_POST[$id.'_summary'] == 'on' ? 1 : 0),\n\t\t\t\tisset($_POST[$id.'_position']) ? (int)$_POST[$id.'_position'] : '',\n\t\t\t\tisset($_POST[$id.'_style']) ? htmlentities($_POST[$id.'_style']) : '',\n\t\t\t\tisset($_POST[$id.'_class']) ? htmlentities($_POST[$id.'_class']) : ''\n\t\t\t);\n\n\t\t\tDB::getInstance()->update('dataset', $id, $columns, $values);\n\t\t}\n\n\t\tCache::delete('Dataset');\n\t\tAjax::setReloadFlag(Ajax::$RELOAD_DATABROWSER);\n\t}", "public function valuesFromPost()\n {\n return $this->setDefaultValues($_POST);\n }", "private function processPostData() {\n\n if (isset($this->postDataArray['week']) && isset($this->postDataArray['year']))\n {\n\n $this->weekSelected = $this->cleanse_input($this->postDataArray['week']);\n $this->yearSelected = $this->cleanse_input($this->postDataArray['year']);\n }\n else\n {\n $this->weekSelected = $this->weeks[0];\n $this->yearSelected = $this->years[0];\n }\n }", "private function post_params() {\n return [\n 'title' => $this->params['title'],\n 'excerpt' => $this->params['excerpt'],\n 'content' => $this->params['content'],\n 'tags' => $this->params['tags']\n ];\n }", "private function postData()\n {\n $post = array_filter($this->post);\n\n return http_build_query($post);\n }", "public static function getPostData() {\n\n $DataObj = new stdClass();\n\n foreach ($_POST as $name => $value)\n $DataObj->$name = $value;\n\n return $DataObj;\n }", "protected function processPost() {\n\t\tif (isset($_POST['posted'])) {\n\t\t\t$this->is_save_request = TRUE;\n\t\t\tunset($_POST['posted']);\n\t\t}\n\n\t\t// process the remaining post vars\n\t\tif (0) deb(\"Survey1: processPost: POST = \", $_POST);\n\t\tforeach($_POST as $job_id=>$offer) {\n\t\t\tif ($job_id == 'username') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$job_name = get_job_name($job_id);\n\t\t\t// All offers except positive integers are treated as 0, meaning \"I don't want to do this job\"\n\t\t\tif ($offer == NULL || $offer < 0 || !is_numeric($offer)) $offer = 0;\n\t\t\tif (is_float($offer)) $offer = round($is_offer);\n\t\t\tif (0) deb(\"Survey1: processPost: job_name = offer: \", $job_name.\" = \".$offer);\n\t\t\t$this->results[$job_id] = $offer;\n\t\t}\n\t\tif (0) deb(\"Survey1: processPost: Results:\", $this->results);\n\t}", "function readFromPost() {\n\t\t$this->idt = requestVar('idt');\n\t\t$this->newIdt = requestVar('template');\n\t\t$this->description = requestVar('description');\n\t\t$this->postsHeader = requestVar('postListHeader');\n\t\t$this->postBody = requestVar('postBody');\n\t\t$this->postsFooter = requestVar('postListFooter');\n\t\t$this->formLogged = requestVar('formLogged');\n\t\t$this->form = requestVar('formNotLogged');\n\t\t$this->navigation = requestVar('navigation');\n\t\t$this->name = requestVar('nameNoUrl');\n\t\t$this->nameLin = requestVar('nameUrl');\n\t\t$this->memberName = requestVar('memberName');\n\t\t$this->date = requestVar('date');\n\t\t$this->time = requestVar('time'); \n\t\t$this->nextPage = requestVar('nextPage');\n\t\t$this->previousPage =requestVar('previousPage');\n\t\t$this->firstPage = requestVar('firstPage');\n\t\t$this->lastPage = requestVar('lastPage');\t\n\n\t\t$this->urlToLink = (requestVar('urlToLink') == 'yes') ? true : false;\n\t\t$this->emoToImg = \t (requestVar('emoToImg') == 'yes') ?true : false;\n\t\t$this->gravSize = \t (int)requestVar('gravSize');\n\t\t$this->gravDefault = requestVar('gravDefault');;\n\n\n\t\t\n\t\t$this->action = requestVar('action');\n\t}", "public static function manage_post_data(&$post) {\n\t\tif (count($post) > 0) {\n\t\t\tforeach ($post as $key => $value) {\n\t\t\t\t$key = Encryption::decrypt($key);\t\n\t\t\t\t$name = self::fetch_name($key);\n\t\t\t\t$errors[$name] = self::is_valid_request($key, $value);\n\t\t\t\t$output[$name] = self::apply_filters($key, $value);\n\t\t\t}\n\t\t\tself::$requested_data = $output;\n\t\t\tself::$errors = $errors;\n\t\t}\n\t\telse {\n\t\t\tself::$requested_data = false;\n\t\t}\n\t\t$post = array();\n\t}", "public function clearPostData()\n {\n $this->post_data = array();\n }", "public function GetFormPostedValues() {\n\t\t$req_fields=array(\"description\",\"date_open\",\"date_closed\");\n\n\t\tfor ($i=0;$i<count($req_fields);$i++) {\n\n\t\t\t//echo $_POST['application_id'];\n\t\t\tif (ISSET($_POST[$req_fields[$i]]) && !EMPTY($_POST[$req_fields[$i]])) {\n\t\t\t\t$this->SetVariable($req_fields[$i],EscapeData($_POST[$req_fields[$i]]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//echo \"<br>\".$this->req_fields[$i].\"<br>\";\n\t\t\t\t$this->$req_fields[$i]=\"\";\n\t\t\t}\n\t\t}\n\t}", "public function getPostParams()\n {\n return $this->post;\n }", "private function parsed_data()\n {\n $parsed_data = array();\r\n\r\n //post data\r\n $parsed_data['name'] = $this->input->post(\"name\", TRUE);\r\n $parsed_data['email'] = $this->input->post(\"email\", TRUE);\r\n $parsed_data['countryID'] = $this->input->post(\"country\", TRUE);\r\n $parsed_data['phone'] = $this->input->post(\"phone\", TRUE);\r\n $parsed_data['message'] = $this->input->post(\"message\", TRUE);\r\n $parsed_data['IP'] = $this->input->ip_address();\r\n $parsed_data['browser'] = $this->input->user_agent();\r\n //post data\r\n\r\n return $parsed_data;\n }", "public function getPostVars() {\n return $this->postvars;\n }", "function resetPostData() {\n\t\t$this->postData = Array ();\n\t}", "public function extract_data_post()\r\n {\r\n if(isset($_POST['search_term']) == true && empty($_POST['search_term']) == false){\r\n $text = filter_input(INPUT_POST, 'search_term', FILTER_SANITIZE_STRING);\r\n $search = $this->Ajax->extract($text);\r\n foreach ($search as $row) {\r\n echo '<li>'.$row['word'].'<li>';\r\n }\r\n }\r\n }", "private function loadPostParams()\n {\n if(isset($_POST)) {\n $this->postParams = $_POST;\n }\n }", "public function getRequestPostResults()\n\t{\n\t\treturn $this->request_post_results;\n\t}", "public function grabAllPost()\n {\n // grab all the posts\n $allPost = $this->dbCon->query(\"SELECT search_info_content, search_info_year FROM search_info\");\n \n return $allPost;\n }", "public function posts()\n {\n $post = filter_input_array(INPUT_POST);\n array_walk_recursive($post, function(&$value) {\n $value = JORequest::setAntiInjection($value);\n });\n return $post;\n }", "public function getPostValues() {\n $post_check_array = array(\n// submit action\n 'add' => array('filter' => FILTER_SANITIZE_STRING),\n 'update' => array('filter' => FILTER_SANITIZE_STRING),\n // List all update form fields !!!\n// event type name.\n 'datum' => array('filter' => FILTER_SANITIZE_STRING),\n 'prioriteit' => array('filter' => FILTER_SANITIZE_STRING),\n 'username' => array('filter' => FILTER_SANITIZE_STRING),\n 'user' => array('filter' => FILTER_SANITIZE_STRING),\n 'password' => array('filter' => FILTER_SANITIZE_STRING),\n // Help text\n 'status' => array('filter' => FILTER_SANITIZE_STRING),\n // Id of current row\n 'alarm_id' => array('filter' => FILTER_VALIDATE_INT),\n 'alarm_noticed' => array('filter' => FILTER_VALIDATE_INT),\n\t\t\t'alarm_origin' => array('filter' => FILTER_SANITIZE_STRING)\n );\n// Get filtered input:\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n// RTS\n return $inputs;\n }", "public function getPostArray()\n {\n return [\n 'name' => $this->name,\n 'message' => $this->message,\n 'iplog' => $this->iplog,\n 'timelog' => $this->timelog\n ];\n }", "public function getPostValues()\n {\n // Define the check for params\n $post_check_array = array(\n // submit action\n 'toevoegen' => array('filter' => FILTER_SANITIZE_STRING),\n 'bijwerken' => array('filter' => FILTER_SANITIZE_STRING),\n 'verwijderen' => array('filter' => FILTER_SANITIZE_STRING),\n // question\n 'vraag' => array('filter' => FILTER_SANITIZE_STRING),\n // question type (open or closed)\n 'vraagId' => array('filter' => FILTER_SANITIZE_INT),\n // question type (open or closed)\n 'vraagSoort' => array('filter' => FILTER_SANITIZE_STRING),\n // Education\n 'opleiding' => array('filter' => FILTER_SANITIZE_STRING),\n // question send time\n 'verstuurTijd' => array('filter' => FILTER_SANITIZE_STRING)\n );\n // Get filtered input:\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n // RTS\n return $inputs;\n }", "private function managePost()\n {\n // Do only react on POST requests\n if ($_SERVER['REQUEST_METHOD'] != 'POST' || empty($_POST)) {\n return;\n }\n\n /* @var $post \\Core\\Http\\Post\\Post */\n $this->di->mapService('core.http.post', '\\Core\\Http\\Post\\Post');\n\n $post = $this->di->get('core.http.post');\n\n // Setting the name of the session token that has to/gets sent with a form\n $post->setTokenName($this->config->get('Core', 'security.form.token'));\n\n // Validate posted token with session token\n if (!$post->validateCompareWithPostToken($this->di->get('core.security.form.token'))) {\n return;\n }\n\n // Some data cleanup\n $post->trimData();\n\n // Assingn app related post data to the corresponding app\n $post_data = $post->get();\n\n foreach ($post_data as $name => $data) {\n $app = $this->getAppInstance($name);\n $app->post->set($data);\n }\n }", "public function getPostParams()\n {\n return $this->request->all();\n }", "function getFromPost() {\r\n\t\t\r\n\t\t//Event Page variables.\r\n\t\t$this->name = $_POST['eventName'];\r\n\t\t$this->date = $_POST['eventDate'];\r\n\t\t$this->time = $_POST['eventTime'];\r\n\t\t$this->time_before = $_POST['time_before'];\r\n\t\t$this->freq = $_POST['frequency'];\r\n\t\t$this->notif_method = $_POST['method'];\r\n\t}", "public function posts()\n {\n // $name = 'Dipu';\n // $age = 25;\n\n // return 'Name: '. $name . ' Age: ' . $age;\n\n // Objects\n // $user = new stdClass();\n // $user->name = 'dipu';\n // $user->age = 25;\n\n // print_r($user);\n\n //Multiple data /Array\n $post[] = \"\";\n $single_post = new stdClass();\n\n $single_post->name = 'Dipu';\n $single_post->age = 25;\n $single_post->gender = 'male';\n array_push($post, $single_post);\n\n $single_post = new stdClass();\n\n $single_post->name = 'Munna';\n $single_post->age = 20;\n $single_post->gender = 'male';\n array_push($post, $single_post);\n\n print_r($post);\n\n }", "public function getPost(): array;", "function pull_post()\n\t{\n\t\t$this->preorderID = @$_POST['preorderID'];\n\t\tif ($this->preorderID) { $this->set_preorderID($this->preorderID); }\n\n\t\tif (@$_POST['itemID']) { $this->set_itemID(@$_POST['itemID']); }\n\n\t\t$active = (isset($_GET['active'])?$_GET['active']:@$_POST['active']);\n\t\tif (!strlen($active)) { $active = PRE_ACTIVE; }\n\t\t$this->active = $active;\n\n\t\tif (isset($_POST['info']))\n\t\t{\n\t\t\t$this->info = $_POST['info'];\n\t\t\twhile (list($key,$val) = each($this->info)) { $this->info[$key] = stripslashes($val); }\n\t\t\treset($this->info);\n\t\t}\n\n\t\tif (isset($_POST['customerinfo']))\n\t\t{\n\t\t\t$this->customerinfo = $_POST['customerinfo'];\n\t\t\twhile (list($key,$val) = each($this->customerinfo)) { $this->customerinfo[$key] = stripslashes($val); }\n\t\t\treset($this->customerinfo);\n\t\t}\n\n\t\tif (isset($_POST['customer_status']))\n\t\t{\n\t\t\t$this->customer_status = $_POST['customer_status'];\n\t\t\treset($this->customer_status);\n\t\t}\n\n\t\t$this->customerID = @$_POST['customerID'];\n\t}", "protected function _process_post()\n\t{\n\t\tforeach ($_POST as $k=>$v)\n\t\t{\n\t\t\tif (substr($k, 0, 3)=='_s_' && substr($k, -7)=='_action') {\n\t\t\t\t$this->_form_posted = substr($k, 3, -7);\n\t\t\t\t$this->_form_action = $v;\n\t\t\t} else {\n\t\t\t\t$this->vars[$k] = $v;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($_FILES as $k=>$v)\n\t\t{\n\t\t\tif ($v['error'] == UPLOAD_ERR_OK)\n\t\t\t{\n\t\t\t\tif (is_uploaded_file($v['tmp_name']))\n\t\t\t\t{\n\t\t\t\t\tif ($v['size'] != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_uploaded_files[$k] = UPLOAD_ERR_OK;\n\t\t\t\t\t\t$this->vars[$k] = '_uploaded_file_';\n\t\t\t\t\t\t$this->vars[$k.':name'] = preg_replace('@[\\\\\\\\/\\\\*]@', '', $v['name']);\n\t\t\t\t\t\t$this->vars[$k.':type'] = $v['type'];\n\t\t\t\t\t\t$this->vars[$k.':size'] = $v['size'];\n\t\t\t\t\t\t$this->vars[$k.':tmp_name'] = $v['tmp_name'];\n\t\t\t\t\t}\n\t\t\t\t\telse { $this->_uploaded_files[$k] = UPLOAD_ERR_NO_FILE; }\n\t\t\t\t}\n\t\t\t\telse { $this->_uploaded_files[$k] = UPLOAD_ERR_PARTIAL; }\n\t\t\t}\n\t\t\telseif ($v['error'] != UPLOAD_ERR_NO_FILE) {\n\t\t\t\t$this->_uploaded_files[$k] = $v['error'];\n\t\t\t}\n\t\t}\n\t}", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n // All keys are srings in array, merge it with defaults to override\r\r\n $this->e_data = array_merge($this->default_options, $this->e_data);\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "private function POST() {\n global $_POST;\n $postData = array();\n foreach($_POST as $key => $value) {\n $postData[$key] = $value;\n }\n $this -> response[\"response\"] = $postData;\n return;\n }", "public function process_post() {\n\t\t$name = $this->node->attr('name');\n\n\n\t\tif (!empty($_POST) && $this->get_post_value($name)) {\n//\t\t\t$this->value = $this->get_post_value($name);\n\t\t\t$this->value($this->get_post_value($name));\n\t\t}\n\t}", "public function getData()\n {\n return Post::find(request()->id);\n }", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "public function handleDataSubmission() {}", "protected function getFormData() {\n\t\treturn $this->stripNonPrintables(json_decode($this->request->postVar('Details'), true));\n\t}", "private function getPostData(): array\n {\n return [\n 'product' => [\n 'attribute_set_id' => '4',\n 'status' => '1',\n 'name' => 'Simple Product',\n 'sku' => 'simple',\n 'url_key' => 'simple-product',\n 'type_id' => \\Magento\\Catalog\\Model\\Product\\Type::TYPE_SIMPLE\n ],\n 'links' => [\n 'upsell' => [\n ['id' => '10'],\n ],\n 'crosssell' => [\n ['id' => '11'],\n ],\n 'related' => [\n ['id' => '12'],\n ],\n ]\n ];\n }", "public function getPostParams(): array\n {\n return $this->postParams;\n }", "public function getPostFields()\n {\n return $this->invokeWrappedIfEntityEnclosed(__FUNCTION__, func_get_args());\n }", "protected function getArrPost()\n {\n return $this->getServices()\n ->get(\\Application\\Service\\ServiceJsonPostRequest::class)\n ->setObjRequest(\n $this->getRequest()\n )\n ->getJsonPost();\n }", "private function setPostParameters() {\n\t\tforeach (array_keys($_POST) as $currentKey) {\n\t\t\t$this->postArray[$currentKey] = $_POST[$currentKey];\n\t\t}\n\t}", "public function getPostData(){\n for ($t=1; $t <3 ; $t++) {\n $str = \"team\".$t;\n if(!$this->checkPost($str)) return false;\n $str = \"score_team\".$t;\n if(!$this->checkPost($str)) return false;\n for ($p=1; $p <3 ; $p++) {\n $str = \"team\".$t.\"_player\".$p;\n if(!$this->checkPost($str)) return false;\n }\n }\n return true;\n }", "function unpack_post() {\n // Globals\n global $min_words;\n global $add_num;\n global $add_char;\n global $case_opt;\n global $separator;\n\n if (array_key_exists('min-words', $_POST)) {\n $min_words = $_POST['min-words'];\n }\n\n if (array_key_exists('add-num', $_POST)) {\n $add_num = True;\n }\n\n if (array_key_exists('add-char', $_POST)) {\n $add_char = True;\n }\n\n if (array_key_exists('separator', $_POST)) {\n $separator = $_POST['separator'];\n }\n\n if (array_key_exists('case-opt', $_POST)) {\n $case_opt = $_POST['case-opt'];\n }\n\n // Mostly just for testing\n return [$min_words, (int)$add_num, (int)$add_char, $separator, $case_opt];\n}", "function process_post()\n \t{\n \t\treturn $this->class_post->process_post();\n \t}", "protected function _processPost() {\r\n $this->_currentPage->processPost();\r\n }", "public function getFormData(){\n\n\t\t\t\n\t\t\t$expectedVariables = ['title','email','checkbox'];\n\n\n\t\t\tforeach ($expectedVariables as $variable) {\n\n\t\t\t\t// creating entries for error field\t\n\t\t\t\t$this->moviesuggest['errors'][$variable]=\"\";\n\n\t\t\t\t// move all $_POST values into MovieSuggest array\n\t\t\t\tif(isset($_POST[$variable])){\n\t\t\t\t\t$this->moviesuggest[$variable] = $_POST[$variable];\n\t\t\t\t}else{\n\t\t\t\t\t$this->moviesuggest[$variable] = \"\";\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// var_dump($moviesuggest);\n\t\t\t// die();\n\t}", "public function getPostContent();", "public function collectData()\n {\n $jsonSite = getContents($this->getJSONURI());\n\n $jsonFile = json_decode($jsonSite, true);\n $posts = $jsonFile['posts'];\n\n foreach ($posts as $post) {\n $item = $this->getItemFromPost($post);\n\n //empty when 'noreblogs' is checked and current post is a reblog.\n if (!empty($item)) {\n $this->items[] = $item;\n }\n }\n }", "function parseData(){\r\n\t\t$content = array();\r\n\t\t$this->page_id = $this->CFG->PostVars['pageid'];\r\n\t\tforeach($this->CFG->PostVars as $key=>$value){\r\n\t\t\tif(preg_match(\"/content_(.*)_(.*)/\", $key, $arr)){\r\n\t\t\t\t$field\t= $arr[1];\r\n\t\t\t\t$lang \t= $arr[2];\r\n\t\t\t\tif(is_array($content[$lang])){\r\n\t\t\t\t\t$content[$lang][$field] = $value;\r\n\t\t\t\t}\r\n\t\t\t\telse $content[$lang] = array($field => $value);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->content = $content;\r\n\t}", "function filterPostData()\n {\n /** Remove linked records if they are not set anymore **/\n foreach (array('UNL_MediaHub_Feed_NamespacedElements_itunes' => 'value',\n 'UNL_MediaHub_Feed_NamespacedElements_media' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_itunesu' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_itunes' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_media' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_geo' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_mediahub' => 'value') as $relation=>$field) {\n if (isset($this->post[$relation])) {\n foreach ($this->post[$relation] as $key=>$values) {\n if (empty($values[$field])\n && empty($values['attributes'])) {\n unset($this->post[$relation][$key]);\n }\n }\n }\n }\n unset($this->post['__unlmy_posttarget']);\n unset($this->post['MAX_FILE_SIZE']);\n unset($this->post['submit_existing']);\n }", "function handle_post($indata) {\n// showDebug('form_class POST:');\n// showArray($indata); \n return;\n }", "private function getCategoryPostData()\n {\n // Get data from form fields\n $this->data['category_title'] = $this->input->post('category_title');\n }", "protected function getPost(): array {\n\t\t$post = array_diff_key($this->request->getParams(), array_flip(array( '_METHOD', )));\n\n\t\treturn $post;\n\t}", "public function getPost()\n {\n if (!isset($this->_post)) {\n if (self::$_input && \\bbn\\Str::isJson(self::$_input)) {\n $this->_post = json_decode(self::$_input, 1);\n }\n elseif (!empty($_POST)) {\n $this->_post = $_POST;\n }\n\n if (!$this->_post) {\n $this->_post = [];\n }\n else {\n $this->_has_post = true;\n //$this->_post = bbn\\Str::correctTypes($this->_post);\n foreach ($this->_post as $k => $v) {\n if (X::indexOf($k, '_bbn_') === 0) {\n if (!defined(strtoupper(substr($k, 1)))) {\n define(strtoupper(substr($k, 1)), $v);\n }\n\n unset($this->_post[$k]);\n }\n }\n }\n }\n\n return $this->_post;\n }", "private static function getPostParams()\n\t{\n\t\treturn (count($_POST) > 0) ? $_POST : json_decode(file_get_contents('php://input'), true);\n\t}", "public function getPost ();", "public function getPostFields(): array\n {\n return $this->postFields;\n }", "private function getPostData() {\n\t\t$data = null;\n\t\t\n\t\t// Get from the POST global first\n\t\tif (empty($_POST)) {\n\t\t\t// For API calls we need to look at php://input\n\t\t\tif (!empty(file_get_contents('php://input'))) {\n\t\t\t\t$data = @json_decode(file_get_contents('php://input'), true);\n\t\t\t\tif ($data === false || $data === null) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//TODO: What is this for? isn't 'php://input' always empty at this point?\n\t\t\t\t$dataStr = file_get_contents('php://input');\n\t\t\t\tparse_str($dataStr, $data);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$data = $_POST;\n\t\t}\n\t\t\n\t\t// Normalize boolean values\n\t\tforeach ($data as $name => &$value) {\n\t\t\tif ($value === 'true') {\n\t\t\t\t$value = true;\n\t\t\t}\n\t\t\telse if ($value === 'false') {\n\t\t\t\t$value = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "protected function _initPostParameters()\n {\n $this->set('_post', new DataHolder($_POST));\n }", "public function setPostFields($data){\n\t\t$this->post = array();\n\t\t$this->addPostFields($data);\n\t}", "public function to_postdata()\n {\n return http_build_query($this->postFields);\n }", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->data = $this->data['value'];\r\r\n }\r\r\n }", "public static function checkPostData($data) {\n\t\t\t/* This method use the php function htmlentities for each values in $_POST and return an array with securised data */\n foreach ($data as $key => $value) {\n $data[$key] = htmlentities($value);\n }\n return $data;\n\t\t}", "public function paramsPost()\r\n {\r\n return $this->params_post;\r\n }", "function alle_post( $post) {\n //\n $output = '' ;\n \n //\t$this->post->input\n foreach( $post as $k => $v ) \n {\t\n $output .= '$'.$k.' &nbsp; = &nbsp; $this->input->post(\\''.$k.'\\', TRUE) ;<br />'.\"\\n\";\t\n }\n //-----/$this->post->input\n\n $output .= '<br /><br />'.\"\\n\" ;\t \n \n \n //\t$this->post->input\n foreach( $post as $k => $v ) \n {\t\n $output .= '$'. $k .' &nbsp; = &nbsp; '. $v .'<br />'.\"\\n\";\t\n }\n //-----/$this->post->input \n \n \n \n $output .= '<br /><br />'.\"\\n\" ;\t\t\t\n \n //\tdatabase\n foreach ($_POST as $k => $v) \n {\t\n if( $k <> 'submit')\n {\n $output .= '$this->db->set(\\''.$k.'\\', $'.$k.' ) ; '.\"<br />\\n\";\n }\t\t\n }\n //-----/database\n\t\t\t\n\t\t// $output .= '<br />'.\"\\n\" ;\n\t\t// $output .= '<br />'.\"\\n\" ; \n \n \n return $output ;\n //-----/\n }", "public function postDataArrayProvider()\n {\n\t$data_array = array(\n\t 'photo' => 'test.jpg',\n\t 'id' => 1,\n\t 'author' => 'Anonymous',\n\t 'subject' => '',\n\t 'updated' => 0,\n\t 'content' => 'Testing'\n\t);\n\treturn array(\n\t 'default' => array($data_array)\n\t);\n }", "public function addPostFields(array $post_data) {}", "function processPostVars()\n {\n $this->id = $_POST['id'];\n $this->login = trimStrip($_POST['login']);\n $this->surname = trimStrip($_POST['surname']);\n $this->firstname = trimStrip($_POST['firstname']);\n $this->hash = trimStrip($_POST['hash']);\n $this->yearno = (integer)trimStrip($_POST['yearno']);\n $this->groupno = (integer)trimStrip($_POST['groupno']);\n $this->email = trimStrip($_POST['email']);\n $this->calendaryear = intval($_POST['calendaryear']);\n $this->coeff = (float)$_POST['coeff'];\n }", "public function setPostParams()\n {\n if (!empty($_POST)) {\n foreach ($_POST as $title => $param) {\n $this->setPostParam($title, $param);\n }\n }\n }", "private static function postParams(): array\n {\n $postParams = [];\n\n if (!empty($_POST)) {\n $postParams = filter_input_array(INPUT_POST, FILTER_DEFAULT);\n }\n\n return $postParams;\n }", "public function parsePost($post){\n\t\t\n\t\t$postData = array();\n\t\t$postData['id'] = $post->id;\n\t\t$postData['title'] = $post->title;\n\t\t$postData['slug'] = $post->slug;\n\t\t$postData['url'] = Yii::app()->createAbsoluteUrl('/news/'.$post->id.'/'.$post->slug);\n\t\t$postData['description'] = $post->description;\n\t\t$postData['source'] = $post->source;\n\t\t$postData['source_title'] = $post->source_title;\n\t\t$postData['created_dt'] = $this->time2StringFormatted($post->created_dt);\n\t\t$postData['updated_dt'] = $this->time2StringFormatted($post->updated_dt);\n\t\t$postData['image'] = $post->image != '' ? Yii::app()->request->hostInfo . Yii::app()->request->baseUrl . '/static/' . $post->image : Yii::app()->request->hostInfo . Yii::app()->request->baseUrl . '/static/default_image.png';\n\t\t$postData['category'] = array();\n\t\tif($post->cat_id){\n\t\t\t$postData['category']['cat_id'] = $post->cat_id;\n\t\t\t$postData['category']['title'] = $post->Cat->title;\n\t\t}\n\t\t$postData['author'] = array();\n\t\tif($post->user_id){\n\t\t\t$postData['author']['user_id'] = $post->user_id;\n\t\t\t$postData['author']['user_full_name'] = $post->User->user_full_name;\n\t\t}\n\t\treturn $postData;\n\t\t\n\t}", "public function setup_postdata($post)\n {\n }", "public function getPost()\n {\n $request = $this->getRequest();\n return $request->getPost();\n }", "function get_post_data() {\n\t\tif (empty($this->post)) :\n\t\t\t$this->post = get_post( $this->id );\n\t\tendif;\n\t\t\n\t\treturn $this->post;\n\t}", "protected function getPostObject(): array\n {\n /** @var Input $oInput */\n $oInput = Factory::service('Input');\n /** @var Group $oUserGroupModel */\n $oUserGroupModel = Factory::model('UserGroup', Constants::MODULE_SLUG);\n /** @var Password $oUserPasswordModel */\n $oUserPasswordModel = Factory::model('UserPassword', Constants::MODULE_SLUG);\n\n return [\n 'slug' => $oInput->post('slug'),\n 'label' => $oInput->post('label'),\n 'description' => $oInput->post('description'),\n 'default_homepage' => $oInput->post('default_homepage'),\n 'registration_redirect' => $oInput->post('registration_redirect'),\n 'acl' => json_encode(\n array_values(\n array_filter(\n $oInput->post('is_superuser')\n ? [SuperUser::class]\n : (array) $oInput->post('acl'),\n )\n )\n ),\n 'password_rules' => $oUserPasswordModel->processRules($oInput->post('pw') ?: []),\n ];\n }", "function get_fields_from_post(){\n\t\t$prefix=\"\";\n\t\t$this->id_corp=$_SESSION['ident_corp'];\n\t\t$this->name=htmlentities($_POST[$prefix.$this->ddbb_name]);\n\t\t$this->name_web=htmlentities($_POST[$prefix.$this->ddbb_name_web]);\n\t\t$this->pvp=$_POST[$prefix.$this->ddbb_pvp];\n\t\t$this->tax=$_POST[$prefix.$this->ddbb_tax];\n\t\t$this->pvp_tax=$_POST[$prefix.$this->ddbb_pvp_tax];\n\t\t$this->descrip=htmlentities($_POST[$prefix.$this->ddbb_descrip]);\n\t\t$this->path_photo = $_SESSION['ruta_photo'];\n\t\t\n\n\t\t\n\t\t$this->get_categories_from_post();\n\n\t\treturn 0;\n\t}", "#[Pure]\n public function getRawPostData() {}", "protected function parseRequest()\n {\n $this->input = $this->request->getPostList()->toArray();\n }", "function processPostVars()\n {\n $this->id = $_POST['id'];\n $this->role = $_POST['role'];\n $this->firstname = trimStrip($_POST['firstname']);\n $this->surname = trimStrip($_POST['surname']);\n $this->email = trimStrip($_POST['email']);\n $this->login = trimStrip($_POST['login']);\n $this->password = trimStrip($_POST['pass1']);\n }", "public function obtenerListaPost()\n {\n // $post = new StdClass;\n // //////////////1.DATOS///////////////\n // $post->razonSocial = $_POST['razonSocial'];\n // $post->nombreFantasia = $_POST['nombreFantasia'];\n // $post->cuit = $_POST['cuit'];\n // $post->tipoPersona = $_POST['tipoPersona'];\n // if ($post->tipoPersona == 'organizaciones') {\n // $post->tipoPersona = 'Organización sin fines de lucro';\n // }else {\n // $post->tipoPersona = 'Pueblo originario';\n // }\n // /////////////2.RESUMEN GENERAL//////////////////\n // $post->proyectoResumen = $_POST['proyectoResumen'];\n // $post->gastosContraparteResumenGeneral = $_POST['gastosContraparteResumenGeneral'];\n // $post->gastosSubsidioResumenGeneral = $_POST['gastosSubsidioResumenGeneral'];\n // $post->gastosCapitalResumenGeneral = $_POST['gastosCapitalResumenGeneral'];\n // $post->gastosCorrientesResumenGeneral = $_POST['gastosCorrientesResumenGeneral'];\n // $post->totalesResumenGeneral = $_POST['totalesResumenGeneral'];\n // /////////////3.CAPITAL Y CORRIENTE///////////////\n // $post->totalGastosAdecuacionEdilicia = $_POST['totalGastosAdecuacionEdilicia'];\n // $post->totalGastosEquipamientoTecnologico = $_POST['totalGastosEquipamientoTecnologico'];\n // $post->totalGastosCapitalSubsidio = $_POST['totalGastosCapitalSubsidio'];\n // $post->totalGastosRrhhNoPermanentes = $_POST['totalGastosRrhhNoPermanentes'];\n // $post->totalGastosViaticos = $_POST['totalGastosViaticos'];\n // $post->totalGastosCorrientesSubsidio = $_POST['totalGastosCorrientesSubsidio'];\n // ////////4.Adecuacion edilicia///////////\n // $headerAdecuacion = array(\"Descripción de plan de obra\", \"Tiempo (dias)\", \"Desembolso (en pesos)\");\n // $post->adecuacionTransmision = $_POST['adecuacionTransmision'];//tabla\n // $post->totalAdecuacionTransmision = $_POST['totalAdecuacionTransmision'];\n // $post->adecuacionProduccion = $_POST['adecuacionProduccion'];//tabla\n // $post->totalAdecuacionProduccion = $_POST['totalAdecuacionProduccion'];\n // $post->adecuacionInfra = $_POST['adecuacionInfra'];//TABLA\n // $post->totalAdecuacionInfraestructura = $_POST['totalAdecuacionInfraestructura'];\n // ///////5.Equipamiento tecnologico/////////\n // $headerEquipamiento = array(\"Descripción equipamiento\", \"Cantidad\", \"Finalidad\" , \"Precio unitario\", \"Desembolso(en pesos)\");\n // $post->equipamientoProduccion = $_POST['equipamientoProduccion'];//tabla\n // $post->totalEquipamientoProduccion = $_POST['totalEquipamientoProduccion'];\n // $post->equipamientoTransmision = $_POST['equipamientoTransmision'];//tabla\n // $post->totalEquipamientoTransmision = $_POST['totalEquipamientoTransmision'];\n // $post->equipamientoInfra = $_POST['equipamientoInfra'];//TABLA\n // $post->totalEquipamientoInfra = $_POST['totalEquipamientoInfra'];\n // /////////6.Gastos corrientes///////////////\n // $headerNoPermanentes = array(\"Función\", \"Honorarios(en pesos)\", \"Tiempo(en meses)\", \"Desembolso(en pesos)\");\n // $post->rrhhNoPermanentes = $_POST['rrhhNoPermanentes'];//tabla\n // $post->totalRrhhNoPermanentes = $_POST['totalRrhhNoPermanentes'];\n // $headerViaticos = array(\"Descripción\", \"Desembolso(en pesos)\");\n // $post->viaticosPersonal = $_POST['viaticosPersonal'];//tabla\n // $post->totalViaticosPersonal = $_POST['totalViaticosPersonal'];\n // //////////7.Resumen contraparte///////////////\n // $post->totalRrhhPermanentesContraparteResumen = $_POST['totalRrhhPermanentesContraparteResumen'];\n // $post->serviciosContraparteResumen = $_POST['serviciosContraparteResumen'];\n // $post->otrosContraparteResumen = $_POST['otrosContraparteResumen'];\n // $post->totalContraparteResumen = $_POST['totalContraparteResumen'];\n // ///////////8.Detalle contraparte /////////////\n // $headerContraparte = array(\"Rubro\", \"Desembolso(en pesos)\");\n // $post->rrhhPermanentesContraparte = $_POST['rrhhPermanentesContraparte'];//tabla\n // $post->totalRrhhPermanentesContraparteDetalle = $_POST['totalRrhhPermanentesContraparteDetalle'];\n // $post->serviciosContraparte = $_POST['serviciosContraparte'];//tabla\n // $post->totalServicioContraparteDetalle = $_POST['totalServicioContraparteDetalle'];\n // $post->otrasErogacionesContraparte = $_POST['otrasErogacionesContraparte'];//TABLA\n // $post->totalOtrasErogacionesContraparteDetalle = $_POST['totalOtrasErogacionesContraparteDetalle'];\n // $post->totalFinalContraparte = $_POST['totalFinalContraparte'];\n // //////////9.presupuestos/////////////////\n // $headerPresupuestos = array(\"Datos de la empresa\", \"Desembolso(en pesos)\");\n // $post->presupuestos = $_POST['presupuestos'];//tabla\n // $post->minimoARespaldarPresupuestos = $_POST['minimoARespaldarPresupuestos'];\n // $post->totalRespaldadoPresupuestos = $_POST['totalRespaldadoPresupuestos'];\n //\n // return $post;\n }", "private function serialize(Post $post){\n \treturn array(\n \t'username'=>$post->getUsername(),\n \t'email'=>$post->getEmail(),\n \t'passw'=>$post->getPassword()\n \t); \n\t}", "public function getAllDataPost(){\n \t// DB::table('posts')->get();\n \t$data = Post::all();\n \t$data = ($data) ? $data->toArray() : [];\n \treturn $data;\n }" ]
[ "0.77749026", "0.76259905", "0.7518642", "0.71201485", "0.70722157", "0.7051765", "0.701587", "0.69846755", "0.69653994", "0.69574696", "0.6909821", "0.68143743", "0.6812603", "0.6812572", "0.6781472", "0.6742499", "0.67285055", "0.67215836", "0.6695002", "0.6666398", "0.66529584", "0.66046786", "0.6601703", "0.6574373", "0.656211", "0.6562083", "0.6549227", "0.6541698", "0.6537787", "0.65251607", "0.64613223", "0.6457178", "0.6448178", "0.6439232", "0.64382404", "0.64260155", "0.64244473", "0.6420129", "0.64116466", "0.6392004", "0.6388881", "0.63877267", "0.63867724", "0.63647276", "0.6344925", "0.63191384", "0.6299185", "0.6298147", "0.62796223", "0.6275766", "0.6260475", "0.62410235", "0.6239259", "0.6238593", "0.6237561", "0.6234339", "0.6220241", "0.6219827", "0.62101007", "0.6205597", "0.6205205", "0.62013733", "0.6195302", "0.6187287", "0.6184548", "0.61735815", "0.6162765", "0.61375064", "0.61333996", "0.61314094", "0.61281276", "0.6126084", "0.61248094", "0.61232555", "0.6110163", "0.6110094", "0.6067722", "0.60644513", "0.6060456", "0.6054592", "0.6029656", "0.60278654", "0.6023257", "0.6014631", "0.6007851", "0.6004177", "0.59968543", "0.59934783", "0.5986786", "0.5979821", "0.5972422", "0.59663457", "0.59596175", "0.59585273", "0.5957049", "0.5953364", "0.59525895", "0.5945907", "0.59399164", "0.59267163", "0.59136164" ]
0.0
-1
Given lab rows show in a table
public function makeLabLines($rows, $cb = false) { $rev_level = rev('getLevels', $this->tlist); $rev_affil = rev('getAffiliations', $this->tlist); $rev_type = rev('getLTypes', $this->tlist); $edit_users = array('ADMIN','USER','APPROVER'); $ct = 0; $tout = array(); $tout[] = '<table style="margin-left:50px;color:black;">'; $tout[] = "<tr class='even'>"; if ($cb) { $first = "<td style='width:55px;'>Select/<br />Deselect All</td>"; } else { $first = "<td style='width:55px;'></td>"; } $etop = ''; #if (in_array($this->usertype, $edit_users)) { # $etop = "<td style='width:50px;'></td>"; #} $tout[] = <<<"END" {$first} <td style='width:100px;font-weight:bold;'>Lab Number</td> <td style='width:200px;font-weight:bold;'>Labname</td> <td style='width:85px;font-weight:bold;'>Country</td> <td style='width:100px;font-weight:bold;'>Level</td> <td style='width:145px;font-weight:bold;'>Affiliation</td> <td style='width:145px;font-weight:bold;'>SLMTA Lab Type</td> {$etop}</tr> END; foreach($rows as $row) { //logit("LAB: " . print_r($row, true)); $ct ++; $cls = ($ct % 2 == 0) ? 'even' : 'odd'; $edit = ''; #if (in_array($this->usertype, $edit_users)) { # $edit = "<a href=\"{$this->baseurl}/lab/edit/{$row['id']}\"" . # " class=\"btn btn-mini btn-warning\">Edit</a>"; #} $line = ''; if ($cb) { $name = "cb_{$row['id']}"; $line .= "<td style='width:40px;padding:2px 0;'>" . "<input type='checkbox' name='{$name}' id='{$name}'></td>"; } else if ($this->labnum == $row['labnum']) { $cls = 'hilight'; $line .= "<td><div style=\"color:red;\">Selected</div></td>"; } else { $butt = "<a href=\"{$this->baseurl}/lab/choose/{$row['id']}\"" . " class=\"btn btn-mini btn-success\">Select</a>"; $line .= "<td style='width:55px;padding:2px 0;'>{$butt}</td>"; } //$tout[] = "<tr class='{$cls}'>"; $tout[] = <<<"END" <tr class="{$cls}"> {$line} <td>{$row['labnum']}</td> <td>{$row['labname']}</td> <td>{$row['country']}</td> <td><p class="small">{$rev_level[$row['lablevel']]}</p></td> <td><p class="small">{$rev_affil[$row['labaffil']]}</p></td> <td><p class="small">{$rev_type[$row['slmta_labtype']]}</p></td> END; if ($edit != '') $tout[] = "<td style='width:40px;padding:2px 0;'>{$edit}</td>"; $tout[] = '</tr>'; // "<td style='width:45px;font-weight:bold;'>SLMTA</td>" . // <td>{$sl}</td> } $tout[] = '</table>'; $this->view->showlines = implode("\n", $tout); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exibeLab($lab, $qtdLinha, $qtdColuna){\n echo '<table border=\"0\" cellspacing=\"1\" cellpadding=\"20\" align=\"center\" style=\"margin-top:20px;\" >';\n for ($l=0; $l<$qtdLinha; $l++){\n echo '<tr>';\n for ($c=0; $c<$qtdColuna; $c++){\n if ($lab[$l][$c] == 0){\n echo '<td style=\"background-color:white\"></td>';\n }elseif ($lab[$l][$c] == 1){\n echo '<td style=\"background-color:black\"></td>';\n }elseif ($lab[$l][$c] == 3){\n echo '<td style=\"background-color:red\"></td>';\n }elseif ($lab[$l][$c] == 4){\n echo '<td style=\"background-color:black\"></td>';\n }elseif ($lab[$l][$c] == 5){\n echo '<td style=\"background-color:#5F9EA0;\"></td>';\n }\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 }", "private function showRows()\n\t{\n\t\techo '<tbody>';\n\t\t\n\t\t\tforeach ($this->data_show as $key => $row)\n\t\t\t{\n\t\t\t\techo '<tr>\n\t\t\t\t\t<td class=\"details-control\" data-row_id=\"row_' . $key . '\"></td>';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($row as $col => $val)\n\t\t\t\t\t\tif( in_array($col, $this->col_show) )\n\t\t\t\t\t\t\techo '<td>' . $val . '</td>';\n\t\t\t\t\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t\n\t\techo '</tbody>';\n\t}", "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 }", "public function display_rows()\n {\n }", "public function display_rows()\n {\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 }", "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 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 }", "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 label($array){\n //\n //Get the fields \n $fields= $this->fields->get_array();\n //\n //Ouptut a table\n echo \"<div name='{$this->entity->name}'>\";\n echo $this->header();\n //\n //Loop through the array and display the results in a table \n foreach ($array as $row) {\n //\n //Step through the columns\n foreach($fields as $field){\n //\n //Get the indexes of the field\n $name= is_null($field->alias) ? $field->column->name:$field->alias;\n //\n //Get the field value\n $value = $row[$name];\n \n echo \"<span> $name :<span>$value></span>\"; \n }\n }\n echo \"</div>\"; \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}", "function Escenario($lista){\r\necho \"<table class='tg' border='1' style='margin:auto;'>\";\r\n echo \"<tr>\";\r\n echo \"<th colspan='6'>ESCENARIO</th>\";\r\n echo \"<tr>\";\r\n echo \"<th></th>\r\n <th>1</th>\r\n <th>2</th>\r\n <th>3</th>\r\n <th>4</th> \r\n <th>5</th>\r\n </tr>\";\r\n \r\n$i=1;\r\n// Imprimimos el contenido de la tabla\r\nforeach ($lista as $fila) {\r\n echo \"<tr>\";\r\n echo \"<th>\";\r\n echo $i;\r\n echo \"</th>\";\r\n foreach ($fila as $silla) {\r\n echo \"<td>\";\r\n echo $silla;\r\n echo \"</td>\";\r\n }\r\n echo \"</tr>\";\r\n $i++;\r\n }\r\necho \"</table>\";\r\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 viewTable($parks)\n{\n return formatTable($parks);\n}", "function buildRow($network){\n $offset = 0;\n $i = 0;\n while($i < 7){\n $currentTitle = getTitle($network, getTime($offset));\n if (count($currentTitle) == 0){\n echo '<td colspan=\"1\">Local Programming</td>';\n $collumns = 1;\n $offset += 30;\n }\n else{\n $collumns = (int)($currentTitle[0]['RUNTIME'] / 30);\n if($i + $collumns > 7 ){\n $collumns = 2;\n }\n else if ($i + $collumns == 7){\n $collumns += 1;\n }\n echo '<td colspan=\"'. $collumns.'\"><a href = \"/phase5/pages/info.php?id= ' . $currentTitle[0]['ID']. '\">' . $currentTitle[0]['TITLE'] . '</td> ';\n $offset += $currentTitle[0]['RUNTIME'] ;\n }\n $i += $collumns; \n }\n}", "public function displayTable(array $rows): void\n {\n $table = new Table(new ConsoleOutput());\n $table\n ->setHeaders(array_keys($rows[0]))\n ->setRows($rows)\n ;\n $table->render();\n }", "function display_rows() {\r\n\r\n # Get the records registered in the prepare_items method\r\n $records = $this->items;\r\n\r\n //Loop for each record\r\n if(!empty($records)){foreach($records as $rec){\r\n $custom_data = unserialize($rec->custom_data);\r\n\r\n echo '<tr id=\"record_'.$rec->id.'\">';\r\n echo '<td>'.stripslashes($rec->created_on).'</td>';\r\n echo '<td>'.stripslashes($rec->type).'</td>';\r\n echo '<td>'.stripslashes($rec->ip).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['OS']['name']).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['browser']['name']).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['location']['name']).'</td>';\r\n echo '<td>\r\n <a href=\"\" data-post=\"action=detailed_log&type=' .$rec->type. '&id=' .$rec->id. '&detail=full&ip=' .$rec->ip. '\" data-type=\"modal\" data-toggle=\"tooltip\" title=\"Show details\"><div class=\"dashicons dashicons-list-view\"></div></a>\r\n <a href=\"admin.php?page=cybercure_security_detected_attacks&type=' .$rec->type. '&delete=' .$rec->id. '\" data-toggle=\"tooltip\" title=\"Delete entry\"><div class=\"dashicons dashicons-trash\"></div></a>\r\n </td></tr>';\r\n }}\r\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 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}", "public function table()\n\t{\n\t\t$this->datatables->select('experiment_id, user_id_caller, id');\n\t\t$this->datatables->from('caller');\n\n\t\t$this->datatables->edit_column('experiment_id', '$1', 'experiment_get_link_by_id(experiment_id)');\n\t\t$this->datatables->edit_column('user_id_caller', '$1', 'user_get_link_by_id(user_id_caller)');\n\t\t$this->datatables->edit_column('id', '$1', 'caller_actions(id)');\n\n\t\techo $this->datatables->generate();\n\t}", "function display_rows() {\n \n //Get the records registered in the prepare_items method\n $records = $this->items;\n \n //Get the columns registered in the get_columns and get_sortable_columns methods\n list( $columns, $hidden ) = $this->get_column_info();\n \n //Loop for each record\n if(!empty($records)){foreach($records as $rec){\n \n // Format the status output\n if ( strtotime($rec->until) <= 0 ) {\n $rec->until = false;\n } else {\n //$rec->until = __('Membership ended','wpwt').\": \".strftime('%Y-%m-%d',strtotime($rec->until));\n $rec->until = '&nbsp;|&nbsp;Active until '.strftime('%Y-%m-%d',strtotime($rec->until));\n }\n $rec->since = __('Applied','wpwt').\": \".strftime('%Y-%m-%d',strtotime($rec->since));\n \n // Pre-define the edit link\n //$editlink = '/wp-admin/link.php?action=edit&link_id='.(int)$rec->link_id;\n\n //Open the line\n echo \"<tr id=\\\"record_\".$rec->groupID.\"\\\" class=\\\"row-active-\".$rec->active.\"\\\">\\n\";\n foreach ( $columns as $column_name => $column_display_name ) {\n \n //Style attributes for each col\n $class = \"class='$column_name column-$column_name'\";\n \n // Create output in cell\n switch ( $column_name ) {\n case \"col_what\": echo \"<td \".$class.\">\".$this->show_what($rec).\"</td>\\n\"; break;\n case \"col_user\": echo \"<td \".$class.\">\".$this->add_actions($rec).\"</td>\\n\"; break;\n case \"col_groupName\": echo \"<td \".$class.\">\".$rec->groupName.\"</td>\\n\"; break;\n case \"col_application\": echo \"<td \".$class.\">\".$rec->application\n .\"<br><b>\".$rec->since.\"</b></td>\\n\"; break;\n }\n }\n \n //Close the line\n echo \"</tr>\\n\";\n }}\n }", "function Row($data)\n{\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 {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\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->MultiCell($w,5,$data[$i],0,$a);\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 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 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 }", "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 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 titulopersonal(){\n print (\"\\n<tr>\");\n if($this->titulo !=\"\")\n foreach ($this->titulo as $titulo){\n print (\"\\n<th>$titulo</th>\");\n }\n print (\"\\n<tr>\"); \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 table_table_row($values,$escape=false)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\tif (($escape) && ((!is_object($value)) || ($value->pure_lang!==true)))\n\t\t\t$value=make_string_tempcode(escape_html(is_object($value)?$value->evaluate():$value));\n\n\t\t$cells->attach(do_template('TABLE_TABLE_ROW_CELL',array('_GUID'=>'700a982eb2262149295816ddee91b0e7','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_ROW',array('_GUID'=>'a4efacc07ecb165e37c355559f476ae9','CELLS'=>$cells));\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 Row($data)\n{\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 {\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->MultiCell($w,5,$data[$i],0,$a);\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 Row($data)\n{\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 {\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->MultiCell($w,5,$data[$i],0,$a);\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 Row($data)\n{\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 {\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->MultiCell($w,5,$data[$i],0,$a);\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}", "private function write_standings_table_rows() {\n $name_style = read_name_style();\n $show_car_name = show_car_name_in_standings();\n $time_format = get_finishtime_formatting_string();\n\n $i = 0;\n foreach ($this->result_summary as &$row) {\n ++$i;\n\n $roundid = $row['roundid'];\n\n // js/standings-kiosk.js looks for data-first attribute for scrolling.\n echo \"<tr data-roundid='\".$roundid.\"' data-rankid='\".$row['rankid'].\"'\"\n .\" data-for-supergroup='\".isset($p['supergroup']).\"'\"\n .($i == 1 ? \" data-first='1'\" : \"\");\n echo ' class=\"';\n foreach ($row['outcome'] as $key => $p) {\n echo $key.' ';\n }\n echo '\"';\n echo \">\";\n\n $p = &$row['outcome'];\n\n // First column:\n echo \"<td class='col0'>\";\n {\n // echo json_encode($p); // DEBUG\n\n echo \"<div class='inround'>\";\n {\n echo $p[stkey_round($roundid)];\n }\n echo \"</div>\";\n\n if (isset($p[stkey_full_field()])) {\n echo \"<div class='insuper'>\";\n echo $p[stkey_full_field()];\n echo \"</div>\";\n }\n\n foreach ($p as $key => $place) {\n if (is_stkey_qual($key)) {\n echo \"<div class=\\\"$key\\\">$place</div>\";\n }\n }\n }\n echo \"</td>\";\n\n echo \"<td>\".$row['carnumber'].\"</td>\";\n echo \"<td>\".htmlspecialchars(mangled_name($row, $name_style), ENT_QUOTES, 'UTF-8').\"</td>\";\n if ($show_car_name) {\n echo \"<td>\".$row['carname'].\"</td>\";\n }\n\n // Racer's (native) class and place in class/group. These columns only get shown\n // for non-aggregate racing rounds, so round_classid == classid\n if ($this->use_groups) {\n $key = stkey_round($row['roundid']); // Racer's classid\n\n echo \"<td class='col-group'>\".htmlspecialchars($row['class'], ENT_QUOTES, 'UTF-8').\"</td>\";\n echo \"<td class='col-ingroup'>\";\n if (isset($p[$key])) {\n echo $p[$key];\n }\n echo \"</td>\";\n }\n\n // Rank/subgroup and place in rank/subgroup\n if ($this->use_subgroups) {\n echo \"<td class='col-subgroup'>\".htmlspecialchars($row['rank'], ENT_QUOTES, 'UTF-8').\"</td>\";\n $key = stkey_round_subgroup($row['roundid'], $row['rankid']);\n echo \"<td class='col-insubgroup'>\";\n if (isset($p[$key])) {\n echo $p[$key];\n }\n echo \"</td>\";\n }\n\n // Place in pack\n if ($this->has_full_field_standings()) {\n echo \"<td class='col-insuper'>\";\n if (isset($p[stkey_full_field()])) {\n echo $p[stkey_full_field()];\n }\n echo \"</td>\";\n }\n echo \"<td class='col-inround'>\".$p[stkey_round($roundid)].\"</td>\";\n\n echo \"<td>\".$row['base'].\"</td>\";\n\n if ($this->use_points) {\n echo \"<td>\".$row['avg'].\"</td>\";\n echo \"<td>\".ordinal($row['best']).\"</td>\";\n echo \"<td>\".ordinal($row['worst']).\"</td>\";\n } else {\n echo \"<td>\".sprintf($time_format, $row['avg']).\"</td>\";\n echo \"<td>\".sprintf($time_format, $row['best']).\"</td>\";\n echo \"<td>\".sprintf($time_format, $row['worst']).\"</td>\";\n }\n echo \"</tr>\\n\";\n }\n }", "function display_rows(){\n\n\t\t//Get the records registered in the prepare_items method\n\t\t$records = $this->items;\n\n\t\t//Get the columns registered in the get_columns and get_sortable_columns methods\n\t\tlist( $columns ) = $this->get_column_info();\n\n\t\t//Loop for each record\n\t\tif( ! empty( $records ) ){\n\n\t\t\tforeach( $records as $rec ){\n\n\t\t\t\t$position = ( $rec->post_order ) ? $rec->post_order : 0;\n\t\t\t\t$id = ( $rec->ID ) ? $rec->ID : 'N/A';\n\t\t\t\t$title = ( $rec->post_title ) ? $rec->post_title : 'N/A';\n\t\t\t\t$author = ( $rec->post_author ) ? $rec->post_author : 'N/A';\n\t\t\t\t$date = ( $rec->post_date ) ? $rec->post_date : 'N/A';\n\n\t\t\t\t//Open the line\n\t\t\t\techo '<tr id=\"record_' . $id . '\" class=\"draggable-tr\" data-order=\"' . $position . '\" data-post-id=\"' . $id . '\" draggable=\"true\">';\n\t\t\t\tforeach( $columns as $column_name => $column_display_name ){\n\n\n\t\t\t\t\t//Style attributes for each col\n\t\t\t\t\t$class = \"class='$column_name column-$column_name'\";\n\t\t\t\t\t$style = \"\";\n\t\t\t\t\tif( in_array( $column_name ) ){\n\t\t\t\t\t\t$style = ' style=\"display:none;\"';\n\t\t\t\t\t}\n\t\t\t\t\t$attributes = $class . $style;\n\n\n\t\t\t\t\t//Display the cell\n\t\t\t\t\tswitch( $column_name ){\n\t\t\t\t\t\tcase \"post_order\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $position ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_title\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $title ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_author\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( get_the_author_meta( 'nicename', $author ) ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_date\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . $date . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $id ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t}", "function create_table($log)\n {\n $colOrder = array('title','artist','time','count');\n $excludeCols = array('channel','','albumart','keep');\n\n //Select data for table\n list($nrows, $sliced) = select_table_rows($log);\n \n //Create table\n echo '<center><table>';\n \n echo \"\\n <tr>\";\n \n //create header row\n foreach($colOrder as $val) \n {\n echo \"\\n <th>\".$val.\"</th>\";\n }\n echo \"\\n </tr>\";\n\n //create data rows\n for ($i=0; $i <= $nrows; $i++) \n {\n $orderedRow = array_replace(array_flip($colOrder), $sliced[$i]);\n echo \"\\n <tr>\";\n foreach ($orderedRow as $key => $value) \n {\n if (!in_array($key, $excludeCols)) \n {\n echo \"\\n <td>\";\n switch ($key)\n {\n case \"albumart\":\n echo '<a href=\"'.$value.'\"><img src=\"'.$value.'\" alt=\"Album Art\" style=\"width:60px;height:60px;border:0;\"></a>'; \n case \"time\":\n echo date(\"D j M Y\",$value).\"<br>\".date(\"G:i:s\",$value);\n break;\n default:\n echo $value;\n } \n echo \"</td>\";\n }\n } \n echo \"\\n </tr>\";\n }\n echo \"</table></center>\";\n }", "function Latex_Table_Multi($titles,$table,$spec=\"c\")\n {\n $clines=array();\n $rtable=array();\n \n $rids=array_keys($table);\n\n $width=0;\n foreach ($rids as $rid)\n {\n $row=$table[ $rid ];\n if (!is_array($row)) { $row=array($row); }\n if (!empty($row[ \"Row\" ])) { $row=$row[ \"Row\" ]; }\n if ($width<count($row)) { $width=count($row); }\n }\n \n foreach ($rids as $rid)\n {\n $row=$table[ $rid ];\n if (!is_array($row))\n {\n $row=array\n (\n $this->MultiCell($row,$width)\n );\n \n $table[ $rid ]=$row;\n }\n \n \n if (!is_array($row)) { $row=array($row); }\n if (!empty($row[ \"Row\" ])) { $row=$this->B($row[ \"Row\" ]); }\n \n $rtable[ $rid ]=array();\n $clines[ $rid ]=array();\n\n $cids=array_keys($row);\n for ($m=0;$m<count($cids);$m++)\n {\n $cid=$cids[ $m ];\n \n $cell=$row[ $cid ];\n \n $text=$cell;\n if (!empty($cell[ \"Text\" ]))\n {\n $text=$cell[ \"Text\" ];\n }\n \n $rtable[ $rid ][ $cid ]=$text;\n\n $start=$cid+1;\n $end=$start;\n if (!empty($cell[ \"Options\" ][ \"COLSPAN\" ]))\n {\n $end=$start+$cell[ \"Options\" ][ \"COLSPAN\" ]-1;\n }\n \n $clines[ $rid ][ $cid ]=\n \"\\\\cline{\".$start.\"-\".$end.\"}\";\n }\n }\n\n \n for ($n=0;$n<count($rids);$n++)\n {\n $rid=$rids[ $n ];\n \n $row=$table[ $rid ];\n \n if (!is_array($row))\n {\n $row=array\n (\n $this->MultiCell($row,$width)\n );\n }\n \n if (!empty($row[ \"Row\" ])) { $row=$row[ \"Row\" ]; }\n \n $cids=array_keys($row);\n foreach ($row as $cid => $cell)\n {\n if (!empty($cell[ \"Options\" ]))\n {\n if (!empty($cell[ \"Options\" ][ \"ROWSPAN\" ]))\n {\n for ($m=0;$m<$cell[ \"Options\" ][ \"ROWSPAN\" ]-1;$m++)\n {\n if ($rids[ $n+$m ])\n {\n $rrid=$rids[ $n+$m ];\n unset($clines[ $rrid ][ $cid ]);\n }\n }\n\n $rtable[ $rid ][ $cid ]=\n $this->Latex_Table_Multi_Row\n (\n $cell[ \"Options\" ][ \"ROWSPAN\" ],\n $rtable[ $rid ][ $cid ]\n ).\n \"\";\n }\n\n if (!empty($cell[ \"Options\" ][ \"COLSPAN\" ]))\n {\n $rtable[ $rid ][ $cid ]=\n $this->Latex_Table_Multi_Col\n (\n $cell[ \"Options\" ][ \"COLSPAN\" ],\n $rtable[ $rid ][ $cid ],\n $cid\n );\n }\n \n \n }\n }\n\n }\n \n $specs=array();\n for ($n=0;$n<$width;$n++)\n {\n array_push($specs,$spec);\n }\n \n $latex=\"\\\\begin{tabular}{|\".join(\"|\",$specs).\"|}\\n\\\\hline\\n\";\n for ($n=0;$n<count($rids);$n++)\n {\n $rid=$rids[ $n ];\n $latex.=\n join(\" &\\n\",$rtable[ $rid ]).\"\\\\\\\\\\n\".\n join(\" \",$clines[ $rid ]).\"\\n\".\n \"\";\n }\n\n $latex.=\"\\\\end{tabular}\\n\";\n\n //$this->ShowLatexCode($latex);exit();\n\n return $latex;\n }", "public static function showData() {\n\n\t\tforeach(self::$employee_array as $id => $employee) { // Pour chaque ligne on affiche chaque attribut correspondant au colonne du tableau\n\n\t\t\tif($employee->_entityShortName == null) // Gestion du cas où une entité a été supprimée mais pas l'employé de l'entité\n\t\t\t\techo \"<tr><td>null</td><td>\" . $employee->_lastName . \"</td><td>\" . $employee->_firstName . \"</td><td>\" . $employee->_login . \"</td><td><a href=\\\"user.php?action=modifier&id=\" . $employee->_id . \"\\\">modifier</a></td><td><a href=\\\"user.php?action=supprimer&id=\" . $id . \"\\\">supprimer</a></td></tr>\";\n\t\t\telse\n\t\t\t\techo \"<tr><td>\" . $employee->_entityShortName . \"</td><td>\" . $employee->_lastName . \"</td><td>\" . $employee->_firstName . \"</td><td>\" . $employee->_login . \"</td><td><a href=\\\"user.php?action=modifier&id=\" . $employee->_id . \"\\\">modifier</a></td><td><a href=\\\"user.php?action=supprimer&id=\" . $id . \"\\\">supprimer</a></td></tr>\";\n\t\t}\n\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 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}", "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 }", "public function preview_rows($sels)\n {\n $preview='';\n\n // we need the last array index number to stop a count function which is used in each loop\n $last_index=count($sels)-1;\n\n // full count - needed to output one text box value for each row\n $full_count=1;\n for ($x=0;$x<count($sels);$x++)\n {\n if (isset($sels[$x]['vals']))\n {\n $full_count*=count($sels[$x]['vals']);\n }\n }\n\n // iterate over the vtypes, pushing each one out as a column of carefully ordered\n // vvalues\n for ($c=0;$c<count($sels);$c++)\n {\n $nvar_count=1;\n\n // count up all the vals from further down the array ($c+1 to $last_index)\n // this bit tells us how many times we need to output each vvalue, so columns\n // on the left this is higher than on the right\n $val_count=1;\n for ($x=$c+1;$x<=$last_index;$x++)\n {\n if (isset($sels[$x]['vals']))\n {\n $val_count*=count($sels[$x]['vals']);\n }\n }\n\n // column floats\n if (isset($sels[$c]['vals']) ? $class='nvtype_left' : $class='nvtype_right' );\n\n // now open up the column span, price column is a bit special as elsewhere (bold this time)\n $preview.=\"<span id='\".str_replace(' ','_',$sels[$c]['var_type_name']).\"_preview' class='var_column \".$class.\"'>\";\n\n // we have vals, so we need to carefully output them depending on their position in the array\n // you are actually going to have to study output and code here because I can't describe this\n // clearly in English - I'd love it if you did, I'd even buy you a beer ;-)\n if (isset($sels[$c]['vals']))\n {\n // the number of time to repeat the sequence, this increases as we move through the array\n $repeat_count=$full_count/($val_count*count($sels[$c]['vals']));\n\n // repeat the sequence x number of times\n for ($x=0;$x<$repeat_count;$x++)\n {\n // each sequence step through all vals in the val array\n for ($y=0;$y<count($sels[$c]['vals']);$y++)\n {\n // for each val in the array output it the val count amount of times\n for ($z=0;$z<$val_count;$z++)\n {\n $val_text=$sels[$c]['var_type_name'].\":&nbsp;\".$sels[$c]['vals'][$y]['name'];\n $preview.=$val_text.\"<br/>\";\n $preview.=\"<input type='hidden' name='\".$nvar_count.\"_\".$sels[$c]['var_type_id'].\"' value='\".$sels[$c]['vals'][$y]['id'].\"_\".$val_text.\"'/>\";\n $nvar_count++;\n }\n }\n }\n }\n // else we just output a full count of text outputs - we use the full count, a cartesian product of all the selections\n // this is as there is no variation in the vvalue\n else\n {\n for ($y=0;$y<$full_count;$y++)\n {\n if (isset($sels[$c]['val']) ? $val=$sels[$c]['val'] : $val='');\n if ('price'==$sels[$c]['var_type_name'] ? $pound_insert=\"&pound;\" : $pound_insert='' );\n $preview.=$sels[$c]['var_type_name'].\":\".$pound_insert.\"<span class='\".$sels[$c]['var_type_id'].\"U'>\".$val.\"</span><br/>\";\n $preview.=\"<input class='\".$sels[$c]['var_type_id'].\"U_hid' type='hidden' name='\".$nvar_count.\"_\".$sels[$c]['var_type_id'].\"U' value='\".$val.\"'/>\";\n $nvar_count++;\n }\n }\n $preview.=\"</span>\";\n }\n\n return $preview;\n }", "function Row($data) {\n\t$nb=0;\n\tfor($i=0;$i<count($data);$i++)\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t$h=5*$nb;\n\n\t//Emitir un salto de la primera página, si es necesario\n\t$this->CheckPageBreak($h);\n\n\t//Dibuja las celdas de la fila\n\tfor($i=0;$i<count($data);$i++)\n\t{\n\t\t$w=$this->widths[$i];\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\n\t\t//Guardar la posición actual\n\t\t$x=$this->GetX();\n\t\t$y=$this->GetY();\n\n\t\t//Dibujar el borde \n\t\t$this->Rect($x,$y,$w,$h);\n\n\t\t$this->MultiCell($w,20,$data[$i],0,$a,'true');\n\t\t//Ponga la posición a la derecha de la celda\n\t\t$this->SetXY($x+$w,$y);\n\t}\n\t//Ir a la siguiente línea\n\t$this->Ln($h);\n}", "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 }", "function make_table ($rows){\n if (($rows['supply_type'] == 'prepaid' \n && $rows['status'] == 'initiated') ||\n ($rows['supply_type'] == 'postpaid' \n && $rows['status'] == 'supplied')){ // Only display Prepaid supplies that have been initiated and Postpaid supplies that have been delivered\n $pay = '<a href=\"pay.php?supply_id='.$rows['id'].'\" target=\"pay_frame\"> \n <small data-toggle=\"modal\" data-target=\"#payModal\">Pay</small>\n </a>'; // Open the transfer iframe in a Modal window\n } else {\n $pay = '<small class=\"text-danger\">Pay</small>';\n }\n\n\n\n\n $row = '\n <tr>\n <td>'.$rows['supplier_name'].'</td>\n <td>'.$rows['quantity_desc'].' of <strong>'.$rows['item_name'].'</strong></td>\n <td>'.$rows['status'].' ('.$rows['supply_type'].')</td>\n <td>N'.number_format($rows['amount'],2,\".\",\",\").'</td>\n <td>'.$rows['supply_order_date'].'</td>\n <td>'.$pay.'</td>\n </tr>\n ';\n return $row;\n }", "public function displayTableRow($title, $data, $row) {\r\n\t\t$html = '<tr class=';\r\n\t\t// this seems strange, but the second row of the table is the first row of data, and therefore odd...\r\n\t\tif ($row == 'even') $html .= '\"row\">';\r\n\t\telseif ($row == 'odd') $html .= '\"row2\">';\r\n\r\n\t\tif (!$title == '') $html .= '<td class=\"lefttitle\">'.$title.'</td>';\r\n\t\tfor ($i=0; $i<count($data); $i++) {\r\n\t\t\t$html .= '<td align=\"center\" class=\"right\">'.$data[$i].'</td>';\r\n\t\t}\r\n\t\t$html .= '</td>';\r\n\t\treturn $html;\r\n\t}", "function ImprimirCabeceraTabla($tabla){\n echo \"<table><tr>\";\n foreach ($tabla as $valor){\n\n echo \"<th>\".$valor.\"</th>\";\n \n }\n echo \"</tr>\";\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 Row($data){\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++){\n\t $w=$this->widths[$i];\n\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n \t//Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n \t//Draw the border\n\t $this->Rect($x,$y,$w,$h);\n \t//Print the text\n\t $this->MultiCell($w,5,$data[$i],0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\n\t //Go to the next line\n\t $this->Ln($h);\n\t}", "function Row($data){\n\t\t\t$nb=0;\n\t\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t\t$h=5*$nb;\n\t\t\t//Issue a page break first if needed\n\t\t\t$this->CheckPageBreak($h);\n\t\t\t//Draw the cells of the row\n\t\t\tfor($i=0;$i<count($data);$i++){\n\t\t\t\t$w=$this->widths[$i];\n\t\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t\t//Save the current position\n\t\t\t\t$x=$this->GetX();\n\t\t\t\t$y=$this->GetY();\n\t\t\t\t//Draw the border\n\t\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t\t//Print the text\n\t\t\t\tif(!is_numeric($data[$i])){\n\t\t\t\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t\t\t}else{\n\t\t\t\t\t$this->MultiCell($w,5, \"$\".number_format($data[$i],2,\".\",\",\"),0,'R');\n\t\t\t\t}\n\t\t\t\t//Put the position to the right of the cell\n\t\t\t\t$this->SetXY($x+$w,$y);\n\t\t\t}\n\t\t\t//Go to the next line\n\t\t\t$this->Ln($h);\n\t\t}", "function Row($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->MultiCell($w, 5, $data[$i], 0, $a);\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 Row($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->MultiCell($w, 5, $data[$i], 0, $a);\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 }", "public function makeTableView($headings, $content, $idFieldName, $viewURL);", "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 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 Row($data)\n\t{\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++)\n\t {\n\t $w=$this->widths[$i];\n\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'J';\n\t //Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n\t //Draw the border\n\t $this->Rect($x,$y,$w,$h);\n\t //Print the text\n\t $this->MultiCell($w,5,$data[$i],0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\t //Go to the next line\n\t $this->Ln($h);\n\t}", "function fancy_altrows($rows) {\r\n\tif(is_array($rows)) {\r\n\t\t$i = 0;\r\n\t\tforeach($rows as $text) { $i++; ?>\r\n\t\t\t\t\t<li class=\"<?php tablealt($i); ?>\"><?php echo $text; ?></li>\r\n<?php\r\n\t\t}\r\n\t}\r\n}", "function table_row($p_data, $p_tr_attr = '', $p_td_attr = array()){\n\techo '<tr ' . $p_tr_attr . '>';\n\n\tfor($t_i=0; $t_i<count($p_data); $t_i++){\n\t\t$t_td = (isset($p_td_attr[$t_i]) ? $p_td_attr[$t_i] : '');\n\t\techo '<td ' . $t_td . '>' . $p_data[$t_i] . '</td>';\n\t}\n\n\techo '</tr>';\n}", "function table_voltooid($conn)\n\t{\n\t\t$data=prepare_data_volt($conn);\n\t\t\n\t\tfor ($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\techo \"<tr>\";\n\t\t\tforeach($data[$i] as $best)\n\t\t\t{\n\t\t\t\techo \"<td>$best</td>\";\n\t\t\t}\n\t\t\techo \"</tr>\";\n\t\t}\n\t}", "protected function RenderTable()\n {\n if ($this->m_QueryONRender)\n if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule))\n return $this->ProcessDataObjError($ok);\n\n $records = array();\n $records[] = $this->m_RecordRow->RenderColumn();\n $counter = 0;\n while (true) {\n if ($this->m_Range != null && $this->m_Range > 0 && $counter > $this->m_Range)\n break;\n if ($this->CanShowData())\n $arr = $resultRecords[$counter];\n if (!$arr)\n break;\n $this->m_RecordRow->SetRecordArr($arr);\n $tblRow = $this->m_RecordRow->Render();\n $records[] = $tblRow;\n $counter++;\n }\n return $records;\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 printTable ($backArray, $geoArray, $socArray, $enerArray, $commArray) {\n \n \n // Variables to check the categories array sizes\n $backSize = count($backArray);\n $geoSize = count($geoArray);\n $socSize = count($socArray);\n $enerSize = count($enerArray);\n $commSize = count($commArray);\n \n \n // Error checking if nothing was selected\n \n if ($backSize != 0 || $geoSize != 0 || $socSize != 0 || $enerSize != 0 || $commSize != 0) {\n \n // open the table border\n print \"<table><tr>\";\n \n if ($backSize != 0) {\n \n for ($i = 0; $i < $backSize; $i++) {\n \n if ($backArray[$i][0] == 0) {\n \n $cleanStr = substr_replace($backArray[$i], \"\", 0,1);\n \n print \"<th>\" . $cleanStr . \"</th>\";\n \n }\n if ($backArray[$i][0] == 1) {\n \n print \"<tr>\";\n \n $cleanStr1 = substr_replace($backArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr1 . \"</td>\";\n \n }\n \n if ($backArray[$i][0] == 2) {\n \n $cleanStr2 = substr_replace($backArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr2 . \"</td>\";\n \n print \"</tr>\";\n \n }\n }\n }\n \n if ($geoSize != 0) {\n \n for ($i = 0; $i < $geoSize; $i++) {\n \n if ($geoArray[$i][0] == 0) {\n \n $cleanStr = substr_replace($geoArray[$i], \"\", 0,1);\n \n print \"<th>\" . $cleanStr . \"</th>\";\n }\n \n if ($geoArray[$i][0] == 1) {\n \n print \"<tr>\";\n \n $cleanStr1 = substr_replace($geoArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr1 . \"</td>\";\n }\n \n if ($geoArray[$i][0] == 2) {\n \n $cleanStr2 = substr_replace($geoArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr2 . \"</td>\";\n \n print \"</tr>\";\n \n }\n }\n }\n \n if ($socSize != 0) {\n for ($i = 0; $i < $socSize; $i++) {\n \n if ($socArray[$i][0] == 0) {\n \n $cleanStr = substr_replace($socArray[$i], \"\", 0,1);\n \n print \"<th>\" . $cleanStr . \"</th>\";\n }\n if ($socArray[$i][0] == 1) {\n \n print \"<tr>\";\n \n $cleanStr1 = substr_replace($socArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr1 . \"</td>\";\n \n }\n if ($socArray[$i][0] == 2) {\n \n $cleanStr2 = substr_replace($socArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr2 . \"</td>\";\n \n print \"</tr>\";\n }\n }\n }\n if ($enerSize != 0) { \n \n for ($i = 0; $i < $enerSize; $i++) {\n \n if ($enerArray[$i][0] == 0) {\n \n $cleanStr = substr_replace($enerArray[$i], \"\", 0,1);\n \n print \"<th>\" . $cleanStr . \"</th>\";\n }\n \n if ($enerArray[$i][0] == 1) {\n \n print \"<tr>\";\n \n $cleanStr1 = substr_replace($enerArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr1 . \"</td>\";\n \n }\n \n if ($enerArray[$i][0] == 2) {\n \n $cleanStr2 = substr_replace($enerArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr2 . \"</td>\";\n \n print \"</tr>\";\n \n }\n }\n } \n if ($commSize != 0) { \n \n for ($i = 0; $i < $commSize; $i++) {\n if ($commArray[$i][0] == 0) {\n \n $cleanStr = substr_replace($commArray[$i], \"\", 0,1);\n \n print \"<th>\" . $cleanStr . \"</th>\";\n }\n if ($commArray[$i][0] == 1) {\n \n print \"<tr>\";\n \n $cleanStr1 = substr_replace($commArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr1 . \"</td>\";\n \n }\n if ($commArray[$i][0] == 2) {\n \n $cleanStr2 = substr_replace($commArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr2 . \"</td>\";\n \n print \"</tr>\";\n }\n }\n }\n print \"</tr></table>\";\n \n print \"<hr>\";\n \n echo \"<h3>\" . \"Chart of the Data Selected\" . \"</h2>\";\n \n }\n else {\n echo \"<h2>\" . \"No data Selected\" . \"</h2>\";\n \n }\n }", "public function showExp(){\n \n if(count($this->arrDataExp) > 0){\n echo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">';\n foreach($this->arrDataExp as $type=>$arrTbl){\n\n echo '<tr>';\n echo '<td>';\n echo '&nbsp;';\n echo '</td>';\n echo '</tr>';\n\t echo '<tr>';\n echo '<td>';\n\t echo '<div style=\"border:1px solid #006600; border-style:dashed; background-color:#aecde4;padding:5px;\">';\n\t echo '<font color=\"#6A3500\"><b> เงื่อนไข : </b>';\n echo $this->arrTypeTitle[$type];\n\t echo '</font>';\n\t echo '</div>';\n echo '</td>';\n echo '</tr>';\n echo '<tr>';\n echo '<td>';\n foreach($arrTbl as $tblName=>$arrData){\n\t\t if($this->arrSubTypeTitle[$tblName] != ''){ \n\t echo \"<div style='border:1px solid #6A3500;color:#6A3500; padding:3px;'><img src='images/exclamation.png' align='absmiddle' />&nbsp;\".$this->arrSubTypeTitle[$tblName].\"</div>\";\n\t\t }\n echo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">';\n $numRows = count($arrData);\n $i = 1;\n foreach($arrData as $key=>$arrValue){\n echo '<tr>';\n echo '<td width=\"20%\">'.$arrValue['positionName'].'</td>';\n echo '<td width=\"20%\">ระดับ '.$arrValue['levelName'].'</td>';\n echo '<td width=\"20%\">'.$arrValue['dateStartPosition'].'</td>';\n echo '<td width=\"20%\">'.$arrValue['dateEndPosition'].'</td>';\n echo '<td width=\"20%\">'.$arrValue['strPeriodPosition'].'</td>';\n echo '</tr>';\n if($i == $numRows){\n echo '<tr>';\n echo '<td colspan=\"5\"><b>ประสบการณ์ดำรงตำแหน่ง เท่ากับ '.$arrValue['strPeriodPositionAll'].'</b></td>';\n echo '</tr>';\n }\n $i++;\n } \n echo '</table>';\n\t\n\t } \n echo '</td>';\n echo '</tr>'; \n\n }\n\n echo '</table>';\n }else{\n\t echo \"<div style='border:1px solid #6A3500;color:#FFFF00; padding:3px;'><img src='images/exclamation.png' align='absmiddle' />&nbsp;ไม่พบข้อมูลตำแหน่ง</div>\"; \n }\n \n }", "function arrayToTable($array_assoc):void {\n if (is_array($array_assoc)) {\n echo '<table class=\"table\">';\n echo '<thead>';\n echo '<tr>';\n list($table_title) = $array_assoc;\n foreach ($table_title as $key => &$value):\n echo '<th>' . $key . '</th>';\n endforeach;\n echo '</tr>';\n echo '</thead>';\n foreach ($array_assoc as &$master):\n echo '<tr>';\n foreach ($master as &$slave):\n echo '<td>' . $slave . '</td>';\n endforeach;\n echo '</tr>';\n endforeach;\n echo '</table>';\n }\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 renderTableRows($headers, $rows, $rowType= 2)\r\n{\r\n\tglobal $isArchive;\r\n\r\n\t$tr= '';\r\n\tif (!count($rows))// In case there is no registered row at all\r\n\t{\r\n\t\t$rows= array($headers);\r\n\t\tif ($rowType== 2) return '';\r\n\t}\r\n\tif ($rowType== 3) $rows= array($rows[0]);// Keep only one row to get the template for the last hidden empty row (used for js clone())\r\n\tforeach ($rows as $numRow => $row)\r\n\t{\r\n\t\t$td= '';\r\n\t\t$profit= 0;// Percentage\r\n\t\t$devtu= 0;// Theoretical\r\n\t\t$devtu_f= 0;// Final\r\n\t\t$completion= 0;\r\n\r\n\t\tforeach ($row as $cellNum => $cell)\r\n\t\t{\r\n $tdClass= isset($headers[$cellNum]->class)? $headers[$cellNum]->class : '';\r\n\r\n $cell= $rowType== 3? '' : $cell;\r\n $width= isset($headers[$cellNum]->width)? ' style=\"width:'.$headers[$cellNum]->width.'\"' : '';\r\n\r\n $td.= \"<td class=\\\"{$headers[$cellNum]->type} $tdClass\\\" $width><div>\";\r\n\r\n\t\t\tif ($tdClass== 'tasks') $td.= renderTaskCell($cell);\r\n\t\t\telse switch ($headers[$cellNum]->type)\r\n\t\t\t{\r\n\t\t\t\tcase 'text':\r\n\t\t\t\t\t$td.= '<input type=\"text\" value=\"'.$cell.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'range':\r\n\t\t\t\t\t$val= $rowType== 3? '' : (int)$cell;\r\n\t\t\t\t\t$text= $rowType== 3? '-' : $cell;\r\n\t\t\t\t\t$td.= '<input type=\"range\" value=\"'.$val.'\" min=\"'.$headers[$cellNum]->range->min.'\" max=\"'.$headers[$cellNum]->range->max.'\" step=\"'.$headers[$cellNum]->range->step.'\"/><span>'.$text.'</span>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\t$td.= '<input type=\"number\" min=\"'.$headers[$cellNum]->number->min.'\" value=\"'.$cell.'\" step=\"'.$headers[$cellNum]->number->step.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'date':\r\n\t\t\t\t\t$cell= !$cell && $headers[$cellNum]->default== 'today'? date('Y-m-d') : $cell;\r\n\t\t\t\t\t$td.= '<input type=\"date\" value=\"'.$cell.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'textarea':\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$td.= \"<textarea>$cell</textarea>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'select':\r\n\t\t\t\t\t$options= $headers[$cellNum]->select->options;\r\n\t\t\t\t\t$select= '';\r\n\t\t\t\t\tforeach ($options as $val => $opt)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$select.= '<option value=\"'.$val.'\"'.($cell==$val? ' selected=\"selected\"' : '').'>'.$opt.'</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$td.= \"<select>$select</select>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$td.= '</div></td>';\r\n\r\n\t\t\tif ($tdClass== 'devtu') $devtu= floatval($cell);\r\n\t\t\tif ($tdClass== 'devtu_f') $devtu_f= floatval($cell);\r\n\t\t\telseif ($tdClass== 'completion') $completion= intval($cell);\r\n\r\n\t\t}\r\n\r\n\t\tif ($completion== 100 && $devtu && $devtu_f) $profit= round((1-$devtu_f/$devtu)*100);\r\n\r\n\t\t$tr.= \"<tr>\r\n\t\t\t\t\t<td style=\\\"width:10px\\\" class=\\\"noContent handle\".($profit? ' profit i-tag' : '').\"\\\" data-profit=\\\"\".($profit> 0 ? '+'.$profit : $profit).\"%\\\">\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<span class=\\\"handle\\\"></span>\r\n\t\t\t\t\t\t\t<input type=\\\"checkbox\\\" class=\\\"toggle\\\"/>\r\n\t\t\t\t\t\t\t<label class=\\\"i-minus\\\" title=\\\"Mask\\\"></label>\r\n\t\t\t\t\t\t\t<button class=\\\"archive i-\".($isArchive? 'unarchive' : 'archive').\"\\\" title=\\\"\".($isArchive? 'Unarchive' : 'Archive').\"\\\"/></button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t$td\r\n\t\t\t\t</tr>\";\r\n\t}\r\n\tif ($rowType== 3) $tr.= \"<tr class=\\\"hidden\\\">\r\n\t\t\t\t\t\t\t\t<td style=\\\"width:10px\\\" class=\\\"noContent handle\\\">\r\n\t\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\\\"handle\\\"></span>\r\n\t\t\t\t\t\t\t\t\t\t<input type=\\\"checkbox\\\" class=\\\"toggle\\\"/>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\\\"i-minus\\\" title=\\\"Mask\\\"></label>\r\n\t\t\t\t\t\t\t\t\t\t<button class=\\\"archive i-\".($isArchive? 'unarchive' : 'archive').\"\\\" title=\\\"\".($isArchive? 'Unarchive' : 'Archive').\"\\\"></button>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t$td\r\n\t\t\t\t\t\t\t</tr>\";\r\n\treturn $tr;\r\n}", "function multiTableRow($row_attrs, $cell_data, $istitle = false) {\n\t\t$ap = html_ap();\n\t\t(isset($row_attrs['class'])) ? $row_attrs['class'] .= ' ff' : $row_attrs['class'] = 'ff';\n\t\tif ( $istitle ) {\n\t\t\t$row_attrs['class'] .= ' align-center';\n\t\t}\n\t\t$return = html_ao('tr', $row_attrs);\n\t\tfor ( $c = 0; $c < count($cell_data); $c++ ) {\n\t\t\t$locAp = html_ap();\n\t\t\t$cellAttrs = array();\n\t\t\tforeach (array_slice($cell_data[$c],1) as $k => $v) {\n\t\t\t\t$cellAttrs[$k] = $v;\n\t\t\t}\n\t\t\t(isset($cellAttrs['class'])) ? $cellAttrs['class'] .= ' ff' : $cellAttrs['class'] = 'ff';\n\t\t\t$return .= html_ao('td', $cellAttrs);\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ao('strong');\n\t\t\t}\n\t\t\t$return .= $cell_data[$c][0];\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ac(html_ap() -1);\n\t\t\t}\n\t\t\t$return .= html_ac($locAp);\n\t\t}\n\t\t$return .= html_ac($ap);\n\t\treturn $return;\n\t}", "function Row($data) {\n\t\t\t$nb=0;\n\t\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t\t$h=5*$nb;\n\t\t\t\n\t\t\t//Issue a page break first if needed\n\t\t\t$this->CheckPageBreak($h);\n\t\t\t\n\t\t\t//Draw the cells of the row\n\t\t\tfor($i=0;$i<count($data);$i++) {\n\t\t\t\t$w=$this->widths[$i];\n\t\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n\t\t\t\t//Save the current position\n\t\t\t\t$x=$this->GetX();\n\t\t\t\t$y=$this->GetY();\n\t\t\t\t//Draw the border\n\t\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t\t//Print the text\n\t\t\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t\t\t//Put the position to the right of the cell\n\t\t\t\t$this->SetXY($x+$w,$y);\n\t\t\t}\n\t\t\t//Go to the next line\n\t\t\t$this->Ln($h);\n\t\t}", "function BeginIncidentTable() {\n $headings = array(\"Year\", \"Section\", \"Description\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\", \"Count\");\n echo \"<table class='sortable' align='center' cellpadding='5' border=1>\";\n echo \"<tr>\";\n foreach ($headings as $heading) {\n echo \"<th>$heading</th>\";\n }\n echo \"</tr>\";\n}", "function echoResultsQREE ($rows) \r{\r \techo \"<table cellpadding=7>\\n\";\r \tforeach ($rows as $row) {\r\t\techo \"\\n\\n\\n<tr>\\n<td valign=top>\\n\";\r\t\techoDocumentLink($row);\r\t\techo \"<td><font color=blue>\".$row[0].\"</font><br>\";\r\t\techoTwoSentences($row[3],$row[4],$row[5],$row[6],$row[7],false);\r \t}\r \techo \"</table>\\n\";\r}", "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 Row($data)\n{\n\t$nb=0;\n\tfor($i=0;$i<count($data);$i++)\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t$h=5*$nb;\n\t//Issue a page break first if needed\n\t$this->CheckPageBreak($h);\n\t//Draw the cells of the row\n\tfor($i=0;$i<count($data);$i++)\n\t{\n\t\t$w=$this->widths[$i];\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t//Save the current position\n\t\t$x=$this->GetX();\n\t\t$y=$this->GetY();\n\t\t//Draw the border\n\t\t$this->Rect($x,$y,$w,$h);\n\t\t//Print the text\n\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t//Put the position to the right of the cell\n\t\t$this->SetXY($x+$w,$y);\n\t}\n\t//Go to the next line\n\t$this->Ln($h);\n}", "function display_rows() {\n\n //Récuperation des quotes\n $records = $this->items;\n\n //Récuperation des colonnes\n list( $columns, $hidden ) = $this->get_column_info();\n if(!empty($records)){\n //pour chaque quote\n foreach($records as $rec){\n\n echo '<tr id=\"record_'.$rec->id.'\">';\n foreach ( $columns as $column_name => $column_display_name ) {\n\n $class = \"class='$column_name column-$column_name'\";\n $style = \"\";\n if ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n $attributes = $class . $style;\n\n $editlink = '/wp-admin/link.php?action=edit&id='.(int)$rec->id;\n\n switch ( $column_name ) {\n case \"col_id\":\techo '<td '.$attributes.'>'.stripslashes($rec->id).'</td>';\tbreak;\n case \"col_author\": echo '<td '.$attributes.'>'.stripslashes($rec->author).'</td>'; break;\n case \"col_quote\": echo '<td '.$attributes.'>'.stripslashes($rec->quote).'</td>'; break;\n case \"col_action\": echo '<td '.$attributes.'><a class=\"button\" style=\"margin-right:10px;\" href=\"admin.php?page=add_funny_quotes&quote='.stripslashes($rec->id).'&action=edit\">Editer</a><a class=\"button\" onclick=\"return confirm(\\'Etes-vous sur de vouloir supprimer la quote ?\\')\" href=\"admin.php?page=add_funny_quotes&quote='.stripslashes($rec->id).'&action=delete\">Supprimer</a></td>'; break;\n }\n\n }\n\n echo'</tr>';\n\n }\n }\n }", "function Row($data)\n\t{\n\t\t$nb=0;\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t$h=6*$nb;\n\t\t//Issue a page break first if needed\n\t\t$this->CheckPageBreak($h);\n\t\t//Draw the cells of the row\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\t$w=$this->widths[$i];\n\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t//Save the current position\n\t\t\t$x=$this->GetX();\n\t\t\t$y=$this->GetY();\n\n\t\t\t//Berder semua\n\t\t\t//Draw the border\n\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t//Print the text\n\t\t\t$this->MultiCell($w,6,$data[$i],0,$a);\n\t\t\t//Put the position to the right of the cell enaena\n\t\t\t$this->SetXY($x+$w,$y);\n\t\t}\n\t\t//Go to the next line\n\t\t$this->Ln($h);\n\t}", "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 display_table($sql, $tid) {\n \n $userdb = userConnect();\n \n try {\n //code to print column headings\n $stmt = $userdb->query($sql . ' LIMIT 1');\n $fields = array_keys($stmt->fetch(PDO::FETCH_ASSOC));\n echo '<table id=\"' . $tid . '\" class=\"recordset\">';\n echo '<thead>';\n echo '<tr id=\"header\">';\n echo '<td></td>'; //empty cell for checkbox column\n for ($i = 1; $i < count($fields); $i++) {\n echo '<td>' . $fields[$i] . '</td>';\n }\n echo '</tr>';\n echo '</thead>';\n $stmt = null;\n \n //code to print records\n $stmt = $userdb->query($sql);\n echo '<tbody>';\n while ($record = $stmt->fetch(PDO::FETCH_NUM)) {\n $rowcount++;\n if ($rowcount % 2 == 0) {\n echo '<tr id=\"' . $record[0] .'\" class=\"altrow\">';\n } else {\n echo '<tr id=\"' . $record[0] .'\">';\n }\n echo '<td><input type=\"checkbox\" class=\"recordselect\" id=\"' . $record[0] . '\"/></td>';\n for ($i = 1; $i < count($record); $i++) {\n echo '<td>' . $record[$i] . '</td>';\n }\n echo '</tr>';\n }\n echo '</tbody>'; \n echo '</table>';\n } catch(PDOException $e) {\n echo $e->getMessage();\n die();\n }\n }", "function ipal_grid_view(){\r\nglobal $DB;\r\nglobal $ipal;\r\n\r\n$questions=explode(\",\",$ipal->questions);\r\n\r\necho \"<table border=\\\"1\\\" width=\\\"100%\\\">\\n\";\r\necho \"<tr><td>Name</td>\\n\";\r\nforeach($questions as $question){\r\n$question_data=$DB->get_record('question',array('id'=>$question));\r\necho \"<td><div style=\\\"word-wrap: break-word;\\\">\".substr(trim(strip_tags($question_data->name)),0,80).\"</div></td>\\n\";\r\n}\r\necho \"</tr>\\n\";\r\n\r\nforeach(ipal_who_sofar($ipal->id) as $user){\r\n\techo \"<tr><td>\".ipal_find_student($user).\"</td>\\n\";\r\n\t\tforeach($questions as $question){\r\n \t\tif($question != \"\"){\r\n$answer=$DB->get_record('ipal_answered',array('ipal_id'=>$ipal->id,'user_id'=>$user, 'question_id'=>$question));\r\nif(!$answer){echo \"<td>&nbsp;</td>\\n\";}\r\nelse{\r\n$answer_data=$DB->get_record('question_answers',array('id'=>$answer->answer_id));\r\necho \"<td><div style=\\\"word-wrap: break-word;\\\">\".substr(trim(strip_tags($answer_data->answer)),0,40).\"</div></td>\\n\";\r\n}\r\n\t\t\t}\r\n\t\t}\r\necho \"</tr>\\n\";\r\n\t}\r\necho \"</table>\\n\";\r\n}", "function Row($data)\n\t{\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5.5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++)\n\t {\n\t $w=$this->widths[$i];\n\t if ($i == 4 || $i == 5){\n\t \t$a = 'R';\n\t } elseif ($i == 0) {\n\t \t$a='L';\n\t } else {\n\t\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n\t\t}\n\t //Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n\t //Draw the border\n\t $this->Rect($x,$y,$w,$h);\n\t //Print the text\n\t $this->MultiCell($w,5.5,\"$data[$i]\",0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\t //Go to the next line\n\t $this->Ln($h);\n\t}", "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 Row1($data)\r\n{\r\n $nb=0;\r\n for($i=0;$i<count($data);$i++)\r\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n $h=5*$nb;\r\n //Issue a page break first if needed\r\n $this->CheckPageBreak1($h);\r\n //Draw the cells of the row\r\n for($i=0;$i<count($data);$i++)\r\n {\r\n $w=$this->widths[$i];\r\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n //Save the current position\r\n $x=$this->GetX();\r\n $y=$this->GetY();\r\n //Draw the border\r\n //$this->Rect($x,$y,$w,$h);\r\n //Print the text\r\n $this->MultiCell($w,5,$data[$i],0,$a);\r\n //Put the position to the right of the cell\r\n $this->SetXY($x+$w,$y);\r\n }\r\n //Go to the next line\r\n $this->Ln($h);\r\n}", "public function TableItem($text, $align, $width, $height, $left, $line) {\n\n\t// include text translations\n\tinclude('fixed.php');\n\tinclude('data.php'); // Load Testing Data\n \n\t$this->SetX($left);\n $this->SetLineWidth(0.1);\n\n\t\n\t$this->SetFont($formatting[$lang]['font'], '', 6.5, false);\n//\t$this->setTextShadow(array('enabled'=>false, 'depth_w'=>0, 'depth_h'=>0, 'color'=>false, 'opacity'=>1, 'blend_mode'=>'Normal'));\n\t//$this->SetTextColor(255, 0, 0); \n\n\n\tforeach ($text as $i => $value) {\n\t\n\t if ($line % 2 == 0) {\n\t \t$this->SetFillColor(235, 235, 235);\n\t \t//$this->SetTextColor(255, 0, 0); \n\t } else {\n\t \t$this->SetFillColor(255, 255, 255);\n\t \t//$this->SetTextColor(0, 0, 255); \n\t }\n $this->SetLineWidth(0.05); \n\t$this->MultiCell($width[$i], $height, $value, 'LR', $align[$i], 1, 0, '', '', true);\n\n\t\n\t}\n\t\n\t$this->Ln();\n \n return;\n \n}", "private function display_grid($grid) \n\t{\n\t\techo \"<table border=1>\";\n\t\tforeach ($grid as $row =>$columns) {\n\t\t\t\techo \"<tr><td></td>\";\n\t\t\tforeach ($columns as $key =>$value) {\n\t\t\t\t\n\t\t\t\techo \"<td>$value</td>\";\n\t\t\t\t\n\t\t\t}\n\t\t\techo \"</tr>\";\n\t\t}\n\t\techo \"</table>\";\n\t\t\n\t\t\n\t}", "function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }", "function displayTable($filename)\r\n\t\t{\r\n\t\t\t$myTable = \"\\n<table border='1'>\";\r\n\r\n\t\t\t$myTable .= \"<tr>\";\r\n\t\t\t$myTable .= \" <th>Last name</th>\";\r\n\t\t\t$myTable .= \" <th>First name</th>\";\r\n\t\t\t$myTable .= \"</tr>\\n\\n\";\r\n\r\n\t\t\t$line_ctr = 0;\r\n\r\n\t\t\t$fp = fopen($filename, 'r');\r\n\t\t\tif ($fp){\r\n\t\t\t\twhile(true){\r\n\t\t\t\t\t$line = fgets($fp);\r\n\t\t\t\t\tif (feof($fp)){\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$line_ctr++;\r\n\r\n\t\t\t\t\t$line_ctr_remainder = $line_ctr % 2;\r\n\t\t\t\t\tif ($line_ctr_remainder == 0){\r\n\t\t\t\t\t\t$style = \"style='background-color: #ffc;'\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$style = \"style='background-color: #fff;'\";\r\n\t\t\t\t\t} // if for line_ctr_remainder\r\n\t\t\t\t\tlist($lastname, $firstname) = explode('|',$line);\r\n\r\n\t\t\t\t\t$myTable .=\"<tr $style>\";\r\n\t\t\t\t\t\t$myTable .=\"<td>\".$lastname.\"</td>\";\r\n\t\t\t\t\t\t$myTable .=\"<td>\".$firstname.\"</td>\";\r\n\t\t\t\t\t$myTable .=\"</tr> \\n\"; // add new line fot html formating\r\n\t\t\t\t} // end while\r\n\t\t\t\tfclose($fp);\r\n\t\t\t\t$myTable .= \"</table>\";\r\n\t\t\t\t$rtn = array($line_ctr, $myTable);\r\n\t\t\t} else {\r\n\t\t\t\t$rtn = array(\"No file\",\"Dummy\");\r\n\t\t\t}\r\n\t\t\treturn $rtn;\r\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 }", "public function display_rows() {\n\n\t\t// Get the records registered in the prepare_items method\n\t\t$records = $this->items;\n\n\t\t// Get the columns registered in the get_columns and get_sortable_columns methods\n\t\tlist( $columns, $hidden ) = $this->get_column_info();\n\n\t\t// Loop for each record\n\t\tif ( ! empty( $records ) ) {\n\t\t\tforeach ( $records as $rec ) {\n\n\t\t\t\t// Open the line\n\t\t\t\techo '<tr id=\"record_' . $rec->ID . '\">';\n\t\t\t\tforeach ( $columns as $column_name => $column_display_name ) {\n\n\t\t\t\t\t// Style attributes for each col\n\t\t\t\t\t$class = \"class='$column_name column-$column_name'\";\n\t\t\t\t\t$style = '';\n\t\t\t\t\tif ( in_array( $column_name, $hidden ) ) {\n\t\t\t\t\t\t$style = ' style=\"display:none;\"';\n\t\t\t\t\t}\n\t\t\t\t\t$attributes = $class . $style;\n\n\t\t\t\t\tswitch ( $column_name ) {\n\t\t\t\t\t\tcase 'title':\n\t\t\t\t\t\t\t$edit_link = admin_url( 'admin.php?page=wo_edit_client&id=' . $rec->ID );\n\t\t\t\t\t\t\techo '<td ' . $attributes . '><strong><a href=\"' . $edit_link . '\" title=\"Edit\">' . stripslashes( $rec->post_title ) . '</a></strong>\n\t\t\t\t\t\t<div class=\"row-actions\">\n\t\t\t\t\t\t<span class=\"edit\"><a href=\"' . $edit_link . '\" title=\"' . __( 'Edit Client', 'wp-oauth' ) . '\">' . __( 'Edit', 'wp-oauth' ) . '</a> | </span>\n\t\t\t\t\t\t<span class=\"trash\"><a class=\"submitdelete\" title=\"' . __( 'delete this client', 'wp-oauth' ) . '\" onclick=\"wo_remove_client(\\'' . $rec->ID . '\\');\" href=\"#\">' . __( 'Delete', 'wp-oauth' ) . '</a> </span>';\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// case \"user_id\": echo '<td '.$attributes.'>'.stripslashes($rec->user_id).'</td>'; break;\n\t\t\t\t\t\tcase 'client_id':\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . get_post_meta( $rec->ID, 'client_id', true ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Close the line\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t}\n\t}", "function tabla($numero){\n\t\t\n\t\techo \"<h3>Tabla de multiplicar del numero: $numero </h3>\";\n\t\tfor ($i=1; $i <=10 ; $i++) {\n\t\t\t$resultado = $numero*$i;\n\n\t\t\techo \"$numero x $i = $resultado <br>\"; \n\t\t\t\n\t\t}\n\t}", "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 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}", "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 }", "public function renderComponentsToTable(): void\n {\n $language = $this->getDefaultLanguage();\n $this->table->setHeaders(['Name', 'Language', 'File']);\n foreach ($this->components as $component) {\n $this->table->addRow([$component->name, $language, $component->filename]);\n }\n\n $this->table->render();\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 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 createPlayerSummary() {\n $records = $this->Players->all();\n\n //Prime the table class to display player info. Wasn't sure what equity was though...\n $this->load->library('table');\n $parms = array(\n 'table_open' => '<table class=\"table-right-game\">',\n 'cell_start' => '<td class=\"player\">',\n 'cell_alt_start' => '<td class=\"player\">'\n );\n\n $this->table->set_template($parms);\n $this->table->set_heading('Player', 'Peanuts', 'Equity');\n\n foreach ($records as $row) {\n $this->table->add_row($row->Player, $row->Peanuts);\n }\n\n //Generate the table\n $this->data['wtable'] = $this->table->generate();\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 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}", "private function _createLabels ()\n {\n $content = '';\n\n foreach ($this->dayLabels as $label)\n {\n $content .= Html::tag('td', $label);\n }\n\n return Html::tag('tr', $content).\"\\n\";\n }", "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 Row($data)\n {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 3.8 * $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] : 'C';\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->MultiCell($w, 3.8, $data[$i], 0, $a);\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 }" ]
[ "0.7079118", "0.6730648", "0.6729151", "0.6586235", "0.6490279", "0.64900094", "0.64703673", "0.6467509", "0.6372382", "0.63648754", "0.6352889", "0.6337399", "0.6312124", "0.62397605", "0.6234957", "0.6219381", "0.62049246", "0.6203714", "0.6181953", "0.61750436", "0.6170919", "0.6158584", "0.613919", "0.6134124", "0.6127882", "0.6126645", "0.61265516", "0.6115431", "0.61129427", "0.60995245", "0.60981435", "0.6088749", "0.6088749", "0.6088749", "0.60841024", "0.6083877", "0.6070755", "0.6067034", "0.6066301", "0.60464627", "0.6034864", "0.6026077", "0.60174465", "0.6009222", "0.60029876", "0.599303", "0.5986694", "0.59808326", "0.59787667", "0.5972416", "0.59678864", "0.59639406", "0.59639406", "0.5941391", "0.5932275", "0.59274465", "0.59246016", "0.59229374", "0.5919246", "0.5908967", "0.5904833", "0.5900096", "0.58994734", "0.58970034", "0.5892142", "0.58909965", "0.58906204", "0.58883435", "0.5883742", "0.5880224", "0.5879691", "0.587338", "0.5868655", "0.5867502", "0.5850532", "0.584026", "0.583974", "0.5837861", "0.5827701", "0.5827064", "0.58262604", "0.5825365", "0.58251256", "0.5824428", "0.58196753", "0.58196366", "0.5817284", "0.5814508", "0.5809203", "0.5808845", "0.5804688", "0.5804296", "0.5800776", "0.57925624", "0.57921976", "0.579014", "0.57851183", "0.5783709", "0.5782783", "0.57753336" ]
0.6785565
1
Given audit rows show in a table
public function makeAuditLines($rows, $options = array()) { $cb = false; $addsel = false; $cb = (get_arrval($options, 'cb', false)) ? true : false; $addsel = (get_arrval($options, 'addsel', false)) ? true : false; $rev_level = rev('getLevels', $this->tlist); $rev_affil = rev('getAffiliations', $this->tlist); $tout = array(); $ct = 0; if ($cb) { /* $tout[] = <<<"END" <form method="post" action="{$this->baseurl}/output/process" enctype="multipart/form-data" name="action" id="action"> END; */ } $tout[] = '<table style="margin-left:50px;color:black;">'; $tout[] = "<tr class='even'>"; if ($cb) { $tout[] = "<td style='width:55px;'><center>Select/<br />Deselect<br />All<br /><input type='checkbox' name='allcb' id='allcb'></center></td>"; } else { $tout[] = "<td style='width:55px;'></td>"; } $tout[] = <<<"END" <td style='width:43px;font-weight:bold;padding:2px 0;'>Audit<br />Id</td> <td style='width:55px;font-weight:bold;'>Type</td> <td style='width:55px;font-weight:bold;'>SLMTA<br />Type</td> <td style='width:55px;font-weight:bold;'>Slipta<br />Off.</td> <td style='width:130px;font-weight:bold;'>Date</td> <td style='width:100px;font-weight:bold;'>Labnum</td> <td style='width:150px;font-weight:bold;'>Labname</td> <td style='width:85px;font-weight:bold;'>Country</td> <td style='width:100px;font-weight:bold;'>Level</td> <td style='width:145px;font-weight:bold;'>Affiliation</td> <td style='width:45px;font-weight:bold;'>Co-<br />hort<br />Id</td> <td style='width:92px;font-weight:bold;'>Status</td> END; if (! $cb) { $tout[] = "<td></td></tr>"; } else { $tout[] = "</tr>"; } foreach($rows as $row) { logit('Audit: ' . print_r($row, true)); if (! $row['owner'] && $row['status'] == 'INCOMPLETE') continue; //if ($) $ct ++; $cls = ($ct % 2 == 0) ? 'even' : 'odd'; /*$edit = ($row['status'] == 'INCOMPLETE' && $row['owner']) ? "<a href=\"{$this->baseurl}/audit/edit/{$row['audit_id']}/\" class=\"btn btn-mini btn-inverse\">Edit</a>" : ''; $view = "<a href=\"{$this->baseurl}/audit/view/{$row['audit_id']}\" class=\"btn btn-mini btn-success\">View</a>"; */ $adduser = ''; if ($this->audit['audit_id'] != $row["audit_id"]) { $selx = "<a href=\"{$this->baseurl}/audit/choose/{$row["audit_id"]}\" class=\"btn btn-mini btn-info\">Select</a>"; } else { $cls = 'hilight'; $selx = "<div style=\"color:red;\">Selected</div>"; } $tout[] = "<tr class='{$cls} ' style=\"height:24px;\">"; if ($cb) { $name = "cb_{$row['audit_id']}"; $tout[] = "<td style='width:40px;padding:4px 0;'>" . "<center><input type='checkbox' name='{$name}' id='{$name}'></center></td>"; } else if ($addsel) { $butt = "<a href=\"{$this->baseurl}/lab/choose/{$row['audit_id']}\"" . " class=\"btn btn-mini btn-success\">Select</a>"; $tout[] = "<td style='width:40px;padding:2px 4px;'>{$butt}</td>"; } else { $tout[] = "<td style='width:40px;padding:2px 4px;'>{$selx}</td>"; } $tout[] = <<<"END" <td>{$row['audit_id']}</td> <td>{$row['audit_type']}</td><td>{$row['slmta_type']}</td><td>{$row['slipta_official']}</td> <td>{$row['end_date']}</td> <td>{$row['labnum']}</td> <td>{$row['labname']}</td><td>{$row['country']}</td> <td><p class="small">{$rev_level[$row['lablevel']]}</p></td> <td><p class="small">{$rev_affil[$row['labaffil']]}</p></td> <td>{$row['cohort_id']}</td><td>{$row['status']}</td> END; if (! $cb) { $tout[] = "<td></td></tr>"; //{$export} {$delete} } else { $tout[] = "</tr>"; } } if ($cb) { $tout[] = '<tr><td colspan=13 style="text-align:right;" ><input class="input-xlarge submit" type="submit" name="doit" value="Process Request">'; } $tout[] = '</table><div style="height: 65px;">&nbsp;</div>' . '<div style="clear: both;"></div>'; /* if ($cb) { $tour[] = '</form>'; }*/ $lines = implode("\n", $tout); return $lines; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_rows() {\r\n\r\n # Get the records registered in the prepare_items method\r\n $records = $this->items;\r\n\r\n //Loop for each record\r\n if(!empty($records)){foreach($records as $rec){\r\n $custom_data = unserialize($rec->custom_data);\r\n\r\n echo '<tr id=\"record_'.$rec->id.'\">';\r\n echo '<td>'.stripslashes($rec->created_on).'</td>';\r\n echo '<td>'.stripslashes($rec->type).'</td>';\r\n echo '<td>'.stripslashes($rec->ip).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['OS']['name']).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['browser']['name']).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['location']['name']).'</td>';\r\n echo '<td>\r\n <a href=\"\" data-post=\"action=detailed_log&type=' .$rec->type. '&id=' .$rec->id. '&detail=full&ip=' .$rec->ip. '\" data-type=\"modal\" data-toggle=\"tooltip\" title=\"Show details\"><div class=\"dashicons dashicons-list-view\"></div></a>\r\n <a href=\"admin.php?page=cybercure_security_detected_attacks&type=' .$rec->type. '&delete=' .$rec->id. '\" data-toggle=\"tooltip\" title=\"Delete entry\"><div class=\"dashicons dashicons-trash\"></div></a>\r\n </td></tr>';\r\n }}\r\n }", "public function table()\n\t{\n\t\t$this->datatables->select('experiment_id, user_id_caller, id');\n\t\t$this->datatables->from('caller');\n\n\t\t$this->datatables->edit_column('experiment_id', '$1', 'experiment_get_link_by_id(experiment_id)');\n\t\t$this->datatables->edit_column('user_id_caller', '$1', 'user_get_link_by_id(user_id_caller)');\n\t\t$this->datatables->edit_column('id', '$1', 'caller_actions(id)');\n\n\t\techo $this->datatables->generate();\n\t}", "function printAuditResultsToTable($pdoStmt, $tableHeaders) {\n\t// Printing the table\n\techo \"<table id='auditResults'>\";\n\t\n\t// Looping through the headers\n\techo \"<thead>\";\n\tforeach($tableHeaders as $th)\n\t\techo \"<th>\" . $th . \"</th>\";\n\techo \"</thead>\";\n\n\t// Looping through results of the query\n\techo \"<tbody>\";\n\twhile($row = $pdoStmt->fetch(PDO::FETCH_ASSOC)) {\n\t\techo \"<tr>\";\n\n\t\t// Printing each value from the query\n\t\tforeach($row as $r) \n\t\t\techo \"<td>\" . $r . \"</td>\";\n\n\t\techo \"</tr>\";\n\t}\n\n\n\techo \"</tbody>\";\n\techo \"</table>\";\n}", "private function showRows()\n\t{\n\t\techo '<tbody>';\n\t\t\n\t\t\tforeach ($this->data_show as $key => $row)\n\t\t\t{\n\t\t\t\techo '<tr>\n\t\t\t\t\t<td class=\"details-control\" data-row_id=\"row_' . $key . '\"></td>';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($row as $col => $val)\n\t\t\t\t\t\tif( in_array($col, $this->col_show) )\n\t\t\t\t\t\t\techo '<td>' . $val . '</td>';\n\t\t\t\t\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t\n\t\techo '</tbody>';\n\t}", "function view_new(){\n echo \"<tr onclick='record.select(this)' id='{$this->entity->name}'>\";\n //\n //loop through the column and out puts its td element.\n foreach ($this->entity->columns as $col){\n //\n //Get the tds for every column\n echo $col->view();\n }\n //\n echo \"</tr>\";\n }", "function display_rows() {\n \n //Get the records registered in the prepare_items method\n $records = $this->items;\n \n //Get the columns registered in the get_columns and get_sortable_columns methods\n list( $columns, $hidden ) = $this->get_column_info();\n \n //Loop for each record\n if(!empty($records)){foreach($records as $rec){\n \n // Format the status output\n if ( strtotime($rec->until) <= 0 ) {\n $rec->until = false;\n } else {\n //$rec->until = __('Membership ended','wpwt').\": \".strftime('%Y-%m-%d',strtotime($rec->until));\n $rec->until = '&nbsp;|&nbsp;Active until '.strftime('%Y-%m-%d',strtotime($rec->until));\n }\n $rec->since = __('Applied','wpwt').\": \".strftime('%Y-%m-%d',strtotime($rec->since));\n \n // Pre-define the edit link\n //$editlink = '/wp-admin/link.php?action=edit&link_id='.(int)$rec->link_id;\n\n //Open the line\n echo \"<tr id=\\\"record_\".$rec->groupID.\"\\\" class=\\\"row-active-\".$rec->active.\"\\\">\\n\";\n foreach ( $columns as $column_name => $column_display_name ) {\n \n //Style attributes for each col\n $class = \"class='$column_name column-$column_name'\";\n \n // Create output in cell\n switch ( $column_name ) {\n case \"col_what\": echo \"<td \".$class.\">\".$this->show_what($rec).\"</td>\\n\"; break;\n case \"col_user\": echo \"<td \".$class.\">\".$this->add_actions($rec).\"</td>\\n\"; break;\n case \"col_groupName\": echo \"<td \".$class.\">\".$rec->groupName.\"</td>\\n\"; break;\n case \"col_application\": echo \"<td \".$class.\">\".$rec->application\n .\"<br><b>\".$rec->since.\"</b></td>\\n\"; break;\n }\n }\n \n //Close the line\n echo \"</tr>\\n\";\n }}\n }", "public function getAllEntriesAsRows() {\n $allModels = $this -> getAllHistoricFilterEntries();\n $html = \"\";\n //TODO may need to make a function that makes a JS array to hold the info\n foreach ($allModels as $model) {\n $idHistoricFilter = strval($model -> getIdHistoricFilter());\n $objectRowID = \"14\" . $idHistoricFilter;\n $editAndDelete = \"</td><td><button class='btn basicBtn' onclick='updateHistoricFilter(\"\n . $objectRowID . \",\"\n . $model -> getIdHistoricFilter()\n . \")'>Update</button>\"\n . \"</td><td>\";\n\n if ($idHistoricFilter != \"0\") {\n $editAndDelete = $editAndDelete . \"<button class='btn basicBtn' onclick=\"\n . '\"deleteHistoricFilter('\n . $model -> getIdHistoricFilter()\n . ')\"> Delete</button>';\n }\n\n $html = $html\n . \"<tr id='\" . $objectRowID . \"'><td>\" . $model -> getHistoricFilterName()\n . \"</td><td>\" . $model -> getDateStart()\n . \"</td><td>\" . $model -> getDateEnd()\n . \"</td><td>\" . $model -> getDescription()\n . \"</td><td>\" . $model -> getButtonColor()\n . $editAndDelete\n . \"</td></tr>\";\n }\n return $html;\n }", "public static function showData() {\n\n\t\tforeach(self::$employee_array as $id => $employee) { // Pour chaque ligne on affiche chaque attribut correspondant au colonne du tableau\n\n\t\t\tif($employee->_entityShortName == null) // Gestion du cas où une entité a été supprimée mais pas l'employé de l'entité\n\t\t\t\techo \"<tr><td>null</td><td>\" . $employee->_lastName . \"</td><td>\" . $employee->_firstName . \"</td><td>\" . $employee->_login . \"</td><td><a href=\\\"user.php?action=modifier&id=\" . $employee->_id . \"\\\">modifier</a></td><td><a href=\\\"user.php?action=supprimer&id=\" . $id . \"\\\">supprimer</a></td></tr>\";\n\t\t\telse\n\t\t\t\techo \"<tr><td>\" . $employee->_entityShortName . \"</td><td>\" . $employee->_lastName . \"</td><td>\" . $employee->_firstName . \"</td><td>\" . $employee->_login . \"</td><td><a href=\\\"user.php?action=modifier&id=\" . $employee->_id . \"\\\">modifier</a></td><td><a href=\\\"user.php?action=supprimer&id=\" . $id . \"\\\">supprimer</a></td></tr>\";\n\t\t}\n\t}", "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 }", "public function showEventsTable() {\r\n\t\t$stmt = $this->connect()->query(\"SELECT * FROM event\");\r\n\t\techo \"<h3>Event Table</h3>\";\r\n\t\techo \"<table><tr><td>\" . \"id\" . \"</td><td>\" . \"competition_id\" . \"</td><td>\" . \"name\" . \"</td><td>\" . \"score\" . \"</td><td>\" . \"time\" . \"</td><td>\" . \"tie_break\" . \"</td></tr>\";\r\n\t\twhile ($row = $stmt->fetch()) {\r\n\t\t\techo \"<tr><td>\" . $row['id'] . \"</td><td>\" . $row['competition_id'] . \"</td><td>\" . $row['name'] . \"</td><td>\" . $row['score'] . \"</td><td>\" . $row['time'] . \"</td><td>\" . $row['tie_break'] . \"</td></tr>\"; \r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}", "function create_table($log)\n {\n $colOrder = array('title','artist','time','count');\n $excludeCols = array('channel','','albumart','keep');\n\n //Select data for table\n list($nrows, $sliced) = select_table_rows($log);\n \n //Create table\n echo '<center><table>';\n \n echo \"\\n <tr>\";\n \n //create header row\n foreach($colOrder as $val) \n {\n echo \"\\n <th>\".$val.\"</th>\";\n }\n echo \"\\n </tr>\";\n\n //create data rows\n for ($i=0; $i <= $nrows; $i++) \n {\n $orderedRow = array_replace(array_flip($colOrder), $sliced[$i]);\n echo \"\\n <tr>\";\n foreach ($orderedRow as $key => $value) \n {\n if (!in_array($key, $excludeCols)) \n {\n echo \"\\n <td>\";\n switch ($key)\n {\n case \"albumart\":\n echo '<a href=\"'.$value.'\"><img src=\"'.$value.'\" alt=\"Album Art\" style=\"width:60px;height:60px;border:0;\"></a>'; \n case \"time\":\n echo date(\"D j M Y\",$value).\"<br>\".date(\"G:i:s\",$value);\n break;\n default:\n echo $value;\n } \n echo \"</td>\";\n }\n } \n echo \"\\n </tr>\";\n }\n echo \"</table></center>\";\n }", "public function display_rows()\n {\n }", "public function display_rows()\n {\n }", "function printUserAuditResultsToTable($pdoStmt, $tableHeaders) {\n\t// Printing the table\n\techo \"<table id='auditResults'>\";\n\t\n\t// Looping through the headers\n\techo \"<thead>\";\n\tforeach($tableHeaders as $th)\n\t\techo \"<th>\" . $th . \"</th>\";\n\techo \"</thead>\";\n\n\t// Looping through results of the query\n\techo \"<tbody>\";\n\twhile($row = $pdoStmt->fetch(PDO::FETCH_ASSOC)) {\n\t\techo \"<tr>\";\n\n\t\t// Printing each value from the query\n\t\techo \"<td>\" . $row['MessageID'] . \"</td>\";\n\t\techo \"<td>\" . $row['ChatID'] . \"</td>\";\n\t\techo \"<td>\" . $row['Message'] . \"</td>\";\n\t\techo \"<td>\" . $row['Time_Sent'] . \"</td>\";\n\t\techo \"<td>\" . $row['Time_Created'] . \"</td>\";\n\t\techo \"<td>\" . $row['Status'] . \"</td>\";\n\t\t//echo \"<td>\" . $row['SenderID'] . \"</td>\";\n\n\t\t// Since we don't know who the reciever is, we need to test who the reciever is.\n\t\t// This way, we can be certain that whoever the sender is will be printed under\n\t\t// the correct header.\n\t\tif($row['SenderID'] === $row['UserID_1']) {\n\t\t\techo \"<td>\" . $row['UserID_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['First_Name_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Last_Name_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Email_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Username_1'] . \"</td>\";\n\n\t\t\techo \"<td>\" . $row['UserID_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['First_Name_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Last_Name_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Email_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Username_2'] . \"</td>\";\n\t\t} else {\n\t\t\techo \"<td>\" . $row['UserID_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['First_Name_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Last_Name_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Email_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Username_2'] . \"</td>\";\n\n\t\t\techo \"<td>\" . $row['UserID_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['First_Name_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Last_Name_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Email_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Username_1'] . \"</td>\";\n\t\t}\n\n\n\t\techo \"</tr>\";\n\t}\n\n\n\techo \"</tbody>\";\n\techo \"</table>\";\n\n}", "protected function overviewTableRow($conditions, $id, $entity, $additional_cols = array()) {\n $entity_uri = entity_uri($this->entityType, $entity);\n\n $row[] = array(\n 'data' => array(\n '#theme' => 'entity_ui_overview_item',\n '#label' => entity_label($this->entityType, $entity),\n '#name' => !empty($this->entityInfo['exportable']) ? entity_id($this->entityType, $entity) : FALSE,\n '#url' => $entity_uri ? $entity_uri : FALSE,\n '#entity_type' => $this->entityType,\n ),\n );\n\n // Add in any passed additional cols.\n foreach ($additional_cols as $col) {\n $row[] = $col;\n }\n\n // Add a row for the exportable status.\n if (!empty($this->entityInfo['exportable'])) {\n $row[] = array('data' => array(\n '#theme' => 'entity_status',\n '#status' => $entity->{$this->statusKey},\n ));\n }\n // In case this is a bundle, we add links to the field ui tabs.\n $field_ui = !empty($this->entityInfo['bundle of']) && entity_type_is_fieldable($this->entityInfo['bundle of']) && module_exists('field_ui');\n // For exportable entities we add an export link.\n $exportable = !empty($this->entityInfo['exportable']);\n // If i18n integration is enabled, add a link to the translate tab.\n $i18n = !empty($this->entityInfo['i18n controller class']);\n\n // Add operations depending on the status.\n if (entity_has_status($this->entityType, $entity, ENTITY_FIXED)) {\n $row[] = array(\n 'data' => l(t('clone'), $this->path . '/' . $id . '/clone'),\n 'colspan' => $this->operationCount(),\n );\n }\n else {\n $row[] = l(t('edit'), $this->path . '/' . $id);\n\n if ($field_ui) {\n $row[] = l(t('manage fields'), $this->path . '/' . $id . '/fields');\n $row[] = l(t('manage display'), $this->path . '/' . $id . '/display');\n }\n if ($i18n) {\n $row[] = l(t('translate'), $this->path . '/' . $id . '/translate');\n }\n if ($exportable) {\n $row[] = l(t('clone'), $this->path . '/' . $id . '/clone');\n }\n\n if (empty($this->entityInfo['exportable']) || !entity_has_status($this->entityType, $entity, ENTITY_IN_CODE)) {\n $row[] = l(t('delete'), $this->path . '/' . $id . '/delete', array('query' => drupal_get_destination()));\n }\n elseif (entity_has_status($this->entityType, $entity, ENTITY_OVERRIDDEN)) {\n $row[] = l(t('revert'), $this->path . '/' . $id . '/revert', array('query' => drupal_get_destination()));\n }\n else {\n $row[] = '';\n }\n }\n if ($exportable) {\n $row[] = l(t('export'), $this->path . '/' . $id . '/export');\n }\n return $row;\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 display_table($sql, $tid) {\n \n $userdb = userConnect();\n \n try {\n //code to print column headings\n $stmt = $userdb->query($sql . ' LIMIT 1');\n $fields = array_keys($stmt->fetch(PDO::FETCH_ASSOC));\n echo '<table id=\"' . $tid . '\" class=\"recordset\">';\n echo '<thead>';\n echo '<tr id=\"header\">';\n echo '<td></td>'; //empty cell for checkbox column\n for ($i = 1; $i < count($fields); $i++) {\n echo '<td>' . $fields[$i] . '</td>';\n }\n echo '</tr>';\n echo '</thead>';\n $stmt = null;\n \n //code to print records\n $stmt = $userdb->query($sql);\n echo '<tbody>';\n while ($record = $stmt->fetch(PDO::FETCH_NUM)) {\n $rowcount++;\n if ($rowcount % 2 == 0) {\n echo '<tr id=\"' . $record[0] .'\" class=\"altrow\">';\n } else {\n echo '<tr id=\"' . $record[0] .'\">';\n }\n echo '<td><input type=\"checkbox\" class=\"recordselect\" id=\"' . $record[0] . '\"/></td>';\n for ($i = 1; $i < count($record); $i++) {\n echo '<td>' . $record[$i] . '</td>';\n }\n echo '</tr>';\n }\n echo '</tbody>'; \n echo '</table>';\n } catch(PDOException $e) {\n echo $e->getMessage();\n die();\n }\n }", "function display_rows(){\n\n\t\t//Get the records registered in the prepare_items method\n\t\t$records = $this->items;\n\n\t\t//Get the columns registered in the get_columns and get_sortable_columns methods\n\t\tlist( $columns ) = $this->get_column_info();\n\n\t\t//Loop for each record\n\t\tif( ! empty( $records ) ){\n\n\t\t\tforeach( $records as $rec ){\n\n\t\t\t\t$position = ( $rec->post_order ) ? $rec->post_order : 0;\n\t\t\t\t$id = ( $rec->ID ) ? $rec->ID : 'N/A';\n\t\t\t\t$title = ( $rec->post_title ) ? $rec->post_title : 'N/A';\n\t\t\t\t$author = ( $rec->post_author ) ? $rec->post_author : 'N/A';\n\t\t\t\t$date = ( $rec->post_date ) ? $rec->post_date : 'N/A';\n\n\t\t\t\t//Open the line\n\t\t\t\techo '<tr id=\"record_' . $id . '\" class=\"draggable-tr\" data-order=\"' . $position . '\" data-post-id=\"' . $id . '\" draggable=\"true\">';\n\t\t\t\tforeach( $columns as $column_name => $column_display_name ){\n\n\n\t\t\t\t\t//Style attributes for each col\n\t\t\t\t\t$class = \"class='$column_name column-$column_name'\";\n\t\t\t\t\t$style = \"\";\n\t\t\t\t\tif( in_array( $column_name ) ){\n\t\t\t\t\t\t$style = ' style=\"display:none;\"';\n\t\t\t\t\t}\n\t\t\t\t\t$attributes = $class . $style;\n\n\n\t\t\t\t\t//Display the cell\n\t\t\t\t\tswitch( $column_name ){\n\t\t\t\t\t\tcase \"post_order\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $position ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_title\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $title ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_author\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( get_the_author_meta( 'nicename', $author ) ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_date\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . $date . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $id ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t}", "function print_action($query) {\n\n $conn = sql_connect();\n\n $res = mysqli_query($conn, $query) or die(mysqli_error($conn));\n\n echo \"<table>\";\n echo \"<tr><th> Action ID </th>\";\n echo \"<th> User ID </th>\";\n echo \"<th> User Type </th>\";\n echo \"<th> Action Type </th>\";\n echo \"<th> Record Modified </th>\";\n echo \"<th> Action Time </th></tr>\";\n\n while($action = mysqli_fetch_assoc($res)) {\n\n echo \"<tr><td>\".$action['Action_ID'].\"</td>\";\n echo \"<td>\".$action['User_ID'].\"</td>\";\n echo \"<td>\".$action['User_Type'].\"</td>\";\n echo \"<td>\".$action['Action_Type'].\"</td>\";\n echo \"<td>\".$action['Record_Modified_ID'].\"</td>\";\n echo \"<td>\".$action['Action_Time'].\"</td></tr>\";\n\n }\n echo \"</table>\";\n \n }", "function display_rows() {\n\n //Récuperation des quotes\n $records = $this->items;\n\n //Récuperation des colonnes\n list( $columns, $hidden ) = $this->get_column_info();\n if(!empty($records)){\n //pour chaque quote\n foreach($records as $rec){\n\n echo '<tr id=\"record_'.$rec->id.'\">';\n foreach ( $columns as $column_name => $column_display_name ) {\n\n $class = \"class='$column_name column-$column_name'\";\n $style = \"\";\n if ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n $attributes = $class . $style;\n\n $editlink = '/wp-admin/link.php?action=edit&id='.(int)$rec->id;\n\n switch ( $column_name ) {\n case \"col_id\":\techo '<td '.$attributes.'>'.stripslashes($rec->id).'</td>';\tbreak;\n case \"col_author\": echo '<td '.$attributes.'>'.stripslashes($rec->author).'</td>'; break;\n case \"col_quote\": echo '<td '.$attributes.'>'.stripslashes($rec->quote).'</td>'; break;\n case \"col_action\": echo '<td '.$attributes.'><a class=\"button\" style=\"margin-right:10px;\" href=\"admin.php?page=add_funny_quotes&quote='.stripslashes($rec->id).'&action=edit\">Editer</a><a class=\"button\" onclick=\"return confirm(\\'Etes-vous sur de vouloir supprimer la quote ?\\')\" href=\"admin.php?page=add_funny_quotes&quote='.stripslashes($rec->id).'&action=delete\">Supprimer</a></td>'; break;\n }\n\n }\n\n echo'</tr>';\n\n }\n }\n }", "public function display_rows() {\n\n\t\t// Get the records registered in the prepare_items method\n\t\t$records = $this->items;\n\n\t\t// Get the columns registered in the get_columns and get_sortable_columns methods\n\t\tlist( $columns, $hidden ) = $this->get_column_info();\n\n\t\t// Loop for each record\n\t\tif ( ! empty( $records ) ) {\n\t\t\tforeach ( $records as $rec ) {\n\n\t\t\t\t// Open the line\n\t\t\t\techo '<tr id=\"record_' . $rec->ID . '\">';\n\t\t\t\tforeach ( $columns as $column_name => $column_display_name ) {\n\n\t\t\t\t\t// Style attributes for each col\n\t\t\t\t\t$class = \"class='$column_name column-$column_name'\";\n\t\t\t\t\t$style = '';\n\t\t\t\t\tif ( in_array( $column_name, $hidden ) ) {\n\t\t\t\t\t\t$style = ' style=\"display:none;\"';\n\t\t\t\t\t}\n\t\t\t\t\t$attributes = $class . $style;\n\n\t\t\t\t\tswitch ( $column_name ) {\n\t\t\t\t\t\tcase 'title':\n\t\t\t\t\t\t\t$edit_link = admin_url( 'admin.php?page=wo_edit_client&id=' . $rec->ID );\n\t\t\t\t\t\t\techo '<td ' . $attributes . '><strong><a href=\"' . $edit_link . '\" title=\"Edit\">' . stripslashes( $rec->post_title ) . '</a></strong>\n\t\t\t\t\t\t<div class=\"row-actions\">\n\t\t\t\t\t\t<span class=\"edit\"><a href=\"' . $edit_link . '\" title=\"' . __( 'Edit Client', 'wp-oauth' ) . '\">' . __( 'Edit', 'wp-oauth' ) . '</a> | </span>\n\t\t\t\t\t\t<span class=\"trash\"><a class=\"submitdelete\" title=\"' . __( 'delete this client', 'wp-oauth' ) . '\" onclick=\"wo_remove_client(\\'' . $rec->ID . '\\');\" href=\"#\">' . __( 'Delete', 'wp-oauth' ) . '</a> </span>';\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// case \"user_id\": echo '<td '.$attributes.'>'.stripslashes($rec->user_id).'</td>'; break;\n\t\t\t\t\t\tcase 'client_id':\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . get_post_meta( $rec->ID, 'client_id', true ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Close the line\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t}\n\t}", "function printRecords ($show_edits = 1) {\n print \"<table border='1' width='90%'>\";\n foreach ($this->ids as $i) {\n print \"<tr><td>\";\n $this->link[$i]->printHTML($show_edits);\n print \"</td>\";\n print \"<td><p><a href='delete.php?id=$i'>Delete</a></p>\";\n print \"<p><a href='modify.php?id=$i'>Modify</a></p></td></tr>\";\n }\n print \"</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 }", "public function setHeader() {\n $dt = date('j M, Y');\n $name_header = '';\n $ao = new Application_Model_DbTable_AuditOwner();\n if ($this->usertype != '') {\n $name_header = \"&nbsp {$this->userfullname}\";\n }\n $complete_user = array('ADMIN','USER','APPROVER');\n $complete_audit = '';\n $audit_id = $this->audit['audit_id'];\n logit(\"audit: \" . print_r($this->audit, true));\n $complete_audit .= <<<\"END\"\n<li class=\"divider\"></li>\n<li class=\"tri\"><span style=\"color:black;padding-left: 15px;\"> With Selected Audit:</span></li>\nEND;\n\n # incomplete and owned audit OR not incomplete audit can be viewed\n if (($this->audit['status'] == 'INCOMPLETE' && $this->audit['owner']) || $this->audit['status'] != 'INCOMPLETE') {\n $complete_audit .= <<<\"END\"\n<!li class=\"divider\"></li-->\n<li><a href=\"{$this->baseurl}/audit/view\"><span title=\".icon .icon-color .icon-book \" class=\"icon icon-color icon-book\"></span> View Audit</a></li>\nEND;\n }\n # only incomplete and owned audit can be edited\n if ($this->audit['status'] == 'INCOMPLETE' && $this->audit['owner']) {\n $complete_audit .= <<<\"END\"\n<!--li class=\"divider\"></li-->\n<li><a href=\"{$this->baseurl}/audit/edit/\"><span title=\".icon .icon-color .icon-edit \" class=\"icon icon-color icon-edit\"></span> Edit Audit</a></li>\nEND;\n }\n if (in_array($this->usertype, $complete_user)) {\n $complete_audit .= <<<\"END\"\n<!--li class=\"divider\"></li-->\n<li><a href=\"{$this->baseurl}/audit/exportdata\"><span title=\".icon .icon-color .icon-extlink \" class=\"icon icon-color icon-extlink\"></span> Export Audit Data</a></li>\nEND;\n if ($this->audit['owner']) {\n # $ao->isOwned($audit_id, $this->userid)) {\n $complete_audit .= <<<\"END\"\n<li><a href=\"{$this->baseurl}/audit/delete\"\n onclick=\" return confirm('Do you want to delete Selected Audit?');\">\n <span title=\".icon .icon-color .icon-trash \" class=\"icon icon-color icon-trash\"></span>\n Delete Audit</a></li>\nEND;\n }\n $complete_audit .= <<<\"END\"\n<li class=\"divider\"></li>\n<li class=\"tri\"><span style=\"color:black;padding-left: 15px;\"> Change Audit State:</span></li>\nEND;\n if ($this->audit['status'] == 'INCOMPLETE' && $ao->isOwned($audit_id, $this->userid)) {\n $complete_audit .= <<<\"END\"\n<li><a href=\"{$this->baseurl}/audit/complete\">\n<span title=\".icon .icon-color .icon-locked \" class=\"icon icon-color icon-locked\"></span> Mark Audit Complete</a></li>\nEND;\n }\n if ($this->audit['status'] == 'COMPLETE' && $ao->isOwned($audit_id, $this->userid)) {\n $complete_audit .= <<<\"END\"\n<li><a href=\"{$this->baseurl}/audit/incomplete\">\n<span title=\".icon .icon-color .icon-unlocked \" class=\"icon icon-color icon-unlocked\"></span> Mark Audit Incomplete</a></li>\nEND;\n }\n if ($this->audit['status'] == 'COMPLETE' && $this->usertype == 'APPROVER') {\n $complete_audit .= <<<\"END\"\n<li><a href=\"{$this->baseurl}/audit/finalize\"\nonclick=\" return confirm('Do you want to finalize Audit (#{$this->audit['audit_id']}-{$this->audit['tag']})?');\"><span title=\".icon .icon-color .icon-sent \" class=\"icon icon-color icon-sent\"></span> Mark Audit Finalized</a></li>\n<li><a href=\"{$this->baseurl}/audit/reject\"\n onclick=\" return confirm('Do you want to reject Audit (#{$this->audit['audit_id']}-{$this->audit['tag']})?');\"><span title=\".icon .icon-color .icon-cross \" class=\"icon icon-color icon-cross\"></span> Mark Audit Rejected</a></li>\nEND;\n }\n }\n $this->header = <<<\"END\"\n<div class=\"navbar\">\n <div class=\"navbar-inner\">\n <div class=\"container-fluid\">\n <a class=\"brand\" href=\"{$this->baseurl}{$this->mainpage}\">\n <span title=\".icon .icon-black .icon-check \" class=\"icon icon-black icon-check\"></span> <span>eChecklist</span>\n </a>\nEND;\n $newuser = '';\n if ($this->usertype != '') {\n if ($this->usertype == 'ADMIN') {\n $newuser = <<<\"END\"\n<li><a href=\"{$this->baseurl}/user/create\">\n<span title=\".icon .icon-green .icon-user \" class=\"icon icon-green icon-user\"></span> New User</a></li>\nEND;\n }\n\n $this->header = $this->header . <<<\"END\"\n<div class=\"btn-group pull-left\" style=\"margin-left:100px;\">\n<a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">\n <span title=\".icon .icon-blue .icon-clipboard \" class=\"icon icon-blue icon-clipboard\"></span>\n <span class=\"hidden-phone\">Audit</span>\n <span class=\"caret\"></span></a>\n<ul class=\"dropdown-menu\">\nEND;\n if (in_array($this->usertype, $complete_user)) {\n $this->header .= <<<\"END\"\n <li><a href=\"{$this->baseurl}/audit/create\"><span title=\".icon .icon-green .icon-clipboard \" class=\"icon icon-green icon-clipboard\"></span> New Audit</a></li>\nEND;\n }\n $this->header .= <<<\"END\"\n <li><a href=\"{$this->baseurl}/audit/search\"><span title=\".icon .icon-blue .icon-search \" class=\"icon icon-blue icon-search\"></span> Search for Audit</a></li>\n{$complete_audit}\n <li class=\"divider\"></li>\n <li><a href=\"{$this->baseurl}/audit/runreports\"><span title=\".icon .icon-color .icon-newwin \" class=\"icon icon-color icon-newwin\"></span> Run Reports</a></li>\nEND;\n\n if (in_array($this->usertype, $complete_user)) {\n $this->header .= <<<\"END\"\n <li class=\"divider\"></li>\n <li><a href=\"{$this->baseurl}/audit/import\"><span title=\".icon .icon-blue .icon-import \" class=\"icon icon-blue icon-archive\"></span> Import Audit</a></li>\nEND;\n }\n $this->header .= <<<\"END\"\n</ul>\n</div>\n\n<div class=\"btn-group pull-left\">\n<a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">\n <span title=\".icon .icon-blue .icon-tag \" class=\"icon icon-blue icon-tag\"></span>\n <span class=\"hidden-phone\">Lab</span>\n <span class=\"caret\"></span></a>\n<ul class=\"dropdown-menu\">\n <li><a href=\"{$this->baseurl}/lab/create\"><span title=\".icon .icon-green .icon-tag \" class=\"icon icon-green icon-tag\"></span> New Lab</a></li>\n <li><a href=\"{$this->baseurl}/lab/select\"><span title=\".icon .icon-blue .icon-search \" class=\"icon icon-blue icon-search\"></span> Select a Lab</a></li>\n <li class=\"divider\"></li>\n <li><a href=\"{$this->baseurl}/lab/edit\"><span title=\".icon .icon-blue .icon-search \" class=\"icon icon-blue icon-search\"></span> Edit Selected Lab</a></li>\n</ul>\n</div>\n\n<div class=\"btn-group pull-left\">\n<a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">\n<span title=\".icon .icon-blue .icon-user \" class=\"icon icon-blue icon-user\"></span>\n<span class=\"hidden-phone\">User</span>\n<span class=\"caret\"></span></a>\n<ul class=\"dropdown-menu\">\n {$newuser}\n <li><a href=\"{$this->baseurl}/user/find\"><span title=\".icon .icon-blue .icon-search \" class=\"icon icon-blue icon-search\"></span>Find User</a></li>\n</ul>\n</div>\n\n<!--div class=\"btn-group pull-left\">\n<a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">\n<span title=\".icon .icon-blue .icon-flag \" class=\"icon icon-blue icon-flag\"></span>\n<span class=\"hidden-phone\">Language</span>\n<span class=\"caret\"></span></a>\n<ul class=\"dropdown-menu\">\n <li><a href=\"{$this->baseurl}/language/switch/EN\"><span title=\".icon .icon-green .icon-flag \" class=\"icon icon-green icon-flag\"></span> English</a></li>\n <li><a href=\"{$this->baseurl}/language/switch/FR\"><span title=\".icon .icon-green .icon-flag \" class=\"icon icon-green icon-flag\"></span> French</a></li>\n <li><a href=\"{$this->baseurl}/language/switch/VI\"><span title=\".icon .icon-green .icon-flag \" class=\"icon icon-green icon-flag\"></span> Vietnamese</a></li>\n</ul>\n</div-->\n\n<!-- user dropdown starts -->\n<div class=\"btn-group pull-right\">\n <a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">\n <span title=\".icon .icon-orange .icon-user \" class=\"icon icon-orange icon-user\"></span>\n <span class=\"hidden-phone\"> {$name_header}</span>\n\t<span class=\"caret\"></span>\n </a>\n <ul class=\"dropdown-menu\">\n <li><a href=\"{$this->baseurl}/user/profile\"><span title=\".icon .icon-blue .icon-contacts \" class=\"icon icon-blue icon-contacts\"></span> Profile</a></li>\n <li><a href=\"{$this->baseurl}/user/changepw\"><span title=\".icon .icon-blue .icon-contacts \" class=\"icon icon-blue icon-contacts\"></span> Change Password</a></li>\n <li class=\"divider\"></li>\n\t<li><a href=\"{$this->baseurl}/user/logout\">Logout</a></li>\n </ul>\n</div>\n<!-- user dropdown ends -->\nEND;\n $auditinfo = '';\n //if ($this->dialog_name == 'audit/edit') {\n $auditinfo = \"<div style=\\\"margin:6px 0 6px 20px;padding-right:5px;\\\">Selected Audit: {$this->showaudit}</div>\";\n //}\n $this->header .= <<<\"END\"\n<div style=\"display:inline-block;\">\n <div style=\"margin:6px 0px 6px 20px;padding-right:5px;\">Selected Lab: {$this->showlab}</div>\n {$auditinfo}\n <div style=\"clear:both;\"></div></div>\nEND;\n } else {\n $this->header = $this->header . <<<\"END\"\n<div class=\"btn-group pull-left\" style=\"margin-left:100px;\">\n<a class=\"btn\" href=\"{$this->baseurl}/user/login\"><span title=\".icon .icon-blue .icon-contacts \" class=\"icon icon-blue icon-contacts\"></span> Login</a></div>\nEND;\n }\n $this->header = $this->header . <<<\"END\"\n </div>\n </div> <!-- style=\"clear:both;\"></div -->\n</div>\nEND;\n\n $this->view->header = $this->header;\n }", "public function renderTable()\n {\n $get = new GetBag();\n\n $type = $get->fetchEscape('type', $this->db);\n\n /**\n * Column order.\n */\n $order = $get->fetch('order');\n $order = $order[0]['column'];\n switch ($order) {\n case 0:\n $order = 'id';\n break;\n case 1:\n $order = 'date';\n break;\n default:\n $order = 'id';\n }\n\n $direction = $get->fetch('order');\n $direction = $direction[0]['dir'];\n\n /**\n * Total.\n */\n $total = 0;\n $queryTotal = \"SELECT COUNT(*) as `count` FROM `film_review` WHERE `status` = '{$type}'\";\n $result = $this->db->query($queryTotal);\n if ($row = $result->fetch_assoc()) {\n $total = $row['count'];\n }\n\n /**\n * Page offset.\n */\n $length = $get->fetchInt('length');\n $offset = $get->fetchInt('start');\n\n $order = $this->db->real_escape_string($order);\n $direction = $this->db->real_escape_string($direction);\n\n $query = \"SELECT t1.`id`, t1.`status`, t1.`filmId`, t1.`userId`, t1.`name`, t1.`text`, t1.`date`, t2.`login` \n FROM `film_review` as `t1` LEFT JOIN `user` as `t2` ON t1.`userId` = t2.`id` WHERE t1.`status` = '{$type}'\";\n $query .= \" ORDER BY t1.`{$order}` {$direction} LIMIT {$offset}, {$length}\";\n\n $data = [];\n $result = $this->db->query($query);\n while ($row = $result->fetch_assoc()) {\n $login = $row['login'];\n if (empty($login)) {\n $login = $row['name'];\n }\n \n $item[0] = $row['id'];\n $item[1] = $this->formatDate($row['date'], true);\n $item[2] = $row['userId'];\n $item[3] = $row['text'];\n $item[4] = $row['filmId'];\n $item[5] = $login;\n\n $data[] = $item;\n }\n\n $data = [\n 'draw' => $get->fetchInt('draw'),\n 'recordsTotal' => $total,\n 'recordsFiltered' => $total,\n 'data' => $data\n ];\n\n return json_encode($data);\n }", "function printResult($result) {\n echo \"<br>Employee Info<br>\";\n echo \"<table class='table table-striped'>\";\n echo \"<tr><th>Username</th>\". \" \" .\"<th>Wage</th>\". \" \" .\"<th>Job Type</th>\". \" \" .\"<th>Work Schedule</th></tr>\";\n\n while ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n echo \"<tr><td>\" . $row[\"USERNAME\"] . \" </td><td>\" . $row[\"WAGE\"] . \" </td><td>\" . $row[\"JOBT\"] . \"</td><td>\"\n . \" \" . $row[\"WORKS\"] . \"</td></tr>\"; //or just use \"echo $row[0]\" \n }\n echo \"</table>\";\n }", "protected function table()\n {\n return $this->getTable('loginLog')\n ->header([\n HeaderItem::label()->selection(),\n HeaderItem::label('登陆用户')->prop('login_name'),\n HeaderItem::label('登陆IP')->prop('login_ip'),\n HeaderItem::label('客户端')->prop('browser'),\n HeaderItem::label('系统')->prop('os'),\n HeaderItem::label('登陆状态')->prop('status')->component('status'),\n HeaderItem::label('登陆时间')->prop('login_at')->component('loginAt'),\n ])\n ->withApiRoute('log/login')\n ->withSearch([\n Search::startAt(),\n Search::label('结束时间')->endAt()\n ])\n ->selectionChange()\n ->render();\n\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}", "public function showAthletesTable(){\r\n\t\t//fait le query voulu\r\n\t\t$stmt = $this->connect()->query(\"SELECT * FROM athletes\");\r\n\t\t//creer la table avec les tuples\r\n\t\techo \"<h3>Athletes Table</h3>\";\r\n\t\techo \"<table><tr><td>\" . \"id\" . \"</td><td>\" . \"name\" . \"</td><td>\" . \"identified_gender\" . \"</td><td>\" . \"email\" . \"</td><td>\" . \"date_of_birth\" . \"</td></tr>\";\r\n\t\twhile ($row = $stmt->fetch()) {\r\n\t\t\techo \"<tr><td>\" . $row['id'] . \"</td><td>\" . $row['name'] . \"</td><td>\" . $row['identified_gender'] . \"</td><td>\" . $row['email'] . \"</td><td>\" . $row['date_of_birth'] . \"</td></tr>\"; \r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}", "protected function RenderTable()\n {\n if ($this->m_QueryONRender)\n if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule))\n return $this->ProcessDataObjError($ok);\n\n $records = array();\n $records[] = $this->m_RecordRow->RenderColumn();\n $counter = 0;\n while (true) {\n if ($this->m_Range != null && $this->m_Range > 0 && $counter > $this->m_Range)\n break;\n if ($this->CanShowData())\n $arr = $resultRecords[$counter];\n if (!$arr)\n break;\n $this->m_RecordRow->SetRecordArr($arr);\n $tblRow = $this->m_RecordRow->Render();\n $records[] = $tblRow;\n $counter++;\n }\n return $records;\n }", "public function ViewResultsAsTable($crud = false) {\n \n //get an array containing the keys from the first object of the result set (turned into an array)\n $keys = array_keys(get_object_vars($this->rs[0]));\n \n //set up the table\n $string = \"<table class='table table-striped'>\";\n \n //loop through the keys array to set up the column headings for the table\n foreach($keys as $head) {\n \n //insert the heading\n $string .= \"<td class='heading'>$head</td>\";\n }\n \n //if we are outputting the table for use in the crud interface\n if ($crud == true) {\n \n //add in the column headings for the update and delete columns\n $string .= \"<td class='heading'>Modify</td>\";\n $string .= \"<td class='heading'>Remove</td>\";\n }\n \n //loop through the result set array of objects\n foreach($this->rs as $row) {\n \n //save the object members into an array\n $vars = get_object_vars($row);\n \n //set up a row\n $string .= \"<tr>\";\n \n //loop through each object, as an array\n foreach ($vars as $item) {\n \n //output the cell value into the table\n $string .= \"<td>\" . $item . \"</td>\";\n }\n \n //if we are outputting this table for use in the crud interface\n if ($crud == true) {\n \n //add in the update and delete columns at the end of the row\n $string .= \"<td><a href='guitar_shop_crud.php/?action=Updating&cust=$vars[customerID]' class='btn btn-primary'>Update</a></td>\";\n $string .= \"<td><a href='guitar_shop_crud.php/?action=Deleting&cust=$vars[customerID]' class='btn btn-danger'>Delete</a></td>\";\n \n }\n \n //close the row\n $string .= \"</tr>\";\n }\n \n //close the table\n $string .= \"</table>\";\n \n //return the string containing the html table\n return $string;\n }", "function show($dbname=null, $type=null){\n $this->bind_arg('dbname', $dbname);\n $this->try_bind_arg(\"type\", $type);\n //\n //Execute this sql \n $array= $this->get_sql_data($this->dbname);\n //\n //Ouptut a table\n echo \"<table id='fields' name='{$this->entity->name}'>\";\n echo '<thead>';\n echo $this->header();\n echo '</thead>';\n echo '<tbody id=\"table-body\">';\n //\n //Loop through the array and display each row as a tr element\n foreach ($array as $row) {\n $id= \"{$this->entity->name}\";\n //\n echo \"<tr onclick='record.select(this)' id='$id'>\";\n //\n //loop through the column and out puts its td element.\n foreach ($this->entity->columns as $col){\n //\n //Get the value from the row, remebering that the row is indexed\n //by column name\n $value = $row[$col->name];\n //\n //\n echo $col->show($value);\n }\n //\n echo \"</tr>\";\n }\n \n echo \"</tbody>\";\n echo \"</table>\";\n \n \n }", "protected function outputTableAfterEdit()\n {\n $output = '';\n if (is_array($this->get['where']) && isset($this->get['where']['id']) && $this->get['where']['id']) {\n //existing record\n switch ($this->get['table']) {\n case TAB_PREFIX . 'category':\n // Display related products and content elements labeled by either name\n // or content fragment (up to 100 characters)\n // TODO link content elements to category\n foreach (\n [\n // 'content', // uncomment if some content table rows would be linked to a category\n 'product'\n ] as $i\n ) {\n Assert::scalar($this->get['where']['id']);\n if (\n $tmp = $this->MyCMS->fetchAndReindex(\n 'SELECT id,IF(name_' . $_SESSION['language'] . ' NOT LIKE \"\",name_'\n . $_SESSION['language'] . ', content_' . $_SESSION['language'] . ')'\n . ' FROM `' . TAB_PREFIX . $i . '` WHERE category_id=' . (int) $this->get['where']['id']\n )\n ) {\n $output .= '<hr /><details><summary>' .\n // uncomment 'content' cond. if some content table rows would be linked to a category\n $this->tableAdmin->translate(\n //$i == 'content' ? 'Content linked to this category' :\n 'Products linked to this category'\n )\n . ' <span class=\"badge badge-secondary\">' . count($tmp) . '</span></summary>';\n foreach ($tmp as $key => $value) {\n Assert::nullOrString($value);\n if (empty($value)) { // covers both null and ''\n // if the product or content piece doesn't have a label in admin language\n $value = $this->tableAdmin->translate('Name not set');\n }\n $output .= '<a href=\"?table=' . TAB_PREFIX . $i . '&amp;where[id]=' . $key\n . '\" target=\"_blank\" title=\"'\n . $this->tableAdmin->translate('Link will open in a new window') . '\">'\n . '<i class=\"fas fa-external-link-alt\"></i></a> '\n . substr(Tools::h(strip_tags($value)), 0, 100) . '<br />' . PHP_EOL;\n }\n $output .= '</details>';\n }\n }\n break;\n// case TAB_PREFIX . 'product':\n// // Display related content elements labeled by either name or content fragmet (up to 100 chars)\n// // TODO link content elements to products - otherwise it fails because of `WHERE product_id=`\n// $output .= '<hr /><details class=\"product-linked-content\"><summary>' .\n// $this->tableAdmin->translate('Content linked to this product') .\n// ' <span class=\"badge badge-secondary\">';\n// if ($tmp = $this->MyCMS->fetchAndReindex('SELECT id,name_' . $_SESSION['language'] .\n// ' AS name,content_' . $_SESSION['language'] . ' AS content'\n// . ' FROM `' . TAB_PREFIX . 'content` WHERE product_id=' . (int) $this->get['where']['id'])) {\n// $output .= count($tmp) . '</span></summary>';\n// foreach ($tmp as $key => $row) {\n// $output .= '<a href=\"?table=' . TAB_PREFIX . 'content&amp;where[id]=' . $key\n// . '\" target=\"_blank\" title=\"'\n// . $this->tableAdmin->translate('Link will open in a new window') . '\">'\n// . '<i class=\"fas fa-external-link-alt\"></i> '\n// . Tools::h(mb_substr(strip_tags($row['content']), 0, 100)) . ' '\n// . Tools::h(mb_substr(strip_tags($row['description']), 0, 100))\n// . '…</a><br />' . PHP_EOL;\n// }\n// } else {\n// $output .= '0</span></summary>';\n// }\n// $output .= '<footer>';\n// foreach (['testimonial', 'claim', 'perex'] as $i) {\n// $output .= '<a href=\"?table=' . TAB_PREFIX . 'content&amp;where[]=&amp;prefill[type]=' . $i\n// . '&amp;prefill[product_id]=' . Tools::ifnull($this->get['where']['id'], '') . '\" '\n// . 'title=\"' . $this->tableAdmin->translate('New row')\n// . ' (' . $this->tableAdmin->translate('Link will open in a new window') . ')\" '\n// . 'target=\"_blank\"><i class=\"far fa-plus-square\"></i>'\n// . ' <i class=\"fas fa-external-link-alt\"></i> ' . $i . '</a>';\n// }\n// $output .= '</footer></details>';\n// break;\n }\n }\n return $output;\n }", "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}", "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 print_show_table($queryBuilderArray = \"__\"){\n // add title of the table \n $this->add_title();\n // set the defult query bilder array\n if($queryBuilderArray==\"__\"){\n\n $arr = DB::table( $this->get_tbl_name() )->get();\n } else {\n // set array if user set\n $arr = $queryBuilderArray ;\n }\n\n if (empty($arr)) {\n\n $no_data = config::get('no_data');\n $title = $this->show_title;\n\n mhtml::h3(\"$no_data\");\n return 0;\n }\n\n $show_key_arr = array_keys($this->show);\n\n $show_one= $this->option_global['show_one']; \n $edit= $this->option_global['edit']; \n $delete= $this->option_global['delete']; \n\n \n\n $table_class= \"pure-table\";\n\n \n\n mhtml::startTable($table_class);\n mhtml::startTr();\n\n // mhtml::dump($arr[0]['creator']);\n\n // print table header\n // var show_key_arr defiened befor it is the $this->show keys only ! if is used in this coad\n foreach ($this->show as $key => $value) { \n\n mhtml::th($this->virtual_names[$value]);\n \n }\n\n // mhtml::th($arr[0][$key]);\n\n\n if($show_one){ mhtml::th($this->virtual_global['show_one']); }\n if($edit){ mhtml::th($this->virtual_global['edit']); }\n if($delete){ mhtml::th($this->virtual_global['delete']); }\n\n mhtml::endTr();\n\n\n // print table rows\n $currentId = null; \n\n foreach ($arr as $arrKey => $arrValue) { \n mhtml::startTr();\n // main td form database (resources)\n foreach ($this->show as $showKey => $showValue) {\n\n mhtml::th( $arrValue[$showValue] );\n\n }\n // aditionl td\n $currentId = $arrValue['id'];\n $model = $this->get_tbl_name() ;\n $virtual_show_one = $this->virtual_global['show_one'];\n $virtual_edit = $this->virtual_global['edit'];\n $virtual_delete = $this->virtual_global['delete'];\n if($show_one){ mhtml::th(\"<a href='show_one.php?model=$model&id=$currentId'>$virtual_show_one</a>\"); }\n if($edit){ mhtml::th(\"<a href='edit.php?model=$model&id=$currentId'>$virtual_edit</a>\"); }\n if($delete){ mhtml::th(\"<a href='delete.php?model=$model&id=$currentId'>$virtual_delete</a>\"); }\n\n mhtml::endTr();\n \n }\n\n\n\n mhtml::endTable();\n\n}", "function elastic_email_activity_log_table($form, &$form_state) {\n $output = '';\n\n $status = $form_state['input']['status'];\n $channel = $form_state['input']['channel'];\n $from_date_field = $form_state['input']['date_from'];\n $to_date_field = $form_state['input']['date_to'];\n\n $from_date = _elastic_email_format_date($from_date_field);\n $to_date = _elastic_email_format_date($to_date_field);\n\n try {\n $activity_log = ElasticEmailApiActivityLog::getInstance();\n $activity_log->setParams($status, $channel, $from_date, $to_date);\n $data = $activity_log->makeRequest(FALSE);\n }\n catch (ElasticEmailException $e) {\n drupal_set_message($e->getMessage(), 'error');\n return array();\n }\n\n if (count($data) < 1) {\n $data[] = array(\n array(\n 'data' => 'No records available.',\n 'colspan' => 5,\n )\n );\n }\n\n $activity_list = array();\n foreach ($data as $row) {\n // Remove message, bounce cat., msg-id, trans-id.\n unset($row[4], $row[5], $row[6], $row[7]);\n $activity_list[] = $row;\n }\n\n $table_data['header'] = array(\n 'to',\n 'status',\n 'channel',\n 'date',\n /*'message',\n 'bounce cat.',\n 'msg-id',\n 'trans-id',*/\n 'subject'\n );\n $table_data['rows'] = $activity_list;\n\n $output .= theme('table', $table_data);\n\n $element = $form['results']['wrapper'];\n $element['#markup'] = $output;\n return $element;\n}", "public function displayTable(array $rows): void\n {\n $table = new Table(new ConsoleOutput());\n $table\n ->setHeaders(array_keys($rows[0]))\n ->setRows($rows)\n ;\n $table->render();\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 PopulateIncidentTable($values) {\n echo \"<tr>\";\n foreach ($values as $value) {\n echo \"<td>$value</td>\";\n }\n echo \"</tr>\";\n}", "public function dispalyEventsTable(){\n $sql=\"SELECT * FROM `events` ORDER BY `event_date` asc\";\n $result=$this->conn->query($sql);\n $rows=array();\n\n if($result->num_rows>0){\n while($displayEvent=$result->fetch_assoc()){\n $rows[]=$displayEvent;\n }\n return $rows;\n }else{\n return false;\n }\n\n }", "function createTableDisplay($STID){\n\n\n echo \"<table border='1'>\\n\";\n while ($row = oci_fetch_array($STID, OCI_ASSOC+OCI_RETURN_NULLS)) {\n echo \"<tr>\\n\";\n foreach ($row as $item) {\n echo \" <td>\" . ($item !== null ? htmlentities($item, ENT_QUOTES) : \"&nbsp;\") . \"</td>\\n\";\n }\n echo \"</tr>\\n\";\n }\n echo \"</table>\\n\";\n\n }", "public function rowsAction() {\n parent::rowsAction();\n }", "function get_iqa_result_manage_table($iqas, $controller){\n $CI = &get_instance();\n $controller_name = strtolower(get_class($CI));\n\n $table = '<table class=\"tablesorter table table-bordered table-hover\" id=\"sortable_table\">';\n $headers = array(\n '<input type=\"checkbox\" id=\"select_all\" />',\n lang('common_no'),\n lang('common_name'),\n lang('common_gender'),\n lang('iqa_evaluation_title'),\n lang('common_total'),\n lang('common_average'),\n lang('common_range'),\n lang('iqa_date_from'),\n lang('iqa_date_to'),\n ''\n );\n\n $table.='<thead><tr>';\n $count = 0;\n foreach ($headers as $header) {\n $count++;\n\n if ($count == 1) {\n $table.=\"<th class='leftmost'>$header</th>\";\n } elseif ($count == count($headers)) {\n $table.=\"<th class='rightmost'>$header</th>\";\n } else {\n $table.=\"<th>$header</th>\";\n }\n }\n\n $table.='</tr></thead><tbody>';\n $table.=get_iqa_result_manage_table_data_rows($iqas, $controller);\n $table.='</tbody></table>';\n return $table;\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 }", "protected function triggerTable()\n {\n // Get the columns and their configurable options.\n if (!$this->columns) {\n $this->columns = $this->getColumns();\n }\n\n // Ordering\n if (is_array($this->orderBy)) {\n foreach ($this->orderBy as $orderBy => $sort) {\n $this->model->orderBy($orderBy, $sort);\n }\n } else {\n $this->model->orderBy($this->orderBy, $this->sort);\n }\n\n // Get the entry data.\n if (!$this->entries) {\n $this->entries = $this->model->get();\n }\n\n // Finally prep the rows for the table.\n $this->rows = $this->getRows();\n\n $this->output = \\View::make('streams/entry/table', get_object_vars($this));\n\n return $this;\n }", "function rowClickedTable($id) { ?>\r\n <script type=\"text/javascript\">\r\n $(\"#resultsTable<?php echo $id;?>\").find('tr').click( function(){\r\n var table = document.getElementById(\"resultsTable<?php echo $id; ?>\");\r\n var alltr = table.querySelectorAll(\"tr\");\r\n var row = $(this).index()+1;\r\n\r\n var lenghtalltr = Object.keys(alltr).length;\r\n console.log(\"- \" + lenghtalltr + \"-\" + row + \" = \" + (lenghtalltr - row));\r\n // show all\r\n for (var i = 1; i < lenghtalltr; i++) { alltr[i].style.display = \"table-row\"; }\r\n // hide before click row\r\n for (var i = 1; i < row; i++) { alltr[i-1].style.display = \"none\"; }\r\n\r\n //document.getElementById(\"visiblelines<?php echo $id;?>\").innerHTML = \"&nbsp;&nbsp;Lines: \" + ((lenghtalltr+1) - row);\r\n });\r\n </script>\r\n <?php \r\n}", "function display_rows() {\n\n $settings = new Hypernews_Settings();\n \n\t//Get the records registered in the prepare_items method\n\t$records = $this->items;\n\n\t//Get the columns registered in the get_columns and get_sortable_columns methods\n\tlist( $columns, $hidden ) = $this->get_column_info();\n\n\t//Loop for each record\n\tif(!empty($records)){foreach($records as $rec){\n //Open the line\n echo '<tr id=\"record_'.$rec->id.'\">';\n foreach ( $columns as $column_name => $column_display_name ) \n {\n\n //Style attributes for each col\n $class = \"class='$column_name column-$column_name'\";\n $style = \"\";\n if ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n $attributes = $class . $style;\n\n //edit link\n $editlink = '/wp-admin/link.php?action=edit&link_id='.(int)$rec->link_id;\n\n //Display the cell\n switch ( $column_name ) {\n case \"cb\": \n $cb_class = \"hypernews_row_read\";\n if ($rec->status=='NEW'){\n $cb_class = \"hypernews_row_unread\";\n }\n echo sprintf(\n '<td><input type=\"checkbox\" class=\"hypernews_checkbox\" name=\"%1$s[]\" value=\"%2$s\" /></td>',\n /*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label (\"movie\")\n /*$2%s*/ $rec->id //The value of the checkbox should be the record's id\n );\n break;\n case \"id\": echo '<td '.$attributes.'>'.stripslashes($rec->id).'</td>';\tbreak;\n case \"title\": \n $actions = array(\n 'edit' => sprintf('<a href=\"#\" class=\"hypernews_edit_row\" row_id=\"%3$s\">'.__('Show', 'hypernews').'</a>',$_REQUEST['page'],'edit',$rec->id),\n 'unread' => sprintf('<a href=\"#\" class=\"hypernews_unread_row\" row_id=\"%3$s\">'.__('Unread', 'hypernews').'</a>',$_REQUEST['page'],'unread',$rec->id),\n 'star' => sprintf('<a href=\"#\" class=\"hypernews_star_row\" row_id=\"%3$s\">'.__('Favorite', 'hypernews').'</a>',$_REQUEST['page'],'star',$rec->id),\n 'hide' => sprintf('<a href=\"#\" class=\"hypernews_hide_row\" row_id=\"%3$s\">'.__('Hide', 'hypernews').'</a>',$_REQUEST['page'],'hide',$rec->id)\n );\n\n $title_class = \"hypernews_title_row\";\n if ($rec->status=='NEW'){\n $title_class = \"hypernews_title_unread\";\n }\n \n //Return the title contents\n echo sprintf('<td><a class=\"%7$s\" href=\"%6$s\" target=\"_new\">%1$s</a><br/><div class=\"hypernews_pre_row hypernews_row_pre_%4$s\"><i>%2$s</i></div><div class=\"hypernews_hidden_row hypernews_row_%4$s\">%5$s</div>%3$s</td>',\n /*$1%s*/ $rec->title,\n /*$2%s*/ substr(strip_tags($rec->description),0,150),\n /*$3%s*/ $this->row_actions($actions),\n $rec->id,\n strip_tags($rec->description),\n $rec->url,\n $title_class\n );\n\n //echo '<td '.$attributes.'><strong><a href=\"'.$editlink.'\" title=\"Edit\">'.stripslashes($rec->title).'</a></strong></td>'; \n break;\n case \"pubdate\": \t\n \n //Channels:\n $pb_result = \"\";\n $link = $settings->get_link($rec->link_id);\n $posttypes = $link['posttypes'];\n if (!is_array($posttypes)) $posttypes = array();\n foreach ($posttypes as $type)\n {\n $posttype_object = get_post_type_object($type);\n if ($pb_result!='')\n {\n $pb_result.='&nbsp;&nbsp;&nbsp;&nbsp;';\n }\n\n $pb_result.='<a href=\"#\" row_id=\"'.$rec->id.'\" posttype=\"'.$type.'\" class=\"hypernews_publish_row\" title=\"'.__('Add as draft to', 'hypernews').' '.$type.'\"><span class=\"hypernews_publish_add\">'.$posttype_object->label.'</a>';\n }\n echo sprintf('<td %3$s>%1$s<br/>'.$pb_result.'<div style=\"clear:both;\"></div></td>',\n stripslashes($rec->pubdate),\n $rec->id,\n $attributes\n );\n \n break;\n case \"channel\": echo '<td '.$attributes.'>'.stripslashes($rec->channel).'</td>';\tbreak;\n case \"source\": echo '<td '.$attributes.'>'.stripslashes($rec->source).'</td>';\tbreak;\n case \"status\":\n echo '<td '.$attributes.'>';\n if ($rec->status == 'NEW')\n {\n echo '<img id=\"hypernews_row_icon_'.$rec->id.'\" src=\"'.WP_PLUGIN_URL.'/hypernews/img/lightbulb.png\" />';\n }\n else if ($rec->status == 'READ')\n {\n echo '<img id=\"hypernews_row_icon_'.$rec->id.'\" src=\"'.WP_PLUGIN_URL.'/hypernews/img/lightbulb_off.png\" />';\n }\n else if ($rec->status == 'STAR')\n {\n echo '<img id=\"hypernews_row_icon_'.$rec->id.'\" src=\"'.WP_PLUGIN_URL.'/hypernews/img/star.png\" />';\n } \n else if ($rec->status == 'HIDE')\n {\n echo '<img id=\"hypernews_row_icon_'.$rec->id.'\" src=\"'.WP_PLUGIN_URL.'/hypernews/img/cross.png\" />';\n } \n else if ($rec->status == 'POST')\n {\n echo '<a href=\"'.get_bloginfo('url').'/wp-admin/post.php?post='.$rec->post.'&action=edit\" target=\"_blank\"><img id=\"hypernews_row_icon_'.$rec->id.'\" src=\"'.WP_PLUGIN_URL.'/hypernews/img/page_white_go.png\" /></a>';\n }\n else\n {\n echo stripslashes($rec->status);\n }\n echo '</td>';\t\n break;\n case \"notes\": \t\n \n echo sprintf('<td %3$s><div id=\"hypernews_row_notetext_%2$s\">%1$s</div><br/><div class=\"hypernews_hidden_row hypernews_row_%2$s\"><textarea id=\"hypernews_row_notearea_%2$s\">%1$s</textarea><br/><input type=\"button\" value=\"'.__('Update', 'hypernews').'\" row_id=\"%2$s\" class=\"hypernews_row_note button-primary\" /></div></td>',\n stripslashes($rec->notes),\n $rec->id,\n $attributes\n );\n break;\n }\n }\n\n //Close the line\n echo'</tr>';\n }\n }\n }", "public function getTableContent() {\n\t\treturn \"<tr data-key='\" . $this -> getKey() . \"'><td>\" . $this -> key . \"</td><td contenteditable='true'>\" . $this -> value . \"</td><td>\" . $this -> dataType . \"</td></tr>\";\n\t}", "public function viewAction()\n {\n $id = $this->_getPrimaryId();\n $row = $this->_getRow($id);\n\n $this->view->row = $row;\n }", "public function visualizar() {\n echo $this->getTabuleiro();\n }", "function getActRow($act, $aval, $create = false) {\n\tif ($create) { // Init fields if row creation\n\t\t$aval['address'] = \"\";\n\t\t$aval['method'] = \"PUT\";\n\t\t$aval['body'] = \"\";\n\t} else {\n\t\techo \"<TR>\";\n\t}\n\tdisplay_td_checkbox(\"act\", $act, \"asel\");\n\techo \"<TD>\";\n\techo \"<INPUT TYPE=text ID=aaddr$act VALUE=\\\"\" . $aval['address'] . \"\\\" CLASS=ui-corner-all>\";\n\techo \"<TD>\";\n\tselMethod(\"sbact_\" . $act, $aval['method']);\n\techo \"<TD>\";\n\techo \"<INPUT TYPE=text ID=abody$act VALUE=\\\"\";\n\t$comma = \"\";\n\tif ($aval['body'] != \"\") {\n\t\tforeach ($aval['body'] as $key => $val) {\n\t\t\techo $comma . \"&quot;$key&quot;:&quot;$val&quot;\";\n\t\t\t$comma = \", \";\n\t\t}\n\t}\n\techo \"\\\" CLASS=ui-corner-all>\\n\";\n}", "function get_audit_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$data= $this->select_query(\"audit\",\"id,name,from_date,to_date,created_datetime\",$where,$where_array,$sort_by);\n\t\treturn $data;\n\t}", "function make_table ($rows){\n if (($rows['supply_type'] == 'prepaid' \n && $rows['status'] == 'initiated') ||\n ($rows['supply_type'] == 'postpaid' \n && $rows['status'] == 'supplied')){ // Only display Prepaid supplies that have been initiated and Postpaid supplies that have been delivered\n $pay = '<a href=\"pay.php?supply_id='.$rows['id'].'\" target=\"pay_frame\"> \n <small data-toggle=\"modal\" data-target=\"#payModal\">Pay</small>\n </a>'; // Open the transfer iframe in a Modal window\n } else {\n $pay = '<small class=\"text-danger\">Pay</small>';\n }\n\n\n\n\n $row = '\n <tr>\n <td>'.$rows['supplier_name'].'</td>\n <td>'.$rows['quantity_desc'].' of <strong>'.$rows['item_name'].'</strong></td>\n <td>'.$rows['status'].' ('.$rows['supply_type'].')</td>\n <td>N'.number_format($rows['amount'],2,\".\",\",\").'</td>\n <td>'.$rows['supply_order_date'].'</td>\n <td>'.$pay.'</td>\n </tr>\n ';\n return $row;\n }", "function Avi_list(){\n\t\t\n\t\t//Doctor INNER JOIN with availability for doctor name and his Avialibalility\n\t\t$data = $this->View('users.firstname,users.lastname,availability.id,availability.monday,availability.tuesday,availability.wednesday,availability.thursday,availability.friday,availability.saturday,availability.sunday,availability.date','users',\" LEFT JOIN availability ON users.id = availability.user_id \",'');\n\t\t\n\t\t//if availability is in table\n\t\t if($data){\n\t\t\t\n\t\t // for serial no\t \n\t\t $sno =1;\n\t\t \n\t\t // view all availability from table\n\t\t foreach($data as $value){\n\t\t\t \n\t\techo \t\"<tr>\n\t\t\t<td></td>\n\t\t\t<td>\".$sno++.\"</td>\n <td>\".$value['firstname'].\" \".$value['lastname'].\"</td>\n \n \n\t\t\t<td>\".$value['monday'].\"</td>\n\t\t\t<td>\".$value['tuesday'].\"</td>\n\t\t\t<td>\".$value['wednesday'].\"</td>\n\t\t\t<td>\".$value['thursday'].\"</td>\n\t\t\t<td>\".$value['friday'].\"</td>\n\t\t\t<td>\".$value['saturday'].\"</td>\n\t\t\t<td>\".$value['sunday'].\"</td>\n\t\t\t<td>\".$value['date'].\"</td>\n\t\t\t\n\t\t\t\n <td class='datatable-ct'>\n\t\t\t<a title='Edit' href='Availability?Edit=\".$value['id'].\"'><i class='fa fa-pencil-square-o' aria-hidden='true'></i></a>\n\t\t\t<a title='Edit Picture' href='Availability?Edit-Img=\".$value['id'].\"'><i class='fa fa-picture-o' aria-hidden='true'></i></a>\n\t\t\t<a href='Availability?List=\".$value['id'].\"' title='Delete'><i class='fa fa-trash' aria-hidden='true'></i></a>\n\t\t\t</td>\n </tr>\";\n\t\t\t \n\t\t\t\n\t\t } // Foreach close\n\t \n\t\t } // if close\n\t\t\n\t}", "function DisplayDBasTable($db, $sql, $showID)\n {\n $showHeader=true;\n \t$result = $db->query($sql);\n //echo $sql . '<br>';\n \techo \"<table border='1'>\";\n \t$rowCounter=0;\n \twhile ($row = $result->fetch_assoc()){\n \t $rowCounter++;\n if ($showHeader)\n {\n \t\techo \"<tr onclick='myFolderFunction(this)'>\";\n \t foreach ($row as $key => $value)\n \t {\n \t\t\tif (($showID) || ($key!='id'))\n \t\t\t{\n \t\t\t echo \"<th>$key</th>\";\n \t\t\t};\n \t\t};\n \t\techo \"</tr>\";\n $showHeader=false;\n };\n reset($row);\n debug_to_console($rowCounter);\n \t echo \"<tr\";\n if($rowCounter%2 > 0){ \n echo \" class='even'\";\n } \n else{ \n \n };\n echo \" onclick='myFolderFunction(this)'>\";\n \t foreach ($row as $key => $value)\n \t {\n \t\t\tif (($showID) || ($key!='id'))\n \t\t\t{\n \t\t echo '<td>'.$value . ' </td>';\n \t\t\t};\n \t };\n \t\techo \"</tr>\";\n \t};\n \techo \"</table>\";\n \treturn true;\n }", "function print_table($query_result) {\n echo \"<table>\";\n echo \"<tr>\";\n for ($i = 0; $i < pg_num_fields($query_result); $i++) {\n $fieldname = pg_field_name($query_result, $i);\n echo \"<th>$fieldname</th>\";\n }\n echo \"</tr>\";\n\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n for ($i = 0; $i < $num; $i++) {\n echo \"<td>$row[$i]</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "public function getNoteContentFromRow($tableName,$row){\n\t\tglobal $TCA;\n\n\t\t$htmlContent = array('<table>');\n\t\t$htmlContent[] = $this->_getNoteTableRow('UID',$row['uid']); unset($row['uid']);\n\n\t\t$col = 'crdate';\n\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Created');\n\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) ); unset($row[$col]);\n\n\t\t$col = 'cruser_id';\n\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Created by');\n\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getUserById($row[$col]) ); unset($row[$col]);\n\n\t\t$col = 'tstamp';\n\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Last update');\n\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) ); unset($row[$col]);\n\n\n\t\tif( isset($row['sys_language_uid']) ){\n\t\t\t$col = 'sys_language_uid';\n\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Language ID');\n\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,'('.$row[$col].') '.$this->getSysLanguageDetails($row[$col],'title').' <img src=\"'.$this->getBEHttpHost().$this->getSysLanguageDetails($row[$col],'flag').'\"/>' );\n\t\t} unset($row[$col]);\n\n\t\tif( isset($row['starttime']) && $row['starttime'] > 0 ){\n\t\t\t$col = 'starttime';\n\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Starttime');\n\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) );\n\t\t}\n\t\tunset($row['starttime']);\n\t\tif( isset($row['endtime']) && $row['endtime'] > 0 ){\n\t\t\t$col = 'endtime';\n\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Endtime');\n\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) );\n\t\t}\n\t\tunset($row['endtime']);\n\t\tunset($row['uid']);\n\t\tunset($row['pid']);\n\t\tunset($row['titInt0']);\n\t\tunset($row['title']);\n\t\tunset($row['doktype']);\n\t\tunset($row['shortcut_mode']);\n\t\tunset($row['module']);\n\t\tunset($row['deleted']);\n\t\tunset($row['hidden']);\n\t\tunset($row['disable']);\n\n\t\t/* list user defined columsn for a table listet in a sysfolder */\n\t\tif( $tableName <> '' && count($row)>0 ){\n\t\t\n\t\t\t$bodyLength = isset($this->settings['SysFolderContentListTextMaxLength']) ? (int)$this->settings['SysFolderContentListTextMaxLength'] : 250;\n\n\t\t\tforeach($row as $colName=>$colVal){\n\t\t\t\t$noLtGtReplace = 0;\n\t\t\t\n\t\t\t\tif( $colVal <> '' ){\n\t\t\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$colName,$colName);\n\t\t\t\t\t$tcaEval = isset($TCA[$tableName]['columns'][$colName]['config']['eval']) ? $TCA[$tableName]['columns'][$colName]['config']['eval'] : '';\n\t\t\t\t\t$tcaType = isset($TCA[$tableName]['columns'][$colName]) ? strtolower($TCA[$tableName]['columns'][$colName]['config']['type']) : 'text';\n\t\t\t\t\t\n\t\t\t\t\t/*<TemplaVoila>*/\n\t\t\t\t\tif( $tableName == 'tx_templavoila_tmplobj' && in_array($colName,array('fileref_md5','fileref','datastructure')) ){\n\t\t\t\t\t\n\t\t\t\t\t\tif( $colName=='fileref_md5' && isset($row['fileref_md5']) && \n\t\t\t\t\t\t\tisset($row['fileref']) && file_exists(PATH_site.$row['fileref']) ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$currentMD5 = @md5_file(PATH_site.$row['fileref']);\n\t\t\t\t\t\t\tif($currentMD5 <> $row['fileref_md5'] ){\n\t\t\t\t\t\t\t\t$label .= $this->convertLTGT(' <img src=\"'.$this->getBEHttpHost().'typo3/sysext/t3skin/icons/gfx/icon_warning.gif\"/>');\n\t\t\t\t\t\t\t\t$colVal = ' New: '.$currentMD5.'<br />Old: '.$colVal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}elseif($colName=='datastructure' || $colName=='fileref'){\n\t\t\t\t\t\t\t$colVal = $this->_value2ATag($colVal);\n\t\t\t\t\t\t}\n\t\t\t\t\t}/*</TemplaVoila>*/\n\t\t\t\t\t\n\t\t\t\t\t/*<Templates>*/\n\t\t\t\t\telseif( ($tableName == 'sys_template' || $tableName == 'pages' ) && \n\t\t\t\t\t\tin_array($colName,array('include_static_file','constants','config','TSconfig')) ){\n\t\t\t\t\t\t/* @TODO better implementing of tables which has TS column */\n\t\t\t\t\t\tif( $colName == 'include_static_file' ){\n\t\t\t\t\t\t\t$colVal = implode('<br />',explode(',',$colVal));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( $colName == 'constants' || $colName == 'config' || $colName == 'TSconfig' ){\n\t\t\t\t\t\t\t$noLtGtReplace = 1;\n\n\t\t\t\t\t\t\t/* @todo link external TS files via eID ... still to think about it ...\n\t\t\t\t\t\t\t$colVal = Tx_Typo3mind_Utility_Helpers::TSReplaceFileLinkWithHref($colVal); \n\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t\t$colVal = $this->convertLTGT('<pre>').trim($colVal).$this->convertLTGT('</pre>');\n\t\t\t\t\t\t}\n\t\t\t\t\t}/*</Templates>*/\n\t\t\t\t\t\n\t\t\t\t\t/*<default values>*/\n\t\t\t\t\telseif( stristr($tcaEval,'date')!==false ){ $colVal = $this->getDateTime($colVal); }\n\t\t\t\t\telseif( $tcaType == 'text' || $tcaType == 'input' ){\n\t\t\t\t\t\t/* we can't relay on the user, that all HTML is XML valid ... */\n\t\t\t\t\t\t$colVal = strip_tags($colVal);\n\t\t\t\t\t\tif( strlen($colVal) > $bodyLength ){ $colVal = preg_replace('/^(.{'.$bodyLength.'}\\S*).*$/s','\\\\1 ...',$colVal); }\n\t\t\t\t\t\t$colVal = preg_replace('~[\\r\\n]+~',\"\\n\",$colVal);\n\t\t\t\t\t\t$colVal = nl2br($colVal);\n\t\t\t\t\t}\n\t\t\t\t\t/*</default values>*/\n\t\t\t\t\t \n\t\t\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,$colVal,$noLtGtReplace );\n\t\t\t\t}/*endif*/\n\t\t\t}/*endforeach*/\n\n\t\t}/*endif $tableName*/\n\n\t\t$htmlContent[] = '</table>';\n\t\treturn implode('',$htmlContent);\n\t}", "function printTable($array2d, $keys)\n\t{\n\t\t// Begin table\n\t\techo \"<table class='table table-hover'>\";\t\t// added table style\n\t\t\n\t\t// Add table head row from keys\n\t\techo \"<thead>\";\n\t\tforeach ($keys as $rowHead)\n\t\t{\n\t\t\t\techo \"<th class='success'>$rowHead</th>\";\t\t// added text color style\n\t\t}\n\t\techo \"</thead>\";\n\t\t\n\t\t// Add table rows of content for each event\n\t\tforeach ($array2d as $indexR=>$record)\n\t\t{\n\t\t\techo \"<tr>\";\n\t\t\t// Iterate through each array element's contents and place in a table cell\n\t\t\tforeach ($record as $indexF=>$field)\n\t\t\t{\t\n\t\t\t\tif ($indexF == \"Time\")\t\t\t// This seems like a bad practice have the keys as an parameter but hard code this statement\n\t\t\t\t\techo \"<td>\" . date('j M Y g:i a', $field) . \"</td>\";\n\t\t\t\telse\n\t\t\t\t\techo \"<td>$field</td>\";\n\t\t\t}\n\t\t\t\t\t\n\t\t\t// This seems like a bad practice to have the keys as a parameter but hard code this statement\n\t\t\t// If the current array element's eventId is the same as the session's userId, add an extra edit/delete option.\n\t\t\tif ($record['User ID'] == $_SESSION[\"userId\"])\n\t\t\t{\n\t\t\t\t$i = $record['Event ID'];\n\t\t\t\techo \"<td><a href='ecmain.php?action=EditEvent&EventId=$i'>edit</a>&nbsp;/&nbsp;<a href='ecmain.php?action=DeleteEvent&EventId=$i'>delete</a></td>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"<td></td>\";\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\t\t\n\t\t// End table\n\t\techo \"</table>\";\n\t}", "function listar_log(){\n\t$conn = db_conectar();\n\t$result = $conn->query(\"SELECT * FROM log\");\n\techo \"\n<table border='2' align='center'>\n<thead>\n\t<tr>\n\t\t<th>ID</th>\n\t\t<th>Texto</th>\n\t</tr>\n</thead>\n<tbody>\";\n\twhile ( $row = $result->fetch_assoc() ){\n\t\techo \"\n<tr>\n\t<td>\".htmlentities($row[\"id\"]).\"</td>\n\t<td>\".htmlentities($row[\"descripcion\"]).\"</td>\n</tr>\";\n\t}\n\techo \"\n\t</tbody>\n\t</table>\";\n\t$conn->close();\n}", "public function dataRevisionsTable();", "public function list_actividades($prod_id){\n $tabla='';\n $actividades = $this->model_actividad->list_actividad_gestion($prod_id,$this->gestion); /// actividades-Proy Inversion\n \n if(count($actividades)!=0){\n $nro=0;\n foreach($actividades as $row){\n $monto=$this->model_actividad->monto_insumoactividad($row['act_id']);\n $tp='';\n if($row['indi_id']==2){\n $tp='%';\n }\n\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n\n $tabla.='\n <tr bgcolor=\"#f5f0f0\">\n <td style=\"height:12px;\"></td>\n <td style=\"width: 2%; text-align: center; font-size: 7.5px;\"></td>\n <td></td>\n <td></td>\n <td></td>\n <td style=\"width: 9%; text-align: left;\"></td>\n <td style=\"width: 9%; text-align: left;\"></td>\n <td style=\"width: 9%; text-align: left;\">'.$row['act_actividad'].'</td>\n <td style=\"width: 9%; text-align: left;\">'.$row['act_indicador'].'</td>\n <td style=\"width: 2%; text-align: center;\">'.round($row['act_linea_base'],2).'</td>\n <td style=\"width: 3%; text-align: center;\" bgcolor=\"#eceaea\">'.round($row['act_meta'],2).'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['enero'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['febrero'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['marzo'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['abril'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['mayo'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['junio'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['julio'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['agosto'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['septiembre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['octubre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['noviembre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['diciembre'],2).''.$tp.'</td>\n <td style=\"width: 9%; text-align: left;\">'.$row['act_fuente_verificacion'].'</td>\n <td style=\"width: 5%; text-align: right;\">'.number_format($ptto, 2, ',', '.').'</td>\n </tr>';\n }\n }\n\n return $tabla;\n }", "function viewTable($parks)\n{\n return formatTable($parks);\n}", "function printQueryResult($result) {\n?>\n<table id=\"queryResultTable\">\n <thead>\n <tr>\n <th width=\"10%\">ID</th>\n <th width=\"10%\">Description</th>\n <th width=\"10%\">Hand-in location</th>\n <th width=\"10%\">Deadline</th>\n </tr>\n </thead>\n <tbody>\n <?php\n\twhile ($row = OCI_Fetch_Array($result, OCI_BOTH)) : ?>\n\t<tr>\n <td><?php echo $row[\"ID\"]; ?></td>\n <td><?php echo $row[\"DESCRIPTION\"]; ?></td>\n <td><?php echo $row[\"HAND_IN_LOC\"]; ?></td>\n <td><?php echo $row[\"DEADLINE\"]; ?></td>\n\t</tr>\n <?php endwhile; ?>\n </tbody>\n</table>\n<?php\n}", "public function actionIndex()\n {\n $searchModel = new AuditEntrySearch;\n $dataProvider = $searchModel->search(Yii::$app->request->get());\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }", "public function actionTable()\n {\n if (isset($_POST['editableAttribute'])) {\n $model = User::find()\n ->where(['_id' => $_POST['editableKey']])\n ->limit(1)\n ->one();\n if ($_POST['editableAttribute']=='type') {\n $model['type']=intval($_POST['Users'][$_POST['editableIndex']]['type']);\n if ($model['active']==true) $model['active']=1;\n else $model['active']=0;\n $model->save();\n return json_encode($model->errors);\n }\n if ($_POST['editableAttribute']=='active') {\n if ($_POST['Users'][$_POST['editableIndex']]['active']==true)\n $model['active']=1;\n else $model['active']=0;\n $model->save();\n return json_encode(\"hui2\");\n }\n }\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination->pageSize = 15;\n return $this->render(\n 'table',\n [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]\n );\n }", "public function showTable() {\n\t\t$tableName = $this->request->getVariable('id');\n\t\t$this->smarty->assign('dbTableObject',new $tableName());\n\t\t$this->pageDisplay('tools');\n\t}", "function table_voltooid($conn)\n\t{\n\t\t$data=prepare_data_volt($conn);\n\t\t\n\t\tfor ($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\techo \"<tr>\";\n\t\t\tforeach($data[$i] as $best)\n\t\t\t{\n\t\t\t\techo \"<td>$best</td>\";\n\t\t\t}\n\t\t\techo \"</tr>\";\n\t\t}\n\t}", "public function viewHistory() {\n $historyRows = $this->db->query(\"SELECT * FROM history\");\n if (!$historyRows) die(\"Fatal Error.\");\n\n // Looping through all rows in the histoy table.\n $history = [];\n foreach($historyRows as $historyRow) {\n $regNr = htmlspecialchars($historyRow[\"regNr\"]);\n $ssNr = htmlspecialchars($historyRow[\"ssNr\"]);\n $checkOut = htmlspecialchars($historyRow[\"checkOutTime\"]);\n $checkIn = htmlspecialchars($historyRow[\"checkInTime\"]);\n $days = htmlspecialchars($historyRow[\"days\"]);\n $cost = htmlspecialchars($historyRow[\"cost\"]);\n\n // Setting 0 as default value on days and cost if car not checked in yet.\n if (!$checkIn) {\n $checkIn = \"Checked Out\";\n $days = 0;\n $cost = 0;\n }\n \n $histor = [\"regNr\" => $regNr,\n \"ssNr\" => $ssNr, \n \"checkOut\" => $checkOut,\n \"checkIn\" => $checkIn, \n \"days\" => $days,\n \"cost\" => $cost,\n \"days\" => $days];\n \n $history[] = $histor;\n }\n return $history;\n }", "public function datatable() {\n $this -> datatables -> select(\"Id,AdvertisementTitle,AdvertisementImage,AdvertisementDescription,AdvertisementUrl,StartDate, EndDate, CreatedBy,ModifiedBy,CreatedOn,ModifiedOn,IsActive AS active,IsRemoved\", FALSE)\n -> unset_column('AdverismentImage')\n -> unset_column('Id')\n -> unset_column('active')\n -> from('advertisements') \n -> add_column('Actions', get_action_buttons('$1', 'advertisements'), 'Id');\n\n $cond = array(\n 'IsRemoved' => '0'\n );\n $this -> datatables -> where($cond);\n\n echo $this -> datatables -> generate();\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 }", "public function ListTable()\n {\n echo $this->ListTableText();\n }", "public function actividades_2018($prod_id,$nro){\n $actividad=$this->model_actividad->list_act_anual($prod_id); /// Actividad\n $tabla='';\n $nro_a=0;\n if(count($actividad)!=0){\n foreach ($actividad as $row){\n $programado=$this->model_actividad->actividad_programado($row['act_id'],$this->gestion); /// Actividad Programado\n if(count($programado)!=0){\n $nro_a++;\n $tabla.='<tr class=\"modo1\" bgcolor=\"#e5f3f1\">';\n $tabla.='<td>'.$nro.'.'.$nro_a.'</td>';\n $tabla.='<td></td>';\n $tabla.='<td>'.$row['act_actividad'].'</td>';\n $tabla.='<td>'.$row['indi_abreviacion'].'</td>';\n $tabla.='<td>'.$row['act_indicador'].'</td>';\n $tabla.='<td align=\"right\">'.$row['act_linea_base'].'</td>';\n $tabla.='<td align=\"right\">'.$row['act_meta'].'</td>';\n $tabla.='<td align=\"right\">'.$programado[0]['enero'].'</td>\n <td align=\"right\">'.$programado[0]['febrero'].'</td>\n <td align=\"right\">'.$programado[0]['marzo'].'</td>\n <td align=\"right\">'.$programado[0]['abril'].'</td>\n <td align=\"right\">'.$programado[0]['mayo'].'</td>\n <td align=\"right\">'.$programado[0]['junio'].'</td>\n <td align=\"right\">'.$programado[0]['julio'].'</td>\n <td align=\"right\">'.$programado[0]['agosto'].'</td>\n <td align=\"right\">'.$programado[0]['septiembre'].'</td>\n <td align=\"right\">'.$programado[0]['octubre'].'</td>\n <td align=\"right\">'.$programado[0]['noviembre'].'</td>\n <td align=\"right\">'.$programado[0]['diciembre'].'</td>';\n \n $tabla.='<td>'.$row['act_fuente_verificacion'].'</td>';\n $tabla.='</tr>';\n }\n \n }\n }\n\n return $tabla;\n }", "function printWhole($tableName)\n{\n $result = executePlainSQL(\"SELECT * FROM {$tableName}\");\n OCICommit($db_conn);\n\n echo \"<br>Table [{$tableName}]:<br>\";\n\n // table head\n $ncols = oci_num_fields($result);\n echo \"<table><tr>\";\n for ($i = 1; $i <= $ncols; $i++) {\n $column_name = oci_field_name($result, $i);\n echo \"<th>{$column_name}</th>\";\n }\n echo \"</tr>\";\n\n // table data\n while ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n echo \"<tr>\";\n for ($i = 0; $i < $ncols; $i++) {\n echo \"<td>{$row[$i]}</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "public function displayAll() {\n \t\n \techo \"<table border=1>\";\n\t\techo \"<tr>\";\n\t\techo \"<th>Id</th>\";\n\t\techo \"<th>Ora aterizare</th>\";\n\t\techo \"<th>De la</th>\";\n\t\techo \"<th>Compania</th>\";\n\t\techo \"</tr>\";\n\n\t\tforeach($this->findAll() as $k => $zbor){ //parcugem arrayul pe linie\n\t\t\techo \"<tr>\";\n\n\t\t\techo \"<td> \" . $zbor[\"id\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"ora_aterizare\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"de_la\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"compania\"] . \"</td>\";\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\n\t\techo \"</table>\";\n }", "public function makeUserLines($rows, $cb = false) {\n global $user;\n logit(\"US: {$this->usertype}\");\n $rev_ut = rev('getUserTypes', $this->tlist);\n $ct = 0;\n $user_users = array('ADMIN', 'USER', 'APPROVER');\n $ao = new Application_Model_DbTable_AuditOwner();\n $owner = $ao->isOwned($this->audit['audit_id'], $this->userid);\n $tout = array();\n /*if (in_array($this->usertype, array('ADMIN', 'USER', 'APPROVER'))) {\n //$tout[] = \"<div style=\\\"margin-left:200px\\\"><h1 style=\\\"margin-bottom:10px;\\\">Add owner to the current Audit</h1></div>\";\n }*/\n /*if ($this->usertype == 'ADMIN') {\n $tout[] = \"<h1 style=\\\"margin-bottom:10px;\\\">Edit User</h1>\";\n } else {\n $tout[] = \"<h1 style=\\\"margin-bottom:10px;\\\"></h1>\";\n }*/\n $tout[] = '<table style=\"margin-left:200px;color:black;\">';\n $tout[] = \"<tr class='even'>\";\n if ($cb) {\n $tout[] = \"<td style='width:110px;'>Select/<br />Deselect All</td>\";\n } else {\n $tout[] = \"<td style='width:110px;'></td>\";\n }\n $tout[] = <<<\"END\"\n<td style='width:100px;font-weight:bold;'>UserId</td>\n<td style='width:200px;font-weight:bold;'>Name</td>\n<td style='width:85px;font-weight:bold;'>UserType</td>\nEND;\n foreach($rows as $row) {\n $ct ++;\n $cls = ($ct % 2 == 0) ? 'even' : 'odd';\n $tout[] = \"<tr class='{$cls}'>\";\n $firstcol = '';\n if ($cb) {\n $name = \"cb_{$row['id']}\";\n $firstcol = \"<td style='width:40px;padding:2px 0;'>\" .\n \"<input type='checkbox' name='{$name}' id='{$name}'></td>\";\n } else {\n\n $sel = \"<a href=\\\"{$this->baseurl}/user/edit/{$row['id']}\\\"\" .\n \" class=\\\"btn btn-mini btn-success\\\">Edit</a>\";\n $addo = '';\n if (in_array($row['usertype'], $user_users)) {\n $addo = \"<a href=\\\"{$this->baseurl}/user/addowner/{$row['id']}\\\" onclick=\\\"return confirm('Add {$row['name']} to owners of selected audit?');\\\" class=\\\"btn btn-mini btn-warning\\\">Add Owner</a>\";\n }\n $buttons = '';\n // logit(\"UT: {$this->usertype}, {$this->audit['status']}\");\n if ($this->audit['status'] == 'INCOMPLETE') {\n $buttons .= $addo;\n //$firstcol .= \"<td style='width:40px;padding:2px 0;'>{$addo}</td>\";\n }\n if ($this->usertype == 'ADMIN') {\n $buttons .= $sel;\n //$firstcol .= \"<td style='width:40px;padding:2px 0;'>{$sel}</td>\";\n }\n if ($this->usertype == 'APPROVER') {\n $firstcol .= '<td></td>';\n }\n $firstcol = \"<td style='padding:2px 0;'>{$buttons}</td>\";\n }\n // $sl = ($row['slmta'] == 't') ? 'Yes' : 'No';\n $tout[] = <<<\"END\"\n{$firstcol}\n<td>{$row['userid']}</td>\n<td>{$row['name']}</td>\n<td>{$rev_ut[$row['usertype']]}</td>\nEND;\n // \"<td style='width:45px;font-weight:bold;'>SLMTA</td>\" .\n // <td>{$sl}</td>\n }\n $tout[] = '</table>';\n $this->view->showlines = implode(\"\\n\", $tout);\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}", "public function tradinghistory()\n {\n\n return view('user.thistory')\n ->with(array(\n\n 't_history' => tp_transactions::where('user', Auth::user()->id)\n ->where('type', 'ROI')\n ->orderBy('id', 'desc')\n ->get(),\n 'title' => 'Trading History',\n 'settings' => settings::where('id', '=', '1')->first(),\n ));\n }", "public function print_invoice_details_table() {\n\n // Language variables to be used in heredoc syntax\n $tableHeaderCategory = lang( 'report_th_category' );\n $tableHeaderDescription = lang( 'report_th_description' );\n $tableHeaderAmount = lang( 'report_th_amount' );\n\n // Get the invoice row details\n $invoiceRows = $this->mockinvoice_row_model->get_by( 'mockInvoiceId = ' . @$_POST['mockInvoiceId'] );\n\n $tableRows = '';\n\n foreach ( $invoiceRows as $row ) {\n\n // Add currency symbol Eg. '$' to the amount if we have one\n ( $row->amount != null ? $amount = lang( 'system_currency_symbol' ) . $row->amount : $amount = '' );\n // Replace new lines with HTML <br> tags\n $description = nl2br( $row->description );\n\n // Check if a row has some content and add it to the table if it does\n if ( ( $row->category != null ) or ( $row->description != null ) or ( $row->amount != null ) ) {\n $tableRows .= <<< HTML\n <tr id=\"invoice-details-row-{$row->mockInvoiceRowId}\">\n <td>{$row->category}</td>\n <td>{$description}</td>\n <td>{$amount}</td>\n </tr>\n\nHTML;\n }\n }\n\n // Output the HTML\n if ( $tableRows == '' ) {\n\n // Show that we have no details yet to display\n echo '<div class=\"alert alert-warning\">' . lang( 'report_minv_empty' ) . '</div>';\n } else {\n\n // Display the table with invoice details\n echo <<< HTML\n <table class=\"table table-striped table-bordered table-hover table-report\">\n <thead>\n <tr class=\"report-heading-row\">\n <th>{$tableHeaderCategory}</th>\n <th>{$tableHeaderDescription}</th>\n <th>{$tableHeaderAmount}</th>\n </tr>\n </thead>\n <tbody>\n\n{$tableRows}\n\n </tbody>\n </table>\n\nHTML;\n }\n }", "function printResult($result) {\n\techo \"<br>Got data from table tab1:<br>\";\n\techo \"<table>\";\n\techo \"<tr><th>ID</th><th>Name</th></tr>\";\n\n\twhile ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n //echo \"<tr><td>\" . $row[\"NID\"] . \"</td><td>\" . $row[\"NAME\"] . \"</td></tr>\"; //or just use \"echo $row[0]\" \n \"<tr><td>\" . $row[\"Player_Name\"] . \"</tr><td>\" . $row[\"Team_Name\"] . \"</tr><td>\" . $row[\"PPG\"] . \n \"</tr><td>\" . $row[\"Assist\"] . \"</tr><td>\" . $row[\"Rebounds\"] . \"</tr><td>\" . $row[\"Steals\"] . \n \"</tr><td>\" . $row[\"Turnovers\"] . \"</td></tr>\";\n\t}\n\techo \"</table>\";\n}", "public function indexTable($table)\n {\n if(Auth::user()->role==1||Auth::user()->role==2){\n switch ($table) {\n case 'users':\n $logs = UserLog::where(\"deleted\",0)->where(\"affected_table\",$table)->orderBy(\"created_at\",\"DESC\")->paginate(30);\n break;\n case 'patients':\n $logs = UserLog::where(\"deleted\",0)->where(\"affected_table\",$table)->orderBy(\"created_at\",\"DESC\")->paginate(30);\n break;\n case 'diagnoses':\n $logs = UserLog::where(\"deleted\",0)->where(\"affected_table\",$table)->orderBy(\"created_at\",\"DESC\")->paginate(30);\n $table=\"diagnosis\";\n break;\n case 'drugs':\n $logs = UserLog::where(\"deleted\",0)->where(\"affected_table\",$table)->orderBy(\"created_at\",\"DESC\")->paginate(30);\n $table=\"medication\";\n break;\n case 'oral_radiologies':\n $logs = UserLog::where(\"deleted\",0)->where(\"affected_table\",$table)->orderBy(\"created_at\",\"DESC\")->paginate(30);\n $table=\"x-rays\";\n break;\n case 'appointments':\n $logs = UserLog::where(\"deleted\",0)->where(\"affected_table\",$table)->orderBy(\"created_at\",\"DESC\")->paginate(30);\n $table=\"visits\";\n break;\n case 'working_times':\n $logs = UserLog::where(\"deleted\",0)->where(\"affected_table\",$table)->orderBy(\"created_at\",\"DESC\")->paginate(30);\n $table=\"Working Times\";\n break;\n\n default:\n return view(\"errors.404\");\n break;\n }\n\n return view(\"user_log.all\",['logs'=>$logs,'table'=>$table]);\n }else {\n return view(\"errors.404\");\n }\n }", "public function autofilterAction()\n {\n $this->aliasAction('index');\n\n // \\MUtil_Model::$verbose = true;\n\n // We do not need to return the layout, just the above table\n $this->disableLayout();\n\n $this->html[] = $this->_createTable();\n $this->html->raw(\\MUtil_Echo::out());\n }", "public function leave_application_report_show_in_table() { // show in table \n if (get_user_permission('reports/hr_report/employee_leave_report/employee_leave_report') === false) {\n redirect(base_url('user_login'));\n }\n\n $is_show_leave_application_false_list = $this->Leave_application_Model->get_leave_application_by_is_show(FALSE);\n $this->data['is_show_leave_application_false_list'] = $is_show_leave_application_false_list;\n $this->get_leave_application_is_show_true($is_show_leave_application_false_list);\n $this->data['title'] = 'Leave Application Report';\n $this->load->view('header');\n $this->load->view('navigation');\n $this->load->view('reports/hr_report/leave_application_report/leave_application_report_table', $this->data);\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}", "function AggregateListRow() {\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function AggregateListRow() {\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function AggregateListRow() {\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function get_iqa_result_manage_table_data_rows($iqas, $controller) {\n $CI = &get_instance();\n $table_data_rows = '';\n\n $no = 1;\n foreach ($iqas->result() as $iqa) {\n $table_data_rows .= get_iqa_result_data_row($iqa, $controller, $no);\n $no++;\n }\n\n if ($iqas->num_rows() == 0) {\n $table_data_rows.=\"<tr><td colspan='11'><span class='col-md-12 text-center text-warning' >\" . lang('iqa_no_iqa_to_display') . \"</span></tr>\";\n }\n\n return $table_data_rows;\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 print_pure_table($query_result, $headers) {\n echo \"<table class=\\\"pure-table pure-table-bordered\\\">\";\n if ($headers) {\n echo $headers;\n } else {\n echo \"<thead><tr>\";\n for ($i = 0; $i < pg_num_fields($query_result); $i++) {\n $fieldname = pg_field_name($query_result, $i);\n echo \"<th>$fieldname</th>\";\n }\n echo \"</tr></thead>\";\n }\n \n echo \"<tbody>\";\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n for ($i = 0; $i < $num; $i++) {\n echo \"<td>$row[$i]</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</tbody>\";\n echo \"</table>\";\n }", "function getChangeLog(\\PDO $dbh, $naIndex, $stDate = \"\", $endDate = \"\") {\r\n if ($stDate == \"\" && $endDate == \"\" && $naIndex < 1) {\r\n return \"Set a Start date. \";\r\n }\r\n\r\n $logDates = \"\";\r\n $whDates = \"\";\r\n $whereName = \"\";\r\n\r\n if ($stDate != \"\") {\r\n $logDates = \" and Date_Time >= '$stDate' \";\r\n $whDates = \" and a.Effective_Date >= '$stDate' \";\r\n }\r\n\r\n if ($endDate != \"\") {\r\n $logDates .= \" and Date_Time <= '$endDate' \";\r\n $whDates .= \" and a.Effective_Date <= '$endDate' \";\r\n }\r\n\r\n $whereName = ($naIndex == 0) ? \"\" : \" and idName = \" . $naIndex;\r\n\r\n $result2 = $dbh->query(\"SELECT * FROM name_log WHERE 1=1 \" . $whereName . $logDates . \" order by Date_Time desc limit 200;\");\r\n\r\n $data = \"<table id='dataTbl' class='display'><thead><tr>\r\n <th>Date</th>\r\n <th>Type</th>\r\n <th>Sub-Type</th>\r\n <th>User Id</th>\r\n <th>Member Id</th>\r\n <th>Log Text</th></tr></thead><tbody>\";\r\n\r\n while ($row2 = $result2->fetch(\\PDO::FETCH_ASSOC)) {\r\n\r\n $data .= \"<tr>\r\n <td>\" . date(\"Y-m-d H:i:s\", strtotime($row2['Timestamp'])) . \"</td>\r\n <td>\" . $row2['Log_Type'] . \"</td>\r\n <td>\" . $row2['Sub_Type'] . \"</td>\r\n <td>\" . $row2['WP_User_Id'] . \"</td>\r\n <td>\" . $row2['idName'] . \"</td>\r\n <td>\" . $row2['Log_Text'] . \"</td></tr>\";\r\n }\r\n\r\n\r\n // activity table has volunteer data\r\n $query = \"select a.idName, a.Effective_Date, a.Action_Codes, a.Other_Code, a.Source_Code, g.Description as Code, g2.Description as Category, ifnull(g3.Description, '') as Rank\r\nfrom activity a left join gen_lookups g on substring_index(Product_Code, '|', 1) = g.Table_Name and substring_index(Product_Code, '|', -1) = g.Code\r\nleft join gen_lookups g2 on g2.Table_Name = 'Vol_Category' and substring_index(Product_Code, '|', 1) = g2.Code\r\nleft join gen_lookups g3 on g3.Table_Name = 'Vol_Rank' and g3.Code = a.Other_Code\r\n where a.Type = 'vol' $whereName $whDates order by a.Effective_Date desc limit 100;\";\r\n\r\n $result3 = $dbh->query($query);\r\n\r\n while ($row2 = $result3->fetch(\\PDO::FETCH_ASSOC)) {\r\n\r\n $data .= \"<tr>\r\n <td>\" . date(\"Y-m-d H:i:s\", strtotime($row2['Effective_Date'])) . \"</td>\r\n <td>Volunteer</td>\r\n <td>\" . $row2['Action_Codes'] . \"</td>\r\n <td>\" . $row2['Source_Code'] . \"</td>\r\n <td>\" . $row2['idName'] . \"</td>\r\n <td>\" . $row2['Category'] . \"/\" . $row2[\"Code\"] . \", Rank = \" . $row2[\"Rank\"] . \"</td></tr>\";\r\n }\r\n\r\n\r\n return $data . \"</tbody></table>\";\r\n}", "function print_table($pdo,$action_column){\r\n $stmt = $pdo->query('SELECT * FROM Profile');\r\n $row = false;\r\n ?>\r\n <table border=\"1\">\r\n <thead>\r\n <tr>\r\n <td>Name</td><td>Headline</td><?php if($action_column): ?><td>Action</td><?php endif; ?>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <?php while($row = $stmt->fetch(PDO::FETCH_ASSOC)): ?>\r\n <tr>\r\n <td><a href=<?= 'view.php?profile_id='.urlencode($row['profile_id']) ?>><?= htmlentities($row['first_name'].' '.$row['last_name']) ?></a></td>\r\n <td><?= htmlentities($row['headline']) ?></td>\r\n <?php if($action_column && ($row['user_id'] == $_SESSION['user_id'])): ?>\r\n <td><a href=<?= 'edit.php?profile_id='.urlencode($row['profile_id']) ?>>Edit</a> <a href=<?= 'delete.php?profile_id='.urlencode($row['profile_id']) ?>>Delete</a></td>\r\n <?php endif; ?>\r\n </tr>\r\n <?php endwhile; ?>\r\n </tbody>\r\n </table>\r\n<?php }", "function case_all_supervisors(){?>\n\t\t\t<table border=\"1\" cellspacing=\"2\" cellpadding=\"2\">\n\t\t\t<tr><th>Supervisor Id</th><th>Supervisor Name</th><th>Phone Number</th></tr>\n\t\t\t<?php $sql = \"select * from supervisor\";\n\t\t\t$result = mysql_query($sql);\n\t\t\twhile($row = mysql_fetch_array($result)){?>\n\t\t\t\t<tr>\n\t\t\t\t<td><?php echo $row['emp_id']?></td>\n\t\t\t\t<td><?php echo $row['first_name']; echo ' '; echo $row['last_name'];?></td>\n\t\t\t\t<td><?php echo $row['phone']?></td>\n\t\t\t\t</tr>\n\t\t\t<?php }?>\n\t\t\t\n\t\t\t</table>\n\t\t<?php }", "public function history($id)\n {\n $jurnalterpilih = JurnalDetail::find($id);\n $jurnalsemua = JurnalDetail::where('id_header', $jurnalterpilih->id_header)->get();\n\n foreach ($jurnalsemua as $row) {\n echo '<tr>';\n echo '<td>'.$row->perkiraan['kode_akun'].'</td>';\n echo '<td>'.$row->perkiraan['nama_akun'].'</td>';\n echo '<td>'.$row->keterangan.'</td>';\n echo '<td class=\"text-right\">Rp. '.number_format($row->debet, \"2\").'</td>';\n echo '<td class=\"text-right\">Rp. '.number_format($row->kredit, \"2\").'</td>';\n echo '</tr>';\n }\n }", "public function indexData() \n {\n return Datatables::of(LogPatron::select(['id', 'actor_id', 'action', 'role', 'patron_id', 'created_at', 'deactivated', 'firstname', 'middlename', 'lastname']))\n ->addColumn('issued_by', function($row) { return $row->actor_id . ' | ' . $row->userLogPatron->username; })\n ->orderColumn('issued_by', function ($query, $order) {\n $query->orderBy('id', $order);\n })\n ->addColumn('name', function($row) { return $row->lastname . ', ' . $row->firstname . ' ' . $row->middlename; })\n ->orderColumn('name', function ($query, $order) {\n $query->orderBy('lastname', $order)->orderBy('firstname', $order)->orderBy('middlename', $order);\n })\n ->editColumn('user_id', function($row) { return $row->user_id . ' | ' . $row->userLogPatron->username; })\n ->editColumn('deactivated', function($row) { \n if($row->deactivated == 1) return \"Deactivated\";\n else return \"Active\";\n })\n ->addColumn('actions', 'admin.logs.patron.action')\n ->rawColumns(['link', 'actions'])\n ->make(true); \n }", "function get_iqa_manage_table($iqas, $controller) {\n $CI = &get_instance();\n $controller_name = strtolower(get_class($CI));\n\n $table = '<table class=\"tablesorter table table-bordered table-hover\" id=\"sortable_table\">';\n $headers = array(\n '<input type=\"checkbox\" id=\"select_all\" />',\n lang('common_no'),\n lang('iqa_evaluation_title'),\n lang('iqa_evaluation_title_kh'),\n lang('iqa_date'),\n lang('common_year'),\n lang('common_action')\n );\n\n $table.='<thead><tr>';\n $count = 0;\n foreach ($headers as $header) {\n $count++;\n\n if ($count == 1) {\n $table.=\"<th class='leftmost'>$header</th>\";\n } elseif ($count == count($headers)) {\n $table.=\"<th class='rightmost'>$header</th>\";\n } else {\n $table.=\"<th>$header</th>\";\n }\n }\n\n $table.='</tr></thead><tbody>';\n $table.=get_iqa_manage_table_data_rows($iqas, $controller);\n $table.='</tbody></table>';\n return $table;\n}", "public function search() {\n\t\t$data = $this->model->getSearchData($this->table->getFilterNames());\n\t\t$this->table->setData($data);\n\t\t// Store the user/object ids in the session so the report() can reuse them\n\t\t$this->storeIdsInSession($data);\n\t\t$this->tpl->setContent($this->table->getHTML());\n\t}", "public function table()\n\t{\n\t\t$sql = '\n\t\t\tselect \n\t\t\t\tid, \n\t\t\t\tname, \n\t\t\t\tenable \n\t\t\tfrom \n\t\t\t\tfile \n\t\t\twhere \n\t\t\t\tuser = ?';\n\n\t\t$results = DB::select($sql, [Auth::id()]);\n\n\t\treturn Datatable::collection(new Collection($results))\n\t\t\t->showColumns('name')\n\t\t\t->addColumn('enable', function($model) \n\t\t\t{\n\t\t\t\treturn '<a href=\"'.url(\"/file/edit&ID=\".$model->id.\"&EN=\".$model->enable).'\">'.$model->enable.'</a>';\n\t\t\t})\n\t\t\t->addColumn('remove', function($model) \n\t\t\t{\n\t\t\t\treturn '<a href=\"'.url(\"/file/delete&ID=\".$model->id).'\"><i class=\"fa fa-times\"></i></a>';\n\t\t\t})\n ->searchColumns('name')\n ->orderColumns('enable', 'name')\n ->make();\n\t}", "public function do_review_logs($p_metadata, $p_messages) {\n\n if(empty($p_messages))\n {\n $m_string = 'No logs are stored at the moment.';\n }\n else\n {\n $i = 0;\n $arr[] = array();\n $tab_output = '<p class=\"lead\" id=\"ret_home\"><a href=\"homepage\">&#8592; Return Home</a></p>';\n $tab_output .= '\n <table id=\"table\" class=\"table table-bordered table-hover\">\n <thead>\n <tr>\n ';\n foreach ($p_metadata as $key1 => $value1) {\n $arr[$i] = $value1;\n $tab_output .= '<th scope=\"col\">'. $value1 .'</th>';\n $i++;\n }\n\n $tab_output .= '</tr></thead><tbody>';\n $i = 0;\n // $m_string = '';\n\n foreach ($p_messages as $key => $value) {\n $tab_output .= '<tr>';\n foreach ($value as $key2 => $value2){\n $tab_output .= '<td>' . $value2 . '</td>';\n $i++;\n }\n $tab_output .= '</tr>';\n $i = 0;\n }\n $tab_output .= '</tbody></table><br /><br />';\n }\n\n\n $this->c_review_logs = $tab_output;\n\n}", "function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }" ]
[ "0.6517728", "0.6334481", "0.6289868", "0.6157629", "0.61256266", "0.60881233", "0.60813653", "0.60756373", "0.60474914", "0.5940669", "0.59171593", "0.5913041", "0.5911586", "0.590998", "0.57955533", "0.5789427", "0.5724407", "0.57085544", "0.5692147", "0.5689637", "0.56636506", "0.5648993", "0.5639547", "0.5635663", "0.56305325", "0.55914813", "0.55815774", "0.55675006", "0.55536604", "0.5542815", "0.55261433", "0.5521132", "0.55128974", "0.55050135", "0.54753584", "0.5466076", "0.5465734", "0.5451166", "0.5442176", "0.54265666", "0.5423052", "0.5411643", "0.5411303", "0.5404613", "0.54044056", "0.54018563", "0.5400051", "0.53968704", "0.539171", "0.53900856", "0.5389585", "0.53891253", "0.53861", "0.5383225", "0.5365927", "0.5362868", "0.5361331", "0.536077", "0.5358089", "0.53566545", "0.5352456", "0.5351744", "0.53466105", "0.5340482", "0.53397256", "0.53342474", "0.53278035", "0.5320683", "0.53184885", "0.53178656", "0.53124964", "0.5301894", "0.52999556", "0.5297357", "0.5293943", "0.52937", "0.52895635", "0.52887076", "0.528693", "0.5286514", "0.528237", "0.5277665", "0.5272306", "0.5268897", "0.52688473", "0.52688473", "0.52688473", "0.5266871", "0.52593434", "0.5256723", "0.52511466", "0.52460474", "0.524325", "0.5243095", "0.52382046", "0.52292764", "0.5229179", "0.5228816", "0.52287734", "0.5223871" ]
0.6260736
3
Given User rows show in a table
public function makeUserLines($rows, $cb = false) { global $user; logit("US: {$this->usertype}"); $rev_ut = rev('getUserTypes', $this->tlist); $ct = 0; $user_users = array('ADMIN', 'USER', 'APPROVER'); $ao = new Application_Model_DbTable_AuditOwner(); $owner = $ao->isOwned($this->audit['audit_id'], $this->userid); $tout = array(); /*if (in_array($this->usertype, array('ADMIN', 'USER', 'APPROVER'))) { //$tout[] = "<div style=\"margin-left:200px\"><h1 style=\"margin-bottom:10px;\">Add owner to the current Audit</h1></div>"; }*/ /*if ($this->usertype == 'ADMIN') { $tout[] = "<h1 style=\"margin-bottom:10px;\">Edit User</h1>"; } else { $tout[] = "<h1 style=\"margin-bottom:10px;\"></h1>"; }*/ $tout[] = '<table style="margin-left:200px;color:black;">'; $tout[] = "<tr class='even'>"; if ($cb) { $tout[] = "<td style='width:110px;'>Select/<br />Deselect All</td>"; } else { $tout[] = "<td style='width:110px;'></td>"; } $tout[] = <<<"END" <td style='width:100px;font-weight:bold;'>UserId</td> <td style='width:200px;font-weight:bold;'>Name</td> <td style='width:85px;font-weight:bold;'>UserType</td> END; foreach($rows as $row) { $ct ++; $cls = ($ct % 2 == 0) ? 'even' : 'odd'; $tout[] = "<tr class='{$cls}'>"; $firstcol = ''; if ($cb) { $name = "cb_{$row['id']}"; $firstcol = "<td style='width:40px;padding:2px 0;'>" . "<input type='checkbox' name='{$name}' id='{$name}'></td>"; } else { $sel = "<a href=\"{$this->baseurl}/user/edit/{$row['id']}\"" . " class=\"btn btn-mini btn-success\">Edit</a>"; $addo = ''; if (in_array($row['usertype'], $user_users)) { $addo = "<a href=\"{$this->baseurl}/user/addowner/{$row['id']}\" onclick=\"return confirm('Add {$row['name']} to owners of selected audit?');\" class=\"btn btn-mini btn-warning\">Add Owner</a>"; } $buttons = ''; // logit("UT: {$this->usertype}, {$this->audit['status']}"); if ($this->audit['status'] == 'INCOMPLETE') { $buttons .= $addo; //$firstcol .= "<td style='width:40px;padding:2px 0;'>{$addo}</td>"; } if ($this->usertype == 'ADMIN') { $buttons .= $sel; //$firstcol .= "<td style='width:40px;padding:2px 0;'>{$sel}</td>"; } if ($this->usertype == 'APPROVER') { $firstcol .= '<td></td>'; } $firstcol = "<td style='padding:2px 0;'>{$buttons}</td>"; } // $sl = ($row['slmta'] == 't') ? 'Yes' : 'No'; $tout[] = <<<"END" {$firstcol} <td>{$row['userid']}</td> <td>{$row['name']}</td> <td>{$rev_ut[$row['usertype']]}</td> END; // "<td style='width:45px;font-weight:bold;'>SLMTA</td>" . // <td>{$sl}</td> } $tout[] = '</table>'; $this->view->showlines = implode("\n", $tout); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function showUserTable() {\n echo \"<table id='users'>\n <tr>\n <th></th>\n <th>Utilisateur</th>\n <th>Mail</th>\n <th>Date de naissance</th>\n <th>Note</th>\n <th>Voitures</th>\n <th>Commentaires</th>\n </tr>\";\n for ($i = 0; $i < count(User::$listOfUsers); $i++ ) {\n echo \"<tr>\";\n echo \"<td>\";\n $iLink = $i + 1;\n echo \"<a href='users.php?user=$iLink'>Voir</a>\";\n echo \"</td>\";\n echo \"<td>\";\n echo User::$listOfUsers[$i]->getFirstName() . \" \" . User::$listOfUsers[$i]->getLastName();\n echo \"</td>\";\n echo \"<td>\";\n echo User::$listOfUsers[$i]->getEmail();\n echo \"</td>\";\n echo \"<td>\";\n echo User::$listOfUsers[$i]->getBirthDate();\n echo \"</td>\";\n echo \"<td>\";\n echo User::$listOfUsers[$i]->getRate();\n echo \"</td>\";\n echo \"<td>\";\n echo User::$listOfUsers[$i]->getListOfCars();\n echo \"</td>\";\n echo \"<td>\";\n echo User::$listOfUsers[$i]->getListOfComments();\n echo \"</td>\";\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "public static function showUserTableFromDb() {\n $model = new UserModel();\n $users = $model->getUsers();\n\n echo \"<table id='users'>\n <tr>\n <th></th>\n <th>Utilisateur</th>\n <th>Date de création</th>\n <th>Mail</th>\n <th>Date de naissance</th>\n <th>Note</th>\n <th>Voitures</th>\n <th>Commentaires</th>\n </tr>\";\n for ($i = 0; $i < count($users); $i++ ) {\n\n $user = $users[$i];\n array_push(User::$listOfUsers, $user);\n\n echo \"<tr>\";\n echo \"<td>\";\n $iLink = $i + 1;\n echo \"<a href='users.php?user=$iLink'>Voir</a>\";\n echo \"</td>\";\n echo \"<td>\";\n echo $user['firstName'] . \" \" . $user['lastName'];\n echo \"</td>\";\n echo \"<td>\";\n echo $user['date'];\n echo \"</td>\";\n echo \"<td>\";\n echo $user['email'];\n echo \"</td>\";\n echo \"<td>\";\n echo $user['birthDate'];\n echo \"</td>\";\n echo \"<td>\";\n if($user['rate'] === '0') { echo \"Pas de note\"; }\n echo \"</td>\";\n echo \"<td>\";\n echo $user['listOfCars'];\n echo \"</td>\";\n echo \"<td>\";\n echo $user['listOfComments'];\n echo \"</td>\";\n echo \"</tr>\";\n }\n $_SESSION['listOfUsers'] = User::$listOfUsers;\n\n echo \"</table>\";\n }", "public function ctrShowTableUser(){\n\n $item = null;\n $valor = null;\n\n $usuarios = ControllerUser::ctrShowUsers($item, $valor);\n\n $datosJson = '\n {\n \"data\":[';\n\n for($i = 0; $i < count($usuarios); $i++){\n \n $datosJson .= '[\n \"'.($i+1).'\",\n \"'.$usuarios[$i][\"id_institucion\"].'\",\n \"'.$usuarios[$i][\"acceso\"].'\",\n \"'.$usuarios[$i][\"nombre\"].'\",\n \"'.$usuarios[$i][\"labor\"].'\",\n \"'.$usuarios[$i][\"grupo\"].'\",\n \"'.$usuarios[$i][\"password\"].'\",\n \"'.$usuarios[$i][\"email\"].'\",\n \"'.$usuarios[$i][\"foto\"].'\",\n \"'.$usuarios[$i][\"verificacion\"].'\",\n \"'.$usuarios[$i][\"emailEncriptado\"].'\",\n \"'.$usuarios[$i][\"fecha\"].'\"\n ],';\n\n }\n\n $datosJson = substr($datosJson, 0, -1);\n\n $datosJson .= ']\n\n }\n\n ';\n\n echo $datosJson;\n\n }", "function show_users($conn) {\n\t$sql = \"SELECT * FROM Officer;\";\n\t$result = mysqli_query($conn, $sql);\n\techo \"<table>\";\n\techo \"<tr>\";\n\techo \"<th>Username </th>\";\n\techo \"<th> Role </th>\";\n\techo \"</tr>\";\n\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t$name = $row[\"Officer_Username\"];\n\t\t$role = $row[\"Officer_Role\"];\n\t\techo \"<tr>\";\n\t\techo \"<td>\". $name. \"</td>\";\n\t\techo \"<td>\". $role. \"</td>\";\n\t\techo \"</tr>\";\n\t}\n\techo \"</table>\";\n\t\n}", "private function showRows()\n\t{\n\t\techo '<tbody>';\n\t\t\n\t\t\tforeach ($this->data_show as $key => $row)\n\t\t\t{\n\t\t\t\techo '<tr>\n\t\t\t\t\t<td class=\"details-control\" data-row_id=\"row_' . $key . '\"></td>';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($row as $col => $val)\n\t\t\t\t\t\tif( in_array($col, $this->col_show) )\n\t\t\t\t\t\t\techo '<td>' . $val . '</td>';\n\t\t\t\t\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t\n\t\techo '</tbody>';\n\t}", "function display_rows() {\r\n\r\n # Get the records registered in the prepare_items method\r\n $records = $this->items;\r\n\r\n //Loop for each record\r\n if(!empty($records)){foreach($records as $rec){\r\n $custom_data = unserialize($rec->custom_data);\r\n\r\n echo '<tr id=\"record_'.$rec->id.'\">';\r\n echo '<td>'.stripslashes($rec->created_on).'</td>';\r\n echo '<td>'.stripslashes($rec->type).'</td>';\r\n echo '<td>'.stripslashes($rec->ip).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['OS']['name']).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['browser']['name']).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['location']['name']).'</td>';\r\n echo '<td>\r\n <a href=\"\" data-post=\"action=detailed_log&type=' .$rec->type. '&id=' .$rec->id. '&detail=full&ip=' .$rec->ip. '\" data-type=\"modal\" data-toggle=\"tooltip\" title=\"Show details\"><div class=\"dashicons dashicons-list-view\"></div></a>\r\n <a href=\"admin.php?page=cybercure_security_detected_attacks&type=' .$rec->type. '&delete=' .$rec->id. '\" data-toggle=\"tooltip\" title=\"Delete entry\"><div class=\"dashicons dashicons-trash\"></div></a>\r\n </td></tr>';\r\n }}\r\n }", "private function printUserData($user)\n {\n $this->info(\"Found a user:\");\n\n $table = new Table(new ConsoleOutput);\n\n $table->setHeaders(['id', 'name', 'e-mail', 'activated', 'last_login', 'created_at'])\n ->setRows($user->toArray())\n ->render();\n }", "function printUserTable() {\n\tglobal $dbh;\n\t$users = User::getAllUsers($dbh);\n\t//var_dump($users);\n\tforeach($users as $user) {\n\t\techo \"<p>\" . $user . \"</p>\";\n\t}\n}", "public function display_rows()\n {\n }", "public function display_rows()\n {\n }", "public function allUsers(){\n $all_data = User::all();\n $i = 1;\n\n $content=\"\";\n foreach ($all_data as $data){\n $content .='<tr>';\n $content .='<td>'. $i++ .'</td>';\n $content .='<td>'. $data->name .'</td>';\n $content .='<td>'. $data->role_id .'</td>';\n $content .='<td>'. $data->email .'</td>';\n $content .='<td>'. $data->cell .'</td>';\n $content .='<td>'. $data->uname .'</td>';\n $content .='<td>'. $data->gender .'</td>';\n $content .='<td>'. $data->edu .'</td>';\n $content .='<td> <img style=\"width: 60px;height: 60px\" src=\"media/users/'.$data->photo.'\"></td>';\n $content .= '<td>'.\n '<a href=\"#\" class=\"btn btn-sm btn-warning\" id=\"user_edit_btn\" edit_id=\"'.$data->id.'\">Edit</a> '.\n '<a href=\"#\" class=\"btn btn-sm btn-danger\" id=\"user_delete_btn\" delete_id=\"'.$data->id.'\">Delete</a> '\n .'</td>';\n $content .='</tr>';\n }\n return $content;\n\n }", "public static function showData() {\n\n\t\tforeach(self::$employee_array as $id => $employee) { // Pour chaque ligne on affiche chaque attribut correspondant au colonne du tableau\n\n\t\t\tif($employee->_entityShortName == null) // Gestion du cas où une entité a été supprimée mais pas l'employé de l'entité\n\t\t\t\techo \"<tr><td>null</td><td>\" . $employee->_lastName . \"</td><td>\" . $employee->_firstName . \"</td><td>\" . $employee->_login . \"</td><td><a href=\\\"user.php?action=modifier&id=\" . $employee->_id . \"\\\">modifier</a></td><td><a href=\\\"user.php?action=supprimer&id=\" . $id . \"\\\">supprimer</a></td></tr>\";\n\t\t\telse\n\t\t\t\techo \"<tr><td>\" . $employee->_entityShortName . \"</td><td>\" . $employee->_lastName . \"</td><td>\" . $employee->_firstName . \"</td><td>\" . $employee->_login . \"</td><td><a href=\\\"user.php?action=modifier&id=\" . $employee->_id . \"\\\">modifier</a></td><td><a href=\\\"user.php?action=supprimer&id=\" . $id . \"\\\">supprimer</a></td></tr>\";\n\t\t}\n\t}", "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 }", "function view($data)\n{\n\t\t\n\tstartOfPage();\n\tstartContent();\t\n\t$users = $data[\"users\"];\n\techo '<table><tr><th>USERNAME</th><th>EMAIL</th></tr>';\n\tif (!empty($users))\n\t{\n\tforeach ($users as $user)\n\t\t{\n\t\techo '<tr><td>',$user[\"username\"],'</td>';\n\t\techo '<td>',$user[\"email\"],'</td></tr>';\n\t\t}\n\n }\n echo '</table>';\n\tendContent();\n\tendOfPage();\n\n}", "function renderTableData($users_info)\n {\n echo '\n \t<tr>\n \t<td class=\"column1\">' . $users_info[0] . '</td>\n \t<td class=\"column2\">' . $users_info[2] . '</td>\n \t<td class=\"column2\">' . $users_info[3] . '</td>\n \t<td class=\"column2\">' . $users_info[4] . '</td>\n \t<td class=\"column3\">' . $users_info[1] . '</td>\n \t<td class=\"column4\">' . $users_info[7] . ' ' . $users_info[8] . '</td>\n\t\t\t</tr>\n ';\n }", "function listUser()\n {\n $conn = new mysqli(SERVER, USER, PASSWORD, DB);\n $sql = \"SELECT id_user, tb_user.nombre, apellidos, tb_tip_doc.tip_doc AS tip_doc,num_doc, correo,\n celular, password, tb_tip_user.nombre AS tip_user, tb_business.nombre AS nombreempresa, date_create\n FROM tb_user\n INNER JOIN tb_tip_doc ON tb_user.id_tip_doc=tb_tip_doc.id_tip_doc\n INNER JOIN tb_tip_user ON tb_user.id_tip_user=tb_tip_user.id_tip_user\n INNER JOIN tb_business ON tb_user.id_business=tb_business.id_business \";\n $result = $conn->query($sql);\n if ($result->num_rows > 0)\n {\n $table = \"\";\n $table .=\"<table id='example2' class='table table-bordered table-hover'>\";\n $table .=\"<thead>\";\n $table .=\"<tr>\";\n $table .=\"<th>ID</th>\";\n $table .=\"<th>NOMBRE</th>\";\n $table .=\"<th>APELLIDOS</th>\";\n $table .=\"<th>TIP DOC</th>\";\n $table .=\"<th>DOCUMENTO</th>\";\n $table .=\"<th>CORREO</th>\";\n $table .=\"<th>CELULAR</th>\";\n $table .=\"<th>TIP USUARIO</th>\";\n $table .=\"<th>EMPRESA</th>\";\n $table .=\"<th>CREACION</th>\";\n $table .=\"<th>OPCIONES</th>\";\n $table .=\"</tr>\";\n $table .=\"</thead>\";\n // output data of each row\n while($row = $result->fetch_assoc())\n {\n $table .=\"<thead>\";\n $table .= \"<tr>\";\n $table .= \"<td>\".$row['id_user'].\"</td>\";\n $table .= \"<td>\".$row['nombre'].\"</td>\";\n $table .= \"<td>\".$row['apellidos'].\"</td>\";\n $table .= \"<td>\".$row['tip_doc'].\"</td>\";\n $table .= \"<td>\".$row['num_doc'].\"</td>\";\n $table .= \"<td>\".$row['correo'].\"</td>\";\n $table .= \"<td>\".$row['celular'].\"</td>\";\n $table .= \"<td>\".$row['tip_user'].\"</td>\";\n $table .= \"<td>\".$row['nombreempresa'].\"</td>\";\n $table .= \"<td>\".$row['date_create'].\"</td>\";\n $table .= \"<td><a href=''><i class='nav-icon fas fa-edit' style='color:#239200;'></i></a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\";\n $table .= \"<a href=''><i class='nav-icon fas fa-trash-alt' style='color:red;'></i></a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\";\n $table .= \"<a href=''><i class='nav-icon fas fa-info-circle' style='color:blue;'></i></td>\";\n $table .= \"</tr>\";\n $table .=\"</thead>\";\n }\n $table .=\"</table>\";\n return $table;\n\n }\n\n }", "public function display_rows() {\n\n\t\t// Get the records registered in the prepare_items method\n\t\t$records = $this->items;\n\n\t\t// Get the columns registered in the get_columns and get_sortable_columns methods\n\t\tlist( $columns, $hidden ) = $this->get_column_info();\n\n\t\t// Loop for each record\n\t\tif ( ! empty( $records ) ) {\n\t\t\tforeach ( $records as $rec ) {\n\n\t\t\t\t// Open the line\n\t\t\t\techo '<tr id=\"record_' . $rec->ID . '\">';\n\t\t\t\tforeach ( $columns as $column_name => $column_display_name ) {\n\n\t\t\t\t\t// Style attributes for each col\n\t\t\t\t\t$class = \"class='$column_name column-$column_name'\";\n\t\t\t\t\t$style = '';\n\t\t\t\t\tif ( in_array( $column_name, $hidden ) ) {\n\t\t\t\t\t\t$style = ' style=\"display:none;\"';\n\t\t\t\t\t}\n\t\t\t\t\t$attributes = $class . $style;\n\n\t\t\t\t\tswitch ( $column_name ) {\n\t\t\t\t\t\tcase 'title':\n\t\t\t\t\t\t\t$edit_link = admin_url( 'admin.php?page=wo_edit_client&id=' . $rec->ID );\n\t\t\t\t\t\t\techo '<td ' . $attributes . '><strong><a href=\"' . $edit_link . '\" title=\"Edit\">' . stripslashes( $rec->post_title ) . '</a></strong>\n\t\t\t\t\t\t<div class=\"row-actions\">\n\t\t\t\t\t\t<span class=\"edit\"><a href=\"' . $edit_link . '\" title=\"' . __( 'Edit Client', 'wp-oauth' ) . '\">' . __( 'Edit', 'wp-oauth' ) . '</a> | </span>\n\t\t\t\t\t\t<span class=\"trash\"><a class=\"submitdelete\" title=\"' . __( 'delete this client', 'wp-oauth' ) . '\" onclick=\"wo_remove_client(\\'' . $rec->ID . '\\');\" href=\"#\">' . __( 'Delete', 'wp-oauth' ) . '</a> </span>';\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// case \"user_id\": echo '<td '.$attributes.'>'.stripslashes($rec->user_id).'</td>'; break;\n\t\t\t\t\t\tcase 'client_id':\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . get_post_meta( $rec->ID, 'client_id', true ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Close the line\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t}\n\t}", "public function show_usrlist($eltxtusr)\n {\n // load library to cek user session and level\n $this->pageauth->sess_level_auth();\n $this->load->model('pages/m_crud_report');\n $query = $this->m_crud_report->select_usrlist($eltxtusr);\n ?>\n <!-- tampilkan ketika dalam mode print -->\n <div class=\"title\" align=\"center\" style=\"margin-top: 10px;\">\n DAFTAR PENGGUNA (USER)<br/>\n YANG TERDAFTAR DALAM SISTEM\n </div>\n <table id=\"id_tblusr\" class=\"display compact table-hover\" role=\"grid\" aria-describedby=\"example2_info\">\n <thead>\n <tr>\n <th>NAMA USER</th>\n <th>KATA KUNCI</th>\n <th>AKSES</th>\n <th>NAMA LENGKAP</th>\n <th>OTORISASI</th>\n </tr>\n </thead>\n <tbody id=\"id_TbodyRptUsr\">\n <?php\n foreach ($query->result() as $row) {\n echo \" <tr>\";\n echo \" <td>\". $row->username .\"</td>\";\n echo \" <td>\". $row->password .\"</td>\";\n echo \" <td>\". $row->access .\"</td>\";\n echo \" <td>\". $row->fullname .\"</td>\";\n echo \" <td>\". $row->obj_level .\"</td>\";\n echo \" </tr>\";\n }\n ?>\n </tbody>\n </table>\n <?php\n }", "function display_rows() {\n \n //Get the records registered in the prepare_items method\n $records = $this->items;\n \n //Get the columns registered in the get_columns and get_sortable_columns methods\n list( $columns, $hidden ) = $this->get_column_info();\n \n //Loop for each record\n if(!empty($records)){foreach($records as $rec){\n \n // Format the status output\n if ( strtotime($rec->until) <= 0 ) {\n $rec->until = false;\n } else {\n //$rec->until = __('Membership ended','wpwt').\": \".strftime('%Y-%m-%d',strtotime($rec->until));\n $rec->until = '&nbsp;|&nbsp;Active until '.strftime('%Y-%m-%d',strtotime($rec->until));\n }\n $rec->since = __('Applied','wpwt').\": \".strftime('%Y-%m-%d',strtotime($rec->since));\n \n // Pre-define the edit link\n //$editlink = '/wp-admin/link.php?action=edit&link_id='.(int)$rec->link_id;\n\n //Open the line\n echo \"<tr id=\\\"record_\".$rec->groupID.\"\\\" class=\\\"row-active-\".$rec->active.\"\\\">\\n\";\n foreach ( $columns as $column_name => $column_display_name ) {\n \n //Style attributes for each col\n $class = \"class='$column_name column-$column_name'\";\n \n // Create output in cell\n switch ( $column_name ) {\n case \"col_what\": echo \"<td \".$class.\">\".$this->show_what($rec).\"</td>\\n\"; break;\n case \"col_user\": echo \"<td \".$class.\">\".$this->add_actions($rec).\"</td>\\n\"; break;\n case \"col_groupName\": echo \"<td \".$class.\">\".$rec->groupName.\"</td>\\n\"; break;\n case \"col_application\": echo \"<td \".$class.\">\".$rec->application\n .\"<br><b>\".$rec->since.\"</b></td>\\n\"; break;\n }\n }\n \n //Close the line\n echo \"</tr>\\n\";\n }}\n }", "public function table()\n\t{\n\t\t$this->datatables->select('experiment_id, user_id_caller, id');\n\t\t$this->datatables->from('caller');\n\n\t\t$this->datatables->edit_column('experiment_id', '$1', 'experiment_get_link_by_id(experiment_id)');\n\t\t$this->datatables->edit_column('user_id_caller', '$1', 'user_get_link_by_id(user_id_caller)');\n\t\t$this->datatables->edit_column('id', '$1', 'caller_actions(id)');\n\n\t\techo $this->datatables->generate();\n\t}", "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 tableShowUsers()\n{\n\n global $newUser, $userid, $dataRights;\n $input = sanitize_input($_POST[\"search\"]);\n\n $searchdata = database::getConnections()->viewAdminUsersSearch($input, $dataRights['rights']);\n\n if ($dataRights[\"rights\"] >= 90) {\n $form = '<div class=\"tableWrapper\"><table class=\"table table-bordered table-hover tablesaw tablesaw-stack\" data-tablesaw-sortable data-tablesaw-sortable-switch data-tablesaw-mode=\"stack\">\n <h1>Du hast nach \" ' . $input . ' \" gesucht!</h1>\n <thead><tr>\n <th data-tablesaw-sortable-col data-tablesaw-sortable-default-col>ID</th>\n <th data-tablesaw-sortable-col>VORNAME</th>\n <th data-tablesaw-sortable-col>NACHNAME</th>\n <th data-tablesaw-sortable-col>E-MAIL</th>\n <th data-tablesaw-sortable-col>LOGIN</th>\n <th data-tablesaw-sortable-col data-tablesaw-sortable-numeric>RECHTE</th>\n <th data-tablesaw-sortable-col data-tablesaw-sortable-numeric>STATUS</th>\n <th>BEARBEITEN</th>\n </tr></thead><tbody>';\n\n foreach ($searchdata as $entry) {\n $form .= '<tr>\n <td>' . $entry['id'] . '</td>\n <td>' . $entry['firstname'] . '</td>\n <td>' . $entry['lastname'] . '</td>\n <td>' . $entry['email'] . '</td>\n <td>' . $entry['lastlogin'] . '</td>\n <td>' . $entry['rights'] . '</td>\n <td>' . $entry['status'] . '</td>\n <td><form action=\"\" method=\"post\">\n <input type=\"hidden\" name=\"userId\" value=\"' . $entry['userid'] . '\">\n <input type=\"hidden\" name=\"tableName\" value=\"userdata\">\n <input type=\"hidden\" name=\"status\" value=\"' . $entry['status'] . '\">\n <input type=\"hidden\" name=\"rights\" value=\"' . $entry['rights'] . '\">\n <input class=\"btnAdmin\" type=\"submit\" name=\"edit\" value=\"Show\">\n <input class=\"btnAdmin\" type=\"submit\" name=\"edit\" value=\"Edit\">\n <input class=\"btnAdmin\" type=\"submit\" name=\"edit\" value=\"Delete\">\n <input class=\"btnAdmin\" type=\"submit\" name=\"edit\" value=\"Ent/Sperren\">\n <input class=\"btnAdmin\" type=\"submit\" name=\"edit\" value=\"Random Password\">\n </form></td></tr>';\n }\n\n $form .= '</tbody></table></div>';\n echo $form;\n\n } elseif ($dataRights[\"rights\"] >= 60) {\n\n $form = '<div class=\"tableWrapper\"><table class=\"table table-bordered table-hover tablesaw tablesaw-stack\" data-tablesaw-sortable data-tablesaw-sortable-switch data-tablesaw-mode=\"stack\">\n <h1>Du hast nach \" ' . $input . ' \" gesucht!</h1>\n <thead><tr>\n <th data-tablesaw-sortable-col>VORNAME</th>\n <th data-tablesaw-sortable-col>NACHNAME</th>\n <th data-tablesaw-sortable-col data-tablesaw-sortable-default-col>E-MAIL</th>\n <th data-tablesaw-sortable-col>LOGIN</th>\n <th data-tablesaw-sortable-col data-tablesaw-sortable-numeric>STATUS</th>\n <th>BEARBEITEN</th>\n </tr></thead><tbody>';\n\n foreach ($searchdata as $entry) {\n $form .= '<tr>\n <td>' . $entry['firstname'] . '</td>\n <td>' . $entry['lastname'] . '</td>\n <td>' . $entry['email'] . '</td>\n <td>' . $entry['lastlogin'] . '</td>\n <td>' . $entry['status'] . '</td>\n <td><form action=\"\" method=\"post\">\n <input type=\"hidden\" name=\"userId\" value=\"' . $entry['userid'] . '\">\n <input type=\"hidden\" name=\"tableName\" value=\"userdata\">\n <input type=\"hidden\" name=\"status\" value=\"' . $entry['status'] . '\">\n <input class=\"btnAdmin\" type=\"submit\" name=\"edit\" value=\"Delete\">\n <input class=\"btnAdmin\" type=\"submit\" name=\"edit\" value=\"Ent/Sperren\">\n <input class=\"btnAdmin\" type=\"submit\" name=\"edit\" value=\"Random Password\">\n </form></td></tr>';\n }\n\n $form .= '</tbody></table></div>';\n echo $form;\n\n } elseif ($dataRights[\"rights\"] >= 50) {\n\n $form = '<div class=\"tableWrapper\"><table class=\"table table-bordered table-hover tablesaw tablesaw-stack\" data-tablesaw-sortable data-tablesaw-sortable-switch data-tablesaw-mode=\"stack\">\n <h1>Du hast nach \" ' . $input . ' \" gesucht!</h1>\n <thead><tr>\n <th data-tablesaw-sortable-col>NACHNAME</th>\n <th data-tablesaw-sortable-col data-tablesaw-sortable-default-col>Email</th>\n <th data-tablesaw-sortable-col>LOGIN</th>\n <th data-tablesaw-sortable-col>REGISTERED</th>\n <th data-tablesaw-sortable-col data-tablesaw-sortable-numeric>STATUS</th>\n <th>BEARBEITEN</th>\n </tr></thead><tbody>';\n\n foreach ($searchdata as $entry) {\n $form .= '<tr>\n <td>' . $entry['lastname'] . '</td>\n <td>' . $entry['email'] . '</td>\n <td>' . $entry['lastlogin'] . '</td>\n <td>' . $entry['registered'] . '</td>\n <td>' . $entry['status'] . '</td>\n <td><form action=\"\" method=\"post\">\n <input type=\"hidden\" name=\"userId\" value=\"' . $entry['userid'] . '\">\n <input type=\"hidden\" name=\"tableName\" value=\"userdata\">\n <input type=\"hidden\" name=\"status\" value=\"' . $entry['status'] . '\">\n <input class=\"btnAdmin\" type=\"submit\" name=\"edit\" value=\"Ent/Sperren\">\n </form></td></tr>';\n }\n\n $form .= '</tbody></table></div>';\n echo $form;\n\n } else {\n echo '<div class=\"error\">Es ist ein Fehler aufgetreten, bitte versuchen Sie es erneut! Falls es dann immer noch nicht klappt, wenden Sie sich an den Besitzer und den Backend Developer! [email protected]</div>';\n }\n}", "public function displayTable () {\r\n\t\t// Echoes html for table containing customer data.\r\n\t\t\r\n\t\t$pdo = Database::connect();\r\n\t\t\r\n\t\t// SQL to execute:\r\n\t\t$sql = 'SELECT * FROM tdg_users ORDER BY id DESC';\r\n\t\t\r\n\t\techo '<table><tr><th>Name</th><th>Email</th><th>Mobile</th><th>Actions</th></tr>'; // echo out table header\r\n\t\t\r\n\t\tforeach ($pdo->query($sql) as $row) { // send query via the connection represented by $pdo\r\n\t\t\t// the query being sent is $sql\r\n\t\t\t// as $row -- as you iterate through, the current row will be named $row\r\n\t\t\t// Now we iterate through the rows selected\r\n\t\t\techo '<tr>';\r\n\t\t\techo '<td>'. $row['name'] . '</td>';\r\n\t\t\techo '<td>'. $row['email'] . '</td>';\r\n\t\t\techo '<td>'. $row['mobile'] . '</td>';\r\n\t\t\techo '<td width=\"250\">';\r\n\t\t\techo '<a class=\"btn\" href=\"read.php?id='. $row['id'].'\">Read</a>';\r\n\t\t\techo '&nbsp;';\r\n\t\t\techo '<a class=\"btn btn-success\" href=\"update.php?id='.$row['id'].'\">Update</a>';\r\n\t\t\techo '&nbsp;';\r\n\t\t\techo '<a class=\"btn btn-danger\" href=\"delete.php?id='.$row['id'].'\">Delete</a>';\r\n\t\t\techo '</td>';\r\n\t\t\techo '</tr>';\r\n\t\t} // End of table drawing loop\r\n\r\n\t\t\techo '</table>';\r\n\t\t\tDatabase::disconnect();\r\n\t}", "function showUsersStatus($user){\n\t if (sizeof($this->members) == 1){\n\t $table = '<h4 class=\"text-warning\">\n No other members here...</h4>';\n\t } else {\n\t $table = '<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><th>Status</th><th>Level</th>\n\t\t\t\t</tr>\n\t\t\t\t</tHead>\n\t\t\t\t<tBody>';\n\t foreach ($this->members as $member){\n\t if($member->getUserID() != $user->getUserID()){\n\t $table .= $member->getUserStatusAsRow();\n\t }\n\t }\n\t $table .= '\n\t\t\t\t</tBody></table>';\n\t }\n\t\t\n\t\treturn $table;\n\t}", "public function usersTable()\n {\n $users = User::all();\n return view('admin.users')->with('admin', Auth::user())\n ->with('users', $users);\n }", "public function index(){\n\t\t$data = array();\n\n\t\t$select_fields = '*';\n \t$is_multy_result = 2;\n\t\t$conditions = \"\";\n\t\t$data['users'] = $this->BlankModel->getTableData(USERS, $conditions, $select_fields, $is_multy_result);\t\n\t\t\t\t\n\t\tcommon_viewloader('users/index', $data);\n }", "function display_rows(){\n\n\t\t//Get the records registered in the prepare_items method\n\t\t$records = $this->items;\n\n\t\t//Get the columns registered in the get_columns and get_sortable_columns methods\n\t\tlist( $columns ) = $this->get_column_info();\n\n\t\t//Loop for each record\n\t\tif( ! empty( $records ) ){\n\n\t\t\tforeach( $records as $rec ){\n\n\t\t\t\t$position = ( $rec->post_order ) ? $rec->post_order : 0;\n\t\t\t\t$id = ( $rec->ID ) ? $rec->ID : 'N/A';\n\t\t\t\t$title = ( $rec->post_title ) ? $rec->post_title : 'N/A';\n\t\t\t\t$author = ( $rec->post_author ) ? $rec->post_author : 'N/A';\n\t\t\t\t$date = ( $rec->post_date ) ? $rec->post_date : 'N/A';\n\n\t\t\t\t//Open the line\n\t\t\t\techo '<tr id=\"record_' . $id . '\" class=\"draggable-tr\" data-order=\"' . $position . '\" data-post-id=\"' . $id . '\" draggable=\"true\">';\n\t\t\t\tforeach( $columns as $column_name => $column_display_name ){\n\n\n\t\t\t\t\t//Style attributes for each col\n\t\t\t\t\t$class = \"class='$column_name column-$column_name'\";\n\t\t\t\t\t$style = \"\";\n\t\t\t\t\tif( in_array( $column_name ) ){\n\t\t\t\t\t\t$style = ' style=\"display:none;\"';\n\t\t\t\t\t}\n\t\t\t\t\t$attributes = $class . $style;\n\n\n\t\t\t\t\t//Display the cell\n\t\t\t\t\tswitch( $column_name ){\n\t\t\t\t\t\tcase \"post_order\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $position ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_title\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $title ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_author\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( get_the_author_meta( 'nicename', $author ) ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"post_date\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . $date . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . stripslashes( $id ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t}", "public function active_users_datatable()\n\t\t{\n\t\t\t$list = $this->Users->get_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t\n\t\t\tforeach ($list as $user) {\n\t\t\t\t$no++;\n\t\t\t\t$row = array();\n\t\t\t\t\n\t\t\t\t$thumbnail = '';\n\t\t\t\t$filename = FCPATH.'uploads/users/'.$user->id.'/'.$user->avatar;\n\n\t\t\t\tif($user->avatar == '' || $user->avatar == null || !file_exists($filename)){\n\t\t\t\t\t$thumbnail = '<img src=\"'.base_url().'assets/images/icons/avatar.jpg\" class=\"img-responsive img-circle avatar-view\" width=\"40\" height=\"50\"/>';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$thumbnail = '<img src=\"'.base_url().'uploads/users/'.$user->id.'/'.$user->avatar.'\" class=\"img-responsive img-rounded\" width=\"40\" height=\"50\"/>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary pull-left\" style=\"margin:8% auto;\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$user->id.'\"><label for=\"cb\"></label></div><div class=\"\" style=\"margin-left:45%; margin-right:25%;\">'.$thumbnail.'</div>';\n\t\t\t\t\n\t\t\t\t$details_url = 'admin/user_details';\n\t\t\t\t\n\t\t\t\t$row[] = '<a href=\"!#\" data-toggle=\"modal\" data-target=\"#viewModal\" class=\"link\" onclick=\"viewUser('.$user->id.',\\''.$details_url.'\\');\" title=\"View '.$user->first_name .' '.$user->last_name.'\">'.$user->first_name .' '.$user->last_name.'</a>';\n\t\t\t\t\n\t\t\t\t$address = $user->address_line_1.', '.$user->city.' '.$user->postcode.', '.$user->state.', '.$user->country;\n\t\t\t\tif($user->address_line_2 != ''){\n\t\t\t\t\t$address = $user->address_line_1.', '.$user->address_line_2.', '.$user->city.' '.$user->postcode.', '.$user->state.', '.$user->country;\n\t\t\t\t}\n\t\t\t\t//USER PROFILE COMPLETION PERCENTAGE\n\t\t\t\t$profile_completion = $this->Users->profile_completion($user->email_address);\n\t\t\t\t//display progress bar\n\t\t\t\t$row[] = '<div class=\"project_progress\"><div class=\"progress progress_sm\">\n <div class=\"progress-bar bg-green\" role=\"progressbar\" aria-valuenow=\"'.$profile_completion.'\"\n aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:'.$profile_completion.'%\"></div>\n </div><br/><small>'.$profile_completion.'% Complete</small></div>';\n\t\t\t\t\t\t\n\t\t\t\t//$row[] = substr($address, 0, 25).'...';\n\t\t\t\t\n\t\t\t\t//$account_balance = number_format($user->account_balance, 2);\n\t\t\t\t//$row[] = $account_balance;\n\t\t\t\t\n\t\t\t\t//$row[] = $member->username;\n\t\t\t\t//$row[] = $user->account_number;\n\t\t\t\t//count reviews\n\t\t\t\t$count_reviews = $this->Reviews->count_user_reviews($user->id);\n\t\t\t\tif($count_reviews == '' || $count_reviews == null || $count_reviews < 1 ){\n\t\t\t\t\t$count_reviews = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//get product ratings\n\t\t\t\t$rating = $this->db->select_avg('rating')->from('reviews')->where('\tseller_email', $user->email_address)->get()->result();\n\t\t\t\t\t\n\t\t\t\t$rating_box = '';\n\t\t\t\t\n\t\t\t\tif($rating[0]->rating == '' || $rating[0]->rating == null || $rating[0]->rating < 1){\n\t\t\t\t\t$ratings = 0;\n\t\t\t\t\t$rating_box = '<div class=\"starrr stars-existing\" data-rating=\"'.round($rating[0]->rating).'\"></div> <span class=\"\">No reviews yet</span>';\n\t\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$rating_box = '<div class=\"starrr stars-existing\" data-rating=\"'.round($rating[0]->rating).'\"></div> <span class=\"stars-count-existing\">'.round($rating[0]->rating).'</span> star(s) (<span class=\"review-count\">'.$count_reviews.'</span>)';\n\t\t\t\t}\n\t\t\t\t$row[] = $rating_box;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$last_updated = $user->last_updated;\n\t\t\t\tif($last_updated == '0000-00-00 00:00:00' || $last_updated == ''){ \n\t\t\t\t\t\t$last_updated = 'Never'; \n\t\t\t\t}else{ \n\t\t\t\t\t$last_updated = date(\"d M y\", strtotime($last_updated)).' at '.date(\"h:i A\", strtotime($last_updated)); \n\t\t\t\t\t//date(\"d M y h:i A\", strtotime($last_updated))\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t$row[] = $last_updated;\n\t\t\t\t\n\t\t\t\t$last_login = $user->last_login;\n\t\t\t\tif($last_login == '0000-00-00 00:00:00' || $last_login == ''){ \n\t\t\t\t\t\t$last_login = 'Never'; \n\t\t\t\t}else{ \n\t\t\t\t\t$last_login = date(\"d M y\", strtotime($last_login)).' at '.date(\"h:i A\", strtotime($last_login)); \n\t\t\t\t\t//date(\"d M y h:i A\", strtotime($last_login))\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t$row[] = $last_login;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t//\t$row[] = date(\"F j, Y\", strtotime($user->date_created));\n\t\t\t\t\n\t\t\t\t$model = 'users';\n\t\t\t\t\n\t\t\t\t$url = 'message/new_message_detail';\n\t\t\t\t\n\t\t\t\t//prepare buttons\n\t\t\t\t\n\t\t\t\t$row[] = '<a data-toggle=\"modal\" data-target=\"#messageModal\" class=\"btn btn-primary btn-xs\" onclick=\"sendDirectMessage('.$user->id.',\\''.$model.'\\',\\''.$url.'\\')\" title=\"Send Message to '.$user->first_name .' '.$user->last_name.'\"><i class=\"fa fa-envelope\"></i> Send Message</a>\n\t\t\t\t\n\t\t\t\t<a data-toggle=\"modal\" data-target=\"#addUserModal\" class=\"btn btn-warning btn-xs\" onclick=\"editUser('.$user->id.',\\''.$details_url.'\\');\" title=\"Edit '.$user->first_name .' '.$user->last_name.'\"><i class=\"fa fa-edit\"></i> Edit</a>\n\t\t\t\t\n\t\t\t\t<a data-toggle=\"modal\" class=\"btn btn-danger btn-xs\" data-target=\"#suspendModal\" onclick=\"suspendUser('.$user->id.',\\''.$details_url.'\\');\" title=\"Suspend '.$user->first_name .' '.$user->last_name.'\"><i class=\"fa fa-ban\"></i> Suspend</a>\n\t\t\t\t';\n\t\t\t\t//<a data-toggle=\"modal\" data-target=\"#editModal\" class=\"btn btn-primary btn-xs\" onclick=\"editUser('.$user->id.');\" id=\"'.$user->id.'\" title=\"Edit '.$user->first_name .' '.$user->last_name.'\"><i class=\"fa fa-edit\"></i></a>\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\t\t//\n\t\t\t\t\n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Users->count_all(),\n\t\t\t\t\"recordsFiltered\" => $this->Users->count_filtered(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "public function temp_users_datatable()\n\t\t{\n\t\t\t$list = $this->Temp_users->get_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t\n\t\t\tforeach ($list as $user) {\n\t\t\t\t$no++;\n\t\t\t\t$row = array();\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$user->id.'\"><label for=\"cb\"></label></div>';\n\t\t\t\t\n\t\t\t\t$row[] = $user->first_name .' '.$user->last_name;\n\t\t\t\t\n\t\t\t\t$row[] = $user->email_address;\n\t\t\t\t$row[] = $user->telephone;\n\t\t\t\t\n\t\t\t\t$ip_details = '<p><strong>IP: </strong>'.$user->ip_address.'</p>';\n\t\t\t\t$ip_details .= $user->ip_details;\n\t\t\t\t\n\t\t\t\t$row[] = $user->ip_address;\n\t\t\t\t\n\t\t\t\t$row[] = date(\"F j, Y\", strtotime($user->date_created));\n\t\t\t\t\n\t\t\t\t$url = 'admin/temp_user_details';\n\t\t\t\t\n\t\t\t\t$row[] = '<a data-toggle=\"modal\" class=\"btn btn-success btn-xs\" data-target=\"#activateModal\" onclick=\"activateUser('.$user->id.',\\''.$url.'\\');\" id=\"'.$user->id.'\" title=\"Activate '.$user->first_name .' '.$user->last_name.'\"><i class=\"fa fa-check-circle fa-lg\" aria-hidden=\"true\"></i> Activate User</a>';\n\t\t\t\t\n\t\t\t\t$model = 'temp_users';\n\t\t\t\t\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t \n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Temp_users->count_all(),\n\t\t\t\t\"recordsFiltered\" => $this->Temp_users->count_filtered(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "public function actionTable()\n {\n if (isset($_POST['editableAttribute'])) {\n $model = User::find()\n ->where(['_id' => $_POST['editableKey']])\n ->limit(1)\n ->one();\n if ($_POST['editableAttribute']=='type') {\n $model['type']=intval($_POST['Users'][$_POST['editableIndex']]['type']);\n if ($model['active']==true) $model['active']=1;\n else $model['active']=0;\n $model->save();\n return json_encode($model->errors);\n }\n if ($_POST['editableAttribute']=='active') {\n if ($_POST['Users'][$_POST['editableIndex']]['active']==true)\n $model['active']=1;\n else $model['active']=0;\n $model->save();\n return json_encode(\"hui2\");\n }\n }\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination->pageSize = 15;\n return $this->render(\n 'table',\n [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]\n );\n }", "public function all_users() {\n $result = $this->UsersModel->view_all_users();\n $users = '';\n foreach ($result as $user) {\n $users .= '<tr>'.\n '<td>EMP'.sprintf(\"%04d\", $user->id).'</td>'.\n '<td>'.$user->first_name.' '.$user->last_name.'</td>'.\n '<td>'.$user->email.'</td>'.\n '<td>'.$user->user_type.'</td>'.\n '<td>'.($user->active == 1 ? '<span class=\"label label-success\">Active</span>': '<span class=\"label label-danger\">Inactive</span>').'</td>'.\n '<td class=\"text-center\">'.(is_null($user->last_login) ? '-': $user->last_login).'</td>'.\n '<td>'.$user->create_date.'</td>'.\n '<td class=\"text-center\">'.(is_null($user->edit_date) ? '-': $user->edit_date).'</td>'.\n '<td class=\"text-right\">'.\n '<button id=\"edit_user\" class=\"btn btn-default btn-xs\" data=\"'.$user->id.'\">Edit</button>&nbsp;&nbsp;&nbsp;&nbsp;'.\n ($user->active == 1 ? '<button id=\"active\" class=\"btn btn-default btn-xs\" data=\"'.$user->id.'\"><strong class=\"text-danger\">Inactive</strong></button>&nbsp;&nbsp;&nbsp;&nbsp;': '<button id=\"inactive\" class=\"btn btn-default btn-xs\" data=\"'.$user->id.'\" style=\"width: 54.2px;\"><strong class=\"text-success\">Active</strong></button>&nbsp;&nbsp;&nbsp;&nbsp;').\n '<button id=\"delete_user\" class=\"btn btn-default btn-xs\" data=\"'.$user->id.'\">Delete</button>&nbsp;&nbsp;&nbsp;&nbsp;'.\n '</td>'.\n '</tr>';\n }\n echo json_encode($users);\n }", "public function showUsers()\n {\n $users = User::join('role_user', 'role_user.user_id', 'users.id')\n ->join('roles', 'roles.id', 'role_user.role_id')\n ->select(['users.id', 'users.name', 'users.email', 'surname', 'contact_number', 'users.created_at', 'users.updated_at', 'display_name']);\n\n return Datatables::of($users)\n ->addColumn('action', function ($user) {\n $re = 'users/' . $user->id;\n $sh = 'users/show/' . $user->id;\n $del = 'users/delete/' . $user->id;\n return '<a class=\"btn btn-primary\" href=' . $sh . ' style=\"margin:0.4em;\"><i class=\"glyphicon glyphicon-eye-open\"></i></a> <a class=\"btn btn-success\" style=\"margin:0.4em;\" href=' . $re . '><i class=\"glyphicon glyphicon-edit\"></i></a> <a class=\"btn btn-danger\" style=\"margin:0.4em;\" href=' . $del . '><i class=\"glyphicon glyphicon-trash\"></i></a>';\n })\n ->make(true);\n }", "public function print_attempt_report_table($records, $cm, $user) {\n $record = current($records);\n $profileurl = new moodle_url('/user/profile.php', array('id' => $record->userid));\n $namelink = html_writer::link($profileurl, fullname($user));\n $output = $this->heading(get_string('indvuserreport', 'adaptivequiz', $namelink));\n $output .= $this->create_attempt_report_table($records, $cm);\n return $output;\n }", "function display_table($sql, $tid) {\n \n $userdb = userConnect();\n \n try {\n //code to print column headings\n $stmt = $userdb->query($sql . ' LIMIT 1');\n $fields = array_keys($stmt->fetch(PDO::FETCH_ASSOC));\n echo '<table id=\"' . $tid . '\" class=\"recordset\">';\n echo '<thead>';\n echo '<tr id=\"header\">';\n echo '<td></td>'; //empty cell for checkbox column\n for ($i = 1; $i < count($fields); $i++) {\n echo '<td>' . $fields[$i] . '</td>';\n }\n echo '</tr>';\n echo '</thead>';\n $stmt = null;\n \n //code to print records\n $stmt = $userdb->query($sql);\n echo '<tbody>';\n while ($record = $stmt->fetch(PDO::FETCH_NUM)) {\n $rowcount++;\n if ($rowcount % 2 == 0) {\n echo '<tr id=\"' . $record[0] .'\" class=\"altrow\">';\n } else {\n echo '<tr id=\"' . $record[0] .'\">';\n }\n echo '<td><input type=\"checkbox\" class=\"recordselect\" id=\"' . $record[0] . '\"/></td>';\n for ($i = 1; $i < count($record); $i++) {\n echo '<td>' . $record[$i] . '</td>';\n }\n echo '</tr>';\n }\n echo '</tbody>'; \n echo '</table>';\n } catch(PDOException $e) {\n echo $e->getMessage();\n die();\n }\n }", "public function index()\n {\n\n Gate::authorize('haveaccess','user.index');\n\n //$users = User::orderBy('id','Asc')->paginate(8);\n\n //return view('user.index',compact('users'));\n\n //$users = User::all();\n\n return datatables()\n ->eloquent(User::query())\n //->eloquent($users)\n ->addColumn('accion', 'user.adicionales' )\n ->rawColumns(['accion'])\n ->toJson();\n\n }", "private function populate_rows() {\n\t\t\t$this->load->model('users_table');\n\t\t\t$data = $this->users_table->get_entries(); //echo $data[0]->Ime; //echo $data[0]->Prezime;\n\n\t return $data;\n\t\t}", "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 result_to_table($result)\n\t{\n\n\t\techo \" <TD>\\n\";\n\t\techo \"<table border=1 BGCOLOR=\".\" >\\n\";\n\n\t\t//Header\n\t\t$field_num = mysql_num_fields($result);\n\t\techo \"<tr>\\n\";\n\t\techo \"\\t<td><b>ID</b></td>\\n\";\n\t\techo \"\\t<td><b>Name</b></td>\\n\";\n\t\techo \"\\t<td><b>Vorname</b></td>\\n\";\n\t\t// echo \"\\t<td><b>Orga</b></td>\\n\";\n\t\techo \"\\t<td><b>Charakter</b></td>\\n\";\n\t\techo \"\\t<td><b>email</b></td>\\n\";\n\t\techo \"\\t<td><b>Telefon</b></td>\\n\";\n\t\techo \"</tr>\\n\";\n\n\t\t//Daten\n\t\twhile ($row = mysql_fetch_row($result))\n\t\t{\n\t\t\techo \"<tr>\";\n\t\t\tfor ($i=0; $i<$field_num; $i++)\n\t\t\t{\n\t\t\t\t// if ($i==0) {\n\t\t\t\t//echo \"\\t<td><a href=\\\"\".$PHP_SELF.\"?op=detail&user_id=$row[$i]\\\">$row[$i]</a></td>\\n\";\n\t\t\t\t// }\n\t\t\t\t// echo \"\\t<td>\".$row[$i].\"&nbsp;</td>\\n\";\n\t\t\t\tif ($i==5)\n\t\t\t\t{\n\t\t\t\t\techo \"\\t<td><a href=\\\"mailto:$row[$i]\\\"> $row[$i]</a></td>\\n\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\techo \"\\t<td>\".$row[$i].\"&nbsp;</td>\\n\";\n\t\t\t\t};\n\t\t\t}\n\t\t\techo \"<tr>\\n\";\n\t\t}\n\t\techo \"</table>\\n\";\n\t\techo \" </TD>\\n\";\n\t}", "function display_rows() {\n\n //Récuperation des quotes\n $records = $this->items;\n\n //Récuperation des colonnes\n list( $columns, $hidden ) = $this->get_column_info();\n if(!empty($records)){\n //pour chaque quote\n foreach($records as $rec){\n\n echo '<tr id=\"record_'.$rec->id.'\">';\n foreach ( $columns as $column_name => $column_display_name ) {\n\n $class = \"class='$column_name column-$column_name'\";\n $style = \"\";\n if ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n $attributes = $class . $style;\n\n $editlink = '/wp-admin/link.php?action=edit&id='.(int)$rec->id;\n\n switch ( $column_name ) {\n case \"col_id\":\techo '<td '.$attributes.'>'.stripslashes($rec->id).'</td>';\tbreak;\n case \"col_author\": echo '<td '.$attributes.'>'.stripslashes($rec->author).'</td>'; break;\n case \"col_quote\": echo '<td '.$attributes.'>'.stripslashes($rec->quote).'</td>'; break;\n case \"col_action\": echo '<td '.$attributes.'><a class=\"button\" style=\"margin-right:10px;\" href=\"admin.php?page=add_funny_quotes&quote='.stripslashes($rec->id).'&action=edit\">Editer</a><a class=\"button\" onclick=\"return confirm(\\'Etes-vous sur de vouloir supprimer la quote ?\\')\" href=\"admin.php?page=add_funny_quotes&quote='.stripslashes($rec->id).'&action=delete\">Supprimer</a></td>'; break;\n }\n\n }\n\n echo'</tr>';\n\n }\n }\n }", "static function listUserTickets( $users, $id, $courseid ) {\n global $CFG;\n\n // build html\n $table = new html_table();\n\n // table headings\n $table->head = array(\n get_string( 'username','block_otrs' ),\n get_string( 'email','block_otrs' ),\n '&nbsp;',\n );\n\n // iterate over users\n $count = 1;\n foreach ($users as $user) {\n\n // view ticket link\n $link = new moodle_url('/blocks/otrs/list_tickets.php', array('id'=>$id, 'user'=>$user->id, 'courseid'=>$courseid));\n\n $table->data[] = array(\n fullname( $user ),\n $user->email,\n \"<a class=\\\"btn btn-info\\\" href=\\\"$link\\\">\".get_string('view','block_otrs').\"</a>\",\n );\n $count++;\n }\n\n $html = html_writer::table($table);\n\n // check for nothing shown\n if ($count==1) {\n $html .= \"<center><p class=\\\"alert alert-danger\\\">\".get_string('nousers','block_otrs').\"</p></center>\";\n }\n\n $html .= '</div>';\n return $html;\n }", "public function showContactPersonsTable() {\r\n\t\t$stmt = $this->connect()->query(\"SELECT * FROM contact_person\");\r\n\t\techo \"<h3>Contact Person Table</h3>\";\r\n\t\techo \"<table><tr><td>\" . \"phone_number\" . \"</td><td>\" . \"email\" . \"</td></tr>\";\r\n\t\twhile ($row = $stmt->fetch()) {\r\n\t\t\techo \"<tr><td>\" . $row['phone_number'] . \"</td><td>\" . $row['email'] . \"</td></tr>\"; \r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}", "public function showUser($name)\n {\n //fetch data from the Users class\n $models = $this->getUser($name); // array of UserModel\n foreach ($models as $user) {\n echo \"Full name: \" . $user->getFirstName() . \" \" . $user->getLastName(); // <---- here. there is a forEach loop here, so each $user is an Array inside the $models array\n }\n // what do i want to show inside the website from here?\n // its an associative array so we need to refer to the columns in the database\n }", "public function displayTable(array $rows): void\n {\n $table = new Table(new ConsoleOutput());\n $table\n ->setHeaders(array_keys($rows[0]))\n ->setRows($rows)\n ;\n $table->render();\n }", "protected function show()\n {\n $userModel = config('admin.database.users_model');\n\n $headers = ['User Name', 'Name', 'Roles', 'Permissions', 'Routes', 'Actions', 'Created', 'Updated'];\n\n $userslist = [];\n foreach ($userModel::all() as $user) {\n $roles = implode(',', $user->roles->pluck('name')->toArray());\n\n $userdata = [\n 'username' => $user->username,\n 'name' => $user->name,\n 'roles' => $roles,\n 'permission' => implode(\"\\n\", $user->allPermissions(true)->pluck('name')->toArray()),\n 'routes' => implode(\"\\n\", $user->allRoutes(true)->pluck('http_path')->toArray()),\n 'actions' => implode(\"\\n\", $user->allActions(true)->pluck('name')->toArray()),\n 'created_at' => date($user->created_at),\n 'updated_at' => date($user->updated_at),\n ];\n\n array_push($userslist, $userdata);\n }\n\n $this->table($headers, $userslist);\n }", "public function showUsers(){\n\n\t\ttry{\n\t\t\trequire CONTROLLER_DIR . '/dbConnecterController.php';\n\n\t\t\t$result = $db->query('SELECT id, username FROM users ORDER BY id');\n\n\n\t\t\techo \"<table border='1'>\n\t\t\t\t<tr>\n\t\t\t\t<th>ID</th>\n\t\t\t\t<th>Username</th>\n\t\t\t\t<th></th>\n\t\t\t\t<th></th>\n\t\t\t\t</tr>\";\n\t\t\t// This will make it so admin is not displayed on the table\n\t\t\t$row = $result->fetchColumn();\n\t\t\twhile($row = $result->fetch(PDO::FETCH_ASSOC)){\n\t \t\t\techo \"<tr>\";\n\t\t echo \"<td>\" . $row['id'] . \"</td>\";\n\t\t echo \"<td>\" . $row['username'] . \"</td>\";\n\t\t echo '<td> \n\t\t \t\t<form method=\"GET\" action=\"/showEditUserPage\"> \n\t\t \t\t\t<input type=\"hidden\" name=\"id\" value=\"' . $row['id'] . '\"/>\n\t\t\t \t\t<input type=\"hidden\" name=\"username\" value=\"' . $row['username'] . '\"/>\n\t\t \t\t\t<input type=\"submit\" value=\"EDIT\" name=\"showEditUserPage\"/> \n\t\t \t\t</form></td>';\n\t\t echo '<td> \n\t\t \t\t<form method=\"POST\" action=\"/deleteUser\"> \n\t\t\t \t\t<input type=\"hidden\" name=\"id\" value=\"' . $row['id'] . '\"/>\n\t\t \t\t\t<input type=\"submit\" value=\"DELETE\" name=\"deleteUser\"/> \n\t\t \t\t</form></td>';\n\t\t echo \"</tr>\";\n\t\t\t}\n\t\t\techo '</table>';\n\n\t\t} catch (PDOException $e) {\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t\tdie();\n\t\t}\n\t}", "function print_user_name_results($display_count, $count, $query_result) {\n // Get the total number of matches\n $count_row = pg_fetch_row($count);\n $total_count = $count_row[0];\n // Update the display count to be the minimum between display count and total count.\n $display_count = $total_count < $display_count ? $total_count : $display_count; \n\n // Print results table.\n echo \"<table class=\\\"pop-over-table pure-table pure-table-bordered\\\">\";\n echo \"<thead><tr>\";\n echo \"<td>UID</td>\";\n echo \"<td>First Name</td>\";\n echo \"<td>Last Name</td>\";\n echo \"</tr></thead><tbody>\";\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n for ($i = 0; $i < $num; $i++) {\n // echo\"<td>\".$row[$i].\"</td>\";\n if ($i == 0) {\n echo '<td class=\"userinfo_uid\">'.$row[$i].'</td>';\n } else if ($i == 1) {\n echo '<td class=\"userinfo_first_name\">'.$row[$i].'</td>';\n } else if ($i == 2) {\n echo '<td class=\"userinfo_last_name\">'.$row[$i].'</td>';\n } else {\n echo\"<td>\".$row[$i].\"</td>\";\n }\n }\n echo \"<tr>\";\n }\n echo \"</tbody></table>\";\n\n // Echo display count summary.\n echo \"<p class=\\\"count_summary\\\">Showing: \".$display_count.\" of \".$total_count.\"</p>\";\n }", "function displayCustomers($customers){\n $content = \"<table>\n <tr>\n <th>UserID</th>\n <th>First Name</th>\n <th>Last Name</th>\n <th>City</th>\n <th>State</th>\n <th>Email</th>\n </tr>\";\n\n foreach($customers as $customer){\n $content .= \"<tr>\";\n $content .= \"<td style='color: #0000ff; text-decoration: underline'><a href='\".(\"edit_user.php?id=$customer->customerId\").\"'>\".$customer->loginId.\"</a></td>\";\n $content .= \"<td>\".$customer->firstName.\"</td>\";\n $content .= \"<td>\".$customer->lastName.\"</td>\";\n $content .= \"<td>\".$customer->city.\"</td>\";\n $content .= \"<td>\".$customer->state.\"</td>\";\n $content .= \"<td>\".$customer->email.\"</td>\";\n $content .= \"</tr>\";\n }\n $content .= \"</table>\";\n return $content;\n}", "public function allUsers()\n\t{\n\t\t$data['users'] = $this->MainModel->selectAll('users', 'first_name');\n\t\t$this->load->view('layout/header');\n\t\t$this->load->view('layout/sidebar');\n\t\t$this->load->view('template/all-users', $data);\n\t\t$this->load->view('layout/footer');\n\t}", "function printUserAuditResultsToTable($pdoStmt, $tableHeaders) {\n\t// Printing the table\n\techo \"<table id='auditResults'>\";\n\t\n\t// Looping through the headers\n\techo \"<thead>\";\n\tforeach($tableHeaders as $th)\n\t\techo \"<th>\" . $th . \"</th>\";\n\techo \"</thead>\";\n\n\t// Looping through results of the query\n\techo \"<tbody>\";\n\twhile($row = $pdoStmt->fetch(PDO::FETCH_ASSOC)) {\n\t\techo \"<tr>\";\n\n\t\t// Printing each value from the query\n\t\techo \"<td>\" . $row['MessageID'] . \"</td>\";\n\t\techo \"<td>\" . $row['ChatID'] . \"</td>\";\n\t\techo \"<td>\" . $row['Message'] . \"</td>\";\n\t\techo \"<td>\" . $row['Time_Sent'] . \"</td>\";\n\t\techo \"<td>\" . $row['Time_Created'] . \"</td>\";\n\t\techo \"<td>\" . $row['Status'] . \"</td>\";\n\t\t//echo \"<td>\" . $row['SenderID'] . \"</td>\";\n\n\t\t// Since we don't know who the reciever is, we need to test who the reciever is.\n\t\t// This way, we can be certain that whoever the sender is will be printed under\n\t\t// the correct header.\n\t\tif($row['SenderID'] === $row['UserID_1']) {\n\t\t\techo \"<td>\" . $row['UserID_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['First_Name_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Last_Name_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Email_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Username_1'] . \"</td>\";\n\n\t\t\techo \"<td>\" . $row['UserID_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['First_Name_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Last_Name_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Email_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Username_2'] . \"</td>\";\n\t\t} else {\n\t\t\techo \"<td>\" . $row['UserID_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['First_Name_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Last_Name_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Email_2'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Username_2'] . \"</td>\";\n\n\t\t\techo \"<td>\" . $row['UserID_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['First_Name_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Last_Name_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Email_1'] . \"</td>\";\n\t\t\techo \"<td>\" . $row['Username_1'] . \"</td>\";\n\t\t}\n\n\n\t\techo \"</tr>\";\n\t}\n\n\n\techo \"</tbody>\";\n\techo \"</table>\";\n\n}", "public function admin_users_datatable()\n\t\t{\n\t\t\t$list = $this->Admin->get_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t\n\t\t\tforeach ($list as $user) {\n\t\t\t\t$no++;\n\t\t\t\t$row = array();\n\t\t\t\t\n\t\t\t\t$thumbnail = '';\n\t\t\t\t$filename = FCPATH.'uploads/admins/'.$user->id.'/'.$user->avatar;\n\n\t\t\t\tif($user->avatar == '' || $user->avatar == null || !file_exists($filename)){\n\t\t\t\t\t$thumbnail = '<div class=\"\" style=\"margin-left:25%; margin-right:25%;\"><img src=\"'.base_url().'assets/images/icons/avatar.jpg\" class=\"img-responsive img-circle avatar-view\" width=\"40\" height=\"50\"/></div>';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$thumbnail = '<div class=\"\" style=\"margin-left:25%; margin-right:25%;\"><img src=\"'.base_url().'uploads/admins/'.$user->id.'/'.$user->avatar.'\" class=\"img-responsive img-circle\" width=\"40\" height=\"50\"/></div>';\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary pull-left\" style=\"margin:8% auto;\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$user->id.'\"><label for=\"cb\"></label></div><div class=\"\" style=\"margin-left:45%; margin-right:25%;\">'.$thumbnail.'</div>';\n\t\t\t\t\n\t\t\t\t//$row[] = '<input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$user->id.'\">';\n\t\t\t\t$url = 'admin/admin_details';\n\t\t\t\t\n\t\t\t\t$row[] = '<a href=\"#!\" data-toggle=\"modal\" data-target=\"#viewModal\" class=\"link\" id=\"'.$user->id.'\" title=\"View '.ucwords($user->admin_name).'\" onclick=\"viewAdmin('.$user->id.',\\''.$url.'\\')\">'.ucwords($user->admin_name).' ('.$user->admin_username.')</a>';\n\t\t\t\t\n\t\t\t\t$row[] = $user->access_level;\n\t\t\t\n\t\t\t\t//'last_updated' => date('Y-m-d H:i:s'),\n\t\t\t\t$last_updated = $user->last_updated;\n\t\t\t\tif($last_updated == '0000-00-00 00:00:00' || $last_updated == ''){ \n\t\t\t\t\t$last_updated = 'Never'; \n\t\t\t\t}else{ \n\t\t\t\t\t$last_updated = date(\"F j, Y, g:i a\", strtotime($last_updated)); \n\t\t\t\t}\n\t\t\t\t$row[] = $last_updated;\n\t\t\t\t\n\t\t\t\t$last_login = $user->last_login;\n\t\t\t\tif($last_login == '0000-00-00 00:00:00' || $last_login == ''){ \n\t\t\t\t\t$last_login = 'Never'; \n\t\t\t\t}else{ \n\t\t\t\t\t$last_login = date(\"F j, Y, g:i a\", strtotime($last_login)); \n\t\t\t\t}\n\t\t\t\t$row[] = $last_login;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$row[] = date(\"F j, Y\", strtotime($user->date_created));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//prepare buttons\n\t\t\t\t$model = 'admin_users';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$row[] = '<a data-toggle=\"modal\" data-target=\"#messageModal\" class=\"btn btn-success btn-xs\" onclick=\"sendDirectMessage('.$user->id.',\\''.$model.'\\',\\''.$url.'\\')\" id=\"'.$user->id.'\" title=\"Send Message to '.ucwords($user->admin_name).'\"><i class=\"fa fa-envelope\"></i> Message</a>\n\t\t\t\t<a data-toggle=\"modal\" data-target=\"#editModal\" class=\"btn btn-primary btn-xs\" title=\"Click to Edit\" onclick=\"editAdmin('.$user->id.',\\''.$url.'\\')\"><i class=\"fa fa-pencil\"></i> Edit</a>';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t \n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Admin->count_all(),\n\t\t\t\t\"recordsFiltered\" => $this->Admin->count_filtered(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "function print_friend_request_pure_table($query_result) {\n echo \"<table class=\\\"pure-table pure-table-bordered\\\">\";\n\n echo \"<thead><tr>\";\n echo \"<td>UID</td>\";\n echo \"<td>UID2</td>\";\n echo \"<td>First Name</td>\";\n echo \"<td>Last Name</td>\";\n echo \"<td>Age</td>\";\n echo \"<td>Gender</td>\";\n echo \"<td>Location</td>\";\n echo \"<td>Request Time</td>\";\n echo \"</tr></thead>\";\n\n // echo \"<thead><tr>\";\n // for ($i = 0; $i < pg_num_fields($query_result); $i++) {\n // $fieldname = pg_field_name($query_result, $i);\n // echo \"<th>$fieldname</th>\";\n // }\n // echo \"</tr></thead>\";\n echo \"<tbody>\";\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n for ($i = 0; $i < $num; $i++) {\n echo \"<td>$row[$i]</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</tbody>\";\n echo \"</table>\";\n }", "public function userlist()\n {\n $users = array('users' => UserModel::getPublicProfilesOfAllUsers(),'dynatable'=>'userlist');\n $this->View->render('user/userlist',$users);\n }", "function tablaUsuarios($consulta) {\n\tglobal $Buscador;\n\techo \"<tr class='tr-th'><td>Id</td><td>Tipo</td><td>Nombre</td><td>Email</td><td align='right'>\".$Buscador.\"</td></tr>\";\n\twhile($reg=mysql_fetch_array($consulta))\n\t{ \n\t\tif($reg['tipoUsuario']==\"Administrador\")\n\t\t\t$classTipoUser=\"flaticon-important\";\n\t\telse \n\t\t\t$classTipoUser=\"flaticon-user91\";\n\t\techo \"<tr class='tr'><td align='center'>\".$reg['IdUsuario'].\"</td><td width='100'><span class='\".$classTipoUser.\"'></span> \".$reg['tipoUsuario'].\"</td><td>\".$reg['Nombres'].\" \".$reg['Apellidos'].\"</td><td>\".$reg['Email'].\"</td><td align='right'><span class='flaticon-expand span-btn-admin' title='Detalles' onclick='expandDetails(this,\\\"Usuarios\\\",\".$reg['IdUsuario'].\")'></span><span class='flaticon-black322 span-btn-admin' title='Editar' onclick='editRows(this,\\\"Usuarios\\\",\".$reg['IdUsuario'].\")'></span><span class='flaticon-delete81 span-btn-admin' title='Borrar' onclick='deleteUser(this,\\\"Usuarios\\\",\".$reg['IdUsuario'].\")'></span></td></tr>\";\n\t}\n}", "function displayAllUser() {\n\t\t$sql = \"SELECT * FROM accounts\";\n\t\t$result = $this->connection->query($sql);\n\t\techo \"Displays all users\";\n\t\techo '<table style=\"border-style: ridge; border-width:6px\">';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">ID</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Email</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">First Name</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Last Name</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Phone</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Birthday</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Gender</th>';\n\t\techo '<th style=\"text=align:center;font-weight:bold\">Password</th>';\n\t\techo '</tr>';\n\t\t\n\t\twhile($row = $result->fetch_assoc()) {\n\t\t\techo \"<tr>\";\n\t\t\techo \"<td>\".$row[\"id\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"email\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"fname\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"lname\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"phone\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"birthday\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"gender\"].\"</td>\";\n\t\t\techo \"<td>\".$row[\"password\"].\"</td>\";\n\t\t\techo \"</tr>\";\n \t}\n \techo \"</table>\";\n\t\techo \"<br>\";\n\t}", "private function fillUser($user)\n {\n return <<<HTML\n<tr>\n <td data-th=\"Edit User\">\n <a class=\"button\" href=\"/users/edit?username={$user['username']}\">\n Edit\n </a>\n </td>\n <td data-th=\"Username\">{$user['username']}</td>\n <td data-th=\"Full Name\">{$user['fullname']}</td>\n <td data-th=\"Last Login\">{$user['lastlogin']}</td>\n</tr>\n\nHTML;\n }", "static function displayUserPage($user)\n {\n echo \"<div class='row'>\";\n echo \"<div class='col-xs-12 col-md-8' id='main'>\";\n self::displayProjects($user);\n echo \"</div>\";\n echo \"<div class='col-xs-6 col-md-4' id='news'>\";\n self::displayNews();\n echo \"</div>\";\n echo \"</div>\";\n }", "function printResult($result) {\n echo \"<br>Employee Info<br>\";\n echo \"<table class='table table-striped'>\";\n echo \"<tr><th>Username</th>\". \" \" .\"<th>Wage</th>\". \" \" .\"<th>Job Type</th>\". \" \" .\"<th>Work Schedule</th></tr>\";\n\n while ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n echo \"<tr><td>\" . $row[\"USERNAME\"] . \" </td><td>\" . $row[\"WAGE\"] . \" </td><td>\" . $row[\"JOBT\"] . \"</td><td>\"\n . \" \" . $row[\"WORKS\"] . \"</td></tr>\"; //or just use \"echo $row[0]\" \n }\n echo \"</table>\";\n }", "public function table()\n\t{\n\t\t$sql = '\n\t\t\tselect \n\t\t\t\tid, \n\t\t\t\tname, \n\t\t\t\tenable \n\t\t\tfrom \n\t\t\t\tfile \n\t\t\twhere \n\t\t\t\tuser = ?';\n\n\t\t$results = DB::select($sql, [Auth::id()]);\n\n\t\treturn Datatable::collection(new Collection($results))\n\t\t\t->showColumns('name')\n\t\t\t->addColumn('enable', function($model) \n\t\t\t{\n\t\t\t\treturn '<a href=\"'.url(\"/file/edit&ID=\".$model->id.\"&EN=\".$model->enable).'\">'.$model->enable.'</a>';\n\t\t\t})\n\t\t\t->addColumn('remove', function($model) \n\t\t\t{\n\t\t\t\treturn '<a href=\"'.url(\"/file/delete&ID=\".$model->id).'\"><i class=\"fa fa-times\"></i></a>';\n\t\t\t})\n ->searchColumns('name')\n ->orderColumns('enable', 'name')\n ->make();\n\t}", "function case_all_supervisors(){?>\n\t\t\t<table border=\"1\" cellspacing=\"2\" cellpadding=\"2\">\n\t\t\t<tr><th>Supervisor Id</th><th>Supervisor Name</th><th>Phone Number</th></tr>\n\t\t\t<?php $sql = \"select * from supervisor\";\n\t\t\t$result = mysql_query($sql);\n\t\t\twhile($row = mysql_fetch_array($result)){?>\n\t\t\t\t<tr>\n\t\t\t\t<td><?php echo $row['emp_id']?></td>\n\t\t\t\t<td><?php echo $row['first_name']; echo ' '; echo $row['last_name'];?></td>\n\t\t\t\t<td><?php echo $row['phone']?></td>\n\t\t\t\t</tr>\n\t\t\t<?php }?>\n\t\t\t\n\t\t\t</table>\n\t\t<?php }", "public function printUserAll()\n\t{\n\t\t$data['reklame'] = $this->madmin->printReklameAll('users')->result();\n\t\t// print_r($data);\n\n\t\t$this->load->view('cetak/cetakuser.php',$data);\n\t}", "public function showAthletesTable(){\r\n\t\t//fait le query voulu\r\n\t\t$stmt = $this->connect()->query(\"SELECT * FROM athletes\");\r\n\t\t//creer la table avec les tuples\r\n\t\techo \"<h3>Athletes Table</h3>\";\r\n\t\techo \"<table><tr><td>\" . \"id\" . \"</td><td>\" . \"name\" . \"</td><td>\" . \"identified_gender\" . \"</td><td>\" . \"email\" . \"</td><td>\" . \"date_of_birth\" . \"</td></tr>\";\r\n\t\twhile ($row = $stmt->fetch()) {\r\n\t\t\techo \"<tr><td>\" . $row['id'] . \"</td><td>\" . $row['name'] . \"</td><td>\" . $row['identified_gender'] . \"</td><td>\" . $row['email'] . \"</td><td>\" . $row['date_of_birth'] . \"</td></tr>\"; \r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}", "public function suspended_users_datatable()\n\t\t{\n\t\t\t$list = $this->Users->get_deactivated_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t\n\t\t\tforeach ($list as $user) {\n\t\t\t\t$no++;\n\t\t\t\t$row = array();\n\t\t\t\t\n\t\t\t\tif($user->avatar == '' || $user->avatar == null || !file_exists($filename)){\n\t\t\t\t\t$thumbnail = '<img src=\"'.base_url().'assets/images/icons/avatar.jpg\" class=\"img-responsive img-circle avatar-view\" width=\"40\" height=\"50\"/>';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$thumbnail = '<img src=\"'.base_url().'uploads/users/'.$user->id.'/'.$user->avatar.'\" class=\"img-responsive img-rounded\" width=\"40\" height=\"50\"/>';\n\t\t\t\t}\t\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary pull-left\" style=\"margin:8% auto;\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$user->id.'\"><label for=\"cb\"></label></div> <div style=\"margin-left:35%; margin-right:35%;\">'.$thumbnail.'</div>';\n\t\t\t\t\n\t\t\t\t$url = 'admin/user_details';\n\t\t\t\t\t\n\t\t\t\t//$row[] = $thumbnail;\n\t\t\t\t$row[] = '<a href=\"#\" data-toggle=\"modal\" data-target=\"#viewModal\" class=\"link\" onclick=\"viewUser('.$user->id.',\\''.$url.'\\');\" title=\"View '.$user->first_name .' '.$user->last_name.'\">'.$user->first_name .' '.$user->last_name.' ('.$user->email_address.')</a>';\n\t\t\t\t\n\t\t\t\t$address = $user->address_line_1.', '.$user->city.' '.$user->postcode.', '.$user->state.', '.$user->country;\n\t\t\t\tif($user->address_line_2 != ''){\n\t\t\t\t\t$address = $user->address_line_1.', '.$user->address_line_2.', '.$user->city.' '.$user->postcode.', '.$user->state.', '.$user->country;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//$row[] = $address;\n\t\t\t\t\n\t\t\t\t//$account_balance = number_format($user->account_balance, 2);\n\t\t\t\t//$row[] = $account_balance;\n\t\t\t\t$count_reviews = $this->Reviews->count_user_reviews($user->id);\n\t\t\t\tif($count_reviews == '' || $count_reviews == null || $count_reviews < 1 ){\n\t\t\t\t\t$count_reviews = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//get product ratings\n\t\t\t\t$rating = $this->db->select_avg('rating')->from('reviews')->where('user_id', $user->id)->get()->result();\n\t\t\t\t\t\n\t\t\t\t$rating_box = '';\n\t\t\t\t\n\t\t\t\tif($rating[0]->rating == '' || $rating[0]->rating == null || $rating[0]->rating < 1){\n\t\t\t\t\t$ratings = 0;\n\t\t\t\t\t$rating_box = '<div class=\"starrr stars-existing\" data-rating=\"'.round($rating[0]->rating).'\"></div> <span class=\"\">No reviews yet</span>';\n\t\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$rating_box = '<div class=\"starrr stars-existing\" data-rating=\"'.round($rating[0]->rating).'\"></div> <span class=\"stars-count-existing\">'.round($rating[0]->rating).'</span> star(s) (<span class=\"review-count\">'.$count_reviews.'</span>)';\n\t\t\t\t}\n\t\t\t\t$row[] = $rating_box;\n\t\t\t\t\n\t\t\t\t$last_updated = $user->last_updated;\n\t\t\t\tif($last_updated == '0000-00-00 00:00:00' || $last_updated == ''){ \n\t\t\t\t\t\t$last_updated = 'Never'; \n\t\t\t\t}else{ \n\t\t\t\t\t$last_updated = date(\"d M y\", strtotime($last_updated)).' at '.date(\"h:i A\", strtotime($last_updated)); \n\t\t\t\t\t//date(\"d M y h:i A\", strtotime($last_updated))\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t$row[] = $last_updated;\n\t\t\t\t\n\t\t\t\t$last_login = $user->last_login;\n\t\t\t\tif($last_login == '0000-00-00 00:00:00' || $last_login == ''){ \n\t\t\t\t\t\t$last_login = 'Never'; \n\t\t\t\t}else{ \n\t\t\t\t\t$last_login = date(\"d M y\", strtotime($last_login)).' at '.date(\"h:i A\", strtotime($last_login)); \n\t\t\t\t\t//date(\"d M y h:i A\", strtotime($last_login))\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t$row[] = $last_login;\n\t\t\t\t\n\t\t\t\t$row[] = date(\"F j, Y\", strtotime($user->date_created));\n\t\t\t\t\n\t\t\t\t$row[] = '<a data-toggle=\"modal\" data-target=\"#reactivateModal\" class=\"btn btn-success btn-xs\" onclick=\"reactivateUser('.$user->id.',\\''.$url.'\\');\" id=\"'.$user->id.'\" title=\"Reactivate '.$user->first_name .' '.$user->last_name.'\"><i class=\"fa fa-undo\"></i> Reactivate</a>';\n\t\t\t\t\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\t\n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Users->count_all_deactivated(),\n\t\t\t\t\"recordsFiltered\" => $this->Users->count_filtered_deactivated(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "public function displayOrderTable(){\n $sql=\"SELECT * FROM `orders` \n INNER JOIN `items` ON orders.item_id=items.item_id\n INNER JOIN `users` ON orders.user_id=users.user_id\n INNER JOIN `accounts`ON users.account_id=accounts.account_id\";\n \n $result=$this->conn->query($sql);\n $records=array();\n\n if($result->num_rows>0){\n while($row=$result->fetch_assoc()){\n array_push($records,$row);\n }\n return $records;\n }else{\n return false;\n }\n }", "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}", "protected function getDataTable($user)\n {\n return datatables()\n ->of($user)\n ->addColumn('full_name', function ($data) {\n return view('admin.user.partials.user-link', compact('data'))->render();\n })\n ->addColumn('image', function ($data) {\n return view('admin.user.partials.users_datatable_image', compact('data'))->render();\n })\n ->addColumn('email', function ($data) {\n return '<b>' . $data->email . '<br>' . optional($data)->phone_number . '</b>';\n })\n ->addColumn('roles', function ($data) {\n $value = '';\n $ids = [];\n foreach ($data->roles as $role) {\n $value .= \"<code>\" . $role->name . \"</code> | \";\n array_push($ids, $role->id);\n }\n return view('admin.user.partials.show-roles', compact('value', 'ids', 'data'))->render();\n })\n ->addColumn('created_at', function ($data) {\n return view('admin.common.created-at', compact('data'))->render();\n })\n ->addColumn('action', function ($data) {\n $model = 'user';\n return view('admin.common.data-table-common-action', compact('data', 'model'))->render();\n })\n ->addColumn('checkbox', function ($data) {\n return view('admin.common.checkbox', compact('data'))->render();\n })\n ->addColumn('status', function ($data) {\n return view('admin.common.status', compact('data'))->render();\n })\n ->rawColumns(['checkbox', 'action', 'created_at', 'full_name', 'roles', 'image', 'email',])\n // ->removeColumn('password')\n ->make(true);\n }", "public function view_by($user_id){\n $this->db->where('user_id', $user_id);\n return $this->db->get('tbl_users')->row();\n }", "public function fetchAllUser() {\n try {\n // Select all users\n $query = \"\n select * \n from tb_user \n \";\n // Create object to connect to MySQL using PDO\n $mysqlPDO = new MySQLPDO();\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query without paramters\n $statement->execute();\n // Get affect rows in associative array\n $rows = $statement->fetchAll();\n // Foreach row in array\n foreach ($rows as $row) {\n // Create a User object\n $user = new User($row);\n //Create datatable row\n $tmp_data[] = array(\n $user->getEmail(),\n $user->getUsername(),\n \"********\",\n \"<div style='text-align:center'>\".$user->getAccess().\"</div>\",\n $user->getState() == \"0\" ? '<div style=\"text-align:center\"><i class=\"fas fa-times\" style=\"color:red\"></i></div>' : '<div style=\"text-align:center\"><i class=\"fas fa-check\" style=\"text-align: center; color:green;\"></i></div>',\n \"<div style='text-align:center'><a href='javascript:update(\".json_encode($user).\")' class='btn btn-info'><i class='fas fa-edit'></i></a></div>\",\n \"<div style='text-align:center'><a href='javascript:remove(\".$user->getId().\")' class='btn btn-danger'><i class='far fa-trash-alt'></i></a></div>\"\n );\n }\n // Export into DataTable json format if there's any record in $tmp_data\n if (isset($tmp_data) && count($tmp_data) > 0) {\n $data = array(\n \"data\" => $tmp_data\n );\n } else {\n $data = array(\n \"data\" => array()\n );\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message: \" . $e->getMessage());\n }\n }", "public function index(UserDataTable $dataTable){\n return $dataTable->render('user::index');\n }", "public function row(User $user): array\n {\n return [\n $user->name,\n $user->cour,\n $user->name,\n ];\n }", "function myRow($row,$pos){\r\n\techo \"<tr class='table-primary'>\";\r\n\techo \"<th>\".$pos.\"</th><td>\".$row['username'].\"</td><td>\".$row['credits'].\"xp</td><td class='text-dark'>\".$row['wins'].\" </td><td class='text-danger'>\".$row['loses'].\"</td>\";\r\n\techo \"</tr>\";\t\r\n}", "function display_rows() {\n\n $settings = new Hypernews_Settings();\n \n\t//Get the records registered in the prepare_items method\n\t$records = $this->items;\n\n\t//Get the columns registered in the get_columns and get_sortable_columns methods\n\tlist( $columns, $hidden ) = $this->get_column_info();\n\n\t//Loop for each record\n\tif(!empty($records)){foreach($records as $rec){\n //Open the line\n echo '<tr id=\"record_'.$rec->id.'\">';\n foreach ( $columns as $column_name => $column_display_name ) \n {\n\n //Style attributes for each col\n $class = \"class='$column_name column-$column_name'\";\n $style = \"\";\n if ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n $attributes = $class . $style;\n\n //edit link\n $editlink = '/wp-admin/link.php?action=edit&link_id='.(int)$rec->link_id;\n\n //Display the cell\n switch ( $column_name ) {\n case \"cb\": \n $cb_class = \"hypernews_row_read\";\n if ($rec->status=='NEW'){\n $cb_class = \"hypernews_row_unread\";\n }\n echo sprintf(\n '<td><input type=\"checkbox\" class=\"hypernews_checkbox\" name=\"%1$s[]\" value=\"%2$s\" /></td>',\n /*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label (\"movie\")\n /*$2%s*/ $rec->id //The value of the checkbox should be the record's id\n );\n break;\n case \"id\": echo '<td '.$attributes.'>'.stripslashes($rec->id).'</td>';\tbreak;\n case \"title\": \n $actions = array(\n 'edit' => sprintf('<a href=\"#\" class=\"hypernews_edit_row\" row_id=\"%3$s\">'.__('Show', 'hypernews').'</a>',$_REQUEST['page'],'edit',$rec->id),\n 'unread' => sprintf('<a href=\"#\" class=\"hypernews_unread_row\" row_id=\"%3$s\">'.__('Unread', 'hypernews').'</a>',$_REQUEST['page'],'unread',$rec->id),\n 'star' => sprintf('<a href=\"#\" class=\"hypernews_star_row\" row_id=\"%3$s\">'.__('Favorite', 'hypernews').'</a>',$_REQUEST['page'],'star',$rec->id),\n 'hide' => sprintf('<a href=\"#\" class=\"hypernews_hide_row\" row_id=\"%3$s\">'.__('Hide', 'hypernews').'</a>',$_REQUEST['page'],'hide',$rec->id)\n );\n\n $title_class = \"hypernews_title_row\";\n if ($rec->status=='NEW'){\n $title_class = \"hypernews_title_unread\";\n }\n \n //Return the title contents\n echo sprintf('<td><a class=\"%7$s\" href=\"%6$s\" target=\"_new\">%1$s</a><br/><div class=\"hypernews_pre_row hypernews_row_pre_%4$s\"><i>%2$s</i></div><div class=\"hypernews_hidden_row hypernews_row_%4$s\">%5$s</div>%3$s</td>',\n /*$1%s*/ $rec->title,\n /*$2%s*/ substr(strip_tags($rec->description),0,150),\n /*$3%s*/ $this->row_actions($actions),\n $rec->id,\n strip_tags($rec->description),\n $rec->url,\n $title_class\n );\n\n //echo '<td '.$attributes.'><strong><a href=\"'.$editlink.'\" title=\"Edit\">'.stripslashes($rec->title).'</a></strong></td>'; \n break;\n case \"pubdate\": \t\n \n //Channels:\n $pb_result = \"\";\n $link = $settings->get_link($rec->link_id);\n $posttypes = $link['posttypes'];\n if (!is_array($posttypes)) $posttypes = array();\n foreach ($posttypes as $type)\n {\n $posttype_object = get_post_type_object($type);\n if ($pb_result!='')\n {\n $pb_result.='&nbsp;&nbsp;&nbsp;&nbsp;';\n }\n\n $pb_result.='<a href=\"#\" row_id=\"'.$rec->id.'\" posttype=\"'.$type.'\" class=\"hypernews_publish_row\" title=\"'.__('Add as draft to', 'hypernews').' '.$type.'\"><span class=\"hypernews_publish_add\">'.$posttype_object->label.'</a>';\n }\n echo sprintf('<td %3$s>%1$s<br/>'.$pb_result.'<div style=\"clear:both;\"></div></td>',\n stripslashes($rec->pubdate),\n $rec->id,\n $attributes\n );\n \n break;\n case \"channel\": echo '<td '.$attributes.'>'.stripslashes($rec->channel).'</td>';\tbreak;\n case \"source\": echo '<td '.$attributes.'>'.stripslashes($rec->source).'</td>';\tbreak;\n case \"status\":\n echo '<td '.$attributes.'>';\n if ($rec->status == 'NEW')\n {\n echo '<img id=\"hypernews_row_icon_'.$rec->id.'\" src=\"'.WP_PLUGIN_URL.'/hypernews/img/lightbulb.png\" />';\n }\n else if ($rec->status == 'READ')\n {\n echo '<img id=\"hypernews_row_icon_'.$rec->id.'\" src=\"'.WP_PLUGIN_URL.'/hypernews/img/lightbulb_off.png\" />';\n }\n else if ($rec->status == 'STAR')\n {\n echo '<img id=\"hypernews_row_icon_'.$rec->id.'\" src=\"'.WP_PLUGIN_URL.'/hypernews/img/star.png\" />';\n } \n else if ($rec->status == 'HIDE')\n {\n echo '<img id=\"hypernews_row_icon_'.$rec->id.'\" src=\"'.WP_PLUGIN_URL.'/hypernews/img/cross.png\" />';\n } \n else if ($rec->status == 'POST')\n {\n echo '<a href=\"'.get_bloginfo('url').'/wp-admin/post.php?post='.$rec->post.'&action=edit\" target=\"_blank\"><img id=\"hypernews_row_icon_'.$rec->id.'\" src=\"'.WP_PLUGIN_URL.'/hypernews/img/page_white_go.png\" /></a>';\n }\n else\n {\n echo stripslashes($rec->status);\n }\n echo '</td>';\t\n break;\n case \"notes\": \t\n \n echo sprintf('<td %3$s><div id=\"hypernews_row_notetext_%2$s\">%1$s</div><br/><div class=\"hypernews_hidden_row hypernews_row_%2$s\"><textarea id=\"hypernews_row_notearea_%2$s\">%1$s</textarea><br/><input type=\"button\" value=\"'.__('Update', 'hypernews').'\" row_id=\"%2$s\" class=\"hypernews_row_note button-primary\" /></div></td>',\n stripslashes($rec->notes),\n $rec->id,\n $attributes\n );\n break;\n }\n }\n\n //Close the line\n echo'</tr>';\n }\n }\n }", "function displayListing($result){\n?>\n\t\t<table>\n\t\t\t<tr style=\"text-align:left;\"><th>Username</th> <th>Full Name</th><th>User Privileges</th><th>Actions</th></tr>\n<?php\n\t\twhile ($row = mysql_fetch_array($result))\n\t\t{\n\t\t?>\n\t\t\t<tr><td>\n\t\t\t\t<?php\t echo $row['user_name']; ?></td>\n\t\t\t\t<td><?php echo $row['user_first_name']; ?> \t&nbsp;&nbsp;<?php echo $row['user_last_name']; ?></td>\n\t\t\t\t<td><?php echo $row['name']; ?></td>\n\t\t\t\t<td><form name=\"edit_app\" method=\"post\" action=\"index.php?page=user&id=<?php echo $row['pkuser_id'];?>\"> \n\t\t\t\t\t<input class=\"btton\" type=\"submit\" value=\"Edit\" />\n\t\t\t\t</form></td>\n\t\t\t</tr>\n\t\t\n\t<?php\t\n\t\t}\n\t\t?>\n\t\t</table>\n<?php\n}", "public function displayTable($sender) {\n\t\treturn \"<tr><td><i>\" . Utils::getFormatUsername(($sender ? $this -> getSender() : $this -> getRecipient())) . \"</i></td> <td><a class='table-message' data-id='\" . $this -> getId() . \"' href='#'>\" . $this -> getSubject() . \"</a></td> <td>\" . $this -> formatTime($this -> getDate()) . \" <a href='#'><i data-id='\" . $this -> getId() . \"' class='fa fa-trash' id='delete'></i></a></td></tr>\";\n\t}", "public function getdata(){\n\n $type = \\Request::query('only');\n\n $user = DB::table('users');\n $user->select('*');\n\n if($type=='admins'){\n $user->where('usertype', '=', 'Admin');\n }elseif($type=='staff'){\n $user->where('usertype', '=', 'Staff');\n }elseif($type=='banned'){\n $user->where('usertype','=', 'banned');\n }\n\n\n\n return Datatables::of($user)\n\n ->addColumn('icon', function ($user) {\n\n return view('._admin._particles.datatable.userlist.icon', compact('user'))->render();\n\n })->addColumn('username', function ($user) {\n\n return view('._admin._particles.datatable.userlist.username', compact('user'))->render();\n\n })->addColumn('email', function ($user) {\n\n return view('._admin._particles.datatable.userlist.email', compact('user'))->render();\n\n })->addColumn('status', function ($user) {\n\n return view('._admin._particles.datatable.userlist.status', compact('user'))->render();\n\n })->addColumn('created_at', function ($user) {\n\n return view('._admin._particles.datatable.userlist.created_at', compact('user'))->render();\n\n })->addColumn('updated_at', function ($user) {\n\n return view('._admin._particles.datatable.userlist.updated_at', compact('user'))->render();\n\n })->addColumn('action', function ($user) {\n\n return view('._admin._particles.datatable.userlist.action', compact('user'))->render();\n\n })->make(true);\n\n }", "function usuarios(){\n\t\t$i=1;\n\t\t$objConexion = conectar(\"on\");\n\t\t$consulta = $objConexion->query(\"SELECT id_usuario,email_usuario,password_usuario,nombre_usuario,rfc_usuario,telefono_usuario,(SELECT tipo FROM tipo_usuario WHERE id_tipo_usuario=tipo_usuario) as tipo FROM usuario\");\n\t\tif($consulta->num_rows == 0){\n\t\t\techo 'No hay usuarios'; /* editar esta opcion */ \n\t \t}\n\t\techo libreriasJS();\n\t\techo '<link type=\"text/css\" href=\"css/tablas.css\" rel=\"stylesheet\" />';\n\t\techo '<div id=\"ventana\">';\n\t\techo '<table border=\"1\">';\n\t\techo '<thead><tr><th scope=\"col\">Correo</th><th scope=\"col\">Clave</th><th scope=\"col\">Nombre</th><th scope=\"col\">RFC</th><th scope=\"col\">Telefono</th><th scope=\"col\">Tipo</th><th scope=\"col\">Acci&oacute;n</th></tr></thead>';\n\t\techo '<tbody>';\n\t\t\twhile($fila=$consulta->fetch_assoc()){\n\t\t\t\tif(($i%2)==0){\n\t\t\t\t\techo '<tr>';\n\t\t\t\t\t\techo '<td>'.$fila['email_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['password_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['nombre_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['rfc_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['telefono_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['tipo'].'</td>';\n\t\t\t\t\t\techo '<td><a href=\"admins_all.php?accion=eliminar_usr&id='.$fila['id_usuario'].'\" data-tooltip=\"Haz click para volver al artículo\"><img src=\"img/btn_del.png\" /></a><a href=\"admins_all.php?accion=editar_usr&id='.$fila['id_usuario'].'\"><img src=\"img/btn_edi.png\" /></a></td>';\n\t\t\t\t\techo '</tr>';\n\t\t\t\t}else{\n\t\t\t\t\techo '<tr class=\"odd\">';\n\t\t\t\t\t\techo '<td>'.$fila['email_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['password_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['nombre_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['rfc_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['telefono_usuario'].'</td>';\n\t\t\t\t\t\techo '<td>'.$fila['tipo'].'</td>';\n\t\t\t\t\t\techo '<td><a href=\"admins_all.php?accion=eliminar_usr&id='.$fila['id_usuario'].'\"><img src=\"img/btn_del.png\" /></a><a href=\"admins_all.php?accion=editar_usr&id='.$fila['id_usuario'].'\"><img src=\"img/btn_edi.png\" /></a></td>';\n\t\t\t\t\techo '</tr>';\n\t\t\t\t}\n\t\t\t\t$i+=1;\n\t\t\t}\n\t\techo '</tbody>';\n\t\techo '</table><br /><center><button id=\"agregar\">Agregar nuevo usuario</button>&nbsp;<button id=\"cerrar\">Cerrar el administrador</button></center>';\n\t\techo '</div>';\n\t\tconectar(\"off\");\n\t\techo '<script type=\"text/javascript\">\n\t\t\t\t$(\"button\").button(); \n\t\t\t\tcargar_ventana(\"ventana\",\"Administrador de usuarios\");\n\t\t\t\t$(\"#agregar\").click(function(){\n\t\t\t\t\twindow.location.assign(\"admins_all.php?accion=agregar_usr\");\n\t\t\t\t});\n\t\t\t\t$(\"#cerrar\").click(function(){\n\t\t\t\t\twindow.location.assign(\"menu.php\");\n\t\t\t\t});\n\t\t\t </script>';\n\t}", "public function showPartnersTable() {\r\n\t\t$stmt = $this->connect()->query(\"SELECT * FROM partner\");\r\n\t\techo \"<h3>Partner Table</h3>\";\r\n\t\techo \"<table><tr><td>\" . \"name\" . \"</td><td>\" . \"company_address\" . \"</td><td>\" . \"contact_phone_number\" . \"</td></tr>\";\r\n\t\twhile ($row = $stmt->fetch()) {\r\n\t\t\techo \"<tr><td>\" . $row['name'] . \"</td><td>\" . $row['company_address'] . \"</td><td>\" . $row['contact_phone_number'] . \"</td></tr>\"; \r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}", "public function userlist()\n {\n $filter = Param::get('filter');\n\n $current_page = max(Param::get('page'), SimplePagination::MIN_PAGE_NUM);\n $pagination = new SimplePagination($current_page, MAX_ITEM_DISPLAY);\n $users = User::filter($filter);\n $other_users = array_slice($users, $pagination->start_index + SimplePagination::MIN_PAGE_NUM);\n $pagination->checkLastPage($other_users);\n $page_links = createPageLinks(count($users), $current_page, $pagination->count, 'filter=' . $filter);\n $users = array_slice($users, $pagination->start_index -1, $pagination->count);\n \n $this->set(get_defined_vars());\n }", "private function construct_take_user_controls(take_data $takedata, $user) {\n $celldata = array();\n if ($user->enrolmentend && $user->enrolmentend < $takedata->sessioninfo->sessdate) {\n $celldata['text'] = get_string('enrolmentend', 'attendance', userdate($user->enrolmentend, '%d.%m.%Y'));\n $celldata['colspan'] = count($takedata->statuses) + 1;\n $celldata['class'] = 'userwithoutenrol';\n } else if (!$user->enrolmentend && $user->enrolmentstatus == ENROL_USER_SUSPENDED) {\n // No enrolmentend and ENROL_USER_SUSPENDED.\n $celldata['text'] = get_string('enrolmentsuspended', 'attendance');\n $celldata['colspan'] = count($takedata->statuses) + 1;\n $celldata['class'] = 'userwithoutenrol';\n } else {\n if ($takedata->updatemode && !array_key_exists($user->id, $takedata->sessionlog)) {\n $celldata['class'] = 'userwithoutdata';\n }\n\n $celldata['text'] = array();\n foreach ($takedata->statuses as $st) {\n $params = array(\n 'type' => 'radio',\n 'name' => 'user'.$user->id,\n 'class' => 'st'.$st->id,\n 'value' => $st->id);\n if (array_key_exists($user->id, $takedata->sessionlog) && $st->id == $takedata->sessionlog[$user->id]->statusid) {\n $params['checked'] = '';\n }\n\n $input = html_writer::empty_tag('input', $params);\n\n if ($takedata->pageparams->viewmode == mod_attendance_take_page_params::SORTED_GRID) {\n $input = html_writer::tag('nobr', $input . $st->acronym);\n }\n\n $celldata['text'][] = $input;\n }\n $params = array(\n 'type' => 'text',\n 'name' => 'remarks'.$user->id,\n 'maxlength' => 255);\n if (array_key_exists($user->id, $takedata->sessionlog)) {\n $params['value'] = $takedata->sessionlog[$user->id]->remarks;\n }\n $celldata['text'][] = html_writer::empty_tag('input', $params);\n\n if ($user->enrolmentstart > $takedata->sessioninfo->sessdate + $takedata->sessioninfo->duration) {\n $celldata['warning'] = get_string('enrolmentstart', 'attendance',\n userdate($user->enrolmentstart, '%H:%M %d.%m.%Y'));\n $celldata['class'] = 'userwithoutenrol';\n }\n }\n\n return $celldata;\n }", "static public function mdlShowUsers($table, $item, $value){\n\n if($item != null){\n\n $stmt = Connection::connect()->prepare(\"SELECT * FROM $table WHERE $item = :$item\");\n \n //PDO::PARAM_STR for string\n $stmt->bindParam(\":\" . $item, $value, PDO::PARAM_STR);\n\n $stmt->execute();\n\n return $stmt->fetch();\n }else{\n\n $stmt = Connection::connect()->prepare(\"SELECT * FROM $table\");\n\n $stmt->execute();\n\n return $stmt->fetchAll();\n } \n\n //Close the connection\n $stmt = null;\n }", "function table_table_row($values,$escape=false)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\tif (($escape) && ((!is_object($value)) || ($value->pure_lang!==true)))\n\t\t\t$value=make_string_tempcode(escape_html(is_object($value)?$value->evaluate():$value));\n\n\t\t$cells->attach(do_template('TABLE_TABLE_ROW_CELL',array('_GUID'=>'700a982eb2262149295816ddee91b0e7','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_ROW',array('_GUID'=>'a4efacc07ecb165e37c355559f476ae9','CELLS'=>$cells));\n}", "public function table(User $user)\n {\n return $this->table->of('users', function (TableGrid $table) use ($user) {\n $table->with($user)->paginate($this->perPage);\n\n $table->column('name', function (Column $column) {\n $column->value = function (User $user) {\n return link_to_route('admin.users.show', $user->name, [$user->getKey()]);\n };\n });\n\n $table->column('email', function (Column $column) {\n // We'll remove this column when\n // viewing on smaller screens.\n $column->headers = [\n 'class' => 'hidden-xs',\n ];\n\n $column->attributes(function () {\n return [\n 'class' => 'hidden-xs',\n ];\n });\n });\n\n $table->column('roles', function (Column $column) {\n $column->value = function (User $user) {\n $labels = '';\n\n foreach ($user->roles as $role) {\n $labels .= $role->display_label.'<br>';\n }\n\n return $labels;\n };\n });\n\n $table->column('created_at_human', function (Column $column) {\n $column->label = 'Created';\n\n // We'll remove this column when\n // viewing on smaller screens.\n $column->headers = [\n 'class' => 'hidden-xs',\n ];\n\n $column->attributes(function () {\n return [\n 'class' => 'hidden-xs',\n ];\n });\n });\n });\n }", "public function showList($userId)\r\n {\r\n\r\n\r\n $ds = new DataSource();\r\n $array = array($userId);\r\n $sql = sprintf(\"SELECT * from %s where %s=?\", self::_TABLE, self::USER);\r\n\r\n $dirFileList = \"<h2>Listado de Reservas</h2>\";\r\n foreach ($ds->fetchAll($sql, $array) as $row) {\r\n $id = $row['id'];\r\n $dirFileList .= \"- \" . $id . \"&nbsp;<a href='\" . $_SERVER['PHP_SELF'] . \"?section=reserves&delete=\".$id.\" '>Borrar</a>&nbsp;|&nbsp;<a href='\" . $_SERVER['PHP_SELF'] . \"?section=reserves&watch=$id'>Ver</a>|&nbsp;<a href='\" . $_SERVER['PHP_SELF'] . \"?section=reserves&edit=$id'>Editar</a><br>\";\r\n\r\n }\r\n\r\n $ds->close();\r\n\r\n return $dirFileList;\r\n }", "public function index(userDataTable $userDataTable)\n {\n $users = $this->userRepository->all()->where('type', 1);\n return view('users.index')->with('users', $users);\n }", "private function cell_userinfo($row = NULL) {\n\t\t?><p><strong><?php echo $row[\"FullName\"];?></strong></p><?php\n\t\t?><p>Tel.: <?php echo $row[\"Phone\"];?></p><?php\n\t\t?><p>E-mail: <a href=\"mailto:<?php echo $row[\"Email\"];?>\"><?php echo $row[\"Email\"];?></a></p><?php\n\t\t$user_levels = unserialize(USER_LEVELS);\n\t\t?><p>Szint: <?php echo $user_levels[$row[\"UserType\"]];?></p><?php\n\t\n\t}", "function users(){\n\t$listado= mysql_query(\"select us.name as name, us.email as email , co.name as pais\n\tfrom users us\n\tjoin country co on co.Code=us.countryCode\");\n\t\n\t$i = 1;\n\t\n\twhile ($reg = mysql_fetch_array($listado)) {\n\t\techo '<tr>';\n\t\techo '<td >' . $i . '</td>';\n\t\techo '<td >' . mb_convert_encoding($reg['name'], \"UTF-8\") . '</td>';\n\t\techo '<td >' . mb_convert_encoding($reg['email'], \"UTF-8\") . '</td>';\n\t\techo '<td >' . mb_convert_encoding($reg['pais'], \"UTF-8\") . '</td>';\n\t\techo '</tr>';\n\t\t$i++;\n\t}\n}", "public function getUsersAccounts(){\n $htmlTag = '';\n $username = $_SESSION['username'];\n $adminresults = pg_query(\"SELECT * From admin where username ='{$username}';\");\n if($adminresults){\n if(pg_num_rows($adminresults)==1){\n $htmlTag = \"<table style='width:auto'>\n <tr>\n <td><p>ACTIVE</p></td>\n <td style='padding-left:30px;''><p>EMAIL</p></td>\n <td style='padding-left:30px;'><p>REMOVE</p></td>\n </tr>\";\n $results = pg_query(\"SELECT * FROM users LEFT JOIN admin USING (userid) WHERE admin.userid IS NULL;\");\n while($rows = pg_fetch_array($results)){\n $userNameForm = $rows['email'];\n $active = $rows['active'];\n $userId = $rows['userid'];\n\n if($active==1){\n $htmlTag = $htmlTag.\"<tr>\n <td><input type='checkbox' class='toggleSwitch' checked data-toggle='toggle' name='$userId' value='ON' onchange ='onToggleClick(this.value, this.name)' ></td>\n <td style='padding-left:30px;'><p>$userNameForm</p></td>\n <td style='padding-left:30px;'><button type='button' class='userButtons btn btn-default btn-sm' value='$userId' onclick='userAccountId(this.value)'>\n <span class='glyphicon glyphicon-trash' aria-hidden='true'></span></button></td>\n </tr>\";\n\n }else if($active==0){\n $htmlTag = $htmlTag.\"<tr>\n <td><input type='checkbox' class='toggleSwitch' onchange='onToggleClick(this.value, this.name)' data-toggle='toggle' name='$userId' value='OFF' ></td>\n <td style='padding-left:30px;'><p>$userNameForm</p></td>\n <td style='padding-left:30px;'><button type='button' class='userButtons btn btn-default btn-sm' value='$userId' onclick='userAccountId(this.value)'>\n <span class='glyphicon glyphicon-trash' aria-hidden='true'></span></button></td>\n </tr>\";\n }\n\n }\n $htmlTag=$htmlTag.'</table>';\n\n }else{\n $htmlTag = \"<h4> Admin Only</h4>\";\n }\n }\n return $htmlTag; \n }", "public function index()\n {\n return view('userTable');\n }", "public function getUsersv()\n {\n \t$users = DB::table('users')->select('*');\n return Datatables::of($users)\n ->make(true);\n }", "function fetchTabelaUsersPorAprovar($conn) {\n $sql = \"SELECT U.*, T.descricao FROM utilizador U, tipoUtilizador T WHERE tipoUtilizador = '4' AND T.idTipoUtilizador = U.tipoUtilizador\";\n $retval = mysqli_query($conn, $sql);\n if(mysqli_num_rows($retval) != 0) {\n while($row = mysqli_fetch_array($retval, MYSQLI_ASSOC)) {\n mostrarDadosTabela($row);\n }\n } else {\n echo \"\n <tr>\n <td colspan='6' class='has-text-centered'>\n Não foram encontrados registos nesta tabela.\n </td>\n </tr>\n \";\n }\n mysqli_close($conn);\n}", "public function index()\n {\n $result = User::leftJoin('positions', 'employees.positionId', '=', 'positions.id')\n ->leftJoin('departments', 'employees.iDeptId', '=', 'departments.id')\n ->leftJoin('regions', 'employees.iRegion', '=', 'regions.id')\n ->select('employees.*','positions.positionName', 'departments.deptName','regions.regionName','employees.isDeactivated')\n ->getQuery() // Optional: downgrade to non-eloquent builder so we don't build invalid User objects.\n ->get();\n \n return Datatables::of($result)->make(true);\n }", "function render_tabular($row)\n\t{\n\t\t$member_id=$row['id'];\n\t\t$preview=true;\n\n\t\tif (get_forum_type()!='ocf')\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t$username=$GLOBALS['OCF_DRIVER']->get_username($member_id);\n\t\tif (is_null($username))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\trequire_lang('ocf');\n\t\trequire_code('ocf_groups');\n\n\t\t$_lines=array();\n\t\t$primary_group=ocf_get_member_primary_group($member_id);\n\t\tif (is_null($primary_group))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t//if (has_specific_permission(get_member(),'view_profiles'))\n\t\t{\n\t\t\tif ((addon_installed('galleries')) && (get_option('show_gallery_counts')=='1'))\n\t\t\t{\n\t\t\t\t$num_galleries=$GLOBALS['SITE_DB']->query('SELECT COUNT(*) AS cnt FROM '.$GLOBALS['SITE_DB']->get_table_prefix().'galleries WHERE name LIKE \\''.db_encode_like('member_'.strval($member_id).'_%').'\\'');\n\t\t\t}\n\t\t\t$_lines+=array(\n\t\t\t\t\t\t\t\tdo_lang('USERNAME')=>hyperlink($GLOBALS['OCF_DRIVER']->member_profile_url($member_id,false,true),$username,false,true),\n\t\t\t\t\t\t\t\tdo_lang('JOIN_DATE')=>escape_html(get_timezoned_date($GLOBALS['OCF_DRIVER']->get_member_row_field($member_id,'m_join_time'),false)),\n\t\t\t\t\t\t);\n\t\t\tif ((get_option('show_gallery_counts')=='1') && (addon_installed('galleries')))\n\t\t\t{\n\t\t\t\tif ($num_galleries[0]['cnt']>1)\n\t\t\t\t{\n\t\t\t\t\trequire_lang('galleries');\n\t\t\t\t\t$_lines[do_lang('GALLERIES')]=escape_html(integer_format($num_galleries[0]['cnt']));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$day=$GLOBALS['OCF_DRIVER']->get_member_row_field($member_id,'m_dob_day');\n\t\t\t$month=$GLOBALS['OCF_DRIVER']->get_member_row_field($member_id,'m_dob_month');\n\t\t\t$year=$GLOBALS['OCF_DRIVER']->get_member_row_field($member_id,'m_dob_year');\n\t\t\tif (($GLOBALS['OCF_DRIVER']->get_member_row_field($member_id,'m_reveal_age')==1) && (!is_null($day)))\n\t\t\t{\n\t\t\t\tif (@strftime('%Y',@mktime(0,0,0,1,1,1963))!='1963') $dob=strval($year).'-'.str_pad(strval($month),2,'0',STR_PAD_LEFT).'-'.str_pad(strval($day),2,'0',STR_PAD_LEFT); else $dob=get_timezoned_date(mktime(12,0,0,$month,$day,$year),false,true);\n\t\t\t\t$_lines[do_lang('DATE_OF_BIRTH')]=escape_html($dob);\n\t\t\t}\n\t\t\t$fields=ocf_get_all_custom_fields_match_member(\n\t\t\t\t$member_id,\n\t\t\t\t((get_member()!=$member_id) && (!has_specific_permission(get_member(),'view_any_profile_field')))?1:NULL, // public view\n\t\t\t\t((get_member()==$member_id) && (!has_specific_permission(get_member(),'view_any_profile_field')))?1:NULL, // owner view\n\t\t\t\tNULL, // owner set\n\t\t\t\t0, // encrypted\n\t\t\t\tNULL, // required\n\t\t\t\t$preview?NULL:1, // show in posts\n\t\t\t\t$preview?1:NULL // show in post previews\n\t\t\t);\n\t\t\tforeach ($fields as $key=>$val)\n\t\t\t{\n\t\t\t\tif (((is_string($val['RAW'])) && ($val['RAW']!='')) || ((is_object($val['RAW'])) && (!$val['RAW']->is_empty())))\n\t\t\t\t{\n\t\t\t\t\t$_lines[$key]=$val['RENDERED'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((!$preview) && (addon_installed('ocf_contactmember')) && (has_actual_page_access(get_member(),'contactmember')))\n\t\t\t{\n\t\t\t\t$redirect=get_self_url(true);\n\t\t\t\t$email_member_url=build_url(array('page'=>'contactmember','redirect'=>$redirect,'id'=>$member_id),get_module_zone('contactmember'));\n\n\t\t\t\t$_lines[do_lang('ACTIONS')]=hyperlink($email_member_url,do_lang_tempcode('_EMAIL_MEMBER'));\n\t\t\t}\n\t\t}\n\n\t\treturn $_lines;\n\t}", "public static function afficheAllUsers($dbh) {\n $pagesize = 5;\n $allusers = Utilisateur::getAllUsers($dbh);\n $numrows = sizeof($allusers);\n $pages = intval($numrows / $pagesize);\n if ($numrows % $pagesize != 0) {\n $pages++;\n }\n if (isset($_POST['userpagenumber']) && $_POST['userpagenumber'] != \"\") {\n $_SESSION['userpage'] = intval($_POST['userpagenumber']);\n }\n $page = $_SESSION['userpage'];\n $offset = $pagesize * ($page - 1);\n \n //si on demande de supprimer un utilisateur, on le supprime et on reafficher ce tableau\n if (isset($_GET['todo']) && $_GET['todo'] == \"delete\" && isset($_POST['deleteuser'])) {\n $number = $_POST['deleteuser'];\n $userselec = $allusers[$offset + $number];\n Utilisateur::annulerUtilisateur($dbh, $userselec->login);\n Information::deleteUser($dbh, $userselec->login);\n }\n echo <<<CHAINE_DE_FIN\n <h2>Tous les utilisateurs</h2>\nCHAINE_DE_FIN;\n $allusers = Utilisateur::getAllUsers($dbh);\n $numrows = sizeof($allusers);\n $pages = intval($numrows / $pagesize);\n if ($numrows % $pagesize != 0) {\n $pages++;\n }\n if (isset($_POST['userpagenumber']) && $_POST['userpagenumber'] != \"\") {\n $_SESSION['userpage'] = intval($_POST['userpagenumber']);\n }\n $page = $_SESSION['userpage'];\n $offset = $pagesize * ($page - 1);\n\n if ($allusers == null) {\n echo \"<p><span>Il n'y a pas d'utilisateur.</span></p>\";\n } else {\n echo <<<CHAINE_DE_FIN\n <table class=\"table table-hover\">\n <tr>\n <td>Login</td>\n <td>Email</td>\n <td>Type</td>\n <td>Delete</td>\n </tr>\nCHAINE_DE_FIN;\n\n $nb = 0;\n for ($i = 0; $i < 5 && ($offset + $i) < $numrows; $i++) {\n $user = $allusers[$offset + $i];\n $login = $user->login;\n $email = $user->email;\n $type = $user->type;\n echo <<<CHAINE_DE_FIN\n <tr>\n <td>$login</td>\n <td>$email</td>\n <td>$type</td>\n <td>\n <form action=\"index.php?todo=delete&page=compte\" method=\"post\">\n <button name=\"deleteuser\" value=\"$nb\" type=\"submit\" class = \"pagebutton\">\n Delete\n </button>\n </form>\n </td>\n </tr>\nCHAINE_DE_FIN;\n $nb = $nb + 1;\n }\n echo <<<CHAINE_DE_FIN\n </table>\nCHAINE_DE_FIN;\n $first = 1;\n $prev = $page - 1;\n $next = $page + 1;\n $last = $pages;\n echo <<<CHAINE_DE_FIN\n <div align='right'>\n <form action=\"index.php?page=compte\" method=\"post\">\nCHAINE_DE_FIN;\n if ($page > 1) {\n echo <<<CHAINE_DE_FIN\n <button class=\"pagebutton\" name=\"userpagenumber\" value=$first>Premier page</button>\n <button class=\"pagebutton\" name=\"userpagenumber\" value=$prev>Précédent</button>\nCHAINE_DE_FIN;\n }\n\n if ($page < $pages) {\n echo <<<CHAINE_DE_FIN\n <button class=\"pagebutton\" name=\"userpagenumber\" value=$next>Suivant</button> \n <button class=\"pagebutton\" name=\"userpagenumber\" value=$last>Dernier page</button>\nCHAINE_DE_FIN;\n }\n echo \"</form>\";\n echo \"</div>\";\n }\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}", "public function show_alluser_datatbl()\n {\n $model = new mainModel();\n $UserId = session()->get('userid');\n $responese = $model->getAllUserDetails($UserId);\n return Datatables::of($responese)\n ->addIndexColumn()\n ->addColumn('master_roleId', function ($query) {\n $masterROles = $query->master_roleId;\n $sql = \"SELECT GROUP_CONCAT(MASTER_ROLE_NAME ,'') as 'MASTER_ROLE_NAME' FROM mst_tbl_master_role WHERE MASTER_ROLE_ID IN($masterROles) \";\n $info = DB::select(DB::raw($sql));\n // print_r();\n return $info[0]->MASTER_ROLE_NAME;\n })\n ->addColumn('REPORTING_MANGERS', function ($query) {\n $REPORTING = $query->REPORTING_MANGERS;\n $sql = \"SELECT GROUP_CONCAT(username ,'') as 'REPORTING_MANGERS' FROM mst_user_tbl WHERE userId IN($REPORTING) \";\n $info = DB::select(DB::raw($sql));\n // print_r();\n return $info[0]->REPORTING_MANGERS;\n })\n ->addColumn('PRIMARY_MANGER', function ($query) {\n if ($query->PRIMARY_MANGER != null) {\n $assinedusers = DB::table('mst_user_tbl')->where(['Flag' => 'Show', 'userId' => $query->PRIMARY_MANGER])->get()->first();\n return $assinedusers->username;\n } else {\n return 'Not Assinded';\n }\n })->addColumn('SHIFT_ID', function ($query) {\n if ($query->SHIFT_ID != 0) {\n $assinedShift = DB::table('mst_tbl_shifts')->where(['Flag' => 'Show', 'SHIFT_ID' => $query->SHIFT_ID])->get()->first();\n return $assinedShift->SHIFT_NAME;\n } else {\n return 'No Shifts';\n }\n })\n ->addColumn('action', function ($query) {\n $id = Crypt::encrypt($query->userId);\n return '<a href=\"' . action('Admin\\UserController@editUser', Crypt::encrypt($query->userId)) . '\" id=\"userform' . $query->userId . '\"><img src=\"/asset/css/zondicons/zondicons/edit-pencil.svg\" style=\"width: 15px;margin-right: 20px; filter: invert(0.5);\" alt=\"\"></a>\n <a href=\"javascript:void(0)\" onclick=\"deleteUser(' . \"'$id'\" . ',event)\"><img src=\"/asset/css/zondicons/zondicons/close.svg\"\n style=\"width: 15px; filter: invert(0.5);\" alt=\"\"></a>\n ';\n })\n ->rawColumns(['action', 'PRIMARY_MANGER', 'master_roleId', 'REPORTING_MANGERS'])\n ->make(true);\n\n }", "public function search() {\n\t\t$data = $this->model->getSearchData($this->table->getFilterNames());\n\t\t$this->table->setData($data);\n\t\t// Store the user/object ids in the session so the report() can reuse them\n\t\t$this->storeIdsInSession($data);\n\t\t$this->tpl->setContent($this->table->getHTML());\n\t}", "function headhunters(){\n\t\t\t\t\trequire_once(\"database\\database_connection.php\");\n\t\t\t\t\t$conn=database();\n\t\t\t\t\t//Query the database\n\t\t\t\t\t$resultSet = $conn->query(\"SELECT * FROM headhunters_view\");\n\n\t\t\t\t\tif($resultSet->num_rows != 0){\n\t\t\t\t\t\twhile($rows = $resultSet->fetch_assoc()){\n\t\t\t\t\t\t\t$username = $rows['UserName'];\n\t\t\t\t\t\t\t$headhunters = $rows['headhunters'];\n\n\t\t\t\t\t\t\techo \"<tr>\n\t\t\t\t\t\t\t<td>$username</td>\n\t\t\t\t\t\t\t<td>$headhunters</td>\n\t\t\t\t\t\t\t</tr>\";\n\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\techo\"ERROR\";\n\t\t\t\t\t}\n\t\t \t\t$conn->close();\n}", "public function printTableRow($open)\n {\n\n print \"<tr>\\n\";\n print \"<td>&nbsp;\" . $this->email . \"&nbsp;</td>\";\n print \"<td>&nbsp;\" . $this->level . \"&nbsp;</td>\";\n if (!$open)\n print \"</tr>\\n\";\n }", "static public function mdlShowUsers($table, $item, $value) {\r\n\r\n\t\tif ($item != null) {\r\n\r\n\t\t\t$stmt = Conection::conect()->prepare(\"SELECT * FROM $table WHERE $item = :$item\");\r\n\t\t\t\r\n\t\t\t$stmt -> bindParam(\":\".$item, $value, PDO::PARAM_STR);\r\n\r\n\t\t\t$stmt -> execute();\r\n\r\n\t\t\treturn $stmt -> fetch();\r\n\t\t\t\t\r\n\t\t}else{\r\n\r\n\t\t\t$stmt = Conection::conect()->prepare(\"SELECT * FROM $table\");\r\n\t\t\t\r\n\t\t\t$stmt -> execute();\r\n\r\n\t\t\treturn $stmt -> fetchAll();\r\n\r\n\t\t}\r\n\r\n\t\t$stmt -> close();\r\n\r\n\t\t$stmt = null; \r\n\t}", "public function actionIndex()\n {\n $request = \\Yii::$app->request;\n $pageSize = $request->get('pageSize', 30);\n\n $userdb = new User();\n\n $response = $userdb->getUserList($pageSize);\n\n $userData = $response['data'];\n $results = [];\n if(!empty($userData) && is_array($userData)){\n foreach ($userData as $row){\n $results[$row->id] = [\n 'id' => $row->id,\n 'username' => $row->username,\n 'role_name' => $row->role['name'],\n 'create_time' => date('Y-m-d H:i:s',$row['create_time']),\n ];\n }\n }\n\n $dataProvider = new ArrayDataProvider([\n 'sort' => [\n 'attributes' => ['id'],\n ],\n 'pagination' => [\n 'pageSize' => $pageSize,\n 'totalCount' => $response['count']\n ]\n ]);\n $dataProvider->setModels($results);\n $dataProvider->setTotalCount($response['count']);\n\n return $this->render('index',['dataProvider' => $dataProvider]);\n }", "public function index(){\n $users = User::paginate(10); \n return view('admin.layout.users_table_layout',compact([\"users\"]));\n }" ]
[ "0.7626501", "0.7227294", "0.6777034", "0.67097676", "0.66560143", "0.65461373", "0.65293396", "0.64735633", "0.64584124", "0.6457489", "0.6449465", "0.6431529", "0.6408757", "0.6348586", "0.6326245", "0.62955165", "0.62951094", "0.6273669", "0.6254081", "0.6253343", "0.6252066", "0.6217915", "0.62067467", "0.6187657", "0.6184406", "0.6127618", "0.6121401", "0.60921776", "0.6090817", "0.60516375", "0.60461915", "0.602775", "0.60233504", "0.602015", "0.6003223", "0.59991336", "0.5989335", "0.5985879", "0.5963099", "0.5952498", "0.59500736", "0.59486634", "0.5947952", "0.594665", "0.5943164", "0.59366596", "0.5927422", "0.59194", "0.59148914", "0.59119874", "0.58982736", "0.58973205", "0.5893156", "0.58838147", "0.5862009", "0.58610123", "0.58533484", "0.5847986", "0.58443856", "0.58415717", "0.58280486", "0.58217204", "0.5821615", "0.58179355", "0.5810089", "0.58063865", "0.5803936", "0.5798787", "0.57986", "0.5797519", "0.57651335", "0.57466894", "0.574572", "0.5741891", "0.573932", "0.57333434", "0.57291925", "0.5725654", "0.57215863", "0.5720049", "0.5718157", "0.5718157", "0.5717998", "0.57154495", "0.5711824", "0.5708501", "0.5707009", "0.5698931", "0.56885767", "0.5682165", "0.5681965", "0.5680622", "0.5678687", "0.567132", "0.5656165", "0.5654968", "0.56539834", "0.5650734", "0.5647452", "0.56469256" ]
0.6493794
7
This test must be in real server environment. In this test, I use Apache as server and set Server/src as DocumentRoot
public function test_upload_file() { $target_url = "http://localhost:9111/src/upload.php"; // test1.txt is just a file $file_with_full_path = realpath("../_files/test1.txt"); $post = array("username"=>"ddd", "password"=>"123456", "file"=>'@'.$file_with_full_path); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $target_url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $result=curl_exec ($ch); curl_close ($ch); $this->assertEquals(1, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testApacheModPhpEnvironment()\n\t{\n\t\t$old_server = $_SERVER;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t// Request for http://localhost/ischool/\n\t\t\n\t\t\t$_SERVER['REQUEST_URI'] = '/ischool/';\n\t\t\t$_SERVER['QUERY_STRING'] = '';\n\t\t\t$_SERVER['REQUEST_METHOD'] = 'GET';\n\t\t\t$_SERVER['SCRIPT_NAME'] = '/ischool/index.php';\n\t\t\t$_SERVER['SCRIPT_FILENAME'] = '/home/installuser/Dropbox/projects/ischool/website/web/index.php';\n\t\t\tunset($_SERVER['PATH_INFO']);\n\t\t\t$_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'];\n\t\t\t$this->assertAptivateRequestRoot('/ischool/');\n\n\t\t\t// Request for http://localhost/ischool/?foo=bar\n\t\t\t// with Alias /ischool /home/installuser/Dropbox/projects/ischool/website/web\n\t\t\n\t\t\t$_SERVER['REQUEST_URI'] = '/ischool/?foo=bar';\n\t\t\t$_SERVER['QUERY_STRING'] = 'foo=bar';\n\t\t\t$this->assertAptivateRequestRoot('/ischool/');\n\n\t\t\t// Request for http://localhost/ischool/index.php?foo=bar\n\t\t\t//\n\t\t\t// For anything other than index.php, we must keep the\n\t\t\t// filename in the app_path, otherwise local links\n\t\t\t// on that page will go to a different php file.\n\t\t\t//\n\t\t\t// We might as well do that for index.php too, rather\n\t\t\t// than treating it as a special case on the assumption\n\t\t\t// that the web server is configured with\n\t\t\t// \"DirectoryIndex index.php\" (which it might not be).\n\t\t\t$_SERVER['REQUEST_URI'] = '/ischool/index.php';\n\t\t\t$_SERVER['QUERY_STRING'] = '';\n\t\t\t$this->assertAptivateRequestPhpFile('/ischool/', 'index.php');\n\n\t\t\t// Request for http://localhost/ischool/index.php?foo=bar\n\t\t\t$_SERVER['REQUEST_URI'] = '/ischool/index.php?foo=bar';\n\t\t\t$_SERVER['QUERY_STRING'] = 'foo=bar';\n\t\t\t$this->assertAptivateRequestPhpFile('/ischool/', 'index.php');\n\n\t\t\t// Request for http://localhost/ischool/auth.php?foo=bar\n\t\t\t// Make sure it works for other directly-accessed\n\t\t\t// PHP files as well (not using mod_rewrite).\n\t\t\t$_SERVER['REQUEST_URI'] = '/ischool/auth.php?foo=bar';\n\t\t\t$_SERVER['SCRIPT_NAME'] = '/ischool/auth.php';\n\t\t\t$_SERVER['SCRIPT_FILENAME'] = '/home/installuser/Dropbox/projects/ischool/website/web/auth.php';\n\t\t\t$_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'];\n\t\t\t$this->assertAptivateRequestPhpFile('/ischool/', 'auth.php');\n\n\t\t\t// Request for http://localhost/ischool/school/settings\n\t\t\t$_SERVER['REQUEST_URI'] = '/ischool/school/settings';\n\t\t\t$_SERVER['QUERY_STRING'] = '';\n\t\t\t$_SERVER['SCRIPT_NAME'] = '/ischool/CodeIgniter/index.php';\n\t\t\t$_SERVER['SCRIPT_FILENAME'] = '/home/installuser/Dropbox/projects/ischool/website/web/CodeIgniter/index.php';\n\t\t\t$_SERVER['PATH_INFO'] = '/school/settings';\n\t\t\t$_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] .\n\t\t\t\t$_SERVER['PATH_INFO'];\n\t\t\t$this->assertAptivateRequestSchoolSettings('/ischool/');\n\n\t\t\t// Request for http://localhost/ischool/school/settings?foo=bar\n\t\t\t$_SERVER['REQUEST_URI'] = '/ischool/school/settings?foo=bar';\n\t\t\t$_SERVER['QUERY_STRING'] = 'foo=bar';\n\t\t\t$this->assertAptivateRequestSchoolSettings('/ischool/');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$_SERVER = $old_server;\n\t\t\tthrow $e;\n\t\t}\n\t\t\n\t\t$_SERVER = $old_server;\n\t}", "protected function setUp()\n {\n $_SERVER['DOCUMENT_ROOT'] = '/var/www';\n $_SERVER['SCRIPT_FILENAME'] = '/var/www/zepto/index.php';\n $_SERVER['SERVER_NAME'] = 'zepto';\n $_SERVER['SERVER_PORT'] = '80';\n $_SERVER['SCRIPT_NAME'] = '/zepto/index.php';\n $_SERVER['REQUEST_URL'] = '/zepto/index.php/bar/xyz';\n $_SERVER['REQUEST_URI'] = '/zepto/index.php/bar/xyz';\n $_SERVER['PATH_INFO'] = '/bar/xyz';\n $_SERVER['REQUEST_METHOD'] = 'GET';\n $_SERVER['QUERY_STRING'] = 'one=1&two=2&three=3';\n $_SERVER['HTTPS'] = '';\n $_SERVER['REMOTE_ADDR'] = '127.0.0.1';\n unset($_SERVER['CONTENT_TYPE'], $_SERVER['CONTENT_LENGTH']);\n }", "public function testBaseUrl()\n\t{\n \t$this->assertEquals(Util::base('foo'), 'http://localhost/www/foo');\n \t$this->assertEquals(Util::css('foo.css'), 'http://localhost/www/public/css/foo.css');\n \t$this->assertEquals(Util::js('foo.js'), 'http://localhost/www/public/js/foo.js');\n \t$this->assertEquals(Util::img('foo.png'), 'http://localhost/www/public/images/foo.png');\n // Test cached\n $this->assertEquals(Util::base('foo'), 'http://localhost/www/foo');\n\t}", "protected function setUp()\n {\n\t\tparent::setUp();\n\n\t\tif (isset($_SERVER['DOCUMENT_ROOT'])) $this->documentRoot = $_SERVER['DOCUMENT_ROOT'];\n }", "public function testGetSelfHost()\n {\n $original = $_SERVER;\n\n Configuration::loadFromArray([\n 'baseurlpath' => '',\n ], '[ARRAY]', 'simplesaml');\n $_SERVER['SERVER_PORT'] = '80';\n $this->assertEquals('localhost', HTTP::getSelfHost());\n $_SERVER['SERVER_PORT'] = '3030';\n $this->assertEquals('localhost', HTTP::getSelfHost());\n\n $_SERVER = $original;\n }", "public function testLighttpdFastcgiPhpEnvironment()\n\t{\n\t\t$old_server = $_SERVER;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t// Request for http://staging.ischool.zm/\n\t\t\t$_SERVER['REQUEST_URI'] = '/';\n\t\t\t$_SERVER['QUERY_STRING'] = '';\n\t\t\t$this->assertAptivateRequestRoot('/');\n\n\t\t\t// Request for http://staging.ischool.zm/?foo=bar\n\t\t\t$_SERVER['REQUEST_URI'] = '/?foo=bar';\n\t\t\t$_SERVER['QUERY_STRING'] = 'foo=bar';\n\t\t\t$_SERVER['REQUEST_METHOD'] = 'GET';\n\t\t\t$_SERVER['SCRIPT_NAME'] = '/index.php';\n\t\t\t$_SERVER['SCRIPT_FILENAME'] = '/media/hdb1/ischool/ischool.zm/staging_html/index.php';\n\t\t\t$_SERVER['PATH_INFO'] = '';\n\t\t\t$_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'];\n\t\t\t$this->assertAptivateRequestRoot('/');\n\n\t\t\t// Request for http://staging.ischool.zm/index.php?foo=bar\n\t\t\t//\n\t\t\t// For anything other than index.php, we must keep the\n\t\t\t// filename in the app_path, otherwise local links\n\t\t\t// on that page will go to a different php file.\n\t\t\t//\n\t\t\t// We might as well do that for index.php too, rather\n\t\t\t// than treating it as a special case on the assumption\n\t\t\t// that the web server is configured with\n\t\t\t// \"DirectoryIndex index.php\" (which it might not be).\n\t\t\t$_SERVER['REQUEST_URI'] = '/index.php';\n\t\t\t$_SERVER['QUERY_STRING'] = '';\n\t\t\t$this->assertAptivateRequestPhpFile('/', 'index.php');\n\n\t\t\t// Request for http://staging.ischool.zm/index.php?foo=bar\n\t\t\t$_SERVER['REQUEST_URI'] = '/index.php?foo=bar';\n\t\t\t$_SERVER['QUERY_STRING'] = 'foo=bar';\n\t\t\t$this->assertAptivateRequestPhpFile('/', 'index.php');\n\n\t\t\t// Request for http://staging.ischool.zm/auth.php?foo=bar\n\t\t\t// Make sure it works for other directly-accessed\n\t\t\t// PHP files as well (not using mod_rewrite).\n\t\t\t$_SERVER['REQUEST_URI'] = '/auth.php?foo=bar';\n\t\t\t$_SERVER['SCRIPT_NAME'] = '/auth.php';\n\t\t\t$_SERVER['SCRIPT_FILENAME'] = '/media/hdb1/ischool/ischool.zm/staging_html/auth.php';\n\t\t\t$_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'];\n\t\t\t$this->assertAptivateRequestPhpFile('/', 'auth.php');\n\n\t\t\t// Request for http://staging.ischool.zm/school/settings\n\t\t\t$_SERVER['REQUEST_URI'] = '/school/settings';\n\t\t\t$_SERVER['QUERY_STRING'] = '';\n\t\t\t$_SERVER['SCRIPT_NAME'] = '/CodeIgniter/index.php';\n\t\t\t$_SERVER['SCRIPT_FILENAME'] = '/media/hdb1/ischool/ischool.zm/staging_html/CodeIgniter/index.php';\n\t\t\t$_SERVER['PATH_INFO'] = '/school/settings';\n\t\t\t$_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] .\n\t\t\t\t$_SERVER['PATH_INFO'];\n\t\t\t$this->assertAptivateRequestSchoolSettings('/');\n\n\t\t\t// Request for http://staging.ischool.zm/school/settings?foo=bar\n\t\t\t$_SERVER['REQUEST_URI'] = '/school/settings?foo=bar';\n\t\t\t$_SERVER['QUERY_STRING'] = 'foo=bar';\n\t\t\t$this->assertAptivateRequestSchoolSettings('/');\n\t\t\t\n\t\t\t// Having switched to using CodeIgniter for most things,\n\t\t\t// we now alias / to /media/hdb1/ischool/ischool.zm/staging_html/CodeIgniter.\n\t\t\t// Thus, when index.php is run, we see\n\t\t\t$_SERVER['SCRIPT_NAME'] = '/index.php';\n\t\t\t// But this index.php still knows its name only as\n\t\t\t// /CodeIgniter/index.php, which is not a subset of the\n\t\t\t// latter. This must not fail, and must treat the\n\t\t\t// app root as /, not /CodeIgniter.\n\t\t\t$this->assertAptivateRequestSchoolSettings('/');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$_SERVER = $old_server;\n\t\t\tthrow $e;\n\t\t}\n\t\t\n\t\t$_SERVER = $old_server;\n\t}", "public function testSendFileHttpServer(): void\n {\n $this->get('/posts/file');\n $this->assertFileResponse(TEST_APP . 'TestApp' . DS . 'Controller' . DS . 'PostsController.php');\n }", "public function test_public_controller__match()\n {\n $this->getRequestUrl('http://localhost/static.txt');\n \\Staq\\App::create($this->projectNamespace)\n ->setPlatform('local')\n ->run();\n $this->expectOutputHtmlContent('This is an example of static file');\n }", "public function testSrc()\n {\n $this->assertEquals($this->path->root().'/src/Http/Controllers', $this->path->src());\n }", "protected function setUp(): void\n {\n $this->server['SERVER_PROTOCOL'] = '1.1';\n $this->server['HTTP_ACCEPT'] = 'application/json';\n $this->server['REQUEST_METHOD'] = 'POST';\n $this->server['REQUEST_URI'] = '';\n $this->server['QUERY_STRING'] = '';\n $this->server['HTTP_HOST'] = 'subdomain.example.com';\n $this->server['HTTPS'] = 'Off';\n $this->server['SERVER_PORT'] = '';\n $this->server['PHP_AUTH_USER'] = '';\n $this->server['PHP_AUTH_PW'] = '';\n $this->server['PHP_SELF'] = '/index.php/index/var';\n $this->server['SCRIPT_NAME'] = '/index.php';\n $this->server['REMOTE_ADDR'] = '192.168.56.1';\n $this->server['PATH'] = '';\n $this->server['argv'] = array();\n $this->server['argc'] = 0;\n }", "function base_path() {\n return (new Server)->get('DOCUMENT_ROOT');\n }", "public function testCurrentUrlWithBasePath(): void\n {\n Router::fullBaseUrl('http://example.com');\n $request = new ServerRequest([\n 'params' => [\n 'action' => 'view',\n 'plugin' => null,\n 'controller' => 'Pages',\n 'pass' => ['1'],\n ],\n 'here' => '/cakephp',\n 'url' => '/cakephp/pages/view/1',\n ]);\n Router::setRequest($request);\n $this->assertSame('http://example.com/cakephp/pages/view/1', Router::url(null, true));\n $this->assertSame('/cakephp/pages/view/1', Router::url());\n }", "protected function setUpFakeSitePathAndHost() {}", "protected function getWebRoot() {}", "protected function getWebRoot() {}", "public static function getServerDocroot() \n\t{\n\t\treturn MHTTPD::$config['Paths']['server_docroot'];\n\t}", "public function testServeChange()\n {\n }", "public function testBasedir()\n {\n $this->buildContainer(\n $this->resolveOptions([\n ])\n );\n }", "public function testGetHttpServer(): void\n {\n $this->assertNull($this->_response);\n\n $this->get('/request_action/test_request_action');\n $this->assertNotEmpty($this->_response);\n $this->assertInstanceOf('Cake\\Http\\Response', $this->_response);\n $this->assertSame('This is a test', (string)$this->_response->getBody());\n $this->assertHeader('X-Middleware', 'true');\n }", "public function testBaseUrlWithBasePath(): void\n {\n Configure::write('App.base', '/cakephp');\n Router::fullBaseUrl('http://example.com');\n Router::setRequest(ServerRequestFactory::fromGlobals());\n\n $this->assertSame('http://example.com/cakephp/tasks', Router::url('/tasks', true));\n }", "public function testFullBaseURLFromRequest(): void\n {\n Configure::write('App.fullBaseUrl', false);\n $server = [\n 'HTTP_HOST' => 'cake.local',\n ];\n\n $request = ServerRequestFactory::fromGlobals($server);\n Router::setRequest($request);\n $this->assertSame('http://cake.local', Router::fullBaseUrl());\n }", "public static function setBaseUrl(): void\n\t{\n\t\tstatic::$scriptDirectory = str_replace('\\\\', '/', dirname(Server::get('SCRIPT_NAME')));\n\t\t$protocol = Server::get('REQUEST_SCHEME') . '://';\n\t\t$hostname = Server::get('HTTP_HOST');\n\t\tstatic::$baseUrl = $protocol . $hostname . static::$scriptDirectory;\n\t}", "public function testGetServer()\n {\n $this->assertEquals('127.0.0.1', $this->_req->getServer('SERVER_ADDR'));\n }", "public function getTestDirectory();", "public function testCommandLinePhpEnvironment()\n\t{\n\t\t$old_server = $_SERVER;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t// simulated command line:\n\t\t\t// REQUEST_URI='/' php index.php\n\t\t\n\t\t\t$_SERVER['REQUEST_URI'] = '/';\n\t\t\tunset($_SERVER['QUERY_STRING']);\n\t\t\tunset($_SERVER['REQUEST_METHOD']);\n\t\t\t$_SERVER['SCRIPT_NAME'] = 'index.php';\n\t\t\t$_SERVER['SCRIPT_FILENAME'] = $_SERVER['SCRIPT_NAME'];\n\t\t\tunset($_SERVER['PATH_INFO']);\n\t\t\t$_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'];\n\t\t\t$this->assertAptivateRequestRoot('/');\n\n\t\t\t// simulated command line:\n\t\t\t// REQUEST_URI='/auth.php' php auth.php\n\n\t\t\t$_SERVER['REQUEST_URI'] = '/auth.php';\n\t\t\t$_SERVER['SCRIPT_NAME'] = 'auth.php';\n\t\t\t$_SERVER['SCRIPT_FILENAME'] = $_SERVER['SCRIPT_NAME'];\n\t\t\t$_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'];\n\t\t\t$this->assertAptivateRequestPhpFile('/', 'auth.php');\n\n\t\t\t// simulated command line:\n\t\t\t// REQUEST_URI='/school/settings' php CodeIgniter/index.php\n\t\t\n\t\t\t$_SERVER['REQUEST_URI'] = '/school/settings';\n\t\t\t$_SERVER['SCRIPT_NAME'] = 'CodeIgniter/index.php';\n\t\t\t$_SERVER['SCRIPT_FILENAME'] = $_SERVER['SCRIPT_NAME'];\n\t\t\t$_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'];\n\t\t\t$this->assertAptivateRequestSchoolSettings('/');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$_SERVER = $old_server;\n\t\t\tthrow $e;\n\t\t}\n\t\t\n\t\t$_SERVER = $old_server;\n\t}", "public static function setUpBeforeClass()\n {\n $_SERVER['HTTP_HOST'] = \"\";\n }", "public static function setUpBeforeClass()\n {\n $_SERVER['HTTP_HOST'] = \"\";\n }", "protected function getTestApplicationPath()\n {\n return $this->getProjectRootPath() . '/testdata';\n }", "public function testIndex()\n {\n $this->call('GET', '/');\n $this->assertResponseOk();\n }", "public function test_servefile_route() {\n global $CFG;\n list($user, , $talkpoint) = $this->_setup_single_user_in_single_talkpoint();\n\n // current time\n $now = time();\n\n // create a talkpoint\n $this->loadDataSet($this->createArrayDataSet(array(\n 'talkpoint_talkpoint' => array(\n array('id', 'instanceid', 'userid', 'title', 'uploadedfile', 'nimbbguid', 'mediatype', 'closed', 'timecreated', 'timemodified'),\n array(1, $talkpoint->id, $user->id, 'Talkpoint 001', 'mod_talkpoint_web_test.txt', null, 'file', 0, $now, $now),\n ),\n )));\n\n // spit a dummy existing file\n check_dir_exists($CFG->dataroot . '/into/mod_talkpoint/' . $talkpoint->id . '/1');\n file_put_contents($CFG->dataroot . '/into/mod_talkpoint/' . $talkpoint->id . '/1/mod_talkpoint_web_test.txt', 'dummy contents');\n\n // request the file\n $client = new Client($this->_app);\n $client->request('GET', '/servefile/1');\n $this->assertTrue($client->getResponse()->isOk());\n }", "public function setUp(): void\n {\n $this->server = new Server\\Server();\n $this->server->setClass(TestAsset\\Foo::class, 'foo');\n $this->cacheFile = tempnam(sys_get_temp_dir(), 'zjs');\n\n // if (!is_writeable(__DIR__)) {\n if (! is_writable($this->cacheFile)) {\n $this->markTestSkipped('Cannot write test caches due to permissions');\n }\n\n if (file_exists($this->cacheFile)) {\n unlink($this->cacheFile);\n }\n }", "public function testRootOK()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testGetSelfHostWithPort()\n {\n $original = $_SERVER;\n\n Configuration::loadFromArray([\n 'baseurlpath' => '',\n ], '[ARRAY]', 'simplesaml');\n\n // standard port for HTTP\n $_SERVER['SERVER_PORT'] = '80';\n $this->assertEquals('localhost', HTTP::getSelfHostWithNonStandardPort());\n\n // non-standard port\n $_SERVER['SERVER_PORT'] = '3030';\n $this->assertEquals('localhost:3030', HTTP::getSelfHostWithNonStandardPort());\n\n // standard port for HTTPS\n $_SERVER['HTTPS'] = 'on';\n $_SERVER['SERVER_PORT'] = '443';\n $this->assertEquals('localhost', HTTP::getSelfHostWithNonStandardPort());\n\n $_SERVER = $original;\n }", "function getDocumentRoot(){\n\t\t$document_root = isset($_SERVER[\"DOCUMENT_ROOT\"]) ? $_SERVER[\"DOCUMENT_ROOT\"] : \"\";\n\t\t#get env variables under IIS\n\t\tif( !$document_root ){\n\t\t $sf = str_replace(\"\\\\\",\"/\",$_SERVER[\"SCRIPT_FILENAME\"]);\n\t\t $sn = $_SERVER[\"SCRIPT_NAME\"];\n\t\t $document_root = str_replace( $sn, \"\", $sf );\n\t\t}\n\t\treturn $document_root;\n}", "public function testIndex()\n {\n $client = static::createClient();\n\n $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode(), 'la route \"homepage\" ne fonctionne plus.');\n }", "public function testIndex()\n\t{\n\t\t$client = static::createClient();\n\n\t\t$crawler = $client->request('GET', '/');\n\n\t\t$this->assertEquals(200, $client->getResponse()->getStatusCode());\n\t}", "public function setUpTest()\n\t{\n\t\t$_SERVER['REQUEST_URI'] = \"/\";\n\t\t$_SERVER['REQUEST_METHOD'] = \"GET\";\n\t}", "public function testIndex()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testHttpTestServerAvailable() {\n\t\t$this->assertTrue(\\REQUESTS_TEST_SERVER_HTTP_AVAILABLE);\n\t}", "public function testGetPath()\n {\n $this->assertEquals('hello', $this->_req->getPath());\n }", "public function testRoot()\n {\n\n $rawResponse = $this->client->request('GET', '/', ['http_errors' => false]);\n $response = json_decode($rawResponse->getBody());\n\n $this->assertEquals('error', $response->status);\n $this->assertEquals('Requested url not found', $response->reason);\n\n }", "public function testBaseUrl() {\n\t\tConfigure::write('debug', 0);\n\t\t$config = $this->Helper->config();\n\t\t$config->set('js.baseUrl', 'http://cdn.example.com/js/');\n\t\t$config->set('js.timestamp', false);\n\n\t\t$result = $this->Helper->script('libs.js');\n\t\t$expected = array(\n\t\t\tarray('script' => array(\n\t\t\t\t'type' => 'text/javascript',\n\t\t\t\t'src' => 'http://cdn.example.com/js/libs.js'\n\t\t\t))\n\t\t);\n\t\t$this->assertTags($result, $expected);\n\n\t\tConfigure::write('debug', 1);\n\t\t$result = $this->Helper->script('libs.js');\n\t\t$expected = array(\n\t\t\tarray('script' => array(\n\t\t\t\t'type' => 'text/javascript',\n\t\t\t\t'src' => '/cache_js/libs.js'\n\t\t\t))\n\t\t);\n\t\t$this->assertTags($result, $expected);\n\t}", "public function homepageTest()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "private static function getWebRoot() {\n if (file_exists(realpath(__DIR__ . '/../../../../../public_html'))) {\n return self::addlSash(\"public_html\");\n } else {\n return self::addlSash(\"web\");\n }\n }", "public function testAction() {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*$uri = \"$_SERVER[REQUEST_URI]\";\n\t\t\t$arr = explode('/', $uri );\n\t\t\t\n\t\t$path = \"$_SERVER[HTTP_HOST]\" . '/' . $arr[1] . '/';\n\t\t\n\t\techo \"<br/>Test Path: http://$path\";*/\n\t\t\n\t\t// Create directory, with full permissions\n\t\t//mkdir(\"NewDir\", \"0777\");\n\t\t// Rename\n\t\t//rename(\"newDir\", \"renameDir\");\n\t\n\t\t/*\n\t\t\t$indicesServer = array('PHP_SELF',\n\t\t\t\t\t'argv',\n\t\t\t\t\t'argc',\n\t\t\t\t\t'GATEWAY_INTERFACE',\n\t\t\t\t\t'SERVER_ADDR',\n\t\t\t\t\t'SERVER_NAME',\n\t\t\t\t\t'SERVER_SOFTWARE',\n\t\t\t\t\t'SERVER_PROTOCOL',\n\t\t\t\t\t'REQUEST_METHOD',\n\t\t\t\t\t'REQUEST_TIME',\n\t\t\t\t\t'REQUEST_TIME_FLOAT',\n\t\t\t\t\t'QUERY_STRING',\n\t\t\t\t\t'DOCUMENT_ROOT',\n\t\t\t\t\t'HTTP_ACCEPT',\n\t\t\t\t\t'HTTP_ACCEPT_CHARSET',\n\t\t\t\t\t'HTTP_ACCEPT_ENCODING',\n\t\t\t\t\t'HTTP_ACCEPT_LANGUAGE',\n\t\t\t\t\t'HTTP_CONNECTION',\n\t\t\t\t\t'HTTP_HOST',\n\t\t\t\t\t'HTTP_REFERER',\n\t\t\t\t\t'HTTP_USER_AGENT',\n\t\t\t\t\t'HTTPS',\n\t\t\t\t\t'REMOTE_ADDR',\n\t\t\t\t\t'REMOTE_HOST',\n\t\t\t\t\t'REMOTE_PORT',\n\t\t\t\t\t'REMOTE_USER',\n\t\t\t\t\t'REDIRECT_REMOTE_USER',\n\t\t\t\t\t'SCRIPT_FILENAME',\n\t\t\t\t\t'SERVER_ADMIN',\n\t\t\t\t\t'SERVER_PORT',\n\t\t\t\t\t'SERVER_SIGNATURE',\n\t\t\t\t\t'PATH_TRANSLATED',\n\t\t\t\t\t'SCRIPT_NAME',\n\t\t\t\t\t'REQUEST_URI',\n\t\t\t\t\t'PHP_AUTH_DIGEST',\n\t\t\t\t\t'PHP_AUTH_USER',\n\t\t\t\t\t'PHP_AUTH_PW',\n\t\t\t\t\t'AUTH_TYPE',\n\t\t\t\t\t'PATH_INFO',\n\t\t\t\t\t'ORIG_PATH_INFO') ;\n\t\n\t\techo \"<br/>\";\n\t\n\t\n\t\techo '<table cellpadding=\"10\">' ;\n\t\tforeach ($indicesServer as $arg) {\n\t\tif (isset($_SERVER[$arg])) {\n\t\techo '<tr><td>'.$arg.'</td><td>' . $_SERVER[$arg] . '</td></tr>' ;\n\t\t}\n\t\telse {\n\t\techo '<tr><td>'.$arg.'</td><td>-</td></tr>' ;\n\t\t}\n\t\t}\n\t\techo '</table>' ;\n\t\t*/\n\t}", "public function testIndex()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testBasicExample()\n\t{\n\t\t$crawler = $this->client->request('GET', '/');\n\n\t\t$this->assertTrue($this->client->getResponse()->isOk());\n\t\t//$this->assertRedirectedTo(\"files\");\n\t}", "protected function setupServer()\n {\n $serverVars = $this->router->getServerVarsForUri();\n $_SERVER = array_merge($_SERVER, $serverVars);\n }", "public function testRelativizePath()\n {\n $container = new Container(['PhpBench\\Extension\\CoreExtension'], [\n 'path' => 'hello',\n 'config_path' => '/path/to/phpbench.json',\n ]);\n $container->init();\n $this->assertEquals('/path/to/hello', $container->getParameter('path'));\n }", "public function testExample()\n {\n $this->get('/');\n\n $this->assertEquals(\n $this->response->getContent(), $this->app->version()\n );\n }", "public function testExample()\n {\n $this->get('/');\n\n $this->assertEquals(\n $this->app->version(), $this->response->getContent()\n );\n }", "public function testExample()\n {\n $this->get('/');\n\n $this->assertEquals(\n $this->app->version(), $this->response->getContent()\n );\n }", "public function testExample()\n {\n $this->get('/');\n\n $this->assertEquals(\n $this->app->version(), $this->response->getContent()\n );\n }", "public function testCache()\n {\n $client = static::createClient();\n $client->request('GET', '/include.php?part=site');\n /** @var $response \\Symfony\\Component\\HttpFoundation\\Response */\n $response = $client->getResponse();\n $this->assertNotEmpty($response->headers->getCacheControlDirective('public'));\n $client = static::createClient(array('environment' => 'test2'));\n $client->request('GET', '/include.php?part=site');\n $response = $client->getResponse();\n $this->assertFalse($response->headers->hasCacheControlDirective('public'));\n }", "public function testOrgApacheSlingEngineImplSlingMainServlet()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.engine.impl.SlingMainServlet';\n\n $crawler = $client->request('POST', $path);\n }", "public static function fix_document_root()\n {\n if (!serverv('PATH_INFO') || serverv('DOCUMENT_ROOT')) {\n return;\n }\n $_SERVER['DOCUMENT_ROOT'] = str_replace(\n $_SERVER['PATH_INFO']\n , ''\n , str_replace(\n '\\\\'\n , '/'\n , serverv('PATH_TRANSLATED'))\n ) . '/';\n }", "public function testGetSpecificRouteHttpServer(): void\n {\n $this->get('/get/request_action/test_request_action');\n $this->assertResponseOk();\n $this->assertSame('This is a test', (string)$this->_response->getBody());\n }", "public function testInboundDocumentDocumentFile()\n {\n }", "function pretend($webroot, $appname, $domain = 'local.ellipsis.com', $uri = '/index.php'){\n $_SERVER = array_merge(\n $_SERVER,\n array(\n 'HTTP_HOST' => $domain,\n 'HTTP_CONNECTION' => 'keep-alive',\n 'HTTP_USER_AGENT' => 'Mozilla/5.0 (Macintosh; Intel Mac OSX 10_6_8) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2',\n 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate,sdch',\n 'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.8',\n 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',\n 'SERVER_SIGNATURE' => '',\n 'SERVER_SOFTWARE' => 'Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1',\n 'SERVER_NAME' => $domain,\n 'SERVER_ADDR' => '127.0.0.1',\n 'SERVER_PORT' => '80',\n 'REMOTE_ADDR' => '127.0.0.1',\n 'DOCUMENT_ROOT' => $webroot,\n 'SERVER_ADMIN' => '[email protected]',\n 'SCRIPT_FILENAME' => \"{$webroot}/.init.php\",\n 'REMOTE_PORT' => '51212',\n 'REDIRECT_URL' => $uri,\n 'GATEWAY_INTERFACE' => 'CGI/1.1',\n 'SERVER_PROTOCOL' => 'HTTP/1.1',\n 'REQUEST_METHOD' => 'GET',\n 'QUERY_STRING' => '',\n 'REQUEST_URI' => $uri,\n 'SCRIPT_NAME' => '/.init.php',\n 'PHP_SELF' => '/.init.php'\n )\n );\n $_ENV = array_merge($_ENV, array('USERNAME' => $_ENV['USER']));\n //print '<pre>' . print_r(array($_SERVER, $_ENV), true) . '</pre>';\n}", "public function testSystemUnderTest(){\n //Because it passes is_file\n $sut = $this->phpwebunit->setSystemUnderTest(__FILE__);\n $this->assertEquals(__FILE__, $sut);\n $this->assertEquals(__FILE__, $this->phpwebunit['sut']);\n\n //Ok, now lets test the fallback plan\n $sut = $this->phpwebunit->setSystemUnderTest(uniqid('does_not_exist'), array('SCRIPT_FILENAME'=>'SCRIPTNAMEGOESHERE'));\n $this->assertEquals('SCRIPTNAMEGOESHERE', $sut);\n\n //Worse case scenario, script_name isn't set :(\n try {\n $sut = $this->phpwebunit->setSystemUnderTest(uniqid('does_not_exist'), array());\n } catch (\\Exception $expected) {\n return;\n }\n $this->fail('Exception should have been raised, SCRIPT_NAME cannot be found');\n }", "public static function setDocRoot($docRoot = '')\n {\n self::$isDocRootSet = true;\n if ($docRoot) {\n $_SERVER['DOCUMENT_ROOT'] = $docRoot;\n } elseif (isset($_SERVER['SERVER_SOFTWARE'])\n && 0 === strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/')) {\n $_SERVER['DOCUMENT_ROOT'] = substr(\n $_SERVER['SCRIPT_FILENAME']\n ,0\n ,strlen($_SERVER['SCRIPT_FILENAME']) - strlen($_SERVER['SCRIPT_NAME']));\n $_SERVER['DOCUMENT_ROOT'] = rtrim($_SERVER['DOCUMENT_ROOT'], '\\\\');\n }\n }", "protected function setInitialRootPath() {}", "public function testHomepage()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n $response->see('Welcome to my library');\n }", "public function testComDayCqAnalyticsTestandtargetImplServletsAdminServerServlet()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.analytics.testandtarget.impl.servlets.AdminServerServlet';\n\n $crawler = $client->request('POST', $path);\n }", "public function test_bootstrap() {\n global $CFG;\n\n // The httpswwwroot has been deprecated, we keep it as an alias for backwards compatibility with plugins only.\n $this->assertTrue(isset($CFG->httpswwwroot));\n $this->assertEquals($CFG->httpswwwroot, $CFG->wwwroot);\n $this->assertEquals($CFG->prefix, $CFG->phpunit_prefix);\n }", "public function test_vcs_abspath()\n {\n }", "function serendipity_httpCoreDir() {\n if (!empty($_SERVER['SCRIPT_FILENAME']) && substr(php_sapi_name(), 0, 3) != 'cgi') {\n return dirname($_SERVER['SCRIPT_FILENAME']) . '/';\n }\n\n if (!empty($_SERVER['ORIG_PATH_TRANSLATED'])) {\n return dirname(realpath($_SERVER['ORIG_PATH_TRANSLATED'])) . '/';\n }\n\n return $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/';\n}", "public function testExample(): void\n {\n $this->get('/');\n\n $this->assertEquals(\n $this->app->version(),\n $this->response->getContent(),\n );\n }", "public function testCommandLinePhpCgiEnvironment()\n\t{\n\t\t$old_server = $_SERVER;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t// simulated command line:\n\t\t\t// REQUEST_URI='/' php-cgi -f index.php\n\t\t\t// (http://stackoverflow.com/a/11965479/648162)\n\t\t\n\t\t\tunset($_SERVER['REQUEST_URI']);\n\t\t\tunset($_SERVER['QUERY_STRING']);\n\t\t\tunset($_SERVER['REQUEST_METHOD']);\n\t\t\tunset($_SERVER['SCRIPT_NAME']);\n\t\t\tunset($_SERVER['SCRIPT_FILENAME']);\n\t\t\tunset($_SERVER['PATH_INFO']);\n\t\t\t$_SERVER['PHP_SELF'] = '';\n\t\t\t$this->assertAptivateRequestPhpFile('/', 'index.php');\n\n\t\t\t// the only difference is the $script_path_within_app\n\t\t\t// passed to new Aptivate_Request().\n\t\t\t$this->assertAptivateRequestPhpFile('/', 'auth.php');\n\t\t\t\n\t\t\t// simulated command line: REQUEST_URI='/school/settings'\n\t\t\t// php-cgi -f CodeIgniter/index.php\n\t\t\t// (http://stackoverflow.com/a/11965479/648162)\n\t\t\t//\n\t\t\t// CodeIgniter will die unless SCRIPT_NAME is set to\n\t\t\t// something, and we configured it to use PATH_INFO\n\t\t\t// to determine which controller to run, so we have\n\t\t\t// to set that too.\n\t\t\t$_SERVER['PATH_INFO'] = '/school/settings';\n\t\t\t$_SERVER['SCRIPT_NAME'] = 'CodeIgniter/index.php';\n\t\t\t$this->assertAptivateRequestSchoolSettings('/');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$_SERVER = $old_server;\n\t\t\tthrow $e;\n\t\t}\n\t\t\n\t\t$_SERVER = $old_server;\n\t}", "public function getWebappPath();", "public function testHomepage()\n {\n $resp = $this->client->get('/');\n $this->assertEquals('200', $resp->getStatusCode(), 'top page status code');\n $this->assertStringContainsString(\n 'Welcome to the <strong>Symfony Demo</strong> application',\n $resp->getBody()->getContents()\n );\n }", "public function test_show_homepage()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testRootGetRoute()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n $response->assertSee('Enter url to crawl');\n $response->assertSee('Last Pages Crawled');\n }", "protected function getWebServer() {}", "public function testBasicTest()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testGetHost() {\n static::$_server = array(\n 'SERVER_NAME' => 'nimbl.es'\n );\n $request = $this->createRequest();\n $this->assertEquals('nimbl.es', $request->getHost());\n }", "public function testRedirectHttpServer(): void\n {\n $this->post('/tests_apps/redirect_to');\n $this->assertResponseCode(302);\n $this->assertHeader('X-Middleware', 'true');\n }", "function getBaseUrl()\n{\n $doc_root_folders = utf8_explode(\"/\", $_SERVER['DOCUMENT_ROOT']);\n $cwd__folders = utf8_explode(\"/\", getcwd());\n //the difference between those is the path from doc root to the folder where\n //all files for this URI reside\n $path_from_doc_root = implode(\"/\", array_diff($cwd__folders, $doc_root_folders));\n return $_SERVER['HTTP_HOST'].'/'.$path_from_doc_root;\n}", "function getServerFilePath($fileName) {\n return $_SERVER['DOCUMENT_ROOT'].PATHS[$fileName];\n}", "public function setUp()\n {\n $this->client = static::createClient();\n $this->client->setServerParameters(\n array(\n 'PHP_AUTH_USER' => 'nicolas',\n 'PHP_AUTH_PW' => 'nicolas',\n ),\n array('HTTP_HOST' => 'www.openorchestra.dev')\n );\n $this->client->followRedirects();\n }", "abstract public function installApache();", "protected function setUp() {\n vfsStreamWrapper::register();\n vfsStreamWrapper::setRoot(new vfsStreamDirectory(\"Resources\"));\n vfsStream::copyFromFileSystem(dirname(__DIR__) . \"/Resources\", vfsStreamWrapper::getRoot());\n }", "public function testComDayCqCommonsServletsRootMappingServlet()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.commons.servlets.RootMappingServlet';\n\n $crawler = $client->request('POST', $path);\n }", "public function testComAdobeCqDamS7imagingImplPsPlatformServerServlet()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.dam.s7imaging.impl.ps.PlatformServerServlet';\n\n $crawler = $client->request('POST', $path);\n }", "public function testFrontendHome()\n {\n $this->visit('/')->seeStatusCode(200);\n }", "public function testStartView()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n $response->assertSee('Log in to play');\n }", "function _apache()\n{\n $c = \"# Generated with beatnik on \" . date('Y-m-d h:i:s') . \" by \" . $GLOBALS['username'] . \"\\n\\n\";\n foreach ($GLOBALS['domains'] as $domain) {\n // Get default data and skip if no cnames\n $zonedata = _getRecords($domain['zonename']);\n if (!isset($zonedata['cname'])) {\n continue;\n }\n\n // data\n $zonename = $domain['zonename'];\n $tld = substr($zonename, strrpos($zonename, '.')+1);\n $domain = substr($zonename, 0, strrpos($zonename, '.'));\n foreach ($zonedata['cname'] as $id => $values) {\n\n extract($values);\n if (empty($hostname)) {\n continue; // use empty hostname as alias for www\n }\n\n $c .= \"\\n\";\n $c .= \"<VirtualHost $hostname.$zonename:80>\\n\";\n $c .= \" DocumentRoot /var/www/$domain\" . \"_$tld/$hostname.$zonename\\n\";\n $c .= \" ServerName $hostname.$zonename\\n\";\n if ($hostname == 'www') {\n $c .= \" ServerAlias $zonename\\n\";\n }\n $c .= \" ErrorLog logs/$hostname.$zonename/error_log\\n\";\n $c .= \" TransferLog logs/$hostname.$zonename/access_log\\n\";\n $c .= \" php_admin_value upload_tmp_dir \\\"/var/tmp/www/$hostname.$zonename\\\"\\n\";\n $c .= \" php_admin_value open_basedir \\\".:/usr/lib/php:/var/tmp/www/$hostname.$zonename:/var/www/$domain\" . \"_$tld/$hostname.$zonename\\\"\\n\";\n $c .= \"</VirtualHost>\\n\";\n }\n }\n\n return $c;\n}", "protected function setUp()\n {\n $this->object = new CNetwork;\n $_SERVER['HTTP_HOST'] = 'www.creovel.org';\n $_SERVER['REMOTE_ADDR'] = '10.10.10.10';\n $_SERVER['REQUEST_URI'] = '/index.php';\n }", "public function testHomePageIsWorking() {\n $this->client->request('GET', '/');\n\n Assert::true($this->client->getResponse()->isOk());\n }", "public function baseUrl()\n\t{\n\t\techo $_SERVER['SERVER_NAME'];\n\t}", "public static function setUpBeforeClass()\n {\n /*\n * First, start the PHP build-in server:\n * php -S 127.0.0.1:8000 -t PHP/Compound/MVC/Public\n */\n self::$process = new Process('php -S 127.0.0.1:8000 -t PHP/Compound/MVC/Public');\n self::$process->start();\n\n /*\n * Wait for server\n */\n usleep(100000);\n }", "public function testWebinars()\n {\n }", "public function testComAdobeGraniteHttpcacheFileFileCacheStore()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.granite.httpcache.file.FileCacheStore';\n\n $crawler = $client->request('POST', $path);\n }", "public function testBasicTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testBasicTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testBasicTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testBasicTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testBasicTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testBasicTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testBasicTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }" ]
[ "0.7046114", "0.6402921", "0.6263953", "0.6219726", "0.6209565", "0.620146", "0.61728406", "0.615131", "0.6122206", "0.6104392", "0.60449445", "0.6037353", "0.6029585", "0.59929097", "0.5992182", "0.5962277", "0.5934689", "0.59065354", "0.5876621", "0.5819222", "0.58124095", "0.5800257", "0.5779924", "0.5774875", "0.57411224", "0.57338464", "0.57338464", "0.5721706", "0.57141215", "0.5710821", "0.57086027", "0.570103", "0.5690822", "0.5675035", "0.56600213", "0.5633387", "0.5624613", "0.56169546", "0.56128365", "0.5602942", "0.5600918", "0.55981153", "0.5597522", "0.55962044", "0.55896676", "0.55870664", "0.55870664", "0.55867916", "0.55536264", "0.5547853", "0.55255437", "0.5522477", "0.5522477", "0.5522477", "0.551989", "0.5519889", "0.5501991", "0.5499961", "0.5485486", "0.54765636", "0.5472783", "0.54722804", "0.5468342", "0.54657006", "0.5438468", "0.5428507", "0.5425459", "0.54221743", "0.542094", "0.5419428", "0.54110235", "0.54060423", "0.54020494", "0.53996366", "0.53975606", "0.53884363", "0.538503", "0.53835726", "0.53793114", "0.53787076", "0.5377264", "0.53766096", "0.537489", "0.5369471", "0.5365568", "0.5363555", "0.5352621", "0.53481394", "0.53452927", "0.53448486", "0.5337053", "0.5333182", "0.5329098", "0.5327624", "0.5324618", "0.5324618", "0.5324618", "0.5324618", "0.5324618", "0.5324618", "0.5324618" ]
0.0
-1
Shows a list of Brands, with or without searching
public function index(BrandRepository $brandRepository, Request $request): Response { // Form creation $searchForm = $this->createForm(BrandSearchType::class); // Request handling to check if the form has been submitted $searchForm->handleRequest($request); if ($searchForm->isSubmitted() && $searchForm->isValid()) { $search_category = $request->request->get('brand_search')['search_category']; $search_text = $request->request->get('brand_search')['search_text']; // Using the parameters from the request, we search specific Brands $brands = $brandRepository->searchBrands($search_category, $search_text); } else { $brands = $brandRepository->findAll(); } return $this->render('brand/index.html.twig', [ 'brands' => $brands, 'searchForm' => $searchForm->createView(), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list()\n {\n $bname = request()->bname??'';\n $where=[];\n if($bname){\n $where[]=['bname','like',\"%$bname%\"];\n }\n $pageSize = config('app.pageSize');\n $data = Brand::where($where)->orderby('bid','desc')->paginate($pageSize);\n return view(\"brand.list\",['data'=>$data]);\n }", "function getBrands() {\n $cat = $_POST['cat'];\n echo(json_encode($this->Trader_mdl->getBrands($cat)));\n }", "public function getCarBrands();", "function getBrands()\n\t{\n\t\tglobal $con;\n\t\t\t\n\t\t//echo var_dump($con);\n\t\t$get_brands = \"select * from brands\";\n\t\t$run_brands = mysqli_query($con, $get_brands);\n\t\twhile ($row = mysqli_fetch_array($run_brands)){\n\t\t\t$id = $row['brand_id'];\n\t\t\t$title =$row['brand_title'];\n\n\t\t\techo \"<div class='brand_link'><a href='index.php?brand=$id'>$title</a></div>\";\n\t\t}\n\t}", "function listBrand($search){\r\n\r\n $this->app->log->info(__CLASS__ . '::' . __METHOD__);\r\n $dao = new \\PNORD\\Model\\BrandDAO($this->app); \r\n return $dao->listBrand($search); \r\n\r\n }", "public function index()\n {\n $productBrands = Brand::orderBy('code')->get();\n return view('brands.index', compact('productBrands'));\n }", "function getbrands(){\n\t\n\tglobal $connection;\n\t\n\t$get_brands = \"select * from brands\";\n\t$run_brands = mysqli_query($connection, $get_brands);\n\twhile ($row_brands = mysqli_fetch_array($run_brands)){\n\t\t$brands_id = $row_brands['brand_id'];\n\t\t$brands_title = $row_brands['brand_title'];\n\t\t\n\techo \"<li><a href='index.php?brands=$brands_id'>$brands_title</a></li>\";\n\t\t\n\t}\n}", "public function index() {\n\n\n $search = Input::get('search');\n if ($search) {\n $brands = Brand::sortable(['created_at' => 'desc'])\n ->where(function($query) use ($search) {\n return $query->where('brand_name', 'LIKE', \"%$search%\");\n })\n ->paginate(Configure('CONFIG_PAGE_LIMIT'));\n } else {\n $brands = Brand::sortable(['created_at' => 'desc'])->paginate(Configure('CONFIG_PAGE_LIMIT'));\n }\n\n $pageTitle = \"Brand\";\n $title = \"Brand\";\n $pages[\"<i class='fa fa-dashboard'></i>\" . trans('admin.DASHBOARD')] = 'dashboard';\n\n\n $breadcrumb = array('pages' => $pages, 'actives' =>'Brand Page', 'active' =>'admin.brands.index');\n setCurrentPage('admin.brands');\n\n return view('admin.brands.index', compact('brands', 'pageTitle', 'title', 'breadcrumb'));\n }", "public function actionBisnis() {\n $strata = new WStrata('search');\n $strata->unsetAttributes(); // clear any default values\n if (isset($_GET['WStrata']))\n $strata->attributes = $_GET['WStrata'];\n \n $this->render('bisnis', array(\n 'strata' => $strata,\n ));\n }", "public function getArrayOfBrands();", "public function index()\n {\n $brands = $this->brandService->paginate(10);\n\n return view('backend.showcase.brands.index')->with(compact('brands'));\n }", "public function show($id)\n {\n //\n return Brands::find($id);\n }", "public function getBrands()\n {\n return $this->brands;\n }", "public function index()\n {\n // $brands = Brand::orderBy('id','ASC')->simplePaginate(10);\n return view('admin.brands.index')->with('brands', Brand::all());\n }", "public function AllBrand(Request $request){\n\n $keyword = $request->search; //menangkap kata kunci\n if ($keyword) {\n // jika ada keyword maka passing yang ini\n $brands = Brand::where('brand_name', 'like', \"%\" . $keyword. \"%\")->paginate(5);\n } else {\n // jika tidak ada keyword passing data yg ini\n $brands = Brand::latest()->paginate(5);\n }\n return view('admin.brand.index',compact('brands'));\n }", "public function index()\n {\n $brands=Brand::select([\"id\", \"name\", \"description\", \"created_at\"])->orderBy(\"name\", \"asc\")->paginate(8);\n \n return view(\"admin.brands.index\",compact([\"brands\"]));\n }", "public function index()\n {\n $paginator = $this->brandRepository->getAllWithPaginate(5);\n\n return view('shop.admin.brands.index', compact('paginator'));\n }", "public function indexAction()\n {\n $entities = $this->get('mqm_brand.brand_manager')->findBrands();\n\n return array('entities' => $entities);\n }", "public function get_brands()\n\t{\n\t\t$this->db->select(\n\t\t\t\"DISTINCT(\".$this->datas_table.\".brand) \"\n\t\t);\n\t\t$this->db->from($this->datas_table);\n\t\t$datas = $this->db->get();\n\t\treturn $datas;\n\t}", "function get_all_brands() {\n $this->db->order_by('name', 'asc');\n return $this->db->get('brands')->result_array();\n }", "public function index()\n {\n $this->data['brands'] = Brand::orderBy('name', 'DESC')->paginate(10);\n\n return view('admin.brands.index', $this->data);\n }", "public function index()\n {\n $this->authorization_brands->trackFilter();\n\n return view('site::admin.authorization_brand.index', [\n 'repository' => $this->authorization_brands,\n 'authorization_brands' => $this->authorization_brands->paginate(config('site.per_page.authorization_brand', 10), ['authorization_brands.*'])\n ]);\n }", "public function index()\n {\n $brands = Brand::all();\n return view('backend.brands.index', compact('brands'));\n }", "public function index()\n {\n $brands = Brand::paginate(10);\n\n return view('admin.brands.index', compact('brands'));\n }", "public function index()\n {\n $brands = Brand::paginate(10);\n\n return view('brands.index', compact('brands'));\n }", "public function index()\n {\n $brands = Brand::latest()->paginate(5);\n return view('admin.brands.index', compact('brands'));\n }", "public function index()\n {\n $brands = Brand::paginate(10);\n return view('brands.index',compact('brands'));\n }", "public function index()\n {\n $brands = brand_product::where('brand_status', 1)->get();\n return Brand::collection($brands);\n }", "public function index()\n {\n return Brand::all();\n }", "public function index()\n {\n $brands = Brand::all();\n return view('admin.brands.index', compact('brands'));\n }", "public function index() {\n return view('admin.products.brands.index')->with([\n 'array' => Brand::orderBy('created_at')->get(),\n 'parent' => false,\n 'color' => false,\n 'array_type' => 'Brand',\n 'route' => route('admin.products.brands.store')\n ]);\n }", "public function allBoons() {\n\n // retrieve all Boons\n $boonModel = new Boon();\n $boonList = $boonModel->findAllBoons(); // array of objects\n\n // Send the datas to the view\n $this->show('boons', [\n 'boonList' => $boonList\n ]);\n }", "public function getBrandsProductsAndInv() {\n\t\t$bsql=\"SELECT b.id as value,b.brand_name as label FROM brands b where rstatus='A'\";\t\t\n\t\t$bresult=$this->runQuery('getAll',$bsql);\n\t\t\n\t\t$psql=\"SELECT p.id as value,p.product_name as label FROM products p where rstatus='A'\";\t\t\n\t\t$presult=$this->runQuery('getAll',$psql);\n\t\t\n\t\t$invsql=\"select i.id as inv_item_id, b.brand_name as brand_name,b.id as brand_id, p.product_name as prod_name, p.id as prod_id, i.item_name as item_name, i.entry_date as purchase_date, i.buy_price as buy_price, i.sell_price as sell_price, i.quantity as prod_qty from inventory i,brands b,products p where b.id = i.brand_id and p.id = i.product_id and i.rstatus = 'A'\";\t\t\n\t\t$invresult=$this->runQuery('getAll',$invsql);\n\t\techo '[{\"brandDropdownList\":'.json_encode($bresult).',\"productDropdownList\":'.json_encode($presult).',\"inventoryItemList\":'.json_encode($invresult).'}]';\n\t}", "public function index()\n {\n return view('brands.index', [\n 'brands' => Brand::all()\n ]);\n }", "public function show(Borrows $borrows)\n {\n //\n }", "public function index()\n\t{\n\t\t$getABrands= Brand::where('name','like','A%')->get();\n\t\t$getBBrands= Brand::where('name','like','B%')->get();\n\t\t$getCBrands= Brand::where('name','like','C%')->get();\n\t\t$getDBrands= Brand::where('name','like','D%')->get();\n\t\t$getEBrands= Brand::where('name','like','E%')->get();\n\t\t$getFBrands= Brand::where('name','like','F%')->get();\n\t\t$getGBrands= Brand::where('name','like','G%')->get();\n\t\t$getHBrands= Brand::where('name','like','H%')->get();\n\t\t$getIBrands= Brand::where('name','like','I%')->get();\n\t\t$getJBrands= Brand::where('name','like','J%')->get();\n\t\t$getKBrands= Brand::where('name','like','K%')->get();\n\t\t$getLBrands= Brand::where('name','like','L%')->get();\n\t\t$getMBrands= Brand::where('name','like','M%')->get();\n\t\t$getNBrands= Brand::where('name','like','N%')->get();\n\t\t$getOBrands= Brand::where('name','like','O%')->get();\n\t\t$getPBrands= Brand::where('name','like','P%')->get();\n\t\t$getQBrands= Brand::where('name','like','Q%')->get();\n\t\t$getRBrands= Brand::where('name','like','R%')->get();\n\t\t$getSBrands= Brand::where('name','like','S%')->get();\n\t\t$getTBrands= Brand::where('name','like','T%')->get();\n\t\t$getUBrands= Brand::where('name','like','U%')->get();\n\t\t$getVBrands= Brand::where('name','like','V%')->get();\n\t\t$getWBrands= Brand::where('name','like','W%')->get();\n\t\t$getXBrands= Brand::where('name','like','X%')->get();\n\t\t$getYBrands= Brand::where('name','like','Y%')->get();\n\t\t$getZBrands= Brand::where('name','like','Z%')->get();\n\n\n\t\t//dd($getAllBrands);\n\n\t\treturn view('brandlist')->with(array(\n\t\t\t'allABrands'=>$getABrands,\n\t\t\t'allBBrands'=>$getBBrands,\n\t\t\t'allCBrands'=>$getCBrands,\n\t\t\t'allDBrands'=>$getDBrands,\n\t\t\t'allEBrands'=>$getEBrands,\n\t\t\t'allFBrands'=>$getFBrands,\n\t\t\t'allGBrands'=>$getGBrands,\n\t\t\t'allHBrands'=>$getHBrands,\n\t\t\t'allIBrands'=>$getIBrands,\n\t\t\t'allJBrands'=>$getJBrands,\n\t\t\t'allKBrands'=>$getKBrands,\n\t\t\t'allLBrands'=>$getLBrands,\n\t\t\t'allMBrands'=>$getMBrands,\n\t\t\t'allNBrands'=>$getNBrands,\n\t\t\t'allOBrands'=>$getOBrands,\n\t\t\t'allPBrands'=>$getPBrands,\n\t\t\t'allQBrands'=>$getQBrands,\n\t\t\t'allRBrands'=>$getRBrands,\n\t\t\t'allSBrands'=>$getSBrands,\n\t\t\t'allTBrands'=>$getTBrands,\n\t\t\t'allUBrands'=>$getUBrands,\n\t\t\t'allVBrands'=>$getVBrands,\n\t\t\t'allWBrands'=>$getWBrands,\n\t\t\t'allXBrands'=>$getXBrands,\n\t\t\t'allYBrands'=>$getYBrands,\n\t\t\t'allZBrands'=>$getZBrands,\n\n\n\n\n\t\t));\n\t}", "public function getBrandsApi($request);", "public function index()\n {\n $brands = Brand::all();\n\n return view('admin.brands.index', compact('brands'));\n }", "public function actionGetbrands(){\n $brands = ArrayHelper::map(brands::find()->joinwith('equipBrands','equipBrands.brand_id')->where(['equip_id' => $_POST['id'],'status'=>1])->all(), 'id_brand', 'brandName');\n return json_encode($brands);\n }", "public function index()\n {\n $brands = Brand::orderBy('id', 'desc')->paginate(10);\n\n return view('brands.index', compact('brands'))->with('i', (request()->input('page', 1) - 1) * 10);\n }", "public function index()\n {\n $brands = Brand::orderBy('id','asc')\n ->where('bname','like', '%'.request()->keywords.'%')\n ->get();\n //解析模板显示用户数据\n return view('admin.brand.index', ['brands'=>$brands]);\n }", "public function index()\n {\n //\n return Category::with('brands')->get();\n }", "private function loadBikeModelsBrands($p = null){\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/bike/db_selBikeBrand.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/bike/db_selBikeModel.php');\n\t\t\n\t\t$bikeBrand = db_selBikeBrand(array('orderby'=>array(array('col' => 'brandName'))\n\t\t\t\t\t\t\t\t\t\t\t,'active' => 1));\n\t\t$bikeModel = false;\n\t\tif(is_array($bikeBrand) && (count($bikeBrand) > 0)){\n\t\t\t$bikeBrandID = $bikeBrand[0]['bikeBrandID'];\n\t\t\tif (isset($p['bikeBrand']) && !is_array($p['bikeBrand'])){\n\t\t\t\t$bikeBrandID = $p['bikeBrand'];\n\t\t\t}\n\t\t\telseif (isset($p['bikeBrand']) && is_array($p['bikeBrand']) && (count($p['bikeBrand']) > 0)){\n\t\t\t\t$bikeBrandID = array();\n\t\t\t\tforeach ($p['bikeBrand'] as $key => $val){\n\t\t\t\t\tarray_push($bikeBrandID, $val);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$bikeModel = db_selBikeModel(array('bikeBrandID' => $bikeBrandID));\n\t\t}\n\t\t\n\t\t$this -> view -> bikeBrand = $bikeBrand;\n\t\t$this -> view -> bikeModel = $bikeModel;\n\t}", "public function index()\n {\n $brands = Brand::latest()->get();\n \n return view('brands.index')->with('brands', $brands);\n }", "function fn_get_brands($feature_id, $lang_code = CART_LANGUAGE)\n{\n\t//var_dump($feature_id);\n $params['feature_id']=$feature_id;\n\t$params['feature_type']=\"E\";\n $params['get_images'] = true;\n\t\n list($brands, $search) = fn_get_product_feature_variants($params,0, DESCR_SL);\n\t\n return array($brands, $params);\n}", "public function index()\n {\n $brands=Brand::all();\n return view('admin.brands.index',[\n 'brands'=>$brands,\n ]);\n }", "public function index()\n {\n $brands=brand::all();\n return view('backend.brands.view',compact('brands'));\n }", "public function index()\n { \n $brands = Product::select('brand')->distinct()->orderBy('brand')->get();\n if(count($brands)>0){\n return view('home')->withBrands($brands);\n }else{\n return view('home');\n }\n }", "function jx_getallbrands()\r\n\t\t{\r\n\t\t\t$output=array();\r\n\t\t\t$allbrands_res=$this->db->query(\"select * from king_brands order by name asc\");\r\n\t\t\tif($allbrands_res->num_rows())\r\n\t\t\t{\r\n\t\t\t\t$output['brand_list']=$allbrands_res->result_array();\r\n\t\t\t\t$output['status']='success';\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['message']='No Brand found';\r\n\t\t\t}\r\n\t\t\techo json_encode($output);\r\n\t\t\t\r\n\t\t}", "public function index()\n {\n return InvertorBrand::all();\n }", "public static function getBrandsAll()\n {\n $pdo = Database::getPDO();\n $sql = \"SELECT * FROM `\". static::$table .\"` \n WHERE `order` > 0\n ORDER BY `order` ASC \";\n \n $statement = $pdo->query( $sql );\n $modelListFromDatabase = $statement->fetchAll( PDO::FETCH_ASSOC );\n\n // Etape 2 : On vérifie qu'on a des résultats\n if( $modelListFromDatabase === false ) :\n exit( static::$table.\" not found !\" );\n endif;\n \n // Etape 3 : On prépare un tableau d'objets\n $modelsArray = [];\n\n // Etape 4 : On parcours nos résultats pour créer les objets\n // à partir des données récupérées en BDD\n foreach( $modelListFromDatabase as $modelDataFromDatabase ) :\n $model = new static( $modelDataFromDatabase );\n $modelsArray[] = $model;\n endforeach;\n\n // Etape 5 : On renvoi notre tableau d'objets (ici de type Brand)\n return $modelsArray;\n }", "public function index()\n {\n $brands = Brand::paginate(20);\n return view('admin.others_attributes.brand', compact('brands'));\n }", "private function loadCarModelsBrands($p = null){\n\t\tinclude_once ('default/models/car/db_selCarBrand.php');\n\t\tinclude_once ('default/models/car/db_selCarModel.php');\n\t\t\n\t\t$carBrand = db_selCarBrand(array('orderby'=>array(array('col' => 'brandName'))\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\n\t\t$carModel = false;\n\t\t/*\n\t\tif(is_array($carBrand) && (count($carBrand) > 0)){\n\t\t\t$carBrandID = $carBrand[0]['carBrandID'];\n\t\t\tif (isset($p['carBrand'])){\n\t\t\t\t$carBrandID = $p['carBrand'];\n\t\t\t}\n\t\t\t$carModel = db_selCarModel(array('carBrandID' => $carBrandID));\n\t\t}\n\t\t*/\n\t\t\n\t\tif(is_array($carBrand) && (count($carBrand) > 0)){\n\t\t\t$carBrandID = $carBrand[0]['carBrandID'];\n\t\t\tif (isset($p['carBrand']) && !is_array($p['carBrand'])){\n\t\t\t\t$carBrandID = $p['carBrand'];\n\t\t\t}\n\t\t\telseif (isset($p['carBrand']) && is_array($p['carBrand']) && (count($p['carBrand']) > 0)){\n\t\t\t\t$carBrandID = array();\n\t\t\t\tforeach ($p['carBrand'] as $key => $val){\n\t\t\t\t\tarray_push($carBrandID, $val);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t$carModel = db_selCarModel(array('carBrandID' => $carBrandID\n\t\t\t\t\t\t\t\t\t\t\t\t, 'orderby' => array(array('col'=>'carModelName'))\n\t\t\t\t\t\t\t\t\t\t\t));\n\t\t}\n\t\t\n\t\t$this -> view -> carBrand = $carBrand;\n\t\t$this -> view -> carModel = $carModel;\n\t}", "public function brandsproductDisplay($bran_id){\n $result= $this->brandsProduct($bran_id);\n\n if($result == \"PRODUCTS_NOT_FOUND\"){\n echo(\"NO_PRODUCT_FOUND_UNDER_BRAND\");\n }\n else{\n foreach($result as $brandsProduct){\n echo('<div class=\"col-lg-6\">'.\n \n '<div class=\"d-block d-md-flex listing vertical\">'.\n '<a href=\"#\" class=\"img d-block\" style=\"background-image: url('.$brandsProduct[\"product_mainimg\"].')\"></a>'.\n '<div class=\"lh-content\">'.\n '<a href=\"#\" class=\"bookmark\"><span class=\"icon-heart\"></span></a>'.\n '<h3><a href=\"#\">'.$brandsProduct[\"product_title\"].'</a></h3>'.\n '<address>Posted time: '.$brandsProduct[\"post_time\"].'</address>'.\n '<p class=\"mb-0\">'.\n '<span class=\"review\">$'.$brandsProduct[\"product_price\"].'.00</span>'.\n '</p>'.\n '</div>'.\n '</div>'.\n\n '</div>');\n }\n }\n \n }", "public function brandsSearchDrop(){\n $table = \"brands\";\n $cresults = $this->getAllrecords($table);\n if($cresults == \"NO_RECORDS_FOUND\"){\n echo(\"NO_PRODUCT_FOUND\");\n }\n else{\n foreach($cresults as $brands){\n echo('<option value=\"'.$brands[\"brand_id\"].'\">'.$brands[\"brand_name\"].'</option>');\n }\n\n\n }\n\n \n}", "public function index()\n {\n return view('public.brands.index', [\n 'brands' => Brand::with('files')->get(),\n ]);\n }", "public function get_brands()\n\t{\n\t\t$brands = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect(array('brand', 'name'))->groupByAttribute('brand')->getColumnValues('brand');\n\t\tunset($brands[0]);\n\t\tksort($brands);\n\t\treturn $brands;\n\t}", "public function index()\n {\n $brands = Brand::all();\n\n $index = 1;\n\n return view('backend.brands.index', compact('brands','index'));\n }", "function getProductsByBrand()\n\t{\n\t\tglobal $con;\n\t\tif (isset($_GET['brand'])) {\n\t\t\t$brand_id = $_GET['brand'];\n\t\t\t$get_products = \"select * from products where prod_brand='$brand_id'\";\n\t\t\t$run_products = mysqli_query($con, $get_products);\n\t\t\t$count = mysqli_num_rows($run_products);\n\n\t\t\tif ($count == 0)\n\t\t\t\techo \"<h2>No Products for this brand</h2>\";\n\t\n\t\t\twhile($row = mysqli_fetch_array($run_products)) {\n\t\t\t\t$prod_id = $row['prod_id'];\n\t\t\t\t$prod_cat = $row['prod_cat'];\n\t\t\t\t$prod_brand = $row['prod_brand'];\n\t\t\t\t$prod_price = $row['prod_price'];\n\t\t\t\t$prod_image = $row['prod_img'];\n\n\t\t\t\techo \"\n\t\t\t\t<div class='single_product'>\n\t\t\t\t\t<h3>$prod_title</h3>\n\t\t\t\t\t<img src='admin_area/product_images/$prod_image'>\t\n\t\t\t\t\t<h2>$prod_price</h2>\n\t\t\t\t\t<a href='details.php?pro_id=$prod_id' style='float:left;'>Details</a>\n\t\t\t\t\t<a href='index.php?add_cart=$prod_id'><button>Add to Cart</button></a>\n\t\t\t\t</div>\n\t\t\t\t\";\n\t\t\t}\n\t\t}\n\t}", "public function index()\n { \n $page_title = \"All Brands\";\n $name = $this->route_name;\n $results = Brand::latest()->get();\n return view($this->path.'index', compact('name', 'page_title', 'results'));\n }", "function getBrand(){\n global $db;\n $get_brands=\"select * from brands\";\n $run_brands=mysqli_query($db, $get_brands);\n while($row_brands=mysqli_fetch_array($run_brands)){\n $brand_id= $row_brands['brand_id'];\n $brand_title= $row_brands['brand_title'];\n echo \"<li><a href='index.php?brand=$brand_id'>$brand_title</a></li>\";\n }\n }", "public function brandForm(){\n $table = \"brands\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $brand){\n echo('<option value=\"'.$brand[\"brand_id\"].'\">'.$brand[\"brand_name\"].'</option>');\n }\n\n\n }", "public function index() {\n\t\t\t$this->db->groupBy('brand_id');\n\t\t\t$this->db->join('brand br', 'b.brand_id = br.brand_id');\n\t\t\t$this->db->order('brand_name');\n\t\t\t$brands = $this->db->select('bike b', 'b.brand_id, br.brand_name, br.brand_path, COUNT(*) as bikesAmount');\n\t\t\tif($brands) {\n\t\t\t\t$brands->create_objects('brand_');\n\t\t\t\tforeach($brands->data as $brand) {\n\t\t\t\t\t$arr[substr($brand->brand_name, 0, 1)][] = $brand; // Multidimensional array where brands are grouped by its first letter.\n\t\t\t\t}\n\t\t\t\t$brands->data = $arr; // Replace array from dataObject with grouped array.\n\t\t\t\t$this->viewModel->add('brands', $brands);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->viewModel->error('No brands to display'); // Set error message.\n\t\t\t}\n\t\t\treturn $this->viewModel;\n\t\t}", "public function getBrandList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('tbl_brand');\r\n\t\t$this->db->where('brand_status', '1');\t\t\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public function index()\n {\n //\n // $brands = Brand::all();\n $brands = Brand::paginate(100);\n // Brand::chunk(200, function ($brands) {\n // });\n // $brands = DB::select('SELECT * FROM brands WHERE name=\"aut\"');\n return view('brand.index',['brands'=>$brands]);\n // $brands = DB::table('brands')->get();\n // $brands = DB::table('brands')->where('name', 'aut')->first();\n // $brands = App\\Brand::where()\n // ->orderBy('name', 'desc')\n // ->get();\n // $users = DB::table('users')->get();\n // return $brands->id;\n // $brands->id;\n // return view('brand.index')->with('brands', $brands);\n // return view('brand.index', ['brands' => $brands]);\n // $flights = App\\Flight::where('active', 1)\n // ->orderBy('name', 'desc')\n // ->take(10)\n // ->get();\n // $brands = Brand::paginate(10);\n // return view('brand.index', compact('brands'));\n // return view('brand.index');\n }", "public function index()\n {\n $brands = Brand::all();\n return view('brand.index',compact('brands'));\n }", "public function actionIndex()\n {\n $items = Brand::find()->asArray()->orderBy(['position' => SORT_ASC])->all();\n\n return $this->render('index', [\n 'items' => $items,\n ]);\n }", "public function show(Brand $brand)\n {\n //\n }", "public function show(Brand $brand)\n {\n //\n }", "public function show(Brand $brand)\n {\n //\n }", "public function show(Brand $brand)\n {\n //\n }", "public function index()\n {\n $brands = ProductBrand::all();\n\n return view('admin.brand.index', ['brandsData' => $brands]);\n }", "public function index()\n {\n $allBrands = Brand::all();\n\n return view('back.Brand.index', compact('allBrands'));\n }", "public function index()\n {\n $brands = CarBrand::all();\n return view('brand.index', compact('brands'));\n }", "public function index()\n { \n $brand_url = request()->brand_url??'';\n $brand_name = request()->brand_name??'';\n $where=[];\n if ($brand_name) {\n $where[]=['brand_name','like',\"%$brand_name%\"];\n }\n if ($brand_url) {\n $where[]=['brand_url','=',$brand_url];\n }\n $brand = Brand::where($where)->paginate(3);\n return view('index/brand/index',['brand'=>$brand,'brand_url'=>$brand_url,'brand_name'=>$brand_name]);\n }", "function getBrands() {\n include('database.php');\n\n $query = 'SELECT * FROM BRAND WHERE Archive=\"0\"';\n $result = mysqli_query($connection, $query);\n\n if($result) {\n return mysqli_fetch_all($result, MYSQLI_ASSOC);\n } else {\n return \"Error: getBrands()\";\n }\n}", "function getBrands()\n {\n $returned_brands = $GLOBALS['DB']->query(\"SELECT brands.* FROM stores\n JOIN stores_brands ON (stores.id = stores_brands.store_id)\n JOIN brands ON (stores_brands.brand_id = brands.id)\n WHERE stores.id = {$this->getId()};\");\n\n $brands = array();\n foreach($returned_brands as $brand) {\n $brand_name = $brand['brand_name'];\n $id = $brand['id'];\n $new_brand = new Brand($brand_name, $id);\n array_push($brands, $new_brand);\n }\n return $brands;\n }", "public function show(brand $brand)\n {\n //\n }", "public function brands_show($locale,$slug)\n {\n $this->checkLang($locale);\n\n $brands = Tradmark::where('slug',$slug)->first();\n if($brands) {\n return $this->sendResult('show brands',new TradmarkResource($brands));\n }\n return $this->sendResult('brands not found',null, 'brands not found',false);\n }", "public function index()\n {\n $brands=Brand::all();\n if($brands->isEmpty())\n {\n return $this->create();\n }\n else\n {\n $brands = Brand::paginate(10);\n\n return view('brands/index',compact('brands'))->with('i', (request()->input('page', 1) - 1) * 5);\n }\n }", "public function index()\n {\n return new BrandResource(Brand::all());\n }", "function get_brands_for_select()\n{\n $arBrands = array();\n $arBrands[''] = '';\n \n $criteria = new Criteria();\n $brands = BrandPeer::getAll($criteria);\n \n foreach ($brands as $brand) {\n $arBrands[$brand->getId()] = $brand->getTitle();\n }\n \n return $arBrands;\n}", "public function index()\n {\n $title = auth()->user()->name;\n $subtitle = 'Brands';\n $brands = Brand::all();\n\n return view('brands.index',compact('title','subtitle','brands'));\n }", "public function search(Request $request){\n\t\t$search = $_GET['search'];\n\t\t$branchs = Branches::where('branch_name', 'LIKE', '%'.$search.'%')\n\t\t->orWhere(\"branch_id\", \"LIKE\", '%'.$search.'%')\n\t\t->get();\n\t\techo \"<ul class='table'>\";\n\t\tforeach ($branchs as $key => $branch) {\n\t\t\techo \"<li><a href='\".url('/view/').'/'.$branch->branch_id.\"'>\";\n\t\t \techo $branch->branch_name;\n\t\t \techo \"</a></li>\";\n\t\t } // Here return all data by json formet\n\t\t echo \"</ul>\";\n\t\t// echo \"<pre>\";\n\t\t//print_r($branch);\n\t\t\n\t}", "public function search()\n {\n if (request('bulan') && request('no')) {\n $nice = explode(\"-\", request('bulan'));\n $no = request('no');\n $borrowsRes = Borrow::whereMonth('tanggal_peminjaman', $nice[1])\n ->whereYear('tanggal_peminjaman', $nice[0])\n ->where('member_no', 'like', \"%{$no}%\")\n ->paginate(10)\n ->appends(request()->query());\n } else if (request('bulan')) {\n $nice = explode(\"-\", request('bulan'));\n $borrowsRes = Borrow::whereMonth('tanggal_peminjaman', $nice[1])\n ->whereYear('tanggal_peminjaman', $nice[0])\n ->paginate(10)\n ->appends(request()->query());\n } else {\n $no = request('no');\n\n $borrowsRes = Borrow::where('member_no', 'like', \"%{$no}%\")\n ->paginate(10)\n ->appends(request()->query());\n }\n return view('admin.borrow.table', compact('borrowsRes'));\n }", "public function test_get_brands()\n {\n $response = $this->get('/api/brands', $this->defaultHeaders);\n\n $response->assertStatus(200);\n }", "public function index()\n {\n $brand = Brand::all();\n\n return view('brand.list', [\"brand\" => $brand]);\n }", "public function listb()\n\t{\n\t\t$id_usuario_session = $this->session->userdata(\"id\");\n\t\t$data = [\n\t\t 'monedas_mercado_busco' => $this->Mercadom_model->listb($id_usuario_session)\n\t\t];\n\n\t\t$this->layout->view(\"list_busqueda\",$data);\n\n\t}", "public function index()\n {\n $listCategory = DB::table('categories')->select('*');\n $listCategory = $listCategory->get();\n\n $listBrand = DB::table('brands')->select('*');\n $listBrand = $listBrand->get();\n return view('frontend\\search\\search_advanced',compact('listCategory','listBrand'));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $form = $this->createForm(BillingclassFilterType::class);\n if (!is_null($response = $this->saveFilter($form, 'billingclass', 'admin_billingclass'))) {\n return $response;\n }\n $qb = $em->getRepository('AppBundle:Billingclass')->createQueryBuilder('b');\n $paginator = $this->filter($form, $qb, 'billingclass');\n \n return array(\n 'form' => $form->createView(),\n 'paginator' => $paginator,\n );\n }", "public function actionIndex()\n {\n if (\\Yii::$app->user->can('listBrand')) {\n // 2018-10-30 : Records the access to Brand module.\n Yii::info('[The user get access to the Brand Module]', 'cttwapp_user');\n\n $searchModel = new BrandSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index_brand', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'qryParams' => Yii::$app->request->queryParams, // 2018-05-08 : This parameter is send to index_brand.php view for test if 'BrandSearch'\n ]);\n }\n else {\n // 2018-07-26 : If the user is a guest, then sends an error message to him. Otherwise it sends a warning message.\n if (Yii::$app->user->getIsGuest()) {\n Yii::$app->session->setFlash('error', Yii::t('app', 'Usted esta tratando de ingresar al sistema de forma no autorizada. Por favor, primero autentifique su acceso').'.');\n Yii::error('[Access denied to the Brand Module]', 'cttwapp_user');\n }\n else {\n Yii::$app->session->setFlash('warning', Yii::t('app', 'Su perfil de acceso no le autoriza a utilizar esta acción. Por favor contacte al administrador del sistema para mayores detalles').'.');\n Yii::warning('[Unauthorized access profile to the Brand Module]', 'cttwapp_user');\n }\n }\n return $this->redirect(['site/index', 'hash' => '0']);\n }", "public function index()\n {\n $listBrand=Brand::all();\n return view('admin.brand.list',compact('listBrand'));\n }", "public function index(Request $request)\n {\n $brands = $this->brandService->index($request->all());\n return view('adminlte.brands.index', compact('brands'));\n }", "public function brandsGet()\n {\n list($response) = $this->brandsGetWithHttpInfo();\n return $response;\n }", "static function getAll()\n\t\t{\n\t\t\t$returned_brands = $GLOBALS['DB']->query(\"SELECT * FROM brands;\");\n\t\t\t$all_brands = [];\n\t\t\tforeach($returned_brands as $brand){\n\t\t\t\t$name = $brand['name'];\n\t\t\t\t$id = $brand['id'];\n\t\t\t\t$new_brand = new Brand($name, $id);\n\t\t\t\tarray_push($all_brands, $new_brand);\n\t\t\t}\n\t\t\treturn $all_brands;\n\t\t}", "public function index()\n {\n $data = Brand::all();\n return view('backend.brand.index', ['data' => $data]);\n }", "public function index(Request $request)\n {\n $search = $request->search;\n $dataSorting = $request->sorting == 'false'?10:$request->sorting;\n // if($request->search != 'undefined'){\n $data =$search == 'false'?DeviceModel::orderBy('id', 'desc')->paginate($dataSorting):DeviceModel::where(function($query) use($search){\n $query->orWhere('model_name', 'LIKE', \"%{$search}%\")\n ->orWhere('model_number', 'LIKE', \"%{$search}%\");\n \n })->orderBy('id', 'desc')->paginate($dataSorting);\n\n // } else {\n\n // $data = DeviceModel::orderBy('id', 'desc')->paginate(10);\n\n // }\n\n $brands = Brand::where('status',1)->get();\n \n\n return DeviceModelResource::collection($data)->additional([\n 'brands' => $brands\n ]);\n }", "public function show(InvertorBrand $invertorBrand)\n {\n //\n }", "function get_brand(){\n\tglobal $con;\n\n\t$get_brand = \"select * from brands\";\n\t$run_brand = mysql_query($get_brand);\n\n\t\n\n\twhile($row_brand = mysql_fetch_array($run_brand)){\n\n\t\t\n\t\t$brand_id = $row_brand['brand_id'];\n\t\t$brand_title = $row_brand['brand_name'];\n\n\t\t\n\t\techo '<div class=\"brand-checkbox\">\n\t\t\t\t\t\t<label><input type=\"checkbox\"class=\"brnd-chk\" value=\"\">';echo \"$brand_title\"; echo'</label>\n\t\t\t\t\t</div>';\n\t}\n}", "function showSearch () {\n\t\t$template['list'] = $this->cObj->getSubpart($this->templateCode,'###TEMPLATE_SEARCH###');\n\t\t$subpartArray = array();\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['search.']['LL'], 'search');\n\n\t\t// hide the radisus search by using a subpart\n\t\tif ($this->config['search']['radiusSearch'] != 1) {\n\t\t\t$subpartArray['###HIDE_RADIUSSEARCH###'] = '';\n\t\t}\n\n\t\t$markerArray['###DEFAULT_COUNTRY###'] = $this->config['defaultCountry']; // set the default country\n\t\t$markerArray['###DEFAULT_ZIP###'] = htmlspecialchars($this->piVars['zip']);\n\t\t$markerArray['###AUTOSUBMIT###'] = ($this->piVars['zip'] == '') ? '//' : '';\n\n\t\t// fetch the allowed categories as option list\n\t\t$markerArray['###CATEGORY###'] = $this->helperGetRecursiveCat($this->config['categories']);\n\n\t\t$content = $this->cObj->substituteMarkerArrayCached($template['list'], $markerArray, $subpartArray);\n\t\treturn $content;\n\t}", "function getBrandSelect()\n\t{\n\t\tglobal $con;\n\t\t\t\n\t\t$get_brands = \"select * from brands\";\n\t\t$run_brands = mysqli_query($con, $get_brands);\n\t\twhile ($row = mysqli_fetch_array($run_brands)){\n\t\t\t$id = $row['brand_id'];\n\t\t\t$title = $row['brand_title'];\n\n\t\t\techo \"<option value='$id'>$title</option>\";\n\t\t}\n\t}" ]
[ "0.7056262", "0.6738446", "0.67179465", "0.66575056", "0.66539764", "0.6542334", "0.6516114", "0.6488985", "0.6464205", "0.6463216", "0.64457875", "0.6441343", "0.6422803", "0.6405531", "0.6402624", "0.64015466", "0.6369618", "0.63621783", "0.6339621", "0.63138384", "0.62930137", "0.6292411", "0.62922525", "0.627067", "0.62500566", "0.62466943", "0.62432426", "0.62353414", "0.62337506", "0.6232983", "0.62253606", "0.622289", "0.6221446", "0.6214961", "0.6209151", "0.6207815", "0.6207552", "0.61815524", "0.6178319", "0.61728054", "0.6172201", "0.61559373", "0.6142999", "0.61367744", "0.61353993", "0.61282194", "0.61249346", "0.61030394", "0.6059929", "0.60451025", "0.6038449", "0.6010597", "0.60078144", "0.60049224", "0.5997714", "0.5994764", "0.59904957", "0.59831166", "0.5980128", "0.59762603", "0.59718746", "0.5971302", "0.59651333", "0.59650755", "0.5962423", "0.59582025", "0.59570533", "0.5949389", "0.5949389", "0.5949389", "0.5949389", "0.5941726", "0.5939382", "0.593719", "0.5930631", "0.59267116", "0.59266806", "0.5920667", "0.5919685", "0.59163094", "0.58776563", "0.5876974", "0.5875638", "0.584808", "0.5838952", "0.58356696", "0.5834268", "0.58327675", "0.5824689", "0.58236814", "0.58122367", "0.58059657", "0.5801584", "0.578103", "0.5767991", "0.57661796", "0.5753905", "0.57442504", "0.5739416", "0.5721524", "0.57193774" ]
0.0
-1
Adds a Brand to the database form the form submitted
public function addBrand(Request $request) { $brand = new Brand(); // Slugify initialisation to create the slug data using the name $slugify = new Slugify(); // Form creation $addForm = $this->createForm(BrandType::class, $brand); // Request handling to check if the form has been submitted $addForm->handleRequest($request); if ($addForm->isSubmitted() && $addForm->isValid()) { $brand->setSlug($slugify->slugify($brand->getName())); // Persistence in database $manager = $this->getDoctrine()->getManager(); $manager->persist($brand); $manager->flush(); // Adding a flash message to inform the user $this->addFlash('success', "Votre marque {$brand->getName()} a bien été ajoutée"); return $this->redirectToRoute('brand_index'); } return $this->render('brand/add.html.twig', [ 'addForm' => $addForm->createView(), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_brand() {\n\t\t$values=array(\"brand_name\"=>$_POST['brand_name'],\"description\"=>$_POST['description']);\n\t\tif($this->insert(\"brands\",$values)) {\n\t\t\t$result=$this->runQuery('getAll','select max(id) as id from brands');\n\t\t\techo json_encode($result);\n\t\t}\n\t\telse\n\t\t\techo 'Error while inserting';\n\t}", "function addBrand($brand)\n {\n $GLOBALS['DB']->exec(\"INSERT INTO stores_brands (store_id, brand_id) VALUES (\n {$this->getId()},\n {$brand->getId()}\n );\");\n }", "public function addBrand($brandName){\n\t\t\t \t$brandName = $this->fm->validation($brandName);\n\t\t\t \t$brandName = mysqli_real_escape_string($this->db->link,$brandName);\n\n\t\t\t \tif (empty($brandName)) {\n\t\t\t \t\t$emperrmsg = \"<span class='error'>Filed must not be empty !!</span>\";\n\t\t \t\t\treturn $emperrmsg;\n\t\t\t \t}else {\n\t\t\t \t\t$query = \"INSERT INTO tbl_brand(brandName) VALUES('$brandName')\";\n\t\t\t \t\t$result = $this->db->insert($query);\n\t\t\t \t\tif ($result) {\n\t\t\t \t\t\t$successmsg = \"<span class='successs'>Brand Added Successfully !!</span>\";\n\t\t \t\t\t\treturn $successmsg;\n\t\t\t \t\t}else {\n\t\t\t \t\t\t$errormsg = \"<span class='error'>Something went wrong !!</span>\";\n\t\t \t\t\t\treturn $errormsg;\n\t\t\t \t\t}\n\t\t\t\t\t}\n\t\t\t }", "public function actionAddbrand() {\n\t\t\\Yii::$app->view->title = 'ACA Reporting Service | Add Brand';\n\t\t$this->layout = 'main';\n\t\t$session = \\Yii::$app->session;\n\t\t$admin_permissions = $session ['admin_permissions'];\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true && in_array(\"6\", $admin_permissions)) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$logged_user_id = $session ['admin_user_id']; // collecting variables from session\n\t\t\t$model_acabrands = new TblAcaBrands ();\n\t\t\t$model_acabrands->scenario = 'save'; // model scenario for validating\n\t\t\t\n\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\ttry {\n\t\t\t\tif ($model_acabrands->load ( \\Yii::$app->request->post () )) {\n\t\t\t\t\t\n\t\t\t\t\t$brand_details = \\Yii::$app->request->post ();\n\t\t\t\t\t$name = $brand_details ['TblAcaBrands'] ['brand_name'];\n\t\t\t\t\t\n\t\t\t\t\t$checkmodel = TblAcaBrands::Checkbrandname ( $name ); // checking for particular brand name\n\t\t\t\t\t\n\t\t\t\t\tif (empty ( $checkmodel )) {\n\t\t\t\t\t\t$model_acabrands->attributes = $brand_details ['TblAcaBrands'];\n\t\t\t\t\t\t$model_acabrands->created_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t$model_acabrands->modified_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t$model_acabrands->created_by = $logged_user_id;\n\t\t\t\t\t\t$model_acabrands->is_deleted = 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$image = UploadedFile::getInstance ( $model_acabrands, 'brand_logo' ); // getting instance of a uploaded file\n\t\t\t\t\t\t$rnd = rand ( 0, 99999 );\n\t\t\t\t\t\tif ($image) {\n\t\t\t\t\t\t\t$ext = explode ( \".\", $image->name );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$model_acabrands->brand_logo = $ext [0] . '_1_' . $rnd . '.' . $ext [1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$path = \\Yii::$app->basePath . '/Images/profile_image/brand_logo/' . $model_acabrands->brand_logo;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($model_acabrands->save () && $model_acabrands->validate ()) { // model validated(server side validation)\n\t\t\t\t\t\t\tif ($image) {\n\t\t\t\t\t\t\t\t$image->saveAs ( $path );\n\t\t\t\t\t\t\t\tchmod ( $path, 0755 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$transaction->commit (); // commit the transaction\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'success', 'Brand added successfully' );\n\t\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t\t'/admin/masterdata' // redirecting to grid if brand is added\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn $this->render ( 'addbrand', [ // render the array to addbrand view file\n\t\t\t\t\t\t\t\t\t'model' => $model_acabrands \n\t\t\t\t\t\t\t] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$model_acabrands->addError ( 'brand_name', 'Brand name address is already exist.' ); // model adding error\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch ( Exception $e ) { // any exceptions catch throws error msg\n\t\t\t\t\n\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\n\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t}\n\t\t\treturn $this->render ( 'addbrand', [ // render the array to addbrand view file\n\t\t\t\t\t'model' => $model_acabrands \n\t\t\t] );\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}", "function add_brand_act(){\n $data['brand'] = $this->m_rental->get_data('car_brand')->result();\n \n $brand_id = $this->input->post('brand_id');\n $brand_desc = $this->input->post('brand_desc');\n $brand_status = $this->input->post('brand_status');\n\n $this->form_validation->set_rules('brand_desc','Brand','required');\n $this->form_validation->set_rules('brand_status','Status','required');\n \n if($this->form_validation->run() != false){\n $data = array(\n 'brand_id' => $brand_id ,\n 'brand_desc' => $brand_desc ,\n 'brand_status ' => $brand_status\n );\n\n $this->m_rental->insert_data($data, 'car_brand');\n redirect(base_url().'home/add_car_act');\n } else { \n $this->load->view('header');\n $this->load->view('admin/add_brand',$data);\n $this->load->view('footer');\n } \n }", "function addBrand($Brand){\r\n\r\n $this->app->log->info(__CLASS__ . '::' . __METHOD__);\r\n $this->app->log->info('Brand : '.$this->dumpRet($Brand));\r\n $dao = new \\PNORD\\Model\\BrandDAO($this->app); \r\n return $dao->addBrand($Brand); \r\n\r\n }", "function insertBrand(Request $req)\n {\n //membuat objek row brand baru\n \t$new = new Brands;\n //validasi nama brand tidak kosong\n \t$val = Validator::make($req->all(),[\n \t\t\"brandName\"=> 'required'\n \t]);\n //jika fail kembail ke view insertBrand disertai error\n \tif($val->fails())\n \t{\n \t\treturn redirect()->back()->withErrors($val);\n \t}\n \t$new->brandName = $req->brandName;\n \t$new->save(); //save row tsb\n \treturn redirect('/');\n }", "public function brandStore(Request $request){\n $brand = new Brand();\n $brand->band_name = $request->band_name;\n $brand->company_id = company_id();\n $brand->save();\n return redirect()->back();\n }", "public function actionCreate()\n {\n $model = new Brand();\n\n if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ActiveForm::validate($model);\n }\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if ($model->productBrandId) {\n $brandModel = ProductBrand::findOne(['id' => $model->productBrandId]);\n if ($brandModel) {\n $brandModel->setScenario(ProductBrand::SCENARIO_SET_BRAND);\n $brandModel->brandId = $model->id;\n $brandModel->save();\n }\n }\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function store(CreateBrandsRequest $request)\n {\n $data = $request->all();\n if($request->slug == ''){\n $slug = $data['name'];\n $clean_slug = str_replace(\"&\", \"and\", strtolower($slug));\n $data['slug'] = Str::slug($clean_slug);\n }\n $brand = Brand::create($data);\n\n return redirect()->route('gjadmin.brands.index');\n }", "public function update_brand() {\n\t\t$values=array(\"brand_name\"=>$_POST['brand_name'],\"description\"=>$_POST['description']);\n\t\t$where =array(\"id\"=>$_POST['brand_id']);\n\t\tif($this->update(\"brands\",$values,$where)) {\t\t\t\n\t\t\techo true;\n\t\t}\n\t\telse\n\t\t\techo 'Error while updating';\n\t}", "function add_brand($params) {\n $this->db->insert('brands', $params);\n return $this->db->insert_id();\n }", "public function createAction()\n {\n $entity = $this->get('mqm_brand.brand_manager')->createBrand();\n $form = $this->createForm(new BrandType(), $entity);\n $request = $this->getRequest();\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $this->get('mqm_brand.brand_manager')->saveBrand($entity);\n\n return $this->redirect($this->generateUrl('TKShopBackendBrandsShowAll'));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function store(BrandCreateRequest $request)\n {\n $data = $request->input();\n\n $item = (new Brand())->create($data);\n\n if($item) {\n return redirect()->route('shop.admin.brands.index')\n ->with(['success' => \"Бренд {$item->name} успешно сохранен\"])\n ->withInput();\n } else {\n return back()\n ->withErrors(['msg' => 'Ошибка сохранения бренда'])\n ->withInput();\n }\n }", "function addBrand($name, $supplier_id)\n {\n// if ($supplierFind)\n// $supplier = $supplierFind['supplier_id'];\n// else {\n// $newSupplier = $this->insert(\"INSERT INTO `suppliers`(`name`)\n// VALUES ('$supplier')\");\n// $supplier = $newSupplier;\n// }\n\n return $this->insert(\"\n INSERT INTO `brands`(`name`, `supplier_id`)\n VALUES ('$name', $supplier_id)\");\n }", "public function create()\n {\n $this->data['brand'] = null;\n\n\t\treturn view('admin.brands.form', $this->data);\n }", "public function create()\n {\n return view('admin.brand.add_brand');\n }", "public function addBrand(Request $request, $form, Brand $brand)\n {\n $form->handleRequest($request);\n\n // Vérifie si le formulaire d'ajout a été envoyé\n if ($form->isSubmitted() && $form->isValid()) {\n\n $entityManager = $this->getDoctrine()->getManager();\n $entityManager->persist($brand);\n $entityManager->flush();\n\n return true;\n }\n\n return false;\n }", "public function store(Request $request) {\n $this->validate($request, [\n 'name' => 'required|string'\n ]);\n\n $existing = Brand::where('name', $request->name)->first();\n\n if($existing) {\n return redirect(route('admin.products.brands'))->with([\n 'error' => 'A term with the name provided already exists.'\n ]);\n }\n\n $brand = new Brand;\n\n $brand->name = $request->name;\n\n if(isset($request->slug)) {\n $brand->slug = $request->slug;\n } else {\n $brand->slug = str_slug($request->name);\n }\n\n if(isset($request->description)) {\n $brand->description = $request->description;\n } else {\n $brand->description = '–––';\n }\n\n $brand->save();\n\n // Log event\n $activity = new Activity;\n $model = 'Product\\Brand';\n $task = 'created new product brand ' . $request->name;\n $activity->registerActivity($model, $task);\n\n return redirect()->route('admin.products.brands');\n }", "public function addBrand(){\n return view('merchant.brand.addbrand');\n }", "public function admin_add_brand(){\n\t\t\n\t\tif($this->request->isPost() && @$_POST['modeval'] == \"\")\n\t\t{\n\t\t\t$this->autoRender = false;\n\t\t//pr($this->request->data);\n\t\t//die;\n\t\t$type = array('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg','images/x-png','image/PNG');\n\t\t//die;\n\t\t\t$data = array();\n\t\t\t$data['brand_name'] = $this->data['Brand']['brand_name'];\n\t\t\t$data['brand_image'] = $this->request->data['Brand']['brand_image']['name'];\n\t\t\t$this->Brand->set($data);\n\t\t\t\n\t\t\tif($this->Brand->brandValidation()){\n\t\t\t\tif(in_array($this->request->data['Brand']['brand_image']['type'],$type)){\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$data['brand_name'] = $this->data['Brand']['brand_name'];\n\t\t\t\t\n\t\t\t\t\t//$data['brand_image']=\"images/\".$this->request->data['Brand']['file']['name'];\n\t\t\t\t\t$data['brand_image']=\"images/\".time().\"_\".$this->request->data['Brand']['brand_image']['name'];\n\t\t\t\t\t$Brand = $this->Brand->save($data);\n\t\t\t\t\t\n\t\t\t\t\t//echo json_encode($Brand);\n\t\t\t\t\tif($Brand){\n\t\t\t\t\t move_uploaded_file($this->request->data['Brand']['brand_image']['tmp_name'], WWW_ROOT . 'images/'.time().\"_\" .$this->request->data['Brand']['brand_image']['name']);\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"success\",\"message\"=>\"your Brand is successfully added!\",\"data\"=>$Brand));\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"error\",\"message\"=>\"Please upload image type!\"));\n\t\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo json_encode(array(\"status\"=>\"error\",\"message\"=>$this->Brand->validationErrors));\n\t\t\t}\n\t\t\n\t\t\n\t}\n\t\n\t\tif($this->request->isPost() && $_POST['modeval'] == \"delete\")\n\t\t{\n\t\t\t$model = \"Brand\";\n\t\t\tforeach($_POST['BrandIds'] as $ids)\n\t\t\t{\n\t\t\t\t$id = $ids;\n\t\t\t\t$this->$model->id = $id;\n\t\t\t\t\n\t\t\t\t$ret = $this->$model->beforeDelete();\n\t\t\t\t$this->$model->create();\n\t\t\t\tif($ret==1){\t\t\t\n\t\t\t\t\t$this->$model->deleteAll(array($model.'.id'=>$id));\n\t\t\t\t\t$this->set('success', 1);\n\t\t\t\t}else{\n\t\t\t\t\t$this->set('error', 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$limit = $this->limit;\n\t\t$Brand=$this->Brand->find('all');\n\t\t$count = count($Brand);\n\t\t$this->set('Brand',$Brand);\n\t\t$this->paginate = array('limit'=>$limit, 'order'=>array('id'=>'DESC'));\t\t\n\t\t$Brand= $this->Paginator->paginate('Brand');\n\t\t\n\t\tif(isset($this->params->params['named']['page'])){\n\t\t\t$this->set('pages', $this->params->params['named']['page']);\n\t\t}else{\n\t\t\t$this->set('pages', 1);\n\t\t}\n\t\t\n\t\t$this->set('srNo',(isset($this->params->params['named']['page'])? ($this->params->params['named']['page']-1)*$limit:'0'));\n\t\t$this->set('Brand', $Brand);\n\t\t$this->set('limit', $limit);\n\t\t$this->set('count', $count);\n\t\t\n\t\t\n\n\t}", "public function create()\n {\n $listBrand=Brand::all();\n return view('admin.brand.add',compact('listBrand'));\n }", "public function create()\n {\n return view('data_brand.addBrand');\n }", "public function create(){\n config(['global.icon_content_title' => 'icon-bookmark']);\n config(['global.text_content_title' => 'Add new brand']);\n\n //set submit route\n config(['global.submit_link' => 'store.vehicle_brand']);\n //set index route\n config(['global.index_link' => '/vehicle-brands']);\n\n return view('vehicle.brand.create');\n }", "public function admin_save_brandname(){\n\t\t$this->autoRender = false;\n\t\tif($this->request->isPost()){\n\t\t\t$type = array('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg','images/x-png','image/PNG');\n\t\t\t//$this->Brand->set($this->data);\n\t\t\t$data = array();\n\t\t\t$data['id'] = $this->data['Brand']['id'];\n\t\t\t$data['brand_name'] = $this->data['Brand']['brand_name'];\n\t\t\tif(isset($this->request->data['Brand']['brand_image']['name']))\n\t\t\t $data['brand_image'] = $this->request->data['Brand']['brand_image']['name'];\n\t\t\t\n\t\t\t$this->Brand->set($data);\n\t\t\tif($this->Brand->brandValidation()){\n\t\t\t\tif(isset($this->request->data['Brand']['brand_image']['type'])){\n\t\t\t\t\tif(in_array($this->request->data['Brand']['brand_image']['type'],$type)){\n\t\t\t\t\t\t$data['id'] = $this->data['Brand']['id'];\n\t\t\t\t\t\t$data['brand_name'] = $this->data['Brand']['brand_name'];\n\t\t\t\t\t\t$fileName = \"images/\".time().\"_\".$this->request->data['Brand']['brand_image']['name'];\n\t\t\t\t\t\t$data['brand_image'] = $fileName;\n\t\t\t\t\t\t$brandRes = $this->Brand->save($data);\n\t\t\t\t\t\t move_uploaded_file($this->request->data['Brand']['brand_image']['tmp_name'], WWW_ROOT . $fileName);\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"success\",\"message\"=>\"Your Brand is successfully edited!\",\"data\"=>$brandRes));\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"error\",\"message\"=>\"Please upload image type!\"));\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$brandRes = $this->Brand->save($data);\n\t\t\t\t\techo json_encode(array(\"status\"=>\"success\",\"message\"=>\"Your Brand is successfully edited!\",\"data\"=>$brandRes));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo json_encode(array(\"status\"=>\"error\",\"message\"=>$this->Brand->validationErrors));\n\t\t\t}\n\t\t}\n\t}", "public function store(saveBrand $request)\n {\n // $validator = Validator::make($request->all(), [\n // 'brand_name' => 'required',\n // 'brand_desc' => 'required',\n // 'brand_image' =>'required',\n // 'brand_status'=> 'required',\n // ]);\n // if ($validator->fails()) {\n // return response()->json(['error' => $validator->errors()], 404);\n // }\n $brands = brand_product::create([\n 'brand_name' => $request->brand_name,\n 'brand_desc' => $request->brand_desc,\n 'brand_image' => $request->brand_image,\n 'brand_status' => $request->brand_status,\n ]);\n return response()->json([\n 'code' => 201,\n 'data' => $brands,\n ], 201);\n }", "public function store(Request $request) {\n\n $validator = validator::make($request->all(), [\n\n 'brand_name' => 'required|max:255',\n ]);\n if ($validator->fails()) {\n return redirect()->action('Admin\\BrandController@create')\n ->withErrors($validator)\n ->withInput();\n }\n $input = $request->all();\n\n $plan = Brand::create($input);\n return redirect()->action('Admin\\BrandController@index', getCurrentPage('admin.brand'))->with('alert-sucess', 'Brand Added Successfully');\n }", "public function addJsonBrand()\n {\n $request = Request::createFromGlobals();\n $response = new JsonResponse();\n $content = $request->getContent();\n $errorContent = \"\";\n try {\n $brand = Brand::createFromJson($content);\n $exists = Brand::where(\"name\", \"=\", $brand->name)->first();\n if (!$exists) {\n $brand->save();\n $response->setStatusCode(201);\n $response->setContent($brand->jsonify());\n return $response->send();\n } else {\n $errorContent = \"Couldn't create brand. Name already exists.\";\n }\n } catch (\\Exception $e) {\n $errorContent = \"Error creating brand: \" . $e->getMessage();\n }\n $response->setContent(json_encode(array(\"error\" => $errorContent)));\n $response->setStatusCode(400);\n return $response->send();\n }", "public function store(BrandRequest $request)\n {\n $brand = Productbrand::create($request->all());\n if ($brand) {\n return redirect('admin/brands');\n }\n return redirect()->route('brand.create');\n }", "public function newAction(Request $request)\n {\n $brand = new Brand();\n $form = $this->createForm('kiraxe\\AdminCrmBundle\\Form\\BrandType', $brand);\n $form->handleRequest($request);\n\n $em = $this->getDoctrine()->getManager();\n $user = $this->getUser();\n $tableName = [];\n $tableSettingsName = [];\n $tableCars = [];\n $tableName[$em->getClassMetadata('kiraxeAdminCrmBundle:Workers')->getTableName()] = \"Сотрудники\";\n $tableName[$em->getClassMetadata('kiraxeAdminCrmBundle:Services')->getTableName()] = \"Услуги\";\n $tableSettingsName[$em->getClassMetadata('kiraxeAdminCrmBundle:User')->getTableName()] = \"Пользователи\";\n $tableName[$em->getClassMetadata('kiraxeAdminCrmBundle:Materials')->getTableName()] = \"Материалы\";\n $tableSettingsName[$em->getClassMetadata('kiraxeAdminCrmBundle:Measure')->getTableName()] = \"Единицы измерения\";\n $tableName[$em->getClassMetadata('kiraxeAdminCrmBundle:Orders')->getTableName()] = \"Заказ-наряд\";\n $tableName[$em->getClassMetadata('kiraxeAdminCrmBundle:Expenses')->getTableName()] = \"Расход\";\n $tableCars[$em->getClassMetadata('kiraxeAdminCrmBundle:Brand')->getTableName()] = \"Бренд автомобиля\";\n $tableCars[$em->getClassMetadata('kiraxeAdminCrmBundle:Model')->getTableName()] = \"Модель автомобиля\";\n $tableCars[$em->getClassMetadata('kiraxeAdminCrmBundle:BodyType')->getTableName()] = \"Тип кузова\";\n if ($form->isSubmitted() && $form->isValid()) {\n $em->persist($brand);\n $em->flush();\n\n return $this->redirectToRoute('brand_show', array('id' => $brand->getId()));\n }\n\n return $this->render('brand/new.html.twig', array(\n 'brand' => $brand,\n 'form' => $form->createView(),\n 'tables' => $tableName,\n 'user' => $user,\n 'tableSettingsName' => $tableSettingsName,\n 'tableCars' => $tableCars\n ));\n }", "public function store(BrandRequest $request)\n {\n if(Session::get('cus_id')==1){\n $brand = new Brand([\n 'name' => $request->name,\n 'description' => $request->description\n ]);\n $brand->save();\n return back()->with('success','Data saved successfully!');\n }\n return redirect('login')->with('error','This page is for administrators! You need to log in to continue');\n }", "public function add_new_brand($tbl_name,$db_name)\n\t{\n\t\t$this->db->query(\"use $db_name\");\n\n\t\t// define table fields\n\t\t$fields = array(\n\t\t 'id' => array(\n\t\t 'type' => 'INT',\n\t\t 'constraint' => '',\n\t\t 'unsigned' => TRUE,\n\t\t 'auto_increment' => TRUE\n\t\t ),\n\t\t 'brand_name' => array(\n\t\t 'type' => 'VARCHAR',\n\t\t 'constraint' => 255\n\t\t ),\n\t\t 'brand_description' => array(\n\t\t 'type' => 'text',\n\t\t ),\n\t\t 'brand_image' => array(\n\t\t 'type' => 'text',\n\t\t 'constraint' => 50\n\t\t ),\n\t\t 'image_path' => array(\n\t\t 'type' => 'text',\n\t\t 'constraint' => 100\n\t\t ),\n\t\t 'slug' => array(\n\t\t 'type' => 'VARCHAR',\n\t\t 'constraint' => 255\n\t\t ),\n\t\t 'setord' => array(\n\t\t 'type' => 'INT',\n\t\t 'constraint' => 10\n\t\t ),\n\t\t 'status' => array(\n\t\t 'type' => 'VARCHAR',\n\t\t 'asBool' => TRUE,\n\t\t 'constraint' => 1\n\t\t ),\n\t\t 'u_create_date datetime default current_timestamp',\n\t\t);\n\n\t\t$this->dbforge->add_field($fields);\n\n\t\t// define primary key\n\t\t$this->dbforge->add_key('id', TRUE);\n\n\t\t// create table\n\t\treturn $this->dbforge->create_table($tbl_name, TRUE);\n\t}", "public function store(CreateBrandRequest $request)\n {\n $brand = new Brand($request->all());\n\t\t$brand->save();\n\n Session::flash('message', 'La marca \"'.$brand->nombre.'\" fue creada');\n\n\t\treturn redirect()->route('marcas.index');\n }", "function addbrandname($brand,$addbranddescr,$addbrandstatus)\n\t{\n\t\t$names = array('name' => $brand ,'description' => $addbranddescr, 'status' => $addbrandstatus);\n\t\t$add_query = $this->insert( 'brand', $names );\n\t\tif( $add_query )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function addBrand(BrandElementInterface $brand);", "public function store(AuthorizationBrandRequest $request)\n {\n\n $this->authorization_brands->create($request->input(['authorization_brand']));\n\n return redirect()->route('admin.authorization-brands.index')->with('success', trans('site::authorization_brand.created'));\n }", "public function actionEditbrand() {\n\t\t\\Yii::$app->view->title = 'ACA Reporting Service | Edit Brand';\n\t\t$this->layout = 'main';\n\t\t$session = \\Yii::$app->session;\n\t\t$admin_permissions = $session ['admin_permissions'];\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true && in_array(\"6\", $admin_permissions)) \t\t// checking logged session\n\t\t{\n\t\t\t$logged_user_id = $session ['admin_user_id']; // collecting variables from session\n\t\t\t$get = \\Yii::$app->request->get ();\n\t\t\t$id = $get ['id'];\n\t\t\t$encrypt_component = new EncryptDecryptComponent ();\n\t\t\t$id = $encrypt_component->decryptUser ( $id ); // decrypting id\n\t\t\tif (! empty ( $id )) {\n\t\t\t\t\n\t\t\t\t$model_acabrands = TblAcaBrands::Branduniquedetails ( $id );\n\t\t\t\t$old_image = $model_acabrands ['brand_logo'];\n\t\t\t\t$old_brandname = $model_acabrands ['brand_name'];\n\t\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\t\ttry {\n\t\t\t\t\tif ($model_acabrands->load ( \\Yii::$app->request->post () )) {\n\t\t\t\t\t\t$brand_details = \\Yii::$app->request->post ();\n\t\t\t\t\t\t$name = $brand_details ['TblAcaBrands'] ['brand_name'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($old_brandname == $name) { // checking for particular brand name\n\t\t\t\t\t\t\t$checkmodel = '';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$checkmodel = TblAcaBrands::Checkbrandname ( $name );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (empty ( $checkmodel )) { // adding brand if brand name is not exist\n\t\t\t\t\t\t\t$model_acabrands->attributes = $brand_details ['TblAcaBrands'];\n\t\t\t\t\t\t\t$model_acabrands->support_email = $brand_details ['TblAcaBrands'] ['support_email'];\n\t\t\t\t\t\t\t$model_acabrands->support_number = $brand_details ['TblAcaBrands'] ['support_number'];\n\t\t\t\t\t\t\t$model_acabrands->modified_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t\t$model_acabrands->modified_by = $logged_user_id;\n\t\t\t\t\t\t\t$model_acabrands->is_deleted = 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$image = UploadedFile::getInstance ( $model_acabrands, 'brand_logo' ); // getting instance of a uploaded file\n\t\t\t\t\t\t\t$rnd = rand ( 0, 99999 );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (! empty ( $image )) { // checking for image\n\t\t\t\t\t\t\t\t$ext = explode ( \".\", $image->name );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$model_acabrands->brand_logo = $ext [0] . '_1_' . $rnd . '.' . $ext [1];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$path = \\Yii::$app->basePath . '/Images/profile_image/brand_logo/' . $model_acabrands->brand_logo;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$model_acabrands->brand_logo = $old_image;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($model_acabrands->save () && $model_acabrands->validate ()) { // model validated(server side validation)\n\t\t\t\t\t\t\t\tif (! empty ( $image )) { // saving path for image\n\t\t\t\t\t\t\t\t\t$image->saveAs ( $path );\n\t\t\t\t\t\t\t\t\tchmod ( $path, 0755 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$transaction->commit (); // commit the transaction\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'success', 'Brand updated successfully' );\n\t\t\t\t\t\t\t\treturn $this->redirect ( array ( // redirecting to grid if brand is updated\n\t\t\t\t\t\t\t\t\t\t'/admin/masterdata' \n\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn $this->render ( 'editbrand', [ // render the array to editbrand view file\n\t\t\t\t\t\t\t\t\t\t'model' => $model_acabrands \n\t\t\t\t\t\t\t\t] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$model_acabrands->addError ( 'brand_name', 'Brand name is already exist.' ); // model adding error\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch ( Exception $e ) { // any exceptions catch throws error msg\n\t\t\t\t\t\n\t\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\t\n\t\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t}\n\t\t\t\treturn $this->render ( 'editbrand', [ // render the array to editbrand view file\n\t\t\t\t\t\t'model' => $model_acabrands \n\t\t\t\t] );\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}", "public function create()\n {\n $item = new Brand();\n // $brandsList = Brand::all();\n\n return view('shop.admin.brands.edit', compact(\n 'item'\n ));\n\n }", "public function store(Request $request)\n {\n $productBrands = new Brand();\n $productBrands->name = $request->name;\n $productBrands->code = $request->code;\n $productBrands->save();\n return redirect('/productBrands/');\n }", "public function brandForm(){\n $table = \"brands\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $brand){\n echo('<option value=\"'.$brand[\"brand_id\"].'\">'.$brand[\"brand_name\"].'</option>');\n }\n\n\n }", "public function newAction()\n {\n $entity = $this->get('mqm_brand.brand_manager')->createBrand();\n $form = $this->createForm(new BrandType(), $entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function store(Request $request)\n {\n request()->validate([\n 'name' => 'required',\n 'slug' => 'required',\n ]);\n Brand::create($request->all());\n return redirect()->route('brands.index')\n ->with('success','Brand created successfully');\n }", "public function store(CreateBrandRequest $request)\n {\n $brand = new Brand;\n $brand->brand = $request->brand;\n $brand->save();\n\n return redirect('brands')->with('status', 'Create succesfully');\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required',\n ]);\n\n Brand::create([\n 'name' => $request->input('name')\n ]);\n\n return redirect('/brands');\n }", "function save_custom_field_brand( $post_id ) {\n $product = wc_get_product( $post_id );\n $details_brand = isset( $_POST['custom_field_brand'] ) ? $_POST['custom_field_brand'] : '';\n $product->update_meta_data( 'custom_field_brand', sanitize_textarea_field( $details_brand ) );\n $product->save();\n}", "public function store(Request $request)\n {\n $validatedData = $this->validate($request,[\n 'name'=>'required|string',\n 'website'=>'nullable|string'\n ]);\n\n Brand::create($validatedData);\n\n return redirect(route('brands.index'))->with('message',__('lang.Added'));\n }", "public function store(CreateBrandRequest $request)\n {\n $input = $request->all();\n\n $brand = $this->brandService->create($input);\n\n Flash::success('Brand saved successfully.');\n\n return redirect(route('admin.showcase.brand.index'));\n }", "public function store(Request $request)\n {\n $brands = new Brand;\n\n $brands -> bname = $request->bname;\n\n if($brands -> save()){\n return redirect('/brand')->with('success', '添加成功');\n }else{\n return back()->with('error','添加失败');\n }\n }", "public function insertNewBrandAction(){\n $request = $this->getRequest();\n $em = $this->getDoctrine()->getEntityManager();\n $session = $request->getSession();\n $company_id = $session->get('id');\n $role = $session->get('role');\n if ($role == 'company'){\n $req = $this->container->get('request');\n $brand = $req->get('brand');\n $em = $this->getDoctrine()->getEntityManager();\n $repository = $em->getRepository('SiteSavalizeBundle:Brand');\n // check for the brand name in the database\n $brandDB = $repository->findOneByName($brand);\n $brandCompany = $em->getRepository('SiteSavalizeBundle:Company')->find($company_id);\n $companyName = $brandCompany->getName();\n // if not exists create a new brand with company = company_id\n if($brandDB == null){\n $brandDB = new Brand();\n $brandDB->setName($brand);\n $brandDB->setCompany($brandCompany);\n $brandDB->setConfirmed(1);\n $brandDB->setIsDeleted(0);\n $em->persist($brandDB);\n $title = $companyName.'new Brand';\n $content = 'check our new brand'. $brand .', its now available at the market ';\n $notification = new UserNotification();\n $notification->setTitle($title);\n $notification->setContent($content);\n $notification->setReleasedAt(new \\DateTime());\n $em->persist($notification);\n\n $em->flush();\n $success = '<p class=\"alert alert-success\"> data has been added successively</p>';\n return New Response($success); \n }else{\n // if it already exists check on the company_id\n $brandCompany = $brandDB->getCompany();\n if(!$brandCompany){\n $repo = $this->getDoctrine()->getEntityManager()->getRepository('SiteSavalizeBundle:ProductBrand');\n $result = $repo->updateCompany($company_id, $brand);\n $success = '<p class=\"alert alert-success\"> data has been added successively</p>';\n return New Response($success);\n }else{\n // if the brand is assigned to a company ..\n return New Response('<p class=\"alert alert-error\"> this company is already assigned to another please contact us for more details</p>');\n\n }\n }\n }\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required'\n ]);\n $brand = new Brand();\n if ($request->has('image')){\n $request->validate([\n 'image' => 'image'\n ]);\n $path = $request->file('image')->store('brand');\n $public_path = public_path('storage/' . $path);\n Image::make($public_path)->resize(200,200)->save($public_path);\n $brand->logo = $path;\n }\n $brand->name = $request->name;\n $brand->description = $request->description;\n $brand->save();\n\n $slug = slug_maker($request->name);\n if (Brand::where('slug', $slug)->exists()){\n $brand->slug = $slug . '-' . $brand->id;\n }else{\n $brand->slug = $slug;\n }\n $brand->save();\n\n Toastr::success('Brand added', 'Success');\n return back();\n }", "public function admin_edit_brand($id = null){\n\t\tif($this->request->isPost()){\n\t\t\t$id = $this->data['id'];\n\t\t\t$name = $this->Brand->findById($id);\n\t\t\t//pr($name); die;\n\t\t\t$this->set('brand_name',$name['Brand']['brand_name']);\n\t\t\t$this->set('brand_image',$name['Brand']['brand_image']);\n\t\t\t$this->set('id',$id);\n\t\t}\n\t\n\t}", "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'brand_name' => 'required|unique:\"brands\"'\n\n ]);\n\n if ($validator->fails()) {\n if ($validator->messages()->all()[0] == \"The brand name has already been taken.\") {\n Alert::warning('Opps!','Brand name already taken.');\n return redirect()->back();\n }else{\n Alert::warning('Opps!','Please fillup all field.');\n return redirect()->back();\n }\n }else{\n Brand::create([\n\n 'brand_name'=>$request->brand_name,\n 'slug'=> Str::slug($request->brand_name),\n 'br_description'=>$request->br_description\n ]);\n }\n\n\n\n // if ($request->category_id && $request->child_category_id && $request->sub_child_category_id) {\n\n // }elseif($request->category_id && !$request->child_category_id && !$request->sub_child_category_id){\n // Brand::create([\n // 'category_id'=>$request->category_id,\n // 'brand_name'=>$request->brand_name,\n // 'slug'=> $request->brand_name,\n // 'br_description'=>$request->br_description\n // ]);\n // }elseif($request->category_id && $request->child_category_id && !$request->sub_child_category_id){\n // Brand::create([\n // 'category_id'=>$request->category_id,\n // 'child_category_id'=>$request->child_category_id,\n // 'brand_name'=>$request->brand_name,\n // 'slug'=> $request->brand_name,\n // 'br_description'=>$request->br_description\n // ]);\n // }\n\n\n toast('Brand Upload successfully','success')->padding('10px')->width('270px')->timerProgressBar()->hideCloseButton();\n\n return redirect()->back();\n }", "public function store(Request $request)\n {\n $request->validate([\n \"brand\" => 'required|max:255|unique:brands,name',\n ]);\n\n $brand = new Brand;\n $brand->name = $request->brand;\n $brand->save();\n\n alert()->success(__('Success'), __('New brand added to the system'));\n return redirect()->route('admin.brand.index');\n }", "public function create()\n {\n return view('back.Brand.create');\n }", "public function store(Request $request)\n {\n if($request->id){\n $validation = ['brand_name' => 'unique:brands,brand_name,'.$request->id,'image' => 'image|mimes:jpeg,png,jpg,gif|max:2048'];\n }else{\n $validation = ['brand_name' => 'required|unique:brands,brand_name','image' => 'required|image|mimes:jpeg,png,jpg,gif|max:2048'];\n }\n\t\t$this->validate($request, $validation);\n\n if($request->id){\n $input = $request->all();\n $brand = Brand::find($request->id);\n if ($image = $request->file('image')) {\n\n if (Storage::disk('public')->exists($brand->file_name)) {\n Storage::disk('public')->delete($brand->file_name);\n }\n $image_name= Storage::disk('public')->put('/', $image);\n $input['file_name'] = $image_name;\n\t\t\t$input['company_id'] = Auth()->user()->company_id;\n \n\t\t\t\n }else{\n unset($input['image']);\n }\n \n $brand->update($input);\n }\n else{\n //\n\t\t\n $input = $request->all();\n \n if ($image = $request->file('image')) {\n $image_name= Storage::disk('public')->put('/', $image);\n $input['file_name'] = $image_name;\n\t\t\t$input['company_id'] = Auth()->user()->company_id;\n }\n \n Brand::create($input);\n \n }\n return redirect()->route('brands.index')\n ->with('success','Brand created successfully');\n\t\t\t\t\t\t\n \n \n }", "public function run()\n {\n $data = array(\n [\n 'nombre' => 'Moleskine',\n 'imagen' => 'moleskine.jpg',\n ]\n );\n Brand::insert($data);\n }", "public function store(Request $request)\n {\n $validData = $request->validate(\n ['name_brand' => 'required | min:3 | max:99 | unique:brands,name_brand'],\n [\n 'name_brand.required' => 'El campo Categoría es requerido',\n 'name_brand.min' => 'El campo Categoría requiere mínimo 3 caracteres',\n 'name_brand.unique' => 'Ya existe en la base de datos'\n ]\n );\n $brands = new Brand();\n $brands->name_brand = $request->get('name_brand');\n $brands->save();\n return redirect('/config/brands');\n }", "public function store(Request $request)\n {\n $request->validate([\n 'parent_sub_category' => 'required',\n 'brand_name' => 'required',\n 'status' => 'required',\n ]);\n $explodeBrand = explode(\",\", $request->brand_name);\n for($i=0; $i < count($explodeBrand); $i++)\n {\n $brand = new Brand();\n $brand->parent_sub_category = $request->parent_sub_category;\n $brand->sub_category = $request->sub_category;\n $brand->child_sub_category = $request->child_sub_category;\n $brand->brand_name = $explodeBrand[$i];\n $brand->status = $request->status;\n $brand->save();\n }\n return redirect('/admin/brand')->with('success', 'Brand Added Successfully!');\n }", "public function store(Request $request)\n {\n $data=array();\n $data['brand_id']=$request->brand_id;\n $data['brand_name']=$request->brand_name;\n $data['brand_description']=$request->brand_description;\n $data['publication_status']=$request->publication_status;\n\n DB::table('tbl_brand')->insert($data);\n Session::put('message','Brand Added Successfully !!');\n \n return Redirect::to('/add_brand');\n \n }", "public function create()\n {\n return view('admin.brand.create');\n }", "public function store(Request $request)\n {\n Brand::create([\n 'brand'=>$request->get('name'),\n \n ]);\n return redirect()->back()->with('status','Successfully Created Category');\n }", "public function store(Request $request)\n {\n $name = $request->get('name');\n $slug = \\Illuminate\\Support\\Str::slug($request->get('name')).'-'.rand(1000, 9999);\n $query = Brand::insert(['name' => $name, 'slug' => $slug]);\n if ($query) {\n return redirect()->route('backend.brands.index')->with('success','Thêm thương hiệu thành công');\n }else {\n return redirect()->route('backend.brands.index')->with('error','Thêm thương hiệu thất bại');\n }\n }", "public function store(ProductBrandRequest $req)\n {\n $b = $req->id ? ProductBrand::find($req->id) : new ProductBrand();\n\n $b->name = $req->name;\n $b->logo = $req->logo ? $this->_logoStore($req->logo) : $this->_logoRestore($req);\n $b->status = $req->status;\n\n\n if ($req->id) {\n $b->update();\n } else {\n $b->save();\n }\n\n return response()->json($b, Response::HTTP_OK, array(), JSON_PRETTY_PRINT);\n\n }", "public function test_post_brands()\n {\n $response = $this->post('/api/brands', [\n 'name' => 'NewAwesomeBrand',\n ], $this->defaultHeaders);\n\n $response->assertStatus(200);\n\n $carBrandExists = CarBrand::where('name', 'NewAwesomeBrand')\n ->exists();\n\n $this->assertTrue($carBrandExists);\n\n CarBrand::where('name', 'NewAwesomeBrand')\n ->delete();\n }", "public function store(Request $request)\n {\n $brand = new Brand();\n $brand->name = $request->get(\"name\");\n $brand->description = $request->get(\"description\");\n $brand->save();\n \n Toastr::success(\"Het merk is succesvol aangemaakt\");\n \n return Redirect::action(\"Admin\\BrandController@index\");\n }", "public function store(BrandRequest $request)\n {\n $params = $request->except('_token');\n $params['slug'] = Str::slug($params['name']);\n $image = $request->file('image');\n if ($image) {\n # code...\n \n $name = Str::slug($params['name']) . '_' . time();\n $fileName = $name . '.' . $image->getClientOriginalExtension();\n\n $folder = Brand::UPLOAD_DIR. '/images';\n\n $filePath = $image->storeAs($folder . '/original', $fileName, 'public');\n\n // $resizedImage = $this->_resizeImage($image, $fileName, $folder);\n\n $params['original'] = $filePath;\n // $params['extra_large'] = $resizedImage['extra_large'];\n // $params['small'] = $resizedImage['small'];\n\n unset($params['image']);\n } else {\n $params['original'] = '';\n $params['extra_large'] = '';\n $params['small'] = '';\n }\n\n\t\tif (Brand::create($params)) {\n\t\t\tSession::flash('success', 'Brand has been created');\n\t\t} else {\n\t\t\tSession::flash('error', 'Brand could not be created');\n\t\t}\n\n\t\treturn redirect('admin/brands');\n }", "public function store(StoreBrandRequest $request)\n {\n $request->validated();\n\n $brand = new Brand;\n $brand->name = $request->name;\n $brand->description = $request->description;\n $brand->save();\n\n if ($request->has('picture') && $request->file('picture')->isValid()) {\n $brand->addMediaFromRequest('picture')\n ->toMediaCollection('brand_images');\n }\n\n return redirect()\n ->back()\n ->withSuccess('Berhasil menambah data brand');\n }", "public function editfnlBrand(Request $request)\n {\n $this->validate($request, [\n 'id'=> 'required',\n 'name' => 'required',\n ]);\n \n $id=$request->id;\n $accout = Brand::where(\"id\",$id)->get()->first();\n\n $accout->name = $request->name;\n\n $accout->updated_by = $request->user()->id;\n $datasaved=$accout->save();\n\n $updateproduct=Product::where('brandid',$id)->update(['brandname'=>$request->name]);\n \n\n return response()->json([\n 'message' => 'Menue created successfully'\n ], 200);\n }", "public function testSuccessfullyCreatedBrand()\n {\n $owner = Owner::all()->random();\n $type = Type::all()->random();\n $plate = Str::random(3) . rand(000, 999);\n $brand = \"Marca\" . \\date(\"YmdHis\");\n $response = $this->json('POST', '/cars', [\"plate\" => $plate, \"brand\" => $brand, \"type\" => $type->id, \"owner\" => $owner->id]);\n $this->assertDatabaseHas('brands', [\n 'name' => $brand,\n ]);\n }", "public function store(Request $request)\n {\n $this->validateWith([\n 'name' => 'required',\n 'status' => 'required',\n 'image' => 'image|required'\n ]);\n\n $brand = new Brand;\n\n $brand->brandName = $request->name;\n $brand->slug = str_slug($request->name);\n $brand->status = $request->status;\n\n $fileurl = '';\n if ( $featured = $request->file('image') ) {\n $filename = 'featured-' . str_slug( $request->name ) . '-' . str_random(10) . '.' . $featured->getClientOriginalExtension();\n\n Image::make($featured)->resize(250,270)->save('uploads/brands/'. $filename);\n\n $fileurl = 'uploads/brands/' . $filename; \n }\n\n $brand->image = $fileurl;\n // $cat->theme_no = $request->theme_no;\n $brand->save();\n\n Session::flash('success', 'Succesfully created a Brand.');\n return redirect()->back();\n }", "public function store(Request $request)\n {\n $this->brandStoreValidator($request);\n (new Brand($request->all()))->saveOrFail();\n Session::flash('brands', 'برند جدید با موفقیت ذخیره شد!');\n\n return redirect()->route('brands.index');\n }", "public function brand(){\n \n if($this->access_role->is_Admin() == false) show_404();\n if($_SERVER['REQUEST_METHOD'] === 'POST')\n {\n if ($this->form_validation->run('foote_validition') == true)\n {\n $this->load->model('Brand_Model');\n $this->Brand_Model->update_footer();\n } else {\n \n $error = ['class'=>'warning','text'=> validation_errors()];\n $this->session->set_flashdata('sms_flash', $error); \n redirect('Dashboard/brand');\n } \n } else {\n \n $this->load->view('admin/brand_content');\n }\n }", "function save_brand_post($post_id) {\n $post_type = get_post_type($post_id);\n if (!in_array($post_type, array('brands','products','dealers'))) {\n return;\n }\n $post_title = get_field('name', $post_id);\n $post_name = sanitize_title($post_title);\n $post = array(\n 'ID' => $post_id,\n 'post_name' => $post_name,\n 'post_title' => $post_title\n );\n wp_update_post($post);\n}", "public function create()\n {\n return view('backend.pages.brand.create');\n }", "public function create()\n {\n return view(\"admin.brands.create\");\n }", "public function store(Request $request)\n {\n $data = $request->except(\"_token\");\n $validator=Validator::make($data,[\n 'bname'=>['required','unique:brand'],\n 'burl'=>'required',\n ],[\n 'bname.required'=>'品牌名称必填',\n 'bname.unique'=>'品牌已存在',\n 'burl.required'=>'品牌网址必填',\n ]);\n if($validator->fails()){\n return redirect('brand/create')\n ->withErrors($validator)\n ->withInput();\n }\n\n if($request->hasFile('bimg')){\n $data['bimg'] = $this->upload('bimg');\n }\n $res = Brand::create($data);\n if($res){\n return redirect(\"/brand/list\");\n }\n }", "public function testInsertBrandUsingPOST()\n {\n }", "public function store(BrandRequest $request)\n {\n try {\n $brand = new Brand();\n $brand->name = $request->name;\n if (($request->file('image'))) {\n $file_name = 'brand_image'. rand(1, 15). rand(155, 200) . rand(25, 55). '.png';\n $request->image->storeAs('public/brands',$file_name);\n $brand->image = 'brands/'. $file_name;\n }\n $brand->save();\n return redirect()->route('brands.index')->with('done', 'Added Successfully ....');\n } catch (\\Exception $e) {\n return redirect()->back()->with('error', 'Error Try Again !!');\n }\n }", "public function add(){\n $brands = Brand::all();\n $categories = Category::all();\n return view('admin.product.add')->with(['brands'=>$brands,'categories'=>$categories]);\n }", "public function create()\n {\n $brands = CarBrand::all();\n\n\n return view('brand.create',compact('brands'));\n }", "public function store(Request $request)\n {\n //validate date\n $this->validate($request, [\n 'brandId' => 'required',\n 'brandModelName' => 'required|unique:brand_models,brand_model_name',\n ]);\n\n //Add new data\n $addBrandModel = new BrandModel;\n $addBrandModel->brand_id = $request->input('brandId');\n $addBrandModel->brand_model_name = $request->input('brandModelName');\n $addBrandModel->brand_model_status = 'A';\n $addBrandModel->created_by = auth()->user()->name;\n $addBrandModel->save();\n\n //return index view\n return redirect('/basics/brandmodel');\n }", "public function create()\n {\n return view('backend.showcase.brands.create');\n }", "public function manage_brand($brand_id='')\n\t{\n\t\t$data['brand_details']='';\n\t\tif($brand_id)\n\t\t{\n\t\t\t$data['brand_details']=$this->ref_brand->get($brand_id);\n\t\t\t$data['brand_images']=$this->lnk_brands_to_docs->get_brand_images($brand_id);\n\t\t}\n\t\t$data['page']='Manage brand';\n\t\t$view = 'admin/collection/brands/admin_manage_brand_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\n\t}", "function save()\n\t\t{\n\t\t\t// if name is found, return brand id#\n\t\t\t$brand_check = null;\n\t\t\t$brand_check = Brand::findByName($this->getName());\n\t\t\tif($brand_check == null){\n\t\t\t\t$GLOBALS['DB']->exec(\"INSERT INTO brands (name) VALUES ('{$this->getName()}');\");\n\t\t\t\t$this->id = $GLOBALS['DB']->lastInsertId();\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn $brand_check;\n\t\t\t}\n\t\t}", "public function store(Request $request)\n {\n $brand = new Brand();\n $brand->name = $request->input('name');\n $brand->slug = Str::slug($request->input('name'));\n if ($request->hasFile('image')) { // kiểm tra xem có image có đc chọn ko\n // Xóa file cũ đi\n @unlink(public_path($brand->image));\n // get file\n $file = $request->file('image');\n // dặt tên cho file image\n $filename = time().'_'.$file->getClientOriginalName(); //tên ban đầu của file\n // Định nghĩa đường dẫn file upload lên\n $path_upload = 'upload/brand/'; // uploads/brands\n // thực hiện upload file\n $file->move($path_upload,$filename);\n // lưu lại cái tên\n $brand->image = $path_upload.$filename;\n }\n $request->url = $request->input('url');\n $is_active = 0;\n if($request->has('is_active')) {\n $is_active = $request->input('is_active');\n }\n $brand->is_active = $is_active;\n\n $position = 0;\n if($request->has('position')) {\n $position = $request->input('position');\n }\n $brand->position = $position;\n $brand->save();\n\n return redirect()->route('admin.brand.index');\n }", "public function created(Brand $brand)\n {\n session()->flash('success','برند '.$brand->title .' با موفقیت اضاف شد.');\n }", "public function store(CreateEquipmentBrandRequest $request)\n {\n $input = $request->all();\n\n $equipmentBrand = $this->equipmentBrandRepository->create($input);\n\n Flash::success('Equipment Brand saved successfully.');\n\n return redirect(route('equipmentBrands.index'));\n }", "public function create()\n {\n Auth::user()->can('create-model') ?: abort(403);\n\n $brands = Brand::where('branch_id', session('selected_branch_id'))->get();\n\n return view('product_model.form', compact('brands'));\n }", "public function actionCreate($page)\n {\n if (\\Yii::$app->user->can('createBrand')) {\n\n $model = new Brand();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()) {\n // 2018-10-30 : Records the brand create operation.\n Yii::info('[The user has created the brand record with ID='.$model->id.']', 'cttwapp_user');\n Yii::$app->session->setFlash('success', Yii::t('app', 'El registro se ha creado exitosamente').'.');\n return $this->redirect(['view', 'id' => $model->id, 'page' => $page]);\n }\n // 2018-05-07 : An error occurred in the data capture process. A flash message is issued.\n Yii::$app->session->setFlash('warning', Yii::t('app', 'Por favor atienda las siguientes consideraciones antes de proceder a registrar la información').'.');\n return $this->render('create_brand', ['model' => $model, 'page' => $page]);\n }\n\n Yii::info('[The user gets access to create a new brand record]', 'cttwapp_user');\n return $this->render('create_brand', ['model' => $model, 'page' => $page]);\n }\n else {\n // 2018-07-27 : If the user is a guest, then sends an error message to him. Otherwise it sends a warning message.\n if (Yii::$app->user->getIsGuest()) {\n Yii::$app->session->setFlash('error', Yii::t('app', 'Usted esta tratando de ingresar al sistema de forma no autorizada. Por favor, primero autentifique su acceso').'.');\n Yii::error('[Access denied to create a brand record]', 'cttwapp_user');\n return $this->redirect(['site/index', 'hash' => '0']);\n }\n Yii::$app->session->setFlash('warning', Yii::t('app', 'Su perfil de acceso no le autoriza a utilizar esta acción. Por favor contacte al administrador del sistema para mayores detalles').'.');\n Yii::warning('[Unauthorized access profile to create a brand record]', 'cttwapp_user');\n return $this->redirect(['brand/index', 'page' => $page, 'hash' => '0']);\n }\n }", "public function testUserCanCreateNewBrandJSON()\n {\n Storage::fake('public');\n $this->assertDatabaseMissing('brands', $this->data);\n\n $this->addCsrfToken();\n\n $this->data['image'] = UploadedFile::fake()->image('test.jpg');\n $response = $this->getJsonRequest()->post('brand', $this->data);\n\n $response->assertStatus(Response::HTTP_CREATED);\n\n $brand = Brand::withoutGlobalScopes()->where('title', $this->data['title'])->first();\n $this->removeCsrfToken();\n $this->overrideData([\n 'image' => null,\n ]);\n $this->assertDatabaseHas('brands', $this->data);\n Storage::disk('public')->assertExists(\n $brand->getMedia()[0]->id . '/' . $brand->getMedia()[0]->file_name\n );\n $response->assertJsonStructure($this->structure);\n }", "function doUpdateBrand(Request $req)\n {\n //mencari id di tabel brand yang idnya sama dengan yang diterima\n $temp = Brands::find($req->id);\n $temp->brandName = $req->brandName;\n $temp->save(); //save data yang sudah diupdate\n return redirect('/');\n }", "public function create()\n {\n if (! Gate::allows('tire_brand_create')) {\n return abort(401);\n }\n return view('tire_brands.create');\n }", "public function create()\n {\n \n return view('admin.brands.create');\n\n }", "protected function loadForm(): void\n {\n $rbtHiddenValues = [\n ['label' => BL::lbl('Hidden'), 'value' => 1],\n ['label' => BL::lbl('Published'), 'value' => 0],\n ];\n $internalLinks = BackendSpotlightsModel::getInternalLinks();\n\n // create form\n $this->form = new BackendForm('add');\n\n $this->form->addText('title', null, null, 'form-control title', 'form-control danger title');\n $this->form->addEditor('text');\n $this->form->addText('link', null, null);\n $this->form->addDropdown('categories', $this->categories);\n $this->form->addImage('image');\n $this->form->addRadiobutton('hidden', $rbtHiddenValues, 0);\n $this->form->addText('link_title');\n $this->form->addCheckbox('external_link');\n $this->form->addText('external_url');\n $this->form->addDropdown('internal_url', $internalLinks, '',\n false,\n 'chzn-select'\n )->setDefaultElement('');\n\n // meta\n $this->meta = new BackendMeta($this->form, null, 'title', true);\n\n }", "public function create()\n {\n return view('brand.create');\n }", "public function create()\n {\n return view('brand.create');\n }", "public function create()\n {\n return view('brand.create');\n }", "public function create()\n {\n return view('brand.create');\n }", "public function getBrand_id()\n {\n return $this->brand_id;\n }", "public function getBrand_id()\n {\n return $this->brand_id;\n }" ]
[ "0.77343386", "0.7597405", "0.72044265", "0.7182926", "0.69446343", "0.6859133", "0.6856537", "0.683337", "0.68056345", "0.66860867", "0.6681569", "0.6680434", "0.6671762", "0.6659672", "0.6658704", "0.6565896", "0.6565298", "0.65460104", "0.65147", "0.65125257", "0.65038747", "0.64976245", "0.6465486", "0.6423429", "0.6418343", "0.6418088", "0.6406992", "0.638719", "0.63848525", "0.6365788", "0.63571686", "0.6351983", "0.6350754", "0.63424736", "0.63357025", "0.6331586", "0.6278178", "0.62726814", "0.6241791", "0.6210963", "0.6196179", "0.6170333", "0.6163399", "0.61615306", "0.6156643", "0.6154675", "0.61400306", "0.6134142", "0.6133089", "0.6131234", "0.61206156", "0.61185396", "0.61131895", "0.6105976", "0.6098521", "0.6098403", "0.6062166", "0.60544074", "0.6053585", "0.604618", "0.60450375", "0.60373896", "0.6009875", "0.59876513", "0.5983155", "0.5977603", "0.5976583", "0.5975594", "0.5968931", "0.59605974", "0.5958336", "0.59551007", "0.5948477", "0.59328055", "0.5930025", "0.59204847", "0.5918995", "0.59127", "0.59109765", "0.5905788", "0.58992267", "0.58760464", "0.58696723", "0.58341664", "0.5810385", "0.58038825", "0.5799372", "0.579247", "0.5789068", "0.5780987", "0.5775982", "0.5765163", "0.5761529", "0.5753032", "0.5747187", "0.5747187", "0.5747187", "0.5747187", "0.5744475", "0.5744475" ]
0.72361904
2
Returns building as an associative array
public function getAsArray() { return array("id" => $this->id, "name" => $this->name, "park" => get_object_vars($this->park), "code" => $this->code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function build(): array;", "public function build(): array;", "public function build() {\n return array();\n }", "function prepare_array() {\n\n\t\t$obj['name'] = $this->name->value;\n\t\t$obj['url'] = $this->url->value;\n\t\t$obj['image'] = $this->image->value;\n\t\t$obj['description'] = $this->description->value;\n\t\t/*\n\t\tforeach($this as $key => $value) {\n\n\t\t\t$obj[$key] = $value;\n\n\t\t}\n\t*/\n\t\treturn $obj;\n\t}", "public function getArray() {\n return array(\n \"id\" => $this->id, \n \"nombreGrupo\" => $this->nombre, \n //\"idag\" => $this->idap, \n );\n }", "public function toAssociativeArray() {\n // TODO\n }", "public function toAssociativeArray() {\n // TODO\n }", "public function build() {\n $config = $this->getConfiguration();\n return [\n '#theme' => 'helloadvanced',\n '#text' => isset($config['text']) ? $config['text'] : NULL,\n '#person' => isset($config['person']) ? $config['person'] : NULL,\n '#session' => isset($config['session']) ? $config['session'] : NULL,\n ];\n }", "public function build()\n {\n self::$options = [];\n foreach( $this->rawOptions as $option ) {\n if( @self::$options[ $option[ 'key' ] ] == null ) {\n if( ( bool ) $option[ 'array' ] ) {\n self::$options[ $option[ 'key' ] ] = [ $option[ 'value' ] ];\n } else {\n self::$options[ $option[ 'key' ] ] = $option[ 'value' ];\n } \n } else {\n // if value has yet been saved, then well consider it as an array\n if( ! is_array( self::$options[ $option[ 'key' ] ] ) ) {\n $temp = self::$options[ $option[ 'key' ] ];\n unset( self::$options[ $option[ 'key' ] ] );\n self::$options[ $option[ 'key' ] ] = [ $temp ];\n } else {\n self::$options[ $option[ 'key' ] ][] = $option[ 'value' ];\n }\n } \n }\n }", "public function build()\n {\n return $this->schema->toArray();\n }", "abstract public function toAssoc(): array;", "public function to_array() {\n\t\t$config = array();\n\t\t\n\t\tforeach( $this->sections as $id => $section ) {\n\t\t\t$config[$id] = $section->to_array();\n\t\t}\n\t\t\n\t\treturn $config;\n\t}", "public function build(): self\n {\n if ($this->type === 'primary') {\n return $this->primary();\n }\n if ($this->type === 'unique') {\n return $this->unique();\n }\n return $this->set();\n }", "function to_array() \n {\n $d = array();\n $d[\"vocab\"] = $this->vocab;\n $d[\"meta_name\"] = $this->meta_name;\n $d[\"text\"] = $this->text;\n $d[\"lang\"] = $this->lang;\n foreach($this->attrs as $key => $value) {\n $d[$key] = $value;\n }\n return $d;\n }", "public function build(): array {\n $node = $this->getNode();\n\n return [\n [\n '#theme' => 'top',\n '#heading' => $node->getHeading(),\n '#cache' => $this->cache,\n ],\n [\n '#type' => 'status_messages',\n ],\n ];\n }", "private function buildToParams($build) {\n $data = array(\n 'namespace' => $build->namespace, \n 'type' => $build->type, \n 'object_key' => $build->metaKey, \n 'object_id' => $build->objectID\n );\n if ($build->relation) {\n\n unset($data['object_key']);\n $data['operation'] = $build->relation->type;\n $data['user_id'] = $build->relation->user;\n $data['value'] = $build->relation->value;\n if ($build->objectCreation) {\n $data['timestamp'] = $build->objectCreation;\n }\n\n }\n return $data;\n }", "public function buildJson();", "function toArray()\n {\n $ary = array('name' => $this->_name, 'identifier' => $this->_identifier);\n if (count($this->indexes) > 0) {\n $ary['indexes'] = $this->indexes;\n }\n return $ary;\n }", "function toArray()\n {\n $ary = array('request' => $this->uri, 'type' => $this->_type);\n if ($this->_shortName) {\n $ary['shortname'] = $this->_shortName;\n }\n if ($this->_description) {\n $ary['description'] = $this->_description;\n }\n \n if (!isset($this->template)) {\n throw new RuntimeException('The search template has not been set!');\n }\n $ary['template'] = $this->template; \n if ($this->_developer) {\n $ary['developer'] = $this->_developer;\n }\n if ($this->contact) {\n $ary['contact'] = $this->contact;\n }\n \n if (count($this->tags) > 0) {\n $ary['tags'] = $this->tags;\n }\n if ($this->_longName) {\n $ary['longname'] = $this->_longName;\n }\n \n if (count($this->_image) > 0) {\n $ary['image'] = $this->_image;\n }\n \n if ($this->_attribution) {\n $ary['attribution'] = $this->_attribution;\n }\n \n if ($this->_syndicationRight) {\n $ary['syndicationright'] = $this->_syndicationRight;\n }\n if (isset($this->adultContent)) {\n $ary['adultcontent'] = $this->adultContent;\n }\n \n if (count($this->languages) > 0) {\n $ary['language'] = $this->languages;\n }\n if (count($this->inputEncodings) > 0) {\n $ary['inputencodings'] = $this->inputEncodings;\n }\n if (count($this->outputEncodings) > 0) {\n $ary['outputencodings'] = $this->outputEncodings;\n }\n \n if ($this->exampleQuery || count($this->_contextSets) > 0) {\n $ary['query'] = array();\n if ($this->exampleQuery) {\n $ary['query']['example'] = $this->exampleQuery;\n }\n foreach ($this->_contextSets as $c) {\n if (!$ary['query']['context-sets']) {\n $ary['query']['context-sets'] = array();\n }\n array_push($ary['query']['context-sets'], $c->toArray());\n }\n }\n return $ary;\n }", "public function build();", "public function build();", "public function build();", "public function build();", "public function build();", "public function build();", "public function build();", "public function toArray()\n {\n $a = parent::toArray();\n if ($this->accounts) {\n $ab = array();\n foreach ($this->accounts as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['accounts'] = $ab;\n }\n if ($this->addresses) {\n $ab = array();\n foreach ($this->addresses as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['addresses'] = $ab;\n }\n if ($this->emails) {\n $ab = array();\n foreach ($this->emails as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['emails'] = $ab;\n }\n if ($this->homepage) {\n $a[\"homepage\"] = $this->homepage->toArray();\n }\n if ($this->identifiers) {\n $ab = array();\n foreach ($this->identifiers as $i => $x) {\n $ab[$i] = array();\n foreach ($x as $j => $y) {\n $ab[$i][$j] = $y->getValue();\n }\n }\n $a['identifiers'] = $ab;\n }\n if ($this->names) {\n $ab = array();\n foreach ($this->names as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['names'] = $ab;\n }\n if ($this->openid) {\n $a[\"openid\"] = $this->openid->toArray();\n }\n if ($this->phones) {\n $ab = array();\n foreach ($this->phones as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['phones'] = $ab;\n }\n return $a;\n }", "public function toArray() {\r\n return $this->associativeArray();\r\n }", "public function toArray()\n {\n return array(\n 'blogic' => $this->bLogic,\n 'field_name' => $this->fieldName,\n 'operator' => $this->operator,\n 'value' => $this->value,\n );\n }", "public function associative()\n\t{\n\t\t$sSQL\t\t= \"SELECT collection, name, value FROM \" . $this->table . \" WHERE _active=1 ORDER BY collection, name\";\n\t\t\n\t\t$this->oDB->query( $sSQL );\n\t\t\n\t\t$aResult\t= $this->oDB->result();\n\n\t\tforeach( $aResult as $sKey => $vValue )\n\t\t{\n\t\t\t$aTmp[ $vValue[ \"collection\" ] ][ $vValue[ \"name\" ] ]\t= $vValue[ \"value\" ];\n\t\t}\n\t\t\n\t\treturn $aTmp;\n\t}", "public static function build()\n {\n return call_user_func_array([(new static), 'serialize'], func_get_args());\n }", "private function toArray()\n {\n \treturn array(\n \t\t'Locus'\t\t\t\t=> $this->getLoucs(),\n \t\t'Length'\t\t\t=> $this->getLength(),\n \t\t'Strandedness'\t\t=> $this->getStrandedness(),\n \t\t'mulType'\t\t\t=> $this->getMulType(),\n \t\t'Topology'\t\t\t=> $this->getTopology(),\n \t\t'PriAccession'\t\t=> $this->getPriAccession(),\n \t\t'AccessionVersion'\t=> $this->getAccessionVersion(),\n \t\t'OtherSeqIds'\t\t=> $this->getOtherSeqIds(),\n \t\t'Organism'\t\t\t=> $this->getOrganism(),\n \t\t'Taxonomy'\t\t\t=> $this->getTaxonomy(),\n \t\t'Source'\t\t\t=> $this->getSource(),\n \t\t'Refferences'\t\t=> $this->getRefs(),\n \t\t'Comment'\t\t\t=> $this->getComment(),\n \t\t'Features'\t\t\t=> $this->getFeatures(),\n \t\t'Sequence'\t\t\t=> $this->getSequence()\n \t);\n }", "public function associativeArray() {\r\n\r\n if ($this->object->loadRule()) {\r\n $crud = $this->myCRUD();\r\n return $crud->associativeArrayFromEncapsuledObject($this->object);\r\n } else {\r\n return false;\r\n }\r\n }", "public function as_assoc();", "public function toArray()\n\t{\n\t\t$array = parent::toArray();\n\t\t$array['compound_name'] = $this->compound_name;\n\t\treturn $array;\n\t}", "public function getArray() {\n \treturn array(\n \t\t\t'id' => $this->id,\n \t\t\t'name' => $this->name,\n \t\t\t'path' => $this->path,\n \t\t\t'description' => $this->description,\n \t\t\t'version' => $this->version,\n \t\t\t'groups' => $this->groups,\n \t\t\t'enabled' => $this->enabled\n \t);\n }", "private function to_array() {\n\t\t$values = array(\n\t\t\t'id' => $this -> id,\n\t\t\t'name' => $this -> name);\n\t\treturn $values;\n\t}", "public function build()\n {\n return [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $this->token\n ]\n ];\n }", "function to_array() \n {\n $d = array();\n $d[\"id\"] = $this->id;\n $d[\"offset\"] = $this->offset;\n $d[\"title\"] = $this->title;\n $d[\"description\"] = $this->description;\n return $d;\n }", "function getAdditionalValuesAsArray() {\n\t\t$values = parent::getAdditionalValuesAsArray ();\n\t\t$tables = array_keys ($this->owner);\n\t\t$values ['owner'] = Array ();\n\t\tforeach ($tables as $table) {\n\t\t\tforeach ($this->owner [$table] as $id) {\n\t\t\t\t$values ['owner'] [$table] [$id] = $id;\n\t\t\t}\n\t\t}\n\t\t$values ['headerstyle'] = $this->row ['headerstyle'];\n\t\t$values ['bodystyle'] = $this->row ['bodystyle'];\n\t\treturn $values;\n\t}", "public function toArray() {\n\t\treturn array(\n\t\t\t'tagName' => $this->_tagName,\n\t\t\t'description' => esc_html($this->_description),\n\t\t\t'enclosed' => $this->_enclosed,\n\t\t\t'attributes' => $this->_attributes,\n\t\t\t'attributes_keys' => array_keys($this->_attributes),\n\t\t\t'schema' => $this->__schema\n\t\t);\n\t}", "public function as_array(){\n return isset($this->data[$this->alias])? $this->data[$this->alias] : $this->data;\n }", "public function to_array()\r\n {\r\n $d = array();\r\n\r\n if (!empty($this->http_status_code)) {\r\n $d['@http_status_code'] = $this->http_status_code;\r\n }\r\n if (!empty($this->visible_sources)) {\r\n $d['@visible_sources'] = $this->visible_sources;\r\n }\r\n if (!empty($this->available_sources)) {\r\n $d['@available_sources'] = $this->available_sources;\r\n }\r\n if (!empty($this->search_id)) {\r\n $d['@search_id'] = $this->search_id;\r\n }\r\n if (!empty($this->persons_count)) {\r\n $d['@persons_count'] = $this->persons_count;\r\n }\r\n\r\n if (!empty($this->warnings)) {\r\n $d['warnings'] = $this->warnings;\r\n }\r\n if (!empty($this->query)) {\r\n $d['query'] = $this->query->to_array();\r\n }\r\n if (!empty($this->person)) {\r\n $d['person'] = $this->person->to_array();\r\n }\r\n if (!empty($this->possible_persons)) {\r\n $d['possible_persons'] = array();\r\n foreach ($this->possible_persons as $possible_person) {\r\n $d['possible_persons'][] = $possible_person->to_array();\r\n }\r\n }\r\n if (!empty($this->sources)) {\r\n $d['sources'] = array();\r\n foreach ($this->sources as $source) {\r\n $d['sources'][] = $source->to_array();\r\n }\r\n }\r\n\r\n if (!empty($this->available_data)) {\r\n $d['available_data'] = $this->available_data->to_array();\r\n }\r\n\r\n if (!empty($this->match_requirements)) {\r\n $d['match_requirements'] = $this->match_requirements;\r\n }\r\n\r\n return $d;\r\n }", "public function toArray(): array\n {\n $config = [];\n\n if ($this->config->has('key')) {\n $config['key'] = $this->getKey();\n } else {\n $config['key'] = Key::generate($this->getKey(), 'field');\n }\n\n if ($this->config->has('conditional_logic')) {\n $config['conditional_logic'] = $this->getConditionalLogic();\n }\n\n if ($this->config->has('layouts')) {\n $config['layouts'] = $this->getLayouts();\n }\n\n if ($this->config->has('sub_fields')) {\n $config['sub_fields'] = $this->getSubFields();\n }\n\n return array_merge($this->config->toArray(), $config);\n }", "public function buildRuleArray()\n {\n return array('type' => 'Node', 'name' => $this->name);\n }", "public function toArray()\n {\n $arrayForm = array();\n \n if ($this->m_availability_zone != null)\n {\n $arrayForm['AvailabilityZone'] = $this->m_availability_zone;\n }\n \n if ($this->m_group_name != null)\n {\n $arrayForm['GroupName'] = $this->m_group_name;\n }\n \n if ($this->m_tenancy != null)\n {\n $arrayForm['Tenancy'] = $this->m_tenancy;\n }\n \n return $arrayForm;\n }", "public function build()\n {\n if(empty($this->query)) return array(\"\", array());\n return array(\n \" {$this->phrase} \" . join(\" AND \", $this->query),\n $this->bind\n );\n }", "public function as_array() {\n\t\t$result = array(\n\t\t\t'id' \t\t\t\t => $this->_id,\n\t\t\t'country_id' \t => $this->_country_id,\n\t\t\t'name' \t\t\t\t => $this->_name,\n\t\t\t'code' \t\t\t => $this->_code,\n\t\t\t'tax' \t\t\t\t => $this->_tax,\n\t\t);\n\t\treturn $result;\n\t}", "public function toArray()\n {\n $data = [];\n if (isset($this->backgroundColor)) {\n $data['backgroundColor'] =\n $this->backgroundColor instanceof Arrayable\n ? $this->backgroundColor->toArray()\n : $this->backgroundColor;\n }\n if (isset($this->border)) {\n $data['border'] =\n $this->border instanceof Arrayable\n ? $this->border->toArray()\n : $this->border;\n }\n if (isset($this->conditional)) {\n $data['conditional'] = !is_null($this->conditional)\n ? array_reduce(\n array_keys($this->conditional),\n function ($items, $key) {\n $items[$key] =\n $this->conditional[$key] instanceof Arrayable\n ? $this->conditional[$key]->toArray()\n : $this->conditional[$key];\n return $items;\n },\n []\n )\n : $this->conditional;\n }\n if (isset($this->height)) {\n $data['height'] =\n $this->height instanceof Arrayable\n ? $this->height->toArray()\n : $this->height;\n }\n if (isset($this->horizontalAlignment)) {\n $data['horizontalAlignment'] = $this->horizontalAlignment;\n }\n if (isset($this->minimumWidth)) {\n $data['minimumWidth'] =\n $this->minimumWidth instanceof Arrayable\n ? $this->minimumWidth->toArray()\n : $this->minimumWidth;\n }\n if (isset($this->padding)) {\n $data['padding'] =\n $this->padding instanceof Arrayable\n ? $this->padding->toArray()\n : $this->padding;\n }\n if (isset($this->textStyle)) {\n $data['textStyle'] =\n $this->textStyle instanceof Arrayable\n ? $this->textStyle->toArray()\n : $this->textStyle;\n }\n if (isset($this->verticalAlignment)) {\n $data['verticalAlignment'] = $this->verticalAlignment;\n }\n if (isset($this->width)) {\n $data['width'] = $this->width;\n }\n return $data;\n }", "public function toArray(): array\n {\n return [\n 'key' => $this->type,\n 'values' => $this->values,\n 'opt_type' => $this->logic,\n ];\n }", "public function toArray()\n\t{\n\t\t$data = [];\n\t\tforeach ($this->settings() as $setting) {\n\t\t\t$data[$setting->key()] = $setting->value();\n\t\t}\n\t\treturn $data;\n\t}", "private function dataBaseRepresentation() {\n\t\t$array['website'] = $this->website;\n\t\t$array['name'] = $this->name;\n\t\t$array['country'] = $this->country;\n\t\treturn $array;\n\t}", "public function createKeyArray(){\n\t$keyArray = array();\n\tif (isset($this->id)) $keyArray[\"id\"] = $this->id;\n\tif (isset($this->codice_categoria)) $keyArray[\"codice_categoria\"] = $this->codice_categoria;\n\tif (isset($this->codice)) $keyArray[\"codice\"] = $this->codice;\n\tif (isset($this->descrizione)) $keyArray[\"descrizione\"] = $this->descrizione;\n\treturn $keyArray;\n}", "public function safeToArray()\n {\n return array(\n 'id' => $this->getId(),\n 'name' => $this->getName(),\n 'counts' => $this->getCounts()->toArray(),\n 'settings' => $this->getSettings()->safeToArray(),\n 'hasCuratorRole' => $this->hasRole('ROLE_CURATOR'),\n );\n }", "public function toArray()\n {\n return array(\n 'prefix' => $this->prefix,\n 'title' => $this->title,\n 'isdefault' => $this->isdefault,\n );\n }", "private function dataBaseRepresentation() {\n\t\t$array['recipe'] \t\t= $this->recipeId;\n\t\t$array['name'] \t\t\t= $this->name;\n\t\t$array['description'] \t= $this->description;\n\t\t$array['url'] \t\t\t= $this->url;\n\t\treturn $array;\n\t}", "public function toArray()\n {\n $data = parent::toArray();\n if (isset($this->conditions)) {\n $data['conditions'] = !is_null($this->conditions)\n ? array_reduce(\n array_keys($this->conditions),\n function ($items, $key) {\n $items[$key] =\n $this->conditions[$key] instanceof Arrayable\n ? $this->conditions[$key]->toArray()\n : $this->conditions[$key];\n return $items;\n },\n []\n )\n : $this->conditions;\n }\n if (isset($this->backgroundColor)) {\n $data['backgroundColor'] =\n $this->backgroundColor instanceof Arrayable\n ? $this->backgroundColor->toArray()\n : $this->backgroundColor;\n }\n if (isset($this->fontFamily)) {\n $data['fontFamily'] = $this->fontFamily;\n }\n if (isset($this->fontName)) {\n $data['fontName'] = $this->fontName;\n }\n if (isset($this->fontSize)) {\n $data['fontSize'] = $this->fontSize;\n }\n if (isset($this->fontStyle)) {\n $data['fontStyle'] = $this->fontStyle;\n }\n if (isset($this->fontWeight)) {\n $data['fontWeight'] = $this->fontWeight;\n }\n if (isset($this->fontWidth)) {\n $data['fontWidth'] = $this->fontWidth;\n }\n if (isset($this->orderedListItems)) {\n $data['orderedListItems'] =\n $this->orderedListItems instanceof Arrayable\n ? $this->orderedListItems->toArray()\n : $this->orderedListItems;\n }\n if (isset($this->strikethrough)) {\n $data['strikethrough'] =\n $this->strikethrough instanceof Arrayable\n ? $this->strikethrough->toArray()\n : $this->strikethrough;\n }\n if (isset($this->stroke)) {\n $data['stroke'] =\n $this->stroke instanceof Arrayable\n ? $this->stroke->toArray()\n : $this->stroke;\n }\n if (isset($this->textColor)) {\n $data['textColor'] =\n $this->textColor instanceof Arrayable\n ? $this->textColor->toArray()\n : $this->textColor;\n }\n if (isset($this->textShadow)) {\n $data['textShadow'] =\n $this->textShadow instanceof Arrayable\n ? $this->textShadow->toArray()\n : $this->textShadow;\n }\n if (isset($this->textTransform)) {\n $data['textTransform'] = $this->textTransform;\n }\n if (isset($this->tracking)) {\n $data['tracking'] = $this->tracking;\n }\n if (isset($this->underline)) {\n $data['underline'] =\n $this->underline instanceof Arrayable\n ? $this->underline->toArray()\n : $this->underline;\n }\n if (isset($this->unorderedListItems)) {\n $data['unorderedListItems'] =\n $this->unorderedListItems instanceof Arrayable\n ? $this->unorderedListItems->toArray()\n : $this->unorderedListItems;\n }\n if (isset($this->verticalAlignment)) {\n $data['verticalAlignment'] = $this->verticalAlignment;\n }\n return $data;\n }", "public function getBuildings(){\n $buildings = Edificiosauditorios::getAll();\n //$auditorio = Auditorios::getID_AUDIENCE($inuId);\n if (!empty($buildings) || is_array($buildings)) {\n print json_encode($buildings);\n \n } else {\n print json_encode($buildings->toArray());\n }\n }", "public static function get_build()\n {\n }", "function to_array() \n {\n $d = array();\n $d[\"id\"] = $this->id;\n $d[\"offset\"] = $this->offset;\n $d[\"title\"] = $this->title;\n $d[\"description\"] = $this->description;\n $d[\"author\"] = $this->author;\n $d[\"type\"] = $this->type;\n $d[\"updated\"] = $this->updated;\n $d[\"published\"] = $this->published;\n $d[\"publish_time\"] = $this->publish_time;\n $d[\"insert_time\"] = $this->insert_time;\n return $d;\n }", "public function toArray()\n {\n return array(\n 'id' => $this->_id,\n 'name' => $this->_name,\n 'language' => $this->_language,\n 'columnOption' => $this->_columnOption,\n 'specificColumns' => $this->_specificColumns\n );\n }", "private function createArray()\n {\n $this->makeGroupBy()->makeSearch()->normalize();\n }", "public function toArray(){\n $this->buildArray();\n return $this->array;\n }", "public function asContainArray(): array\n {\n $associations = [];\n foreach ($this->_associations as $assoc) {\n $associations += $assoc->asContainArray();\n }\n $config = $this->_config;\n if ($this->_forMatching !== null) {\n $config = ['matching' => $this->_forMatching] + $config;\n }\n\n return [\n $this->_name => [\n 'associations' => $associations,\n 'config' => $config,\n ],\n ];\n }", "public function getArray() {\n return array(\n \"id\" => $this->id, \n \"nombreDepartamento\" => $this->nombre, \n //\"idap\" => $this->idap, \n );\n }", "function getArrayCampos() {\n\t\t$arr = array(\n\t\t\t\"id\"=>$this->id,\n\t\t\t\"idov\"=>$this->idov,\n\t\t\t\"ordinal\"=>$this->ordinal,\n\t\t\t\"visible\"=>$this->visible,\n\t\t\t\"iconoov\"=>$this->iconoov,\n\t\t\t\"name\"=>$this->name,\n\t\t\t\"idov_refered\"=>$this->idov_refered,\n\t\t\t\"idresource_refered\"=>$this->idresource_refered,\n\t\t\t\"type\"=>$this->type\n\t\t);\n\t\treturn $arr;\n\t}", "public function build()\n\t{\n\t\tparent::build();\n\n\t\t$options = $this->suppliedOptions;\n\n\t\t$dataOptions = $options['options'];\n\n\t\t// Check if function\n\t\tif(\\is_callable($dataOptions)){\n\t\t\t$dataOptions = \\call_user_func($dataOptions);\n\t\t}\n\n\t\t$options['options'] = array();\n\n\t\t//iterate over the options to create the options assoc array\n\t\tforeach ($dataOptions as $val => $text)\n\t\t{\n\t\t\t$options['options'][] = array(\n\t\t\t\t'id' => is_numeric($val) && (!array_key_exists('enum_numeric_keys', $options) || $options['enum_numeric_keys'] == false) ? $text : $val,\n\t\t\t\t'text' => $text,\n\t\t\t);\n\t\t}\n\n\t\t$this->suppliedOptions = $options;\n\t}", "public function assoc()\n {\n $array = array(\n 'self' => $this->self\n );\n\n if (isset($this->first)) {\n $array['first'] = $this->first;\n }\n\n if (isset($this->prev)) {\n $array['prev'] = $this->prev;\n }\n\n if (isset($this->next)) {\n $array['next'] = $this->next;\n }\n\n if (isset($this->last)) {\n $array['last'] = $this->last;\n }\n\n return $array;\n }", "function to_array() {\n\t\tif ($this->id_field) {\n\t\t\t$return = array_merge($this->data, array($this->id_field=>$this->id));\n\t\t} else {\n\t\t\t$return = $this->data;\n\t\t}\n\n\t\treturn $return;\n\t}", "public function toArray(): array\n\t{\n\t\treturn [\n\t\t\t'languages' => $this->getLanguages(),\n\t\t\t'views' => $this->getViews(),\n\t\t\t'catalog' => [\n\t\t\t\t'id' => \\CAllCrmCatalog::EnsureDefaultExists(),\n\t\t\t\t'currencies' => $this->getCurrencies(),\n\t\t\t],\n\t\t\t'payment' => $this->getPayment(),\n\t\t\t'document' => $this->getDocument(),\n\t\t\t'callback' => $this->getCallback(),\n\t\t\t'whatsapp' => $this->getWhatsApp(),\n\t\t\t'captcha' => $this->getCaptcha(),\n\t\t\t'templates' => [],\n\t\t\t'personalization' => $this->getPersonalization(),\n\t\t\t'properties' => $this->getProperties(),\n\t\t\t'deps' => $this->getDeps(),\n\t\t\t'sign' => $this->getSign(),\n\t\t\t'restriction' => $this->getRestriction(),\n\t\t\t'product' => [\n\t\t\t\t'isCloud' => Crm\\Integration\\Bitrix24\\Product::isCloud(),\n\t\t\t\t'isRegionRussian' => Crm\\Integration\\Bitrix24\\Product::isRegionRussian(),\n\t\t\t],\n\t\t\t'contentTypes' => [\n\t\t\t\t['id' => 'image/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_IMAGE')],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'x-bx/doc',\n\t\t\t\t\t'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_DOC_MSGVER_1'),\n\t\t\t\t\t'hint' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_DOC_HINT'),\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'x-bx/arc',\n\t\t\t\t\t'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_ARCHIVE'),\n\t\t\t\t\t'hint' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_ARCHIVE_HINT'),\n\t\t\t\t],\n\t\t\t\t['id' => 'audio/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_AUDIO')],\n\t\t\t\t['id' => 'video/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_VIDEO')],\n\t\t\t],\n\t\t\t'defaultMaxFileFieldSizeMbValue' => Main\\Config\\Option::get('crm', '~webform_default_max_file_field_size_mb', 1000),\n\t\t\t'dailyFileLimitSizeMbValue' => WebForm\\Limitations\\DailyFileUploadLimit::instance()->getLimit(),\n\t\t\t'integration' => $this->getIntegration(),\n\t\t\t'scenarios' => Main\\DI\\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getScenarioList(),\n\t\t\t'scenarioCategories' => Main\\DI\\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getScenarioCategoryList(),\n\t\t\t'sidebarButtons' => Main\\DI\\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getSidebarMenuItems(),\n\t\t];\n\t}", "function get(){\n $array = array();\n foreach($this as $atributo => $valor){\n $array[$atributo] = $valor;\n }\n return $array;\n }", "public function create_depts_array()\n {\n // return debug($a);\n // die;\n return array('Apps'=>array('kitchen_ken', 'smith_diedra', 'tiller_don', 'farned_v', 'scott_a', 'fryar_n', 'kyles_d', 'rrios' ),'Network'=>array('churst', 'cook_t', 'csoborowicz', 'sewell_jason'),'Systems'=>array('jstakich', 'sheppard_d', 'jpeel'));\n }", "public function to_array()\n\t{\n\t\treturn array(\n\t\t\t'id'\t\t=> $this->get_id(),\n\t\t\t'label'\t\t=> $this->get_label()\n\t\t);\n\t}", "public function toArray() {\n $branch = array(\n 'id' => $this->getId(),\n 'area' => $this->getArea(),\n 'address' => array(\n 'text' => $this->getAddressText(),\n 'latitude' => $this->getAddressLatitude(),\n 'logitude' => $this->getAddressLongitude()\n )\n );\n return $branch;\n }", "public function toArray() {\n\t\t\t\n\t\t\treturn array_merge(get_object_vars($this), array(\n\t\t\t\t'base' => $this->getBase()\n\t\t\t));\n \t\t\n\t\t}", "function _buildArray() {\n\t$trunk = array();\n\n\tif (!isset($this->_indentSort[0])) {\n\t\treturn $trunk;\n\t}\n\n\tforeach ($this->_indentSort[0] as $n) {\n\t\tif (empty($n->parent)) {\n\t\t$this->_nodeArrayizeData($n);\n\t\t// Check for references and copy the needed data to complete them.\n\t\t$this->_makeReferences($n);\n\t\t// Merge our data with the big array we're building\n\t\t$trunk = $this->_array_kmerge($trunk,$n->data);\n\t\t}\n\t}\n\n\treturn $trunk;\n\t}", "public function arrayStructure()\n\t{\n\t\treturn array();\n\t}", "public function get_banner_setting_data_as_array() {\n\n\t\treturn array(\n\t\t\t'buttonTextColor' => $this->button_text_color,\n\t\t\t'buttonBackgroundColor' => $this->button_background_color,\n\t\t\t'publishStatus' => $this->publish_status,\n\t\t\t'lastPublished' => $this->last_published,\n\t\t\t'otLogo' => $this->ot_logo,\n\t\t\t'DisplayPosition' => $this->display_position,\n\t\t\t'headerTextcolor' => $this->header_text_color,\n\t\t\t'headerBackgroundcolor' => $this->header_background_color,\n\t\t\t'isButtonEnabled'\t \t=> $this->floating_button,\n\t\t\t'isLinkEnabled'\t\t\t=> $this->isLinkEnabled\n\t\t);\n\t}", "public function objectify(){ return array( 'aID' => $this->ulA()->ID, 'bID' => $this->ulB()->ID, 'connection' => $this->connection() ); }", "function getAllRoomsByBuilding(){\r\n $common = new \\Cars\\Data\\Common($this->app);\r\n $blds = $common->getBuildingAbbreviations();\r\n\r\n $output = array();\r\n foreach ($blds as $bld => $bldData) {\r\n $rooms = $common->getRoomsByBuilding($bldData[\"building_abbreviation\"]);\r\n foreach ($rooms as $room => $val) {\r\n $output[$bldData[\"building_abbreviation\"]][$val[\"room_number\"]] = $val;\r\n }\r\n }\r\n\r\n return $output;\r\n }", "protected function build()\n {\n if ($this->initialized)\n return $this;\n\n $this->initialized = true;\n\n return $this->mapGlobals()->mapColumns()->mapSorting();\n }", "public function generateArray()\r\n\t{\t\r\n\t\t$data = array('logID'=>$this->logID,'text'=>$this->Text,'timestamp'=>$this->timestamp, 'textid'=>$this->textID);\r\n\t\tif($this->user!=null)\r\n\t\t\t$data['user'] = $this->user->generateArray();\r\n\t\tif($this->building!=null)\r\n\t\t\t$data['building'] = $this->building->generateArray('normal');\r\n\t\tif($this->card!=null)\r\n\t\t\t$data['card']=$this->card->generateArray();\r\n\t\tif($this->location!=null)\r\n\t\t\t$data['location']=$this->location->generateArray();\r\n\t\tif($this->icon!=null)\r\n\t\t\t$data['icon']=$this->icon;\r\n\t\tif($this->game!=null)\r\n\t\t\t$data['game']=$this->game;\r\n\t\treturn $data;\r\n\t\r\n\t}", "public function toArray()\n {\n $array = array();\n $array['id'] = md5(self::SEARCH_TYPE.$this->attribute('id'));\n $array['entity_id'] = $this->attribute('id');\n $array['parent_id'] = $this->attribute('node_id');\n $array['type'] = self::SEARCH_TYPE;\n $array['url'] = $this->urlAlias();\n $array['language_code'] = $this->languageCode();\n $array['content'] = $this->attribute('content');\n $array['published'] = $this->attribute('published');\n $array['modified'] = $this->attribute('modified');\n return $array;\n }", "abstract public function build();", "abstract public function build();", "public function toArray() {\n\t\treturn array(\n\t\t\t'name' => $this->config['name'],\n\t\t\t'hops' => $this->config['hops'],\n\t\t\t'prices' => $this->prices\n\t\t);\n\t}", "public function toArray()\n {\n return array(\n 'name' => $this->getName(),\n 'phone' => $this->getPhone(),\n 'address' => $this->getAddress() ? $this->getAddress()->toArray() : null\n );\n }", "public function toArray(): array\n {\n return $this->getStructure();\n }", "public abstract function build();", "public abstract function build();", "public static function createStructure():array\n {\n\n\n foreach (self::$categories as $parent){\n\n if (!array_key_exists($parent['parent_id'], self::$structure)){\n\n foreach (self::$categories as $row){\n if ($parent['parent_id'] == $row['parent_id']){\n self::$structure[$parent['parent_id']][] = $row;\n }\n }\n\n }\n }\n return self::$structure;\n\n\n }", "public static function toArray() {\n return [\n 'name' => static::getName(),\n 'identifier' => static::getIdentifier()\n ];\n }", "public function generateArray()\n {\n return $this->getProperties();\n }", "function to_array() {\r\n\t\t$out = array();\r\n\t\t\r\n\t\tforeach($this->input as $item) {\r\n\t\t\t$out[$item['name']] = $item['value'];\r\n\t\t}\r\n\t\t\r\n\t\treturn $out;\r\n\t}", "public function build() {}", "public function build() {}", "public function build() {}", "public function toArray(): array\n\t{\n\t\treturn\n\t\t\t[\n\t\t\t\t\"id\" => $this->getId(),\n\t\t\t\t\"name\" => $this->name,\n\t\t\t\t\"completable\" => $this->completable,\n\t\t\t\t\"classes\" => $this->classes\n\t\t\t];\n\t}", "protected function buildAudienceData() : array\n {\n // Data container\n $audience = [];\n\n // Add target channnels\n if (!empty($this->getChannels())) {\n $audience['tag'] = $this->getChannels();\n }\n\n // Add target aliases\n if (!empty($this->getAliases())) {\n foreach ($this->getAliases() as $alias) {\n $audience['alias'][] = $alias;\n }\n }\n\n // Add named user targets\n if (!empty($this->getNamedUsers())) {\n foreach ($this->getNamedUsers() as $namedUser) {\n $audience['named_user'][] = $namedUser;\n }\n }\n\n return $audience;\n }", "public static function building(){\n return [\n 'name' => 'nullable|string|max:255|unique:buildings',\n 'number' => 'required|string|max:10|unique:buildings',\n 'number_of_offices' => 'required|integer',\n 'description' => 'nullable|string',\n ];\n }" ]
[ "0.70043975", "0.70043975", "0.6835524", "0.63532203", "0.6292932", "0.6268556", "0.6268556", "0.62670064", "0.6239448", "0.62105656", "0.6057756", "0.59609956", "0.5943512", "0.591603", "0.5912895", "0.59085304", "0.5861741", "0.58555406", "0.58459735", "0.5838731", "0.5838731", "0.5838731", "0.5838731", "0.5838731", "0.5838731", "0.5838731", "0.5830752", "0.58190393", "0.5805784", "0.5797975", "0.57892126", "0.5787767", "0.578342", "0.57691175", "0.5760704", "0.5753005", "0.5752337", "0.5736604", "0.5735456", "0.57243216", "0.5709911", "0.5708948", "0.5701003", "0.56898564", "0.56860036", "0.5683193", "0.5681343", "0.56745595", "0.56717414", "0.5647436", "0.56464964", "0.5638455", "0.56295973", "0.56285757", "0.5626566", "0.562391", "0.56162095", "0.5610384", "0.5605925", "0.5594671", "0.5590115", "0.558881", "0.55865794", "0.5586003", "0.55844015", "0.55839217", "0.558191", "0.5575388", "0.5560558", "0.55602705", "0.55601615", "0.55600226", "0.55511975", "0.5542417", "0.55420524", "0.5540683", "0.55393195", "0.5536887", "0.5536806", "0.5530168", "0.55227405", "0.5517071", "0.55161697", "0.55127287", "0.55127287", "0.551097", "0.55004066", "0.54996544", "0.5499062", "0.5499062", "0.5497497", "0.54913217", "0.5485081", "0.54810464", "0.5476925", "0.5476925", "0.54767424", "0.5476203", "0.54739213", "0.54726285" ]
0.5777218
33
Gets the invoice number.
public function getInvoiceNumber();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInvoiceNumber()\n {\n return $this->invoice_number;\n }", "public function getInvoiceNo()\n {\n return $this->invoice_no;\n }", "public function invoiceNumberGet(){\n\t\t$query = $this->db->get(__TBL_INVOICE_NUMBER);\n\t\tif(sizeof($query->row())>0) {\n\t\t\treturn (int)$query->row()->number;\n\t\t} else return false;\n\t}", "public function getInvoiceID()\n {\n return $this->invoiceID;\n }", "public function getInvoiceNumber(){\n return $this->getParameter('invoice_number');\n }", "public function getInvoiceID()\n {\n return $this->_invoiceID;\n }", "public function getInvoiceNumber(): string\n {\n return sprintf('R-%1$02d%2$03d', $this->getInvoiceYear(), $this->id);\n }", "public function getInvoiceID(){\n return $this->InvoiceID;\n }", "public function setInvoiceNumber()\n { \n // get next number according to invoicetype\n return $this->bean->name = $this->bean->invoicetype()->nextSerial();\n }", "public function getInvoiceId()\n {\n if (array_key_exists(\"invoiceId\", $this->_propDict)) {\n return $this->_propDict[\"invoiceId\"];\n } else {\n return null;\n }\n }", "public function getInvoice()\n {\n return $this->_coreRegistry->registry('current_invoice');\n }", "public function findInvoiceId() {\n\t\treturn $this->request->getFiltered('ok_invoice'); \n\t}", "public function getPurchaseInvoiceID()\n {\n return $this->purchaseInvoiceID;\n }", "public function invoice_id(){\n return parent::get_fk_object(\"invoice_id\");\n }", "public function sGetOrderNumber()\n {\n $number = $this->numberRangeIncrementer->increment('invoice');\n $number = $this->eventManager->filter(\n 'Shopware_Modules_Order_GetOrdernumber_FilterOrdernumber',\n $number,\n ['subject' => $this]\n );\n\n return (string) $number;\n }", "public function getInvoice_counter()\n {\n return $this->fv_invoice_counter;\n }", "public function generateInvoiceNumber()\n {\n $orderRepo = EntityUtils::getRepository('Order');\n $orderCount = $orderRepo->getOrderCountBeforeDate($this->program->id, $this->order_date);\n $year = chr(date('Y') - 1913);\n $month = date('m');\n $day = date('d') + $orderCount;\n if ($day < 10) {\n $day = \"0\" . $day;\n }\n $monthDay = $month . $day;\n\n $invoiceNumber = $this->program->customer_id . $year . $monthDay;\n\n //Make sure the generated invoice number does not already exist, if it does, increment and try again\n while ($orderRepo->findOneBy(array(\"invoice_number\" => $invoiceNumber))) {\n $monthDay++;\n\n //Tack on a leading zero if we don't have 4 digits\n if ($monthDay < 1000) {\n $monthDay = \"0\" . $monthDay;\n }\n\n $invoiceNumber = $this->program->customer_id . $year . $monthDay;\n }\n\n $this->invoice_number = $invoiceNumber;\n return $this->invoice_number;\n }", "public function get_amountInvoice() {\n return $this->amountInvoice;\n }", "public function getFullInvoiceNumber()\n {\n return sprintf(\n '%s/%s/%s',\n $this->getInvoiceNumber(),\n $this->getBusinessLocationCode(),\n $this->getPaymentDeviceCode()\n );\n }", "public function generateAndSetInvoiceNumber();", "private function getInvoiceOrderId() {\n $config = Svea\\SveaConfig::getDefaultConfig();\n $request = WebPay::createOrder($config)\n ->addOrderRow(TestUtil::createOrderRow())\n ->addCustomerDetails(WebPayItem::individualCustomer()->setNationalIdNumber(194605092222))\n ->setCountryCode(\"SE\")\n ->setCustomerReference(\"33\")\n ->setOrderDate(\"2012-12-12\")\n ->setCurrency(\"SEK\")\n ->useInvoicePayment()// returnerar InvoiceOrder object\n //->setPasswordBasedAuthorization(\"sverigetest\", \"sverigetest\", 79021)\n ->doRequest();\n\n return $request->sveaOrderId;\n }", "private function getInvoiceAmount()\n {\n $sql = 'SELECT invoice_amount FROM s_order WHERE id = ?';\n\n return Shopware()->Db()->fetchOne($sql, ['15315351']);\n }", "public function getNewCustomerInvoice(){\n\t\t// $invoice_counter = \\DB::table('appsetting')->where('name','invoice_counter')->first()->value;\n\t\t// $invoice_number = 'INV/' . date('Y') . '/000' . $invoice_counter++;\n\t\t// // update invoice counter\n\t\t// \\DB::table('appsetting')->where('name','invoice_counter')->update(['value'=>$invoice_counter]);\n\n\t\treturn Helper::GenerateCustomerInvoiceNumber();\n\t}", "private function getOrderNumber()\n {\n $number = Shopware()->Db()->fetchOne(\"/*NO LIMIT*/ SELECT number FROM s_order_number WHERE name='invoice' FOR UPDATE\");\n Shopware()->Db()->executeUpdate(\"UPDATE s_order_number SET number = number + 1 WHERE name='invoice'\");\n $number += 1;\n\n return $number;\n }", "public function getShntinvoice()\n {\n return $this->shntinvoice;\n }", "public function getReceiptNo()\n {\n return $this->receipt_no;\n }", "public function getInvoiceAmount()\n {\n if (array_key_exists(\"invoiceAmount\", $this->_propDict)) {\n return $this->_propDict[\"invoiceAmount\"];\n } else {\n return null;\n }\n }", "public function getPurchaseOrderNumber();", "public function getInvoiceInfo()\n {\n return $this->get(self::INVOICEINFO);\n }", "public function getInvoiceItemId(): ?int\n {\n return $this->invoiceItemId;\n }", "public function getNumber(){\n if ( is_null($this->number) ){\n $number = $this->getTable()->getNextBillingNumber($this->getCourier(), 'rest');\n $this->number = \"R-\".date('y',$this->from).date('m',$this->from).\"-\".$this->getCourier()->getCustomerNr().\"-\".$number;\n }\n return $this->number;\n }", "public function getInvoice($_ID)\n {\n return $this->getUnique(\"invoices\", $_ID);\n }", "public function getInvoiceUrl()\n {\n if (array_key_exists(\"invoiceUrl\", $this->_propDict)) {\n return $this->_propDict[\"invoiceUrl\"];\n } else {\n return null;\n }\n }", "public function getOrderNumber();", "public function getOrderNumber();", "public function getNumber() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->orderNumber;\r\n\t}", "public function getInvoice()\n {\n\n $CfdiId = 'ab9PC44sxbs2LUYaGCTm-g2';\n\n $params = [\n 'type' => 'issued',\n ];\n\n $result = $this->facturama->get('Cfdi/' . $CfdiId, $params);\n return $result;\n }", "public function create_invoice_number()\n\t{\n\t\t//select product code\n\t\t$this->db->from('invoice');\n\t\t$this->db->where(\"invoice_number LIKE 'IOD-INV-\".date('y').\"-%'\");\n\t\t$this->db->select('MAX(invoice_number) AS number');\n\t\t$query = $this->db->get();\n\t\t$preffix = \"IODk/\";\n\t\t\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\t$result = $query->result();\n\t\t\t$number = $result[0]->number;\n\t\t\t$real_number = str_replace($preffix, \"\", $number);\n\t\t\t$real_number++;//go to the next number\n\t\t\t$number = $preffix.sprintf('%04d', $real_number);\n\t\t}\n\t\telse{//start generating receipt numbers\n\t\t\t$number = $preffix.sprintf('%04d', 1);\n\t\t}\n\t\t\n\t\treturn $number.'/'.date('Y');\n\t}", "public function get_invoice()\n\t{\t\t\n\t\t$invoiceid = Input::get('invoiceid');\n\t\t$invoice_job = DB::table('tbl_invoices')->where('invoice_number','=',$invoiceid)->first();\n\t\tif(!empty($invoice_job))\n\t\t{\n\t\t\t$ser_id=$invoice_job->customer_id;\n\t\t\t$grand_total=$invoice_job->grand_total;\n\t\t\t$paid_amount=$invoice_job->paid_amount;\n\t\t\t$total=$grand_total - $paid_amount ;\n\t\t\treturn array($ser_id, $total);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 01;\n\t\t}\n\t}", "public function getPurchaseInvoicesId()\n {\n return $this->purchase_invoices_id;\n }", "public function getInvoiceDetails()\n {\n return $this->invoiceDetails;\n }", "public function invoice(){\n\t\treturn Hash::make(\"12345\");\n\t\t$inv = Invoice::where('id','1')->first();\n\t\tprint_r($inv->json);\n\t\treturn 0;\n\t}", "public function getOrderNo()\n {\n return $this->order_no;\n }", "public static function getInvoiceNumber($branch_id=null)\n {\n DB::beginTransaction();\n\n\n\n\n if($branch_id)\n {\n // $sucursal = Branch::find($branch_id);\n $sucursal = DB::table('branches')->where('id',$branch_id)->lockForUpdate()->first();\n }\n else{\n\n // $sucursal = Branch::find(Session::get('branch_id'));\n $sucursal = DB::table('branches')->where('id',Session::get('branch_id'))->lockForUpdate()->first();\n }\n $numeroFacturado = $sucursal->invoice_number_counter;\n // $numeroFacturado = $sucursal->invoice_number_counter;\n DB::table('branches')\n ->where('id', $sucursal->id)\n ->update(array('invoice_number_counter' => $numeroFacturado+1));\n // $sucursal->invoice_number_counter= $sucursal->invoice_number_counter+1;\n // $sucursal->save();\n \n DB::commit();\n \n return $numeroFacturado;\n }", "public function getInvoiceOrder();", "public function get_last_invoice_insider()\n {\n return $this->db->select('invoice_no')->order_by('sr_no','desc')->limit(1)->get('insider_bill')->row(); \n }", "public function invoiceNumberRollback(){\n\t\t$this->db->query(\"LOCK TABLES `\" . __TBL_INVOICE_NUMBER . \"` WRITE\");\n\t\tif($this->invoiceNumberGet()){\n\t\t\t$newinvoice = $this->invoiceNumberGet()-1;\n\t\t\t$this->db->update(__TBL_INVOICE_NUMBER, array(\"number\"=>$newinvoice));\n\t\t\t$this->db->query(\"UNLOCK TABLES\");\n\t\t\treturn $newinvoice;\n\t\t}\n\t}", "public function getCurrentInvoice () {\n $pendingInvoice = $this->getPendingInvoice();\n\n if ($pendingInvoice instanceof invoice) return $pendingInvoice;\n\n $invoice = new invoice(array(\"uid_empresa\" => $this->getUID()), NULL);\n\n return $invoice;\n }", "public function getOrderno()\n {\n return $this->orderno;\n }", "public function getOrderItemNumber() {\n\t\treturn $this->orderItemNumber;\n\t}", "public function getNumero()\n {\n return $this->numero;\n }", "public function getCheckoutPurchaseOrderNo();", "public function getKlarnaInvoiceNumberInfo() {\n global $purchase_log;\n\n if(strpos($purchase_log['gateway'], 'wpsc_merchant_klarna') !== false && isset($purchase_log['transactid']))\n return '<em>' . str_replace('(xx)', $purchase_log['transactid'], $this->fetchFromLanguagePack('INVOICE_CREATED_SUCCESSFULLY')) . '</em>';\n }", "public static function getLastInvoice() {\r\n \t\r\n \t// Check if a year is passed\r\n \tself::checkSettings();\r\n \t\r\n $record = Doctrine_Query::create ()\r\n ->select ( 'next_number' )\r\n ->from ( 'InvoicesSettings is' )\r\n ->where('is.year = ?', date('Y'))\r\n\t\t\t\t->andWhere('is.isp_id = ?',Shineisp_Registry::get('ISP')->isp_id)\r\n ->limit ( 1 )\r\n\t\t\t\t->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\r\n\r\n if (count ( $record ) > 0) {\r\n return $record[0] ['next_number'];\r\n } else {\r\n return 1;\r\n }\r\n }", "public function getNumero() {\n return $this->numero;\n }", "public function getRefNo()\n {\n return $this->ref_no;\n }", "public function invoiceNumberUp(){\n\t\t$this->db->query(\"LOCK TABLES `\" . __TBL_INVOICE_NUMBER . \"` WRITE\");\n\t\tif($this->invoiceNumberGet()){\n\t\t\t$newinvoice = $this->invoiceNumberGet()+1;\n\t\t\t$this->db->update(__TBL_INVOICE_NUMBER, array(\"number\"=>$newinvoice));\n\t\t\t$this->db->query(\"UNLOCK TABLES\");\n\t\t\treturn $newinvoice;\n\t\t} else {\n\t\t\t$this->db->insert(__TBL_INVOICE_NUMBER, array(\"number\"=>$this->_start_invoice_number));\n\t\t\t$this->db->query(\"UNLOCK TABLES\");\n\t\t\treturn $this->_start_invoice_number;\n\t\t}\n\t}", "public function getPurchaseOrderNumber()\n {\n return isset($this->purchase_order_number) ? $this->purchase_order_number : null;\n }", "public function getRefNumber()\n\t{\n\t\treturn $this->get('RefNumber');\n\t}", "function getNumero() {\n return $this->numero;\n }", "public static function getFullLastInvoiceNumber(){\n\t\t//Get Default Number\n\t\t$def = 0;\n\t\t$defnumber = SettingInvoiceReport::model()->findByAttributes(array(\"field_name\"=>\"Default Invoice Number\"));\n\t\tif($defnumber != null){\n\t\t\t$def = $defnumber->field_value*1;\n\t\t}\n\t\t\n\t\treturn $def + InvoiceDB::getLastInvoiceNumber();\n\t}", "public function getInvoiceData()\n {\n return Mage::getSingleton('core/session')->getData(\"invoice\");\n }", "public function getRefNo()\n {\n return $this->refNo;\n }", "public function getRefNo()\n {\n return $this->refNo;\n }", "public function getLatestInvoiceId()\n {\n $invoice = JobInvoice::join(DB::raw('(SELECT jobs.id, company_id from jobs)AS jobs'), 'jobs.id', '=', 'job_invoices.job_id')\n ->where('jobs.company_id', getScopeId())\n ->orderBy('job_invoices.id', 'desc')\n ->select('job_invoices.id')\n ->first();\n\n return ($invoice) ? $invoice->id : 0;\n }", "public function getNUMEROINT()\r\n {\r\n return $this->NUMERO_INT;\r\n }", "public function getLastInvoiceAmount()\n {\n return $this->lastInvoiceAmount;\n }", "public function getNumero() {\n return $this->sNumero;\n }", "public function getOrderNumber()\n {\n return $this->OrderNumber;\n }", "public function getFormattedInvoiceIdAttribute() {\n return runtimeInvoiceIdFormat($this->payment_invoiceid);\n }", "public function getInvoice($invoiceId);", "public function getParentInvoiceId()\n {\n return $this->getParameter('parentInvoiceId');\n }", "public function get_number()\n\t{\n\t\treturn $this->number;\n\t}", "public function getOrderNumber()\n {\n return $this->orderNumber;\n }", "public function getOrderNumber()\n {\n return $this->orderNumber;\n }", "public function getOrderNumber()\n {\n return $this->orderNumber;\n }", "public function getAccountNo()\n {\n return $this->accountNo;\n }", "function getCustomerNo() {\n return $this->customerNo;\n }", "public function getInvCode()\n {\n return $this->inv_code;\n }", "public function setInvoiceNo($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->invoice_no !== $v) {\n $this->invoice_no = $v;\n $this->modifiedColumns[KluBillTableMap::COL_INVOICE_NO] = true;\n }\n\n return $this;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "protected function getFunction()\n {\n return 'fetchInvoiceNumbers';\n }", "public function getOrderNumber()\n {\n return array_key_exists('OrderNumber', $this->data) ? $this->data['OrderNumber'] : null;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getAccountNo()\n {\n return $this->account_no;\n }", "function getNota_num()\n {\n if (!isset($this->inota_num) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_num;\n }", "function getNota_num()\n {\n if (!isset($this->inota_num) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_num;\n }", "public function setInvoiceNumber($value){\n return $this->setParameter('invoice_number', $value);\n }", "public function getNumber()\n {\n return $this->getData(self::NUMBER);\n }" ]
[ "0.8989883", "0.8889355", "0.82391787", "0.817727", "0.8126336", "0.8003016", "0.7888845", "0.7799404", "0.7781578", "0.7670661", "0.76130754", "0.75176215", "0.7414525", "0.73563915", "0.72741866", "0.7269154", "0.722487", "0.7197459", "0.7121563", "0.7044087", "0.7032775", "0.7029474", "0.69022816", "0.6886104", "0.68343246", "0.67554176", "0.6747302", "0.6716244", "0.67037743", "0.66846216", "0.66560626", "0.66535306", "0.664187", "0.66086465", "0.66086465", "0.6568184", "0.65584457", "0.6543429", "0.6541909", "0.65328836", "0.65261155", "0.64905167", "0.6465389", "0.6455928", "0.64550245", "0.64516366", "0.6448318", "0.6440937", "0.6438589", "0.64366424", "0.643259", "0.64276713", "0.6425076", "0.63893205", "0.63872856", "0.6347817", "0.6331971", "0.6328635", "0.6322509", "0.63007635", "0.6274979", "0.62629133", "0.6256508", "0.6256508", "0.6254692", "0.6231816", "0.6197872", "0.61758065", "0.61750424", "0.6173481", "0.6168335", "0.61624837", "0.6162292", "0.61588264", "0.61588264", "0.61588264", "0.6139747", "0.6112329", "0.61052674", "0.6090937", "0.60892427", "0.60892427", "0.60892427", "0.60892427", "0.60892427", "0.60892427", "0.60892427", "0.60892427", "0.60892427", "0.60892427", "0.60892427", "0.60892427", "0.6086361", "0.6069894", "0.60643995", "0.60398865", "0.60343856", "0.60343856", "0.6034163", "0.60243344" ]
0.8861682
2
Gets the invoice timestamp.
public function getInvoiceTimestamp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInvoiceDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->invoiceDate;\r\n\t}", "function getTimestamp() {\r\r\n\t\treturn $this->timestamp;\r\r\n\t}", "public function getTimestamp();", "public function getTimestamp();", "public function getTimestamp();", "public function getTimestamp()\n\t{\n\t\treturn $this->getValue('timestamp');\n\t}", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n { return $this->get('timestamp'); }", "public function getTimestamp() {\n return $this->timestamp;\n }", "public function getTimestamp() {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "private function getTimestamp() {\n\t$dateTime = new DateTime('now', new DateTimeZone(self::TIME_ZONE));\n\treturn $dateTime->format(self::DATE_FORMAT);\n }", "public function getTimestamp() \n\t{\n\t\treturn $this->timestamp;\n\t}", "function getTimestamp() {\n return $this->time_stamp;\n }", "public function getTimestamp()\n {\n return $this->_timestamp;\n }", "public function getTimestamp()\n {\n return $this->proxyBase->timestamp;\n }", "public function getTimestamp() {\n\n return $this->timestamp;\n }", "public function getTimestamp()\n\t\t\t{\n\t\t\t\treturn $this->timestamp;\n\t\t\t}", "public function getTimestamp()\n {\n return $this->dateIssued->getTimestamp();\n }", "public function getTimestamp()\r\n {\r\n return $this->_timestamp;\r\n }", "public function getTimestamp(){\n\t\treturn $this->_timestamp;\n\t}", "public function getTimestamp()\n\t{\n\t\treturn $this->_timestamp;\n\t}", "public function getTimestamp()\n {\n return $this->baseEvent->getTimestamp();\n }", "public function getTimestamp()\n {\n }", "public function getTimeStamp() {\n return $this->timestamp;\n }", "public static function getTimestamp(){\r\n\t\treturn time();\r\n\t}", "public function getTimeStamp()\n\t{\n\t\treturn $this->_current_timestamp;\n\t}", "public function getEventTimestamp();", "private function getTimestamp()\n {\n $originalTime = microtime(true);\n $micro = sprintf(\"%06d\", ($originalTime - floor($originalTime)) * 1000000);\n $date = new DateTime(date('Y-m-d H:i:s.'.$micro, $originalTime));\n\n return $date->format($this->config['dateFormat']);\n }", "public function getTimestamp()\n {\n return time();\n }", "public function getTimestamp() { \n\t\tif ($this->change) {\n\t\t\t$this->_calc();\n\t\t}\n\t\t\n\t\treturn $this->timestamp; \n\t}", "public function getTimeStamp() {\n\t\treturn $this->timeStamp;\n\t}", "private static function timeStamp() {\n return date(\"Y-m-d H:i:s\");\n }", "public static function curTimestamp()\n {\n return date_timestamp_get(new DateTime());\n }", "public function getTimestamp()\n {\n return $this->currentMonth[0];\n }", "protected function getTimeStamp(){\n\t\t$result = $this->getFile()->getProperty('tstamp');\n\t\tif ($this->processedFile) {\n\t\t\t$result = $this->processedFile->getProperty('tstamp');\n\t\t}\n\t\treturn $result;\n\t}", "public function expirationTimestamp()\n {\n if ($this->expiration instanceof \\DateTime) {\n return $this->expiration->getTimestamp();\n }\n }", "protected static function getTimestamp()\n\t{\n\t\treturn date(\"Y-m-d H:00:00\");\n\t}", "public function getTime()\n {\n return date('c', strtotime($this->data['payment_date']));\n }", "public function getInvdate()\n {\n return $this->invdate;\n }", "protected function getTimestamp()\r\n {\r\n return gmdate(\"Y-m-d\\TH:i:s.\\\\0\\\\0\\\\0\\\\Z\", time());\r\n }", "public function getTimestamp(): int;", "public function getTimestamp(): int;", "protected function getTimeStamp() {\n return time().' ('.strftime( '%Y.%m.%d %H:%I:%S', time() ).')';\n }", "public function getDocTime()\n {\n return $this->doc_time;\n }", "public function getInvoiceDate()\n {\n if (array_key_exists(\"invoiceDate\", $this->_propDict)) {\n if (is_a($this->_propDict[\"invoiceDate\"], \"\\Beta\\Microsoft\\Graph\\Model\\DateTimeTimeZone\") || is_null($this->_propDict[\"invoiceDate\"])) {\n return $this->_propDict[\"invoiceDate\"];\n } else {\n $this->_propDict[\"invoiceDate\"] = new DateTimeTimeZone($this->_propDict[\"invoiceDate\"]);\n return $this->_propDict[\"invoiceDate\"];\n }\n }\n return null;\n }", "function timeStamp()\n {\n return date(\"YmdHis\");\n }", "public function getTstamp()\n {\n return $this->tstamp;\n }", "public static function timestamp(){\n $timestamp = time();\n return $timestamp;\n }", "public function getDateInTimestamp(){\n $defaultTimeZone = date_default_timezone_get();\n date_default_timezone_set(Mage::getStoreConfig('general/locale/timezone'));\n $timestamp = strtotime($this->_getData('date'));\n date_default_timezone_set($defaultTimeZone);\n return $timestamp;\n }", "public function getEventTime()\n {\n return $this->event_time;\n }", "public function getEventTime()\n {\n return $this->event_time;\n }", "public function getTstamp() {\n\t\treturn $this->tstamp;\n\t}", "public function getTimestamp()\n {\n return (int) floor(microtime(true) / $this->keyRegeneration);\n }", "public function getTimestamp()\n {\n return $this->server['REQUEST_TIME'];\n }", "private static function timestamp(){\n date_default_timezone_set('Africa/Nairobi');\n $time = time();\n return date(\"Y-m-d G:i:s\", $time);\n }", "public function timestamp();", "public function getStartTimestamp() {}", "function get_date_of_previous_invoice() {\n\t\tforeach ($this->get_calendar_events(time()-(86400 * 90), time()) as $event) {\n\t\t\tif (preg_match($this->config['calendar_entry'], $event->title->text, $m)) {\n\t\t\t\tforeach ($event->when as $when) {\n\t\t\t\t\treturn substr($when->startTime,0,10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdie(\"Unable to find a previous invoice entry in the calendar.\\n\");\n\t}", "public function getInvoiceProcessingTime()\n {\n return $this->invoiceProcessingTime;\n }", "public function _getTimestamp()\n {\n $DateTime = new DateTime($this->_getDatePublish());\n return $DateTime->getTimestamp();\n }", "public function getCheckinTimeStamp()\n\t{\n\t\treturn $this->checkin;\n\t}", "public function getRevisionTime()\n {\n return $this->revisionTime;\n }", "function getTime()\n {\n return date('Y-m-d H:i:s', $this->model->getTime());\n }", "protected function getTimeStamp()\n {\n return time() . ' (' . strftime('%Y.%m.%d %H:%I:%S', time()) . ')';\n }", "abstract public function getTstamp();", "static public function timestamp()\r\n {\r\n $output = date('Y-m-d H:i:s', time());\r\n return $output;\r\n }", "public function getTimestamp() : float\n {\n return $this->timestamp;\n }", "public function getOffer_timestamp()\n {\n return $this->offer_timestamp;\n }", "public function getTimestamp()\n {\n return strtotime($this->getValue());\n }", "public function get() {\n\t\treturn (new \\DateTime)->getTimestamp()*1000;\n\t}", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTime()\n {\n return $this->time;\n }", "public function getTimestampSent(): string\n {\n $temp=$this->timestampSent;\n return $temp->format('D H:i');\n }", "public static function timestamp() {}", "public function getStamp()\n {\n return $this->_list->getStamp();\n }", "public function getStamp()\n {\n return $this->_list->getStamp();\n }", "public function getTime()\n {\n return $this->get(self::TIME);\n }", "function getDateTime(){\r\n return date('jS F Y\\, g:ia',$this->timestamp);\r\n }", "public function getCurrent() {\r\n $currentDate = new \\DateTime();\r\n return $currentDate->getTimestamp();\r\n }" ]
[ "0.70949066", "0.70701075", "0.70630103", "0.70630103", "0.70630103", "0.70532495", "0.7046818", "0.7046818", "0.7046818", "0.7046818", "0.7046818", "0.7046818", "0.7046818", "0.7046818", "0.7046818", "0.7046818", "0.7046818", "0.7016278", "0.69950724", "0.69950724", "0.69841284", "0.6980688", "0.6969136", "0.6966403", "0.6960639", "0.69595903", "0.6957801", "0.6940367", "0.69123375", "0.6911759", "0.69032854", "0.6902137", "0.6863236", "0.6855794", "0.6811446", "0.6775791", "0.6756615", "0.6753594", "0.6734579", "0.67317605", "0.6720125", "0.6708321", "0.6665589", "0.66388893", "0.6637504", "0.66340363", "0.6633711", "0.6589092", "0.650845", "0.64931077", "0.64795077", "0.64732873", "0.64732873", "0.64326406", "0.64191234", "0.64183885", "0.6398372", "0.6386914", "0.63754153", "0.6361918", "0.63356555", "0.63356555", "0.6326653", "0.63095033", "0.6307841", "0.62939996", "0.62769616", "0.6271995", "0.6269085", "0.626782", "0.62644285", "0.62421876", "0.62398225", "0.6231615", "0.62223643", "0.622116", "0.6206409", "0.61917275", "0.61794204", "0.6178379", "0.61543226", "0.61535937", "0.61488396", "0.61488396", "0.61488396", "0.61488396", "0.61488396", "0.61488396", "0.61488396", "0.61488396", "0.61488396", "0.61488396", "0.61488396", "0.61329687", "0.61329496", "0.61320156", "0.61320156", "0.61311436", "0.6127606", "0.6118934" ]
0.89875394
0
Returns list of contracts
public function index(DefaultListRequest $request) { $contracts = $this->contractRepository->listForPortal($request->validated(), ['user', 'status', 'supplier']); return response()->pagination(ContractResource::collection($contracts)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function contracts()\n {\n return $this->get('clients/negotiated_contracts');\n }", "public function getListContracts()\n {\n return isset($this->listContracts) ? $this->listContracts : null;\n }", "public function contracts()\n {\n return $this->hasMany(Contract::class);\n }", "public function contracts()\n {\n return $this->hasMany(Contract::class);\n }", "function getContractList() {\n $sql = \"SELECT * FROM contract ORDER BY id DESC\";\n return getAll($sql);\n}", "public function listContract()\n {\n return view('admin.basic.customer.list-contract', [\n 'data' => Contract::distinct('user_id')->get(['user_id', 'admin_id', 'phone', 'email']),\n 'pageTitle' => Lang::trans('label.Customer contract')\n ]);\n }", "public function index()\n {\n return Contract::all();\n }", "public function ContractsGetAll($filter)\n {\n $query = Contracts::with('Customers')->whereRaw(\"1 = 1\");\n $sSearchInput = isset($filter['searchInput']) ? trim($filter['searchInput']) : '';\n $sSortCol = isset($filter['sSortCol']) ? $filter['sSortCol'] : 'code';\n $sSortDir = isset($filter['sSortDir']) ? $filter['sSortDir'] : 'desc';\n\n $limit = isset($filter['limit']) ? $filter['limit'] : config('const.LIMIT_PER_PAGE');\n if ($sSearchInput != '') {\n $query->where('content', 'LIKE', '%' . $sSearchInput . '%');\n $query->orWhere('code', 'LIKE', '%' . $sSearchInput . '%');\n $query->orWhere('value', 'LIKE', '%' . $sSearchInput . '%');\n }\n\n if ($sSortCol) {\n $query->orderBy($sSortCol, $sSortDir);\n }\n\n $rResult = $query->paginate($limit)->toArray();\n $arrData = $rResult['data'];\n foreach ($arrData as $key => $value) {\n $signdate = date('d/m/Y', strtotime($value['signdate']));\n $arrData[$key]['signdate'] = $signdate;\n }\n $rResult['data'] = $arrData;\n return $rResult;\n }", "public function getContracts()\n {\n return $this->hasMany(Contracts::className(), ['company_id' => 'id']);\n }", "public function listAll()\n {\n return $this->contractor->all()->pluck('name', 'id')->all();\n }", "public function getListContracts(): bool\n {\n if ($this->isLogged === false) {\n $this->login();\n }\n\n $response = $this->client->get(self::URI_CONTRACT_LIST);\n if ($response->getStatusCode() !== 200) {\n $this->isLogged = false;\n return false;\n }\n\n $data = json_decode($response->getBody()->getContents());\n\n if (isset($data->success) && $data->success == true) {\n return $data->contratos;\n }\n\n return false;\n }", "function getMemberContractList() {\n $sql = \"SELECT b.* \n FROM user_contract a INNER JOIN contract b ON a.contract_id = b.id \n WHERE a.user_type = 'member' AND a.uid = ? \n ORDER BY b.id DESC\";\n return getAll($sql, [getLogin()['mid']]);\n}", "public function get()\n {\n // 27 para medimas \n // 17 para ecoopsos \n $queryString = '{\"MaxResults\":0,\"MatchAll\":true,\"IPSIDs\":[],\"SiteID\":null,\"EPSID\":17,\"Regime\":null}';\n return $this->performRequest('GET', '/service/ContractService.svc/contract?', $queryString);\n }", "public static function contractables()\n {\n return Nova::authorizedResources(app('request'))->filter(function($resource) { \n return collect(class_implements($resource::newModel()))->contains(Contracts\\Contractable::class); \n })->values();\n }", "function getContractRelList(){\n $sql = \"SELECT * FROM user_contract ORDER by id DESC\";\n return getAll($sql);\n}", "public function selectAllContracteData(){\n $sql = \"SELECT * FROM contract ORDER BY id DESC\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "public function selectAll()\n {\n return $this->contractor->all(['name', 'id']);\n }", "public function getContractors()\n {\n return $this->hasMany(User::className(), ['id' => 'contractor_id'])->viaTable('favorite_contractor', ['customer_id' => 'id']);\n }", "public function getListOfContracts($id_1c) {\n\n return $this->client->GetListOfContracts(array(\n 'IDSuppliers' => (string) $id_1c));\n }", "public function getContractInfo()\n {\n return $this->get(self::CONTRACTINFO);\n }", "public function getModel()\n {\n return new Contracts();\n }", "public function index()\n {\n $contract = $this->contract->paginate('10');\n return response()->json($contract, 200);\n }", "public function query()\n {\n return contracts::query()->orderByDesc('id');\n }", "private function getProjectCandidates($contract) {\n $candidates = array();\n $team = TeamCache::getInstance()->getTeam($contract->getTeamid());\n\n $projList = $team->getProjects();\n $currentProjects = $contract->getProjects();\n\n foreach ($projList as $projectid => $name) {\n if (($team->isSideTasksProject($projectid)) &&\n (!array_key_exists($projectid, $currentProjects))) {\n $candidates[$projectid] = $name;\n }\n }\n return $candidates;\n }", "public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n //$companyItem->amount = $catalog->amount;\n $companyItem->title = $company->title;\n if (\\Dash\\count($company->photo))\n $companyItem->image = '/uploaz/eyuf/UserCompany/photo/' . $company->id . '/' . $company->photo[0];\n $companyItem->url = ZUrl::to([\n 'customer/markets/show',\n 'id' => $company->id\n ]);\n $companyItem->distence = \"12km\";\n //$companyItem->image = $catalog->price;\n //$companyItem->price = $catalog->price_old;\n //$companyItem->currency = \"$\";\n //$companyItem->cart_amount = 0;\n\n $items[] = $companyItem;\n }\n return $items;\n }", "public function index(Request $request)\n {\n $contracts = $this->contract\n ->when($request->has('celebration_date'), function ($query) use ($request) {\n $query->where('celebration_date', $request->celebration_date);\n })\n ->when(\n $request->has(['contract_price_from', 'contract_price_from']),\n function ($query) use ($request) {\n $query->whereBetween('contract_price', [\n $request->contract_price_from,\n $request->contract_price_to\n ]);\n }\n )\n ->when($request->has('winning_company'), function ($query) use ($request) {\n $query->where('adjudicators', 'LIKE', \"%{$request->winning_company}%\");\n })\n ->paginate();\n\n return response()->json([\n 'status' => true,\n 'message' => 'Contracts fetched successfully.',\n 'data' => $contracts\n ]);\n }", "private function getProjects($contract) {\n $projects = array();\n\n $projList = $contract->getProjects();\n\n foreach ($projList as $projectid => $prj) {\n $projects[\"$projectid\"] = array ('name' => $prj->getName());\n }\n return $projects;\n }", "public function Contracts(){\n }", "public function getContract()\n {\n return $this->contract;\n }", "public function index()\n {\n $contracts = Contract::all();\n\n return View::make('contracts.index', compact('contracts'));\n }", "public function index() {\n $contracts = ClientContract::all()\n ->sortBy('name')\n ->where('deletion_status', 0);\n\n return view('administrator.setting.contracts.manage_contracts', compact('contracts'));\n }", "public function index() {\n\t\t$contracts = Contract::where('is_active', 1)->get();\n\t\t$authuser = Auth::user();\n\t\treturn view('contracts.contracts', [\n\t\t\t'contracts' => $contracts,\n\t\t\t'authuser' => $authuser,\n\t\t]);\n\t}", "public function index()\n {\n $contracts = Contract::paginate(25);\n\n return view('contracts.index', compact('contracts'));\n }", "public function getContracts(int $accountID, int $page = 1)\n {\n $result = $this->httpHelper->get(\"/accounts/\" . intval($accountID) . \"/contracts\", $page);\n $contracts = [];\n\n foreach ($result as $datum)\n {\n $contract = new Contract((array)$datum);\n array_push($contracts,$contract);\n }\n\n return $contracts;\n }", "public function getFavoriteContractors()\n {\n return $this->hasMany(FavoriteContractor::className(), ['contractor_id' => 'id']);\n }", "public function getAll(): PriceListCollectionTransfer;", "public static function getAvailableContractors(): array\n {\n $contractorsQuery = ContractorOccupation::find()->select('DISTINCT(contractor_id)');\n\n return self::find()\n ->select('*')\n ->addSelect([\n 'COUNT(task.contractor_id) AS doneTaskCount',\n 'COUNT(review.task_id) AS reviewCount',\n 'AVG(review.rating) AS rating'\n ])\n ->rightJoin(['occupation' => $contractorsQuery], 'user.id = occupation.contractor_id')\n ->leftJoin('task', 'task.contractor_id = user.id')\n ->leftJoin('review', 'task.id = review.task_id')\n\n ->andWhere(['task.state_id' => Task::STATE_DONE])\n ->andWhere(['user.hide_profile' => false])\n ->groupBy('user.id')\n ->orderBy('user.datetime_created ASC')\n ->all();\n }", "public function subcontractors() {\n return $this->hasMany(SubContractor::class);\n }", "private function lista_clientes()\n {\n\n $lista_clientes = Cliente::where('status', 1)\n ->orderBy('nome')\n ->get();\n\n return $lista_clientes;\n }", "public function getListadoObligacioness() {\n return $this->conexionObligaciones->listaLlaves(\"CARNET\", \"ASC\");\n }", "public static function getAllCurrencies(){\r\n\t\t$db = JFactory::getDBO();\r\n\t\t$query = ' SELECT\r\n\t\t\t\t\th.*\r\n\t\t\t\t\tFROM #__hotelreservation_currencies h\r\n\t\t\t\t\tORDER BY description asc';\r\n\t\t$db->setQuery( $query );\r\n\t\treturn $db->loadObjectList();\r\n\t}", "public function getListCurrency()\n\t{\n\t\t$params = [\n\t\t\t'verify' => false,\n\t\t\t'query' => [\n\t\t\t\t'output' => Config::get( 'response.format' )\n\t\t\t]\n\t\t];\n\n\t\t$baseUrl = sprintf( Config::get( 'endpoints.base_url' ), Config::get( 'settings.api' ) ) . Config::get( 'endpoints.general_list_currency' );\n\n\t\ttry {\n\t\t\t$response = parent::send( 'GET', $baseUrl, $params );\n\t\t} catch (TiketException $e) {\n\t\t\tthrow parent::convertException( $e );\n\t\t}\n\n\t\treturn $response;\n\t}", "public function getCurrencies ()\n\t{\n\t\treturn $this->call ('public/getcurrencies');\n\t}", "public function retrieved(Contract $contract)\n {\n \n // foreach ($contracts as $contract) {\n // $end_date = $contract->data_fine;\n // $start_date = $contract->data_inizio;\n\n // $today = Carbon::today();\n\n // if ($today>= $start_date && $today<=$end_date) {\n // $contract->bike->bloccata = 1;\n // }\n\n // }\n \n }", "public function getCashBacks()\n {\n try {\n return $this\n ->cash\n ->where('account_id', auth()->user()->account_id)\n ->orderBy('created_at', 'desc')// get last requests first\n ->orderBy('is_approved', 'asc')// then order them by approved asc 0 -> 1 as not paid first\n ->get();\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return new Collection();\n }\n }", "public function getAllClient() {\n $qb = $this ->createQueryBuilder('p')\n ->select('p')\n ->where('p.estEmploye = 0')\n ->orderBy('p.nom');\n return $qb->getQuery()->getResult();\n }", "public function getTransactions();", "public function getCurrencies() {\n return $this->public([\n 'command' => 'returnCurrencies',\n ]);\n }", "public function index(Request $request)\n {\n $contr = $request->user()->contracts()->get();\n return view('contracts.index', [\n 'contracts' => $contr\n ]);\n \n }", "public function getCars()\n {\n $automoviles = Automovil::get();\n \n return $this->sendResponse($automoviles, 'Completado Correctamente.');\n }", "public function getContractDetails($symbol): array\n {\n $params = [\n \"symbol\" => $symbol,\n ];\n return self::$cloudClient->request(CloudConst::API_CONTRACT_DETAILS_URL, CloudConst::GET, $params);\n }", "public function getCurrencies() {\n\t\t\t$currencies = CurrencyDenomination::all();\n\t\t\treturn response($currencies);\n\t\t}", "function GetCurrencies()\n\t{\n\t\t$result = $this->sendRequest(\"GetCurrencies\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getList()\n {\n return $this->call('GET', \"/shipping/services.json\");\n }", "public function listarClientes(){\n $this->bd->getConeccion();\n $sql = \"SELECT * FROM CLIENTE\";\n $registros = $this->bd->executeQueryReturnData($sql); \n $this->bd->cerrarConeccion(); \n $clientes = array(); \n \n foreach ($registros as $cliente) {\n $cliente = new Cliente($cliente['id'],$cliente['dni'],$cliente['Nombre'],$cliente['Apellido'],$cliente['Correo'],$cliente['Telefono']);\n array_push($clientes, $cliente);\n }\n \n return $clientes; \n }", "public function getAll()\n {\n $data = array();\n $rs = parent::findAll(array(\"name\" => \"Commande\"));\n foreach ($rs as $k => $v) {\n foreach ($v as $vi) {\n $data[$k] = new Commande($v['ID'],$v['CLIENTID'],$v['PRODID'],$v['NBPRODUITS'],$v['DATEAJOUT']);\n }\n }\n return $data;\n }", "public function index()\n {\n if(auth()->user()->admin == 1)\n {\n \n $contracts = Contract::paginate(5);\n \n } else {\n\n $contracts = Contract::where('user_id', auth()->user()->id)->paginate(5);\n \n }\n\n return view('contracts.index', compact('contracts'));\n }", "public function getMyContracts(Request $request, Response $response, array $args)\n {\n // results = result of query; connection = connection to db\n $results = array();\n $connection = $this->container->get(\"db\");\n $company_name_param = $args['cName'];\n\n //\n $queryText = \"SELECT * FROM \" . ContractController::$contract_table_name . \" WHERE company_name =:companyName \";\n $stmt = $connection->prepare($queryText);\n $stmt->bindValue(':companyName', $company_name_param, PDO::PARAM_STR);\n $stmt->execute();\n\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $contract_tuple = array(\n \"id\" => $contract_id,\n \"category\" => $contract_category,\n \"serviceType\" => $type_of_service,\n \"acv\" => $acv,\n \"initialAmount\" => $initial_amount,\n \"startDate\" => $service_start_date,\n \"firstDeliverable\" => $first_deliv,\n \"secondDeliverable\" => $second_deliv,\n \"thirdDeliverable\" => $third_deliv,\n \"fourthDeliverable\" => $fourth_deliv,\n \"score\" => $score,\n \"manager\" => $manager_id\n );\n array_push($results, $contract_tuple);\n }\n\n if (count($results) == 0) {\n $response = $results->withStatus(404);\n $results = array(\n \"error\" => $company_name_param.\"does not have any contracts yet.\"\n );\n }\n $response = $response->withHeader(\"Content-Type\", \"application/json\");\n $response->getBody()->write(json_encode($results));\n return $response;\n }", "public function getClientList()\n {\n $clients = $this->find('all')\n ->select(['id', 'salutation', 'name'])\n ->where(['role' => 'client'])\n ->order(['name' => 'ASC']);\n $retval = [];\n foreach ($clients as $client) {\n $retval[$client->id] = $client->full_name;\n }\n\n return $retval;\n }", "public function index()\n {\n return Currency::all();\n }", "public function getAllBusinesses() {\n\t\t$em = $this->getEntityManager();\n\t\t$businesses = $em->createQueryBuilder()\n\t\t\t->select('b.businessID,b.costCenter,b.name')\n\t\t\t->from('Business', 'b')\n\t\t\t->orderBy('b.name')\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t\t\n\t\t$response = array(\n\t\t\t\"businesses\" => $businesses\n\t\t);\n\t\t\n\t\treturn $this->respond($response);\n\t}", "function getAll($hide='')\n\t{\n\t\tif ($hide != '') {\n\t\t\treturn Currency::where('id', '!=', $hide)->orderBy('name', 'asc')->get();\n\t\t}\n\n\t\treturn Currency::orderBy('name', 'asc')->get();\n\t}", "public function inContract(Request $request)\n {\n return collect($this->contracts)->filter(function($contract) use ($request) {\n return $contract->auth_id === $request->user()->id;\n })->isNotEmpty();\n }", "public function getCreditmemoWarehouseList();", "public static function all(){\n\t\t$bdd = new DBcnx();\n\t\t\treturn $bdd->allClient();\n\t}", "public function currencies()\n {\n return $this->_call('public/getcurrencies', [], false);\n }", "public function readAllCompromissos() {\n $array = ['error' => ''];\n\n $compromissos = Compromisso::simplePaginate(2);\n\n $array['list'] = $compromissos->items();\n $array['current_page'] = $compromissos->currentPage();\n\n return $array;\n }", "public function getContractInfo($id = 0) { \n\t\t\t\n\t\t\t\n\t\t\t$result = $this->adapter->query('select * from vctrchangefrm where ctr_id = ?',\n array($id));\n\t\t\t\n\t\t\t$ar = array();\n\t\t\tif($result)\n\t\t\t{\n\t\t\t$i=0;\n\t\t\t\tforeach ($result as $row) {\n\t\t\t\t\t$ar[$i]['ctr_no']=$row->ctr_no;\n\t\t\t\t\t$ar[$i]['ctr_id']=$row->ctr_id;\n\t\t\t\t\t$ar[$i]['ctr_date']=$row->ctr_date;\n\t\t\t\t\t$ar[$i]['emp_uname']=$row->emp_uname;\n\t\t\t\t\t$ar[$i]['ctct_name']=$row->ctct_name;\n\t\t\t\t\t$ar[$i]['ctct_phone']=$row->ctct_phone;\n\t\t\t\t\t$ar[$i]['ctct_addr_c']=$row->ctct_addr_c;\n\t\t\t\t\t$ar[$i]['ctct_addr_s']=$row->ctct_addr_s;\n\t\t\t\t\t$ar[$i]['ctct_st_code']=$row->ctct_st_code;\n\t\t\t\t\t$ar[$i]['ctr_nurse']=$row->ctr_nurse;\n\t\t\t\t\t$ar[$i]['ctr_nu_type']=$row->ctr_nu_type;\n\t\t\t\t\t$ar[$i]['at_name']=$row->at_name;\n\t\t\t\t\t$ar[$i]['sp_name']=$row->sp_name;\n\t\t\t\t\t$ar[$i]['ctr_recruiter']=$row->ctr_recruiter;\n\t\t\t\t\t\n\t\t\t\t\t$i+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $ar;\n }", "public function getCharges();", "public function subContractors(Project $project)\n { \n return response()->json($project->subcontractors()->get()); \n }", "public function getComercios(){\n\t\t$sql = \"SELECT ID_comercio, nombre, correo, telefono, responsable, FK_ID_estado_comercio FROM comercio ORDER BY nombre\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "public function getItems()\n {\n $items = Item::forTransaction($this->transactionId)->excludeSvcCharge()->get();\n return $items;\n }", "public function create_contracts_with_all_statuses()\n {\n factory(Contract::class, 'unsigned_legal', 3)->create();\n factory(Contract::class, 'in_progress_legal', 3)->create();\n factory(Contract::class, 'finished_legal', 3)->create();\n factory(Contract::class, 'broken_legal', 3)->create();\n }", "public function getCurrencies(): array\n {\n $out = $this->request('getCurrencies');\n return $out['result'];\n }", "public function allCompanies()\n {\n return Company::all();\n }", "public function getCc(): iterable;", "public function carriers()\n\t{\n\t\t$carriers = Carrier::all();\n\t\treturn StudentResource::collection($carriers);\n\t}", "public static function getListClientBySAP($_filter){\n\n\t\t$listclient = array();\n\t\ttry {\n\t\t\t/*codigo para consumor ws soap*/\n\t\t\t\t$client = new SoapClient(URLWS);\n\t\t\t\t$params = array('_filter' => $_filter);\n\t\t\t\t$result = $client->ListCustomer($params);\n\n\t\t\t\tfor($i=0; $i<count($result->ListCustomerResult->ClientResponse); $i++){\n\t\t\t\t\t $listclient[$i] = $result->ListCustomerResult->ClientResponse[$i]->CardCode.\"|\".htmlentities($result->ListCustomerResult->ClientResponse[$i]->CardName);\n\t\t\t\t}\n\n\t\t\t} catch (Exception $e) {\n\t\t\t\ttrigger_error($e->getMessage(), E_USER_WARNING);\n\t\t\t}\n\t\treturn $listclient;\n\t}", "public function index()\n {\n $transactions = Transaction::with([\n 'payment',\n 'customer',\n 'supplier', \n ])->get()->toArray();\n return $transactions;\n }", "public function getListContratos($tipo)\r\n {\r\n $sql = \"select a.contractId,a.name,a.activo from contract a \r\n inner join servicio b on a.contractId=b.contractId and b.status='\" . $tipo . \"'\r\n inner join tipoServicio c on b.tipoServicioId=c.tipoServicioId and c.status='1'\r\n where a.customerId='\" . $this->customerId . \"' and a.activo='Si' \r\n group by a.contractId\r\n order by a.name asc \r\n \";\r\n $this->Util()->DB()->setQuery($sql);\r\n $results = $this->Util()->DB()->GetResult();\r\n\r\n return $results;\r\n }", "public function all() {\n $stmt = $this->pdo->query('SELECT id, symbol, company '\n . 'FROM stocks '\n . 'ORDER BY symbol');\n $stocks = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $stocks[] = [\n 'id' => $row['id'],\n 'symbol' => $row['symbol'],\n 'company' => $row['company']\n ];\n }\n return $stocks;\n }", "public function index()\n {\n $cm_clientes = CmCliente::with(\"contrato.cliente\", \"cmmac\", 'orden_trabajo', \"estado_cm\")->get();\n return $cm_clientes;\n }", "public function getAllCars() {\n return $this->database->fetchAllCars();\n }", "public function listarc()\n\t{\n\t\t$sql=\"SELECT * FROM persona WHERE tipo_persona = 'Cliente';\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function getCurrencies();", "public function companies(): Collection\n {\n return Company::all();\n }", "public function listAction(Request $request) {\r\n\r\n\r\n $contracts = $this->get('employee.contract.service')->pagination($request);\r\n\r\n $options = [\r\n 'contracts' => $contracts['paginator'],\r\n 'status' => $contracts['status'],\r\n 'schemas' => $contracts['schemas'],\r\n 'agreements' => $contracts['agreements'],\r\n 'companies' => $contracts['companies'],\r\n 'business' => $contracts['business']\r\n ];\r\n\r\n return $this->render('employeeBundle:Contract:list.pagination.html.twig', $options);\r\n }", "public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}", "public function client_getAll(){\n $array = array();\n if( $stmt = $this->connection->prepare(\"SELECT * FROM clients;\") ){\n $stmt->execute();\n $stmt->bind_result($id, $type, $name, $company, $address, $email, $phone);\n \n $results = array();\n while( $stmt->fetch() ){\n $Client = new Client($id, $type, $name, $company, $address, $email, $phone);\n $results[] = $Client;\n } \n \n $stmt->close();\n return $results;\n }\n return null;\n }", "public function clients() {\n\t\treturn $this->clients_model->getClients($this->compID);\n\t}", "public function equip_contract()\n {\n return $this->hasOne(Contract::class, 'id', 'equip_contract_id');\n // ->select(['id', 'contract_number', 'contract_address']);\n }", "public function getAllCurrencies()\n {\n $currencies = $this->repository->supplemental['codeMappings'];\n $datas = array();\n foreach (array_keys($currencies) as $currency_code) {\n if ($currency_code === 'XTS' || strlen($currency_code) !== 3) {\n continue;\n }\n $currency = $this->getCurrency($currency_code);\n $datas[] = array(\n 'name' => ucfirst($currency['name']).' ('.$currency_code.')',\n 'code' => $currency_code,\n 'iso_code' => $currency['iso_code']\n );\n }\n\n //sort array naturally\n uasort($datas, function ($x, $y) {\n return strnatcmp($x[\"name\"], $y[\"name\"]);\n });\n\n return $datas;\n }", "public function services(): ServicesContract;", "public function getCurrencyList()\n {\n if (null === $this->currencyList) {\n $this->setCurrencyList(new CurrencyList);\n }\n\n return $this->currencyList;\n }", "public function getAllForCustonObj() {\n $query = $this->db->query(\"SELECT * FROM $this->table ORDER BY shortname;\");\n $this->allcpny = $query->custom_result_object('entity\\Company');\n // print \"<pre>\";\n // print_r($this->cpny);\n // print \"</pre>\";\n // exit();\n return $this->allcpny;\n }", "public function getCurrencies()\n {\n return $this->hasMany(Currency::className(), ['ap_gl_acc_id' => 'account_id']);\n }", "public static function getContractTeams()\n {\n return [\n self::TEAM_DK_FIRST,\n self::TEAM_DK_FIRST_FULL_NAME,\n self::TEAM_DK_M,\n self::TEAM_DK2,\n self::TEAM_U19,\n self::TEAM_DK_KIDS,\n self::TEAM_DK3,\n ];\n }", "public function getInvestorsList() {\n return Investor::get()->toArray();\n }", "public function getQuotesList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public static function getEnabledContracts($contractNumberOnly = false)\n {\n $enabledContractsList = array();\n $enabledContracts = Configuration::get('PAYLINE_CONTRACTS');\n if (!empty($enabledContracts) && json_decode($enabledContracts) !== false) {\n $enabledContractsList = json_decode($enabledContracts);\n if ($contractNumberOnly && is_array($enabledContractsList)) {\n $enabledContractsList = array_map('PaylinePaymentGateway::extractContractNumber', $enabledContractsList);\n }\n }\n return $enabledContractsList;\n }", "public function getAll()\n {\n return $this->transactions;\n }" ]
[ "0.785054", "0.7699089", "0.7588918", "0.7588918", "0.75650245", "0.7275409", "0.7239224", "0.7199798", "0.7106369", "0.7071394", "0.7041897", "0.69031763", "0.67519844", "0.668434", "0.65258884", "0.6225676", "0.61941826", "0.61712366", "0.6148977", "0.61281234", "0.6124369", "0.6124341", "0.6116218", "0.6098914", "0.6071239", "0.6049886", "0.60142106", "0.5994302", "0.59560585", "0.59429324", "0.589494", "0.58892256", "0.5850808", "0.58281064", "0.5820286", "0.5804376", "0.5796549", "0.5781124", "0.5728252", "0.57262653", "0.5675043", "0.56694186", "0.5635057", "0.56328344", "0.56310356", "0.5622839", "0.5621895", "0.56206536", "0.5611214", "0.55912805", "0.5583486", "0.5581364", "0.5580867", "0.5574072", "0.55684346", "0.5554315", "0.5546619", "0.5543393", "0.55383563", "0.5537736", "0.5536503", "0.55333143", "0.5498614", "0.54939073", "0.5479081", "0.54779285", "0.5473394", "0.54700774", "0.54691285", "0.5462201", "0.54601467", "0.54546946", "0.54490525", "0.5437148", "0.5432626", "0.54295844", "0.5419956", "0.54186165", "0.54125994", "0.54096615", "0.5408788", "0.54071987", "0.54048365", "0.54043406", "0.539978", "0.539759", "0.5381585", "0.5378198", "0.5361115", "0.5353761", "0.535225", "0.53400165", "0.53388125", "0.5336679", "0.5334117", "0.5332365", "0.53290695", "0.5325432", "0.53246284", "0.5321634", "0.53208274" ]
0.0
-1
Return instance with specific attributes
public function withAttributes(array $attributes): Route;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function instatiation($the_record){\n\t\t$calling_class = get_called_class();\n\t\t$the_object = new $calling_class;\n\t\tforeach($the_record as $the_attribute => $value){\n\t\t\tif($the_object->has_the_attribute($the_attribute)){\n\t\t\t\t$the_object->$the_attribute = $value;\n\t\t\t}\t\n\t\t\t\n\t\t}\n\t\treturn $the_object;\t\n\t\t \n\t }", "private static function instantiate($record) {\n $object = new self;\n\t\tforeach($record as $attribute=>$value){\n\t\t if($object->has_attribute($attribute)) {\n\t\t $object->$attribute = $value;\n\t\t }\n\t\t}\n\t\treturn $object;\n\t}", "private static function instantiate($record) {\r\n $object = new self;\r\n\t\t\r\n\t// More dynamic, short-form approach:\r\n\tforeach($record as $attribute=>$value){\r\n if($object->has_attribute($attribute)) {\r\n\t $object->$attribute = $value;\r\n }\r\n\t}\r\n\r\n return $object;\r\n }", "private static function instantiate($record) {\r\n $object = new self;\r\n\t\t\r\n\t// More dynamic, short-form approach:\r\n\tforeach($record as $attribute=>$value){\r\n if($object->has_attribute($attribute)) {\r\n\t $object->$attribute = $value;\r\n }\r\n\t}\r\n\r\n return $object;\r\n }", "private static function instantiate($record) {\r\r\n $object = new self;\r\r\n\t\tforeach($record as $attribute=>$value){\r\r\n\t\t if($object->has_attribute($attribute)) {\r\r\n\t\t $object->$attribute = $value;\r\r\n\t\t }\r\r\n\t\t}\r\r\n\t\treturn $object;\r\r\n\t}", "private static function instantiate($record) {\n $class_name = get_called_class();\n $object = new $class_name;\n foreach($record as $attribute=>$value) {\n if($object->has_attribute($attribute)) {\n $object->$attribute = $value;\n }\n }\n return $object;\n }", "abstract protected function attributes();", "public function newInstance($attributes = array(), $exists = false);", "public static function instantation($the_record){\n\t\t$calling_class=get_called_class();\n\t\t$the_object=new $calling_class;\n\n\t\tforeach ($the_record as $the_attribute => $value) {\n\t\t\tif ($the_object->has_the_attribute($the_attribute)) {\n\t\t\t\t$the_object->$the_attribute=$value;\n\t\t\t}\n\t\t}\n\n\t\treturn $the_object;\n\t}", "protected function setAttributes()\n {\n if (in_array('attributes', $this->with)) {\n $this->result[$this->attribute]['attributes'] = Arr::get($this->field, 'attributes');\n }\n\n\n return $this;\n }", "public function newInstance($attributes = [], $exists = false);", "public function __construct(array $attributes = [])\n {\n foreach($attributes as $key=>$value)\n {\n $this->$key = $value;\n }\n\n return $this;\n }", "public function attributes(){\r\n /*\r\n $attributes = array();\r\n foreach(self::$db_fields as $field){\r\n if(property_exists($this, $field)){\r\n\t $attributes[$field] = $this->$field;\r\n\t }\r\n }\r\n return $attributes;\r\n */\r\n \r\n //return get_object_vars($this);\r\n return $this->variables;\r\n }", "private static function instantiate($record) {\r\n\t\t$object = new self;\r\n\t\t/*\r\n\t\t$object->id \t\t\t= $record['id'];\r\n\t\t$object->username \t\t= $record['username'];\r\n\t\t$object->password \t\t= $record['password'];\r\n\t\t$object->first_name \t= $record['first_name'];\r\n\t\t$object->last_name \t\t= $record['last_name'];*/\r\n\r\n\t\t//more dynamic approach to this\r\n\t\tforeach($record as $attribute=>$value) {\r\n\t\t\tif($object->has_attribute($attribute)) {\r\n\t\t\t\t$object->$attribute = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $object;\r\n\t}", "private static function instantiate($record) {\n\t\t// Simple long-form approach\n\t\t$obj = new self;\n\t\t// $obj->id \t\t\t= $record['id'];\n\t\t// $obj->username \t\t= $record['username'];\n\t\t// $obj->password \t\t= $record['password'];\n\t\t// $obj->first_name\t= $record['first_name'];\n\t\t// $obj->last_name \t= $record['last_name'];\n\n\t\t// More Dynamic, short form approach\n\t\tforeach($record as $attribute=>$value){\n\t\t if($obj->has_attribute($attribute)) {\n\t\t $obj->$attribute = $value;\n\t\t }\n\t\t}\n\t\treturn $obj;\n\t}", "public function attributes();", "protected function _getAttributes(){\n\t\treturn ActiveRecordMetaData::getAttributes($this->_source, $this->_schema);\n\t}", "public function getInstance(\n array $attributes = []\n );", "public function getAttributes(){ }", "public function __construct ($attrs);", "public function get_attributes()\n {\n }", "public function get_attributes()\n {\n }", "public function newInstance($attributes = [])\n {\n return new static((array) $attributes);\n }", "private static function instantiate($record) {\n $object = new self;\n\t\t// Simple, long-form approach:\n\t\t// $object->id \t\t\t\t= $record['id'];\n\t\t// $object->username \t= $record['username'];\n\t\t// $object->password \t= $record['password'];\n\t\t// $object->first_name = $record['first_name'];\n\t\t// $object->last_name \t= $record['last_name'];\n\t\t\n\t\t// More dynamic, short-form approach:\n\t\tforeach($record as $attribute=>$value){\n\t\t if($object->has_attribute($attribute)) {\n\t\t $object->$attribute = $value;\n\t\t }\n\t\t}\n\t\treturn $object;\n\t}", "public function __construct(array $attributes = []);", "public static function factory()\n {\n $class = get_called_class();\n $object = new $class();\n foreach (static::getDefaults() as $field => $value) {\n $object->{$field} = $value;\n }\n return $object;\n }", "function create()\n\t{\n\t\t$names = $this->_fields;\n\t\t$object = new StdClass;\n\t\tforeach ($names as $name)\n\t\t\t$object->$name = \"\";\n\t\treturn $object;\n\t}", "public function newInstance($attributes = [], $exists = false)\n {\n // This method just provides a convenient way for us to generate fresh model\n // instances of this current model. It is particularly useful during the\n // hydration of new objects via the Halcyon query builder instances.\n $model = new static((array) $attributes);\n\n $model->exists = $exists;\n\n return $model;\n }", "public function newInstance($attributes = [], $exists = false)\n {\n $model = new static($attributes, $this->section);\n $model->exists = $exists;\n\n return $model;\n }", "public static function factory($attributes)\n {\n $defaultAttributes = [\n 'expirationMonth' => '',\n 'expirationYear' => '',\n 'last4' => $attributes['virtualCardLast4'],\n 'cardType' => $attributes['virtualCardType'],\n ];\n\n $instance = new self();\n $instance->_initialize(array_merge($defaultAttributes, $attributes));\n return $instance;\n }", "public function _fill($attributes)\n \t{\n \t\tforeach($attributes as $key => $value) {\n \t\t\t$this->$key = $value;\n \t\t}\n\n \t\treturn $this;\n \t}", "public function __construct() {\n return $this;\n }", "public function instance_fields() {\n\n\n\n }", "public function setAttributes($attributes)\n {\n $this->attributes = $attributes;\n\n return $this;\n\n }", "public function construct()\n {\n return $this->object;\n }", "protected function makeInstance(array $attributes = [])\n {\n return Model::unguarded(function () use ($attributes) {\n $instance = new $this->class(\n $this->getRawAttributes($attributes)\n );\n\n if (isset($this->connection)) {\n $instance->setConnection($this->connection);\n }\n\n return $instance;\n });\n }", "private static function instantiate($record) {\n\t\t// Could check that $record exists and is an array\n\t\t// Simple, long-form approach:\n\t\t$object = new self;\n\t\t// $object->id \t\t = $record[\"id\"];\n\t\t// $object->username = $record[\"username\"];\n\t\t// $object->password = $record[\"password\"];\n\t\t// $object->first_name = $record[\"first_name\"];\n\t\t// $object->last_name = $record[\"last_name\"];\n\t\t// return $object;\n\t\n\t\t// More dynamic, short-form approach:\n\t\tforeach ($record as $attribute => $value) {\n\t\t\tif ($object->has_attribute($attribute)) {\n\t\t\t\t$object->$attribute = $value;\n\t\t\t}\n\t\t}\n\t\treturn $object;\n\t}", "public function getAttributes() {}", "public function getAttributes() {}", "public function getNew(array $attributes = array())\n\t{\n\t\treturn $this->model->newInstance($attributes);\n\t}", "public function _construct(){\n\t\treturn $this->data;\n\t}", "public function _construct(){\n\t\treturn $this->data;\n\t}", "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 static function factory($attributes)\n {\n\n $instance = new self();\n $instance->_initialize($attributes);\n return $instance;\n }", "public function instance_fields(){\n\t\treturn self::fields(get_class($this));\n\t}", "public function attributes() { return $this->attributes; }", "public function newInstance($attributes = [], $exists = false)\n {\n $model = new static((array) $attributes);\n\n $model->exists = $exists;\n\n return $model;\n }", "public static function factory($attributes)\n {\n $instance = new self();\n $instance->_initialize($attributes);\n return $instance;\n }", "public static function factory($attributes)\n {\n $instance = new self();\n $instance->_initialize($attributes);\n return $instance;\n }", "public static function factory($attributes)\n {\n $instance = new self();\n $instance->_initialize($attributes);\n return $instance;\n }", "public function newInstance($attributes = [], $exists = false)\n {\n\n $model = parent::newInstance($attributes, $exists);\n $model->setTable($this->table);\n\n return $model;\n }", "public static function all()\n {\n \t//Start by connecting to the DB\n \tself::dbConnect();\n \t$stmt = self::$dbc->query('SELECT * FROM ads');\n \t//Assign results to a variable\n \t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n \t$instance = null;\n if ($result) {\n $instance = new static;\n $instance->attributes = $result;\n }\n return $instance;\n\n }", "function instance_wrapper($data) {\n return array_map(function($parameters){\n $attributes = $parameters[count($parameters)-1];\n $instance = new SimpleEntity();\n $reflection = new \\ReflectionObject($instance);\n $__attributes = $reflection->getProperty('__attributes');\n $__attributes->setAccessible(true);\n $__attributes->setValue($instance, $attributes);\n $parameters[] = $instance;\n\n return $parameters;\n }, $data);\n }", "protected function attributes() {\n $attributes = array();\n foreach(static::$db_fields as $field) {\n if(property_exists($this, $field)) {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "public function getClone($withParameters = true) {\n\t\t$clone = new static($this->sqlAdapter, $this->idField, $this->class);\n\t\tif( $withParameters ) {\n\t\t\t$clone->parameters = $this->parameters;\n\t\t}\n\t\treturn $clone;\n\t}", "public static function model($attrs)\n {\n $model = new static;\n\n foreach ($attrs as $key => $value) {\n $model->$key = $value;\n }\n\n return $model;\n }", "public function attributes()\n {\n return parent::attributes();\n }", "public function newInstance($attributes = [], $exists = false)\n {\n // This method just provides a convenient way for us to generate fresh model\n // instances of this current model. It is particularly useful during the\n // hydration of new objects via the Eloquent query builder instances.\n $model = new static((array) $attributes);\n\n $model->exists = $exists;\n\n $model->setConnection(\n $this->getConnectionName()\n );\n\n return $model;\n }", "public static function factory($attributes)\n {\n $defaultAttributes = [\n 'bin' => '',\n 'expirationMonth' => '',\n 'expirationYear' => '',\n 'last4' => '',\n ];\n\n $instance = new self();\n $instance->_initialize(array_merge($defaultAttributes, $attributes));\n return $instance;\n }", "public function __construct ()\n {\n return this;\n }", "public function __construct() {\r\n parent::__construct( 'attributes' );\r\n\r\n if ( isset( $this->attribute_id ) )\r\n $this->id = $this->attribute_id;\r\n }", "public function setAttributes($attributes)\n {\n $this->attributes = $attributes;\n return $this;\n }", "private static function instantiate($record){\n // Could check that $record exists and is an array\n\n // Needed for both approaches\n $object = new static;\n\n // Simple, long-form approach:\n // $object->id = $record['id'];\n // $object->username = $record['username'];\n // $object->password = $record['password'];\n // $object->first_name = $record['first_name'];\n // $object->last_name = $record['last_name'];\n\n // More dynamic, short-form apporach\n foreach ($record as $attribute => $value) {\n if($object->has_attribute($attribute)){\n // why do both need $ ??\n // maybe because $attribute is not a specifically defined attribute, its a variable\n $object->$attribute = $value;\n }\n }\n return $object;\n }", "public function create(){\r\n\treturn new $this->class();\r\n }", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public static function instantiate($record)\n {\n\n // this is a simple, long form approach to assign values\n $object = new static;\n $attributes = array();\n\n $reflection = new ReflectionObject($object);\n $properties = $reflection->getProperties(ReflectionProperty::IS_PUBLIC);\n foreach ($properties as $property) {\n $attributes[] = $property->getName();\n }\n foreach ($record as $attribute => $value) {\n if (in_array($attribute, $attributes)) {\n $object->$attribute = $record[$attribute];\n }\n }\n return $object;\n }", "abstract public function instance();", "public function setAttr($attributes = array())\n {\n foreach ($attributes as $key => $value) {\n if (property_exists(get_class($this), $key))\n $this->$key = $value;\n }\n return $this;\n }", "protected function _construct()\n\t{\n\t\t$this->resetParams();\n\t\treturn parent::_construct();\n\t}", "public function custom_attributes()\n {\n return (AttributeProxy::modelClass())::join('attribute_group_mappings', 'attributes.id', '=', 'attribute_group_mappings.attribute_id')\n ->join('attribute_groups', 'attribute_group_mappings.attribute_group_id', '=', 'attribute_groups.id')\n ->join('attribute_families', 'attribute_groups.attribute_family_id', '=', 'attribute_families.id')\n ->where('attribute_families.id', $this->id)\n ->select('attributes.*');\n }", "abstract public function get_instance();", "public static function factory($attributes)\n {\n $instance = new self();\n $instance->revokedPaymentMethod = PaymentMethodParser::parsePaymentMethod($attributes);\n $instance->customerId = $instance->revokedPaymentMethod->customerId;\n $instance->token = $instance->revokedPaymentMethod->token;\n return $instance;\n }", "public static function instantiate($the_record){\n\t //$user->username = $row[\"id\"];\n\t //$user->username = $row[\"username\"];\n\t //$user->username = $row[\"password\"];\n\t //$user->first_name = $row[\"first_name\"];\n\t //$user->last_name = $row[\"last_name\"];\n\t $called_class = get_called_class();\n\t $the_object = new $called_class;\n\t foreach ($the_record as $the_attribute => $value) {\n\t \t# code...\n\t \tif($the_object->has_the_attribute($the_attribute)){\n\t \t\t$the_object->$the_attribute = $value;\n\t \t}\n\t }\n\n\t\t\treturn $the_object;\n\t\t}", "function read(){\n foreach($this as $attribute => $valor){\n $this->$attribute = Request::read($attribute);\n } \n }", "public function getParameters()\n {\n return \\common\\models\\Attribute::find()->where(['id' => $this->getEntityAttributes()->select('attribute_id')]);\n }", "public function buildNew(array $attributes = array())\n {\n return $this->model->newInstance($attributes);\n }", "protected function attributes() {\n\t $attributes = array();\n\t foreach(self::$db_fields as $field) {\n\t if(property_exists($this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n\t}", "public function newFromBuilder($attributes = [], $datasource = null)\n {\n $instance = $this->newInstance([], true);\n\n if ($instance->fireModelEvent('fetching') === false) {\n return $instance;\n }\n\n $instance->setRawAttributes((array) $attributes, true);\n\n $instance->fireModelEvent('fetched', false);\n\n $instance->setDatasource($datasource ?: $this->datasource);\n\n return $instance;\n }", "public function getNew($attributes = array());", "protected function attributes() {\n\t\t$attributes = array();\n\t\tforeach(self::$db_fields as $field) {\n\t\t\tif(property_exists($this, $field)){\n\t\t\t\t$attributes[$field] = $this->$field;\n\t\t\t}\n\t\t}\n\t\treturn $attributes;\n\t}", "abstract protected function getModelAttributes();", "public function getAttributes()\n {\n }", "function Hippo_Widget_Attributes() {\n\t\t\tnew Hippo_Widget_Attributes();\n\t\t}", "function getAdditionalAttributes() ;", "public function withAttributes(array $attributes): RequestInterface;", "protected function attributes() {\n\t\t$attributes = array();\n\t\tforeach (self::$db_fields as $field) {\n\t\t\tif (property_exists($this, $field)) {\n\t\t\t\t$attributes[$field] = $this->$field;\n\t\t\t}\n\t\t}\n\t\treturn $attributes;\n\t}" ]
[ "0.60058075", "0.59667873", "0.5939736", "0.5939736", "0.59099555", "0.5886525", "0.58503324", "0.58029956", "0.57605845", "0.5760507", "0.57291615", "0.5718571", "0.5630659", "0.56278586", "0.56020796", "0.5567476", "0.55523014", "0.5541296", "0.5523069", "0.5515091", "0.55097103", "0.55097103", "0.55022824", "0.5484035", "0.5478317", "0.54696846", "0.546407", "0.5438335", "0.5437941", "0.54370743", "0.54226637", "0.5415625", "0.5414391", "0.5410975", "0.54056245", "0.5398278", "0.53971714", "0.53888434", "0.5388528", "0.53815174", "0.5379528", "0.5379528", "0.5378009", "0.5378009", "0.5378009", "0.5378009", "0.5378009", "0.5378009", "0.5378009", "0.5378009", "0.5378009", "0.5358894", "0.5338715", "0.533712", "0.5327811", "0.5326648", "0.5326648", "0.5326648", "0.53131926", "0.5310591", "0.5304837", "0.5292117", "0.52570546", "0.5253992", "0.5252075", "0.5250544", "0.5250091", "0.52465266", "0.5245851", "0.5242997", "0.5242907", "0.52407473", "0.5240121", "0.5240121", "0.5239732", "0.5238734", "0.5238552", "0.5238552", "0.5238552", "0.5238552", "0.5237783", "0.5234015", "0.5233472", "0.5231465", "0.5226415", "0.5219984", "0.5212924", "0.5211776", "0.5210037", "0.52055234", "0.52051693", "0.51975685", "0.51892656", "0.51892614", "0.5187818", "0.51846254", "0.5181186", "0.51729035", "0.51626956", "0.5162209", "0.51533884" ]
0.0
-1
Returns route's attributes extracted from requested uri
public function getAttributes(): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRouteParams();", "function getRouteParameters();", "public function getRouteAndParams()\n {\n $request = $this->get('request_stack')->getCurrentRequest();\n $routing = $request->attributes->all();\n\n $ret = new \\stdClass();\n\n $ret->route = $routing['_route'];\n $ret->params = array_merge($routing['_route_params'], $request->query->all());\n\n return $ret;\n }", "public function getRouteAttributes($name = null, $default = null);", "public function extractRoutingInfo()\n {\n // Category\n $category = \"\";\n if (!empty($this->get[\"c\"])) {\n $category = $this->get[\"c\"];\n }\n $this->setController($category);\n unset($this->get[\"c\"]);\n\n // Action\n $action = \"\";\n if (!empty($this->get[\"a\"])) {\n $action = $this->get[\"a\"];\n }\n $this->setAction($action);\n unset($this->get[\"a\"]);\n\n // Property ID\n $property_id = null;\n if (!empty($this->get[\"pid\"])) {\n $property_id = $this->get[\"pid\"];\n }\n $this->setPropertyID($property_id);\n unset($this->get[\"pid\"]);\n\n // Debug flag\n $in_debug = (new \\Helpers\\Config)->getDebugMode() ?? false;\n if (!empty($this->get[\"debug\"])) {\n $in_debug = true;\n }\n $this->setInDebug($in_debug);\n unset($this->get[\"in_debug\"]);\n }", "private function extractAttributes(Route $route): array\n {\n $arguments = [\n 'namespace' => null,\n 'controller' => null,\n 'action' => null,\n 'args' => []\n ];\n foreach (array_keys($arguments) as $name) {\n $arguments[$name] = array_key_exists($name, $route->attributes)\n ? $route->attributes[$name]\n : $arguments[$name];\n }\n return $arguments;\n }", "private function extractRouteParams()\n {\n // Extract params\n $params = array_filter(explode('/', $_GET['url']));\n\n // First parameter is the controller\n $this->_controller = $params[0];\n\n // Second parameter is the action method\n\t\tif (isset($params[1]) && !empty($params[1])) {\n\t\t\t$this->_action = $params[1];\n\t\t}\n\n // Set additional parameters\n\t\tif (isset($params[2]) && !empty($params[2])) {\n\t\t\t$this->_urlParams = $params[2];\n\t\t}\n }", "public static function getRouteVariables() {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__);\n\n\t\t$data = self::$route_parameters;\n\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $data);\n\t\t$data = self::_applyFilter(get_class(), __FUNCTION__, $data, array('event' => 'return'));\n\n\t\treturn $data;\n\n\t}", "public function getArgs(){\n\t\t\treturn $this->matchingRoute->getParam($this->url->getLastPartOfUrl());\n\t\t}", "public static function getRoute()\n {\n global $req;\n\n $route = [];\n $uri = trim($req->getPathInfo(), '/');\n $uri = explode('/', $uri);\n\n $route['base'] = $uri[0];\n $route['section'] = empty($uri[1]) ? '' : $uri[1];\n $route['action'] = empty($uri[2]) ? '' : $uri[2];\n $route['page'] = $uri[count($uri)-1];\n\n return $route;\n }", "private function mapAttributes() {\n\t\t$attributes = [];\n\t\t$originalAttrs = $this->subscribedTopic->getRoute()->getAttributes();\n\n\t\tif (!count($originalAttrs)) {\n\t\t\treturn $attributes;\n\t\t}\n\n\t\tforeach ($originalAttrs as $attr => $obj) {\n\t\t\t$routeParts = explode('/', $this->route);\n\n\t\t\tif (!isset($routeParts[$obj->index])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$attributes[$attr] = $routeParts[$obj->index];\n\t\t}\n\n\t\treturn $attributes;\n\t}", "public function GetRouteInfo()\n {\n $result = null;\n $request = rtrim(trim(Application::$Request['url'], \"/\"));\n\n if (count($this->Routes) > 0) {\n foreach ($this->Routes as $route) {\n if ($route->Match($request)) {\n $this->CurrentRoute = $route;\n break;\n }\n }\n\n if (!is_null($this->CurrentRoute)) {\n $result = $this->CurrentRoute->GetInvokeInfo($request);\n } else {\n // @TODO To Application, redirect to 404\n trigger_error(\"[Router] No routes found for current request\", E_USER_ERROR);\n }\n } else {\n trigger_error(\"[Router] No routes registered yet\", E_USER_ERROR);\n }\n\n return $result;\n }", "public function withAttributes(array $attributes): Route;", "public function getRoute();", "private function getRoute(){\n\t}", "public function getRouteParameters()\n {\n return $this->routeParameters;\n }", "public function getRouteParameters()\n {\n return $this->routeParameters;\n }", "public function getUriVariables() {\n return $this->uriVariables;\n }", "protected function getRouteInformation(Route $route)\n {\n return $this->filterRoute([\n 'host' => $route->domain(),\n 'method' => $route->methods(),\n 'uri' => $route->uri(),\n 'name' => $route->getName(),\n 'action' => $route->getActionName(),\n 'middleware' => $this->getMiddleware($route),\n ]);\n }", "abstract public function getRoute();", "public function getRouteInfo()\r\n {\r\n $rawRoutes = $this->getRoutes();\r\n $routes = array();\r\n foreach ($rawRoutes as $route => $params){\r\n $defaults = $params->getDefaults();\r\n if (isset($defaults['_controller']))\r\n {\r\n $controllerAction = explode(':', $defaults['_controller']);\r\n $controller = $controllerAction[0];\r\n $action = isset($controllerAction[2]) ? $controllerAction[2] : $controllerAction[1];\r\n\r\n if (!isset($routes[$controller])) {\r\n $routes[$controller] = array();\r\n }\r\n\r\n $routes[$controller][$action] = array(\r\n 'route' => $route,\r\n 'controller' => $controller,\r\n 'action' => $action,\r\n );\r\n }\r\n }\r\n return $routes;\r\n }", "protected function getViewArgumentsFromRoute() {\n // The code of this function is taken in part from the view page controller\n // method (Drupal\\views\\Routing\\ViewPageController::handle()).\n $route = $this->routeMatch->getRouteObject();\n $map = $route->hasOption('_view_argument_map') ? $route->getOption('_view_argument_map') : [];\n\n $args = [];\n foreach ($map as $attribute => $parameter_name) {\n $parameter_name = isset($parameter_name) ? $parameter_name : $attribute;\n if (($arg = $this->routeMatch->getRawParameter($parameter_name)) !== NULL) {\n $args[] = $arg;\n }\n }\n return $args;\n }", "private function getRoute() {\n $path = $_SERVER['PATH_INFO'];\n\n $parts = explode('/', trim($path, '/'));\n $action = array_shift($parts);\n $this->uri_params = $parts;\n\n if (!$action) $action = 'index';\n $action .= 'Action';\n return array($this, $action);\n }", "function wp_kses_uri_attributes()\n {\n }", "public function routerParams()\n {\n /* @var Router $router */\n $router = $this->container->get('router');\n $request = $this->container->get('request_stack')->getCurrentRequest();\n\n $routeName = $request->attributes->get('_route');\n $routeParams = $request->query->all();\n $routeCollection = $router->getRouteCollection();\n /* @var CompiledRoute $compiledRouteConnection */\n $compiledRouteConnection = $routeCollection->get($routeName)->compile();\n foreach ($compiledRouteConnection->getVariables() as $variable) {\n $routeParams[$variable] = $request->attributes->get($variable);\n }\n\n return $routeParams;\n }", "public function getRoutes()\n {\n return collect($this->attributes)\n ->map(function (array $attributes) {\n return $this->newRoute($attributes);\n })\n ->merge($this->routes->getRoutes())\n ->values()\n ->all();\n }", "protected function getRouteInformation(Route $route)\n {\n if ($route->getName()) {\n return [\n 'uri' => $route->uri(),\n 'name' => $route->getName(),\n ];\n }\n\n return null;\n }", "public function getRoute(){\n return $this->route;\n }", "public function getRoute()\n {\n }", "public function get_matched_route()\n {\n }", "public static function route()\n {\n return self::$route;\n }", "public function dumpRoute()\n {\n $route = substr($this->getRouteString(), 1);\n return explode(\"/\", $route);\n }", "protected function getRouteInformation(Route $route)\n {\n list($controller, $action) = explode(\"@\", $route->getActionName());\n\n return [\n 'host' => $route->domain(),\n 'method' => implode('|', $route->methods()),\n 'uri' => $route->uri(),\n 'name' => $route->getName(),\n 'controller' => $controller,\n 'action' => $action,\n 'resource' => $route->getActionName(),\n 'middleware' => Collection::make($this->getMiddleware($route))\n ];\n }", "public function getUriVars(): array;", "public function get_route()\n {\n }", "public function getRoute()\r\n {\r\n return $this->route;\r\n }", "function route_params(): array\n{\n return RouteController::getCurrentRoute()['params'] ?? [];\n}", "public function getRoute()\n {\n return $this->route;\n }", "public function getRoute()\n {\n return $this->route;\n }", "public function getRoute()\n {\n return $this->route;\n }", "public function getRoute()\n {\n return $this->route;\n }", "public function getRoute()\n {\n return $this->route;\n }", "public function getRoute()\n {\n return $this->route;\n }", "public function getRoute()\n {\n return $this->route;\n }", "protected static function requestRoute() {\n $route = [];\n\n $currentUrlOptions = parse_url($_SERVER['REQUEST_URI']);\n $fullUri = $currentUrlOptions['path'];\n $prefixLen = strlen(self::$uriPrefix);\n if ($fullUri == self::$uriPrefix){ //all default\n $route['controller'] = '';\n $route['action'] = '';\n } elseif (substr($fullUri, 0, $prefixLen) === self::$uriPrefix) {\n $uri = substr($fullUri, $prefixLen);\n $parts = explode('/', rtrim($uri, '/'));\n $route['controller'] = ucfirst($parts[0]);\n $route['action'] = isset($parts[1]) ? ucfirst($parts[1]) : '';\n } else {\n //do nothing\n }\n\n return $route;\n }", "public static function getCallingRoute()\r\n {\r\n if(app()->has('routeResolvedData')){\r\n return app()->get('routeResolvedData');\r\n }\r\n \r\n return [];\r\n }", "public function getFullRoute();", "function getRoute() {\n\t\treturn $this->config()->route;\n\t}", "public function getParams()\n {\n return $this->getEvent()->getRouteMatch()->getParams();\n }", "public function getRoute() {\n\t\treturn $this->route;\n\t}", "public function getRoute()\n\t{\n\t\treturn $this->route;\n\t}", "public function getURI()\t{\n\t\treturn $this->route;\n\t}", "protected function getUrlParameters() {\n return $this->getAttributes();\n }", "public function getRoute()\n {\n $this->name = '';\n\n $matches = [];\n if (preg_match('/[a-f\\d]{24}/i', $this->request->getUri(), $matches)) {\n $this->id = reset($matches); # get first param in URI after /recipes/\n $this->request->setGetParam(\"id\", $this->id);\n }\n\n if ($this->request->getMethodType() == Request::METHOD_POST && strpos($this->request->getUri(),\n self::route_auth) !== false) {\n $this->name = 'auth';\n $this->isAuthNeeded = false;\n }\n\n //\tList\tGET\t/recipes\t✘\n if ($this->request->getMethodType() == Request::METHOD_GET\n && strpos($this->request->getUri(), self::route_list) !== false\n && !preg_match('/[a-f\\d]{24}/i', $this->request->getUri())\n ) {\n $this->name = 'listing';\n $this->isAuthNeeded = false;\n }\n\n // Create\tPOST\t/recipes\t✓\n if ($this->request->getMethodType() == Request::METHOD_POST\n && strpos($this->request->getUri(), self::route_create) !== false\n && (empty($this->request->getGetParam(\"id\")) || is_null($this->request->getGetParam(\"id\")))) {\n $this->isAuthNeeded = true;\n $this->name = 'create';\n }\n\n // Get\tGET\t/recipes/{id}\t✘\n if ($this->request->getMethodType() == Request::METHOD_GET\n && strpos($this->request->getUri(), self::route_list) !== false\n && preg_match('/[a-f\\d]{24}$/i', $this->request->getUri())) {\n $this->isAuthNeeded = false;\n $this->name = 'get';\n\n $matches = [];\n if (preg_match('/[a-f\\d]{24}$/i', $this->request->getUri(), $matches)) {\n $this->id = reset($matches); # get first param in URI after /recipes/\n $this->request->setGetParam(\"id\", $this->id);\n }\n }\n\n // Update\tPUT\t/recipes/{id}\t✓\n if ($this->request->getMethodType() == Request::METHOD_PUT\n && strpos($this->request->getUri(), self::route_list) !== false\n && preg_match('/[a-f\\d]{24}$/i', $this->request->getUri())) {\n $this->isAuthNeeded = true;\n $this->name = 'update';\n\n if ($this->request->getContentType() != 'application/x-www-form-urlencoded') {\n throw new Exception(\"Accept only application/x-www-form-urlencoded for PUT method\", 415);\n }\n\n $matches = [];\n if (preg_match('/[a-f\\d]{24}$/i', $this->request->getUri(), $matches)) {\n $this->id = reset($matches); # get first param in URI after /recipes/\n $this->request->setGetParam(\"id\", $this->id);\n }\n }\n\n // Update\tPATCH\t/recipes/{id}\t✓\n if ($this->request->getMethodType() == Request::METHOD_PATCH\n && strpos($this->request->getUri(), self::route_update) !== false\n && preg_match('/[a-f\\d]{24}$/i', $this->request->getUri(), $id)) {\n $this->isAuthNeeded = true;\n $this->name = 'patch';\n\n $matches = [];\n if (preg_match('/[a-f\\d]{24}$/i', $this->request->getUri(), $matches)) {\n $this->id = reset($matches); # get first param in URI after /recipes/\n $this->request->setGetParam(\"id\", $this->id);\n }\n }\n\n // Delete\tDELETE\t/recipes/{id}\t✓\n if ($this->request->getMethodType() == Request::METHOD_DELETE\n && strpos($this->request->getUri(), self::route_delete) !== false\n && preg_match('/[a-f\\d]{24}$/i', $this->request->getUri(), $id)) {\n $this->isAuthNeeded = true;\n $this->name = 'delete';\n\n }\n\n // Rate\tPOST\t/recipes/{id}/rating\t✘\n if ($this->request->getMethodType() == Request::METHOD_POST\n && strpos($this->request->getUri(), self::route_rate) !== false\n && preg_match('/[a-f\\d]{24}/i', $this->request->getUri())) {\n $this->isAuthNeeded = false;\n $this->name = 'rate';\n }\n\n // SEARCH\tPOST\t/recipes/search\t✘\n if ($this->request->getMethodType() == Request::METHOD_GET\n && strpos($this->request->getUri(), self::route_search) !== false) {\n $this->isAuthNeeded = false;\n $this->name = 'search';\n }\n\n return $this->name;\n }", "public function getRouteMatch();", "public static function extractRouteParameters($route, $url) {\n\n if (preg_match(\"/:/\", $route)) {\n\n $params = array();\n\n $routeParameterNames = preg_split(\"/\\/:/\", $route);\n $resourceBaseLocation = array_shift($routeParameterNames);\n\n $bareParameters = str_replace($resourceBaseLocation.\"/\", \"\", $url);\n\n $parameterValues = preg_split(\"/\\//\", $bareParameters);\n\n foreach($routeParameterNames as $parameterName) {\n $params[$parameterName] = array_shift($parameterValues);\n }\n\n return $params;\n }\n }", "public function getRoute() {\n \n return $this->route;\n \n }", "public function testRouteMatchesAndParamExtracted()\n {\n $resource = '/hello/Josh';\n $route = new \\Slim\\Route('/hello/:name', function () {});\n $result = $route->matches($resource);\n $this->assertTrue($result);\n $this->assertEquals(array('name' => 'Josh'), $route->getParams());\n }", "function getAdditionalParams() {\n return array(\n 'route' => $this->getRouteName(),\n ); // array\n }", "public function get()\n\t{\n\t\t\n\t\t$route = $this->__path;\n\t\t\n\t\tif( $this->__mapper )\n\t\t{\n\t\t\t\n\t\t\t$map = $this->__mapper->match($this->__path);\n\t\t\n\t\t\tif( $map )\n\t\t\t{\n\t\t\t\t$route = $map;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn self::sanetize($route);\n\t\t\n\t}", "public function testGetRouteParams()\n {\n // Prepare route\n $requestUri = '/hello/mr/anderson';\n $route = new \\Slim\\Route('/hello/:first/:last', function () {});\n\n // Parse route params\n $this->assertTrue($route->matches($requestUri));\n\n // Get params\n $params = $route->getParams();\n $this->assertEquals(2, count($params));\n $this->assertEquals('mr', $params['first']);\n $this->assertEquals('anderson', $params['last']);\n }", "protected function getFeesRouteParams()\n {\n return [\n 'licence' => $this->getFromRoute('licence'),\n 'busRegId' => $this->getFromRoute('busRegId'),\n ];\n }", "function get()\n {\n $route = substr($_SERVER['REQUEST_URI'], 1);\n // $route = explode('?', $slug)[0];\n $route = rtrim($route, \"/\");\n $matches = explode('/', $route);\n\n\n $route = $this->bind($matches);\n\n if ($route) {\n // print_r($route);\n return $route['body'];\n } else {\n set_http_code(404);\n return $this->getErrorPage('404');\n }\n }", "public function getRoute()\r\n {\r\n return $this->Route;\r\n }", "function getCurrentRoute() {\n $santitizedUrl = ''; \n if (!empty($_GET['route'])) {\n $santitizedUrl = trim($_GET['route']);\n }\n \n return $this->getMatchingRoute($santitizedUrl);\n }", "private function getVars($route) {\n if ( ! strstr($route, ':word') && ! strstr($route, ':num')) {\n return [];\n }\n $regex = str_replace(['(', ')', ':word', ':num'], [\"\", \"\", '([\\w_-]+)', '([\\d-]+)'], $route);\n $found = preg_match_all('~' . $regex . '~', $this->url, $matches, PREG_SET_ORDER);\n if ($found) {\n unset($matches[0][0]); // first match is the full url path\n return array_values($matches[0]);\n }\n\n return [];\n }", "protected function getRouteInformation(Route $route, $filter, $namespace)\n {\n $data = parent::getRouteInformation($route, $filter, $namespace);\n\n if (!$data || empty($data['name'])) {\n return null;\n }\n\n return Arr::only($data, ['uri', 'name']);\n }", "function parsePath($url)\n{\n $vars = array();\n\n if (preg_match_all('#\\{(\\w+)\\}#', $url, $matches)) {\n // First we convert the action route with its {variable_name} format to a preg-able string...\n for ($i=0; $i<count($matches[0]); $i++) {\n $str = $matches[0][$i];\n $vars[] = $matches[1][$i]; // Get the list of variables in the route into a different array.\n }\n\n // // Match - assign the values to the assoc array for return.\n // $url_variables = array();\n // for($i=0; $i<count($vars); $i++) {\n // \t$url_variables[$vars[$i]] = $route_matches[$i+1][0];\n // }\n }\n\n return $vars;\n}", "public function parseUri()\n {\n return RouteMatch::uriToRegex($this);\n }", "abstract public function getRouteMatch();", "public function fetch_route()\n\t{\n\t\treturn $this->route_stack;\n\t}", "public function url()\n {\n return $this->routeObject->url['uri'];\n }", "public function getRoutingParameters()\n {\n return $this->routing_parameters;\n }", "public static function routes()\n {\n return self::$routes;\n }", "protected function getRouteInformation(Route $route, $filter, $namespace)\n {\n $host = $route->domain();\n $methods = $route->methods();\n $uri = $route->uri();\n $name = $route->getName();\n $action = $route->getActionName();\n $laroute = Arr::get($route->getAction(), 'laroute', null);\n\n if(!empty($namespace)) {\n $a = $route->getAction();\n\n if(isset($a['controller'])) {\n $action = str_replace($namespace.'\\\\', '', $action);\n }\n }\n\n switch ($filter) {\n case 'all':\n if($laroute === false) return null;\n break;\n case 'only':\n if($laroute !== true) return null;\n break;\n }\n\n return compact('host', 'methods', 'uri', 'name', 'action');\n }", "public function &route(){\n return $this->__route;\n }", "public static function params()\n\t{\n\t\treturn self::$router->getParams();\n\t}", "public function getRouteDetails() {\n\t\treturn \"/showDetail\";\n\t}", "static function route($url)\n {\n return App::router()->extractRoute($url);\n }", "public function retrieve()\n {\n return (array) $this->routes;\n }", "public function testRouteMatchesAndMultipleParamsExtracted()\n {\n $resource = '/hello/Josh/and/John';\n $route = new \\Slim\\Route('/hello/:first/and/:second', function () {});\n $result = $route->matches($resource);\n $this->assertTrue($result);\n $this->assertEquals(array('first' => 'Josh', 'second' => 'John'), $route->getParams());\n }", "private static function xml_route(){\n\t\t\n\t\t$xml_routes=new Parser();\n\t\t$xml_routes->load_from_file('routes.xml');\n\t\t$request=(isset($_GET['request']))?$_GET['request']:'/index';\n\t\t$route_found=false;\n\t\t\n\t\t$routes=$xml_routes->getElementsByAttributeValue('method', Request::get_request_type());\n\t\t\n\t\t$str_routes=\"\";\n\t\t$found_route=null;\n\t\tforeach ($routes as $item){\n\t\t\t\n\t\t\tif($item->nodeType==XML_ELEMENT_NODE){\n\t\t\t\tforeach($item->childNodes as $attr){\n\t\t\t\t\t\n\t\t \tif($attr->nodeType==XML_ELEMENT_NODE){\n\t\t \n\t\t \t\tif($attr->tagName==\"request\"){\n\t\t \t\t\tif($item->getAttribute('method')==$_SERVER['REQUEST_METHOD']){\n\t\t \t\t\t\t$match_route=$item->cloneNode(true);\n\t\t \t\t\t\t//print \"{$match_route->getElementsByTagName('request')->item(0)->nodeValue}\\n\";\n\t\t \t\t\t\t\n\t\t \t\t\t\t$controller=$match_route->getElementsByTagName('controller')->item(0)->nodeValue;\n\t\t \t\t\t\t$action=$match_route->getElementsByTagName('action')->item(0)->nodeValue;\n\t\t \t\t\t\t\n\t\t \t\t\t\t$match=str_ireplace('/','\\\\/',$match_route->getElementsByTagName('request')->item(0)->nodeValue);\n\t\t \t\t\t\t//$match.=\"(\\\\/(.*))?\";\n\t\t \t\t\t\t$match='/^'.$match.'$/';\n\t\t \t\t\t\t$replace=\"/$controller/$action\";\n\t\t \t\t\t\tif($match_route->getAttribute('args')==true){\n\t\t \t\t\t\t\t$number_args=($match_route->getAttribute('argsnum')!==null)?$match_route->getAttribute('argsnum'):1;\n\t\t \t\t\t\t\tfor($i=1;$i<=$number_args;$i++)\n\t\t \t\t\t\t\t$replace.=\"/$\".$i;\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(preg_match($match, $request)){\n\t\t \t\t\t\t\t$request=preg_replace($match,$replace,$request);\n\t\t \t\t\t\t\t$found_route=$item->cloneNode(true);\n\t\t \t\t\t\t\t\n\t\t \t\t\t\t\t//print \"Found\\n\";\n\t\t \t\t\t\t\tbreak;\n\t\t \t\t\t\t}\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t\t\t}\n\t\t }\n\t\t if($found_route!==null){\n\t\t \tbreak;\n\t\t }\n\t\t}\n\t\t\n\t\treturn $request;\n\t}", "function route_uri(): string\n{\n return RouteController::getCurrentRoute()['uri'] ?? '';\n}", "public function GetRouteGetRequestsOnly ();", "public function getRoute($name){ }", "public function getAttributes() {}", "public function getAttributes() {}", "public function get_route($request_route) {\n\n\n if (array_key_exists($request_route[\"_method\"], $this->_routes)) {\n\n if (array_key_exists($request_route[\"_rule\"], $this->_routes[$request_route[\"_method\"]])) {\n return $this->_routes[$request_route[\"_method\"]][$request_route[\"_rule\"]];\n } else { // search for match routes\n\n foreach ($this->_routes[$request_route[\"_method\"]] as $_route) {\n\n if ($_route->_match) {\n\n $request_rule = explode(\"/\", trim($request_route[\"_rule\"], \"/\"));\n $permit_rule = explode(\"/\", trim($_route->_rule, \"/\"));\n\n if (count($request_rule) == count($permit_rule)) {\n $match = true;\n foreach ($request_rule as $index => $value) {\n\n if (($request_rule[$index] != $permit_rule[$index]) and ($permit_rule[$index] != ApplicationRoute::dynamical_segment)) {\n $match = false;\n break;\n }\n }\n if ($match) {\n\n $permit_match_rule = explode(\"/\", trim($_route->_match_rule, \"/\"));\n preg_match_all('@:([\\w]+)@', $_route->_match_rule, $segments, PREG_PATTERN_ORDER);\n $segments = $segments[0];\n\n // get methodları için locals'a yükle : değişkenler\n foreach ($segments as $segment) {\n if ($index = array_search($segment, $permit_match_rule)) {\n $_route->_locals[substr($segment, 1)] = $request_rule[$index];\n }\n }\n\n return $_route;\n }\n }\n }\n }\n }\n return null;\n //throw new ConfigurationException(\"Böyle bir yönlendirme mevcut değil\", $request_route[\"_method\"] . \":\" . $request_route[\"_rule\"]);\n }\n throw new ConfigurationException(\"Uzay çağında bizim henüz desteklemediğimiz bir method\", $request_route[\"_method\"]);\n }", "public function useRoute(){\n\t\t\t$routeParts = explode(\"@\", $this->matchingRoute->location);\n\t\t\treturn [\"controller\" => ucfirst($routeParts[0]), \"method\" => $routeParts[1]];\n\t\t}", "function name_and_representation_in_url() {\n preg_match(URI_REGEX, request_uri(), $request_matches);\n return array(\n (isset($request_matches[1]) ? $request_matches[1] : ''),\n (isset($request_matches[2]) ? $request_matches[2] : ''),\n );\n}", "function getRoute()\n{\n\t// Get the requested uri from the server exluding the domain name.\n\t$uri = strtok($_SERVER['REQUEST_URI'], '?');\n\n\t// Remove the site path from the uri so we only get the segments\n\t// that we actually want.\n\t$uri = str_replace(SITE_PATH, '', $uri);\n\n\treturn $uri;\n}", "function getRouteName();", "public function getRoutes() {\n \treturn $this->routes;\n }", "public function getRouteParams(Route $route, $uri)\n {\n if (!$route->matches($uri)) {\n throw new \\Exception(\"Route doesn't match\");\n }\n\n $params = array();\n $routeParts = explode(\"/\", trim($route->getPattern(), \"/\"));\n $uriParts = explode(\"/\", trim($uri, \"/\"));\n\n foreach ($routeParts as $index => $part) {\n if ($part != $uriParts[$index]) {\n $params[] = $uriParts[$index];\n }\n }\n\n return $params;\n }", "public function getArguments()\n\t{\n\t\treturn $this->router->getArguments();\n\t}", "public function getAttribute(string $name) : string\n {\n\n if (isset($this->attributes[$name]) === true) {\n return $this->attributes[$name]['value'];\n }\n\n try {\n throw new ParamOtosetException('routeAttributeByName', array_keys($this->attributes), $name);\n } catch (ParamOtosetException $e) {\n throw new MethodFopException('getNonexistingAttributeForRoute', $e);\n }\n }", "public function getRoute(): Route;", "public function getRoute() : string\n {\n return $this->route;\n }", "public static function getRoutes()\n {\n $a = array();\n $router = ROUTER::init();\n foreach ($router->assigns as $ass)\n {\n if (isset($ass['module']) and isset($ass['action']))\n {\n $a[] = array('route' => $ass['route'], 'execute' => $router->current_dir . '/' . $ass['module'] . '/' . $ass['action'] . '.action.php');\n }\n elseif (isset($ass['function']))\n {\n $a[] = array('route' => $ass['route'], 'function' => $ass['function']);\n }\n else\n {\n /*do nothing*/;\n }\n }\n return $a;\n }", "protected function getRouteParams(): array {\n return [];\n }", "public function getNodeRouteConfig();" ]
[ "0.68718106", "0.68537116", "0.66074836", "0.6521723", "0.64873403", "0.64407164", "0.6423572", "0.6364359", "0.6329508", "0.6279329", "0.6252957", "0.6234097", "0.62258506", "0.6168935", "0.61498904", "0.6120969", "0.6120969", "0.61090815", "0.6063787", "0.6053264", "0.6018171", "0.601629", "0.60161644", "0.59982735", "0.5991627", "0.5984162", "0.5977469", "0.59013814", "0.5873212", "0.5866932", "0.58509445", "0.5839504", "0.5825548", "0.58209354", "0.58186704", "0.58028024", "0.5741588", "0.573618", "0.573618", "0.573618", "0.573618", "0.573618", "0.573618", "0.573618", "0.5733304", "0.57169676", "0.57146126", "0.5692695", "0.5681129", "0.5678999", "0.5675523", "0.5674874", "0.5673064", "0.56678325", "0.5660575", "0.564958", "0.5648686", "0.5632591", "0.562387", "0.5613082", "0.56062704", "0.5602921", "0.55911624", "0.5581271", "0.55781186", "0.55779654", "0.55767965", "0.55676055", "0.5524711", "0.55091226", "0.5503786", "0.5498627", "0.54972845", "0.54953045", "0.5481516", "0.54814154", "0.548128", "0.5479747", "0.54755324", "0.547005", "0.5467646", "0.5460343", "0.54584795", "0.54545903", "0.54398334", "0.5421721", "0.54213303", "0.5418069", "0.54177105", "0.5407372", "0.54054236", "0.5399507", "0.53960544", "0.5389857", "0.5382763", "0.53566986", "0.53548175", "0.53464097", "0.53425807", "0.5338045", "0.53262144" ]
0.0
-1
Returns instance with specific controller
public function withController($controller): Route;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getController( );", "public function getController();", "public function getController();", "public function getController();", "public function & GetController ();", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "private function getControllerToRun()\n {\n $routing = $this->getRouting();\n $module = strtolower($this->urlParams[self::PARAM_CONTROLLER]);\n \n $module = strtr($module, '-', '_');\n \n // Check if we have routing to this module\n if (isset($routing[$this->apiType][$module])) {\n $controllerName = $routing[$this->apiType][$module];\n } else {\n // Call default controller\n $controllerName = $routing[$this->apiType][self::DEFAULT_CONTROLLER_ROUTE_NAME];\n }\n \n if (class_exists($controllerName)) {\n return new $controllerName();\n }\n \n self::debug(\"Fatal error: Controller ({$controllerName}) not found\");\n }", "public static function controller()\n\t{\n\t\treturn self::$router->getController();\n\t}", "protected function _getController()\n\t{\n\t\treturn $this->_registry->getController();\n\t}", "public function getController()\n {\n return $this->__get($this->getControllerKey());\n }", "static public function controller() {\n\t\treturn self::$controller;\n\t}", "public function getController()\n {\n return $this->Controller();\n }", "public function getController(){//Show\n return $this->controller;\n }", "public function get_controller() {\n\t\treturn $this->controller;\n\t}", "public function get_controller() {\r\n\t\treturn $this->controller;\r\n\t}", "public function getController()\n {\n $match = $this->_getMatch();\n return $match[0];\n }", "public function controller()\n {\n return $this->controller;\n }", "protected function getController()\n\t{\n\t\treturn $this->controller;\n\t}", "public function getController(): Controller {\n\t\t$action = Check::key( $this->request->get( 'action' ), '' );\n\n\t\tif ( !$action ) {\n\t\t\treturn $this->getDefaultController();\n\t\t}\n\n\t\t$controller_class = $this->controller_namespace . $action;\n\n\t\tif ( !\\class_exists( $controller_class ) ) {\n\t\t\treturn $this->getDefaultController();\n\t\t}\n\n\t\treturn $this->instanceController( $controller_class );\n\t}", "function getController() {\n\t\treturn $this->Controller;\n\t}", "public function GetController () {\n\t\treturn $this->controller;\n\t}", "public function get_controller()\n {\n return $this->_controller;\n }", "public function getController()\n {\n return $this->controller;\n }", "public function getController()\n {\n return $this->controller;\n }", "public function getController()\n {\n return $this->controller;\n }", "public function getController()\n {\n return $this->controller;\n }", "public function getController()\n {\n return $this->controller;\n }", "public function getController()\n {\n return $this->controller;\n }", "public function getController()\n {\n return $this->controller;\n }", "public function getController()\n {\n return $this->controller;\n }", "public function getController()\n {\n return $this->controller;\n }", "public function getController()\n {\n return $this->controller;\n }", "public function getController()\n {\n return $this->controller;\n }", "public function getController() {\n \n return $this->controller;\n \n }", "function &getInstance (&$controller) {\n\n\t\tstatic $instance;\n\t\tif (!isset($instance)) {\n\n\t\t\t$c = __CLASS__;\n\t\t\t$instance = new $c();\n\t\t\t$instance->_controller =& $controller;\n\t\t}\n\t\treturn $instance;\n\t}", "public function controller()\n {\n if ($this->controller === null) {\n return $this->defaultController();\n }\n\n return $this->controller;\n }", "public function getController() {\n return $this->controller;\n }", "protected function _controller() {\n\t\treturn $this->_container->controller;\n\t}", "public function getController()\n {\n return $this->_controller;\n }", "public function getController()\n {\n return $this->_controller;\n }", "public function getController() {\r\n\t\treturn $this->controllerObject;\r\n\t}", "public function getController()\n {\n return $this->getContext()->getController();\n }", "public function controller($controller)\n {\n $controller = $this->getControllerName($controller);\n if (!$this->hasController($controller)) {\n $this->addController($controller);\n }\n return $this->getController($controller);\n }", "public function GetController ();", "public static function getController()\n {\n return self::getInstance()->urlParams[self::PARAM_CONTROLLER];\n }", "public function getController()\n\t{\n\t\treturn $this->controller;\n\t}", "public function getController()\n\t{\n\t\treturn $this->controller;\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function activeController()\n {\n return $this->controller;\n }", "function &get_instance()\n{\n return KISS_Controller::get_instance();\n}", "public function getController()\n {\n if (!empty($this->_registry)) {\n return $this->_registry->getController();\n }\n\n return $this->_Controller;\n }", "protected function getFrontendController() {}", "function getInstance(){\n\treturn MVC_controller::getInstance();\n}", "public function getController()\n {\n return $this->sController;\n }", "public function getController() {\n \t\n \t// Return our controller\n \treturn $this->sController;\n }", "public function getController()\n {\n $class = $this->parseControllerCallback()[0];\n\n if (! $this->controller) {\n $this->controller = $this->container->make(\"App\\\\Controllers\\\\\".$class);\n }\n\n return $this->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 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}", "protected function _getController($exception) {\n\t\t$this->controller = parent::_getController($exception);\n\t\t$this->request = $this->controller->request;\n\t\t$this->controller->response->httpCodes($this->statusCodes); // make custom statuscodes available for use\n\t\treturn $this->controller;\n\t}", "public function getControllerAction() {}", "abstract public function getControllerAction();", "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 function getController()\n {\n return $this->str_controller;\n }", "function getController($context) {\n\t\t$uri=$context->getURI();\n\t\t$path=$uri->getPart();\n\t\tswitch ($path) {\n\t\t\tcase 'admin':\n\t\t\t\treturn getAdminController($context);\n\t\t\tcase '':\n\t\t\t\t$uri->prependPart('home');\n\t\t\t\treturn 'Static';\n\t\t\tcase 'static':\n\t\t\t\treturn 'Static';\n\t\t\tcase 'login':\n\t\t\t\treturn 'Login';\n\t\t\tcase 'logout':\n\t\t\t\treturn 'Logout';\n\t\t\tcase \"checkout\":\n\t\t\t\treturn \"Checkout\";\n\t\t\tcase \"myShoppingCart\":\n\t\t\t return \"ShoppingCart\";\n\t\t\tdefault:\n\t\t\t\tthrow new InvalidRequestException (\"No such page \");\n\t\t}\n\t}", "public function controller()\r\n {\r\n $collector = $this->getControllerCollector();\r\n \r\n foreach (func_get_args() as $controller) {\r\n call_user_func([$collector, 'controller'], $controller);\r\n }\r\n }", "public function GetControllerClass ();", "public function getController()\n\t{\t\n\n\t\t$parsed = $this->getAsArray();\n\t\t\n\t\tif( ! empty($parsed) )\n\t\t{\n\t\t\tif( $this->getPrefix() )\n\t\t\t{\n\t\t\t\tarray_shift($parsed);\n\t\t\t}\n\t\t\tif( ! empty($parsed) )\n\t\t\t{\n\t\t\t\treturn $parsed[0];\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static function get(){ \n if (self::$instance === null) {\n self::$instance = new ArticleController();\n }\n return self::$instance;\n }", "public function getController($constraint = null) {\n\t\t$r = new \\ReflectionClass($this->controllerClass);\n\t\treturn $r->newInstanceArgs($constraint);\n\t}", "public function getController()\n {\n if (is_null($this->_controller)) {\n $controller = $this->getConfiguration()\n ->get('router.controller', 'pages');\n if (isset($this->_params['controller'])) {\n $controller = $this->_params['controller'];\n }\n $this->_controllerName = $controller;\n $this->_controller = trim(\n \"{$this->namespace}\\\\\". ucfirst($controller),\n '\\\\'\n );\n }\n return $this->_controller;\n }", "public function show()\n {\n new $this->controller();\n }", "public function getDefaultController();", "private function getController($controller) {\n if (isset($this->routes[$controller])) {\n return $this->routes[$controller];\n }\n\n return null;\n }", "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 }", "public function getController() {\n\n\t\t\t$masterView = new \\permag\\view\\MasterView();\n\n\t\t\tif (isset($_GET[self::PAGE_CONTROLLER]) && $_GET[self::PAGE_CONTROLLER] != '') {\n\t\t\t\treturn $_GET[self::PAGE_CONTROLLER];\n\t\t\t\n\t\t\t} else {\n\t\t\t\t$this->redirectTo($this->getHomeLink());\n\n\t\t\t}\n\t\t}", "public function getRequestInstance(){\n\t\treturn ControllerRequest::getInstance();\n\t}", "public function controller($controller = null)\n {\n if ($controller === null) {\n // Act as a getter\n return $this->controller;\n }\n\n // Act as a setter\n $this->controller = (string) $controller;\n\n return $this;\n }", "private function getDefaultController(): Controller {\n\t\t$default_controller_class = $this->controller_namespace . self::DEFAULT_CONTROLLER;\n\n\t\treturn $this->instanceController( $default_controller_class );\n\t}", "private function getController() {\n\n $controller = 'index';\n $action = 'index';\n\n if ($this->route) {\n\n /**\n * Get the controller and/or action from the route.\n *\n * 0: Controller\n * 1: Action\n * 2+: Additional params\n */\n $controller = request::getRoute(0);\n if(request::getRoute(1)) {\n $action = request::getRoute(1);\n }\n\n /**\n * Loop through and gather any params that\n * might be accompanying the route.\n */\n $done = false;\n $index = 2;\n while (!$done) {\n if (request::getRoute($index)) {\n array_push($this->params, request::getRoute($index));\n $index++;\n } else {\n $done = true;\n }\n }\n\n }\n\n // Set the controller and action.\n $this->controller = $controller;\n $this->action = $action;\n\n // set the file path\n $this->file = $this->path .'/'. $this->controller . '.php';\n }", "public function getControllerAction()\n {\n $router = $this->serviceManager->get('router');\n $request = $this->serviceManager->get('request');\n $routeMatch = $this->serviceManager->get('Application')->getMvcEvent()->getRouteMatch();\n $routeMatch = $router->match($request);\n if (!is_null($routeMatch)) {\n //echo $routeMatch->getMatchedRouteName();\n $controller = strtolower($routeMatch->getParam('controller'));\n $action = strtolower($routeMatch->getParam('action'));\n $this->controller_action = sprintf(\"%s_%s\", strtolower($controller), strtolower($action));\n } else {\n $this->controller_action = 'application_index';\n }\n }", "public function getController(): string\n {\n return $this->controller;\n }", "public function getController(): string\n {\n return $this->controller;\n }", "public function getController() {\n if (!$this->controller instanceof baxe_App_Web_Controller_Abstract) {\n $this->controller = new baxe_App_Web_Controller_Front($this);\n }\n return $this->controller;\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 getController() //string(4) \"home\"\n {\n \n return $this->controller;\n\n }", "public function setController($controller);", "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 controller()\n {\n return $this->context;\n }", "function load_controller($controller) {\n require_once \"{$this->trails_root}/controllers/{$controller}.php\";\n $class = Trails_Inflector::camelize($controller) . 'Controller';\n if (!class_exists($class)) {\n throw new Trails_UnknownController(\"Controller missing: '$class'\");\n }\n return new $class($this);\n }", "public function GetControllerAction ();", "public function getIndex() \n\t{\n\t\treturn $this->idController;\n\t}", "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 }", "public function getIdController() \n\t{\n\t\treturn $this->idController;\n\t}", "public function getDefaultController() {\r\n\t\treturn $this->defaultController;\r\n\t}", "public static function getController($_controllerName)\n {\n if (! class_exists($_controllerName)) {\n throw new Exception(\"Controller\" . $_controllerName . \"not found.\");\n }\n \n if (!in_array('Controller_Interface', class_implements($_controllerName))) {\n throw new Exception(\"Controller $_controllerName does not implement ControllerInterface.\");\n }\n \n return call_user_func(array($_controllerName, 'getInstance'));\n }", "public function getController()\n\t{\n\t\t$className = strtolower(get_class($this));\n\t\t$className = preg_replace('/_controller$/', '', $className);\n\n\t\treturn $className;\n\t}", "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 }", "private function getUserFormController()\n {\n if ($this->userFormController) {\n return $this->userFormController;\n } else {\n if ($this->UserForm()->exists()) {\n return $this->userFormController = new UserDefinedForm_Controller($this->UserForm());\n }\n }\n\n return $this->userFormController = null;\n }", "function get_controller() {\n\n $parts = explode('/', $this->request_uri);\n if (count($parts) > 2) {\n return $parts[2];\n }\n return null;\n }", "public static function getInstance() {\n if (self::$instance == NULL) {\n self::$instance = new ModelController();\n }\n return self::$instance;\n }" ]
[ "0.74379545", "0.7347662", "0.7347662", "0.7347662", "0.71493137", "0.69633925", "0.68714404", "0.6871033", "0.68496025", "0.6798696", "0.6794582", "0.67191374", "0.67021775", "0.66841817", "0.6675059", "0.6658629", "0.66533273", "0.66448826", "0.6633175", "0.66272646", "0.66236866", "0.6617265", "0.6616467", "0.6616467", "0.6616467", "0.6616467", "0.6616467", "0.6616467", "0.6616467", "0.6616467", "0.6616467", "0.6616467", "0.6616467", "0.6589364", "0.6583338", "0.65802073", "0.65643746", "0.65596795", "0.6545162", "0.6545162", "0.6532347", "0.65308356", "0.6524827", "0.65217197", "0.65202063", "0.6511447", "0.6511447", "0.645452", "0.6440703", "0.64153415", "0.64090896", "0.63973516", "0.6394173", "0.63931036", "0.63672227", "0.63579273", "0.6345552", "0.6307622", "0.62592435", "0.6239905", "0.6233678", "0.6229714", "0.62271196", "0.6209179", "0.6192306", "0.61670303", "0.6163363", "0.6148605", "0.61456597", "0.6142515", "0.613481", "0.61333984", "0.6127487", "0.61191976", "0.6117638", "0.6093989", "0.6091119", "0.60736454", "0.60270786", "0.6020625", "0.6004056", "0.6004056", "0.6002001", "0.599929", "0.598909", "0.59680796", "0.59509474", "0.5925266", "0.5889779", "0.5889262", "0.58890283", "0.5869731", "0.58642656", "0.5856136", "0.58546835", "0.5853347", "0.58449966", "0.5837932", "0.58363163", "0.5835568" ]
0.5825954
100
Should return callable that accepts psrrequest and return psrresponse instances or Controller instance.
public function getController();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __invoke(Request $request): Response;", "abstract function __invoke(RequestInterface $request, ResponseInterface $response, callable $next);", "public function call()\n {\n if (is_string($this->callable)) {\n $params = explode('#', $this->callable);\n $controller = Router::$controllersPath . $params[0];\n $controller = new $controller;\n extract($this->globals);\n $this->callMiddleware();\n\n call_user_func_array([$controller, $params[1]], $this->matches);\n } else {\n $this->callMiddleware();\n call_user_func_array($this->callable, $this->matches);\n }\n\n return request();\n }", "public function & GetController ();", "public function process(ServerRequestInterface $request, RequestHandlerInterface $next): ResponseInterface\n {\n /** @var Route $route */\n $route = $this->router->find(\n $request->getMethod(),\n $request->getUri()->getPath()\n );\n\n $controller = $route->getController();\n\n if ($request instanceof ServerRequest) {\n $request = $request->withAttributes($route->getAttributes());\n }\n\n if (is_string($controller) &&\n class_exists($controller) &&\n is_subclass_of($controller, Controller::class)\n ) {\n /** @var Controller $instance */\n $instance = $this->resolver->resolve($controller);\n return $instance($request);\n }\n\n if (is_callable($controller)) {\n $response = $controller($request);\n if (!$response instanceof ResponseInterface) {\n throw ControllerException::forInvalidReturnValue();\n }\n\n return $response;\n }\n\n throw ControllerException::forMissingController($route->getPath());\n }", "public function process(ServerRequestInterface $request, RequestHandlerInterface $next): ResponseInterface\n {\n /** @var Route $route */\n $route = $this->router->findRoute(\n $request->getMethod(),\n $request->getUri()->getPath()\n );\n\n $controller = $route->getController();\n\n if ($request instanceof ServerRequest) {\n $request = $request->withAttributes($route->getAttributes());\n }\n\n if (is_string($controller) &&\n class_exists($controller) &&\n in_array(Controller::class, class_implements($controller))\n ) {\n /** @var Controller $instance */\n $instance = $this->resolver->resolve($controller);\n return $instance($request);\n }\n\n if (is_callable($controller)) {\n $response = $controller($request);\n if (!$response instanceof ResponseInterface) {\n throw HttpModuleException::controllerMustReturnValidResponse();\n }\n\n return $response;\n }\n\n throw HttpModuleException::couldNotRetrieveControllerForRoute($route->getPath());\n }", "public function call($request, $response);", "public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next);", "public static function dispatch($request) {\n\n if (isset($_SESSION)) {\n // $newRequest = new Request();\n $request->write('controller', 'user');\n }\n\n $controllerName = ucfirst($request->getControllerName()) . 'Controller';\n if (!class_exists($controllerName)) {\n throw new Exception(\"$controllerName does not exist\");\n }\n \n $controller = new $controllerName($request);\n\n return $controller;\n }", "function rest_dispatch_requests( $response, $request ) {\n\t$attributes = $request->get_attributes();\n\tlist( $callback_class, $callback_func ) = ( ! empty( $attributes['callback'] ) ) ? $attributes['callback'] : [];\n\n\t// If the request is using the WP_REST_Posts_Controller, call the same callback from our custom controller.\n\tif (\n\t\tis_object( $callback_class )\n\t\t&& get_class( $callback_class ) === 'WP_REST_Posts_Controller'\n\t\t&& ( $callback_func === 'create_item' || $callback_func === 'update_item' )\n\t) {\n\t\t$controller = new REST_Posts_Controller( get_post_type( $request->get_params()['id'] ) );\n\n\t\treturn call_user_func( [ $controller, $callback_func ], $request );\n\t}\n\n\treturn $response;\n}", "public function processRequest(RequestInterface $request): ControllerResultInterface;", "public function resolve() : mixed\n {\n $method = $this->request->getMethod();\n $url = $this->request->getUrl();\n $callback = $this->routeMap[$method][$url] ?? false;\n if (!$callback) {\n\n $callback = $this->getCallback();\n\n if ($callback === false) {\n throw new NotFoundException();\n }\n }\n if (is_string($callback)) {\n return $this->renderView($callback);\n }\n if (is_array($callback)) {\n /**\n * @var $controller \\kingstonenterprises\\app\\Controller\n */\n $controller = new $callback[0];\n $controller->action = $callback[1];\n Application::$app->controller = $controller;\n /*$middlewares = $controller->getMiddlewares();\n foreach ($middlewares as $middleware) {\n $middleware->execute();\n }*/\n $callback[0] = $controller;\n }\n return call_user_func($callback, $this->request, $this->response);\n }", "public function run(RequestInterface $request, callable $default): ResponseInterface;", "public function call(){\n if(is_string($this->callable)){\n $params = explode('#', $this->callable);\n $controller = \"Controllers\\\\\".$params[0].\"Controller\";\n $controller = new $controller();\n return call_user_func_array([$controller, $params[1]], $this->matches);\n } else {\n return call_user_func_array($this->callable, $this->matches);\n }\n }", "public function GetController ();", "public function getController( );", "public function makeResponse(): ResponseInterface;", "protected function dispatchRequest(Http\\Request $request, Http\\Response $response)\n {\n $route = $this->router->getMatchedRoutes($request->getMethod(), $request->getPathInfo(), false);\n\n if (is_null($route)) {\n throw new \\RouteNotFoundException(\"uri path not found allowed method!\");\n }\n\n /**\n * 支持function直接调用\n */\n $lostrcallable = $this->router->getCurrentRouteCallable();\n if ($lostrcallable instanceof \\Closure && is_callable($lostrcallable)) {\n return $lostrcallable;\n }\n\n $callable = null;\n $matches = array();\n if (is_string($lostrcallable) && preg_match('!^([a-zA-Z0-9]+)\\@([a-zA-Z0-9]+)$!', $lostrcallable, $matches)) {\n $class = $matches[1];\n $method = $matches[2];\n\n $callable = function () use ($class, $method) {\n static $obj = null;\n if ($obj === null) {\n\n $obj = new $class;\n }\n\n return call_user_func_array(array($obj, $method), func_get_args());\n };\n }\n\n if (!is_callable($callable)) {\n throw new \\Exception('Route callable must be callable');\n }\n\n return $callable;\n }", "public function __invoke(\n RequestInterface $request,\n ResponseInterface $response,\n DelegateInterface $next = null\n )/*# : ResponseInterface */ {\n return $this->process($request, $response, $next);\n }", "public function setRequest(RequestInterface $request): ControllerInterface;", "abstract public function apply(Request $request, Response $response, Closure $next);", "public function __invoke(Request $request, Response $response)\n {\n $result = call_user_func($this->transport, $request);\n\n return $result instanceof Response ? $result : $response;\n }", "public function __invoke(Request $request, Response $response, callable $next): Response\n {\n // Carry about Cross Origin only if it is an API request\n if ($request->getAttribute('resource') === ResourceMiddleware::RESOURCE_API) {\n // Retrieve origin of request\n $origin = $request->getServerParam('HTTP_ORIGIN', '');\n if ($origin !== '' && in_array($origin, $this->settings['crossOrigin'])) {\n // If origin is allowed, add header\n $response = $response->withHeader('Access-Control-Allow-Origin', $origin);\n } else {\n // Else, refuse the request\n return $response->withStatus(403)->withJson([\n 'code' => 403,\n 'content' => \"Not authorized because of Cross-Origin.\\n\"\n . \" PhpUnitGen RESTFull API is only available for phpunitgen.io domain.\\n\"\n . \" Please contact server administrator to get an access.\"\n ]);\n }\n }\n\n return $next($request, $response);\n }", "private function getControllerToRun()\n {\n $routing = $this->getRouting();\n $module = strtolower($this->urlParams[self::PARAM_CONTROLLER]);\n \n $module = strtr($module, '-', '_');\n \n // Check if we have routing to this module\n if (isset($routing[$this->apiType][$module])) {\n $controllerName = $routing[$this->apiType][$module];\n } else {\n // Call default controller\n $controllerName = $routing[$this->apiType][self::DEFAULT_CONTROLLER_ROUTE_NAME];\n }\n \n if (class_exists($controllerName)) {\n return new $controllerName();\n }\n \n self::debug(\"Fatal error: Controller ({$controllerName}) not found\");\n }", "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 }", "private function execute(ServerRequestInterface $request) : ResponseInterface\n {\n $result = $this->container->getRouter()->resolve($request);\n $stack = $this->middleware;\n\n if ($result->isMatch()) {\n $stack = array_merge($stack, $result->getRoute()->getStack());\n }\n\n if ($result->isNotFound()) {\n $stack = array_merge($stack, [$this->container->getNotFoundController()]);\n }\n\n if ($result->isNotAllowed()) {\n $stack = array_merge($stack, [$this->container->getNotAllowedController()]);\n }\n\n $stack = new Stack($this->container->getDefaultController(), $stack);\n\n $request = $this->container->getRequest();\n $request = $request->withAttribute(static::ROUTE, $result->getRoute());\n $request = $request->withAttribute(static::ROUTE_STATUS, $result->getStatus());\n $request = $request->withAttribute(static::ROUTE_PARAMS, $result->getParams());\n\n return $stack->handle($request);\n }", "public function execute (Request $request)\n {\n $result = null;\n if (is_object($this->callback))\n {\n $result = call_user_func_array ($this->callback, $this->getInput($request->getPath()));\n }\n else\n {\n $separator = strpos($this->callback, '@');\n if ($separator!==false)\n {\n $controller = substr ($this->callback, 0, $separator);\n $method = substr ($this->callback, $separator+1);\n if ($controller!==false)\n {\n $class = '\\\\App\\\\Controller\\\\'.$controller;\n if ($method===false)\n {\n $method = 'index';\n }\n //class_alias ($class,'Controller');\n $object = new $class;\n $result = call_user_func_array ([$object, $method], $this->getInput($request->getPath()));\n }\n }\n }\n return $result;\n }", "public function RouteRequest ();", "public function processRequest(): ResponseInterface\n {\n $routes = $this->bs->routes();\n $request = new Request($this->bs->globals());\n $routingEngine = new RoutingEngine($routes);\n $result = $routingEngine->resolve(\n $request->method(),\n $request->uri()\n );\n if($result === null) {\n return new TextResponse(\"404 page not found\");\n }\n $requestHandler = new RequestHandler(\n $this,\n $request,\n $this->bs->middlewares(),\n $result\n );\n $response = $requestHandler->handleRequest();\n return $response;\n }", "private function resolveRequest(){\n\t\t$controllers_dir = puppy::getAppDir().'controllers';\n\t\t$path_segments = explode('/', $this->getPathInfo());\n\t\t\n\t\t$controller_location = null;\n\t\t$controller_name = null;\n\t\t$action_name = null;\n\t\t\n\t\t//build path to controller\n\t\t$build_path = $controllers_dir;\n\t\tforeach($path_segments as $k => $dir){\n\t\t\t$build_path = $build_path.'/'.$dir;\n\t\t\tif(file_exists($build_path.\"/\")){\n\t\t\t\tif(is_dir($build_path)){\n\t\t\t\t\t$controller_location = $build_path;\n\t\t\t\t\tif(is_file($build_path.'/'.$dir.'.php')){\n\t\t\t\t\t\t$controller_name = $dir;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$action_name = $dir;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//call action\n\t\tif(file_exists($controller_location.'/'.$controller_name.'.php')){\n\t\t\t//wrap require in try catch to state file has error\n\t\t\trequire_once($controller_location.'/'.$controller_name.'.php');\n\t\t\t$controller = new $controller_name();\n\t\t\tif($action_name !== null)\n\t\t\t\t$controller->$action_name();\n\t\t}\n\t}", "public function execute(RequestInterface $request, ResponseInterface $response): ResponseInterface;", "public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }", "public function run($request = null)\n {\n return $response = $this->dispatch($request);\n// if ($response instanceof Response) {\n// $response->send();\n// } else {\n// echo (string)$response;\n// }\n }", "public function invoke(Request $request) : Response\r\n {\r\n $class = $this->container->make($this->class);\r\n\r\n return call_user_func([\r\n $class,\r\n $this->method\r\n ], $request);\r\n }", "public function dispatch(Request $request, Response $response) {\n $controller = $this->getController($request);\n $actionName = $request->getActionName();\n $parameters = $request->getParameters();\n\n $callback = $this->processAction($controller, $actionName, $parameters);\n\n $this->prepareController($controller, $request, $response, $actionName, $parameters);\n\n $this->zibo->triggerEvent(self::EVENT_PRE_DISPATCH, $controller, $actionName, $parameters);\n\n $controller->preAction();\n $returnValue = $callback->invokeWithArrayArguments($parameters);\n $controller->postAction();\n\n $this->zibo->triggerEvent(self::EVENT_POST_DISPATCH, $controller, $actionName, $parameters);\n\n return $returnValue;\n }", "public function __invoke(Resolver $resolver): Response;", "public function handle(RequestInterface $request): ResponseInterface;", "abstract protected static function getResponse(Request $request, Validator $validator): Response;", "public function resolve() {\n $path = $this->request->getPath();\n $method = $this->request->getMethod();\n $callback = $this->routes[$method][$path] ?? false;\n\n if ($callback === false) {\n $this->response->setStatusCode(404);\n //Configuring the status of the request to 404 always that a requisition to a non mapping route is made \n return $this->renderView('_404');\n }\n if (is_string($callback)) {\n // Assuming that if callback is a string, we will resolve it in a view\n\n return $this->renderView($callback);\n }\n if (is_array($callback)) {\n $callback = new $callback[0];\n // If it's an array, this means that the method to send data was POST and we need to create an object to be able to use this object to call render method from Controller class in class SiteController\n }\n\n return call_user_func($callback);\n // If the callback it's a function, this method will execute it\n }", "public function getPaymorrowRequestController()\n {\n return oxNew( 'RequestController' );\n }", "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n if ($this->response === null) {\n $this->response = ArkWebResponse::makeResponse(200);\n }\n\n if(!is_array($this->handleCallable)){\n $actualCallable=$this->handleCallable;\n }else {\n $className=$this->handleCallable[0];\n $actualCallable = [new $className,$this->handleCallable[1]];\n }\n if (!is_callable($actualCallable)) {\n $this->response->setStatus('500', 'No handler given');\n } else {\n $this->response = call_user_func_array($this->handleCallable, [$request, $this->response]);\n }\n return $this->response;\n }", "public function GetControllerClass ();", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface\n\t{\n\t\tif ($this->isWhitelisted($request)) {\n\t\t\treturn $next($request, $response);\n\t\t}\n\n\t\t$user = $this->authenticator->authenticate($request);\n\n\t\t// If we have a identity, then go to next middlewares,\n\t\t// otherwise stop and return current response\n\t\tif ($user === null) {\n\t\t\treturn $this->denied($request, $response);\n\t\t}\n\n\t\t// Add info about current logged user to request attributes\n\t\t$request = $request->withAttribute(RequestAttributes::APP_LOGGED_USER, $user);\n\n\t\t// Pass to next middleware\n\t\treturn $next($request, $response);\n\t}", "public function createResponse(): IResponse;", "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 getResponseInstance(){\n\t\treturn ControllerResponse::getInstance();\n\t}", "public function route()\n\t{\n\t\t$this->request = $this->getRequest();\n\n\t\t$controller_name = 'app\\controllers\\Controller' . ucfirst($this->request->getController());\n\t\t$action_name = 'Action'.ucfirst($this->request->getAction());\n\n\t\tif(!class_exists($controller_name)){\n\t\t\tthrow new NotFoundException('Not found route: ' . $this->request->getPath());\n\t\t}\n\n\t\t$controller = new $controller_name;\n\n\t\tif(method_exists($controller, $action_name)){\n\t\t\t$response = $controller->$action_name();\n\t\t\treturn $response ? $response : static::app()->response;\n\t\t} else {\n\t\t\tthrow new NotFoundException('Not found route: ' . $this->request->getPath());\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function getRequestHandler(): RequestHandlerInterface;", "protected function dispatchToRouter()\n {\n return function ($request) {\n return $this->router->setApplication($this->app)->dispatch($request);\n };\n }", "public function resolveRequestHandler() {}", "public function getControllerAction() {}", "public function toResponse($request)\n {\n if (! is_callable($this->view) || is_string($this->view)) {\n return response()->view($this->view, $this->parameters);\n }\n\n $response = call_user_func($this->view, $this->parameters);\n\n if ($response instanceof Responsable) {\n return $response->toResponse($request);\n }\n\n return $response;\n }", "public static function dispatch(&$request) {\r\n // inizializziamo la sessione\r\n session_start();\r\n\r\n if (isset($request[\"page\"])) {\r\n switch ($request[\"page\"]) {\r\n case \"master\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"accesso\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"rimuovi\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"rimuovicode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"rimuovicodeid\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"inserisci\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"inseriscicode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"logincode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"mappa\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"mappacode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"totaleprodotti\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"totaleprodotticode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"contatta\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"contattacode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"contattaleggi\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"contattaleggiform\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"documentazione\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"logout\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n default:\r\n self::write404();\r\n break;\r\n }\r\n } else {\r\n $request[\"page\"] = \"master\";\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n echo '<script language=javascript>document.location.href=\"index.php?page=master\"</script>';\r\n }\r\n }", "public function controller($arguments = array()) {\n\n // first try to get a controller for the representation\n $controller = null;\n if($representation = $this->representation()) {\n $controller = $this->kirby->registry->get('controller', $this->template() . '.' . $representation);\n }\n\n // no representation or no special controller: try the normal one\n if(!$controller) $controller = $this->kirby->registry->get('controller', $this->template());\n\n if(is_a($controller, 'Closure')) {\n return (array)call_user_func_array($controller, array(\n $this->site,\n $this->site->children(),\n $this,\n $arguments\n ));\n }\n\n return array();\n\n }", "protected function initRequest()\n {\n $context = new RequestContext();\n $context->fromRequest(self::$request);\n $matcher = new UrlMatcher($this->routCollection, $context);\n\n try {\n $attributes = $matcher->match(self::$request->getPathInfo());\n $response = $this->callController($attributes);\n } catch (ResourceNotFoundException $e) {\n $response = new Response('Not Found', 404);\n } catch (Exception $e) {\n $response = new Response('An error occurred', 500);\n }\n\n $response->send();\n }", "public function dispatch()\n {\n // Check for core assets path\n if ($assets = $this->_resolveAssetsPath()) {\n return $assets;\n }\n\n Observer::instance()->trigger(new OnDispatch($this));\n\n $this->_setLanguageFromUri();\n\n if (strpos($this->request->getPath(), '/api') === 0) {\n $this->requestType = 'api';\n }\n\n list($class, $action, $permission, $payload) = $this->_getRoute($this->request->getPath());\n\n /** @var Controller $class */\n $class = new $class($this->request);\n\n if (!empty($permission)) {\n\n /** @var AuthenticatorService $authenticator */\n $authenticator = ServiceLocator::instance()->get(AuthenticatorService::class);\n $isPermitted = $authenticator->isPermitted($permission);\n\n if ($isPermitted === null) {\n\n return ServiceLocator::instance()->get(Http::class)->redirect($this->config->get('auth:authUrl'));\n\n } else if ($isPermitted === false) {\n\n $errorController = $this->config->get('customErrorController');\n return (new $errorController($this->request))->notPermittedAction();\n\n }\n\n }\n\n if (!method_exists($class, $action)) {\n\n throw new MethodNotFoundException(\n 'Class \"' . get_class($class) . '\" doesn\\'t have the method ' . $action\n );\n\n }\n\n $payload = array_map('strip_tags', $payload);\n $payload = array_map('htmlspecialchars', $payload);\n\n $response = call_user_func_array([$class, $action], $payload);\n\n if (!$response instanceof Response) {\n throw new IncompatibleResponseException('No valid response returned.');\n }\n\n return $response;\n\n }", "public function run() {\n //Matcher holen und request matchen\n $matcher = $this->routerContainer->getMatcher();\n $this->route = $matcher->match($this->request);\n\n //404 handler\n if (!$this->route) {\n return ControllerFactory::get(\"notfound\", $this->request)->render();\n }\n\n try {\n //home route\n if ($this->route->name == \"home\") {\n return ControllerFactory::get(\"index\", $this->request)->render();\n }\n\n if (isset($this->route->attributes[\"controller\"])) {\n $controller = ControllerFactory::get($this->route->attributes[\"controller\"], $this->request);\n } else {\n $controller = ControllerFactory::get($this->getControllerName($this->route->name), $this->request);\n }\n\n $controller->setMap($this->map);\n $controller->setRouter($this->route);\n $controller->init();\n\n switch ($this->route->name) {\n case 'ajax_default':\n $controller->ajax($this->route->attributes[\"action\"]);\n break;\n case 'get_default':\n $controller->get($this->route->attributes[\"action\"]);\n break;\n case 'post_default':\n $controller->post($this->route->attributes[\"action\"]);\n break;\n case 'controller_default_route':\n break;\n default:\n $method = $this->routes[$this->route->name][\"method\"];\n if (isset($this->routes[$this->route->name][\"action_param\"])) {\n $action = $this->route->attributes[$this->routes[$this->route->name][\"action_param\"]];\n //dynamically call the matching method\n $controller->$method($action);\n }\n }\n\n return $controller->render();\n } catch (FatalException $e) {\n /** @var Fatal $fatal_error */\n $fatal_error = ControllerFactory::get(\"fatal\", $this->request);\n $fatal_error->setException($e);\n return $fatal_error->render();\n }\n }", "public function __invoke(Request $request, Response $response, $next){\n\n //recupera o objeto da rota\n $route = $request->getAttribute('route');\n\n if(!is_null($route)){\n\n //itera os objetos mapeados\n foreach ($this->mapping as $k => $model){\n\n //recupera o parâmetro da rota que foi mapeado\n $mapped = $route->getArgument($k);\n\n //verifica se o objeto foi mapeado na rota e se ele existe no banco de dados\n if(!empty($mapped)){\n\n //localiza o objeto no banco\n $obj = $model::find($mapped);\n\n if($obj){\n\n //adiciona o objeto ao container\n $this->container[$k] = function() use($obj){\n return $obj;\n };\n\n }else{\n\n //obtem as propriedades da model via reflection\n try {\n $name = (new \\ReflectionClass($model))->getProperty('mapping');\n } catch (\\ReflectionException $e) {\n $name = 'object';\n }\n\n //retorna o erro de objeto inválido\n return ($request->isGet()) ? $this->container->view->render($response, 'layouts/error.twig', [\n 'error' => \"O {$name} selecionado é inválido.\"\n ]) : $response->withStatus(400)->withJson([\n 'result' => false,\n 'error' => \"O {$name} selecionado é inválido.\"\n ]);\n }\n\n }\n }\n\n }\n\n //salva o método de requisição atual\n $this->container['method'] = function () use($request){\n return $request->getMethod();\n };\n\n //continua a stack\n return $next($request, $response);\n\n }", "protected function _getController($exception) {\n\t\t$this->controller = parent::_getController($exception);\n\t\t$this->request = $this->controller->request;\n\t\t$this->controller->response->httpCodes($this->statusCodes); // make custom statuscodes available for use\n\t\treturn $this->controller;\n\t}", "public function run(Request $request) {\n\t\treturn $this->responder->run($request);\n\t}", "public function call()\n {\n if (is_string($this->callable)) {\n $params = explode('#', $this->callable);\n $controller = 'Blog\\\\Controllers\\\\'.$params[0].'Controller';\n $Controller = new $controller();\n return call_user_func_array([$Controller, $params[1]], $this->matches);\n } else {\n return call_user_func_array($this->callable, $this->matches);\n }\n }", "public function testControllerResponse()\n {\n $matcher = $this->getMock('Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface');\n $matcher\n ->expects($this->once())\n ->method('match')\n ->will($this->returnValue(array(\n '_route' => 'hello',\n 'name' => 'Andrey',\n '_controller' => 'Templater\\\\Controller\\\\DefaultController::plainTextAction'\n )))\n ;\n $resolver = new ControllerResolver();\n\n $framework = new Framework($matcher, $resolver);\n\n $response = $framework->handle(new Request());\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertContains('Hello, Andrey', $response->getContent());\n $this->assertEquals('text/plain', $response->headers->get('Content-Type'));\n }", "public function run() {\n\n if(method_exists($this, $this->action)) {\n $output = call_user_func_array(array($this, $this->action), (array)$this->arguments);\n } else {\n raise('invalid controller action: ' . $this->action);\n }\n\n // if the controller has a valid layout\n // render that instead of the output generated by the action\n if(!$output and $layout = $this->layout) {\n $output = $layout->render($this->format); \n } \n\n if(is_a($output, 'Kirby\\\\Toolkit\\\\Response')) {\n return $output;\n } else {\n return new Response($output, $this->format);\n }\n\n }", "public function __invoke(Request $request, Response $response, callable $next) {\n\t\t\t\t\n\t\t\t\t$guideID = $request->getParam('subjectID');\t \n\t\t\t\t\n\t\t\t\t$allowToVote = $this->allowToVote ($guideID);\n\t\t\t\t\t\t\t\n\t\t\t\t$request = $request->withAttribute('allowVote', $allowToVote);\t\t\t\n\t\t\t\t\n\t\t\t\t$response = $next($request, $response);\t\n\t\t\t\t\n\t\t\t\treturn $response;\t\t\t\t\n\t\t\t\t\n }", "function route($request) {\n\t\t$controller = $request->uri(0);\n\t\t$action = $request->uri(1);\n\n\t\tif(!class_exists($controller) || !is_callable([$controller, $action])){\n\t\t\t$controller = 'BadRequest';\n\t\t\t$action = 'not_found';\n\t\t}\n\n\t\t$c = new $controller($request);\n\t\tcall_user_func_array([$c, $action], []);\n\t}", "public function dispatch(): ResponseInterface\n {\n if(!isset($this->current_route)){\n $this->current_route = $this->resolve($this->current_method, $this->current_url);\n }\n\n $hasRoute = isset($this->current_route) && !empty($this->current_route);\n\n if($hasRoute === FALSE){\n return $this->notFound();\n }\n\n $route = $this->current_route;\n $arguments = $route['arguments'] ?? [];\n \\define('INITPHP_ROUTER_CURRENT_ARGUMENTS', $arguments);\n\n $filters = [\n 'before' => [],\n 'after' => [],\n ];\n if(isset($route['options']['middleware']['before'])){\n $filters['before'] = $route['options']['middleware']['before'];\n unset($route['options']['middleware']['before']);\n }\n if(isset($route['options']['middleware']['after'])){\n $filters['after'] = $route['options']['middleware']['after'];\n unset($route['options']['middleware']['after']);\n }\n if(isset($route['options']['middleware']) && !empty($route['options']['middleware'])){\n $filters['before'] = \\array_merge($route['options']['middleware'], $filters['before']);\n $filters['after'] = \\array_merge($route['options']['middleware'], $filters['after']);\n unset($route['options']['middleware']);\n }\n\n $this->middleware_handle($filters['before'], $arguments, self::BEFORE);\n $responseStatusCode = (int)$this->response->getStatusCode();\n if($responseStatusCode < 200 || $responseStatusCode > 299){\n return $this->response;\n }\n if ($route['methods'] === ['LINK']) {\n return $this->execute($route['execute'], $arguments, self::LINK);\n } else {\n if(\\is_callable($route['execute'])){\n \\define('INITPHP_ROUTER_CURRENT_CONTROLLER', '__CALLABLE__');\n \\define('INITPHP_ROUTER_CURRENT_METHOD', '');\n $this->response = $this->execute($route['execute'], $arguments);\n }else{\n $parse = $this->getControllerMethod($route['execute'], $route['options']);\n $parse['controller'] = $this->controllerFind($parse['controller']);\n $reflection = new \\ReflectionClass($parse['controller']);\n $controller = $this->getClassContainer($reflection);\n $this->middleware_handle($this->controller_middlewares_property($controller, $parse['method'], self::BEFORE), $arguments, self::BEFORE);\n \\define('INITPHP_ROUTER_CURRENT_CONTROLLER', \\get_class($controller));\n \\define('INITPHP_ROUTER_CURRENT_METHOD', $parse['method']);\n $responseStatusCode = (int)$this->response->getStatusCode();\n if($responseStatusCode < 200 || $responseStatusCode > 299){\n return $this->response;\n }\n $this->response = $this->execute([$controller, $parse['method']], $arguments);\n $after_middleware = $this->controller_middlewares_property($controller, $parse['method'], self::AFTER);\n if(!empty($after_middleware)){\n $filters['after'] = \\array_merge($filters['after'], $after_middleware);\n }\n }\n }\n\n $this->middleware_handle($filters['after'], $arguments, self::AFTER);\n\n return $this->response;\n }", "public function testRequestResponseStrategyRouteRequestFromServiceProvider()\n {\n\n $container = new Container();\n\n //Build mock provider\n $provider = $this->getMock('League\\Container\\ServiceProvider');\n\n $provider->expects($this->any())\n ->method('provides')\n ->will($this->returnCallback(function() {\n $args = func_get_args();\n return $args[0] === 'Symfony\\Component\\HttpFoundation\\Request';\n }));\n\n $provider->expects($this->once())\n ->method('register')\n ->will($this->returnCallback(function() use ($container) {\n $container->add('Symfony\\Component\\HttpFoundation\\Request', null, true)->withArguments([['get' => 4], ['post' => 5]]);\n }));\n\n $container->addServiceProvider($provider);\n\n $collection = new Route\\RouteCollection($container);\n $collection->setStrategy(new RequestResponseStrategy);\n\n $collection->get('/route', function ($request, $response) {\n $this->assertEquals(4, $request->query->get('get'));\n $this->assertEquals(5, $request->request->get('post'));\n return $response;\n });\n\n $dispatcher = $collection->getDispatcher();\n $response = $dispatcher->dispatch('GET', '/route');\n\n }", "public function & GetResponse ();", "public function getController(): Controller {\n\t\t$action = Check::key( $this->request->get( 'action' ), '' );\n\n\t\tif ( !$action ) {\n\t\t\treturn $this->getDefaultController();\n\t\t}\n\n\t\t$controller_class = $this->controller_namespace . $action;\n\n\t\tif ( !\\class_exists( $controller_class ) ) {\n\t\t\treturn $this->getDefaultController();\n\t\t}\n\n\t\treturn $this->instanceController( $controller_class );\n\t}", "public function GetDelegate($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "public function process(HTTPRequest $request, callable $delegate)\n {\n /** @var HTTPResponse $response */\n $response = $delegate($request);\n\n // Ignore by regexes.\n if ($this->shouldCheckHttpHost() && $this->isIgnoredDomain($_SERVER['HTTP_HOST'])) {\n return $response;\n }\n\n foreach ($this->requestedPolicies as $requestedPolicy) {\n /** @var ControllerPolicy $policyInstance */\n $policyInstance = $requestedPolicy['policy'];\n\n $policyInstance->applyToResponse(\n $requestedPolicy['originator'],\n $request,\n $response\n );\n }\n\n return $response;\n }", "abstract public function mapRequest($request);", "protected function getController_ResolverService()\n {\n return $this->services['controller.resolver'] = new \\phpbb\\controller\\resolver($this, './../', ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }", "abstract public function responseProvider();", "public function __invoke(ServerRequestInterface $request, ResponseInterface $response)\n {\n return $this->perform($request, $response);\n }", "public function Response($response);", "private static function request($controller,$param = null)\n {\n\t\tself::$load = true;\n\n\t\tif(is_callable($controller)):\n\t\t\treturn $controller->__invoke();\n\t\tendif;\n\n $request = explode('@',$controller);\n $_controller = $request[0];\n $_function = isset($request[1]) ? $request[1] : 'index';\n\t\t$instance \t\t= new $_controller;\n\t\t\n\t\t$instance->$_function($param);\n\t}", "abstract public function getControllerAction();", "function route(Request $request){\n //Separate path by / and remove ending /\n $paths = explode('/', rtrim($request->getUrl()->getPath(), '/')); \n //Determines the default\n $controllerFolder = $paths[0] ? $paths[0] : \"main\";\n //Non main folder uses FolderMain as the default controller\n if($controllerFolder === \"main\"){\n $controllerName = $paths[1] ? $paths[1] : \"main\"; \n }else{\n $controllerName = $paths[1] ? $paths[1] : $controllerFolder.\"main\";\n }\n $methodName = $paths[2] ? $paths[2] : \"main\";\n $args = array_slice($paths, 3);\n \n if(file_exists(FOLDER_CONTROLLERS.S.$controllerFolder.S.$controllerName.\".php\")){\n $controller = new $controllerName($request); \n if(method_exists($controller,$methodName)){\n $controller->{$methodName}($args);\n }else{\n header(\"location: \".REDIRECT_ERROR002);\n }\n }else{\n header(\"location: \".REDIRECT_ERROR001);\n }\n \n }", "function request()\n {\n return app('request');\n }", "abstract public function handle(ServerRequestInterface $request): ResponseInterface;", "public static function match(){\n list($controllerType, $controller, $action) = self::_getControllerVars();\n\n //Controller_className\n $className= self::CLASS_PREFIX . '_' . ucwords($controllerType) . '_' . ucwords($controller);\n\n //$viewName = self::VIEW_PREFIX . '_' . str_replace(' ', '_',ucwords(implode(' ', $uriExploded))) . '_' . ucfirst($action);\n //actionName_Action\n // echo '<p> viewName'.$viewName.'</p>';\n\n $action = $action . self::ACTION_SUFFIX;\n\n try{\n $classInstance = new $className();\n //$classInstance->view = new $viewName();\n $response = $classInstance->$action();\n\n return $response;\n\n } catch (Exception $e){\n echo $e->getMessage();\n }\n\t}", "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 }", "private function handleRequest(string $resource): string\n {\n $auth = UserSession::getInstance();\n\n // split the requested resource into controller and action\n $components = explode('/', $resource);\n\n $c_name = \"\\\\controllers\\\\\" . ucfirst($components[1]) . 'Controller';\n\n // if the controller does not exist, display an error\n if (!class_exists($c_name))\n return (new Controller('site'))->error('404');\n\n // TODO: rewrite to short url (ie: /site/index -> /index)\n $action = $components[2];\n $p = $components;\n\n // if the action is not specified, display an error\n if (!isset($action))\n return (new Controller('site'))->error('404');\n\n $controller = new $c_name;\n $behaviors = $controller->behaviors();\n foreach ($behaviors['access']['rules'] as $rule)\n {\n // check if the action exists\n if (in_array($action, $rule['actions']) && $rule['allow'])\n {\n $method = 'action' . ucfirst($action);\n\n // the action can be performed by both authenticated and non-authenticated users\n if (in_array('?', $rule['roles']) && in_array('@', $rule['roles']))\n return $controller->$method(isset($p[3]) ? (int) $p[3] : null, isset($p[4]) ? (int) $p[4] : null); // WIP\n\n // the action requires that the user is not authenticated\n if (in_array('?', $rule['roles']) && !$auth->isLoggedIn())\n return $controller->$method();\n\n // the action requires that the user is authenticated and authorized\n if ($auth->isLoggedIn())\n {\n if (in_array(App::$user->role, $rule['roles']))\n {\n // check ownership\n if (App::$user->role === 'customer' && isset($rule['roleCheck']))\n {\n $model = $rule['roleCheck'][0]::{$rule['roleCheck'][1]}(isset($p[3]) ? (int) $p[3] : null);\n if (!$model)\n return (new Controller('site'))->error('404'); // not found\n\n if ($model->created_by !== App::$user->id)\n return (new Controller('site'))->error('403'); // not authorized\n }\n }\n\n else if (!in_array('@', $rule['roles']))\n return (new Controller('site'))->error('403'); // not authorized\n\n // else fix controller rules\n\n return $controller->$method(isset($p[3]) ? (int) $p[3] : null);\n }\n\n else\n {\n return (new Controller('site'))->error('401'); // not authenticated\n }\n }\n }\n\n // the action does not exist, or is not valid, therefore display an error message\n return (new Controller('site'))->error('404');\n }", "public function __invoke(Request $request, Response $response, callable $next)\n {\n\n $response = $next($request, $response);\n\n $responseData = json_decode($response->getBody()->__toString(), true);\n $responseData['success'] = $response->getStatusCode() == 200;\n\n return $response->withJson($responseData);\n }", "public function run(SocketRequest $request)\n {\n if (!empty($this->middlewares())) {\n $response = $this->pipeline->through($this->middlewares())->run($request);\n\n if (!is_null($response)) {\n return $response;\n }\n }\n\n if ($this->isControllerAction()) {\n return $this->dispatchController($request);\n }\n\n return $this->dispatchCallable($request);\n }", "public function DispatchRequest ();", "protected static function runController()\n {\n $msg = new MoovicoRequestMessage(self::$route);\n self::$response = self::doRunController($msg);\n }", "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 function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)\n {\n $this->helper->setUri($request->getUri());\n return $next($request, $response);\n }", "public function process(\n ServerRequestInterface $request, \n RequestHandlerInterface $handler\n ): ResponseInterface {\n return call_user_func($this->callable, $request, $handler);\n }", "public function getRequestInstance(){\n\t\treturn ControllerRequest::getInstance();\n\t}", "function request($controller,$action){\n\t\t$data = ucfirst($controller);\n\t\t$file = '\\\\app\\\\module\\\\'. $data . DS . $data .'Controller';\n\t\trequire_once ROOT.$file.'.php';\n\t\t$c = new $file();\n\t\treturn $c->$action(); \n\t}", "private function getRealController(): RealController\n {\n /*\n * I have to pass container to the controller to avoid exception:\n * Call to a member function get() on null\n *\n * in method:\n * \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerTrait::generateUrl()\n *\n * caused by call of \"get()\" method:\n * $this->container->get()\n */\n $controller = new RealController($this->requestService);\n $controller->setContainer(static::getContainer());\n\n return $controller;\n }", "static function invoke_controller()\n\t{\n\t\t// Try to fetch requested controller\n\t\t$controller_path = APPPATH.'controllers/'.self::$directory.self::$controller_name.'.php';\n\t\tif (is_readable($controller_path))\n\t\t{\n\t\t\trequire($controller_path);\n\n\t\t\t// Check if the controller class is defined\n\t\t\tif (!class_exists(self::$controller_name))\n\t\t\t\tSystem::error('controller <code>'.self::$controller_name.'</code> is not defined');\n\n\t\t\t// Check if the method exists in the controller\n\t\t\tif (!method_exists(self::$controller_name, self::$method_name))\n\t\t\t\tSystem::error('controller <code>'.self::$controller_name.'</code> has no method named <code>'.self::$method_name.'</code>');\n\n\t\t\t// Create controller instance and call the method\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$reflection_method = new ReflectionMethod(self::$controller_name, self::$method_name);\n\n\t\t\t\t$argc = count(self::$segments);\n\t\t\t\tif ($reflection_method->getNumberOfRequiredParameters() > $argc)\n\t\t\t\t\tSystem::error('Not enough parameters for calling <code>'.self::$controller_name.'::'.self::$method_name.'()</code>,\n\t\t\t\t\t'.$argc.' provided, expected at least '.$reflection_method->getNumberOfRequiredParameters());\n\n\t\t\t\tif ($reflection_method->getNumberOfParameters() < $argc)\n\t\t\t\t\tSystem::error('Too many parameters for calling <code>'.self::$controller_name.'::'.self::$method_name.'()</code>,\n\t\t\t\t\t'.$argc.' provided, expected '.$reflection_method->getNumberOfParameters());\n\n\t\t\t\t$reflection_method->invokeArgs(new self::$controller_name, self::$segments);\n\t\t\t}\n\t\t\tcatch (ReflectionException $e)\n\t\t\t{\n\t\t\t\tSystem::error($e->getMessage());\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function __invoke(ServerRequestInterface $psr7Request, ResponseInterface $psr7Response, callable $next)\n\t{\n\t\tif (!($psr7Request instanceof Psr7ServerRequest)) {\n\t\t\tthrow new InvalidStateException(sprintf('Invalid request object given. Required %s type.', Psr7ServerRequest::class));\n\t\t}\n\n\t\tif (!($psr7Response instanceof Psr7Response)) {\n\t\t\tthrow new InvalidStateException(sprintf('Invalid response object given. Required %s type.', Psr7Response::class));\n\t\t}\n\n\t\t$applicationResponse = NULL;\n\n\t\ttry {\n\t\t\t$applicationResponse = $this->processRequest($this->createInitialRequest($psr7Request));\n\t\t} catch (Throwable $e) {\n\t\t\t// Handle is followed\n\t\t} catch (Exception $e) {\n\t\t\t// Handle is followed\n\t\t}\n\n\t\tif (isset($e)) {\n\t\t\tif (!$this->catchExceptions || !$this->errorPresenter) {\n\t\t\t\tthrow $e;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// Create a new response with given code\n\t\t\t\t$psr7Response = $psr7Response->withStatus($e instanceof BadRequestException ? ($e->getCode() ?: 404) : 500);\n\t\t\t\t// Try resolve exception via forward or redirect\n\t\t\t\t$applicationResponse = $this->processException($e);\n\t\t\t} catch (Throwable $e) {\n\t\t\t\t// No fallback needed\n\t\t\t} catch (Exception $e) {\n\t\t\t\t// No fallback needed\n\t\t\t}\n\t\t}\n\n\t\t// Convert to Psr7Response\n\t\tif ($applicationResponse instanceof Psr7Response) {\n\t\t\t// If response is Psr7Response type, just use it\n\t\t\t$psr7Response = $applicationResponse;\n\t\t} else if ($applicationResponse instanceof IApplicationResponse) {\n\t\t\t// If response is IApplicationResponse, wrap to Psr7Response\n\t\t\t$psr7Response = $psr7Response->withApplicationResponse($applicationResponse);\n\t\t} else {\n\t\t\tthrow new InvalidStateException();\n\t\t}\n\n\t\t// Pass to next middleware\n\t\t$psr7Response = $next($psr7Request, $psr7Response);\n\n\t\t// Return response\n\t\treturn $psr7Response;\n\t}" ]
[ "0.62754923", "0.6197478", "0.61441594", "0.60338414", "0.602991", "0.58885384", "0.5733185", "0.5703796", "0.569862", "0.56861585", "0.5673458", "0.5660281", "0.56555027", "0.5644265", "0.5627077", "0.56253654", "0.5619791", "0.5573474", "0.5568193", "0.5533728", "0.54874396", "0.54635394", "0.5440581", "0.5437068", "0.5415503", "0.5403171", "0.539378", "0.5391776", "0.5386445", "0.53700304", "0.5350014", "0.5347521", "0.53447545", "0.5344505", "0.5302379", "0.5297301", "0.5284428", "0.5276961", "0.52680016", "0.52653646", "0.5265091", "0.5264346", "0.5256313", "0.52513725", "0.52497774", "0.52440906", "0.5237345", "0.5229939", "0.5228054", "0.521894", "0.5218577", "0.5216502", "0.5211546", "0.5198973", "0.519423", "0.51928043", "0.51873493", "0.5181456", "0.5173934", "0.51722574", "0.5171938", "0.5166296", "0.51657134", "0.5162077", "0.5146916", "0.5144127", "0.5139331", "0.5138548", "0.51382065", "0.5138114", "0.51375794", "0.51371205", "0.51361847", "0.5134522", "0.51256853", "0.51249677", "0.51237506", "0.5122173", "0.51207304", "0.51103264", "0.51091003", "0.5108869", "0.51010096", "0.50980085", "0.5089662", "0.50893825", "0.50889236", "0.50832677", "0.50808793", "0.50793284", "0.5063757", "0.5063384", "0.5053426", "0.50526226", "0.504852", "0.50448775", "0.5044576", "0.5043845" ]
0.55652666
21
Returns expression that is later matched against requested uri.
public function getPath(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExpression();", "public function parseUri()\n {\n return RouteMatch::uriToRegex($this);\n }", "public function match ($uri);", "public function match($uri);", "private static function _parseUri($uri, $expressions = [])\n {\n $pattern = explode('/', ltrim($uri, '/'));\n foreach ($pattern as $key => $val) {\n if(preg_match('/[\\[{\\(].*[\\]}\\)]/U', $val, $matches)) {\n foreach ($matches as $match) {\n $matchKey = substr($match, 1, -1);\n if (array_key_exists($matchKey, $expressions)) {\n $pattern[$key] = $expressions[$matchKey];\n }\n }\n }\n }\n\n return $pattern;\n }", "public function regex() {\r\n // split uri\r\n $arr = preg_split('@/@', $this->uri, NULL, PREG_SPLIT_NO_EMPTY);\r\n\r\n $regex = null;\r\n foreach ($arr as $ar) {\r\n // Replace dynamic with regex\r\n $regex = $regex.'\\/'.preg_replace('/\\{(.*?)\\}/', '[0-9A-Za-z]++', $ar);\r\n }\r\n\r\n $this->regex = '/^'.$regex.'$/';\r\n }", "public function getExpression()\n {\n if (array_key_exists(\"expression\", $this->_propDict)) {\n return $this->_propDict[\"expression\"];\n } else {\n return null;\n }\n }", "public function findMatch(\\string $uri, \\string $method);", "private function getURI()\n {\n\n if (!empty($_SERVER['REQUEST_URI'])) {\n\n $routeRule = trim($_SERVER['REQUEST_URI'], '/');\n\n // Get part of uri without GET request if it exist (ignore GET)\n if (preg_match('/\\?/', $routeRule)) {\n // get rule for router which based on request uri\n $routeRule = explode('?', $routeRule);\n $routeRule = array_shift($routeRule);\n // normalize route rule\n $routeRule = trim($routeRule, '/');\n }\n return $routeRule;\n }\n }", "public static function getRegex($Name = 'uri-spec');", "private function getMatchedRoute($exploded_uri){\r\n // loop through all the routes (start at the last route)\r\n for($i = sizeof($this->routes) - 1; $i >= 0; $i--){\r\n // check for a route which is as long as the uri\r\n $current_route = $this->routes[$i]->getRouteExploded();\r\n if(sizeof(array_filter($current_route)) == sizeof(array_filter($exploded_uri))){\r\n return $this->routes[$i];\r\n }\r\n }\r\n }", "public function match( $pURI );", "public function getExpression()\n {\n return $this->expression;\n }", "public function getExpression()\n {\n return $this->expression;\n }", "function get_preg_expression($mode)\n{\n\tswitch ($mode)\n\t{\n\t\tcase 'url':\n\t\tcase 'url_inline':\n\t\t\t$inline = ($mode == 'url') ? ')' : '';\n\t\t\t$scheme = ($mode == 'url') ? '[a-z\\d+\\-.]' : '[a-z\\d+]'; // avoid automatic parsing of \"word\" in \"last word.http://...\"\n\t\t\t// generated with regex generation file in the develop folder\n\t\t\treturn \"[a-z]$scheme*:/{2}(?:(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+|[0-9.]+|\\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\\])(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'www_url':\n\t\tcase 'www_url_inline':\n\t\t\t$inline = ($mode == 'www_url') ? ')' : '';\n\t\t\treturn \"www\\.(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'relative_url':\n\t\tcase 'relative_url_inline':\n\t\t\t$inline = ($mode == 'relative_url') ? ')' : '';\n\t\t\treturn \"(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\t}\n\n\treturn '';\n}", "public function getExpression() {\n return $this->expression;\n }", "function e($expr) \n {\n //call the core evaluation method\n return $this->evaluate($expr);\n }", "function request($expr)\n {\n $this->expr = $expr;\n return $this;\n }", "protected function parseExpression()\n {\n $entities = array();\n while ($e = $this->matchFuncs(array('parseAddition', 'parseEntity'))) {\n $entities[] = $e;\n // operations do not allow keyword \"/\" dimension (e.g. small/20px) so we support that here\n if (!$this->peekReg('/\\\\G\\/[\\/*]/') && ($delim = $this->matchChar('/'))) {\n $entities[] = new ILess_Node_Anonymous($delim);\n }\n }\n if (count($entities) > 0) {\n return new ILess_Node_Expression($entities);\n }\n }", "public function getMatchingExpression()\n {\n // Match anything that contains the things a date can contain\n // and allow convertValue to return false if it's not actually a date\n return \"[0-9\\-:TZ]+\";\n }", "public function compileRegex()\n {\n $route = $this->route->getUri();\n\n if (strpos($route, '?')) {\n $route = preg_replace('@\\/{([\\w]+)\\?}@', '(?:/{$1})?', $route);\n }\n\n $route = preg_replace('/{([a-z0-9_-]+)}/i', '(?P<$1>[^/]+)', $route);\n\n if(substr($route, -1) === '/') {\n $route .= '?';\n }\n\n return \"%^{$route}$%s\";\n }", "public function getExpression(): string\n {\n return $this->expression;\n }", "public function getExpression(): string\n {\n return $this->expression;\n }", "public function getExpression(): string\n {\n return $this->expression;\n }", "public function expressionFunction();", "public function uri()\n {\n $uri = $this->server->get('REQUEST_URI');\n\n if (str_contains((string) $this->server->get('SERVER_SOFTWARE', ''), 'nginx')) {\n return explode('?', (string) $uri, 2)[0];\n }\n\n return $this->server->get('REQUEST_URI');\n }", "public function uri()\n\t{\n\t\t$uri = $this->fullUri();\n\t\t$queryPos = strpos($uri, '?');\n\t\treturn substr($uri, 0, strpos($uri, '?') ? $queryPos : null);\n\t}", "public function regexExpression(){\n try {\n // Sparql11query.g:517:3: ( REGEX OPEN_BRACE expression COMMA expression ( COMMA expression )? CLOSE_BRACE ) \n // Sparql11query.g:518:3: REGEX OPEN_BRACE expression COMMA expression ( COMMA expression )? CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('REGEX'),self::$FOLLOW_REGEX_in_regexExpression1889); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_regexExpression1891); \n $this->pushFollow(self::$FOLLOW_expression_in_regexExpression1893);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('COMMA'),self::$FOLLOW_COMMA_in_regexExpression1895); \n $this->pushFollow(self::$FOLLOW_expression_in_regexExpression1897);\n $this->expression();\n\n $this->state->_fsp--;\n\n // Sparql11query.g:518:48: ( COMMA expression )? \n $alt56=2;\n $LA56_0 = $this->input->LA(1);\n\n if ( ($LA56_0==$this->getToken('COMMA')) ) {\n $alt56=1;\n }\n switch ($alt56) {\n case 1 :\n // Sparql11query.g:518:49: COMMA expression \n {\n $this->match($this->input,$this->getToken('COMMA'),self::$FOLLOW_COMMA_in_regexExpression1900); \n $this->pushFollow(self::$FOLLOW_expression_in_regexExpression1902);\n $this->expression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_regexExpression1906); \n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public static function getRegularExpression();", "public function last($expression): static;", "public static function expression($value)\n {\n return '__expression[:]expression[:]' . $value;\n }", "public function getDynamic(string $regex, string $method = null): Route|null;", "private function getRegexForUri($PartialPagePath) {\r\n $string = '=~^(.)+(\\/.\\/)*(' . $PartialPagePath . '\\.html.*)$';\r\n return $string;\r\n }", "public function where($expressions)\n {\n $routeKey= array_search(end(self::$routes), self::$routes);\n $pattern = self::_parseUri(self::$routes[$routeKey]['uri'], $expressions);\n $pattern = '/' . implode('/', $pattern);\n $pattern = '/^' . str_replace('/', '\\/', $pattern) . '$/';\n\n self::$routes[$routeKey]['pattern'] = $pattern;\n\n return new self;\n }", "public function getRouteMatch();", "function add_rewrite_rule($regex, $query, $after = 'bottom')\n {\n }", "public function getExpressionNode()\n {\n return $this->expressionNode;\n }", "private function getRouterMath()\n {\n \t$router = Zend_Controller_Front::getInstance()->getRouter();\n \t$request = Zend_Controller_Front::getInstance()->getRequest();\n \t \n \t// Find the matching route\n \t$routeMatched = false;\n \t \n \tforeach (array_reverse($router->getRoutes(), true) as $name => $route) {\n \t\t// TODO: Should be an interface method. Hack for 1.0 BC\n \t\tif (method_exists($route, 'isAbstract') && $route->isAbstract()) {\n \t\t\tcontinue;\n \t\t}\n \t\t \n \t\t// TODO: Should be an interface method. Hack for 1.0 BC\n \t\tif (!method_exists($route, 'getVersion') || $route->getVersion() == 1) {\n \t\t\t$match = $request->getPathInfo();\n \t\t} else {\n \t\t\t$match = $request;\n \t\t}\n \t\t \n \t\tif ($params = $route->match($match)) {\n \t\t\t$routeMatched = $params;\n \t\t\tbreak;\n \t\t}\n \t}\n \t \n \treturn $routeMatched;\n }", "public static function expr($string = '')\n\t{\n\t\treturn new Expression($string);\n\t}", "abstract public function getRouteMatch();", "public function get_matched_route()\n {\n }", "public function uri()\r\n {\r\n return $this->server->get('REQUEST_URI', '/');\r\n }", "public function evaluate($expression) {\n $postfix = $this->convertInfixToPostfix($expression);\n $result = $this->evaluatePostfix($postfix);\n\n return $result;\n }", "private function getUri(){\n return $this->uri = parse_url($_SERVER['REQUEST_URI']);\n }", "public function getRegexurl() {\n }", "private function getPattern(){\n $pattern = strstr( substr($this->_requestUri,1) , '/', true) ;\n if( isset( $this->_config['pattern'] [$pattern] )){\n $this->_activePatern = $this->_config['pattern'][$pattern];\n\n $this->_cacheFolder = $pattern;\n\n $this->_requestUri = str_replace(\"/$pattern/\", \"/\", $this->_requestUri);\n }\n }", "public function getActiveRouteName($uri);", "public function getExpressionLanguageEvaluator()\n {\n return $this->expressionLanguageEvaluator;\n }", "public static function uri() {\n\t\treturn isset($_SERVER['REQUEST_URI'])\n\t\t\t? $_SERVER['REQUEST_URI']\n\t\t\t: null;\n\t}", "private function get_uri_request(){\n\n /*\n * get the url_route\n * the url_route is the part that is after index.php\n * and because of .htaccess where the index.php is not necessary in the url\n * the directory of the index.php should be determined.\n */\n\n\n if(_ROOT_DIRECTORY === str_replace('/','',_APP_PATH)){\n $request = ltrim($_SERVER['REQUEST_URI'], '/');\n\n }\n else{\n\n $request = str_replace(_APP_PATH,'',$_SERVER['REQUEST_URI']);\n }\n\n return $request;\n }", "public function match( $uri, & $args ){\n $args = array();\n if( $this->urls ){\n $buildRegex = function ( $pattern ){\n $params = array();\n $regex = preg_replace_callback(Resolver::param_match, function($match) use ( &$params ) {\n $params[] = $match[1];\n // only exclude line breaks from my match. this will let utf-8 sequences through.\n // older patterns below. \n // turns out I don't need to be super strict on my pattern matching.\n // php sapi does most of the work for me in giving me the url.\n return '([^\\n]+)'; \n //return '([[:graph:][:space:]]+)';\n //return '([a-z0-9\\.+\\,\\;\\'\\\\\\&%\\$\\#\\=~_\\-%\\s\\\"\\{\\}/\\:\\(\\)\\[\\]]+)';\n \n }, preg_quote($pattern, '#'));\n return array('#^' . $regex . '$#i', $params );\n };\n \n foreach( $this->urls as $pattern => $action ){\n list( $regex, $params ) = $buildRegex( $pattern );\n if( ! preg_match( $regex, $uri, $matches ) ) continue;\n $a = array_slice($matches, 1);\n foreach( $a as $i=>$v ){\n $args[ $params[$i] ] = $v;\n }\n \n return $action;\n \n }\n }\n $uri = strtolower(trim( $uri, '/'));\n if( ! $uri ) $uri = 'index';\n $res = $this->get( $uri, 'action', TRUE);\n if( $res ) return $uri;\n return '';\n }", "public function getPatternForUri()\n {\n return '/' . preg_replace('/:[\\d\\w]+/i', '(' . $this->_paramPattern . ')', str_replace('/', '\\\\/', $this->_uri)) . '/i';\n }", "public static function expression($expression) {\n\t\treturn new \\db\\expression($expression);\n\t}", "private function getURI()\r\n {\r\n\r\n if (!empty($_SERVER['REQUEST_URI'])) {\r\n $this->uri = str_replace('Hakaton/', '', $_SERVER['REQUEST_URI']);\r\n $this->uri = trim($this->uri, '/');\r\n return $this->uri;\r\n }\r\n }", "public function resolveUri($uri) {}", "public function match(Request $request)\n {\n if (!method_exists($request, 'getUri')) {\n return;\n }\n\n $uri = $request->getUri();\n $path = $uri->getPath();\n\n try {\n $parser = new UriParser($this->options);\n $result = $parser->parseUri($path);\n\n if (!$result instanceof Result) {\n return;\n }\n } catch (UnexpectedValueException $exception) {\n return; // todo: think about this\n } catch (TransformerNotFoundException $exception) {\n return; // todo: think about this\n }\n\n $routeMatch = new RouteMatch($this->options, strlen($path));\n $routeMatch->setParserResult($result);\n\n return $routeMatch;\n }", "public static function fromCurrentUrl():self\n {\n\n return new UrlParser($_SERVER[ 'REQUEST_URI' ]??'');\n }", "public function getUri()\n {\n $server = provider::access('server');\n\n return ($server->isExist('REQUEST_URI') && $server->isValid('REQUEST_URI', validate::T_PRINTABLE)\n ? $server->getValue('REQUEST_URI')\n : '/');\n }", "private function getURI()\n {\n if (!empty($_SERVER['REQUEST_URI'])) {\n return trim($_SERVER['REQUEST_URI'], '/');\n }\n }", "function getURI() {\n\t\t\t$requestURI = $_SERVER['REQUEST_URI'];\n\n\t\t\tif (strpos($requestURI, '?') !== FALSE) { // hack for IE which does not pass querystring in URI element of Digest string or in response hash\n\t\t\t\t$requestURI = substr($requestURI, 0, strlen($uri[1]));\n\t\t\t}\n\t\t\t\n\t\t\treturn $requestURI;\n\t\t}", "public function findWhereUri($uri);", "function get_preg_expression($mode)\n{\n\tswitch ($mode)\n\t{\n\t\tcase 'email':\n\t\t\treturn '(?:[a-z0-9\\'\\.\\-_\\+\\|]++|&amp;)+@[a-z0-9\\-]+\\.(?:[a-z0-9\\-]+\\.)*[a-z]+';\n\t\tbreak;\n\n\t\tcase 'bbcode_htm':\n\t\t\treturn array(\n\t\t\t\t'#<!\\-\\- e \\-\\-><a href=\"mailto:(.*?)\">.*?</a><!\\-\\- e \\-\\->#',\n\t\t\t\t'#<!\\-\\- l \\-\\-><a (?:class=\"[\\w-]+\" )?href=\"(.*?)(?:(&amp;|\\?)sid=[0-9a-f]{32})?\">.*?</a><!\\-\\- l \\-\\->#',\n\t\t\t\t'#<!\\-\\- ([mw]) \\-\\-><a (?:class=\"[\\w-]+\" )?href=\"(.*?)\">.*?</a><!\\-\\- \\1 \\-\\->#',\n\t\t\t\t'#<!\\-\\- s(.*?) \\-\\-><img src=\"\\{SMILIES_PATH\\}\\/.*? \\/><!\\-\\- s\\1 \\-\\->#',\n\t\t\t\t'#<!\\-\\- .*? \\-\\->#s',\n\t\t\t\t'#<.*?>#s',\n\t\t\t);\n\t\tbreak;\n\n\t\t// Whoa these look impressive!\n\t\t// The code to generate the following two regular expressions which match valid IPv4/IPv6 addresses\n\t\t// can be found in the develop directory\n\t\tcase 'ipv4':\n\t\t\treturn '#^(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])$#';\n\t\tbreak;\n\n\t\tcase 'ipv6':\n\t\t\treturn '#^(?:(?:(?:[\\dA-F]{1,4}:){6}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:::(?:[\\dA-F]{1,4}:){5}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:):(?:[\\dA-F]{1,4}:){4}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,2}:(?:[\\dA-F]{1,4}:){3}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,3}:(?:[\\dA-F]{1,4}:){2}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,4}:(?:[\\dA-F]{1,4}:)(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,5}:(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,6}:[\\dA-F]{1,4})|(?:(?:[\\dA-F]{1,4}:){1,7}:))$#i';\n\t\tbreak;\n\n\t\tcase 'url':\n\t\tcase 'url_inline':\n\t\t\t$inline = ($mode == 'url') ? ')' : '';\n\t\t\t$scheme = ($mode == 'url') ? '[a-z\\d+\\-.]' : '[a-z\\d+]'; // avoid automatic parsing of \"word\" in \"last word.http://...\"\n\t\t\t// generated with regex generation file in the develop folder\n\t\t\treturn \"[a-z]$scheme*:/{2}(?:(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+|[0-9.]+|\\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\\])(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'www_url':\n\t\tcase 'www_url_inline':\n\t\t\t$inline = ($mode == 'www_url') ? ')' : '';\n\t\t\treturn \"www\\.(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'relative_url':\n\t\tcase 'relative_url_inline':\n\t\t\t$inline = ($mode == 'relative_url') ? ')' : '';\n\t\t\treturn \"(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\t}\n\n\treturn '';\n}", "public function query ($expression, DomNode $contextNode = null, $registerNodeNS = null) {}", "public function get($match, $rewrite = null, $closure = null);", "function uri(): string;", "public function url()\n {\n return explode('?' ,$this->uri)[0];\n }", "protected static function get_new_url()\n {\n return parse_url($_SERVER['REQUEST_URI'])['path'] . '?' . $_SERVER['QUERY_STRING'];\n }", "public function getHash()\n {\n return \"{$this->getPatternForUri()} [$this->_httpMethod]\";\n }", "public static function getURI()\n {\n if ($pos = strpos($_SERVER['REQUEST_URI'], '?')) {\n $uri = substr($_SERVER['REQUEST_URI'], 0, $pos);\n } else {\n $uri = $_SERVER['REQUEST_URI'];\n }\n return self::trim($uri);\n }", "public static function current($qs = NO) {\n\t\treturn ($qs === YES) ? Router::$complete_uri : Router::$current_uri;\n\t}", "public function expression(){\n try {\n // Sparql11query.g:375:3: ( conditionalOrExpression ) \n // Sparql11query.g:376:3: conditionalOrExpression \n {\n $this->pushFollow(self::$FOLLOW_conditionalOrExpression_in_expression1283);\n $this->conditionalOrExpression();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public function route($uri)\n\t{\n\t\t$routes = Inject::config('http.routes', array());\n\t\t\n\t\t// literal match, has highest priority\n\t\tif(isset($routes[$uri]))\n\t\t{\n\t\t\tInject::log('request', 'HTTP request routed to \"'.$routes[$uri].'\".', Inject::DEBUG);\n\t\t\t\n\t\t\treturn $routes[$uri];\n\t\t}\n\t\t\n\t\tforeach($routes as $key => $val)\n\t\t{\n\t\t\n\t\t\t// Trim slashes\n\t\t\t$key = trim($key, '/');\n\t\t\t$val = trim($val, '/');\n\t\t\t\n\t\t\tif(preg_match('#^'.$key.'$#u', $uri, $m))\n\t\t\t{\n\t\t\t\t// get parameters from the regex, step 1: clean it from junk\n\t\t\t\tforeach($m as $k => $v)\n\t\t\t\t{\n\t\t\t\t\t// skip numeric\n\t\t\t\t\tif(is_numeric($k))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($m[$k]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// step 2: assign\n\t\t\t\t$this->set_parameters($m);\n\t\t\t\t\n\t\t\t\tif(strpos($val, '$') !== false)\n\t\t\t\t{\n\t\t\t\t\t// regex routing\n\t\t\t\t\t$uri = preg_replace('#^'.$key.'$#u', $val, $uri);\n\t\t\t\t\techo \"'$uri'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Standard routing\n\t\t\t\t\t$uri = $val;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tInject::log('request', 'HTTP request routed by regex to \"'.$uri.'\".', Inject::DEBUG);\n\t\t\t\t\n\t\t\t\t// A valid route has been found\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn str_replace('//', '/', $uri);\n\t}", "public function reference_filter($expr)\n\t{\n\t\t$this->reference_filter = $expr;\n\t\treturn $this;\n\t}", "public function first($expression): static;", "public function uri() {\n\t\treturn isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '/';\n\t}", "public function raw($expression)\n\t{\n\t\treturn $this->rawFactory->__invoke($expression);\n\t}", "public function pathname()\r\n {\r\n $uri = $this->uri();\r\n\r\n // Strip the query string from the URI\r\n $uri = strstr($uri, '?', true) ?: $uri;\r\n\r\n return $uri;\r\n }", "public function getMatcher();", "public function uri()\n {\n $uri = '';\n if (isset($this->server['REQUEST_URI'])) {\n $uri = $this->server['REQUEST_URI'];\n }\n\n $uri = ltrim($uri, '/');\n\n if (!$this->hasQueryPart($uri)) {\n $uri = rtrim($uri, '/');\n }\n\n return $uri;\n }", "protected function resolveRequestUri()\n {\n if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { // IIS\n $requestUri = $_SERVER['HTTP_X_REWRITE_URL'];\n } elseif (isset($_SERVER['REQUEST_URI'])) {\n $requestUri = $_SERVER['REQUEST_URI'];\n if ($requestUri !== '' && $requestUri[0] !== '/') {\n $requestUri = preg_replace('/^(http|https):\\/\\/[^\\/]+/i', '', $requestUri);\n }\n } elseif (isset($_SERVER['ORIG_PATH_INFO'])) { // IIS 5.0 CGI\n $requestUri = $_SERVER['ORIG_PATH_INFO'];\n if (!empty($_SERVER['QUERY_STRING'])) {\n $requestUri .= '?' . $_SERVER['QUERY_STRING'];\n }\n } else {\n throw new Exception('Unable to determine the request URI.');\n }\n\n return $requestUri;\n }", "public function getExpression() : string {\n return $this->cronExpr;\n }", "public function getURI()\n {\n return $this->server['REQUEST_URI'];\n }", "public function uri($uri);", "public function get_regex ($part) {\n\t\treturn '/' . \n\t\t\tpreg_quote($this->open(), '/') .\n\t\t\t\tpreg_quote($part, '/') .\n\t\t\t\t'(' .\n\t\t\t\t\tpreg_quote($this->fallback(), '/') .\n\t\t\t\t\t'(.*?)' .\n\t\t\t\t')?' .\n\t\t\tpreg_quote($this->close(), '/') .\n\t\t'/';\n\t}", "private function getURI() : string\n {\n if (!empty($_SERVER['REQUEST_URI'])){\n return trim($_SERVER['REQUEST_URI'], '/');\n }\n }", "function evaluateExpression($expression)\n\t{\n\t\treturn eval('return '.$expression.';');\n\t}", "public function uri() \n\t{\n\t\treturn $this->uri;\n\t}", "public function handle($uri = null) {\n\n\t\tif(!$uri)\n\t\t\t$uri = $this->getRewriteUri();\n\n\t\t/**\n\t\t * Remove extra slashes in the route\n\t\t */\n\n\t\tif($this->_removeExtraSlashes && $uri != '/')\n\t\t\t$handledUri = rtrim($uri, '/');\n\t\telse\n\t\t\t$handledUri = $uri;\n\n\t\t$request = null;\n\t\t$currentHostName = null;\n\t\t$routeFound = false;\n\t\t$parts = [];\n\t\t$params = [];\n\t\t$matches = null;\n\t\t$this->_wasMatched = false;\n\t\t$this->_matchedRoute = null;\n\n\t\tif(!is_object($this->_dependencyContainer))\n\t\t\tthrow new Exception('A dependency injection container is required to access the \\'request\\' service.');\n\n\t\tforeach($this->_routes as $route) {\n\n\t\t\t$params = [];\n\t\t\t$matches = null;\n\n\t\t\t$methods = $route->getHttpMethods();\n\n\t\t\tif(!is_null($methods)) {\n\n\t\t\t\t/** @var \\Mike\\Http\\Request $request */\n\n\t\t\t\tif(is_null($request))\n\t\t\t\t\t$request = $this->_dependencyContainer->get('request');\n\n\t\t\t\tif(!$request->isMethod($methods))\n\t\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\t$hostname = $route->getHostName();\n\n\t\t\tif(!is_null($hostname)) {\n\n\t\t\t\tif(is_null($currentHostName))\n\t\t\t\t\t$currentHostName = $request->getHttpHost();\n\n\t\t\t\tif(!$currentHostName)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif(Text::contains($hostname, '(')) {\n\n\t\t\t\t\tif(!Text::contains($hostname, '#')) {\n\n\t\t\t\t\t\t$regexHostName = '#^' . $hostname;\n\n\t\t\t\t\t\tif(!Text::contains($hostname, ':'))\n\t\t\t\t\t\t\t$regexHostName .= '(:[[:digit:]]+)?';\n\n\t\t\t\t\t\t$regexHostName .= '$#i';\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t$regexHostName = $hostname;\n\t\t\t\t\t}\n\n\t\t\t\t\t$matched = preg_match($regexHostName, $currentHostName);\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$matched = ($currentHostName == $hostname);\n\t\t\t\t}\n\n\t\t\t\tif(!$matched)\n\t\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * If the route has parentheses use preg_match\n\t\t\t */\n\n\t\t\t$pattern = $route->getCompiledPattern();\n\n\t\t\tif(Text::contains($pattern, '^'))\n\t\t\t\t$routeFound = preg_match($pattern, $handledUri, $matches);\n\n\t\t\telse\n\t\t\t\t$routeFound = ($pattern == $handledUri);\n\n\t\t\t/**\n\t\t\t * Check for beforeMatch conditions\n\t\t\t */\n\n\t\t\tif($routeFound) {\n\n\t\t\t\t$beforeMatch = $route->getBeforeMatch();\n\n\t\t\t\tif(!is_null($beforeMatch)) {\n\n\t\t\t\t\tif(!is_callable($beforeMatch))\n\t\t\t\t\t\tthrow new Exception('Before-Match callback is not callable in matched route.');\n\n\t\t\t\t\t$routeFound = call_user_func_array($beforeMatch, [$handledUri, $route, $this]);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif($routeFound) {\n\n\t\t\t\t$paths = $route->getPaths();\n\n\t\t\t\tif(is_array($matches)) {\n\n\t\t\t\t\t$converters = $route->getConverters();\n\n\t\t\t\t\tforeach($paths as $part => $position) {\n\n\t\t\t\t\t\tif(!is_string($part))\n\t\t\t\t\t\t\tthrow new Exception('Wrong key in paths: ' . $part);\n\n\t\t\t\t\t\tif(!is_string($position) && !is_integer($position))\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\tif(isset($matches[$position])) {\n\n\t\t\t\t\t\t\tif(is_array($converters)) {\n\n\t\t\t\t\t\t\t\tif(isset($converters[$part])) {\n\n\t\t\t\t\t\t\t\t\t$parts[$part] = call_user_func_array($converters[$part], [ $matches[$position] ]);\n\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$parts[$part] = $matches[$position];\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif(is_array($converters)) {\n\n\t\t\t\t\t\t\t\tif(isset($converters[$part]))\n\t\t\t\t\t\t\t\t\t$parts[$part] = call_user_func_array($converters[$part], [$position]);\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tif(is_integer($position))\n\t\t\t\t\t\t\t\t\tunset($parts[$part]);\n\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$this->_matches = $matches;\n\t\t\t\t}\n\n\t\t\t\t$this->_matchedRoute = $route;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif($routeFound)\n\t\t\t$this->_wasMatched = true;\n\t\telse\n\t\t\t$this->_wasMatched = false;\n\n\t\tif(!$routeFound) {\n\n\t\t\t$notFoundPaths = $this->_notFoundPaths;\n\n\t\t\tif(!is_null($notFoundPaths)) {\n\n\t\t\t\t$parts = Route::getRoutePaths($notFoundPaths);\n\t\t\t\t$routeFound = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\t$this->_module = $this->_defaultModule;\n\t\t$this->_controller = $this->_defaultController;\n\t\t$this->_action = $this->_defaultAction;\n\t\t$this->_params = $this->_defaultParams;\n\n\t\tif($routeFound) {\n\n\t\t\tif(isset($parts['module'])) {\n\n\t\t\t\tif(!is_numeric($parts['module']))\n\t\t\t\t\t$this->_module = $parts['module'];\n\n\t\t\t\tunset($parts['module']);\n\t\t\t}\n\n\n\t\t\tif(isset($parts['controller'])) {\n\n\t\t\t\tif(!is_numeric($parts['controller']))\n\t\t\t\t\t$this->_controller = $parts['controller'];\n\n\t\t\t\tunset($parts['controller']);\n\t\t\t}\n\n\n\t\t\tif(isset($parts['action'])) {\n\n\t\t\t\tif(!is_numeric($parts['action']))\n\t\t\t\t\t$this->_action = $parts['action'];\n\n\t\t\t\tunset($parts['action']);\n\t\t\t}\n\n\t\t\tif(isset($parts['params'])) {\n\n\t\t\t\tif(is_string($parts['params'])) {\n\n\t\t\t\t\t$strParams = trim($parts['params'], '/');\n\n\t\t\t\t\tif($strParams != '')\n\t\t\t\t\t\t$params = explode('/', $strParams);\n\n\t\t\t\t}\n\n\t\t\t\tunset($parts['params']);\n\t\t\t}\n\n\t\t\tif(count($params))\n\t\t\t\t$this->_params = array_merge($params, $parts);\n\t\t\telse\n\t\t\t\t$this->_params = $parts;\n\n\t\t}\n\t}", "protected function route()\n {\n return route($this->uri, $this->params);\n }", "public function requestURI() {\n return $_SERVER['REQUEST_URI'];\n }", "private function getURI(): string\n {\n if (!empty($_SERVER['REQUEST_URI'])) {\n return trim($_SERVER['REQUEST_URI'], '/');\n }\n }", "private static function getURI()\n {\n $uri = $_SERVER['REQUEST_URI']; // get URI\n\n $uri = str_replace('../', '', $uri); // security reasons\n\n if (substr($uri, strlen($uri)-1,1)=='/') // strip ending '/'\n $uri = substr($uri, 0, strlen($uri)-1);\n\n if ($uri=='') // if it's index page\n $uri = '/index';\n\n return $uri;\n }", "public function fetchUriString()\n\t{\n\t\tif ($_tempUri = $this->getUriFromRequest())\n\t\t{\n\t\t\t$this->set(trim($_tempUri, '/'));\n\t\t}\n\t\t\n\t\treturn;\n\t}", "function getCurrentRoute() {\n $santitizedUrl = ''; \n if (!empty($_GET['route'])) {\n $santitizedUrl = trim($_GET['route']);\n }\n \n return $this->getMatchingRoute($santitizedUrl);\n }", "protected function convertXPath($expr): string\n\t{\n\t\tif (str_starts_with($expr, 'starts-with'))\n\t\t{\n\t\t\treturn $this->convertStartsWithExpr($expr);\n\t\t}\n\n\t\t$replacements = [\n\t\t\t\"(^translate\\\\(@(\\\\w+),'(.)','(.)'\\\\))\" => '$$1|replace(\\'$2\\',\\'$3\\')',\n\n\t\t\t\"(^\\\\$(\\\\w+)(!=|(=))('.*')$)D\" => '$xf.options.s9e_MediaSites_$1$2$3$4',\n\t\t\t\"(^contains\\\\(\\\\$(\\\\w+,'[^']+')\\\\)$)D\" => 'contains($xf.options.s9e_MediaSites_$1)',\n\n\t\t\t'(^@(\\\\w+)$)D' => '$$1',\n\t\t\t\"(^@(\\\\w+)(='.*')$)D\" => '$$1=$2',\n\t\t\t'(^@(\\\\w+)>(\\\\d+)$)D' => '$$1>$2',\n\t\t\t'(^100\\\\*@height div@width$)D' => '100*$height/$width',\n\t\t\t'(^100\\\\*\\\\(@height\\\\+(\\\\d+)\\\\)div@width$)D' => '100*($height+$1)/$width',\n\t\t\t\"(^contains\\\\(@(\\\\w+,'[^']+')\\\\)$)D\" => 'contains($$1)',\n\t\t\t\"(^not\\\\(contains\\\\(@(\\\\w+,'[^']+')\\\\)\\\\)$)D\" => '!contains($$1)',\n\t\t\t\"(^@(\\\\w+) or ?contains\\\\(@(\\\\w+,'[^']+')\\\\)$)D\" => '$$1 or contains($$2)',\n\t\t\t\"(^@(\\\\w+) and ?contains\\\\(('[^']+'),@(\\\\w+)\\\\)$)D\" => '$$1 and contains($2,$$3)',\n\t\t\t\"(^@(\\\\w+) and@(\\\\w+)!=('[^']++')$)D\" => '$$1 and $$2!=$3',\n\n\t\t\t\"(^substring-after\\\\(@(\\\\w+),('[^']+')\\\\)$)\" => '$$1|split($2)|last()',\n\t\t\t\"(^substring-before\\\\(@(\\\\w+),('[^']+')\\\\)$)\" => '$$1|split($2)|first()',\n\t\t];\n\n\t\t$expr = html_entity_decode($expr);\n\t\t$expr = preg_replace(array_keys($replacements), array_values($replacements), $expr, -1, $cnt);\n\t\tif (!$cnt)\n\t\t{\n\t\t\tthrow new RuntimeException('Cannot convert ' . $expr);\n\t\t}\n\n\t\treturn $expr;\n\t}", "public static function getIsValidUri()\n {\n return function ($uri) {\n return Validate::isValidUri($uri, 'uri');\n };\n }", "function get_method() {\n $parts = explode('/', $this->request_uri);\n if (count($parts) > 3) {\n return $parts[3];\n }\n return 'index';\n }", "public function request($path_info) {\n return $this->simple_expression->replace_by_names($path_info, $this->target);\n }", "private function getURI()\r\n {\r\n return trim($_SERVER['REQUEST_URI'], '/') ?? '';\r\n }", "public function uri()\n {\n return $this->_requestUri;\n }", "public function uri() {\n\t\treturn $this->getUri();\n\t}" ]
[ "0.56797624", "0.5590424", "0.55856025", "0.54913354", "0.53815466", "0.52978593", "0.5285936", "0.5277744", "0.52549905", "0.52449566", "0.52354604", "0.5228532", "0.52077657", "0.52077657", "0.52054226", "0.51723003", "0.51678157", "0.51502526", "0.51144075", "0.51109594", "0.50881374", "0.5073354", "0.5073354", "0.5073354", "0.5059747", "0.5040758", "0.50015384", "0.49838567", "0.49014783", "0.48906595", "0.48413765", "0.48261407", "0.48111477", "0.48095602", "0.4798301", "0.47967753", "0.47878954", "0.47777906", "0.47607005", "0.47603026", "0.4720063", "0.47076204", "0.4683194", "0.46705374", "0.46629533", "0.46558574", "0.4654885", "0.4652866", "0.46450806", "0.46373343", "0.46253657", "0.4615341", "0.46048355", "0.45985535", "0.45910314", "0.45873836", "0.45746937", "0.45672247", "0.45613146", "0.45462444", "0.45258623", "0.45245707", "0.4523411", "0.45218876", "0.44998327", "0.4496255", "0.44906065", "0.44841993", "0.44824874", "0.44814372", "0.44811705", "0.44758326", "0.44752124", "0.44741264", "0.4469643", "0.4467608", "0.4467519", "0.4462222", "0.4461896", "0.4460875", "0.44591528", "0.44518492", "0.4449584", "0.44475132", "0.44408533", "0.44399112", "0.44382402", "0.44374067", "0.44342723", "0.44287992", "0.44189337", "0.44029444", "0.44011262", "0.43998808", "0.43985474", "0.43973124", "0.43963405", "0.43942672", "0.43936014", "0.43930417", "0.43922508" ]
0.0
-1
Returns route that can be matched against specified methods.
public function withMethods(array $methods): Route;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getRoutesForMethod($method);", "public function test_match_withSupportedMethod()\n {\n $route = new Route('GET|POST', '/home', 'test');\n $this->assertTrue(\n $route->match('GET', '/home'),\n 'match() must return true if method provided is supported by the route instanciated with more than one method.'\n );\n }", "function match($methods, $uri, $action)\n {\n Route::match($methods, $uri, $action);\n }", "public function match($methods, $uri, $action)\n {\n return $this->addRoute(\\array_map('strtoupper', (array) $methods), $uri, $action);\n }", "public function match($methods, $pattern, $fn)\n {\n\n $pattern = $this->baseRoute . '/' . trim($pattern, '/');\n $pattern = $this->baseRoute ? rtrim($pattern, '/') : $pattern;\n\n $params = [];\n foreach(explode('/',$pattern) as $item){\n if(strpos($item, '{') !== false && strpos($item, '}') !== false){\n $is_required = strpos($item, '?') !== false?false:true;\n $params[str_replace(['}','{','?'],'',$item)] = array('required'=>$is_required);\n }\n }\n $routeName = is_string($fn)\n ? strtolower(preg_replace(\n '/[^\\w]/i', '.', str_replace($this->namespace, '', $fn)\n ))\n : null;\n\n $routeName = (!is_null($this->defaultName))?$this->defaultName.'.'.$routeName:$routeName;\n\n $middlewares = [];\n\n if(!is_null($this->defaultMiddleware)){\n $middlewares = (is_string($this->defaultMiddleware))?[$this->defaultMiddleware]:(is_array($this->defaultMiddleware)?$this->defaultMiddleware:[]);\n }\n\n foreach (explode('|', $methods) as $method) {\n $this->routes[] = [\n 'method' => $method,\n 'pattern' => $pattern,\n 'fn' => $fn,\n 'name'=>$routeName,\n 'fields'=>$params,\n 'middlewares'=> $middlewares\n ];\n }\n return $this;\n }", "public function route(string $requestUri, string $requestMethod);", "public function getRoutesOf(String $method)\n {\n $method = strtoupper($method);\n\n if (!isset($this->routes[$method])) return null;\n\n return $this->routes[$method];\n }", "public function match($methods, $path, $action)\n {\n $methods = array_map('strtoupper', (array) $methods);\n\n return $this->addRoute($methods, $path, $action);\n }", "public function getDynamic(string $regex, string $method = null): Route|null;", "public function findMatch(\\string $uri, \\string $method);", "public function match($url=null, $method=null)\n{\n foreach(RouteCollection::group($method) as $route)\n {\n $regex = $route->convertPattern();\n if(preg_match($regex, $url, $matches))\n {\n array_shift($matches);\n $this->matches = $matches;\n $this->route = $route;\n $route->register('matches', $matches);\n $route->register('regex', $regex);\n return $route->parameters();\n }\n }\n return false;\n}", "private function match($uri, $method)\n\t{\n\t\tif(isset($this->routes[$method]) and !empty($this->routes[$method]))\n\t\t{\n\t\t\tforeach(array_keys($this->route[$method]) as $route)\n\t\t\t{\n\t\t\t\tforeach($this->choices as $search => $replace)\n\t\t\t\t{\n\t\t\t\t\t$route = str_replace($search, $replace, $route);\n\t\t\t\t}\n\n\t\t\t\tif($route == '(.+)')\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'parameters' => $uri,\n\t\t\t\t\t\t'before' => $this->routes[$method][$route]['before'],\n\t\t\t\t\t\t'callback' => $this->routes[$method][$route]['callback'],\n\t\t\t\t\t\t'after' => $this->routes[$method][$route]['after'],\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telseif(preg_match('#^'.$route.'$#i', $uri, $matches))\n\t\t\t\t{\n\t\t\t\t\t$parameters = [];\n\n\t\t\t\t\tfor($i = 1, $count = count($matches); $i < $count; $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$parameters[] = $matches[$i];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'parameters' => $parameters,\n\t\t\t\t\t\t'before' => $this->routes[$method][$route]['before'],\n\t\t\t\t\t\t'callback' => $this->routes[$method][$route]['callback'],\n\t\t\t\t\t\t'after' => $this->routes[$method][$route]['after'],\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function testRouterAddByAddRouteSeveralMethods($method)\n {\n $router = new Router();\n\n $router->any([\"GET\", \"POST\"], \"user\", function () {\n return \"user\";\n });\n\n $router->always(function () {\n return \"always\";\n });\n\n $res = $router->handle(\"user\", $method);\n if ($method === \"GET\" || $method === \"POST\") {\n $this->assertEquals(\"user\", $res);\n }\n\n if (!($method === \"GET\" || $method === \"POST\")) {\n $this->assertEquals(\"always\", $res);\n }\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "public function getRoutesByMethod()\n {\n return collect($this->getRoutes())\n ->groupBy(function (Route $route) {\n return $route->methods();\n })\n ->map(function (Collection $routes) {\n return $routes->mapWithKeys(function (Route $route) {\n return [$route->getDomain().$route->uri => $route];\n })->all();\n })\n ->all();\n }", "public function getRoutes($method = null)\n {\n if (null !== $method) {\n return (isset($this->routes[$method])) ? $this->routes[$method] : null;\n } else {\n return $this->routes;\n }\n }", "public function route() {\n\t\t$method = $_SERVER['REQUEST_METHOD'];\n\t\t$request = (isset($_SERVER['PATH_INFO'])) ? explode(\"/\", trim($_SERVER['PATH_INFO'], \"/\")) : \"\";\n\t\t\n\t\treturn $this->routeRequest($method, $request);\n\t}", "private static function route($method, $request){\n\t\t $params = array(\n\t\t\t\t\t\t\t'splat' => array(),\n\t\t\t\t\t\t\t'captures' => array()\n\t\t\t\t\t\t\t);\n\t\t\t\n\t\t\t// If the HTTP method and the request exactly match an existing route,\n\t\t\tif(isset(self::$routes[$method][$request])){\n\t\t\t\n\t\t\t\t// Then we store the anonymous function defined for that route.\n\t\t\t\t$function = self::$routes[$method][$request];\n\t\t\t\n\t\t\t/*\tIf there is no exact match, we check to see if there are any routes that match when you treat\n\t\t\t\tthem as regexes. We also treat named parameter and splat segments as matches. */\n\t\t\t} elseif( ($route = self::reverse_preg_match_array($request, array_keys(self::$routes[$method]), array('#\\*(/|$)#', '/:[A-Za-z0-9]+/'))) && $route !== false ) {\n\t\t\t\n\t\t\t\t// If multiple matching routes were returned, we pick the last one.\n\t\t\t\t$route = end($route);\n\t\t\t\t\n\t\t\t\t// Once we've found the matching route, we retrieve and store its anonymous function.\n\t\t\t\t$function = self::$routes[$method][$route];\n\t\t\t\t\n\t\t\t\t/*\tNext, we need to construct the $params array to pass into the anonymous function. In\n\t\t\t\t\torder to do that, we need to extract all the path segments where the user's request\n\t\t\t\t\tmatched a regex pattern, named parameter, or splat segment. We call a helper\n\t\t\t\t\tfunction to extract these path segments for us. Since these path segments are the\n\t\t\t\t\tonly ones for which the request differs from the defined route, it's simple to\n\t\t\t\t\textract them. */\n\t\t\t\t$changes = self::url_diff($request, $route);\n\t\t\t\t\n\t\t\t\t// We go through each difference, and store the appropriate value in $params:\n\t\t\t\tforeach($changes as $change){\n\t\t\t\t\n\t\t\t\t\t// A difference is stored as an array that contains the route segment as its only key, with the corresponding request segment as the value.\n\t\t\t\t\tforeach($change as $index => $value) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the current route segment is a named parameter (i.e. it starts with a colon ):\n\t\t\t\t\t\tif(preg_match('/^:/', $index)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Strip off the leading colon,\n\t\t\t\t\t\t\t$index = preg_replace('/^:/', '', $index);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// and add the key-value pair to the $params array.\n\t\t\t\t\t\t\t$params[$index] = $value;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the current route segment is a splat,\n\t\t\t\t\t\t} elseif ($index == '*'){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// add the request segment to the end of the $params['splat'] array.\n\t\t\t\t\t\t\t$params['splat'][] = $value;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the current route segment is a regex (or, if the request has more segments than the route\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the request segment to the end of the $params['captures'] array.\n\t\t\t\t\t\t\t$params['captures'][] = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// If we've found a matching route, then $function will already be set. If we haven't, we'll use the not_found function.\n\t\t\tif(!isset($function)){\n\t\t\t\t$function = self::$not_found;\n\t\t\t}\n\t\t\t\n\t\t\t// Return the function for matched route, and the $params to pass into it when executed. \n\t\t\treturn array($function, $params);\n\t\t}", "public static function match($methods, $pattern, $callback)\n\t{\n\t\tforeach ($methods as $method) {\n\t\t\tself::route(strtoupper($method), $pattern, $callback);\n\t\t}\n\t}", "public function getRouteMatch();", "public static function getRoutes();", "public static function getRoutes();", "public function test_route_method_string() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t$routes = $GLOBALS['wp_rest_server']->get_routes();\n\n\t\t$this->assertSame( $routes['/test-ns/test'][0]['methods'], array( 'GET' => true ) );\n\t}", "public function match($methods, $match, $rewrite = null, $closure = null);", "public function match($requestUrl = null, $requestMethod = null)\n {\n\n $params = [];\n\n // set Request Url if it isn't passed as parameter\n if ($requestUrl === null) {\n $requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';\n }\n\n // strip base path from request url\n $requestUrl = substr($requestUrl, strlen($this->basePath));\n\n // Strip query string (?a=b) from Request Url\n if (($strpos = strpos($requestUrl, '?')) !== false) {\n $requestUrl = substr($requestUrl, 0, $strpos);\n }\n\n $lastRequestUrlChar = $requestUrl[strlen($requestUrl) - 1];\n\n // set Request Method if it isn't passed as a parameter\n if ($requestMethod === null) {\n $requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';\n }\n\n foreach ($this->routes as $handler) {\n list($methods, $route, $target, $name) = $handler;\n\n $method_match = (stripos($methods, $requestMethod) !== false);\n\n if ($route === '*') {\n // * wildcard (matches all)\n $match = true;\n } elseif (isset($route[0]) && $route[0] === '@') {\n // @ regex delimiter\n $pattern = '`' . substr($route, 1) . '`u';\n $match = preg_match($pattern, $requestUrl, $params) === 1;\n } elseif (($position = strpos($route, '[')) === false) {\n // No params in url, do string comparison\n $match = strcmp($requestUrl, $route) === 0;\n } else {\n // Compare longest non-param string with url before moving on to regex\n // Check if last character before param is a slash, because it could be optional if param is optional too (see https://github.com/dannyvankooten/AltoRouter/issues/241)\n if (strncmp($requestUrl, $route, $position) !== 0 && ($lastRequestUrlChar === '/' || $route[$position - 1] !== '/')) {\n continue;\n }\n\n $regex = $this->compileRoute($route);\n $match = preg_match($regex, $requestUrl, $params) === 1;\n }\n\n if ($match) {\n if ($params) {\n foreach ($params as $key => $value) {\n if (is_numeric($key)) {\n unset($params[$key]);\n }\n }\n }\n\n // Method did not match, continue to next route.\n if (!$method_match) {\n $this->methodError = true;\n continue;\n } else {\n $this->methodError = false;\n }\n\n return [\n 'target' => $target,\n 'params' => $params,\n 'name' => $name\n ];\n }\n }\n\n if ($this->methodError) {\n return self::METHOD_ERROR;\n } else {\n return self::NO_MATCH;\n }\n }", "function match_and_exec($method, $path)\n {\n $possible_routes = $this->routes[$method];\n foreach($possible_routes as $route)\n {\n $result = $route->match($path);\n if (is_array($result) == false)\n {\n continue;\n }\n return $route->call($result);\n }\n return false;\n }", "public function match($requestUrl = null, $requestMethod = null)\n {\n $params = [];\n // set Request Url if it isn't passed as parameter\n if ( $requestUrl === null ) {\n $requestUrl = Server::isSetted('REQUEST_URI') ? Server::get('REQUEST_URI') : '/';\n }\n // strip base path from request url\n $requestUrl = substr($requestUrl, strlen($this->basePath));\n // Strip query string (?a=b) from Request Url\n if ( ($strpos = strpos($requestUrl, '?')) !== false ) {\n $requestUrl = substr($requestUrl, 0, $strpos);\n }\n $lastRequestUrlChar = $requestUrl ? $requestUrl[strlen($requestUrl)-1] : '';\n // set Request Method if it isn't passed as a parameter\n if ( $requestMethod === null ) {\n $requestMethod = Server::isSetted('REQUEST_METHOD') ? Server::get('REQUEST_METHOD') : 'GET';\n }\n foreach ($this->routes as $handler) {\n list($methods,$route,$target,$name,$permissions) = $handler;\n $method = (stripos($methods,$requestMethod) !== false);\n // Method did not match, continue to next route.\n if ( !$method ) {\n continue;\n }\n if ( $route === '*' ) {\n // * wildcard (matches all)\n $match = true;\n } elseif ( isset($route[0]) && $route[0] === '@' ) {\n // @ regex delimiter\n $pattern = '`' . substr($route, 1) . '`u';\n $match = preg_match($pattern, $requestUrl, $params) === 1;\n } elseif ( ($position = strpos($route, '[')) === false ) {\n // No params in url, do string comparison\n $match = strcmp($requestUrl, $route) === 0;\n } else {\n // Compare longest non-param string with url before moving on to regex\n if ( strncmp($requestUrl,$route,$position) !== 0 && ($lastRequestUrlChar === '/' || $route[$position-1] !== '/') ) {\n continue;\n }\n $regex = $this->compileRoute($route);\n $match = preg_match($regex,$requestUrl,$params) === 1;\n }\n if ( $match ) {\n if ( $params ) {\n foreach ($params as $key => $value) {\n if ( TypeCheck::isInt($key) ) {\n unset($params[$key]);\n }\n }\n }\n return [\n 'target' => $target,\n 'params' => $params,\n 'name' => $name,\n 'permissions' => $permissions\n ];\n }\n }\n return false;\n }", "public function test_route_method_array() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t$routes = $GLOBALS['wp_rest_server']->get_routes();\n\n\t\t$this->assertSame(\n\t\t\t$routes['/test-ns/test'][0]['methods'],\n\t\t\tarray(\n\t\t\t\t'GET' => true,\n\t\t\t\t'POST' => true,\n\t\t\t)\n\t\t);\n\t}", "public static function route();", "public function test_match_withUnsupportedMethod()\n {\n $route = new Route('GET', '/home', 'test');\n $this->assertFalse(\n $route->match('POST', '/home'),\n 'match() must return false method provided is not supported by the route.'\n );\n }", "static public function validUriMethodProvider()\n {\n return array(\n array('/foo', 'GET'),\n array('/', 'POST'),\n array('*', 'OPTIONS'),\n array('baz:1234', 'CONNECT'),\n array('http://example.com', 'GET'),\n array('/a/b/?d=e&f=g', 'FAKEMETHOD'),\n array('/some+encoded/%aa%bb%cc/text', 'HEAD')\n );\n }", "public function test_route_method_comma_seperated() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET,POST',\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t$routes = $GLOBALS['wp_rest_server']->get_routes();\n\n\t\t$this->assertSame(\n\t\t\t$routes['/test-ns/test'][0]['methods'],\n\t\t\tarray(\n\t\t\t\t'GET' => true,\n\t\t\t\t'POST' => true,\n\t\t\t)\n\t\t);\n\t}", "public function route()\n {\n $path = Url::getPath();\n\n // If no routes exist, set 404\n if (count($this->routes) == 0)\n {\n return;\n }\n\n // Check if exact match (cheap)\n if ((isset($this->routes[$path]))\n && (!$this->routes[$path]['is_regex']))\n {\n $this->dispatch($this->routes[$path]);\n exit;\n }\n\n // Loop through all routes and attempt to find a match. (expensive)\n foreach ($this->routes as $i => $route)\n {\n $matches = null;\n\n // If route found\n if (($route['is_regex'])\n && (preg_match($route['match'], $path, $matches)))\n {\n // Remove full match from array list\n array_shift($matches);\n\n $this->dispatch($route, $matches);\n exit;\n }\n }\n }", "function __invoke($method, $uri)\n {\n $method = strtolower($method);\n if (!isset($this->routes[$method])) {\n return null;\n }\n\n foreach ($this->routes[$method] as $regex => $callback) {\n\n if (preg_match($regex, $uri, $params)) {\n array_shift($params);\n return call_user_func_array($callback, $params);\n }\n }\n return null;\n }", "public function testGetOnHitReturnsRoutesWithMethodAction(): void\n {\n $routes = new RouteCollection([\n new Route(\n new UriTemplate('foo'),\n new MethodRouteAction('Foo', 'bar'),\n [$this->createMock(IRouteConstraint::class)],\n [new MiddlewareBinding('foo')]\n )\n ]);\n $this->cache->set($routes);\n $this->assertEquals($routes, $this->cache->get());\n }", "public function map(array $methods, $pattern, $callable)\n\t\t{\n if(!empty($this->groups))\n {\n \t$pp = '';\n \tforeach($this->groups as $group)\n \t $pp .= $group->getPattern();\n\n \t\t$pattern = $pp . $pattern;\n }\n\n\t\t\t// Create a new route\n\t\t\t$route = new Route($methods, $pattern, $callable, $this->groups);\n\t\t\t$route->setContainer($this->container);\n\n\t\t\t// Add route to routes\n\t\t\t$this->routes[] = $route;\n\n\t\t\treturn $route;\n\t\t}", "public function match($methods, $pattern, $func)\n {\n $pattern = $this->setBaseRoute($pattern);\n\n foreach (explode('|', $methods) as $method) {\n $this->routes[$method][] = array(\n 'pattern' => $pattern,\n 'fn' => $func\n );\n }\n\n return $this;\n }", "public function get($method = null)\n {\n return $this->getRoutesByMethod()[$method] ?? [];\n }", "function serve(array $routes, string $reqmethod, string $reqpath, ...$args): callable {\n\n $action = null;\n $params = null;\n $mwares = null;\n\n # test method + path against action method + expression\n foreach ($routes as [$actmethod, $regexp, $handlers]) {\n if ($reqmethod === $actmethod && preg_match($regexp, $reqpath, $caps)) {\n # action is last in the handlers chain\n $action = array_pop($handlers);\n $params = array_slice($caps, 1);\n $mwares = $handlers;\n break;\n }\n }\n\n # no matching route, 404\n if (empty($action)) {\n return call_user_func(_404(), ...$args);\n }\n\n # if we have params, run them through bindings\n $bindings = stash(DISPATCH_BINDINGS_KEY) ?? [];\n if (count($params) && count($bindings)) {\n foreach ($params as $key => $val) {\n $params[$key] = isset($bindings[$key])\n ? call_user_func($bindings[$key], $params[$key], ...$args)\n : $params[$key];\n }\n }\n\n # wrap action as last midware chain link\n $next = function () use ($action, $params, $args) {\n return empty($params)\n ? $action(...$args)\n : $action($params, ...$args);\n };\n\n # prepend matching global middleware into middleware chain\n $globalmwares = array_reverse(stash(DISPATCH_MIDDLEWARE_KEY) ?? []);\n foreach ($globalmwares as $middleware) {\n $pattern = array_shift($middleware);\n if (preg_match($pattern, $reqpath)) {\n array_unshift($mwares, ...$middleware);\n }\n }\n\n # build midware chain, from last to first, if any\n foreach (array_reverse($mwares) as $middleware) {\n $next = function () use ($middleware, $next, $params, $args) {\n return empty($params)\n ? $middleware($next, ...$args)\n : $middleware($next, $params, ...$args);\n };\n }\n\n # trigger middleware chain + handlers\n return $next();\n}", "public function get_matched_route()\n {\n }", "public function getStatic(string $path, string $method = null): Route|null;", "public function testHttpMethods()\n {\n //Case A\n $r = new \\Slim\\Route('/foo', function () {});\n $this->assertEmpty($r->getHttpMethods());\n //Case B\n $r->setHttpMethods('GET');\n $this->assertEquals(array('GET'), $r->getHttpMethods());\n //Case C\n $r->appendHttpMethods('POST', 'PUT');\n $this->assertEquals(array('GET', 'POST', 'PUT'), $r->getHttpMethods());\n //Case D\n $this->assertTrue($r->supportsHttpMethod('GET'));\n $this->assertFalse($r->supportsHttpMethod('DELETE'));\n //Case E\n $viaResult = $r->via('DELETE');\n $this->assertTrue($viaResult instanceof \\Slim\\Route);\n $this->assertTrue($r->supportsHttpMethod('DELETE'));\n }", "public function map(array $methods, string $pattern, $callable): MethodsInterface;", "public function getRoute();", "public function find($uri, $methods) {\n $route = $this->collection->match($uri, $methods);\n\n if ($route == false) { \n echo \"404\";\n return;\n }\n\n if ($this->collection->middleware !== NULL) {\n foreach ($this->collection->middleware as $m) {\n $m->run($route);\n }\n }\n\n $this->run($route->action);\n }", "public function resolve(string $uri, string $method = null, array $options = null): array|null\n {\n $routes = $this->routes();\n $routes || throw new RouterException('No route directives to resolve');\n\n $options = array_options($options, self::$options);\n $patterns = [];\n\n foreach ($routes as $i => [$pattern]) {\n $pattern || throw new RouterException('No pattern given for route `%s`', $i);\n\n // Format named parameters if given.\n if (str_contains($pattern, ':')) {\n $pattern = preg_replace_callback(\n // Eg: /:id[\\d] or /:tab{show|hide}\n '~(?<!\\?):(\\w+)(?:(?<c>[\\[\\{])(.+?)[\\]\\}])?~',\n function ($match) {\n $name = $match[1];\n\n // Simple (eg: /book/:id => /book/(?<id>[^/]+)).\n if (empty($match['c'])) {\n return '(?<'. $name .'>[^/]+)';\n }\n\n switch ($match['c']) {\n // Sets (eg: /book/:id[\\d] => /book/(?<id>[\\d]+)).\n case '[': return '(?<'. $name .'>['. $match[3] .']+)';\n // Optionals (eg: /book/:tab{show|hide} => /book/(?<tab>show|hide)).\n case '{': return '(?<'. $name .'>'. $match[3] .')';\n }\n },\n $pattern\n );\n }\n\n // Curlies are normal parens.\n $pattern = strtr($pattern, '{}', '()');\n\n // Escape delimiter.\n $pattern = addcslashes($pattern, '~');\n\n // Add optional slash to end.\n $options['endingSlashes'] && $pattern .= '/?';\n\n // See http://www.pcre.org/pcre.txt for verbs.\n $patterns[] = ' (*MARK:'. $i .') '. $pattern;\n }\n\n // Operator \"x\" is just for readability at debugging times.\n $pattern = \"~^(?:\\n\" . join(\" |\\n\", $patterns) . \"\\n)$~xAJ\";\n\n // Apply options.\n $options['unicode'] && $pattern .= 'u';\n $options['decodeUri'] && $uri = rawurldecode($uri);\n\n // Normalize URI (removes repeating & ending slashes).\n $uri = '/' . preg_replace('~/+~', '/', trim($uri, '/'));\n\n $this->debug = ['uri' => $uri, 'pattern' => $pattern, 'mark' => null];\n\n $res = preg_match($pattern, $uri, $match, PREG_UNMATCHED_AS_NULL);\n\n // Check invalid-pattern causing errors.\n if (!$res && $options['throwErrors']) {\n $message = preg_error_message($code, 'preg_match');\n $message && throw new RouterException($message, code: $code);\n }\n\n if ($res) {\n $this->debug['match'] = $match;\n\n $mark = (int) $match['MARK'];\n if (empty($routes[$mark][1])) {\n throw new RouterException('No call directives found for route `%s`', $mark);\n }\n\n $this->debug['mark'] = $mark;\n\n $calls = (array) $routes[$mark][1];\n $callArgs = $usedArgs = [];\n\n // Drop input & mark fields.\n $match = array_slice($match, 1, -1);\n\n // Handle conditional replacements, eg: [\"/user/:x{login|logut}\", \"User.{x}\"].\n foreach ($calls as $i => $call) {\n $rep = grep('~{(\\w+)}~', $call);\n if ($rep) {\n if (isset($match[$rep])) {\n // Replace & tick (\"-\" for camel-case).\n $calls[$i] = str_replace('{' . $rep . '}', '-' . $match[$rep] . '-', $call);\n $usedArgs[$match[$rep]] = 1;\n } else {\n // Remove non-found replacements from call.\n $calls[$i] = str_replace('{' . $rep . '}', '', $call);\n }\n }\n }\n\n // Fill call arguments.\n $i = 0;\n foreach ($match as $key => $value) {\n if (is_string($key)) {\n $value = $match[$i] ?? $value;\n // Skip NULLs that set via PREG_UNMATCHED_AS_NULL.\n if (isset($value) && !isset($usedArgs[$value])) {\n $callArgs[$key] = $value;\n }\n // Step back, so we need after-string indexes only.\n $i--;\n }\n $i++;\n }\n\n // Add extra call arguments if provided (in config as third field).\n if (isset($routes[$mark][2])) {\n $callArgs = array_merge($callArgs, (array) $routes[$mark][2]);\n }\n\n $pack = self::pack($calls, $callArgs);\n\n // Try to return defined method or all (*) methods.\n return $method ? $pack[$method] ?? $pack['*'] ?? null\n : $pack;\n }\n\n $this->debug['match'] = $match;\n\n // Not found.\n return null;\n }", "public function getMatchingRoute($uri, $method)\n {\n if (!isset($this->routes[$method]) || !is_array($this->routes[$method])) {\n throw new \\Exception(\"No route found\");\n }\n\n foreach ($this->routes[$method] as $route) {\n if ($method != $route->getMethod()) {\n continue;\n }\n\n if ($route->matches($uri)) {\n return $route;\n }\n }\n\n throw new \\Exception(\"No route found\");\n }", "public function getRoutes();", "public function getRoutes();", "protected function methodNotAllowedRoute(array $allowedMethods): Route\n\t{\n\t\treturn new Route([], '', static function () use ($allowedMethods): void\n\t\t{\n\t\t\tthrow new MethodNotAllowedException($allowedMethods);\n\t\t}, 'router:405');\n\t}", "public function get_route($request_route) {\n\n\n if (array_key_exists($request_route[\"_method\"], $this->_routes)) {\n\n if (array_key_exists($request_route[\"_rule\"], $this->_routes[$request_route[\"_method\"]])) {\n return $this->_routes[$request_route[\"_method\"]][$request_route[\"_rule\"]];\n } else { // search for match routes\n\n foreach ($this->_routes[$request_route[\"_method\"]] as $_route) {\n\n if ($_route->_match) {\n\n $request_rule = explode(\"/\", trim($request_route[\"_rule\"], \"/\"));\n $permit_rule = explode(\"/\", trim($_route->_rule, \"/\"));\n\n if (count($request_rule) == count($permit_rule)) {\n $match = true;\n foreach ($request_rule as $index => $value) {\n\n if (($request_rule[$index] != $permit_rule[$index]) and ($permit_rule[$index] != ApplicationRoute::dynamical_segment)) {\n $match = false;\n break;\n }\n }\n if ($match) {\n\n $permit_match_rule = explode(\"/\", trim($_route->_match_rule, \"/\"));\n preg_match_all('@:([\\w]+)@', $_route->_match_rule, $segments, PREG_PATTERN_ORDER);\n $segments = $segments[0];\n\n // get methodları için locals'a yükle : değişkenler\n foreach ($segments as $segment) {\n if ($index = array_search($segment, $permit_match_rule)) {\n $_route->_locals[substr($segment, 1)] = $request_rule[$index];\n }\n }\n\n return $_route;\n }\n }\n }\n }\n }\n return null;\n //throw new ConfigurationException(\"Böyle bir yönlendirme mevcut değil\", $request_route[\"_method\"] . \":\" . $request_route[\"_rule\"]);\n }\n throw new ConfigurationException(\"Uzay çağında bizim henüz desteklemediğimiz bir method\", $request_route[\"_method\"]);\n }", "abstract public function getRouteMatch();", "public function testAddRouteShorthandMethodGet()\n {\n $this->collection->get('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('GET', $routes[0]->getMethods());\n }", "public function route($methods, $uri = null, $action)\n {\n // Get methods\n $methods = explode(',', str_replace(', ', ',', $methods));\n\n // Loop through the methods, validating and storing their URIs/actions\n foreach ($methods as $method) {\n $method = strtolower($method);\n if (!array_key_exists($method, $this->routes)) {\n throw new \\Pop\\Exception('Error: One or more of the methods are not valid.');\n }\n if ($method == 'error') {\n $this->error($action);\n } else {\n if (null === $uri) {\n throw new \\Pop\\Exception('Error: You must assign a URI to an action routed to the ' . strtoupper($method) . ' method.');\n }\n $this->$method($uri, $action);\n }\n }\n\n return $this;\n }", "public function testHttpMethodBasedRouting() {\n\t\tRouter::connect('/{:controller}/{:id:[0-9]+}', [\n\t\t\t'http:method' => 'GET', 'action' => 'view'\n\t\t]);\n\t\tRouter::connect('/{:controller}/{:id:[0-9]+}', [\n\t\t\t'http:method' => 'PUT', 'action' => 'edit'\n\t\t]);\n\n\t\t$request = new Request(['url' => '/posts/13', 'env' => [\n\t\t\t'REQUEST_METHOD' => 'GET'\n\t\t]]);\n\t\t$params = Router::process($request)->params;\n\t\t$expected = ['controller' => 'Posts', 'action' => 'view', 'id' => '13'];\n\t\t$this->assertEqual($expected, $params);\n\n\t\t$this->assertIdentical('/posts/13', Router::match($params));\n\n\t\t$request = new Request(['url' => '/posts/13', 'env' => [\n\t\t\t'REQUEST_METHOD' => 'PUT'\n\t\t]]);\n\t\t$params = Router::process($request)->params;\n\t\t$expected = ['controller' => 'Posts', 'action' => 'edit', 'id' => '13'];\n\t\t$this->assertEqual($expected, $params);\n\n\t\t$request = new Request(['url' => '/posts/13', 'env' => [\n\t\t\t'REQUEST_METHOD' => 'POST'\n\t\t]]);\n\t\t$params = Router::process($request)->params;\n\t\t$this->assertEmpty($params);\n\t}", "public function route(string $method, $options = null)\n {\n return $options\n ? route(\"{$this->routePrefix}.{$method}\", $options)\n : route(\"{$this->routePrefix}.{$method}\");\n }", "protected function matchAgainstRoutes(array $routes, $request, $includingMethod = true)\n {\n [$fallbacks, $routes] = collect($routes)->partition(function ($route) {\n return $route->isFallback;\n });\n\n /* Here $routes will be sort by version desc */\n return Version::sortRoutes($routes)\n ->merge($fallbacks)->first(\n fn (Route $route) => $route->matches($request, $includingMethod)\n );\n }", "private function searchRoute()\r\n {\r\n $currentUrl = self::cleanUrl(self::getCurentUrl());\r\n $activeMethod = self::getActiveMethod();\r\n\r\n foreach (array_reverse($this->routes) as $route) {\r\n if (preg_match('/^'.$route['regex'].'$/', $currentUrl) && $activeMethod === $route['method']) {\r\n $route['active'] = $currentUrl;\r\n return $route;\r\n }\r\n }\r\n }", "public function match(CalledUri $calledUri): MatchingRoutes\n {\n $allowedMethods = [];\n $matching = [];\n foreach ($this->routes as $route) {\n /* @var $route \\stubbles\\webapp\\routing\\Route */\n if ($route->matches($calledUri)) {\n return new MatchingRoutes(\n ['exact' => $route],\n $route->allowedRequestMethods()\n );\n } elseif ($route->matchesPath($calledUri)) {\n $matching[] = $route;\n $allowedMethods = array_merge(\n $allowedMethods,\n $route->allowedRequestMethods()\n );\n }\n }\n\n return new MatchingRoutes($matching, array_unique($allowedMethods));\n }", "abstract public function getRoute();", "private function _getRoute($path)\n {\n if (strpos($this->request->getPath(), '/api') === 0) {\n $routes = $this->config->get('routes:rest');\n } else {\n $routes = $this->config->get('routes');\n }\n\n foreach ($routes as $name => $data) {\n\n if ($target = $this->_getDirectMatch($path, $data)) {\n return $target;\n } else if ($target = $this->_getVariableMatch($path, $data)) {\n return $target;\n }\n\n }\n\n throw new MethodNotFoundException('No matching route for path \"' . $path . '\" found');\n }", "private function getRouterMath()\n {\n \t$router = Zend_Controller_Front::getInstance()->getRouter();\n \t$request = Zend_Controller_Front::getInstance()->getRequest();\n \t \n \t// Find the matching route\n \t$routeMatched = false;\n \t \n \tforeach (array_reverse($router->getRoutes(), true) as $name => $route) {\n \t\t// TODO: Should be an interface method. Hack for 1.0 BC\n \t\tif (method_exists($route, 'isAbstract') && $route->isAbstract()) {\n \t\t\tcontinue;\n \t\t}\n \t\t \n \t\t// TODO: Should be an interface method. Hack for 1.0 BC\n \t\tif (!method_exists($route, 'getVersion') || $route->getVersion() == 1) {\n \t\t\t$match = $request->getPathInfo();\n \t\t} else {\n \t\t\t$match = $request;\n \t\t}\n \t\t \n \t\tif ($params = $route->match($match)) {\n \t\t\t$routeMatched = $params;\n \t\t\tbreak;\n \t\t}\n \t}\n \t \n \treturn $routeMatched;\n }", "public function getSystemRoutes();", "public function route(Request $request): Route\n\t{\n\t\t$requestMethod = $request->getMethod();\n\n\t\t$requestPath = $request->getPath();\n\n\t\tforeach($this->routes->getRoutesByMethod($requestMethod) as $route)\n\t\t{\n\t\t\tif($this->matches($route, $requestPath) && $this->constraintsAreSatisfied($route))\n\t\t\t{\n\t\t\t\t// If the matching route is missing its trailing slash then we'll\n\t\t\t\t// redirect it (but only if it's a GET or HEAD request)\n\n\t\t\t\tif($route->hasTrailingSlash() && !empty($requestPath) && substr($requestPath, -1) !== '/')\n\t\t\t\t{\n\t\t\t\t\tif(in_array($requestMethod, ['GET', 'HEAD']))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $this->redirectRoute($requestPath);\n\t\t\t\t\t}\n\n\t\t\t\t\tgoto notFound;\n\t\t\t\t}\n\n\t\t\t\t// If this is an \"OPTIONS\" request then we'll collect all the allowed request methods\n\t\t\t\t// from all routes matching the requested path. We'll then add an \"allows\" header\n\t\t\t\t// to the matched route\n\n\t\t\t\tif($requestMethod === 'OPTIONS')\n\t\t\t\t{\n\t\t\t\t\treturn $this->optionsRoute($requestPath);\n\t\t\t\t}\n\n\t\t\t\t// Assign the route to the request\n\n\t\t\t\t$request->setRoute($route);\n\n\t\t\t\t// Return the matched route and parameters\n\n\t\t\t\treturn $route;\n\t\t\t}\n\t\t}\n\n\t\t// Check if there are any routes that match the pattern and constaints for other request methods\n\n\t\tif(!empty(($allowedMethods = $this->getAllowedMethodsForMatchingRoutes($requestPath))))\n\t\t{\n\t\t\treturn $this->methodNotAllowedRoute($allowedMethods);\n\t\t}\n\n\t\t// No routes matched so we'll return a not found route\n\n\t\tnotFound:\n\n\t\treturn $this->notFoundRoute();\n\t}", "static function route () {\n\t\tif (isset($_GET['path'])) {\n\t\t\t$get_path = $_GET['path'];\n\t\t}\n\t\telse {\n\t\t\t$get_path = '/';\n\t\t}\n\n\t\t// check if GET path has a match, show 404 by default if it does not\n\t\t$parameters = [];\n\t\t$controller_method = 'AppController::four_zero_four';\n\n\t\tforeach (self::$routes as $route) {\n\t\t\tif ($route['regex_path'] != '/') {\n\t\t\t\t$route['regex_path'] = trim($route['regex_path'], '/');\n\t\t\t}\n\n\t\t\tif (preg_match('|^'.$route['regex_path'].'$|i', $get_path, $parameters)) {\n\t\t\t\t// match found for GET path\n\t\t\t\tif ($route['auth_required'] == 'not_signed_in' && AppUser::is_signed_in()) {\n\t\t\t\t\t// auth required is not_signed_in and user is signed in, redirect to dashboard\n\t\t\t\t\tRedirector::redirect('dashboard');\n\t\t\t\t}\n\t\t\t\telse if ($route['auth_required'] == 'signed_in' && !AppUser::is_signed_in()) {\n\t\t\t\t\t// auth required is signed in and user is not signed in, redirect to sign in page\n\t\t\t\t\tRedirector::redirect('sign_in');\n\t\t\t\t}\n\n\t\t\t\tif ($route['permission_required'] == null || AppUser::has_permission($route['permission_required'])) {\n\t\t\t\t\t// set controller method if user has permission\n\t\t\t\t\t$controller_method = $route['controller_method'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// user does not have permission, redirect to index\n\t\t\t\t\tRedirector::redirect('/');\n\t\t\t\t}\n\n\t\t\t\t// remove first parameter as it is the GET path and not a value we want\n\t\t\t\tif (!empty($parameters)) {\n\t\t\t\t\tunset($parameters[0]);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// route to the corresponding controller method\n\t\tcall_user_func_array($controller_method, $parameters);\n\t}", "protected function _parse_routes()\n\t{\n\t\t$uri = implode('/', $this->uri->segments);\n\n\t\t// Get HTTP verb\n\t\t$http_verb = isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) : 'cli';\n\n\t\t// Loop through the route array looking for wildcards\n\t\tforeach ($this->routes as $key => $val)\n\t\t{\n\t\t\t// Check if route format is using HTTP verbs\n\t\t\tif (is_array($val))\n\t\t\t{\n\t\t\t\t$val = array_change_key_case($val, CASE_LOWER);\n\t\t\t\tif (isset($val[$http_verb]))\n\t\t\t\t{\n\t\t\t\t\t$val = $val[$http_verb];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Convert wildcards to RegEx\n\t\t\t$key = str_replace(array(':any', ':num',':all'), array('[^/]+', '[0-9]+','(?!(Techsystem|techsystem|Vindex\\/tech5sManagerControl).*$).*'), $key);\n\t\t\t// $key = str_replace(array(':any', ':num'), array('[^/]+', '[0-9]+'), $key);\n\t\t\t// Does the RegEx match?\n\t\t\tif (preg_match('#^'.$key.'$#', $uri, $matches))\n\t\t\t{\n\t\t\t\t// Are we using callbacks to process back-references?\n\t\t\t\tif ( ! is_string($val) && is_callable($val))\n\t\t\t\t{\n\t\t\t\t\t// Remove the original string from the matches array.\n\t\t\t\t\tarray_shift($matches);\n\n\t\t\t\t\t// Execute the callback using the values in matches as its parameters.\n\t\t\t\t\t$val = call_user_func_array($val, $matches);\n\t\t\t\t}\n\t\t\t\t// Are we using the default routing method for back-references?\n\t\t\t\telseif (strpos($val, '$') !== FALSE && strpos($key, '(') !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t$val = preg_replace('#^'.$key.'$#', $val, $uri);\n\t\t\t\t}\n\n\t\t\t\t$this->_set_request(explode('/', $val));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\n\t\t// If we got this far it means we didn't encounter a\n\t\t// matching route so we'll set the site default route\n\t\t$this->_set_request(array_values($this->uri->segments));\n\t}", "public function testRouterAddByAny($method)\n {\n $router = new Router();\n\n $router->any(null, \"about\", function () {\n return \"about\";\n });\n\n $res = $router->handle(\"about\", $method);\n $this->assertEquals(\"about\", $res);\n\n $routes = $router->getAll();\n $this->assertEquals(1, count($routes));\n }", "protected function route()\n {\n return route($this->uri, $this->params);\n }", "public function route()\n\t{\n\t\t/* [http|https]/[Ajax|]/[Get|Post|Delete|Put]/uri */\n\t\t$this->route = $this->route_raw = ($this->c->Request->is_https ? 'https' : 'http').'/'.($this->c->Request->is_ajax ? 'Ajax' : '').'/'.$this->c->Request->request.'/'.$this->c->Request->uri;\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->preRouter();\n\n\t\t/* rewrite dispatch route */\n\t\tforeach ($this->c->router['routes'] as $regexpath => $switchto) {\n\t\t\tif (preg_match($regexpath, $this->route)) {\n\t\t\t\t/* we got a match */\n\t\t\t\t$this->route = preg_replace($regexpath, $switchto, $this->route);\n\t\t\t\t$this->route_matched = $regexpath;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->postRouter();\n\n\t}", "private function parseRoutes()\n {\n // Turn the segment array into a URI string\n $uri = implode('/', $this->uri->getSegments());\n // Is there a literal match? If so we're done\n if (isset($this->routes[$uri])) {\n return $this->setRequest(explode('/', $this->routes[$uri]));\n }\n\n // Loop through the route array looking for wild-cards\n foreach ($this->routes as $key => $val) {\n // Convert wild-cards to RegEx\n $key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key));\n // Does the RegEx match?\n if (preg_match('#^'.$key.'$#', $uri)) {\n // Do we have a back-reference?\n if (strpos($val, '$') !== false && strpos($key, '(') !== false) {\n $val = preg_replace('#^'.$key.'$#', $val, $uri);\n }\n\n return $this->setRequest(explode('/', $val));\n }\n }\n\n // If we got this far it means we didn't encounter a\n // matching route so we'll set the site default route\n $this->setRequest($this->uri->getSegments());\n }", "public function getRoutes(): array\r\n {\r\n return [\r\n [\r\n 'name' => 'exclusive/json/messagetutor',\r\n 'path' => '/exclusive/json/mT',\r\n 'middleware' => Action\\Json\\MessageTutor::class,\r\n 'allowed_methods' => ['POST']\r\n ],\r\n [\r\n 'name' => 'exclusive/json/certificateprintfree',\r\n 'path' => '/exclusive/json/cPf',\r\n 'middleware' => Action\\Json\\CertificatePrintFree::class,\r\n 'allowed_methods' => ['POST']\r\n ]\r\n ];\r\n }", "public function testRouterAddByAll($method)\n {\n $router = new Router();\n\n $router->all($method, function () use ($method) {\n return \"all-$method\";\n });\n\n $res = $router->handle(\"\", $method);\n $this->assertEquals(\"all-$method\", $res);\n\n $res = $router->handle(\"about\", $method);\n $this->assertEquals(\"all-$method\", $res);\n\n $res = $router->handle(\"what/ever\", $method);\n $this->assertEquals(\"all-$method\", $res);\n\n $routes = $router->getAll();\n $this->assertEquals(1, count($routes));\n }", "protected function defineRoute($method,$path,$fn,$paramsSequence) {\n \n $route = Array('method'=>$method,'path'=>$path,'fn'=>$fn,'paramsSequence'=>$paramsSequence);\n $this->_routes[] = $route;\n return true;\n \n }", "static public function invalidUriMethodProvider()\n {\n return array(\n array('some crap', 'GET'),\n array('*', 'POST'),\n array('ftp://example.com/baz/bar', 'GET'),\n array('host:433', 'HEAD'),\n array('http://example.com/path', 'CONNECT')\n );\n }", "protected function getMethodPatterns($uri, $method)\n {\n return $this->router->findPatternFilters(\n Request::create($uri, $method)\n );\n }", "public function useRoute(){\n\t\t\t$routeParts = explode(\"@\", $this->matchingRoute->location);\n\t\t\treturn [\"controller\" => ucfirst($routeParts[0]), \"method\" => $routeParts[1]];\n\t\t}", "public function getFullRoute();", "public function getRoutes() {}", "public static function methodsProvider(): array\n {\n return [\n 'GET' => ['get'],\n 'POST' => ['post'],\n 'PATCH' => ['patch'],\n 'PUT' => ['put'],\n 'DELETE' => ['delete'],\n ];\n }", "public function routerMatchingExamples()\n {\n return [\n ['GET', '', MatchResult::found(['name' => 'root'], [])],\n ['GET', '/', MatchResult::found(['name' => 'root-slash'], [])],\n ['GET', '/a', MatchResult::notFound()],\n ];\n }", "public static function parseRouter(array|null $router = [], string $prefix = \"/\", array $methodsAllowed = self::METHODS):array {\n\n # Prepare result\n $result = [];\n\n # Check patterns\n if(\n $router === null ||\n empty($router) ||\n !isset($router[\"patterns\"]) || \n empty($router[\"patterns\"])\n )\n\n # Stop function\n return $result;\n\n # Prepare prefix\n $prefix = trim($prefix, \"/\");\n\n # Check methods\n if(!isset($router[\"methods\"]) || empty($router[\"methods\"]))\n\n # Set get\n $router[\"methods\"] = [\"GET\"];\n\n # Check router is array\n if(!is_array($router[\"methods\"])) $router[\"methods\"] = [$router[\"methods\"]];\n\n # Iteration of methods\n foreach($router[\"methods\"] as $method){\n\n # Check current router\n if(!in_array(strtoupper($method), $methodsAllowed))\n\n # Continue iteration\n continue;\n\n # Check patterns is array\n if(!is_array($router[\"patterns\"])) \n $router[\"patterns\"] = [$router[\"patterns\"]];\n\n # Iteration of patterns\n foreach($router[\"patterns\"] as $pattern){\n\n # Set and/or clear data \n $data = [];\n\n # Clean pattern\n $pattern = trim($pattern, \"/\");\n\n # Fill name in data\n if(!isset($router[\"name\"]) || empty($router[\"name\"]))\n\n # New Exception\n throw new CrazyException(\n \"Name is missing in router given \\\"\".json_encode($router).\"\\\"\",\n 500,\n [\n \"custom_code\" => \"router-001\",\n ]\n );\n\n else\n\n # Fill name\n $data[\"name\"] = $router[\"name\"];\n\n # Fill controller in data\n if(!isset($router[\"controller\"]) || empty($router[\"controller\"]))\n\n # New Exception\n throw new CrazyException(\n \"Controller class is missing in router given \\\"\".json_encode($router).\"\\\"\",\n 500,\n [\n \"custom_code\" => \"router-002\",\n ]\n );\n\n else\n\n # Fill controller\n $data[\"controller\"] = $router[\"controller\"].\"::\".$method;\n\n # Fill pattern\n $data[\"pattern\"] = (isset($router[\"prefix\"])) ?\n (\n $router[\"prefix\"] ?\n \"/\".trim($router[\"prefix\"], \"/\").\"/$pattern/\" :\n \"/$pattern/\"\n\n ) :\n \"/$prefix/$pattern/\";\n\n # Check if not double //\n $data[\"pattern\"] = str_replace(\"//\", \"/\", $data[\"pattern\"]);\n\n # Fill method\n $data[\"method\"] = strtoupper($method);\n\n # Fill type\n $data[\"type\"] = \"router\";\n\n # Push data in result\n $result[] = $data;\n\n }\n\n }\n\n # Return result\n return $result;\n\n }", "public function testRouterAddByGet($method)\n {\n $router = new Router();\n\n $router->get(\"\", function () {\n return \"get\";\n });\n\n $router->always(function () {\n return \"not get\";\n });\n\n $res = $router->handle(\"\", $method);\n if ($method === \"GET\") {\n $this->assertEquals(\"get\", $res);\n }\n if ($method !== \"GET\") {\n $this->assertEquals(\"not get\", $res);\n }\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "public function method(string $method): Route\n {\n $this->setMethods(explode('|', $method));\n\n return $this;\n }", "public function match ( Request $request ) {\n $params = [];\n $match = false;\n \n // set Request Url if it isn't passed as parameter\n $requestUrl = $request->requesturi();\n \n // set Request Method if it isn't passed as a parameter\n $requestMethod = $request->method();\n foreach($this->routes as $handler) {\n list($methods, $route, $target, $name) = $handler;\n $method_match = (stripos($methods, $requestMethod) !== false);\n // Method did not match, continue to next route.\n if (!$method_match) continue;\n \n if ( $route === '*' ) {\n // * wildcard (matches all)\n $match = true;\n } elseif (isset($route[0]) && $route[0] === '@') {\n // @ regex delimiter\n $pattern = '`' . substr($route, 1) . '`u';\n $match = preg_match($pattern, $requestUrl, $params) === 1;\n } elseif (($position = strpos($route, '[')) === false) {\n // No params in url, do string comparison\n $match = strcmp($requestUrl, $route) === 0;\n } else {\n // Compare longest non-param string with url\n if (strncmp($requestUrl, $route, $position) !== 0) {\n continue;\n }\n $regex = $this->compileRoute($route);\n $match = preg_match($regex, $requestUrl, $params) === 1;\n }\n if ($match) {\n if ($params) {\n foreach($params as $key => $value) {\n if(is_numeric($key)) unset($params[$key]);\n }\n }\n return array(\n 'target' => $target,\n 'params' => $params,\n 'name' => $name\n );\n }\n }\n return false;\n }", "protected function _parse_routes()\n {\n $uri = implode('/', $this->uri->segments);\n\n // Get HTTP verb\n $http_verb = isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) : 'cli';\n\n // Is there a literal match? If so we're done\n if (isset($this->routes[$uri])) {\n // Check default routes format\n if (is_string($this->routes[$uri])) {\n $this->_set_request(explode('/', $this->routes[$uri]));\n return;\n }\n // Is there a matching http verb?\n elseif (is_array($this->routes[$uri]) && isset($this->routes[$uri][$http_verb])) {\n $this->_set_request(explode('/', $this->routes[$uri][$http_verb]));\n return;\n }\n }\n\n // decryption of module/controller/function name in admin\n if ($this->config->item('is_admin') == 1) {\n if ($this->config->item('ADMIN_URL_ENCRYPTION') == 'Y') {\n $uri_t = str_replace('admin/', '', $uri);\n if ($uri_t != \"\") {\n require_once(APPPATH . '/libraries/Ci_encrypt.php');\n $CI_Enc = new Ci_encrypt();\n $uri_t_decode = $CI_Enc->decrypt($uri_t, true);\n $CI_Enc->convertEncryptedVars();\n }\n $uri = 'admin/' . $uri_t_decode;\n }\n }\n // Loop through the route array looking for wildcards\n foreach ($this->routes as $key => $val) {\n // Check if route format is using http verb\n if (is_array($val)) {\n if (isset($val[$http_verb])) {\n $val = $val[$http_verb];\n } else {\n continue;\n }\n }\n\n // Convert wildcards to RegEx\n #$key = str_replace(array(':any', ':num'), array('[^/]+', '[0-9]+'), $key);\n $key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key));\n\n // Does the RegEx match?\n if (preg_match('#^' . $key . '$#', $uri, $matches)) {\n // Are we using callbacks to process back-references?\n if (!is_string($val) && is_callable($val)) {\n // Remove the original string from the matches array.\n array_shift($matches);\n\n // Execute the callback using the values in matches as its parameters.\n $val = call_user_func_array($val, $matches);\n }\n // Are we using the default routing method for back-references?\n elseif (strpos($val, '$') !== FALSE && strpos($key, '(') !== FALSE) {\n $val = preg_replace('#^' . $key . '$#', $val, $uri);\n }\n\n $this->_set_request(explode('/', $val));\n return;\n }\n }\n\n // If we got this far it means we didn't encounter a\n // matching route so we'll set the site default route\n $this->_set_request(array_values($this->uri->segments));\n }", "public function GetRouteClass ();", "function route($method, $regex, $controller, $function, ...$parameters) {\n if($_SERVER[\"REQUEST_METHOD\"] !== $method) return;\n // Remove the root part of the URI so we only have the request\n $url = str_replace(ROOT, \"\", $_SERVER[\"REQUEST_URI\"]);\n\n $regex = createRegex($regex);\n\n if(preg_match($regex, $url, $args)) {\n // preg_match puts the matched string in the first element of the array, so we remove it\n array_shift($args);\n // Call the controller (autoloaded)\n $controller = new $controller();\n // Call the method with unpacked arguments\n $controller->$function(...$args, ...$parameters);\n exit;\n }\n}", "public function any(string $pattern, $callable): MethodsInterface;", "function routes($http, $uri) {\n\n $dispatcher = FastRoute\\simpleDispatcher(function(FastRoute\\RouteCollector $r) {\n $r->addRoute('GET', '/question', 'questions#get_answer');\n $r->addRoute('GET', '/hello', 'questions#get_hello');\n $r->addRoute('GET', '/question/{name}/{id}/', 'questions#get_answer');\n $r->addRoute('GET', '/question/{name}/{id}', 'questions#get_answer');\n });\n\n\n// Strip query string (?foo=bar) and decode URI\n if (false !== $pos = strpos($uri, '?')) {\n $uri = substr($uri, 0, $pos);\n }\n\n $uri = rawurldecode($uri);\n $uri = str_replace(BASENAME_DIR . '/', '', $uri);\n $routeInfo = $dispatcher->dispatch($http, $uri);\n\n switch ($routeInfo[0]) {\n case FastRoute\\Dispatcher::NOT_FOUND:\n core\\basebuild::view('error/404');\n break;\n case FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n $allowedMethods = $routeInfo[1];\n echo 'allowed not found';\n break;\n case FastRoute\\Dispatcher::FOUND:\n\n $handler = explode('#', $routeInfo[1]);\n $build = $handler[0];\n $function = $handler[1];\n $vars = $routeInfo[2];\n $interfaces = APP_INTERFACE . $build;\n $interfaces = new $interfaces();\n $interfaces->$function();\n break;\n }\n}", "public static function route(array $route)\n\t\t{\n\t\t\t// Store actual Route, within the REQUEST_URI server\n\t\t\tBootstrap::getInstance()->setServerUri(implode('/', $route));\n\n\t\t\t$controller = ucfirst(urldecode(array_shift($route)));\n\n\t\t\ttry {\n\t\t\t\t$class = new ReflectionClass($controller);\n\t\t\t\t$method = new ReflectionMethod($controller, urldecode(array_shift($route)));\n\n\t\t\t\tif (($method->isPublic()) && ($class->isInstantiable())) {\n\t\t\t\t\t// is there any arguments ?\t\t\t\t\t\n\t\t\t\t\tif ((count($route) == 0) && ($method->getNumberOfRequiredParameters() == 0)) {\n\t\t\t\t\t\treturn $method->invoke($class->newInstance(Bootstrap::getInstance(), $class->name, $method->name), null);\n\t\t\t\t\t}\n\n\t\t\t\t\t// are we sending the correct amount of parameters ?\n\t\t\t\t\tif (count($route) >= $method->getNumberOfRequiredParameters()) {\n\t\t\t\t\t\treturn $method->invokeArgs($class->newInstance(Bootstrap::getInstance(), $class->name, $method->name), $route);\n\t\t\t\t\t}\n\n\t\t\t\t\tthrow new RouterException('The controller method was not sent the correct amount of parameters', 404);\n\t\t\t\t}\n\n\t\t\t\tthrow new RouterException('The method is either not public or the class is not isInstantiable', 404);\n\t\t\t} catch (ClassNotFoundException $e) {\n\t\t\t\t// catch it for Line 51\n\t\t\t}\n\n\t\t\t$route = func_get_args();\n\n\t\t\tthrow new RouterException('The controller/method could not be found | ' . implode('::', array_slice($route[0], 0, 2)) . '()', 404, ifsetor($e));\n\t\t}", "public function getRoute($path, $method)\n {\n foreach ($this->collection as $route) {\n if ($route->getPath() == $path && $route->getMethod() == $method) {\n return $route;\n }\n }\n\n return null;\n }", "public function matchRoute($method, $uri, $action) {\n $action = $this->parseAction($action);\n\n $uri = '/'.trim($uri, '/');\n\n if (isset($action['as'])) {\n $this->namedRoutes[$action['as']] = $uri;\n }\n\n if (is_array($method)) {\n foreach ($method as $verb) {\n $this->routes[$verb.$uri] = ['method' => $verb, 'uri' => $uri, 'action' => $action];\n }\n } else {\n $this->routes[$method.$uri] = ['method' => $method, 'uri' => $uri, 'action' => $action];\n }\n }", "public static function route($mappings)\n\t{\n\t\t$uri = Request::uri();\n\t\t\n\t\tforeach ( $mappings as $mapped_uri => $map )\n\t\t{\n\t\t\tif ( preg_match($mapped_uri, $uri) )\n\t\t\t{\n\t\t\t\treturn self::run_method($map['object'], $map['method']);\n\t\t\t}\n\t\t\t\n\t\t\t// Check for a 404 page\n\t\t\telse if ( strpos($mapped_uri, ':404') != FALSE )\n\t\t\t{\n\t\t\t\t$mapped_uri = str_replace(':404', self::$placeholders[':any'], $mapped_uri);\n\t\t\t\t\n\t\t\t\t// Check if the 404 page should be used for the current URI\n\t\t\t\tif ( preg_match($mapped_uri, $uri) )\n\t\t\t\t{\n\t\t\t\t\treturn self::run_method($map['object'], $map['method']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "public function getMethod()\t{\n\t\tif ($this->class != \"NoRoute\")\t{\n\t\t\treturn $this->method;\n\t\t}\n\t\treturn \"invoke\";\n\t}", "private function getRoute() {\n $path = $_SERVER['PATH_INFO'];\n\n $parts = explode('/', trim($path, '/'));\n $action = array_shift($parts);\n $this->uri_params = $parts;\n\n if (!$action) $action = 'index';\n $action .= 'Action';\n return array($this, $action);\n }", "public function supports($method = '');", "private static function traverseRoutes() {\r\n\r\n\r\n\t\t$method = $_SERVER['REQUEST_METHOD'];\r\n\t\t$requested = $_SERVER['REQUEST_URI'];\r\n\t\t$path = $requested; // set our path to our request\r\n\t\t$path = explode('?',$path)[0]; // check for a query string. At zero index\r\n\t\t$path = strlen($path) > 1 ? rtrim($path,'/') : $path; //strip the slash at the end of the string (if its there). rtrim will take care of this automatically\r\n\t\t$parts = explode('/',$path);\r\n\t\t$parameters = array(); // Start traversal process. These are the parameters that we will pass\r\n\t\t$level = &self::$routes[$method]; // same as when we are registering. Grab a reference to our trunk\r\n\t\t\r\n\t\t// traverse the tree and determine if we have a valid route\r\n\t\treset($parts);\r\n\t\twhile(($part = current($parts)) !== false) {\r\n\r\n\t\t\tif(isset($level[$part])) { // found, now we move down one more level\r\n\t\t\t\t$level = &$level[$part];\r\n\t\t\t} elseif(isset($level['@'])) { // didn't find a defined, but we have a wild card. Go down this level\r\n\t\t\t\t$level = &$level['@'];\r\n\t\t\t\t$parameters[$level['name']] = urldecode($part);\r\n\t\t\t} else {\r\n\t\t\t\tthrow new RouteException($requested.' route not found');\r\n\t\t\t}\r\n\r\n\t\t\tnext($parts);\r\n\t\t}\r\n\r\n\t\t// we have reached the final level. Extract the required information and dig in \r\n\t\t$callback = $level['*'];\r\n\t\tif(is_callable($callback)) {\r\n\t\t\t$callback($parameters);\r\n\t\t} else {\r\n\t\t\t$callbackParts = explode('@', $callback);\r\n\t\t\t$class = 'App\\Controllers\\\\'.$callbackParts[0];\r\n\t\t\t$function = $callbackParts[1];\r\n\t\t\t$controller = new $class();\r\n\t\t\treturn $controller->{$function}($parameters);\r\n\t\t}\r\n\r\n\t}", "public function route(): RouteContract;", "public static function getUriMethods()\n {\n $root = str_replace($_SERVER['DOCUMENT_ROOT'], '', getcwd());\n $subfolder = trim($root, '/');\n\n return trim(str_replace($subfolder, '', self::getUri()), '/');\n }", "function route_method(): string\n{\n return RouteController::getCurrentRoute()['method'] ?? '';\n}", "public function addRoute(string $pattern, array $methods, $handler = null): Route\n {\n $this->routes[] = $route = new Route($pattern, $methods, $handler);\n\n $this->resolveWith($route);\n\n return $route;\n }" ]
[ "0.76350987", "0.72354025", "0.71437126", "0.6987343", "0.6827819", "0.6740208", "0.6739182", "0.6672395", "0.6671263", "0.6658784", "0.66331995", "0.6502796", "0.6476182", "0.6460012", "0.64570296", "0.6456512", "0.642763", "0.64084524", "0.6405221", "0.64032155", "0.64032155", "0.6388064", "0.63579637", "0.6321336", "0.63109213", "0.6307321", "0.630189", "0.62637687", "0.6242444", "0.62416023", "0.6222248", "0.6220556", "0.62150455", "0.62072986", "0.6197838", "0.61934745", "0.6180909", "0.6169837", "0.6148877", "0.61130804", "0.6098337", "0.60859704", "0.60819256", "0.6078562", "0.6049916", "0.604963", "0.6043164", "0.6043164", "0.6031765", "0.59965277", "0.5980209", "0.59646064", "0.59281784", "0.59089303", "0.59058255", "0.5886524", "0.58807844", "0.587054", "0.5861185", "0.58585006", "0.58492875", "0.5840146", "0.583738", "0.5835107", "0.5834578", "0.58151525", "0.5808592", "0.5795182", "0.57881325", "0.5774189", "0.5770924", "0.5769897", "0.5764735", "0.57641804", "0.5762565", "0.57588905", "0.5740699", "0.57393515", "0.57341385", "0.57284427", "0.57224387", "0.5721244", "0.5714454", "0.5708849", "0.56917894", "0.5686774", "0.5678889", "0.56671107", "0.56597316", "0.5659594", "0.5652765", "0.56467366", "0.56437737", "0.5625182", "0.5614209", "0.55973595", "0.55971694", "0.5591059", "0.55814344", "0.5581176" ]
0.7759646
0
Returns requested methods that are accepted by the route.
public function getMethods(): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function methodProvider()\n {\n return [\n ['GET'],\n ['POST'],\n ['PUT'],\n ['DELETE'],\n ['TRACE'],\n ['HEAD'],\n ['OPTIONS'],\n ];\n }", "public function getAllowedMethods()\n {\n return $this->methods;\n }", "public function getImplementedMethods() {\n\n $supported_methods = $this->getConfiguration()->get('supported-http-methods');\n\n if ( is_null($supported_methods) ) $supported_methods = self::$supported_methods;\n\n if ( method_exists($this, 'any') ) {\n\n return $supported_methods;\n\n }\n\n $implemented_methods = [];\n\n foreach ( $supported_methods as $method ) {\n\n if ( method_exists($this, strtolower($method)) ) array_push($implemented_methods, $method);\n\n }\n\n return $implemented_methods;\n\n }", "public function getAllowedMethods(): array;", "public function getMethods()\r\n {\r\n return $this->validMethods;\r\n }", "public function get_allowedMethods() {\n\t\treturn Response::make('', '200',\n\t\t\t\tarray('Allow' => 'GET,PUT,POST,DELETE'));\n\t}", "public static function getAvailableMethods(): Collection\n {\n $class = (new \\ReflectionClass(static::class))\n ->getMethods(\\ReflectionMethod::IS_PUBLIC);\n\n return collect($class)\n ->mapWithKeys(function (\\ReflectionMethod $method) {\n return [$method->name => $method];\n })\n ->except(get_class_methods(Screen::class))\n ->except(['query'])\n ->whenEmpty(function () {\n /*\n * Route filtering requires at least one element to be present.\n * We set __invoke by default, since it must be public.\n */\n return collect('__invoke');\n })\n ->keys();\n }", "public function getRequestMethods ()\n {\n return Request::GET | Request::POST;\n }", "function getAllowedHttpMethods();", "public static function methodsProvider(): array\n {\n return [\n 'GET' => ['get'],\n 'POST' => ['post'],\n 'PATCH' => ['patch'],\n 'PUT' => ['put'],\n 'DELETE' => ['delete'],\n ];\n }", "public function test_match_withSupportedMethod()\n {\n $route = new Route('GET|POST', '/home', 'test');\n $this->assertTrue(\n $route->match('GET', '/home'),\n 'match() must return true if method provided is supported by the route instanciated with more than one method.'\n );\n }", "public function getAllowedMethods(): array {\n return $this->configuration['allowed_methods'];\n }", "public function getHttpMethods()\r\n {\r\n return $this->methods;\r\n }", "static public function validMethodProvider()\n {\n return array(\n array('GET'),\n array('TRACE'),\n array('PROPFIND'),\n array('MKCOL'),\n array('X-MS-ENUMATTS'),\n );\n }", "public function getMethods();", "public function getMethods();", "public function getMethods();", "public function getMethods() {\n $list = array();\n $functions = $this->get('function');\n if (null != $functions) {\n foreach ($functions as $function) {\n $name = $function->getName();\n if ('__construct' != $name && $this->getName() != $name) {\n if ($function->accept()) {\n $list[] = $function;\n }\n }\n }\n }\n return $list;\n }", "public function getAllowedMethods(): array {\n return $this->allowedMethods;\n }", "public function getHttpMethods()\n {\n return $this->methods;\n }", "public function getAllowedMethods()\n {\n return array('bestway'=>$this->getConfigData('name'));\n }", "protected function methods() {\n\t\treturn array(\n\t\t\t'status' => 'GET',\n\t\t\t'sessions' => 'POST',\n\t\t);\n\t}", "public static function getRoutesForMethod($method);", "public function testHttpMethods()\n {\n //Case A\n $r = new \\Slim\\Route('/foo', function () {});\n $this->assertEmpty($r->getHttpMethods());\n //Case B\n $r->setHttpMethods('GET');\n $this->assertEquals(array('GET'), $r->getHttpMethods());\n //Case C\n $r->appendHttpMethods('POST', 'PUT');\n $this->assertEquals(array('GET', 'POST', 'PUT'), $r->getHttpMethods());\n //Case D\n $this->assertTrue($r->supportsHttpMethod('GET'));\n $this->assertFalse($r->supportsHttpMethod('DELETE'));\n //Case E\n $viaResult = $r->via('DELETE');\n $this->assertTrue($viaResult instanceof \\Slim\\Route);\n $this->assertTrue($r->supportsHttpMethod('DELETE'));\n }", "public function methodProvider() {\n return array(\n array('GET', array( // standard GET support\n 'server' => array(\n 'REQUEST_METHOD' => 'GET',\n ),\n )),\n array('POST', array( // standard POST support\n 'server' => array(\n 'REQUEST_METHOD' => 'POST',\n ),\n )),\n array('PUT', array( // standard PUT support\n 'server' => array(\n 'REQUEST_METHOD' => 'PUT',\n ),\n )),\n array('PUT', array( //\n 'server' => array( // X-Http-Method-Override header support\n 'REQUEST_METHOD' => 'POST',\n 'HTTP_X_HTTP_METHOD_OVERRIDE' => 'PUT',\n ),\n )),\n array('PUT', array( //\n 'server' => array( // method_override querystring support\n 'REQUEST_METHOD' => 'POST',\n ),\n 'query' => array(\n 'method_override' => 'PUT'\n )\n )),\n );\n }", "protected function getAllowedMethodsForMatchingRoutes(string $requestPath): array\n\t{\n\t\t$methods = [];\n\n\t\tforeach($this->routes->getRoutes() as $route)\n\t\t{\n\t\t\tif($this->matches($route, $requestPath) && $this->constraintsAreSatisfied($route))\n\t\t\t{\n\t\t\t\t$methods = [...$methods, ...$route->getMethods()];\n\t\t\t}\n\t\t}\n\n\t\treturn array_unique($methods);\n\t}", "public function allowedMethods(): array\n\t{\n\t\treturn [];\n\t}", "public function getAllowedRequestMethods(): array\n {\n return $this->allowedRequestMethods;\n }", "public function getAllowedMethods()\n {\n \n \n \n return array( \n 'homedelivery' => $this->getConfigData('homedelivery'),\n \n 'matkahuolto' => $this->getConfigData('matkahuolto'),\n 'smartpost' => $this->getConfigData('smartpost'),\n \n \n \n 'chooseapostoffice' => $this->getConfigData('chooseapostoffice'), \n 'default' => $this->getConfigData('closestpostoffice'),\n \n );\n \n }", "public function getAllowedMethods()\r\r\n {\r\r\n return array('smartsend' => $this->getConfigData('name'));\r\r\n }", "public function getRequestMethods ()\n\t{\n\t\treturn Request::GET;\n\t}", "static public function validUriMethodProvider()\n {\n return array(\n array('/foo', 'GET'),\n array('/', 'POST'),\n array('*', 'OPTIONS'),\n array('baz:1234', 'CONNECT'),\n array('http://example.com', 'GET'),\n array('/a/b/?d=e&f=g', 'FAKEMETHOD'),\n array('/some+encoded/%aa%bb%cc/text', 'HEAD')\n );\n }", "public function test_route_method_array() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t$routes = $GLOBALS['wp_rest_server']->get_routes();\n\n\t\t$this->assertSame(\n\t\t\t$routes['/test-ns/test'][0]['methods'],\n\t\t\tarray(\n\t\t\t\t'GET' => true,\n\t\t\t\t'POST' => true,\n\t\t\t)\n\t\t);\n\t}", "public function validMethods()\n {\n return $this->valid_method;\n }", "protected function verbs()\n {\n return [];\n }", "public function getMethods()\r\n\t{\r\n\t\treturn $this->methods;\r\n\t}", "public function getMethods()\n {\n return $this->methods;\n }", "public function getMethods()\n {\n return $this->methods;\n }", "public function getMethods()\n {\n return $this->methods;\n }", "public function getMethods()\n {\n return $this->methods;\n }", "public static function get_supported_methods() {\n\t\treturn self::$supported_methods;\n\t}", "public function getMethods(): array\n {\n return $this->methods;\n }", "public function getMethods(): array\n {\n return $this->methods;\n }", "public function getMethodAllowableValues()\n {\n return [\n self::METHOD_GET,\n self::METHOD_POST,\n ];\n }", "public function AllowedMethods()\n {\n return array('ExecuteStep');\n }", "public function verbProvider(): array\n {\n return [\n ['POST'],\n ['PUT'],\n ['PATCH'],\n ['DELETE'],\n ['CONNECT'],\n ['TRACE'],\n ];\n }", "public function getAllowedMethods()\n {\n return ['loomisrate' => __('Loomis')];\n }", "protected static function PROCESS_METHODS()\n\t{\n\t\tif (! isset(self::$config::$methods) || ! is_array(self::$config::$methods))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Request method won't be set for CLI-based requests\n\t\t$method = strtolower($_SERVER['REQUEST_METHOD'] ?? 'cli');\n\n\t\tif (array_key_exists($method, self::$config::$methods))\n\t\t{\n\t\t\tself::$filters['before'] = array_merge(self::$filters['before'], self::$config::$methods[$method]);\n\t\t\treturn;\n\t\t}\n\t}", "public function getMethods() {\n return $this->methods;\n }", "public function withMethods(array $methods): Route;", "public function all()\n {\n $routes = parent::all();\n\n // sort routes by names - move custom actions at the beginning,\n // default at the end\n uksort($routes, function($route1, $route2) {\n $route1Match = preg_match('/(_|^)(get|post|put|delete|patch|head)_/', $route1);\n $route2Match = preg_match('/(_|^)(get|post|put|delete|patch|head)_/', $route2);\n\n if ($route1Match && !$route2Match) {\n return 1;\n } elseif (!$route1Match && $route2Match) {\n return -1;\n } else {\n return strcmp($route1, $route2);\n }\n });\n\n return $routes;\n }", "public function getMethods()\n\t{\n\t\treturn ['POST'];\n\t}", "public function getMethods()\n\t{\n\t\treturn ['POST'];\n\t}", "public function getRoutesByMethod()\n {\n return collect($this->getRoutes())\n ->groupBy(function (Route $route) {\n return $route->methods();\n })\n ->map(function (Collection $routes) {\n return $routes->mapWithKeys(function (Route $route) {\n return [$route->getDomain().$route->uri => $route];\n })->all();\n })\n ->all();\n }", "public function getRoutes(): array\r\n {\r\n return [\r\n [\r\n 'name' => 'exclusive/json/messagetutor',\r\n 'path' => '/exclusive/json/mT',\r\n 'middleware' => Action\\Json\\MessageTutor::class,\r\n 'allowed_methods' => ['POST']\r\n ],\r\n [\r\n 'name' => 'exclusive/json/certificateprintfree',\r\n 'path' => '/exclusive/json/cPf',\r\n 'middleware' => Action\\Json\\CertificatePrintFree::class,\r\n 'allowed_methods' => ['POST']\r\n ]\r\n ];\r\n }", "public function getAllowedMethods()\n {\n return [$this->getCarrierCode() => __($this->getConfigData('name'))];\n }", "public function testControllerMethodCatchAllRequestMethod()\n {\n $route = new Route();\n \n $route->set(null, \"user\", null, \"Anax\\Route\\MockHandlerControllerCatchAll\");\n \n $path = \"user/whatever\";\n $this->assertTrue($route->match($path, \"POST\"));\n $res = $route->handle($path);\n $this->assertEquals(\"catchAllPost\", $res);\n\n $this->assertTrue($route->match($path, \"PUT\"));\n $res = $route->handle($path);\n $this->assertEquals(\"catchAllPut\", $res);\n }", "public function getMethodAllowableValues()\n {\n return [\n self::METHOD_GET,\n self::METHOD_HEAD,\n self::METHOD_POST,\n self::METHOD_PUT,\n self::METHOD_PATCH,\n self::METHOD_DELETE,\n self::METHOD_OPTIONS,\n self::METHOD_TRACE,\n ];\n }", "public function getMethods($class);", "public function getHttpMethod();", "public static function getSupportedMethods(): array {}", "public function getMethodDescriptors(): array;", "public static function methodsSupported() : array\n {\n return RestMiniClient::METHODS_SUPPORTED;\n }", "public function dispatch()\n\t{\n\t\t$method = $_SERVER['REQUEST_METHOD'];\n\t\tif($method == 'OPTIONS')\n\t\t{\n\t\t\treturn $this->handle(function() {\n\t\t\t\t$response = array('options' => 'Defined!');\n\t\t\t\treturn [200, $response];\n\t\t\t});\n\t\t}\n\n\t\t$uri = $_SERVER['REQUEST_URI'];\n\n\t\t$end = strpos($uri, '?');\n\t\t$path = substr($uri, 0, $end ? $end : strlen($uri));\n\n\t\t$action = NULL;\n\t\t// Match directly, we skip it.\n\t\tif(!empty($this->_routes[$method][$path]))\n\t\t{\n\t\t\t$action = $this->_routes[$method][$path];\n\t\t}\n\n\t\t$argumentsList = array();\n\n\t\tif($action === NULL)\n\t\t{\n\t\t\t/**\n\t\t\t * Match URL\n\t\t\t *\n\t\t\t * WARNING: Known bug, the first endpoint with params to match will be choosen!\n\t\t\t * Example for the path: /order/125/update\n\t\t\t * - /order\n\t\t\t * - /order/{id} <-- This endpoint will be choosen\n\t\t\t * - /order/{id}/update\n\t\t\t */\n\t\t\tforeach($this->_routes[$method] AS $endpoint => $actionParam)\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * Retrieve the params from the endpoint.\n\t\t\t\t */\n\t\t\t\t$paramRegex = '/{[^}]*}/';\n\t\t\t\tpreg_match_all($paramRegex, $endpoint, $params);\n\n\t\t\t\t/* The endpoint wasn't requiring any param, it should be matched before, we skip it. */\n\t\t\t\tif(empty($params[0]))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Generate the regex for URL matching\n\t\t\t\t */\n\t\t\t\t$arguments = array();\n\t\t\t\tforeach($params[0] AS $param)\n\t\t\t\t{\n\t\t\t\t\t$param_name = substr($param, 1, -1);\n\t\t\t\t\t$regexp = '(?P<' . $param_name . '>[^/]+)';\n\t\t\t\t\t$endpoint = str_replace($param, $regexp, $endpoint);\n\t\t\t\t\t$arguments[] = $param_name;\n\t\t\t\t}\n\t\t\t\t$endpoint_matcher = '@^' . $endpoint . '|/?$@';\n\n\t\t\t\t/**\n\t\t\t\t * Match the endpoint.\n\t\t\t\t */\n\t\t\t\tpreg_match($endpoint_matcher, $path, $args);\n\n\t\t\t\t/**\n\t\t\t\t * Endpoint doesn't match.\n\t\t\t\t */\n\t\t\t\tif(empty($args[0]))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Set action and retrieve the list of values.\n\t\t\t\t */\n\t\t\t\t$action = $actionParam;\n\t\t\t\tforeach($arguments AS $name)\n\t\t\t\t{\n\t\t\t\t\t$argumentsList[$name] = $args[$name];\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(empty($action))\n\t\t{\n\t\t\treturn $this->handle(function() use($method, $path) {\n\t\t\t\t$response = array('error' => 'Not found!', 'method' => $method, 'route' => $path);\n\t\t\t\treturn [404, $response];\n\t\t\t});\n\t\t}\n\n\t\tif(!$this->checkAuthentication($action))\n\t\t{\n\t\t\treturn $this->handle(function() use($action) {\n\t\t\t\treturn [401, 'Access denied!'];\n\t\t\t});\n\t\t}\n\n\t\treturn $this->handle($action['action'], $argumentsList);\n\t}", "public static function isAllowedRouteRequest() {\n\t\treturn self::$correct_request_method;\n\t}", "public static function getAvailableMethods(): array\n {\n return array_diff(\n get_class_methods(static::class), // Custom methods\n get_class_methods(self::class), // Basic methods\n ['query'] // Except methods\n );\n }", "static public function invalidUriMethodProvider()\n {\n return array(\n array('some crap', 'GET'),\n array('*', 'POST'),\n array('ftp://example.com/baz/bar', 'GET'),\n array('host:433', 'HEAD'),\n array('http://example.com/path', 'CONNECT')\n );\n }", "public static function supportedMethods()\n {\n return static::$supportedMethods;\n }", "public function getHttpMethods()\n {\n return $this->httpMethods;\n }", "public function any($route, $controller = null)\n {\n return $this->map(func_get_args())->methods('GET|POST|PATCH|DELETE|PUT|HEAD|OPTIONS');\n }", "public function getAllowedMethods()\n {\n return [$this->_code => __($this->getConfigData(self::SHIPPING_NAME))];\n }", "public function test_route_method_comma_seperated() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET,POST',\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t$routes = $GLOBALS['wp_rest_server']->get_routes();\n\n\t\t$this->assertSame(\n\t\t\t$routes['/test-ns/test'][0]['methods'],\n\t\t\tarray(\n\t\t\t\t'GET' => true,\n\t\t\t\t'POST' => true,\n\t\t\t)\n\t\t);\n\t}", "public function headerAllowedHttpMethods();", "protected function getMethodPatterns($uri, $method)\n {\n return $this->router->findPatternFilters(\n Request::create($uri, $method)\n );\n }", "public function getAllowedMethods()\n {\n return array($this->_code => 'Pickup');\n }", "public function supports($method = '');", "function match($methods, $uri, $action)\n {\n Route::match($methods, $uri, $action);\n }", "public function methods()\n {\n return $this->methods;\n }", "protected function getMethods()\n {\n return (new ReflectionClass(get_class($this)))->getMethods();\n }", "public function testCanSendRoute()\n {\n $this->assertEmpty([]);\n\n $routes = $this->app->getRoutes();\n\n foreach ($routes as $route) {\n if ($route->getName() == 'api.oauth') {\n $this->assertContains('POST', $route->getAllowedMethods());\n $this->assertEquals('/api/oauth', $route->getPath());\n }\n }\n }", "public function getMethods()\n {\n if (empty($this->methods)) {\n $this->populateMethodCache();\n }\n return array_keys($this->methods);\n }", "public function getAllowedMethods()\n {\n return array(\n $this->_code . '_private' => Mage::getStoreConfig('carrier/vconnect_postnord_home/name'),\n $this->_code . '_commercial' => Mage::getStoreConfig('carrier/vconnect_postnord_business/name'),\n $this->_code . '_pickup' => Mage::getStoreConfig('carrier/vconnect_postnord_pickup/name'),\n $this->_code . '_mailbox' => Mage::getStoreConfig('carrier/vconnect_postnord_mailbox/name'),\n );\n }", "public function route(string $requestUri, string $requestMethod);", "public function GetRouteGetRequestsOnly ();", "public function method($str=null)\n {\n if (!is_null($str)) {\n // Filter value before assigning to variable\n $filter = new PHPFrame_RegexpFilter(array(\n \"regexp\" => '/^(GET|POST|PUT|DELETE|HEAD|CLI)$/i',\n \"min_length\" => 3,\n \"max_length\" => 6\n ));\n\n $this->_array['method'] = $filter->process($str);\n }\n\n return $this->_array['method'];\n }", "public function hasMethod() : bool\n {\n return array_key_exists($this->request->getMethod(), $this->routes);\n }", "protected function getAllAvailableMethods()\n {\n /* TODO get all available payment methods from toolbox */\n }", "public function testGetOnHitReturnsRoutesWithMethodAction(): void\n {\n $routes = new RouteCollection([\n new Route(\n new UriTemplate('foo'),\n new MethodRouteAction('Foo', 'bar'),\n [$this->createMock(IRouteConstraint::class)],\n [new MiddlewareBinding('foo')]\n )\n ]);\n $this->cache->set($routes);\n $this->assertEquals($routes, $this->cache->get());\n }", "public static function getSupportedMethods()\n {\n return [\n ];\n }", "public static function getSupportedMethods()\n {\n return [\n ];\n }", "public static function getSupportedMethods()\n {\n return [\n ];\n }", "public static function getRoutes(): array\n {\n require(root_path('routes.php'));\n return self::$called;\n }", "private function match($uri, $method)\n\t{\n\t\tif(isset($this->routes[$method]) and !empty($this->routes[$method]))\n\t\t{\n\t\t\tforeach(array_keys($this->route[$method]) as $route)\n\t\t\t{\n\t\t\t\tforeach($this->choices as $search => $replace)\n\t\t\t\t{\n\t\t\t\t\t$route = str_replace($search, $replace, $route);\n\t\t\t\t}\n\n\t\t\t\tif($route == '(.+)')\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'parameters' => $uri,\n\t\t\t\t\t\t'before' => $this->routes[$method][$route]['before'],\n\t\t\t\t\t\t'callback' => $this->routes[$method][$route]['callback'],\n\t\t\t\t\t\t'after' => $this->routes[$method][$route]['after'],\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telseif(preg_match('#^'.$route.'$#i', $uri, $matches))\n\t\t\t\t{\n\t\t\t\t\t$parameters = [];\n\n\t\t\t\t\tfor($i = 1, $count = count($matches); $i < $count; $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$parameters[] = $matches[$i];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'parameters' => $parameters,\n\t\t\t\t\t\t'before' => $this->routes[$method][$route]['before'],\n\t\t\t\t\t\t'callback' => $this->routes[$method][$route]['callback'],\n\t\t\t\t\t\t'after' => $this->routes[$method][$route]['after'],\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getDynamicMethods()\n {\n return [];\n }", "public function getMethod();", "public function getMethod();", "public function getMethod();", "public function getMethod();", "public function getMethod();" ]
[ "0.72761667", "0.72357905", "0.70795137", "0.7053489", "0.7008258", "0.69958746", "0.69522023", "0.69238454", "0.69143105", "0.69075084", "0.69067985", "0.68593407", "0.68217874", "0.6778759", "0.6776919", "0.6776919", "0.6776919", "0.6774316", "0.67690665", "0.67478085", "0.6747456", "0.67249364", "0.671364", "0.66919464", "0.6620757", "0.6599492", "0.6597472", "0.6593008", "0.65926504", "0.6547751", "0.65415394", "0.65322226", "0.6488934", "0.6483969", "0.6481701", "0.6446795", "0.6395698", "0.6395698", "0.6395698", "0.6395698", "0.63875985", "0.6378099", "0.6378099", "0.6377121", "0.63620126", "0.6359009", "0.6340756", "0.63387275", "0.6333801", "0.63252175", "0.630351", "0.62963873", "0.62963873", "0.6281178", "0.6280299", "0.6263751", "0.6233981", "0.62270504", "0.621651", "0.61985046", "0.6192379", "0.6187079", "0.61598897", "0.61431235", "0.6141288", "0.613552", "0.6125277", "0.61126363", "0.61063653", "0.6100408", "0.60896075", "0.60870665", "0.6086916", "0.6078055", "0.6067438", "0.60524344", "0.6050692", "0.6048892", "0.60344684", "0.60302955", "0.60172445", "0.6011218", "0.6009649", "0.6003258", "0.60031676", "0.60028493", "0.59991336", "0.59853065", "0.59828436", "0.59828436", "0.59828436", "0.5978831", "0.5953463", "0.5949679", "0.59495664", "0.59495664", "0.59495664", "0.59495664", "0.59495664" ]
0.62978965
52
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any similar widget.
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->compare('id_fondo_prestazione',$this->id_fondo_prestazione); $criteria->compare('id_fondo',$this->id_fondo); $criteria->compare('id_prestazione',$this->id_prestazione); $criteria->compare('prezzo',$this->prezzo); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('model_id',$this->model_id,true);\n $criteria->compare('color',$this->color,true);\n $criteria->compare('is_in_pare',$this->is_in_pare);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('idmodel',$this->idmodel);\n\t\t$criteria->compare('usuario_anterior',$this->usuario_anterior);\n\t\t$criteria->compare('usuario_nuevo',$this->usuario_nuevo);\n\t\t$criteria->compare('estado_anterior',$this->estado_anterior,true);\n\t\t$criteria->compare('estado_nuevo',$this->estado_nuevo,true);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('generator_id',$this->generator_id,true);\n\t\t$criteria->compare('serial_number',$this->serial_number,true);\n\t\t$criteria->compare('model_number',$this->model_number,true);\n\t\t$criteria->compare('manufacturer_name',$this->manufacturer_name,true);\n\t\t$criteria->compare('manufacture_date',$this->manufacture_date,true);\n\t\t$criteria->compare('supplier_name',$this->supplier_name,true);\n\t\t$criteria->compare('date_of_purchase',$this->date_of_purchase,true);\n\t\t$criteria->compare('date_of_first_use',$this->date_of_first_use,true);\n\t\t$criteria->compare('kva_capacity',$this->kva_capacity);\n\t\t$criteria->compare('current_run_hours',$this->current_run_hours);\n\t\t$criteria->compare('last_serviced_date',$this->last_serviced_date,true);\n\t\t$criteria->compare('engine_make',$this->engine_make,true);\n\t\t$criteria->compare('engine_model',$this->engine_model,true);\n\t\t$criteria->compare('fuel_tank_capacity',$this->fuel_tank_capacity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('car',$this->car,true);\n\t\t$criteria->compare('source_id',$this->source_id,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('client_type_id',$this->client_type_id,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('other',$this->other,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t// $criteria->compare('text',$this->text,true);\n\t\t// $criteria->compare('record',$this->record,true);\n\t\t$criteria->compare('user',$this->user,true);\n\t\t$criteria->compare('createdBy',$this->createdBy,true);\n\t\t$criteria->compare('viewed',$this->viewed);\n\t\t$criteria->compare('createDate',$this->createDate,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('comparison',$this->comparison,true);\n\t\t// $criteria->compare('value',$this->value,true);\n\t\t$criteria->compare('modelType',$this->modelType,true);\n\t\t$criteria->compare('modelId',$this->modelId,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('Currency_ID',$this->Currency_ID);\n\t\t$criteria->compare('CurrencyNo',$this->CurrencyNo,true);\n\t\t$criteria->compare('ExchangeVND',$this->ExchangeVND,true);\n\t\t$criteria->compare('AppliedDate',$this->AppliedDate,true);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('firm',$this->firm,true);\n\t\t$criteria->compare('change_date',$this->change_date,true);\n\t\t$criteria->compare('item_id',$this->item_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('availability',$this->availability,true);\n\t\t$criteria->compare('price',$this->price,true);\n\t\t$criteria->compare('bonus',$this->bonus,true);\n\t\t$criteria->compare('shipping_cost',$this->shipping_cost,true);\n\t\t$criteria->compare('product_page',$this->product_page,true);\n\t\t$criteria->compare('sourse_page',$this->sourse_page,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('column_id',$this->column_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('condition',$this->condition,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('industry',$this->industry,true);\n\t\t$criteria->compare('industry_sub',$this->industry_sub,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('province',$this->province,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('contact_name',$this->contact_name,true);\n\t\t$criteria->compare('contact_tel',$this->contact_tel,true);\n\t\t$criteria->compare('ip',$this->ip,true);\n\t\t$criteria->compare('source',$this->source,true);\n $criteria->compare('status',$this->status);\n\t\t$criteria->compare('update_time',$this->update_time);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('notes',$this->notes);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('university',$this->university,true);\n\t\t$criteria->compare('major',$this->major,true);\n\t\t$criteria->compare('gpa',$this->gpa,true);\n\t\t$criteria->compare('appl_term',$this->appl_term);\n\t\t$criteria->compare('toefl',$this->toefl);\n\t\t$criteria->compare('gre',$this->gre);\n\t\t$criteria->compare('appl_major',$this->appl_major,true);\n\t\t$criteria->compare('appl_degree',$this->appl_degree,true);\n\t\t$criteria->compare('appl_country',$this->appl_country,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('goods_code',$this->goods_code,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('brand_id',$this->brand_id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('size',$this->size,true);\n\t\t$criteria->compare('material',$this->material,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('purchase_price',$this->purchase_price,true);\n\t\t$criteria->compare('selling_price',$this->selling_price,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('meta_title',$this->meta_title,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ContractsDetailID',$this->ContractsDetailID,true);\n\t\t$criteria->compare('ContractID',$this->ContractID,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\t\t$criteria->compare('CustomerID',$this->CustomerID,true);\n\t\t$criteria->compare('Share',$this->Share);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria = $this->criteriaSearch();\r\n\t\t$criteria->limit = 10;\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('organizationName',$this->organizationName,true);\n\t\t$criteria->compare('contactNo',$this->contactNo,true);\n\t\t$criteria->compare('partnerType',$this->partnerType);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('emailId',$this->emailId,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('firstName',$this->firstName,true);\n\t\t$criteria->compare('lastName',$this->lastName,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_ID,$this->{Globals::FLD_NAME_ACTIVITY_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_TASK_ID,$this->{Globals::FLD_NAME_TASK_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_BY_USER_ID,$this->{Globals::FLD_NAME_BY_USER_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_TYPE,$this->{Globals::FLD_NAME_ACTIVITY_TYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_SUBTYPE,$this->{Globals::FLD_NAME_ACTIVITY_SUBTYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_COMMENTS,$this->{Globals::FLD_NAME_COMMENTS},true);\n\t\t$criteria->compare(Globals::FLD_NAME_CREATED_AT,$this->{Globals::FLD_NAME_CREATED_AT},true);\n\t\t$criteria->compare(Globals::FLD_NAME_SOURCE_APP,$this->{Globals::FLD_NAME_SOURCE_APP},true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('manufacturers_image',$this->manufacturers_image,true);\n\t\t$criteria->compare('date_added',$this->date_added);\n\t\t$criteria->compare('last_modified',$this->last_modified);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_clicked',$this->url_clicked);\n\t\t$criteria->compare('date_last_click',$this->date_last_click);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('date',$this->date);\n\t\t$criteria->compare('del',$this->del);\n\t\t$criteria->compare('action_id',$this->action_id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('catalog',$this->catalog,true);\n\t\t$criteria->compare('is_new',$this->is_new);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('competition',$this->competition);\n\t\t$criteria->compare('partner',$this->partner);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('website',$this->website,true);\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('case',$this->case);\n\t\t$criteria->compare('basis_doc',$this->basis_doc);\n\t\t$criteria->compare('calc_group',$this->calc_group);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('data_attributes_fields',$this->data_attributes_fields,true);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('created',$this->created,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('skill_id',$this->skill_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('account_id',$this->account_id);\n\t\t$criteria->compare('field_name',$this->field_name);\n\t\t$criteria->compare('content',$this->content);\n\t\t$criteria->compare('old_data',$this->old_data,true);\n\t\t$criteria->compare('new_data',$this->new_data,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_updated',$this->date_updated,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('company_id',$this->company_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('validator',$this->validator,true);\n\t\t$criteria->compare('position',$this->position);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n $criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('display_name',$this->display_name,true);\n $criteria->compare('actionPrice',$this->actionPrice);\n\t\t$criteria->compare('translit',$this->translit,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('display_description',$this->display_description,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\t\t$criteria->compare('editing',$this->editing);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array(\n 'pageSize' => 15,\n ),\n\t\t));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('BrandID', $this->BrandID);\n $criteria->compare('BrandName', $this->BrandName, true);\n $criteria->compare('Pinyin', $this->Pinyin, true);\n $criteria->compare('Remarks', $this->Remarks, true);\n $criteria->compare('OrganID', $this->OrganID);\n $criteria->compare('UserID', $this->UserID);\n $criteria->compare('CreateTime', $this->CreateTime);\n $criteria->compare('UpdateTime', $this->UpdateTime);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('componente_id',$this->componente_id);\n\t\t$criteria->compare('tipo_dato',$this->tipo_dato,true);\n\t\t$criteria->compare('descripcion',$this->descripcion,true);\n\t\t$criteria->compare('cruce_automatico',$this->cruce_automatico,true);\n\t\t$criteria->compare('sw_obligatorio',$this->sw_obligatorio,true);\n\t\t$criteria->compare('orden',$this->orden);\n\t\t$criteria->compare('sw_puntaje',$this->sw_puntaje,true);\n\t\t$criteria->compare('sw_estado',$this->sw_estado,true);\n\t\t$criteria->compare('todos_obligatorios',$this->todos_obligatorios,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('real_name',$this->real_name,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('zip_code',$this->zip_code,true);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('district_id',$this->district_id);\n\t\t$criteria->compare('district_address',$this->district_address,true);\n\t\t$criteria->compare('street_address',$this->street_address,true);\n\t\t$criteria->compare('is_default',$this->is_default);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('update_time',$this->update_time);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('EMCE_ID',$this->EMCE_ID);\n\t\t$criteria->compare('MOOR_ID',$this->MOOR_ID);\n\t\t$criteria->compare('EVCR_ID',$this->EVCR_ID);\n\t\t$criteria->compare('EVES_ID',$this->EVES_ID);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('customerName',$this->customerName,true);\n\t\t$criteria->compare('agencyHead',$this->agencyHead,true);\n\t\t$criteria->compare('region_id',$this->region_id);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('municipalityCity_id',$this->municipalityCity_id);\n\t\t$criteria->compare('barangay_id',$this->barangay_id);\n\t\t$criteria->compare('houseNumber',$this->houseNumber,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('nature_id',$this->nature_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->name,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('state',$this->address,true);\n\t\t$criteria->compare('country',$this->address,true);\n\t\t$criteria->compare('contact_number',$this->contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('is_deleted',$this->is_deleted);\n\t\t$criteria->compare('deleted_by',$this->deleted_by,true);\n\t\t$criteria->compare('created_at',$this->created_at,true);\n\t\t$criteria->compare('updated_at',$this->updated_at,true);\n\t\tif(YII::app()->user->getState(\"role\") == \"admin\") {\n\t\t\t$criteria->condition = 'is_deleted = 0';\n\t\t}\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('professional_status_id',$this->professional_status);\n\t\t$criteria->compare('birthday',$this->birthday);\n\t\t$criteria->compare('location',$this->location);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\r\n\t{\r\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\r\n\r\r\n\t\t$criteria=new CDbCriteria;\r\r\n\r\r\n\t\t$criteria->compare('id',$this->id);\r\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\r\n\t\t$criteria->compare('adds',$this->adds);\r\r\n\t\t$criteria->compare('edits',$this->edits);\r\r\n\t\t$criteria->compare('deletes',$this->deletes);\r\r\n\t\t$criteria->compare('view',$this->view);\r\r\n\t\t$criteria->compare('lists',$this->lists);\r\r\n\t\t$criteria->compare('searches',$this->searches);\r\r\n\t\t$criteria->compare('prints',$this->prints);\r\r\n\r\r\n\t\treturn new CActiveDataProvider($this, array(\r\r\n\t\t\t'criteria'=>$criteria,\r\r\n\t\t));\r\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('applyId',$this->applyId);\n\t\t$criteria->compare('stuId',$this->stuId);\n\t\t$criteria->compare('stuName',$this->stuName,true);\n\t\t$criteria->compare('specification',$this->specification,true);\n\t\t$criteria->compare('assetName',$this->assetName,true);\n\t\t$criteria->compare('applyTime',$this->applyTime,true);\n\t\t$criteria->compare('loanTime',$this->loanTime,true);\n\t\t$criteria->compare('returnTime',$this->returnTime,true);\n\t\t$criteria->compare('RFID',$this->RFID,true);\n\t\t$criteria->compare('stuTelNum',$this->stuTelNum,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\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);\n $criteria->compare('itemcode', $this->itemcode, true);\n $criteria->compare('product_id', $this->product_id, true);\n $criteria->compare('delete_flag', $this->delete_flag);\n $criteria->compare('status', $this->status);\n $criteria->compare('expire', $this->expire, true);\n $criteria->compare('date_input', $this->date_input, true);\n $criteria->compare('d_update', $this->d_update, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('verid',$this->verid);\n\t\t$criteria->compare('appversion',$this->appversion,true);\n\t\t$criteria->compare('appfeatures',$this->appfeatures,true);\n\t\t$criteria->compare('createtime',$this->createtime,true);\n\t\t$criteria->compare('baseNum',$this->baseNum);\n\t\t$criteria->compare('slave1Num',$this->slave1Num);\n\t\t$criteria->compare('packagename',$this->packagename,true);\n\t\t$criteria->compare('ostype',$this->ostype);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('client_id',$this->client_id,true);\n\t\t$criteria->compare('extension',$this->extension,true);\n\t\t$criteria->compare('rel_type',$this->rel_type,true);\n\t\t$criteria->compare('rel_id',$this->rel_id,true);\n\t\t$criteria->compare('meta_key',$this->meta_key,true);\n\t\t$criteria->compare('meta_value',$this->meta_value,true);\n\t\t$criteria->compare('date_entry',$this->date_entry,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('column_id',$this->column_id,true);\n\t\t$criteria->compare('research_title',$this->research_title,true);\n\t\t$criteria->compare('research_url',$this->research_url,true);\n\t\t$criteria->compare('column_type',$this->column_type);\n\t\t$criteria->compare('filiale_id',$this->filiale_id,true);\n\t\t$criteria->compare('area_name',$this->area_name,true);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('trigger_config',$this->trigger_config);\n\t\t$criteria->compare('status',$this->status);\n $criteria->compare('terminal_type',$this->terminal_type);\n\t\t$criteria->compare('start_time',$this->start_time,true);\n\t\t$criteria->compare('end_time',$this->end_time,true);\n\t\t$criteria->compare('explain',$this->explain,true);\n\t\t$criteria->compare('_delete',$this->_delete);\n\t\t$criteria->compare('_create_time',$this->_create_time,true);\n\t\t$criteria->compare('_update_time',$this->_update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('birthday',$this->birthday,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('is_get_news',$this->is_get_news);\n\t\t$criteria->compare('user_id',$this->user_id);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "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('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('order_id',$this->order_id);\n\t\t$criteria->compare('device_id',$this->device_id,true);\n\t\t$criteria->compare('money',$this->money,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('add_time',$this->add_time);\n\t\t$criteria->compare('recharge_type',$this->recharge_type);\n\t\t$criteria->compare('channel',$this->channel,true);\n\t\t$criteria->compare('version_name',$this->version_name,true);\n\t\t$criteria->compare('pay_channel',$this->pay_channel);\n\t\t$criteria->compare('chanel_bid',$this->chanel_bid);\n\t\t$criteria->compare('chanel_sid',$this->chanel_sid);\n\t\t$criteria->compare('versionid',$this->versionid);\n\t\t$criteria->compare('chanel_web',$this->chanel_web);\n\t\t$criteria->compare('dem_num',$this->dem_num);\n\t\t$criteria->compare('last_watching',$this->last_watching,true);\n\t\t$criteria->compare('pay_type',$this->pay_type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n {\r\n // @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n $criteria = new CDbCriteria;\r\n\r\n $criteria->compare('id', $this->id);\r\n $criteria->compare('country_id', $this->country_id);\r\n $criteria->compare('user_id', $this->user_id);\r\n $criteria->compare('vat', $this->vat);\r\n $criteria->compare('manager_coef', $this->manager_coef);\r\n $criteria->compare('curator_coef', $this->curator_coef);\r\n $criteria->compare('admin_coef', $this->admin_coef);\r\n $criteria->compare('status', $this->status);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n ));\r\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('purchase_price',$this->purchase_price);\n\t\t$criteria->compare('sell_price',$this->sell_price);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('measurement',$this->measurement,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\t\t$criteria->compare('date_out',$this->date_out,true);\n\t\t$criteria->compare('date_in',$this->date_in,true);\n\t\t$criteria->compare('firma_id',$this->firma_id,true);\n\t\t$criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('instock',$this->instock);\n\t\t$criteria->compare('user_id',$this->user_id);\n $criteria->compare('warning_amount',$this->warning_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('fname',$this->fname,true);\n\t\t$criteria->compare('mname',$this->mname,true);\n\t\t$criteria->compare('lname',$this->lname,true);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('date_of_birth',$this->date_of_birth,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('landline',$this->landline,true);\n\t\t$criteria->compare('em_contact_name',$this->em_contact_name,true);\n\t\t$criteria->compare('em_contact_relation',$this->em_contact_relation,true);\n\t\t$criteria->compare('em_contact_number',$this->em_contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('created_date',$this->created_date,true);\n\n return new CActiveDataProvider( $this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState( 'pageSize', Yii::app()->params[ 'defaultPageSize' ] ),\n ),\n ) );\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t\n\t\t$criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('COMPETITOR_ID',$this->COMPETITOR_ID);\n\t\t$criteria->compare('WSDC_NO',$this->WSDC_NO);\n\t\t$criteria->compare('FIRST_NAME',$this->FIRST_NAME,true);\n\t\t$criteria->compare('LAST_NAME',$this->LAST_NAME,true);\n\t\t$criteria->compare('COMPETITOR_LEVEL',$this->COMPETITOR_LEVEL);\n\t\t$criteria->compare('REMOVED',$this->REMOVED);\n\t\t$criteria->compare('ADDRESS',$this->ADDRESS,true);\n\t\t$criteria->compare('CITY',$this->CITY,true);\n\t\t$criteria->compare('STATE',$this->STATE,true);\n\t\t$criteria->compare('POSTCODE',$this->POSTCODE);\n\t\t$criteria->compare('COUNTRY',$this->COUNTRY,true);\n\t\t$criteria->compare('PHONE',$this->PHONE,true);\n\t\t$criteria->compare('MOBILE',$this->MOBILE,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('LEADER',$this->LEADER);\n\t\t$criteria->compare('REGISTERED',$this->REGISTERED);\n\t\t$criteria->compare('BIB_STATUS',$this->BIB_STATUS);\n\t\t$criteria->compare('BIB_NUMBER',$this->BIB_NUMBER);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sys_name',$this->sys_name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('CustomerId',$this->CustomerId,true);\n\t\t$criteria->compare('AddressId',$this->AddressId,true);\n\t\t$criteria->compare('CustomerStatusId',$this->CustomerStatusId,true);\n\t\t$criteria->compare('DateMasterId',$this->DateMasterId,true);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('CustomerPhoto',$this->CustomerPhoto,true);\n\t\t$criteria->compare('CustomerCode',$this->CustomerCode);\n\t\t$criteria->compare('Telephone',$this->Telephone,true);\n\t\t$criteria->compare('Mobile',$this->Mobile,true);\n\t\t$criteria->compare('EmailId',$this->EmailId,true);\n\t\t$criteria->compare('Status',$this->Status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('company_id', $this->company_id);\n\t\t$criteria->compare('productId', $this->productId);\n\t\t$criteria->compare('upTo', $this->upTo);\n\t\t$criteria->compare('fixPrice', $this->fixPrice);\n\t\t$criteria->compare('isActive', $this->isActive);\n\t\t$criteria->order = 'company_id';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('locality',$this->locality,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$parameters = array('limit'=>ceil(Profile::getResultsPerPage()));\n\t\t$criteria->scopes = array('findAll'=>array($parameters));\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('itemId',$this->itemId);\n\t\t$criteria->compare('changedBy',$this->changedBy,true);\n\t\t$criteria->compare('recordName',$this->recordName,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\t\t$criteria->compare('oldValue',$this->oldValue,true);\n\t\t$criteria->compare('newValue',$this->newValue,true);\n\t\t$criteria->compare('diff',$this->diff,true);\n\t\t$criteria->compare('timestamp',$this->timestamp);\n\n\t\treturn new SmartActiveDataProvider(get_class($this), array(\n\t\t\t'sort'=>array(\n\t\t\t\t'defaultOrder'=>'timestamp DESC',\n\t\t\t),\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>Profile::getResultsPerPage(),\n\t\t\t),\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\n\t\t$criteria->compare('mem_type',$this->mem_type);\r\n\t\t$criteria->compare('business_type',$this->business_type);\r\n\t\t$criteria->compare('product_name',$this->product_name,true);\r\n\t\t$criteria->compare('panit',$this->panit,true);\r\n\t\t$criteria->compare('sex',$this->sex);\r\n\t\t$criteria->compare('tname',$this->tname);\r\n\t\t$criteria->compare('ftname',$this->ftname,true);\r\n\t\t$criteria->compare('ltname',$this->ltname,true);\r\n\t\t$criteria->compare('etname',$this->etname);\r\n\t\t$criteria->compare('fename',$this->fename,true);\r\n\t\t$criteria->compare('lename',$this->lename,true);\r\n\t\t$criteria->compare('birth',$this->birth,true);\r\n\t\t$criteria->compare('email',$this->email,true);\r\n\t\t$criteria->compare('facebook',$this->facebook,true);\r\n\t\t$criteria->compare('twitter',$this->twitter,true);\r\n\t\t$criteria->compare('address',$this->address,true);\r\n\t\t$criteria->compare('province',$this->province);\r\n\t\t$criteria->compare('prefecture',$this->prefecture);\r\n\t\t$criteria->compare('district',$this->district);\r\n\t\t$criteria->compare('postcode',$this->postcode,true);\r\n\t\t$criteria->compare('tel',$this->tel,true);\r\n\t\t$criteria->compare('mobile',$this->mobile,true);\r\n\t\t$criteria->compare('fax',$this->fax,true);\r\n\t\t$criteria->compare('high_education',$this->high_education);\r\n\t\t$criteria->compare('career',$this->career);\r\n\t\t$criteria->compare('skill_com',$this->skill_com);\r\n\t\t$criteria->compare('receive_news',$this->receive_news,true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('table_id',$this->table_id);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cou_id',$this->cou_id);\n\t\t$criteria->compare('thm_id',$this->thm_id);\n\t\t$criteria->compare('cou_nom',$this->cou_nom,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\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);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('idempleo',$this->idempleo);\n\t\t$criteria->compare('administrativo',$this->administrativo,true);\n\t\t$criteria->compare('comercial',$this->comercial,true);\n\t\t$criteria->compare('artes',$this->artes,true);\n\t\t$criteria->compare('informatica',$this->informatica,true);\n\t\t$criteria->compare('salud',$this->salud,true);\n\t\t$criteria->compare('marketing',$this->marketing,true);\n\t\t$criteria->compare('servicio_domestico',$this->servicio_domestico,true);\n\t\t$criteria->compare('construccion',$this->construccion,true);\n\t\t$criteria->compare('agricultura',$this->agricultura,true);\n\t\t$criteria->compare('ganaderia',$this->ganaderia,true);\n\t\t$criteria->compare('telecomunicaciones',$this->telecomunicaciones,true);\n\t\t$criteria->compare('atencion_cliente',$this->atencion_cliente,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID_VALOR',$this->ID_VALOR);\n\t\t$criteria->compare('ID_UBICACION',$this->ID_UBICACION);\n\t\t$criteria->compare('ID_VISITA',$this->ID_VISITA);\n\t\t$criteria->compare('VALOR',$this->VALOR);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t\n\t\t$criteria->compare('id_aspecto',$this->id_aspecto,true);\n\t\t$criteria->compare('tbl_Programa_id_programa',$this->tbl_Programa_id_programa,true);\n\t\t$criteria->compare('tbl_Factor_id_factor',$this->tbl_Factor_id_factor);\n\t\t$criteria->compare('tbl_caracteristica_id_caracteristica',$this->tbl_caracteristica_id_caracteristica,true);\n\t\t$criteria->compare('num_aspecto',$this->num_aspecto,true);\n\t\t$criteria->compare('aspecto',$this->aspecto,true);\n\t\t$criteria->compare('instrumento',$this->instrumento,true);\n\t\t$criteria->compare('fuente',$this->fuente,true);\n\t\t$criteria->compare('documento',$this->documento,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('Observaciones',$this->Observaciones,true);\n\t\t$criteria->compare('cumple',$this->cumple,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('website_url',$this->website_url,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('user_name',$this->user_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('created_datetime',$this->created_datetime,true);\n\t\t$criteria->compare('icon_src',$this->icon_src,true);\n\t\t$criteria->compare('show_r18',$this->show_r18);\n\t\t$criteria->compare('show_bl',$this->show_bl);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('creationDate',$this->creationDate,true);\n\t\t$criteria->compare('year',$this->year);\n\t\t$criteria->compare('term',$this->term,true);\n\t\t$criteria->compare('activated',$this->activated);\n\t\t$criteria->compare('startingDate',$this->startingDate,true);\n\t\t$criteria->compare('activation_userId',$this->activation_userId);\n\t\t$criteria->compare('parent_catalogId',$this->parent_catalogId);\n $criteria->compare('isProspective', $this->isProspective);\n $criteria->compare('creatorId', $this->creatorId);\n $criteria->compare('isProposed', $this->isProposed);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('location',$this->location);\n\t\t$criteria->compare('theripiest',$this->theripiest);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('dob',$this->dob,true);\n\t\t$criteria->compare('inurancecompany',$this->inurancecompany,true);\n\t\t$criteria->compare('injurydate',$this->injurydate,true);\n\t\t$criteria->compare('therapy_start_date',$this->therapy_start_date,true);\n\t\t$criteria->compare('ASIA',$this->ASIA,true);\n\t\t$criteria->compare('injury',$this->injury,true);\n\t\t$criteria->compare('medication',$this->medication,true);\n\t\t$criteria->compare('notes',$this->notes,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('imputetype_id',$this->imputetype_id);\n\t\t$criteria->compare('project_id',$this->project_id);\n\n\t\treturn new ActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search () {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('formId', $this->formId, true);\n\t\t$criteria->compare('data', $this->data, true);\n\t\t$criteria->compare('ctime', $this->ctime);\n\t\t$criteria->compare('mtime', $this->mtime);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('category_id',$this->category_id);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('price_z',$this->price_z);\n\t\t$criteria->compare('price_s',$this->price_s);\n\t\t$criteria->compare('price_m',$this->price_m);\n\t\t$criteria->compare('dependence',$this->dependence,true);\n\t\t$criteria->compare('barcode',$this->barcode,true);\n\t\t$criteria->compare('unit',$this->unit,true);\n\t\t$criteria->compare('minimal_amount',$this->minimal_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 100),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('image',$this->image,true);\n\t\t$criteria->compare('manager',$this->manager);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('realname',$this->realname,true);\n\t\t$criteria->compare('identity',$this->identity,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('bussiness_license',$this->bussiness_license,true);\n\t\t$criteria->compare('bankcode',$this->bankcode,true);\n\t\t$criteria->compare('banktype',$this->banktype,true);\n\t\t$criteria->compare('is_open',$this->is_open,true);\n\t\t$criteria->compare('introduction',$this->introduction,true);\n\t\t$criteria->compare('images_str',$this->images_str,true);\n\t\t$criteria->compare('gmt_created',$this->gmt_created,true);\n\t\t$criteria->compare('gmt_modified',$this->gmt_modified,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email_admin',$this->email_admin,true);\n\t\t$criteria->compare('password_api',$this->password_api,true);\n\t\t$criteria->compare('url_result_api',$this->url_result_api,true);\n\t\t$criteria->compare('id_currency_2',$this->id_currency_2);\n\t\t$criteria->compare('id_currency_1',$this->id_currency_1,true);\n\t\t$criteria->compare('is_test_mode',$this->is_test_mode);\n\t\t$criteria->compare('is_commission_shop',$this->is_commission_shop);\n\t\t$criteria->compare('commission',$this->commission);\n\t\t$criteria->compare('is_enable',$this->is_enable);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('mod_date',$this->mod_date,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID,true);\n\t\t$criteria->compare('userID',$this->userID,true);\n\t\t$criteria->compare('mtID',$this->mtID,true);\n\t\t$criteria->compare('fxType',$this->fxType);\n\t\t$criteria->compare('leverage',$this->leverage);\n\t\t$criteria->compare('amount',$this->amount,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('surname',$this->surname,true);\n\t\t$criteria->compare('comany_name',$this->comany_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('uuid',$this->uuid,true);\n\t\t$criteria->compare('is_admin',$this->is_admin);\n\t\t$criteria->compare('paid_period_start',$this->paid_period_start,true);\n\t\t$criteria->compare('ftp_pass',$this->ftp_pass,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('price',$this->price,true);\n\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('breed',$this->breed,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_birthday',$this->date_birthday,true);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('tattoo',$this->tattoo,true);\n\t\t$criteria->compare('sire',$this->sire,true);\n\t\t$criteria->compare('dame',$this->dame,true);\n\t\t$criteria->compare('owner_type',$this->owner_type,true);\n\t\t$criteria->compare('honors',$this->honors,true);\n\t\t$criteria->compare('photo_preview',$this->photo_preview,true);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('pet_status',$this->pet_status,true);\n\t\t$criteria->compare('about',$this->about,true);\n\t\t$criteria->compare('uid',$this->uid);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('veterinary',$this->veterinary,true);\n\t\t$criteria->compare('vaccinations',$this->vaccinations,true);\n\t\t$criteria->compare('show_class',$this->show_class,true);\n\t\t$criteria->compare('certificate',$this->certificate,true);\n $criteria->compare('neutered_spayed',$this->certificate,true);\n \n\n $criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('city',$this->city,true);\n\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('HISTORY',$this->HISTORY,true);\n\t\t$criteria->compare('WELCOME_MESSAGE',$this->WELCOME_MESSAGE,true);\n\t\t$criteria->compare('LOCATION',$this->LOCATION,true);\n\t\t$criteria->compare('PHONES',$this->PHONES,true);\n\t\t$criteria->compare('FAX',$this->FAX,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('MISSION',$this->MISSION,true);\n\t\t$criteria->compare('VISION',$this->VISION,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "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('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('orgName',$this->orgName,true);\n\t\t$criteria->compare('noEmp',$this->noEmp);\n\t\t$criteria->compare('phone',$this->phone);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('addr1',$this->addr1,true);\n\t\t$criteria->compare('addr2',$this->addr2,true);\n\t\t$criteria->compare('state',$this->state,true);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('orgType',$this->orgType,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('fax',$this->fax);\n\t\t$criteria->compare('orgId',$this->orgId,true);\n\t\t$criteria->compare('validity',$this->validity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('sortorder',$this->sortorder,true);\n\t\t$criteria->compare('fullname',$this->fullname,true);\n\t\t$criteria->compare('shortname',$this->shortname,true);\n\t\t$criteria->compare('idnumber',$this->idnumber,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('summaryformat',$this->summaryformat);\n\t\t$criteria->compare('format',$this->format,true);\n\t\t$criteria->compare('showgrades',$this->showgrades);\n\t\t$criteria->compare('sectioncache',$this->sectioncache,true);\n\t\t$criteria->compare('modinfo',$this->modinfo,true);\n\t\t$criteria->compare('newsitems',$this->newsitems);\n\t\t$criteria->compare('startdate',$this->startdate,true);\n\t\t$criteria->compare('marker',$this->marker,true);\n\t\t$criteria->compare('maxbytes',$this->maxbytes,true);\n\t\t$criteria->compare('legacyfiles',$this->legacyfiles);\n\t\t$criteria->compare('showreports',$this->showreports);\n\t\t$criteria->compare('visible',$this->visible);\n\t\t$criteria->compare('visibleold',$this->visibleold);\n\t\t$criteria->compare('groupmode',$this->groupmode);\n\t\t$criteria->compare('groupmodeforce',$this->groupmodeforce);\n\t\t$criteria->compare('defaultgroupingid',$this->defaultgroupingid,true);\n\t\t$criteria->compare('lang',$this->lang,true);\n\t\t$criteria->compare('theme',$this->theme,true);\n\t\t$criteria->compare('timecreated',$this->timecreated,true);\n\t\t$criteria->compare('timemodified',$this->timemodified,true);\n\t\t$criteria->compare('requested',$this->requested);\n\t\t$criteria->compare('enablecompletion',$this->enablecompletion);\n\t\t$criteria->compare('completionnotify',$this->completionnotify);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('zipcode',$this->zipcode,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('role',$this->role,true);\n\t\t$criteria->compare('active',$this->active);\n\t\t$criteria->compare('camaras',$this->camaras);\n\t\t$criteria->compare('freidoras',$this->freidoras);\n\t\t$criteria->compare('cebos',$this->cebos);\n\t\t$criteria->compare('trampas',$this->trampas);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cod_venda',$this->cod_venda,true);\n\t\t$criteria->compare('filial_cod_filial',$this->filial_cod_filial,true);\n\t\t$criteria->compare('funcionario_cod_funcionario',$this->funcionario_cod_funcionario,true);\n\t\t$criteria->compare('cliente_cod_cliente',$this->cliente_cod_cliente,true);\n\t\t$criteria->compare('data_2',$this->data_2,true);\n\t\t$criteria->compare('valor_total',$this->valor_total);\n\t\t$criteria->compare('forma_pagamento',$this->forma_pagamento,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('attribute',$this->attribute,true);\n\t\t$criteria->compare('displayName',$this->displayName,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('value_type',$this->value_type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->buscar,'OR');\n\t\t$criteria->compare('fecha',$this->buscar,true,'OR');\n\t\t$criteria->compare('fechaUpdate',$this->buscar,true,'OR');\n\t\t$criteria->compare('idProfesional',$this->buscar,'OR');\n\t\t$criteria->compare('importe',$this->buscar,'OR');\n\t\t$criteria->compare('idObraSocial',$this->buscar,'OR');\n\t\t$criteria->compare('estado',$this->buscar,true,'OR');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\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);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('codop',$this->codop,true);\n\t\t$criteria->compare('codcatval',$this->codcatval,true);\n\t\t$criteria->compare('cuentadebe',$this->cuentadebe,true);\n\t\t$criteria->compare('cuentahaber',$this->cuentahaber,true);\n\t\t$criteria->compare('desop',$this->desop,true);\n\t\t$criteria->compare('descat',$this->descat,true);\n\t\t$criteria->compare('debe',$this->debe,true);\n\t\t$criteria->compare('haber',$this->haber,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pagesize'=>100),\n\t\t));\n\t}" ]
[ "0.7212116", "0.7135383", "0.7093303", "0.70931214", "0.69846356", "0.6960259", "0.69467723", "0.69414675", "0.69331795", "0.69232404", "0.69098496", "0.69022155", "0.6897633", "0.6896968", "0.6891722", "0.6881716", "0.68790054", "0.68732494", "0.6849048", "0.6848422", "0.6835513", "0.6825551", "0.6814831", "0.6806046", "0.68031967", "0.6796666", "0.67951876", "0.67949885", "0.6794775", "0.6792971", "0.67900133", "0.6784882", "0.6784177", "0.67833114", "0.678041", "0.6779752", "0.6778281", "0.67767406", "0.67760754", "0.6775229", "0.6774748", "0.6774748", "0.6774748", "0.6774748", "0.6774748", "0.6774748", "0.6774748", "0.6774748", "0.67724156", "0.6767882", "0.67656136", "0.6765443", "0.6761744", "0.67616224", "0.67601913", "0.67595613", "0.67592007", "0.675804", "0.6752924", "0.67521405", "0.67511666", "0.6747011", "0.6746921", "0.6745146", "0.67448705", "0.6744455", "0.6743953", "0.67434764", "0.6742657", "0.67425805", "0.67415595", "0.6740536", "0.6739724", "0.6738422", "0.67364377", "0.6735815", "0.6733496", "0.6731074", "0.6730509", "0.6724249", "0.6722275", "0.67217845", "0.67211044", "0.67121685", "0.67117965", "0.67097175", "0.6708282", "0.6705726", "0.6704765", "0.6704605", "0.6703087", "0.6701735", "0.6699912", "0.6697078", "0.6695819", "0.66949904", "0.66942173", "0.6692424", "0.6692423", "0.6692156", "0.6690761" ]
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.75750446", "0.7528519", "0.7271581", "0.72703993", "0.72617143", "0.7213263", "0.72127366", "0.7131883", "0.71287453", "0.71287453", "0.7102495", "0.7102467", "0.7102467", "0.7074701", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163" ]
0.0
-1
$this>student = new Student($firstName, $lastName, $myid, $major, $matricTerm, $gradTerm);
public function __construct($student, $current_term, $advising_term, $recommended_courses, $alt_courses) { $this->current_term = $_POST['student']['advising_session']['currentTerm']; $this->advising_term = $_POST['student']['advising_session']['advisingTerm']; $this->recommended_courses = array_filter($_POST['recommended_courses']); $this->alt_courses = array_filter($_POST['alt_courses']); $this->myid = $_POST['student']['myId']; $this->major = $_POST['student']['major']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n //$this->student = $student;\n }", "public function __construct(Student $student)\n {\n $this->student = $student;\n }", "public function __construct(Student $student)\n {\n $this->student = $student;\n }", "public function __construct($studentid)\n {\n $this->studentid=$studentid;\n //\n }", "public function __construct() {\n parent::__construct(\"STUDENT\", \"INSTRUCTOR\", \"JAVANET\");\n }", "public function __construct(Student $student)\n {\n $this->model = $student;\n }", "public function init() {\n\t\tnew Cpt_Student();\n\t}", "public function __construct()\n {\n $this->students = Student::all();\n // dd($this->students);\n $this->getGenders();\n \n }", "public function createStudent($firstName, $lastName, $userName, $password, $emailAddress, $studentId, $major, $address);", "function __construct($firstName, $lastName){\n\t\t$this->firstName = $firstName;\n\t\t$this->lastName = $lastName;\n\t}", "public function __construct($StudentNameVal, $StudentSurnameVal, $EmailAddressVal, $PhoneNumberVal, $CellNumberVal, $BirthDateVal, $AddressVal, $EnglishProofVal, $IDTypeVal, $IDNumberVal, $RegistrationFeeVal, $ProgramNameVal, $ProgramTuitionVal, $StartDateVal){\r\n \t\r\n \tparent::__construct($StudentNameVal, $StudentSurnameVal, $EmailAddressVal\r\n \t\t, $PhoneNumberVal, $CellNumberVal, $BirthDateVal,\r\n $AddressVal, $EnglishProofVal, $IDTypeVal, $IDNumberVal, $RegistrationFeeVal, $ProgramNameVal, $ProgramTuitionVal, $StartDateVal);\r\n\r\n\t}", "private function __construct()\n {\n $this->student = new Student();\n $this->order = new Order();\n $this->teacher = new Teacher();\n $this->user = new User();\n $this->course = new Courses();\n $this->video = new Video();\n $this->chat = new Chat();\n\n }", "public function __construct(StudentEnrollment $enrollment)\n {\n $this->enrollment = $enrollment;\n }", "function __construct() {\n $this->model = new Students();\n $this->view = new StudentsView();\n }", "public function __construct($firstName,$lastName)\n {\n $this -> firstName = $firstName;\n $this -> lastName = $lastName;\n }", "public function __construct()\n {\n //$this->exam_id = $exam_id;\n }", "function __construct($a,$b,$c,$d,$e,$f,$g,$h,$j,$k,$l,$m,$n,$o,$p,$q,$r,$s){\n\n $this->professor = $a;\n $this->ta = $b;\n $this->grade = $c;\n $this->difficulty = $d;\n $this->time = $e;\n $this->enjoyment = $f;\n $this->exams = $g;\n $this->examtype = $h;\n $this->mps = $j;\n $this->papers = $k;\n $this->comments_on_professor = $l;\n $this->tips = $m;\n $this->semester = $n;\n $this->part_of_core = $o;\n $this->timestamp = $p;\n $this->comments_on_course = $q;\n $this->user = $r;\n $this->id = $s;\n\n\n }", "function __construct() {\n $this->surname = '';\n $this->first_name = '';\n $this->emails = array();\n $this->grades = array();\n }", "public function __construct(Student $student, StudentTag $tag)\n {\n $this->student = $student;\n $this->tag = $tag;\n }", "function __construct(string $id){\r\n // \r\n //The school system makes use of the school model.\r\n parent::__construct(\"general_school\");\r\n // \r\n //Initialize the school id \r\n $this->id= $id;\r\n \r\n }", "public function __construct($userName_or_arborId, $nameOnly = true) { \r\n if (isset($_SESSION['studentDetail'])) {\r\n Config::debug(\"Student::__construct: session detail found\");\r\n if ($_SESSION['studentDetail']['arborId'] == $userName_or_arborId ||\r\n (isset($_SESSION['studentDetail']['userName']) && $_SESSION['studentDetail']['userName'] == $userName_or_arborId)) {\r\n $this->detail = $_SESSION['studentDetail'];\r\n return;\r\n }\r\n Config::debug(\"Student::__construct: session detail found, but not matched\");\r\n }\r\n \r\n Config::debug(\"Student::__construct: no session detail found\");\r\n \r\n $this->client = new GraphQLClient();\r\n\r\n if (is_numeric($userName_or_arborId)) {\r\n $this->detail['arborId'] = $userName_or_arborId;\r\n } else {\r\n $this->detail['userName'] = $userName_or_arborId;\r\n /* Ugh, got to look up using email address */\r\n Config::debug(\"Student::__construct: looking for email\");\r\n $emailAddress = $userName_or_arborId . \"@\" . Config::$site_emaildomain;\r\n $emailQuery = \"{ EmailAddress (emailAddress: \\\"$emailAddress\\\") { emailAddressOwner { id }}}\";\r\n $emailAddress = $this->client->rawQuery($emailQuery)->getData()['EmailAddress'];\r\n Config::debug(\"Student::__construct: query complete\");\r\n if (!isset($emailAddress[0])) {\r\n die(\"Your email address \" . $userName_or_arborId . '@' . Config::$site_emaildomain .\" appears unrecognised.\");\r\n }\r\n if (isset($emailAddress[1])) {\r\n die(\"Your email address appears to have more than one owner. This cannot possibly be right\");\r\n }\r\n if ($emailAddress[0]['emailAddressOwner']['entityType'] != 'Student') {\r\n die(\"Your email address \" . $userName_or_arborId . '@' . Config::$site_emaildomain .\" appears not to belong to a student.\");\r\n }\r\n Config::debug(\"Student::__construct: email found\");\r\n $this->detail['arborId'] = $emailAddress[0]['emailAddressOwner']['id'];\r\n }\r\n $id = $this->detail['arborId'];\r\n $this->query = <<<EOF\r\nStudent (id: $id) {\r\n id\r\n preferredFirstName\r\n preferredLastName\r\n academicLevel {\r\n id\r\n shortName\r\n }\r\n}\r\nEOF;\r\n $queryForBehaviourPoints = false;\r\n if (!$nameOnly) {\r\n /* Before we query Arbor, let's see if we have them cached */\r\n if ($this->getBehaviourNetPointsFromCache() == false) {\r\n $queryForBehaviourPoints = true;\r\n if (empty(Config::$queryMyDshs)) {\r\n $ayEve = $this->getAY('eve');\r\n $ayPost = $this->getAY('post');\r\n $this->query .= <<<EOF\r\n BehaviouralIncidentStudentInvolvement (student__id: $id behaviouralIncident__incidentDatetime_before: \"$ayPost\" behaviouralIncident__incidentDatetime_after: \"$ayEve\") {\r\n severity\r\n student {\r\n academicLevel {\r\n shortName\r\n }\r\n }\r\n }\r\n PointAward (student__id: $id awardedDatetime_before: \"$ayPost\" awardedDatetime_after: \"$ayEve\") {\r\n points\r\n }\r\n EOF;\r\n }\r\n }\r\n }\r\n \r\n $this->query = \"query { $this->query }\";\r\n $result = $this->client->rawQuery($this->query)->getData();\r\n \r\n foreach (['preferredFirstName', 'preferredLastName'] as $n) {\r\n $this->detail[$n] = $result['Student'][0][$n];\r\n }\r\n $matches = [];\r\n if (preg_match('/[1-9][0-9]*|[0RKN]$/', $result['Student'][0]['academicLevel']['shortName'], $matches) == 0) {\r\n die(\"Student {$this->getFirstName()} {$this->getLastName()}'s year group {$result['Student'][0]['academicLevel']['shortName']} is invalid.\");\r\n }\r\n $this->detail['yearGroup'] = $matches[0];\r\n if ($queryForBehaviourPoints) {\r\n if (empty(Config::$queryMyDshs)) {\r\n $p = 0;\r\n foreach ($result['BehaviouralIncidentStudentInvolvement'] as $i) {\r\n $p += $i['severity'];\r\n }\r\n foreach ($result['PointAward'] as $i) {\r\n $p += $i['points'];\r\n }\r\n } else {\r\n $client = new \\GuzzleHttp\\Client(['base_uri' => Config::$queryMyDshs, 'timeout' => 1.0,]);\r\n $key = Config::$queryMyDshsApiKey;\r\n try {\r\n $response = $client->get(\"{$this->getId()}/praise-points/total\",\r\n ['headers' => [ 'Authorization' => \"Bearer $key\",],]\r\n );\r\n \r\n } catch (\\Exception $e) {\r\n die(\"There has been a problem communicating with MyDSHS.\");\r\n }\r\n $p = (string)$response->getBody();\r\n if (!is_numeric($p)) {\r\n echo \"<pre>\" . $response->getBody() . \"</pre>\";\r\n die(\"There has been a problem communicating with MyDSHS.\");\r\n }\r\n }\r\n $this->detail['behaviourNetPoints'] = $p;\r\n $this->db->dosql(\"INSERT INTO pointsCache (arbor_id, arborPoints) VALUES ('\"\r\n . $this->getId() . \"', '\"\r\n . $this->getBehaviourNetPoints() . \"');\");\r\n }\r\n if (isset ($_SESSION)) {\r\n $_SESSION['studentDetail'] = $this->detail;\r\n }\r\n }", "public function addReviewByStudent()\n {\n /* code goes here */\n }", "public function __construct($name,$surname,$id,$age){\n parent::__construct($name,$surname); \n $this->id = $id;\n $this->age = $age; //protected\n\n }", "public function __construct()\n {\n // $this->invoice = $invoice;\n // $this->quiz = $quiz;\n }", "public function __construct($nom){\n \n }", "function __construct(/*$id = null, $id_lesson = null, $name = null, $surname = null*/)\n\t{\n\t}", "function __construct($studentNumber, $courseCode, $courseYear, $courseSemester, $grade){\n //echo \"inConstructCourseT \";\n $this->studentNumber = $studentNumber;\n $this->courseCode = $courseCode;\n $this->courseYear = $courseYear;\n $this->courseSemester = $courseSemester;\n $this->grade = $grade;\n\n $doesEntryExist = $this->checkDatabase();\n\n if($doesEntryExist == FALSE){\n //echo \"inConstructDoesEntryExist \";\n $this->populateDatabase();\n }\n }", "public function __construct($idnumber, $fname, $lname, $schoolid)\n {\n parent::__construct();\n \n \n //initialize all the variables\n $this->idnumber = $idnumber;\n $this->fname = $fname;\n $this->lname = $lname;\n $this->schoolid = $schoolid;\n }", "public function __construct($student, $reminder, $supervisor)\n {\n $this->student = $student;\n $this->reminder = $reminder;\n $this->supervisor = $supervisor;\n }", "public function __construct()\n {\n parent::__construct();\n $this->instituion_grade = new \\App\\Models\\Institution_grade();\n $this->education_grades = new Education_grade();\n $this->academic_period = new Academic_period();\n $this->institution_students = new Institution_student();\n $this->institutions = new Institution();\n $this->institution_class_students = new Institution_class_student();\n $this->institution_classes = new Institution_class();\n $this->institution_student_admission = new Institution_student_admission();\n }", "public function __construct($first_name, $last_name, $gender, $SSN, $emp_id, $year_of_service, $department, $salary, $bonus)\n {\n parent::__construct($first_name, $last_name, $gender, $SSN, $emp_id, $year_of_service, $department, $salary);\n\n $this->bonus = $bonus;\n }", "function createStudent($common, $firstName, $lastName, $studentID, $email, $major) {\n\t\tparent::doQuery(\"INSERT INTO `Proj2Students` (`FirstName`, `LastName`, `StudentID`, `Email`, `Major`, `Status`) \n\t\tVALUES ('$firstName', '$lastName', '$studentID', '$email', '$major', 'N')\", $common);\n\t}", "public function __construct($student, $admin, $isStudent = true)\n {\n $this->recipient = $student;\n $this->admin = $admin;\n $this->isStudent = $isStudent;\n }", "public function run()\n {\n $p1=new Student();\n $p2=new Student();\n// $p3=new Student();\n// $p4=new Student();\n// $p5=new Student();\n\n\n $p1->course_id=\"2\";\n $p1->First_Name=\"student1fname\";\n $p1->Last_Name=\"student1lname\";\n $p1->Currently_Enrolled=\"yes\";\n $p1->Matriculation_date=\"2010-06-24\";\n\n $p1->save();\n\n\n $p2->course_id=\"2\";\n $p2->First_Name=\"student2fname\";\n $p2->Last_Name=\"student2lname\";\n $p2->Currently_Enrolled=\"yes\";\n $p2->Matriculation_date=\"2010-06-25\";\n $p2->save();\n\n// $p3->post_id=2;\n// $p3->comment=\"comment1Post2\";\n// $p3->save();\n//\n// $p4->post_id=2;\n// $p4->comment=\"comment2Post2\";\n// $p4->save();\n//\n// $p5->post_id=3;\n// $p5->comment=\"comment1Post3\";\n// $p5->save();\n }", "public function __construct($student, $fee)\n {\n $this->student = $student;\n $this->fee = $fee;\n $this->date = Carbon::parse($fee->date)->format('Y-m-d');\n $this->month_aux = Carbon::parse($this->date)->format('m') == 1 ? 12 : Carbon::parse($this->date)->format('m') - 1;\n $this->month_ven = Carbon::createFromFormat('m', $this->month_aux);\n $this->director = Config::where('type','name')->first();\n $this->firma = Config::where('type','firma')->first();\n }", "function Student($common, $id) {\n\t\t// Student ID used as unique identifier for students\n\t\tparent::Base($common, $id, 'Proj2Students', 'StudentID');\n\t}", "public function __construct($name, $salary, $gender, $id=\"\") \n {\n $this->id = $id;\n $this->name = $name;\n $this->salary = $salary;\n $this->gender = $gender;\n }", "public function __construct(){\n // make sure you do something like that in your index.php\n require_once('models/book.php');\n $this->book = new Book();\n }", "function __construct($name,$gender) {\n $this->name = $name;\n $this->gender = $gender;\n }", "public function run()\n {\n $students = [\n [\n \"name\" => 'Giuseppino',\n \"lastname\" => 'Sbarazzino',\n \"age\" => 24,\n \"email\" => '[email protected]',\n \"classname\" => '3B'\n ],\n [\n \"name\" => 'Tommasino',\n \"lastname\" => 'Chebell',\n \"age\" => 29,\n \"email\" => '[email protected]',\n \"classname\" => '2A'\n ],\n [\n \"name\" => 'Valeria',\n \"lastname\" => 'Bombardieri',\n \"age\" => 25,\n \"email\" => '[email protected]',\n \"classname\" => '4H'\n ],\n [\n \"name\" => 'Mariapia',\n \"lastname\" => 'Gianguzzi',\n \"age\" => 31,\n \"email\" => '[email protected]',\n \"classname\" => '5E'\n ]\n ];\n\n foreach ($students as $student) {\n $newStudent = new Student();\n $newStudent->name = $student['name'];\n $newStudent->lastname = $student['lastname'];\n $newStudent->age = $student['age'];\n $newStudent->email = $student['email'];\n $newStudent->classname = $student['classname'];\n $newStudent->save();\n };\n }", "public function show(StudentClass $studentClass)\n {\n //\n }", "public function __construct (){}", "public function accoutingByStudent($student_id){\n }", "public function __construct($_salutation = NULL,$_firstName = NULL,$_middleName = NULL,$_lastName = NULL,$_suffix = NULL)\r\n\t{\r\n\t\tparent::__construct(array('Salutation'=>$_salutation,'FirstName'=>$_firstName,'MiddleName'=>$_middleName,'LastName'=>$_lastName,'Suffix'=>$_suffix));\r\n\t}", "function __construct () {\r\n\r\n\t\tparent::__construct();\r\n\r\n\t\t$this->load->model(\"student_m\");\r\n\r\n\t\t$this->load->model(\"parentes_m\");\r\n\t\t\r\n\t\t$this->load->model(\"package_m\");\r\n\r\n\t\t$this->load->model(\"section_m\");\r\n\r\n\t\t$this->load->model(\"mark_m\");\r\n\r\n\t\t$this->load->model(\"grade_m\");\r\n\r\n\t\t$this->load->model(\"invoice_m\");\r\n\r\n\t\t$this->load->model(\"classes_m\");\r\n\r\n\t\t$this->load->model(\"exam_m\");\r\n\r\n\t\t$this->load->model(\"subject_m\");\r\n\r\n\t\t$this->load->model(\"user_m\");\r\n\r\n\t\t$this->load->model(\"tmember_m\");\r\n\r\n\t\t$language = $this->session->userdata('lang');\r\n\r\n\t\t$this->lang->load('student', $language);\r\n\r\n\t}", "public function addStudent()\n {\n $student = new Student();\n $student->name = 'Shakib';\n $student->email = '[email protected]';\n $student->save();\n\n return 'Student Added Successfully!';\n }", "public function __construct(\n StudentRepositoryInterface $students\n ) {\n $this->students = $students;\n }", "function __construct()//constructor\n {\n }", "function __construct($firstName, $email, $password)\n\t{\n\t\t$this->firstName = $firstName;\n\t\t$this->email = $email;\n\t\t$this->password = $password;\n\t}", "public function __construct()\n {\n echo \"ini dari konstructor Male<br>\";\n }", "function __construct()\r\n {\r\n $this->id = 0;\r\n $this->name = \"\";\r\n $this->surname = \"\";\r\n $this->username = \"\";\r\n $this->email = \"\";\r\n $this->password = \"\";\r\n }", "public function __construct( )\n {\n }", "function __construct()\n\t{\n\t\t$this->id = 1;\n\t\t$this->name = \"Awais\";\t\n\t\t$this->email = \"Customer : [email protected]\";\t\n\t\t$this->balance = \"$87\";\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('Students_activities_model','sam');\n\t}", "function __construct($_name, $_surname){\n $this->name = $_name;\n $this->surname = $_surname;\n }", "public function __construct()\n\t{\n\t $this->entity = new Salidas;\n\t}", "public function __construct(StudentService $courseservice)\n {\n $this->courseservice = $courseservice;\n }", "public function __construct(){\n parent::__construct();\n $this->lang->load('general', $this->session->lang); \n if($this->session->role == \"student\"){ \n \t$this->student_id = $this->session->userid;\n \t}else\n \t\tredirect(\"manage\");\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('Students_activities_model', 'sam');\n\n\t}", "public function __construct($ctrl){\n $this->sData = new studentData;\n $row=$this->sData->studentSession($ctrl);\n $this->student= new student($row);\n\n if(isset($_POST)){\n $this->processPostData($ctrl);\n }//end if\n if(isset($_GET)){\n $this->processGetData($ctrl);\n }//end if\n\n }", "function __construct($nom, $age) {\n $this->nom = $nom;\n $this->age = $age;\n }", "public function __construct(Student $student, CourseClass $class, Quarter $quarter)\n {\n $this->student = $student;\n $this->class = $class;\n $this->quarter = $quarter;\n }", "public function __construct(DatabaseStudentRepository $repository) {\n $this->repository = $repository;\n }", "public function __construct(\\DB\\SQL $db)\n {\n parent::__construct($db, 'students_sm');\n }", "function add_student(){\n\t\t\t\n\t\t\t$st_id = self::$db->quote($_POST['id']);\n\t\t\t$fname = self::$db->quote($_POST['firstname']);\n\t\t\t$lname = self::$db->quote($_POST['lastname']);\n\t\t\t$area = self::$db->quote($_POST['area']);\n\t\t\t$result = self::$admin->addStudent($st_id,$fname,$lname,$area);\n\n\t\t\tif($result == 1){\n\t\t\t\techo \"User Added Successfully....\";\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\techo \"something wrong\";\n\t\t\t}\n\t\t}", "public function __construct(){\n // $this->team = new \\Model\\Business\\Department();\n $this->config = new \\Model\\Business\\YearPerformanceConfigCyclical();\n $this->record = new \\Model\\Business\\RecordYearPerformanceQuestions();\n $this->question = new \\Model\\Business\\YearPerformanceFeedbackQuestions();\n }", "public function __construct($name, $last_name, $gender, $hair){\n\n\t\t$this->name=$name;\n\t\t$this->last_name=$last_name;\n\t\t$this->gender=$gender;\n\t\t$this->hair=$hair;\n\n\t\t\techo \"Your name is: \".$this->name.\"<br>\";\n\t\t\techo \"Your last name is: \".$this->last_name.\"<br>\";\n\t\t\techo \"Your gender is: \".$this->gender.\"<br>\";\n\t\t\techo \"Your hair style and color is: \".$this->hair;\n\n\n\t}", "function __construct($name, $surname, $age) {\n $this->id = IdGenerator::getInstance()->getUniqueId();\n $this->name = $name;\n $this->surname = $surname;\n $this->age = $age;\n }", "public function __construct(){\r\n //$this->id = $id;\r\n //$this->email = $email;\r\n //$this->username = $username;\r\n //$this->password = $password;\r\n //$this->TDG = new UserTDG;\r\n }", "public function __construct()\n {\n $this->model= new Estudiante;\n $this->curso= new Curso;\n $this->usuario= new Usuario;\n $this->centrointeres= new Centrointeres;\n $this->clase= new Clase;\n $this->grado = new Grado;\n $this->asistencia= new Asistencia;\n }", "public function __construct()\n\t{}", "public function editStudent() {\n\n\t\tif ( POST ) {\n\t\t\t$validation = new Validation();\n\t\t\t$validation->name( 'name' )->value( $_POST['name'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'guardian_id' )->value( $_POST['guardian_id'] )->pattern( 'int' )->required();\n\t\t\t$validation->name( 'date_of_birth' )->value( $_POST['date_of_birth'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'gender' )->value( $_POST['gender'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'blood_group' )->value( $_POST['blood_group'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'religion' )->value( $_POST['religion'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'current_address' )->value( $_POST['current_address'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'permanent_address' )->value( $_POST['permanent_address'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'extra_curricular_activities' )->value( $_POST['extra_curricular_activities'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'remarks' )->value( $_POST['remarks'] )->pattern( 'text' )->required();\n\n\t\t\tif ( $validation->isSuccess() ) {\n\t\t\t\t$student = new Student();\n\t\t\t\t$student->id = trim( $_POST['id'] );\n\t\t\t\t$student->name = trim( $_POST['name'] );\n\t\t\t\t$student->guardian_id = trim( $_POST['guardian_id'] );\n\t\t\t\t$student->date_of_birth = trim( $_POST['date_of_birth'] );\n\t\t\t\t$student->gender = trim( $_POST['gender'] );\n\t\t\t\t$student->blood_group = trim( $_POST['blood_group'] );\n\t\t\t\t$student->religion = trim( $_POST['religion'] );\n\t\t\t\t$student->current_address = trim( $_POST['current_address'] );\n\t\t\t\t$student->permanent_address = trim( $_POST['permanent_address'] );\n\t\t\t\t$student->registration_no = trim( $_POST['registration_no'] );\n\t\t\t\t$student->extra_curricular_activities = trim( $_POST['extra_curricular_activities'] );\n\t\t\t\t$student->remarks = trim( $_POST['remarks'] );\n\t\t\t\t$student->status = trim( $_POST['status'] );\n\t\t\t\t$student->assignment = trim( $_POST['assignment'] );\n\t\t\t\t$new_file = new File();\n\t\t\t\t//attaching file , this method will work as a validation method for future\n\t\t\t\t//returns false if there are no files given\n\t\t\t\tif ( $new_file->attach_file( $_FILES['photo'] ) ) {\n\t\t\t\t\t//New File directory\n\t\t\t\t\t$new_file->upload_dir = 'images/students';\n\t\t\t\t\t// old file information\n\t\t\t\t\t$this->file->upload_dir = 'images/students';\n\t\t\t\t\t$this->file->file_name = $_POST['oldPhoto'];\n\t\t\t\t\t$student->photo = $new_file->file_name;\n\t\t\t\t\tif ( $student->update() ) {\n\t\t\t\t\t\t//Destroy the old file\n\t\t\t\t\t\tif ( $this->file->destroy() ) {\n\t\t\t\t\t\t\t//Save the new File\n\t\t\t\t\t\t\tif ( $new_file->save() ) {\n\t\t\t\t\t\t\t\tredirect( 'students/index' );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->file->destroy();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdie( 'Could not delete the file' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdie( 'Something went Wrong' );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$student->photo = $_POST['oldPhoto'];\n\t\t\t\t\tif ( $student->update() ) {\n\t\t\t\t\t\tredirect( 'students/index' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdie( 'Something went Wrong' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\techo $validation->displayErrors();\n\t\t\t}\n\n\t\t}\n\t}", "public function addStudent($data){\n\t \t\n\t\t$student = new CaStudent();\n\t\t\n\t\t$student->name=trim($data['name']);\n\t\t$student->birthday=trim($data['birthday']);\n\t\t$student->sex=$data['sex'];\n\t\t$student->classes_id=$data['classes_id'];\n\t\t\n\t\t//save to DB\n\t\t$student->save();\n\t }", "public function __construct(\n\t\tStudentRecord $student_record,\n\t\tStudentRecordRepository $student_record_repo,\n\t\tStudentFeeRecord $student_fee_record\n\t) {\n\t\t$this->student_record = $student_record;\n\t\t$this->student_record_repo = $student_record_repo;\n\t\t$this->student_fee_record = $student_fee_record;\n\t}", "public function student()\n {\n return $this->hasOne('App\\Student');\n }", "public function create_student($row)\n\t\t{\n\t\t\t$student = new Student();\n\t\t\t$student->setId($row['id']);\n\t\t\t$student->setFirstName($row['firstName']);\n\t\t\t$student->setLastName($row['lastName']);\n\t\t\t$student->setGender($row['gender']);\n\t\t\t$student->setAge($row['age']);\n\t\t\t$student->setGroup($row['sgroup']);\n\t\t\t$student->setFaculty($row['faculty']);\n\t\t\t\n\t\t\treturn $student;\n\t\t}", "public function student()\n\t{\n\t\treturn $this->belongsTo(Student::class);\n\t}", "public function __construct()\n {\n //\n //$this->name = $user->name;\n }", "public function __construct()\n\t{\n $this->user = new User();\n\t\t$this->rating = new Rating();\n\t}", "public function __construct(){\r\n \r\n }", "public function __construct(){\r\n \r\n }", "function __construct(){}", "function __construct(){}", "function __construct(){}", "public function __construct()\n {\n// $this->repo = new CourseRepository;\n }", "public function __construct()\n {\n\t\n }", "public function __construct()\n { }", "public function __construct()\n { }", "public function __construct()\n {\n $this->objClass = new Lesson;\n $this->objUsers = new User;\n $this->objPermission = new Permission;\n }", "public function __construct() \r\n\t{\r\n\t\tparent::__construct();\r\n\t\t\r\n\t\tinclude APP_ROOT.'/Models/Author.php';\r\n\t\t$this->Author = new Author();\r\n\t}", "function __construct() \n {\n }", "public function __construct()\n \t{\n }", "public function mySchool();", "function __construct($bookTitle, $bookPrice) {\n\n $this->bookTitle = $bookTitle;\n $this->bookPrice = $bookPrice;\n}", "function __construct($username='', $firstname='', $lastname='', $idnumber='', $year=0, \n $college=null, $reg_status=null, $classification=null, $keypadid='',\n $ferpa='', $degree_candidacy='', $anonymous='', $format=null, \n $numsections=null, $hidden=null, $cr_delete=null, $id = null, \n $update_flag = self::update_flag, $moodleid=null) {\n\n $this->id = $id;\n $this->username = $username;\n $this->firstname = $firstname;\n $this->lastname = $lastname;\n $this->idnumber = $idnumber;\n $this->update_flag = $update_flag;\n $this->year = $year;\n $this->college = $college;\n $this->reg_status = $reg_status;\n $this->classification = $classification;\n $this->keypadid = $keypadid;\n $this->ferpa = $ferpa;\n $this->degree_candidacy = $degree_candidacy;\n $this->anonymous = $anonymous;\n $this->numsections = $numsections;\n $this->format = $format;\n $this->hidden = $hidden;\n $this->cr_delete = $cr_delete;\n $this->moodleid = $moodleid;\n }", "function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model(\"student_m\");\n\t\t$this->load->model(\"transcripts_m\");\n\t\t$this->load->model(\"term_m\");\n\t\t$this->load->model(\"grade_m\");\n\t\t$this->load->model(\"classes_m\");\n\t\t$this->load->model(\"reportforms_m\");\n\t\t$this->load->model(\"exam_m\");\n\t\t$this->load->model(\"subject_m\");\n\t\t$this->load->model(\"user_m\");\n\t\t$this->load->model(\"section_m\");\n\t\t$this->load->model(\"parentes_m\");\n\t\t$this->load->model(\"ranking_m\");\n\t\t$this->load->library('fpdf/pdf'); // Load library\n\t\t$language = $this->session->userdata('lang');\n\t\t$this->lang->load('transcripts', $language);\n\t}", "public function __construct()\n {\n // constructor body\n }", "public function __construct()\n {\n // constructor body\n }", "public function __construct()\n {\n // constructor body\n }", "public function __construct(){\n\t\t\n\t}" ]
[ "0.82339376", "0.7745634", "0.7745634", "0.73140645", "0.71429056", "0.71245354", "0.68542355", "0.6808063", "0.67865044", "0.6603559", "0.64958537", "0.6472064", "0.64181393", "0.6392068", "0.6389265", "0.6388969", "0.63882804", "0.6370463", "0.6324336", "0.63106567", "0.6309799", "0.6308224", "0.6306309", "0.6305816", "0.62911034", "0.6254581", "0.6238188", "0.6237149", "0.62182707", "0.6156005", "0.61556584", "0.6148148", "0.6114546", "0.6113472", "0.61045843", "0.61018366", "0.6091827", "0.6086296", "0.6076639", "0.60680205", "0.60652065", "0.60561323", "0.60522854", "0.6040294", "0.60379934", "0.60243535", "0.59988946", "0.5985321", "0.5982052", "0.59779745", "0.5965675", "0.5962638", "0.59599304", "0.59507024", "0.5950593", "0.59484416", "0.59469604", "0.5941707", "0.59388006", "0.59367067", "0.5934457", "0.59275097", "0.5925478", "0.5921121", "0.5907073", "0.58999866", "0.5897358", "0.589634", "0.5895417", "0.589526", "0.5890009", "0.58861035", "0.58844066", "0.58841133", "0.5878123", "0.5877322", "0.5871768", "0.5868269", "0.5862586", "0.585148", "0.585148", "0.5850754", "0.5850754", "0.5850754", "0.58460665", "0.584515", "0.58416677", "0.58416677", "0.58376217", "0.5820667", "0.5813474", "0.5812812", "0.58105356", "0.581019", "0.58091927", "0.58080626", "0.5808008", "0.5808008", "0.5808008", "0.5804682" ]
0.6449225
12
Create the new item
public function addPost() { try { if (!isset($_REQUEST['add'])) { throw new Exception(_('Not able to add')); } $name = trim($_REQUEST['name']); $address = trim($_REQUEST['address']); $description = trim($_REQUEST['description']); $searchDN = trim($_REQUEST['searchDN']); $port = trim($_REQUEST['port']); $userNamAttr = trim($_REQUEST['userNamAttr']); $grpMemberAttr = trim($_REQUEST['grpMemberAttr']); $adminGroup = trim($_REQUEST['adminGroup']); $userGroup = trim($_REQUEST['userGroup']); $searchScope = trim($_REQUEST['searchScope']); if (!is_numeric($searchScope)) { $searchScope = 0; } $bindDN = trim($_REQUEST['bindDN']); $bindPwd = trim($_REQUEST['bindPwd']); $grpSearchDN = trim($_REQUEST['grpSearchDN']); $useGroupMatch = trim($_REQUEST['useGroupMatch']); if (empty($name)) { throw new Exception( _('Please enter a name for this LDAP server.') ); } if (empty($address)) { throw new Exception( _('Please enter a LDAP server address') ); } if (empty($searchDN)) { throw new Exception( _('Please enter a Search Base DN') ); } if (empty($port)) { throw new Exception( _('Please select an LDAP port to use') ); } if (!in_array($port, array(389, 636))) { throw new Exception( _('Please select a valid ldap port') ); } if (empty($adminGroup) && empty($userGroup)) { throw new Exception( _('Please Enter an admin or mobile lookup name') ); } if (empty($userNamAttr)) { throw new Exception( _('Please enter a User Name Attribute') ); } if (empty($grpMemberAttr)) { throw new Exception( _('Please enter a Group Member Attribute') ); } $LDAP = self::getClass('LDAP') ->set('name', $name) ->set('description', $description) ->set('address', $address) ->set('searchDN', $searchDN) ->set('port', $port) ->set('userNamAttr', $userNamAttr) ->set('grpMemberAttr', $grpMemberAttr) ->set('adminGroup', $adminGroup) ->set('userGroup', $userGroup) ->set('searchScope', $searchScope) ->set('bindDN', $bindDN) ->set('bindPwd', self::encryptpw($bindPwd)) ->set('useGroupMatch', $useGroupMatch) ->set('grpSearchDN', $grpSearchDN); if ($LDAP->save()) { self::setMessage(_('LDAP Server Added, editing!')); self::redirect( sprintf( '?node=ldap&sub=edit&id=%s', $LDAP->get('id') ) ); } } catch (Exception $e) { self::setMessage($e->getMessage()); self::redirect($this->formAction); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createNewItem();", "public function create()\n {\n // Not needed cause this is coming from the item listing\n }", "public function createItem($data);", "public function create()\n {\n $form = [\n \"name\" => [\n \"label\" => \"Name\",\n \"type\" => \"text\",\n \"value\" => old(\"name\"),\n \"required\" => true\n\n ],\n \"slug\" => [\n \"label\" => \"Code\",\n \"type\" => \"text\",\n \"value\" => old(\"slug\"),\n \"required\" => true\n ],\n \n \"icon\" => [\n \"label\" => \"Icon\",\n \"type\" => \"file\",\n \"attr\" => [\n \"accept\" => \"image/*\"\n ]\n ],\n \"status\" => [\n \"label\" => \"Status\",\n \"type\" => \"radio\",\n \"value\" => old(\"status\"),\n \"options\" => [[\"id\" => 1 ,\"name\" => \"Active\"],[\"id\" => 0 ,\"name\" => \"Deactive\"]],\n \"options_value\" => \"id\",\n \"options_label\" => \"name\",\n \"required\" => true,\n \"value\" => 1\n ]\n ];\n $this->_DATA[\"_ROUTE\"] = route($this->_ROUTE_FIX.\".\".$this->_ROUTE.\".store\");\n $this->_DATA[\"_PAGETILE\"] = $this->_DATA[\"_PAGETILE\"]; \n return $this->_CreateItem($form);\n }", "public function createNewItem()\n {\n return null;\n }", "public function createItem( $preparedItem ) {\n\t}", "protected function createItem()\n {\n return $this->_setUpNewNode(\n new Item()\n );\n }", "public function createItem (Item $item) {\n $this->itemsDB->create($item);\n $item->setId($this->retrieveLastItemId());\n }", "abstract public function add_item();", "function setupNewItem()\n {\n $item = array(\n 'id' => null,\n 'pending_id' => null,\n 'content_id' => null,\n 'created' => date( 'Y-m-d H:i:s'),\n 'createdBy' => $_SESSION['isLoggedUID'],\n 'updated' => null,\n 'updatedBy' => null,\n 'status' => 'create',\n 'topic' => null,\n 'subtopic' => null,\n 'heading' => null,\n 'date' => date( 'Y-m-d H:i:s'),\n 'caption' => null,\n 'text' => null,\n 'download_src' => null,\n 'download_name' => null,\n 'images' => array(),\n 'tags' => array(),\n 'terms' => array());\n $_SESSION['cropId'] = null;\n\n return($item);\n }", "public function actionCreateItem()\r\n {\r\n $catalogItem = new CatalogItem(['scenario' => 'create']);\r\n\r\n if($catalogItem->load(Yii::$app->request->post()) && $catalogItem->save())\r\n {\r\n $this->redirect(['/admin/catalog/index', 'id' => $catalogItem->id]);\r\n }\r\n\r\n $catalog = new Catalog();\r\n\r\n return $this->render(\r\n 'create',\r\n [\r\n 'catalog' => $catalog,\r\n 'catalogItem' => $catalogItem,\r\n ]\r\n );\r\n }", "function newItem() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\t\t$HTML->details(1);\n\n\t\tif($this->validator->validateList(\"itemtype_id\")) {\n\n\t\t\t$this->setItemtype($this->vars[\"itemtype_id\"]);\n\t\t\treturn $this->getTypeObject()->newItem();\n\t\t}\n\t\t// only one itemtype? skip selection\n\t\telse if(count($this->itemtypes[\"id\"]) == 1) {\n\n\t\t\t$this->setItemtype($this->itemtypes[\"id\"][0]);\n\t\t\treturn $this->getTypeObject()->newItem();\n\t\t}\n\t\telse {\n\t\t\t$default_value = array(\"0\", $this->translate(\"Select\"));\n\t\t\t$_ = '';\n\t\t\t$_ .= $this->head($this->translate(\"Choose Itemtype for new item\"));\n\t\t\t$_ .= $this->p($this->translate(\"Select an itemtype and click create!\"), \"info\");\n\t\t\t$_ .= $HTML->select($this->varnames[\"itemtype_id\"], \"itemtype_id\", $this->itemtypes, $this->vars[\"itemtype_id\"], $default_value);\n\t\t\t$_ .= HTML::smartButton($this->translate(\"Create\"), \"new\", \"new\", \"fright key:s\");\n\n\t\t\treturn $_;\n\t\t}\n\t\t\n\t}", "function createItem($item) {\n\t\tglobal $dbh;\n\t\t$stmt = $dbh->prepare('INSERT INTO ITEM VALUES (NULL, ?, ?, ?, ?)');\n\t\t$success = $stmt->execute(array($item['content'],\n\t\t\t\t\t\t\t\t\t\t$item['image'],\n\t\t\t\t\t\t\t\t\t\t$item['checked'],\n\t\t\t\t\t\t\t\t\t\t$item['listID']));\n\t\treturn $success;\n\t}", "public function createNewItem() {\n\t\treturn new FeedItem($this->type);\n\t}", "public function create()\n\t{\n\t\treturn view('item.create');\n\t}", "public function create_item( \\WP_REST_Request $request ) {\n\t\treturn $this->not_yet_response();\n\t}", "public function create()\n {\n\t\treturn view('item.create');\n }", "public function createAction()\n {\n $entity = new Item();\n $request = $this->getRequest();\n $form = $this->createForm(new ItemType(), $entity);\n $form->handleRequest ($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n\n $photo = $entity->getPhoto();\n if(!empty($photo))\n {\n $media = $this->get('striide_inventory.service.media')->save($entity->getPhoto());\n $entity->setPhoto($media->getId());\n }\n\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('StriideInventoryBundle_admin_item_show', array('id' => $entity->getId())));\n\n }\n\n return $this->render('StriideInventoryBundle:Item:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'json_types' => json_encode($this->get('striide_inventory.types')->getInventoryTypesArray()),\n 'form_theme' => 'StriideTwitterbootstrapBundle:Form:form_theme.html.twig',\n 'crumbs' => array(\n array('href' => $this->get('router')->generate('StriideInventoryBundle_homepage'),\n 'label' => $this->get('translator')->trans('Inventory')),\n array('href' => $this->get('router')->generate('StriideInventoryBundle_admin_item_new'),\n 'label' => $this->get('translator')->trans('Create new Item'))\n )\n ));\n }", "public function createItem($item) {\n\t\treturn tdb::insert(self::$tablename,$item);\n\t}", "public function actionCreate()\n {\n $model = new AuthItem(null);\n $model->type = $this->type;\n if ($model->load(Yii::$app->getRequest()->post(),'') && $model->save()) {\n return $this->success();\n } else {\n return $this->fail($model->getErrors(),Yii::t('rbac-admin', 'Name'));\n }\n }", "public function createNewItem()\n {\n $Item = new FeedItem($this->version);\n return $Item;\n }", "abstract public function createItem($name, $type, $description = '', $bizRule = null, $data = null);", "public function create()\n {\n //\n return view('backend.item.new');\n }", "public function createNew() {\n\t}", "function method_createitem($request)\n{\n $log = Loggermanager::getLogger('swim.createitem');\n $user = Session::getUser();\n \n checkSecurity($request, true, true);\n \n RequestCache::setNoCache();\n \n if (($user->isLoggedIn())&&($user->hasPermission('documents',PERMISSION_WRITE)))\n {\n if ($request->hasQueryVar('targetvariant') && $request->hasQueryVar('targetsection')\n && $request->hasQueryVar('class'))\n {\n $class = FieldSetManager::getClass($request->getQueryVar('class'));\n $section = FieldSetManager::getSection($request->getQueryVar('targetsection'));\n if (($section !== null) && ($class !== null))\n {\n $item = Item::createItem($section, $class);\n if ($item !== null)\n {\n $variant = $item->createVariant($request->getQueryVar('targetvariant'));\n if ($variant !== null)\n {\n $version = $variant->createNewVersion();\n if ($version !== null)\n {\n if ($request->hasQueryVar('parentitem') && $request->hasQueryVar('parentsequence'))\n {\n $parent = Item::getItem($request->getQueryVar('parentitem'));\n $sequence = $parent->getSequence($request->getQueryVar('parentsequence'));\n if ($sequence !== null)\n $sequence->appendItem($item);\n }\n $req = new Request();\n $req->setMethod('admin');\n $req->setPath('items/edit.tpl');\n $req->setQueryVar('item', $item->getId());\n $req->setQueryVar('version', $version->getVersion());\n redirect($req);\n }\n else\n {\n $log->warn('Unable to create version');\n displayServerError($request);\n }\n }\n else\n {\n $log->warn('Unable to create variant');\n displayServerError($request);\n }\n }\n else\n {\n $log->warn('Unable to create item');\n displayServerError($request);\n }\n }\n else\n {\n $log->warn('Section does not exist.');\n displayNotFound($request);\n }\n }\n else\n {\n $log->error('Invalid paramaters specified.');\n displayServerError($request);\n }\n }\n else\n {\n displayAdminLogin($request);\n }\n}", "public function action_create_item($id = NULL)\n {\n if ($id === NULL)\n {\n $id = $this->request->param('id');\n }\n\n $this->action_edit_item(FALSE, $id);\n }", "public function create()\n {\n return view('items::create_item');\n }", "public function create()\n {\n return view('items.createitem');\n }", "public function actionCreate()\n {\n $model = new Item();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function createNewItem()\n {\n return new Phone(\n new TouchKeyboardB(),\n new TouchDisplayB(),\n 'Slyva',\n 'S2'\n );\n }", "public function create() //添加\n {\n\t\t//\n }", "public function createAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"action\" => \"index\"\n ));\n }\n\n $itemsType = new ItemsType();\n\n $itemsType->code = $this->request->getPost(\"code\");\n $itemsType->name = $this->request->getPost(\"name\");\n \n\n if (!$itemsType->save()) {\n foreach ($itemsType->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n return $this->dispatcher->forward(array(\n \"action\" => \"new\"\n ));\n }\n\n $this->flash->success(\"Items Type was created successfully\");\n\n return $this->dispatcher->forward(array(\n \"action\" => \"index\"\n ));\n\n }", "public function create()\n {\n # code...\n return view('item/create');\n }", "public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemType());\n $entry = $service->insertGbaseItem($this->getEntry());\n $this->setEntry($entry);\n $entryId = $this->getEntry()->getId();\n $published = $this->gBaseDate2DateTime($this->getEntry()->getPublished()->getText());\n $this->getItem()\n ->setGbaseItemId($entryId)\n ->setPublished($published);\n\n if ($expires = $this->_getAttributeValue('expiration_date')) {\n $expires = $this->gBaseDate2DateTime($expires);\n $this->getItem()->setExpires($expires);\n }\n }", "public function create()\n {\n /* display create form */\n return view('item.item');\n }", "abstract protected function createItem(string $name): Item;", "public function createNewItem()\n {\n return new Phone(\n new TouchKeyboardA(),\n new TouchDisplayA(),\n 'Abrykos',\n 'A2'\n );\n }", "public function add()\n {\n $item = new stdClass();\n $item->item_id = null;\n $item->barcode = null;\n $item->price = null;\n $item->stock = null;\n $item->name = null;\n $item->category_id = null;\n $query_category = $this->categorys_m->get();\n $query_unit = $this->units_m->get();\n $unit[null] = '-Pilih-';\n foreach ($query_unit->result() as $u) {\n\n $unit[$u->unit_id] = $u->name;\n };\n $data = [\n 'page' => 'add',\n 'row' => $item,\n 'category' => $query_category,\n 'unit' => $unit,\n 'selectedunit' => null\n ];\n $this->template->load('template', 'product/item/item_add', $data);\n }", "public function create()\n {\n return view('item.create');\n }", "public function createNew();", "public function itemCreate(Event $event)\n {\n $request = $event->getParam('request');\n $operation = $request->getOperation();\n $em = $this->getServiceLocator()->get('Omeka\\EntityManager');\n\n\n if ($operation == 'create'){\n\n $response = $event->getParam('response');\n\n $resource = $response->getContent();\n $media = $resource->getMedia();\n\n if (array_key_exists('team', $request->getContent())){\n $teams = $request->getContent()['team'];\n\n //add items to team\n foreach ($teams as $team_id):\n $team = $em->getRepository('Teams\\Entity\\Team')->findOneBy(['id'=>$team_id]);\n $tr = new TeamResource($team, $resource);\n $em->persist($tr);\n\n //if there is media, add those to the team as well\n if (count($media) > 0) {\n foreach ($media as $m):\n $tr = new TeamResource($team, $m);\n $em->persist($tr);\n endforeach;}\n\n endforeach;\n $em->flush();\n }\n }\n }", "public function created(Item $item)\n {\n //\n }", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "public function create() {\n\t\t\t\n\t\t/* set method */\n\t\t$this->request_method = 'create';\n\t\t\t\t\n\t\t/* check for a model id */\n\t\tif( $this->id) {\n\t\t\t$this->set_error( 4, 'A model id is set in the request, cant create a new item on server' );\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t/* read the data from backbone */\n\t\t$this->parse_model_request();\n\n\t\tif($this->get_errors())\n\t\t\treturn;\n\t\t\t\n\t\t/* get the parsed post data from request */\n\t\t$item_data = $this->parsed_model_request;\n\n\t\t/* privileg checking @TODO outsource to filter */\n\t\tif( $this->properties->access == \"loggedin\" && ! current_user_can('edit_posts')) { // TODO improve CPT\n\t\t\t$this->set_error( 9, 'no user privileges to save the item on server' );\n\t\t\treturn;\n\t\t}\t\n\t\t\t\t \t\n\t\t/* insert database */\n\t\tswitch( $this->properties->modelclass ) {\n\t\t\t\n\t\t\t/* posts */\n\t\t\tcase('post'):\n\t\t\t\t$post = $item_data['post'];\t\t\t\t\t\t\t\n\t\t\t\t$result = wp_insert_post( $post );\n\t\t\t\t\n\t\t\t\t/* was there an error saving the post */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 6, 'saving the item failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* got the id of the created post */\n\t\t\t\t$new_id = $result;\t\n\t\t\tbreak;\n\n\t\t\tcase('attachment'):\n\t\t\t\t//@TODO\n\t\t\t\t$attachment = $item_data['post'];\t\n\t\t\t\t\n\t\t\t\t/* a post parent for a attachment must be set */\t\t\t\n\t\t\t\tif( ! $this->parent_id ) {\n\t\t\t\t\t$this->set_error( 7, 'the attachment has no parent id' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* upload the file ($_FILE) and attach it to the parent post\t\t\t */\n\t\t\t\t$result = media_handle_upload('async-upload', $this->parent_id, $attachment);\t\t\n if ( is_wp_error( $result )) {\n\t\t\t\t\t$this->set_error( 8, 'saving the attachment failed on the server' ); \n return; \n }\n\t\t\t\t$new_id = $result;\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t/* comment */\n\t\t\tcase('comment'):\n\t\t\t\t$comment = $item_data['comment'];\n\n\t\t\t\t/* a post parent for a comment must be set */\t\t\t\n\t\t\t\tif( ! $this->parent_id ) {\n\t\t\t\t\t$this->set_error( 7, 'the comment has no parent id' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* in some odd cases it maybe that the parent id is not yet present in the comment array */\n\t\t\t\t$comment['comment_post_ID'] = $this->parent_id;\n\t\t\t\t\n\t\t\t\t$result = wp_insert_comment($comment);\n\t\t\t\t\n\t\t\t\t/* was there an error saving the comment */\t\t\t\t\t\t\t\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 8, 'saving the comment failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* got the id of the created comment */\n\t\t\t\t$new_id = $result;\n\t\t\tbreak;\n\t\t\tcase('user'):\n\t\t\t//@TODO\n\t\t\tbreak;\n\t\t\tcase('idone'):\n\t\t\t\t$new_id = $this->id; // interacting with the databse is outsourced to the data package handlers\t\t\t\n\t\t\tbreak;\n\t\t}\t\n\t\t\n\t\t/* save custom data, this only method does all the magic, details must be specified in the custom package handlers */\n\t\t$this->_action_custom_package_data( $new_id, $item_data);\t\n\t\t\n\t\t/* set a clean response */\n\t\t$this->parse_model_response($new_id);\t\n do_action('bb-wp-api_after_create', $new_id, $this->properties, $this );\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create()\n\t{\n\t\t\n\t\t//\n\t}", "public function create()\n {\n return view('backend.items.create');\n }", "public function create()\r\n {\r\n \r\n }", "public function create()\n\t{\n\n\n\t\t//\n\t}", "public function create()\n {\n return view('items.create', ['item' => new Item]);\n }", "function create() {\r\n\t\tglobal $ufoSession;\r\n\t\tglobal $ufoDb;\r\n\t\t$link = $ufoDb->getLink();\r\n\t\t$this->uid = $ufoSession->userId();\r\n\r\n\t\t// insert\r\n\t\t$query = \"INSERT INTO ufo_product (uid, name, description) VALUES ($this->uid, '$this->name', '$this->description')\";\r\n\t\t$result = pg_query($query) or die(\"Query failed : \" . pg_last_error());\r\n\t\t/* Get the auto increment Id of the last insert. */\r\n\t\t$this->oid = $ufoDb->insert_id(\"ufo_product_seq\");\r\n\t\t$this->initialized = True;\r\n\t}", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n // Create new item\n $listBtn = ['title'=>'All Items', 'action' => 'items', 'icon' => 'icon md-format-list-bulleted'];\n $buttons =[];\n array_push($buttons, $listBtn);\n return view('backend.items.create', compact('buttons'));\n }", "public function create()\n {\n return View('Item.create');\n }", "public function create() {\n //\n }", "public function create()\n {\n \n //\n }", "public function create()\r\r\n {\r\r\n //\r\r\n }", "public function create(array $data): ChainableItemInterface;", "public function create()\n {\n // I skip using this create function because I use a modal form for inserting data using modal in index view via index function.\n }", "function add($item);", "public function actionCreate()\n {\n $userData = $this->request->post();\n\n $user = $this->userService->save($userData);\n\n return $this->responseItem(new Item($user, $this->userTransformer));\n }", "public function store(CreateItemRequest $request)\n {\n // --\n // Check role/permission\n if (!AdminHelper::can_action(115, 'created')) {\n return response()->json(\"Access denied\", 403);\n }\n\n if ($this->itemRepo->create($request)) {\n return response()->json('success');\n } else {\n return response()->json('error', 401);\n }\n }", "public function create()\n {\n //\n\t\t\n }", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}" ]
[ "0.8859525", "0.83662033", "0.80289537", "0.7503938", "0.74844295", "0.7352031", "0.7345427", "0.72844076", "0.7166338", "0.7138711", "0.7129777", "0.7062197", "0.7010556", "0.69586515", "0.6931974", "0.69304067", "0.6914015", "0.69124097", "0.6901465", "0.689261", "0.6883987", "0.6883295", "0.6875318", "0.681872", "0.6801665", "0.6798811", "0.6794857", "0.67918", "0.6764112", "0.6744348", "0.67030346", "0.6700516", "0.66992354", "0.66911626", "0.6689214", "0.6686566", "0.6680039", "0.66683424", "0.6639044", "0.6625838", "0.66194785", "0.66161394", "0.66153", "0.66153", "0.66141576", "0.66068286", "0.66068286", "0.66068286", "0.66068286", "0.65946984", "0.6590499", "0.6589799", "0.65867317", "0.6586278", "0.6584311", "0.6582975", "0.6582975", "0.6582975", "0.6582975", "0.65785456", "0.6576947", "0.65747786", "0.65690494", "0.65643317", "0.65584105", "0.6548219", "0.65442896", "0.65415406", "0.65355694", "0.6531955", "0.65306884", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929", "0.652929" ]
0.0
-1
Presents the user with fields to edit
public function edit() { $this->title = sprintf('%s: %s', _('Edit'), $this->obj->get('name')); unset($this->headerData); $this->attributes = array( array(), array(), ); $this->templates = array( '${field}', '${input}', ); $fields = array( _('LDAP Connection Name') => '<input class="smaller" type="text" ' . sprintf( 'id="name" name="name" value="%s"/>', ( $_REQUEST['name'] ? $_REQUEST['name'] : $this->obj->get('name') ) ), _('LDAP Server Description') => '<textarea name="description">' . ( $_REQUEST['description'] ? $_REQUEST['description'] : $this->obj->get('description') ) . '</textarea>', _('LDAP Server Address') => '<input class="smaller" type="text" ' . sprintf( 'id="address" name="address" value="%s"/>', ( $_REQUEST['address'] ? $_REQUEST['address'] : $this->obj->get('address') ) ), _('LDAP Server Port') => '<select id="port" name="port">' . sprintf( '<option value="">- %s -</option>', self::$foglang['PleaseSelect'] ) . sprintf( '<option value="389"%s>389</option>', ( $_REQUEST['port'] == 389 ? ' selected' : ( $this->obj->get('port') == 389 ? ' selected' : '' ) ) ) . sprintf( '<option value="636"%s>636</option>', ( $_REQUEST['port'] == 636 ? ' selected' : ( $this->obj->get('port') == 636 ? ' selected' : '' ) ) ) . '</select>', _('Use Group Matching (recommended)') => '<select id="useGroupMatch" ' . 'name="useGroupMatch">' . sprintf( '<option value="0"%s>%s</option>', ( $_REQUEST['useGroupMatch'] < 1 ? ' selected' : ( $this->obj->get('useGroupMatch') < 1 ? ' selected' : '' ) ), _('No') ) . sprintf( '<option value="1"%s>%s</option>', ( $_REQUEST['useGroupMatch'] > 0 ? ' selected' : ( $this->obj->get('useGroupMatch') > 0 ? ' selected' : '' ) ), _('Yes') ) . '</select>', _('Search Base DN') => '<input class="smaller" type="text" ' . sprintf( 'id="searchDN" name="searchDN" value="%s"/>', ( $_REQUEST['searchDN'] ? $_REQUEST['searchDN'] : $this->obj->get('searchDN') ) ), _('Group Search DN') => '<input class="smaller" type="text" ' . sprintf( 'id="grpSearchDN" name="grpSearchDN" value="%s"/>', ( $_REQUEST['grpSearchDN'] ? $_REQUEST['grpSearchDN'] : $this->obj->get('grpSearchDN') ) ), _('Admin Group') => '<input class="smaller" type="text" ' . sprintf( 'id="adminGroup" name="adminGroup" value="%s"/>', ( $_REQUEST['adminGroup'] ? $_REQUEST['adminGroup'] : $this->obj->get('adminGroup') ) ), _('Mobile Group') => '<input class="smaller" type="text" ' . sprintf( 'id="userGroup" name="userGroup" value="%s"/>', ( $_REQUEST['userGroup'] ? $_REQUEST['userGroup'] : $this->obj->get('userGroup') ) ), _('Initial Template') => '<select class="smaller" ' . 'id="inittemplate">' . '<option value="pick" selected >Pick a template</option>' . '<option value="msad">Microsoft AD</option>' . '<option value="open">OpenLDAP</option>' . '<option value="edir">Generic LDAP</option>' . '</select>', _('User Name Attribute') => '<input class="smaller" type="text" ' . sprintf( 'id="userNamAttr" name="userNamAttr" value="%s"/>', ( $_REQUEST['userNamAttr'] ? $_REQUEST['userNamAttr'] : $this->obj->get('userNamAttr') ) ), _('Group Member Attribute') => '<input class="smaller" type="text" ' . sprintf( 'id="grpMemberAttr" name="grpMemberAttr" value="%s"/>', ( $_REQUEST['grpMemberAttr'] ? $_REQUEST['grpMemberAttr'] : $this->obj->get('grpMemberAttr') ) ), _('Search Scope') => '<select id="searchScope" name="searchScope">' . sprintf( '<option value="">- %s -</option>', self::$foglang['PleaseSelect'] ) . sprintf( '<option value="0"%s>%s</option>', ( isset($_REQUEST['searchScope']) && $_REQUEST['searchScope'] == 0 ? ' selected' : ( $this->obj->get('searchScope') == 0 ? ' selected' : '' ) ), _('Base only') ) . sprintf( '<option value="1"%s>%s</option>', ( $_REQUEST['searchScope'] == 1 ? ' selected' : ( $this->obj->get('searchScope') == 1 ? ' selected' : '' ) ), _('Base and subtree') ) . sprintf( '<option value="2"%s>%s</option>', ( $_REQUEST['searchScope'] == 2 ? ' selected' : ( $this->obj->get('searchScope') == 2 ? ' selected' : '' ) ), _('Subtree and below') ) . '</select>', _('Bind DN') => '<input class="smaller" type="text" ' . sprintf( 'id="bindDN" name="bindDN" value="%s"/>', ( $_REQUEST['bindDN'] ? $_REQUEST['bindDN'] : $this->obj->get('bindDN') ) ), _('Bind Password') => '<input class="smaller" type="password" ' . sprintf( 'id="bindPwd" name="bindPwd" value="%s"/>', ( $_REQUEST['bindPwd'] ? $_REQUEST['bindPwd'] : $this->obj->get('bindPwd') ) ), '&nbsp;' => sprintf( '<input class="smaller" name="update" type="submit" value="%s"/>', _('Update') ), ); foreach ((array)$fields as $field => &$input) { $this->data[] = array( 'field' => $field, 'input' => $input, ); unset($input); } unset($fields); self::$HookManager->processEvent( 'LDAP_EDIT', array( 'headerData' => &$this->headerData, 'data' => &$this->data, 'templates' => &$this->templates, 'attributes' => &$this->attributes ) ); printf('<form method="post" action="%s">', $this->formAction); $this->render(); echo '</form>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit() {\n $token = $this->require_authentication();\n $user = $token->getUser();\n require \"app/views/user/user_edit.phtml\";\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()\n\t{\n\t\treturn view('admin.users.edit')->with('user', $this->user);\n\t}", "public function edit()\n\t{\n\t\t$user = App::make('user.current');\n\t\treturn View::make('shared.user.edit-user', $user->toArray());\n\t}", "public function edit()\n {\n return view(config('const.template.user.edit'), ['user' => User::find($this->guard()->id())]);\n }", "function edit()\n\t{\n\t\t// Find the logged-in client details\n\t\t$userId = $this->Auth->user('id');\n\t\t$user = $this->User->findById($userId);\n\n\t\t// Save the POSTed data\n\t\tif (!empty($this->data)) {\n\t\t\t$this->data['User']['id'] = $userId;\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash(__('Profile has been updated', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Profile could not be saved. Please, try again.', true));\n\t\t\t}\n\t\t} else {\n\t\t\t// Set the form data (display prefilled data) \n\t\t\t$this->data = $user;\n\t\t}\n\n\t\t// Set the view variable\n\t\t$this->set(compact('user'));\n\t}", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\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()\n {\n return view('user.edit', [\n 'user' => Auth::user()\n ]);\n }", "protected function edit() {\n\t\t// Make sure a user exists.\n\t\tif (empty($this->user)) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'The selected user was invalid.',\n\t\t\t\t'link' => 'management/users'\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\n\t\t// Prepare data for contents.\n\t\tnonce_generate();\n\t\t$data = array(\n\t\t\t'user' =>& $this->user\n\t\t);\n\t\t$this->title = 'Edit User: ' . $this->user['username'];\n\t\t$this->content = $this->View->getHtml('content-users-edit', $data, $this->title);\n\t}", "public function edit()\n {\n return view('auth.user.edit')->with('user', auth()->user());\n }", "public function edit(){\n\n \treturn View::make('users.edit');\t\n }", "public function edit()\n {\n $user = Auth::user();\n\n $data = [\n 'user' => $user,\n 'canEditSurname' => ($this->getGender($user->id_number) == 'F')\n ];\n\n return view('pages.user.edit', $data);\n }", "public function editAction(): void {\n View::renderTemplate('Profile/edit.twig', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n\t{\n\t\t\t$id = Auth::id();\n\t\t\n\t\t $userCardio = User::find($id)->UserCardio;\n\n\n // show the edit form and pass the userStat\n return View::make('userCardio.edit')\n ->with('userCardio', $userCardio);\n\t\t\n\t}", "public function edit()\n {\n $userId = Helper::getIdFromUrl('user');\n\n Helper::checkUrlIdAgainstLoginId($userId);\n\n View::render('users/edit.view', [\n 'method' => 'POST',\n 'action' => '/user/' . $userId . '/update',\n 'user' => UserModel::load()->get($userId),\n 'roles' => RoleModel::load()->all(),\n ]);\n }", "public function edit()\r\n\t{\r\n\t\t$model = $this->getProfileView();\r\n\t\t$data = array('model'=> $model);\r\n\t\t\r\n\t\treturn $this->render($data);\r\n\r\n\t}", "public function edit()\n {\n $id = Auth::user()->id;\n $user = User::find($id);\n return view('user.edit', compact('user'));\n }", "public function actionEdit() {\n\n\t\t$userId = User::checkLogged();\n\t\t$user = User::getUserById($userId);\n\t\t$first_name = $user['first_name'];\n\t\t$last_name = $user['last_name'];\n\t\t$result = false;\n\n\t\tif (isset($_POST['submit'])) {\n\t\t\t$first_name = $_POST['first_name'];\n\t\t\t$last_name = $_POST['last_name'];\n\n\t\t\t$errors = array();\n\n\t\t\tif ($error = Validator::checkName($first_name)) $errors['first_name'] = $error;\n\t\t\tif ($error = Validator::checkName($last_name)) $errors['last_name'] = $error;\n\n\t\t\tif (empty($errors)) {\n\t\t\t\t$result = User::edit($userId, $first_name, $last_name);\n\t\t\t}\n\t\t}\n\t\t$pageTitle = \"Edit Details\";\n\t\trequire_once(ROOT . '/views/account/edit.php');\n\n\t\treturn true;\n\t}", "public function edit()\n {\n $id=session()->get('user')->id;\n \n $user = User::find($id);\n $form=[\n \"value\" => \"update\",\n \"name\" => \"Edit Profile\",\n \"submit\" => \"Save\"\n ];\n\n return view('profile.form',compact('user','form'));\n }", "public function edit()\n\t{\n\t\t\n\t\t$sql = SqlQuery::getInstance();\n\t\t\n\t\t$tbl = new AbTable(\"SELECT u.first_name, u.last_name, u.zip, c.* FROM IBO_camp c JOIN user u ON u.id = c.user_id\",array('user_id'));\n\t\t\n\t\treturn $tbl->getHtml();\n\t\t\n\t\t\n\t}", "public function profile_edit() {\n $this->template->content = View::instance('v_users_profile_edit');\n $this->template->title = \"Edit Profile\";\n\n // Render the view\n echo $this->template;\n\n }", "public function edit()\n {\n /*get the user form auth*/\n $user = auth()->user();\n /*return view with that user*/\n return view('user.edit', compact('user'));\n }", "public function edit()\n {\n return view('admin.profile.edit');\n }", "public function edit()\n {\n // 1.入力情報を取得\n $login_user = Auth::id();\n $users = DB::table('users')\n ->select('id', 'email', 'password', 'profile_image')\n ->where('id', $login_user)\n ->first();\n return view('mypage.profile-settings', compact('users'));\n }", "function edit(){\n\t\t$arr = $this->uri->uri_to_assoc(3);\n\t\t$data['arr'] = $arr['id'];\n\t\t\n\t\t/* membuat value */\n\t\t$this->user->setID($arr['id']);\n\n\t\t/* fungsi ambil data */\n\t\t$result = $this->user->ambil_data();\n\n\t\t/* data dropdown */\n\t\t$data['role'] = role_dropdown();\n\t\t$data['result'] = $result;\n\n\t\t/* load view */\n\t\t$this->template->write_view('edit', $data);\n\t}", "public function edit()\n {\n return view('profil.edit', ['user' => auth()->user(), 'page' => 0]);\n }", "public function edit(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$user = $this->_map_posted_data();\n\t\t\t\t$user->set_user_id($_POST['id']);\n\t\t\t\t$this->userrepository->update($user);\n\t\t\t\theader(\"Location: index.php/admin/index/edit\");\n\t\t\t}else{\n\t\t\t\t$view_page = \"adminusersview/edit\";\n\t\t\t\t$id = $_GET['id'];\n\t\t\t\t$user = $this->userrepository->get_by_id($id);\n\t\t\t\tif(is_null($user)){\n\t\t\t\t\theader(\"Location: index.php/admin/index\");\n\t\t\t\t}\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t}\n\t\t}", "public function editLoggedIn()\n {\n return view('users.edit')->with('user', Auth::user());\n }", "public function edit()\n {\n $user = User::where('id', Auth::id())->firstOrFail();\n return view('profile.edit', compact('user'));\n }", "public function edit()\n {\n return view('pages.editprofile');\n }", "public function edit()\n {\n return view('profile.edit');\n }", "public function edit()\n {\n return view('profile.edit');\n }", "public function edit()\n {\n $user = User::where(\"email\",request(\"email\"))->get()->first();\n return view(\"admin.editUser\",compact(\"user\"));\n }", "public function edit()\n {\n //$user =User::find($id);\n $user =\\Auth::user();\n return view('users.edit',[\n 'title' =>'プロフィール編集',\n 'user'=>$user,\n ]);\n }", "public function edit()\n\t{\n\t\treturn view('account.edit');\n\t}", "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 edit() {\r\n \tif (isset($_SESSION['userid'])) {\n \t $user=$this->model->getuser($_SESSION['userid']);\n \t $this->view->set('user', $user[0]);\n \t $this->view->edit();\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "public function edit()\n {\n $userId = Helper::getIdFromUrl('user');\n \n $user = UserModel::load()->get($userId);\n\n return View::render('users/edit.view', [\n 'method' => 'POST',\n 'action' => '/user/' . $userId . '/update',\n 'user' => $user,\n 'roles' => RoleModel::load()->all(),\n ]);\n }", "public function editinformation() \n {\n UserModel::authentication();\n \n //get the session user\n $user = UserModel::user();\n\n UserModel::update_profile();\n }", "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()\n {\n $user = Auth::user();\n\n return view('cabinet.profile.edit', compact('user'));\n }", "public function edit()\n {\n $user = User::where('id',auth()->id())->first();\n return view('super.profile.edit', [\n 'edit' => $user,\n ]);\n }", "public function edit()\n {\n $user = Auth::user();\n\n return view('users.edit', compact('user'));\n }", "public function edit()\n {\n return view('/profile/edit');\n }", "public function edit()\n {\n\n return view('users.user-options');\n\n }", "public function edit()\n {\n $user = Auth::user();\n return view('user.editprofile', compact('user'));\n }", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function showedit(){\r\n return view('profile.editProfile');\r\n }", "public function edit($id)\n {\n return view('admin-master.user.input', [\n 'user' => User::findOrFail($id)\n ]);\n }", "public function edit()\n {\n $user = Auth::user();\n\n return view('users.edit', ['user' => $user]);\n }", "public function edit()\n {\n $user = User::where('id', Auth::user()->id)->get();\n return view('admin/edituser', compact('user', 'id')); \n }", "public function edit()\n {\n $id = Auth::User()->id;\n $user = User::findOrFail($id);\n return view('profile', compact('user'));\n }", "public function editprofile() {\n // If user is not logged in redirect them to login\n if(!$this->user){\n \n die('Members Only <a href=\"/users/login\">Login</a>');\n\n }\n # Create a new View instance\n $this->template->content3=View::instance('v_users_editprofile'); \n # Page title \n $this->template->title= APP_NAME. \":: Edit Profile\";\n // add required js and css files to be used in the form\n $client_files_head=Array('/js/languages/jquery.validationEngine-en.js',\n '/js/jquery.validationEngine.js',\n '/css/validationEngine.jquery.css'\n );\n $this->template->client_files_head=Utils::load_client_files($client_files_head);\n\n\n # Pass information to the view instance\n # Render View \n echo $this->template;\n\n }", "public function edit()\n {\n return view('user.home.editprofile');\n }", "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function edit($user_id=null) {\n //getting the active companies \n $company_name = CompanyInformation::where('status',1)->pluck('company_name','company_id');\n \t$users = User::where('user_id',$user_id)->first();\n \t$user_details = UserDetails::where('user_id',$user_id)->first();\n \treturn view('admin.user.create',['users'=>$users,'user_details'=>$user_details,'company_name'=>$company_name]);\n }", "public function edit()\n {\n $id = Auth::user()->id;\n \t$data = User::where('id',$id)->first();\n return view('admin.update-profile',compact('data'));\n }", "public function showEdit()\n {\n\n }", "public function edit()\n {\n $user = auth()->user();\n\n return view('profile.edit', compact('user'));\n }", "public function edit()\n {\n $user = Auth::user();\n\n return view('edit_profile', [\n 'user' => $user,\n ]);\n }", "public function edit()\n {\n $user = Auth::user();\n return view('editProfile', $user);\n }", "public function edit()\n {\n $my = auth()->user();\n\n return view('public.account.profile.edit', compact('my'));\n }", "public function edit() {\n if (!Auth::check()) return redirect()->to('login');\n $pageData = self::getData('edit');\n return view('profile-edit', $pageData);\n }", "public function edit()\n {\n $user = Auth::user();\n // dd($user);\n return view('user.update', compact('user'));\n }", "public function editprofile()\n\t\t{\n\t\t\tif(Auth::check()) {\n\t\t\t\t$userinfo = Auth::user();\n\t\t\t\treturn View::make('editprofile')->with('userinfo', $userinfo);\n\t\t\t} else {\n\t\t\t\tApp::abort(403);\n\t\t\t}\n\t\t}", "public function editAction()\n {\n // Check logged\n $userId = UserModel::checkLogged();\n \n //We get user data\n $user = UserModel::getUserById($userId);\n \n \n $name = $user['name'];\n \n \n $result = false;\n \n // Form processing\n if (isset($_POST['submit'])) {\n \n // Getting data from the form\n $name = $_POST['name'];\n $password = $_POST['password'];\n \n \n // Form error flag\n $errors = false;\n \n // If necessary, you can validate the values as needed\n if (!UserModel::checkName($name)) {\n $errors[] = 'The name must not be shorter than 2 characters';\n }\n \n if (!UserModel::checkPassword($password)) {\n $errors[] = 'Password must not be shorter than 6 characters';\n }\n \n if ($errors == false) {\n $result = UserModel::edit($userId, $name, $password);\n }\n }\n \n // Connect the view\n $this->view('header.tpl');\n $this->view('view.tpl', ['user' => $user,\n 'result' => $result]\n );\n $this->view('footer.tpl');\n \n return true;\n }", "public function editAction()\n {\n $identity = Zend_Auth::getInstance()->getIdentity();\n $users = new Users_Model_User_Table();\n $row = $users->getById($identity->id);\n\n $form = new Users_Form_Users_Profile();\n $form->setUser($row);\n\n if ($this->_request->isPost()\n && $form->isValid($this->_getAllParams())) {\n\n $row->setFromArray($form->getValues());\n $row->save();\n\n $row->login(false);\n\n $this->_helper->flashMessenger('Profile Updated');\n $this->_helper->redirector('index');\n }\n $this->view->form = $form;\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function edit() {\n $perfil = \\Auth::user();\n return view('users.profile', ['user' => $perfil]);\n }", "public function edituser(){\n\t\t$id = $this->uri->segment(3);\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/edit_londontec_users';\n\t\t$mainData = array(\n\t\t\t'pagetitle' => 'Edit Londontec users',\n\t\t\t'londontec_users' => $this->setting_model->Get_Single('londontec_users','user_id',$id)\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "function __editUserModal()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //template file\n $this->data['template_file'] = PATHS_COMMON_THEME . 'users.modal.html';\n\n //get client id\n $user_id = $this->uri->segment(4);\n\n //flow control\n $next = true;\n\n /** CLIENT CHECK PERMISSION **/\n if (!$this->permissions->usersEdit($user_id)) {\n\n //permission denied\n $this->notifications('wi_notification', $this->permissions->reason);\n\n //halt\n $next = false;\n }\n\n //load from database\n if ($next) {\n $this->data['reg_fields'][] = 'profile';\n $this->data['fields']['profile'] = $this->users_model->userDetails($user_id);\n $this->data['debug'][] = $this->users_model->debug_data;\n\n //visibility - show table or show nothing found\n if (!empty($this->data['fields']['profile'])) {\n $this->data['visible']['wi_edit_user_details_table'] = 1;\n } else {\n $this->notifications('wi_notification', $this->data['lang']['lang_no_results_found']);\n }\n }\n }", "public function edit()\n {\n return view('Person.edit');\n }", "function render_edit($user)\n {\n }", "public function actionEdit()\r\n {\r\n $userId = User::checkLogged();\r\n\r\n $user = User::getUserById($userId);\r\n\r\n // new user info valiables\r\n $name = $user['name'];\r\n $password = $user['password'];\r\n\r\n $result = false;\r\n\r\n // form processing\r\n if (isset($_POST['submit'])) {\r\n $name = $_POST['name'];\r\n $password = $_POST['password'];\r\n\r\n $errors = false;\r\n\r\n // validate fields\r\n if (!User::checkName($name))\r\n $errors[] = 'Имя должно быть длиннее 3-х символов';\r\n\r\n if (!User::checkPassword($password))\r\n $errors[] = 'Пароль должен быть длиннее 5-ти символов';\r\n\r\n // save new data \r\n if ($errors == false)\r\n\r\n $result = User::edit($userId, $name, $password);\r\n }\r\n\r\n // attach specified view\r\n require_once(ROOT . '/app/views/cabinet/edit.php');\r\n return true;\r\n }", "public function edit()\n {\n return view('user.settings', ['user' => Auth::user()]);\n }", "public function edit()\n {\n $user = \\App\\User::find((Auth::user()->id));\n \n return view('auth.editAccount',['user'=>$user]);\n }", "public function profile() {\n\n\n $userInfo = Auth::user();\n\n $User = User::find($userInfo->id);\n\n\n // show the edit form and pass the nerd\n return View::make('admin.profile.edit')\n ->with('User', $User);\n }", "public function edit()\n {\n $editData = Admin::find(1);\n return view('admin.admin_profile_edit',compact('editData'));\n }", "public function edit( )\r\n {\r\n //\r\n }", "public function edit(User $user)\n {\n return View::component('EditUser', ['user' => $user->only('id', 'name', 'email', 'created_at')]);\n }", "public function edit()\n {\n \n \n }", "public function editprofile()\n {\n //make sure user is logged in\n Auth::checkAuthentication();\n $data = array('ajaxform'=>'load');\n \n //loads user data from session, gives save button(post)\n $this->View->render('user/editProfile',$data);\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id) {\n View::share('title', 'Felhasználó módosítása');\n $this->layout->content = View::make('admin.users.edit')->with('user', User::find($id));\n }", "public function edit(User $user)\n {\n return view ('users.edit', compact('user'));\n\n }", "public function edit($id)\n {\n return View::make(\"admin.UserEdit\")->with(array('user'=>User::findOrFail($id)\n\t\t\t\t\t\t\t\t\t\t\t ));\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n return view('user.edit')->with('user',$this->user);\n }", "public function edit(User $user) {\n\t\t$this->accessible();\n\n\t\treturn view('users.modify', compact('user'));\n\t}", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit()\n {\n $data = auth()->user();\n return view('profile.edit')->with(compact('data'));\n }", "public function edit() {\n\t\t\t\n\t\t}", "public function edit()\n {\n return view('theme::user.settings');\n }", "public function edit($id)\n {\n $user = User::find($id);\n $this->viewData['pageTitle'] = 'Personel Düzenle';\n $this->viewData['item'] = $user;\n\n return view('admin.personal.edit')->with($this->viewData());\n }", "public function edit($id) {\n $user_data = User::find($id);\n return view('edit_info', ['data' => $user_data]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }" ]
[ "0.79757607", "0.7586839", "0.75672776", "0.75478166", "0.75290686", "0.7512355", "0.75066555", "0.7485564", "0.7468899", "0.7453889", "0.7453889", "0.7453623", "0.7412758", "0.7325566", "0.7292886", "0.7279879", "0.7270516", "0.72588414", "0.725782", "0.72061926", "0.71958846", "0.71911615", "0.71787995", "0.7160838", "0.7149375", "0.7141855", "0.713929", "0.7135613", "0.7132956", "0.7130517", "0.71227163", "0.71006703", "0.709273", "0.7082519", "0.7071408", "0.7071408", "0.7071006", "0.7060841", "0.7059245", "0.7058291", "0.7055662", "0.70493263", "0.7045149", "0.70310485", "0.70308167", "0.70268553", "0.7024404", "0.7023761", "0.70160484", "0.70136184", "0.7011627", "0.7000349", "0.69987327", "0.6998245", "0.6978041", "0.6975733", "0.6971014", "0.69685155", "0.6965422", "0.69615096", "0.69583833", "0.6957242", "0.6950263", "0.69448143", "0.6943419", "0.69316816", "0.6928899", "0.6924708", "0.69165945", "0.6900159", "0.68997186", "0.6893751", "0.68908674", "0.688574", "0.68812555", "0.6878952", "0.6857242", "0.6856759", "0.68555987", "0.6854191", "0.6851269", "0.6850128", "0.6848578", "0.6838393", "0.6833539", "0.68307924", "0.68291754", "0.6826958", "0.6816399", "0.6814169", "0.6813302", "0.6809112", "0.68086517", "0.6802441", "0.68006235", "0.6796695", "0.67949486", "0.6791785", "0.6790868", "0.6787052", "0.6785465" ]
0.0
-1
Updates the current item
public function editPost() { self::$HookManager->processEvent('LDAP_EDIT_POST', array('LDAP'=> &$LDAP)); try { if (!isset($_REQUEST['update'])) { throw new Exception(_('Not able to update')); } $name = trim($_REQUEST['name']); $address = trim($_REQUEST['address']); $description = trim($_REQUEST['description']); $searchDN = trim($_REQUEST['searchDN']); $port = trim($_REQUEST['port']); $userNamAttr = trim($_REQUEST['userNamAttr']); $grpMemberAttr = trim($_REQUEST['grpMemberAttr']); $adminGroup = trim($_REQUEST['adminGroup']); $userGroup = trim($_REQUEST['userGroup']); $searchScope = trim($_REQUEST['searchScope']); $grpSearchDN = trim($_REQUEST['grpSearchDN']); $useGroupMatch = trim($_REQUEST['useGroupMatch']); if (!is_numeric($searchScope)) { $searchScope = 0; } $bindDN = trim($_REQUEST['bindDN']); $bindPwd = trim($_REQUEST['bindPwd']); if (empty($name)) { throw new Exception( _('Please enter a name for this LDAP server.') ); } if (empty($address)) { throw new Exception( _('Please enter a LDAP server address') ); } if (empty($searchDN)) { throw new Exception( _('Please enter a Search Base DN') ); } if (empty($port)) { throw new Exception( _('Please select an LDAP port to use') ); } if (!in_array($port, array(389, 636))) { throw new Exception( _('Please select a valid ldap port') ); } if (empty($adminGroup) && empty($userGroup)) { throw new Exception( _('Please Enter an admin or mobile lookup name') ); } if (empty($userNamAttr)) { throw new Exception( _('Please enter a User Name Attribute') ); } if (empty($grpMemberAttr)) { throw new Exception( _('Please enter a Group Member Attribute') ); } $LDAP = $this->obj ->set('name', $name) ->set('description', $description) ->set('address', $address) ->set('searchDN', $searchDN) ->set('port', $port) ->set('userNamAttr', $userNamAttr) ->set('grpMemberAttr', $grpMemberAttr) ->set('adminGroup', $adminGroup) ->set('userGroup', $userGroup) ->set('searchScope', $searchScope) ->set('bindDN', $bindDN) ->set('bindPwd', self::encryptpw($bindPwd)) ->set('useGroupMatch', $useGroupMatch) ->set('grpSearchDN', $grpSearchDN); if (!$LDAP->save()) { throw new Exception(_('Database update failed')); } self::$HookManager->processEvent( 'LDAP_EDIT_SUCCESS', array('LDAP' => &$this->obj) ); self::setMessage(_('LDAP information updated!')); } catch (Exception $e) { self::$HookManager->processEvent( 'LDAP_EDIT_FAIL', array('LDAP' => &$this->obj) ); self::setMessage($e->getMessage()); } self::redirect($this->formAction); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->getGbaseItemEntry( $this->getItem()->getGbaseItemId() );\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $entry = $service->updateGbaseItem($this->getEntry());\n\n }", "abstract public function updateItem(&$object);", "public function updateItems()\n {\n if (count($this->items)) {\n foreach ($this->items as $item) {\n $item->setQuote($this);\n }\n }\n }", "public function testUpdateItem()\n {\n $item = $this->addItem();\n\n $this->laracart->updateItem($item->getHash(), 'qty', 4);\n\n $this->assertEquals(4, $item->qty);\n }", "public function updateItem($_id) {\n\t}", "public function updateItems()\n {\n if (count($this->items)) {\n foreach ($this->items as $item) {\n $item->setInvoice($this);\n }\n }\n }", "public function update(): void\n {\n // Update quality\n if ($this->item->sell_in > 10) {\n $this->item->quality++;\n }\n\n if ($this->item->sell_in <= 10 && $this->item->sell_in > 5) {\n $this->item->quality += 2;\n }\n\n if ($this->item->sell_in <= 5 && $this->item->sell_in > 0) {\n $this->item->quality += 3;\n }\n\n // Update Sell in\n $this->updateSellIn();\n\n if ($this->item->sell_in < 0) {\n $this->item->quality = 0;\n }\n\n $this->checkAndUpdateQualityByRange();\n }", "protected function update() {}", "public function update(): void\n {\n // Update quality\n $this->item->quality = self::QUALITY_MAX;\n }", "public function update()\r\n {\r\n \r\n }", "public function update(): void\n {\n // Update quality\n $this->item->quality--;\n\n // Update Sell in\n $this->updateSellIn();\n\n // Check if we need to decrease quality again\n if ($this->item->sell_in < 0) {\n $this->item->quality--;\n }\n\n $this->checkAndUpdateQualityByRange();\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "function update() {\n\n\t\t\t}", "public function update()\n {\n }", "public function updating()\n {\n # code...\n }", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function setUpdated(): void\n {\n $this->originalData = $this->itemReflection->dehydrate($this->item);\n }", "public function update()\r\n {\r\n //\r\n }", "protected function _update()\n\t{\n\t}", "public function update() {\r\n\r\n\t}", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "public function update() {\r\n }", "public function update_item( \\WP_REST_Request $request ) {\n\t\treturn $this->not_yet_response();\n\t}", "public function updated($item)\n {\n $this->elastic->update($item->getTable(), $item->id, $item->toArray());\n }", "protected function updateItems()\n {\n $this->log(\"Loading items...\");\n\n /** @var Item[] $items */\n $items = Item::find()->all();\n\n foreach ($items as $item) {\n if (!$this->hasItemSavedValue($item->id)) {\n $this->saveItemValue($item->id, $item->getDefaultNAValue(), $item->type, false);\n }\n }\n\n $this->log(\"Done\");\n }", "public function update()\n\t{\n\n\t}", "public function updateItem( $id, $preparedItem ) {\n\t}", "function addItemForUpdate($item) {\n $this->_update[$item->getId()] = $item;\n }", "public function update() {\n \n }", "function _update_item() {\n if ($_POST['id']) {\n $item = \\Model\\Item::find($_POST['id']);\n unset($_POST['id']);\n } else {\n $item = new \\Model\\Item();\n }\n \n if (isset($_POST['flags'])) { \n $item->flags = '';\n \n foreach ($_POST['flags'] as &$flag) {\n $flag = implode(':',$flag);\n }\n \n $item->flags = implode(',',$_POST['flags']);\n }\n \n foreach ($_POST as $name => $value) {\n if (!is_array($value)) {\n $item->$name = $value;\n }\n }\n \n // Make sure the stock is something\n if (!$item->stock)\n $item->stock = 0;\n \n $item->save();\n \n // Check if we need to delete any options\n $options = \\Model\\Itemoption::all(\n array('conditions' => \"itemid = {$item->id}\"));\n \n foreach ($options as $option) {\n foreach ($_POST['options'] as $new_option) {\n if ($new_option['id'] == $option->id) {\n continue 2;\n }\n }\n $option->delete();\n }\n \n if (isset($_POST['options'])) {\n foreach ($_POST['options'] as $option_data) {\n if ($option_data['id']) {\n $option = \\Model\\Itemoption::find($option_data['id']);\n unset($option_data['id']);\n } else {\n $option = new \\Model\\Itemoption();\n }\n \n foreach($option_data as $name => $value) {\n $option->$name = $value;\n }\n \n $option->itemid = $item->id;\n \n $option->save();\n } \n }\n \n $i = $item;\n \n ?>\n <tr data-search=\"<?=$i->number.' '.$i->name?>\" class=\"item-<?=$i->id?>\">\n <td><?=$i->number?></td>\n <td><?=$i->name?></td>\n <td><?=$i->short_description()?></td>\n <td>$<?=$i->price?></td>\n <td><?=$i->formated_weight()?></td>\n <td><?=$i->image_tag()?></td>\n <td><?=$i->display_flags()?></td>\n <td><?=$i->display_stock()?></td>\n <td>\n <button class=\"btn btn-mini btn-danger delete-item\" value=\"<?=sc_cp('Stock/delete_item/'.$i->id)?>\"><i class=\"icon-remove\"></i></button>\n <button class=\"btn btn-mini btn-primary edit-item\" value=\"<?=sc_cp('Stock/edit_item/'.$i->id)?>\"><i class=\"icon-pencil\"></i></button>\n </td>\n </tr>\n <?php \n \n }", "public function updateItem(Item $item, ItemUpdateStruct $itemUpdateStruct): Item;", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n \n }", "public function update()\n {\n \n }", "public function update()\n\t{\n\t\tif (isset($this->item->params) && $this->item->params instanceof CRegistry) {\n\t\t\t$this->item->params = $this->item->params->toString();\n\t\t}\n\n\t\t$ret = $this->db->updateObject('#__'.$this->table, $this->item, $this->primaryKey);\n\n\t\treturn $this;\n\t}", "public function update() {\r\n\t\t$this->getMapper()->update($this);\r\n\t}", "public function update()\n {\n\n }", "public function update()\n {\n\n }", "public function update();", "public function update();", "public function update();", "public function update();", "public function update() {\n parent::update();\n }", "function update_data($data_update_item) {\n\t}", "abstract public function update();", "abstract public function update();", "public abstract function update();", "public function update() {\n\t\treturn;\n\t}", "public function update()\n {\n # code...\n }", "public function updateInventory(){\n//\t\t$this->ddd($this->request->data);\n\t\t\textract($this->request->data);\n\t\t\t$customerUserId = $this->Item->discoverCustomerUserId($itemId);\n\t\t\t//this->request->data contains\n\t\t\t//array(\n\t\t\t//\t'pullQty' => '1',\n\t\t\t//\t'itemId' => '90',\n\t\t\t//\t'rowId' => '52d08471-8838-4330-b765-00ed47139427',\n\t\t\t//\t'onHand' => 'undefined',\n\t\t\t//\t'mode' => 'pull'\n\t\t\t//)\n\t\t\t//setup return array\n\t\t\t$returnArray['rowId'] = '#row-'. $rowId;\n\n\t\t\t//update the orderItem pull status, conditionally\n\t\t\tif ($mode == 'pull') {\n\t\t\t\t$onHand = $this->updateKitInventory();\n\t\t\t\t$pullFlag = ($pullQty > 0) ? 0 : 1;\n\t\t\t\t$this->Item->OrderItem->id = $rowId;\n\t\t\t\t$this->Item->OrderItem->saveField('pulled', $pullFlag);\n\t\t\t\t$orderNumber = $this->Item->OrderItem->pullOrderNumber($rowId);\n\t\t\t} else {\n\t\t\t\t$pullFlag = ($pullQty < 0) ? 0 : 1;\n\t\t\t\t$this->Item->ReplenishmentItem->id = $rowId;\n\t\t\t\t$this->Item->ReplenishmentItem->saveField('pulled', $pullFlag);\n\t\t\t\t$orderNumber = $this->Item->ReplenishmentItem->pullOrderNumber($rowId);\n\t\t\t}\n\t\t\t//validate the inventory change and handle onHand changes\n\t\t\t$success = $this->validateInventoryChange($itemId, $pullQty, $onHand);\n\n\t\t\t//if validation succeeds, proceed ($this->itemRecord set by validate method)\n\t\t\tif ($success) {\n\t\t\t\t$origQty = $this->itemRecord['Item']['quantity'];\n\n\t\t\t\t$this->itemRecord['Item']['quantity'] = $newQty = $this->calculateItemQuantity($this->request->data);\n\n//\t\t$this->ddd($this->itemRecord, 'itemRecord');\n//\t\tdie;\n\n\t\t\t\tif ($this->Item->save($this->itemRecord)) {\n\t\t\t\t\t$returnArray['item'] = $this->itemRecord;\n\t\t\t\t} else {\n\t\t\t\t\t$returnArray['item'] = false;\n\t\t\t\t}\n\t\t\t\t$itemId = $this->itemRecord['Item']['id'];\n//\t\t\t\t$itemName = $this->itemRecord['Item']['name'];\n\t\t\t\t\n\t\t\t\t$this->Log->create('adjustment');\n\t\t\t\t$this->Log\n\t\t\t\t\t->set('customer', $customerUserId)\n\t\t\t\t\t->set('id', $itemId)\n\t\t\t\t\t->set('name', $this->itemRecord['Item']['name'])\n\t\t\t\t\t->set('from', $origQty)\n\t\t\t\t\t->set('to', $newQty)\n\t\t\t\t\t->set('change', $newQty-$origQty)\n\t\t\t\t\t->set('number', $orderNumber)\n\t\t\t\t\t->set('by', $this->Item->OrderItem->Order->User->discoverName($this->Auth->user('id')));\n\t\t\t\t$this->Log->toString();\n\t\t\t\tCakeLog::write('inventory', $this->Log->logLineOut);\n//\t\t\t\tCakeLog::write('inventory', \"[$customerUserId] Inventory adjustment of id:$itemId::$itemName from $origQty to $newQty ($pullQty) by \" . $this->Item->OrderItem->Order->User->discoverName($this->Auth->user('id')));\n\n\t\t\t\tif ($mode = 'replenishment') {\n\t\t\t\t\tarray_merge($returnArray, $this->Item->manageUncommitted($itemId));\n\t\t\t\t\tarray_merge($returnArray, $this->Item->managePendingQty($itemId));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$returnArray['item'] = false;\n\t\t\t}\n\t\t\t$returnArray['error'] = $this->error;\n $this->autoRender = false;\n\t\t\techo json_encode($returnArray);\n }", "public function update () {\n\n }", "public function update(): void\n {\n $this->updateQuality();\n $this->updateSellIn();\n $this->expiresAfterSale();\n }", "function vitero_grade_item_update(stdClass $vitero) {\n}", "private function resetCurrentItem()\n {\n $this->current_item = 0;\n }", "public function updated(Item $item)\n {\n $data = request()->all();\n\n $item->sizes()->sync($data['sizes']);\n\n $item->translate('ru')->name = $data['title_ru'];\n $item->translate('ru')->text = $data['text_ru'];\n $item->translate('ru')->character = $data['character_ru'];\n\n $item->translate('en')->name = $data['title_en'];\n $item->translate('en')->text = $data['text_en'];\n $item->translate('en')->character = $data['character_en'];\n\n if(count($data['files']) > 0)\n dispatch(new ImageJob($item));\n }", "abstract protected function update ();", "public function update()\n\t{\n\t\t$option = JRequest::getVar('option');\n\t\t$post = JRequest::get('post');\n\t\t$Itemid = JRequest::getVar('Itemid');\n\t\t$redhelper = new redhelper;\n\t\t$Itemid = $redhelper->getCartItemid();\n\t\t$model = $this->getModel('cart');\n\n\t\t// Call update method of model to update product info of cart\n\t\t$model->update($post);\n\t\t$this->_carthelper->cartFinalCalculation();\n\t\t$this->_carthelper->carttodb();\n\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&Itemid=' . $Itemid, false);\n\t\t$this->setRedirect($link);\n\t}", "protected function updateAction()\n {\n }", "public function adjustOnHand() {\n\t\t$this->autoRender = false;\n\t\t// verify numeric data first\n\t\t// check the item exists too I guess\n\t\t\n\t\t$id = $this->request->data['Item']['id'];\n\n\t\t// the next method expects a different property\n\t\t// and it's structured a little differently\n\t\t$this->itemRecord = $this->request->data; \n\t\t$this->itemRecord['Item']['quantity'] = $this->request->data['Item']['orig_value'];\n\t\t$save = $this->updateOnHandInventory($this->request->data['Item']['quantity']);\n\t\t\n\t\tif (strlen($this->error) > 0) {\n\t\t\t$this->request->data['Item']['error'] = is_string($this->error);\n\t\t}\n\t\tif ($save) {\n\t\t\t$this->request->data['Item'] = array_merge($this->request->data['Item'], $this->Item->manageUncommitted($id));\n\t\t\t$this->request->data['Item'] = array_merge($this->request->data['Item'], $this->Item->managePendingQty($id));\n\t\t\t\n\t\t\t// the return array now has all the update values we will need for the page\n\t\t}\n\t\techo json_encode($this->request->data);\n\t}", "function updateItem($item) {\n\t\tglobal $dbh;\n\t\t$stmt = $dbh->prepare('UPDATE ITEM SET (NULL, ?, ?, ?, ?, ?) WHERE itemID = ?');\n\t\t$success = $stmt->execute(array($item['content'],\n\t\t\t\t\t\t\t\t\t\t$item['image'],\n\t\t\t\t\t\t\t\t\t\t$item['checked'],\n\t\t\t\t\t\t\t\t\t\t$item['listID'],\n\t\t\t\t\t\t\t\t\t\t$list['itemID']));\n\t\treturn $success;\n\t}", "public function update(): void\n {\n $content = $this->getOriginalContent();\n\n $parsed = $this->parseContent($content);\n\n $this->storeList($parsed);\n }", "public function update(Request $request, Item $item)\n {\n //\n }", "public function update(Request $request, Item $item)\n {\n //\n }", "public function update(Request $request, Item $item)\n {\n //\n }", "public function update(){\n\n\t\t/* set method */\n\t\t$this->request_method = 'update';\n\t\t\t\t\n\t\t/* check for a model id */\n\t\tif( ! $this->id) {\n\t\t\t$this->set_error( 10, 'No model id in request, cant update' );\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t/* read the data received from backbone */\n\t\t$this->parse_model_request();\n\n\t\tif($this->get_errors())\n\t\t\treturn;\n\t\t\t\t\t\n\t\t/* get the parsed post data from request */\n\t\t$item_data = $this->parsed_model_request;\n\t\t \t\t\t \t\n\t\t/* insert database */\n\t\tswitch( $this->properties->modelclass ) {\n\t\t\n\t\t\t/* posts */\n\t\t\tcase('post'):\n\t\t\tcase('attachment'):\n\t\t\t\t$post = $item_data['post'];\n\t\t\t\t\n\t\t\t\t/* privileg check */ //improve this for coded api calls, like when setting up bootstrap data (for reading it is no problem any way, because this check is only made for update and create and delete)\n\t\t\t\tif( $this->properties->access == \"loggedin\" && ! current_user_can('edit_post', $this->id)) { \n\t\t\t\t\t$this->set_error( 11, 'no user privileges to update the item on server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$result = wp_update_post( $post );\n\t\t\t\t\n\t\t\t\t/* maybe an error while updating */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 12, 'updating the item failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* geting the id means update was a success */\n\t\t\t\t$updated_id = $result;\n\t\t\t\t\n\t\t\t\t/* save custom data, this only method does all the magic, \n\t\t\t\tdetails must be specified in the custom package handlers */\n\t\t\t\t$this->_action_custom_package_data( $updated_id, $item_data);\t\n\t\t\t\t\n\t\t\t\t/* set a clean response */\n\t\t\t\t$this->parse_model_response($updated_id);\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t/* comment */\n\t\t\tcase('comment'):\n\t\t\t\t$comment = $item_data['comment'];\n\t\t\t\t\n\t\t\t\t/* comment updateding is not supported */\n\t\t\t\t$this->set_error( 13, 'comments cant be updated!' );\n\t\t\t\t\treturn; \n\t\t\tbreak;\n\t\t\tcase('user'):\n\t\t\t//@TODO\n\t\t\tbreak;\n\t\t\tcase('idone'):\n\t\t\t\t$new_id = $this->id;\n\t\t\t\t$this->_action_custom_package_data( $new_id, $item_data);\t\t\t\t\t\n\t\t\t\t$this->parse_model_response($new_id);\t\t\n\t\t\tbreak;\n\t\t}\n do_action('bb-wp-api_after_update', $updated_id, $this->properties, $this );\n\t\n\t}", "protected function updateItems()\n\t{\n\t\t$old_items = $this->old->getPdo()->query(\n\t\t\t\"SELECT ti.scti_type, i.* FROM tbl_scorecard_items i\n\t\t\tjoin tbl_scorecard_template_items ti ON i.sci_scti_id = scti_id\n\t\t\tWHERE i.sci_scorecard_id IN(\n\t\t\t\tSELECT scorecard_id FROM tbl_scorecards WHERE scorecard_type = 'MASTER' ORDER BY scorecard_template_id ASC\n\t\t\t)\n\t\t\tORDER BY i.sci_scorecard_id ASC, ti.scti_order ASC\"\n\t\t)->fetchAll(PDO::FETCH_OBJ);\n\n\t\t$new_items = $this->new->getPdo()->query(\n\t\t\t\"SELECT ti.type, i.* FROM scorecard_items i\n\t\t\tjoin scorecard_template_items ti ON i.template_item_id = ti.id\n\t\t\tWHERE i.scorecard_id IN(\n\t\t\t\tSELECT id FROM scorecards WHERE type = 'MASTER' ORDER BY template_id ASC\n\t\t\t)\n\t\t\tORDER BY i.scorecard_id ASC, ti.order ASC\n\t\t\")->fetchAll(PDO::FETCH_OBJ);\n\n\t\tforeach($old_items as $key => $old)\n\t\t{\n\t\t\t$this->updateItem($old, $new_items[$key]);\n\t\t}\n\t}", "public function updateFeatureItemPosition() {\n $this->autoRender = false;\n if (isset($_GET) && !empty($_GET)) {\n foreach ($_GET as $key => $val) {\n $this->loadModel('FeaturedItem');\n $this->FeaturedItem->updateAll(array('FeaturedItem.position' => $val), array('FeaturedItem.id' => $this->Encryption->decode($key)));\n }\n }\n }", "public function testUpdate()\n {\n\n if ($this->skipBaseTests) $this->markTestSkipped('Skipping Base Tests');\n\n $item = $this->model->factory()->create();\n $updatedItem = $this->model->factory()->make();\n\n // Removes the dates for comparison\n $itemArray = $item->toArray();\n unset($itemArray['created_at']);\n unset($itemArray['updated_at']);\n\n // Check that the database contains the factory item\n $this->assertDatabaseHas($this->table, $itemArray);\n\n // Update the item with the second factory updatedItem\n $response = $this->patch(\"{$this->baseUrl}/{$item->getKey()}\", $updatedItem->toArray(), ['FORCE_CONTENT_TYPE'=>'json'])\n ->assertStatus(200);\n\n // Check that the original item does not exist anymore\n $this->assertDatabaseMissing($this->table, $itemArray);\n // Check that the updatedItem now exists in the database\n $this->assertDatabaseHas($this->table, $updatedItem->toArray());\n\n\n }", "protected function handle_put_item_update($Item, $args = array())\n {\n return $Item;\n }", "public function postEditItems()\n\t{\n\t\tif (!$this->request->ajax()) { return $this->ajaxErrorResponse(); }\n\n\t\t// Get the properties that will be applied to all items.\n\t\t$properties = [\n\t\t\t'buyRaw' => $this->request->input('buyRaw' ) ? true : false,\n\t\t\t'buyRecycled' => $this->request->input('buyRecycled' ) ? true : false,\n\t\t\t'buyRefined' => $this->request->input('buyRefined' ) ? true : false,\n\t\t\t'buyModifier' => $this->request->input('buyModifier' ) ? : 0.00,\n\t\t\t'sell' => $this->request->input('sell' ) ? true : false,\n\t\t\t'sellModifier' => $this->request->input('sellModifier') ? : 0.00,\n\t\t\t'lockPrices' => $this->request->input('lockPrices' ) ? true : false,\n\t\t\t'source' => $this->request->input('source' ) ? : \"Jita\",\n\t\t];\n\n\t\t$properties['buyModifier'] = is_numeric($properties['buyModifier'])\n\t\t\t? (double)$properties['buyModifier' ] : 0.00;\n\n\t\t$properties['sellModifier'] = is_numeric($properties['sellModifier'])\n\t\t\t? (double)$properties['sellModifier'] : 0.00;\n\n\t\t// Get the properties that will be applied to single items.\n\t\t$property = [\n\t\t\t'buyPrice' => $this->request->input('buyPrice' ) ?: 0.00,\n\t\t\t'sellPrice' => $this->request->input('sellPrice') ?: 0.00,\n\t\t];\n\n\t\t$property['buyPrice'] = is_numeric($property['buyPrice'])\n\t\t\t? (double)$property['buyPrice' ] : 0.00;\n\n\t\t$property['sellPrice'] = is_numeric($property['sellPrice'])\n\t\t\t? (double)$property['sellPrice'] : 0.00;\n\n\t\t// Get the items being updated.\n\t\t$ids = explode(',', $this->request->input('items'));\n\t\t$ids = count($ids) && $ids[0] != '' ? $ids : [];\n\t\t$items = $this->item_model->whereIn('typeID', $ids)->get();\n\n\t\ttry {\n\t\t\tif ($items->count() == 0) { throw new \\Exception(''); }\n\n\t\t\tDB::transaction(function () use ($items, $properties, $property) {\n\t\t\t\t// Update a single item.\n\t\t\t\tif ($items->count() == 1) {\n\t\t\t\t\t$items[0]->update(array_merge($properties, $property));\n\n\t\t\t\t// Update multiple items.\n\t\t\t\t} else if ($items->count() > 1) {\n\t\t\t\t\t$items->each(function ($item) use ($properties) {\n\t\t\t\t\t\t$item->update($properties);\n\t\t\t\t\t});\n\n\t\t\t\t} else {\n\t\t\t\t\treturn $this->ajaxFailureResponse(\n\t\t\t\t\t\ttrans('buyback.messages.edit_items_nothing', $items->count()));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn $this->ajaxSuccessResponse(\n\t\t\t\ttrans_choice('buyback.messages.edit_items_success', $items->count() == 1 ? 1 : 2));\n\n\t\t} catch (\\Exception $e) {\n\t\t\treturn $this->ajaxFailureResponse(\n\t\t\t\ttrans_choice('buyback.messages.edit_items_failure', $items->count() == 1 ? 1 : 2));\n\t\t}\n\t}", "public function testEditItem() {\n $data = $this->itemData;\n \n // Create the item\n $createItem = PromisePay::Item()->create($data);\n \n $this->assertEquals($this->GUID, $createItem['id']);\n \n // Modify data\n $data['name'] = 'Test123Update';\n $data['description'] = 'Test123Description';\n \n // Finally, modify the item\n $updateItem = PromisePay::Item()->update($createItem['id'], $data);\n \n $this->assertEquals($data['name'], $updateItem['name']);\n $this->assertEquals($data['description'], $updateItem['description']);\n }", "public function actionUpdate() {}", "public function actionUpdate() {}", "abstract public function updateData();", "protected function performUpdate() {}", "public function updateAction()\n {\n }", "public function update_inventory() {\n\t\t$rowIndex = $_POST['row_index'];\n\t\t$values=array(\"brand_id\"=>$_POST['brand_list_id'],\"product_id\"=>$_POST['product_list_id'],\"item_name\"=>$_POST['item_name'],\"entry_date\"=>$_POST['purchase_date'],\"buy_price\"=>$_POST['product_buy_price'],\"sell_price\"=>$_POST['product_sell_price'],\"quantity\"=>$_POST['item_qty'],\"update_by\"=>isset($_SESSION['user_id']));\n\t\t$where =array(\"id\"=>$_POST['inv_item_id']);\n\t\tif($this->update(\"inventory\",$values,$where)) {\t\t\t\n\t\t\techo '{\"inventoryItemList\":{\"updateFlag\":true,\"rowIndex\":'.$rowIndex.'}}';\n\t\t}\n\t\telse\n\t\t\techo 'Error while updating';\n\t}", "public function update() {\n\t\ttry {\n\t\t\t$this->validateUpdate();\n\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"UPDATE list_item_definition SET\n\t\t\t\t\tpage_definition_id = :pageDefId, title = :title, icon = :icon,\n\t\t\t\t\tphp_key = :phpSelector, title_width = :titleWidth,\n\t\t\t\t\ttitle_label = :titleLabel\n\t\t\t\tWHERE instance_id = :instId AND list_item_definition_id = :id\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->bindValue(\n\t\t\t\t\":pageDefId\", $this->pageDefinitionId, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":title\", $this->title, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":icon\", $this->icon, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\n\t\t\t\t\":phpSelector\", $this->phpSelector, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":titleWidth\", $this->titleWidth, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":titleLabel\", $this->titleLabel, \\PDO::PARAM_STR);\n\n\t\t\t$sth->execute();\n\n\t\t\tunset($this->context->cache[$this->id]);\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "public function updateItem($itemKey, $id)\n {\n $this->engine->updateItemById($itemKey, $id);\n }", "abstract function update();", "public function update()\n {\n return $this->edit();\n }", "public function updateItem(ItemRequest $request,$id)\n {\n \n }", "function update(){\n\t\t$this->model->update();\n\t}", "public function testRequestUpdateItem()\n {\n\t\t$response = $this\n\t\t\t\t\t->json('PUT', '/api/items/6', [\n\t\t\t\t\t\t'name' => 'Produkt zostal dodany i zaktualizowany przez test PHPUnit', \n\t\t\t\t\t\t'amount' => 0\n\t\t\t\t\t]);\n\n $response->assertJson([\n 'message' => 'Items updated.',\n\t\t\t\t'updated' => true\n ]);\n }", "public function updateQuantity() {\n\t\t$count = 0;\n\t\tforeach ($_SESSION['cart'] as $cartRow) {\n\t\t\tif ($cartRow['id'] == $this->productId) {\n\t\t\t\t$_SESSION['cart'][$count]['quantity'] = $this->quantity;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$count += 1;\n\t\t}\n\t}", "public function update(){\n\n }", "public function update(){\n\n }" ]
[ "0.72943974", "0.7294069", "0.7202141", "0.7130964", "0.68864375", "0.6863934", "0.6794802", "0.6701028", "0.66977096", "0.66950154", "0.6657857", "0.66260296", "0.66260296", "0.661687", "0.65942335", "0.65860444", "0.6567765", "0.6567144", "0.65186554", "0.6514473", "0.6512199", "0.65072733", "0.64509815", "0.64509815", "0.64496684", "0.6422576", "0.6416457", "0.6402695", "0.6400992", "0.63922143", "0.6379001", "0.6370293", "0.636853", "0.6340719", "0.6332564", "0.6332564", "0.6332564", "0.6332564", "0.6332564", "0.6332564", "0.6332564", "0.6332564", "0.6332564", "0.6332564", "0.6332564", "0.6332564", "0.6309985", "0.6309985", "0.6282187", "0.62804794", "0.62533396", "0.62533396", "0.6244279", "0.6244279", "0.6244279", "0.6244279", "0.6233492", "0.6226312", "0.6218426", "0.6218426", "0.6192765", "0.6182263", "0.6174143", "0.6158523", "0.615831", "0.6120098", "0.61155224", "0.60973823", "0.60941666", "0.60940635", "0.60719305", "0.60682434", "0.60618067", "0.6061439", "0.6041678", "0.60210085", "0.60210085", "0.60210085", "0.6014786", "0.60010064", "0.5999025", "0.5997965", "0.5988451", "0.59881854", "0.5988156", "0.59866494", "0.59866494", "0.5976893", "0.5970762", "0.59671646", "0.59631425", "0.5961379", "0.5944987", "0.5943253", "0.5938674", "0.59297305", "0.59214264", "0.59181035", "0.5905511", "0.59019953", "0.59019953" ]
0.0
-1
Array of the Category as Key and value is an array of Permissions public static $lonelyCategories = []; // Array of Permissions with no dots, i.e. category only ex:"CatOnly" public static $categoriesAsRouteAndDots = []; // Array of Permissions that uses also a category only ex:"role , role.edit , role.create" Setup function to prepare the above arrays to be sent to the roles and permissions view
public static function setup($userRole, $currentRole, $systemPage = false) { // The order of calling these functions is important self::setupRoleWithPermissions($userRole, $currentRole, $systemPage); return self::setupCategoriesPermissions(); //self::setupCategoryOnlyArrays(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function setupCategoriesPermissions()\n\t{\n\t\t$result = [];\n\n\t\t// Looping into userPermissions and getting the category as the key and the value as an array of permissions\n\t\tforeach(self::$userPermissions as $userPermissionWithDots)\n\t\t{\n\t\t\t// checking if the permission has a menu category or not, it is separated in the DB with |\n\n\t\t\t$userCategoryPermission = explode ('.',$userPermissionWithDots,2);\n\t\t\t$userCategory = $userCategoryPermission[0];\n\n\n\t\t\t// if the permission is without a dot then it is a category only\n\t\t\tif(count($userCategoryPermission) > 1)\n\t\t\t{\n\t\t\t\t$userPermission = $userCategoryPermission[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$userPermission = '';\n\t\t\t}\n\n\t\t\tif(is_numeric($userPermission))\n {\n // If the permission is a number this means it is a role-manage permission\n // Add it if the role is in the roles to manage array\n if (in_array($userPermission, self::$rolesToManage))\n {\n $result[$userCategory][] = $userPermission;\n }\n }\n else\n {\n $result[$userCategory][] = $userPermission;\n }\n\t\t}\n\n\t\tself::$categoryWithPermissions = $result;\n\t\treturn $result;\n\n\t}", "public function getCategories()\n {\n return [ 'categories' => self::CATEGORIES ];\n }", "public function run()\n {\n $permission = [\n // [\n // 'name' => 'user-list',\n // 'display_name' => 'List Users',\n // 'category' => 'user',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'user-create',\n // 'display_name' => 'Create Users',\n // 'category' => 'user',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'user-edit',\n // 'display_name' => 'Edit Users',\n // 'category' => 'user',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'user-delete',\n // 'display_name' => 'Delete Users',\n // 'category' => 'user',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'role-list',\n // 'display_name' => 'List roles',\n // 'category' => 'role',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'role-create',\n // 'display_name' => 'Create roles',\n // 'category' => 'role',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'role-edit',\n // 'display_name' => 'Edit roles',\n // 'category' => 'role',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'role-delete',\n // 'display_name' => 'Delete roles',\n // 'category' => 'role',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-category-list',\n // 'display_name' => 'List Question Categories',\n // 'category' => 'question-category',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-category-create',\n // 'display_name' => 'Create Question Category',\n // 'category' => 'question-category',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-category-edit',\n // 'display_name' => 'Edit Question Category',\n // 'category' => 'question-category',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-category-delete',\n // 'display_name' => 'Delete Question Category',\n // 'category' => 'question-category',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-list',\n // 'display_name' => 'List Questions',\n // 'category' => 'question',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-create',\n // 'display_name' => 'Create Question',\n // 'category' => 'question',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-edit',\n // 'display_name' => 'Edit Question',\n // 'category' => 'question',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-delete',\n // 'display_name' => 'Delete Question',\n // 'category' => 'question',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'exam-list',\n // 'display_name' => 'List Exams',\n // 'category' => 'exam',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'exam-create',\n // 'display_name' => 'Create Exam',\n // 'category' => 'exam',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'exam-edit',\n // 'display_name' => 'Edit Exam',\n // 'category' => 'exam',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'exam-delete',\n // 'display_name' => 'Delete Exam',\n // 'category' => 'exam',\n // 'guard_name' => 'admin',\n // ],\n [\n 'name' => 'group-list',\n 'display_name' => 'List Groups',\n 'category' => 'group',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'group-create',\n 'display_name' => 'Create Group',\n 'category' => 'group',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'group-edit',\n 'display_name' => 'Edit Group',\n 'category' => 'group',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'group-delete',\n 'display_name' => 'Delete Group',\n 'category' => 'group',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'team-list',\n 'display_name' => 'List Teams',\n 'category' => 'team',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'team-create',\n 'display_name' => 'Create Team',\n 'category' => 'team',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'team-edit',\n 'display_name' => 'Edit Team',\n 'category' => 'team',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'team-delete',\n 'display_name' => 'Delete Team',\n 'category' => 'team',\n 'guard_name' => 'admin',\n ],\n ];\n\n foreach ($permission as $key => $value) {\n Permission::create($value);\n }\n }", "public function providePermissions() {\n return array(\n 'CMS_ACCESS_KapostBridgeLogViewer'=>array(\n 'name'=>_t(\n 'CMSMain.ACCESS',\n \"Access to '{title}' section\",\n \"Item in permission selection identifying the admin section. Example: Access to 'Files & Images'\",\n array('title'=>_t('KapostBridgeLogViewer.MENUTITLE', 'Kapost Bridge Logs'))\n ),\n 'category'=>_t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access')\n )\n );\n }", "public function getAccessibleCategories(): array\n {\n $isAllowedToSeeResourceStmt = $this->app->repositories->lockedResourceRepository->buildIsLockForRecordTypeAndTargetStatement();\n $haveCategoriesNotesStmt = $this->app->repositories->myNotesCategoriesRepository->buildHaveCategoriesNotesStatement();\n\n $allCategories = $this->app->repositories->myNotesCategoriesRepository->getCategories();\n $accessibleCategories = [];\n\n foreach ($allCategories as $key => $result) {\n $categoryId = $result[self::CATEGORY_ID];\n\n // check if this category is accessible\n if( !$this->myNotesController->hasCategoryFamilyVisibleNotes($categoryId, $isAllowedToSeeResourceStmt, $haveCategoriesNotesStmt)){\n unset($allCategories[$key]);\n continue;\n }\n\n // check if category is locked (parent)\n if( !$this->lockedResourceController->isAllowedToSeeResource($categoryId, LockedResource::TYPE_ENTITY, ModulesController::MODULE_ENTITY_NOTES_CATEGORY, false, $isAllowedToSeeResourceStmt) ){\n unset($allCategories[$key]);\n continue;\n }\n\n $accessibleCategories[$categoryId] = $result;\n\n if (!is_null($allCategories[$key][self::CHILDRENS_ID])) {\n $accessibleCategories[$categoryId][self::CHILDRENS_ID] = explode(',', $allCategories[$key][self::CHILDRENS_ID]);\n }\n\n // check if children categories are accessible\n if( !array_key_exists(self::CHILDRENS_ID, $accessibleCategories[$categoryId]) ) {\n continue;\n }\n\n $childrenIds = $accessibleCategories[$categoryId][self::CHILDRENS_ID];\n if( is_null($childrenIds) ){\n continue;\n }\n\n foreach( $childrenIds as $index => $childId ){\n $isChildAccessible = true;\n if(\n !$this->myNotesController->hasCategoryFamilyVisibleNotes($childId, $isAllowedToSeeResourceStmt, $haveCategoriesNotesStmt)\n || !$this->lockedResourceController->isAllowedToSeeResource($childId, LockedResource::TYPE_ENTITY, ModulesController::MODULE_ENTITY_NOTES_CATEGORY, false, $isAllowedToSeeResourceStmt)\n ){\n $isChildAccessible = false;\n }\n\n if( !$isChildAccessible ){\n unset($accessibleCategories[$categoryId][self::CHILDRENS_ID][$index]);\n }\n }\n }\n\n // sort alphabetically by category name\n uasort($accessibleCategories, fn(array $currentCategory, array $nextCategory) =>\n $currentCategory[self::CATEGORY] >= $nextCategory[self::CATEGORY]\n );\n return $accessibleCategories;\n }", "private function acl()\n {\n\n $this->acl = [\n '1' =>\n [\n 'admin', 'users', 'providers', 'category', 'farmIndex', 'products', 'questions', 'clients', 'category',\n 'bills', 'orders', 'reports', 'subcategoriesQuery','featuresQuery', 'showUser', 'validateProvider', 'newProduct',\n\n 'agentsGet', 'editProduct', 'deleteProduct', 'updateProduct','newUserAdmin','user',\n 'budgetShow', 'indexProfile', 'userUpdate', 'productAgentPreview', 'productDetailPreview','validateProduct',\n 'payPlan', 'searchUser', 'category', 'products', 'products', 'adminEditProduct', 'farmCategories.create', 'farms.create',\n 'viewProduct'\n\n ],\n '2' =>\n [\n 'admin', 'users', 'providers', 'category', 'farmIndex', 'clients', 'bills',\n 'orders', 'subcategoriesQuery','featuresQuery','agentsGet','newUserAdmin','user', 'indexProfile',\n 'userUpdate', 'payPlan','searchUser',\n 'viewProduct'\n ],\n '3' =>\n [\n 'admin', 'products', 'questions', 'orders', 'registerProvider', 'isValidateProviders', 'questions',\n 'subcategoriesQuery','featuresQuery', 'newProduct', 'insertProvider', 'questionDetail', 'questionNew',\n 'editProduct', 'deleteProduct', 'updateProduct', 'indexProfile','orderShowProvider','updateStateOrder',\n 'productDetailPreview','payPlan', 'productDetailPreview','pay','historyPay', 'inactivePlan', 'callProducts',\n 'newProductProvider', 'updateProductProvider', 'providerUpdate', 'viewProduct','updateStateOrderProvider'\n ],\n\n '4' =>\n [\n 'admin', 'bills', 'orders', 'reports', 'questions', 'questionDetail', 'questionNew',\n 'clientInformationIndex', 'clientInformationStore', 'indexProfile', 'userUpdate','budgetShow','downloadBudget',\n 'orderShow', 'payPlan'\n\n ],\n '5' =>\n [\n 'admin', 'providers', 'clients', 'reports', 'showUser', 'validateProvider', 'indexProfile', 'userUpdate',\n 'productAgentPreview', 'productDetailPreview' , 'validateProduct', 'NotifyIsActive','NotifyAll', 'payPlan',\n 'viewProduct'\n ],\n '6' =>\n [\n 'admin', 'reports', 'indexProfile', 'userUpdate', 'payPlan'\n ],\n ];\n }", "public function get_categories()\n {\n return ['basic'];\n }", "public function get_categories() {\n\t\treturn [ 'basic' ];\n\t}", "public function get_categories()\n {\n return ['super-cat'];\n }", "public function get_categories()\n {\n return ['general'];\n }", "public function get_categories()\n {\n return ['general'];\n }", "function product_line_roles_fun() {\r\n return array(\r\n 'Ventilation' => 'permissiondata',\r\n 'Compression' => 'permissiondata',\r\n 'Infrastructure' => 'permissiondata',\r\n 'Stapling' => 'vlex_permissiondata',\r\n 'Patient Monitoring' => 'vlex_permissiondata',\r\n 'Ablation' => 'vlex_permissiondata',\r\n 'Vessel Sealing' => 'vlex_permissiondata',\r\n );\r\n}", "public function getCategories();", "public function getCategories();", "private function _get_permissions_section_settings() {\r\n\r\n // Get all user roles\r\n global $wp_roles;\r\n\r\n if(!isset($wp_roles))\r\n $wp_roles = new WP_Roles();\r\n\r\n $allUserRoles = $wp_roles->get_names();\r\n\r\n return array(\r\n\r\n array(\r\n 'title' => __( 'Permissions Options' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'title',\r\n 'desc' => '',\r\n 'id' => 'wwof_permissions_main_title'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'User Role Filter' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'multiselect',\r\n 'desc' => __( 'Only allow a given user role/s to access the wholesale page. Left blank to disable filter.' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_user_role_filter',\r\n 'class' => 'chosen_select',\r\n 'css' => 'min-width:300px;',\r\n 'custom_attributes' => array(\r\n 'multiple' => 'multiple',\r\n 'data-placeholder' => __( 'Select Some User Roles...' , 'woocommerce-wholesale-order-form' )\r\n ),\r\n 'options' => $allUserRoles\r\n ),\r\n\r\n array(\r\n 'type' => 'sectionend',\r\n 'id' => 'wwof_permissions_role_filter_sectionend'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Access Denied Message' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'title',\r\n 'desc' => __( 'Message to display to users who do not have permission to access the wholesale order form.' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_permissions_noaccess_section_title'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Title' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'text',\r\n 'desc' => __( 'Defaults to <b>\"Access Denied\"</b> if left blank' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_noaccess_title',\r\n 'css' => 'min-width: 400px;'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Message' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'wwof_editor',\r\n 'desc' => __( 'Defaults to <b>\"You do not have permission to view wholesale product listing\"</b> if left blank' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_noaccess_message',\r\n 'css' => 'min-width: 400px; min-height: 100px;'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Login URL' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'text',\r\n 'desc' => __( 'URL of the login page. Uses default WordPress login URL if left blank' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_noaccess_login_url',\r\n 'css' => 'min-width: 400px;'\r\n ),\r\n\r\n array(\r\n 'type' => 'sectionend',\r\n 'id' => 'wwof_permissions_sectionend'\r\n )\r\n\r\n );\r\n\r\n }", "public function get_categories() {\n return [ 'yx-super-cat' ];\n }", "public function get_categories() {\n\t\treturn [ 'general' ];\n\t}", "public function get_categories() {\n\t\treturn [ 'general' ];\n\t}", "public function get_categories() {\n\t\treturn [ 'general' ];\n\t}", "public function providePermissions()\n {\n $category = EcommerceConfig::get(EcommerceRole::class, 'permission_category');\n $perms[EcommerceConfig::get(EcommerceRole::class, 'customer_permission_code')] = [\n 'name' => _t(\n 'EcommerceRole.CUSTOMER_PERMISSION_ANME',\n 'Customers'\n ),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.CUSTOMERS_HELP',\n 'Customer Permissions (usually very little)'\n ),\n 'sort' => 98,\n ];\n $perms[EcommerceConfig::get(EcommerceRole::class, 'admin_permission_code')] = [\n 'name' => EcommerceConfig::get(EcommerceRole::class, 'admin_role_title'),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.ADMINISTRATORS_HELP',\n 'Store Manager - can edit everything to do with the e-commerce application.'\n ),\n 'sort' => 99,\n ];\n $perms[EcommerceConfig::get(EcommerceRole::class, 'assistant_permission_code')] = [\n 'name' => EcommerceConfig::get(EcommerceRole::class, 'assistant_role_title'),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.STORE_ASSISTANTS_HELP',\n 'Store Assistant - can only view sales details and makes notes about orders'\n ),\n 'sort' => 100,\n ];\n $perms[EcommerceConfig::get(EcommerceRole::class, 'process_orders_permission_code')] = [\n 'name' => _t(\n 'EcommerceRole.PROCESS_ORDERS_PERMISSION_NAME',\n 'Can process orders'\n ),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.PROCESS_ORDERS_PERMISSION_HELP',\n 'Can the user progress orders through the order steps (e.g. dispatch orders)'\n ),\n 'sort' => 101,\n ];\n\n return $perms;\n }", "public static function getCategoryOptions()\n {\n return self::get('category') ?: [];\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}", "private function categoriesGet()\n {\n//var_dump(__METHOD__, __LINE__, array_keys($this->confMap));\n//var_dump(__METHOD__, __LINE__, array_keys( $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'points.' ]));\n // RETURN : method is called twice at least\n if ( $this->arrCategories != null )\n {\n return $this->arrCategories;\n }\n // RETURN : method is called twice at least\n // Local array for category labels\n $catLabels = null;\n // Local array for category icons\n $catIcons = null;\n // #54548, 131221, dwildt, 2+\n // Local array for category label css classes\n $catCss = null;\n\n switch ( true )\n {\n case( $this->pObj->typoscriptVersion <= 4005004 ):\n // Get the field name of the field with the category label\n $fieldForLabel = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'category' ];\n // Get the field name of the field with the category icon\n $fieldForIcon = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'categoryIcon' ];\n break;\n case( $this->pObj->typoscriptVersion <= 4005007 ):\n default:\n // Get the field name of the field with the category label\n $fieldForLabel = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryTitle' ];\n // #54548, 131221, dwildt, 4+\n // Get the field name of the field with the category label class for a marker category\n $fieldForCssMarker = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryCssMarker' ];\n // Get the field name of the field with the category label class for a path category\n $fieldForCssPath = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryCssPath' ];\n // Get the field name of the field with the category icon\n $fieldForIcon = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryIcon' ];\n break;\n }\n // #47631, #i0007, dwildt, 10+\n // Get categories from the rows\n $categoryLabels = array();\n\n // FOREACH row\n foreach ( $this->pObj->rows as $row )\n {\n // RETURN : field for category label is missing\n // 130530, dwildt\n switch ( true )\n {\n case(!$fieldForLabel ):\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'table.field with the category is empty';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n $prompt = 'Please use the TypoScript Constant Editor and maintain map.marker.field.category ';\n t3lib_div :: devLog( '[HELP/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 1 );\n }\n // DRS\n //var_dump(__METHOD__, __LINE__, $fieldForLabel);\n $this->arrCategories = array();\n return $this->arrCategories;\n // #47602, 130911, dwildt, 1+\n case(!array_key_exists( $fieldForLabel, $row ) ):\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'current rows doesn\\'t contain the field \"' . $fieldForLabel . '\"';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n //var_dump(__METHOD__, __LINE__, $fieldForLabel, array_keys($row), $this->categoriesGetWoLatLon( $row ) );\n // #i0196, 151022, dwildt, 6+\n if ( $this->categoriesGetWoLatLon( $row ) )\n {\n $this->arrCategories = array();\n return $this->arrCategories;\n }\n $row[ $fieldForLabel ] = '';\n break;\n // #i0196, 151022, dwildt, 6+/2-\n //$this->arrCategories = array();\n //return $this->arrCategories;\n // #i0076, 140721, dwildt, +\n case($this->categoriesGetWoLatLon( $row ) ):\n continue 2;\n default:\n // follow the workflow\n }\n // RETURN : field for category label is missing\n // 4.1.7, dwildt, 1-\n //$categoryLabels = array_merge( $categoryLabels, explode( $this->catDevider, $row[ $fieldForLabel ] ) );\n // 4.1.7, dwildt, 10+\n//var_dump( __METHOD__, __LINE__, $this->catDevider, $fieldForLabel, $row[ $fieldForLabel ]);\n//die();\n $catLabelsOfCurrRow = explode( $this->catDevider, $row[ $fieldForLabel ] );\n foreach ( $catLabelsOfCurrRow as $labelKey => $labelValue )\n {\n // #47602, 130911, dwildt, 4+\n if ( empty( $labelValue ) )\n {\n $labelValue = $this->pObj->pi_getLL( 'phrase_noMapCat' );\n // #i0062, 140714, 1+\n $this->arrWoCategories[ 'rows' ][] = $row[ $this->pObj->arrLocalTable[ 'uid' ] ];\n }\n $categoryLabels[] = $labelValue;\n if ( isset( $row[ $fieldForIcon ] ) )\n {\n $catIconsOfCurrRow = explode( $this->catDevider, $row[ $fieldForIcon ] );\n $categoryIcons[ $labelValue ] = $catIconsOfCurrRow[ $labelKey ];\n }\n // #54548, 131221, dwildt, 13+\n switch ( true )\n {\n case( isset( $row[ $fieldForCssMarker ] ) ):\n $catCssOfCurrRow = explode( $this->catDevider, $row[ $fieldForCssMarker ] );\n $categoryCss[ $labelValue ] = $catCssOfCurrRow[ $labelKey ];\n break;\n case( isset( $row[ $fieldForCssPath ] ) ):\n $catCssOfCurrRow = explode( $this->catDevider, $row[ $fieldForCssPath ] );\n $categoryCss[ $labelValue ] = $catCssOfCurrRow[ $labelKey ];\n break;\n default;\n break;\n }\n }\n // 4.1.7, dwildt, 10+\n }\n // FOREACH row\n // Get categories from the rows\n // #i0120, 150101, dwildt: 4+\n if ( $this->categoriesEmpty( $categoryLabels ) )\n {\n return false;\n }\n // Remove non unique category labels\n $categoryLabels = array_unique( $categoryLabels );\n//var_dump (__METHOD__, __LINE__, $categoryLabels);\n//var_dump(__METHOD__, __LINE__);\n // Order the category labels\n $orderBy = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'orderBy' ];\n switch ( $orderBy )\n {\n case( 'SORT_REGULAR' ):\n sort( $categoryLabels, SORT_REGULAR );\n break;\n case( 'SORT_NUMERIC' ):\n sort( $categoryLabels, SORT_NUMERIC );\n break;\n case( 'SORT_STRING' ):\n sort( $categoryLabels, SORT_STRING );\n break;\n case( 'SORT_LOCALE_STRING' ):\n sort( $categoryLabels, SORT_LOCALE_STRING );\n break;\n default:\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'configuration.categories.orderBy has an unproper value: \"' . $orderBy . '\"';\n t3lib_div :: devLog( '[ERROR/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 3 );\n $prompt = 'categories will ordered by SORT_REGULAR!';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n }\n sort( $categoryLabels, SORT_REGULAR );\n break;\n }\n // Order the category labels\n // Set the keys: keys should correspond with keys of the item colours\n $maxItem = count( $categoryLabels );\n $counter = 0;\n//var_dump(__METHOD__, __LINE__);\n//var_dump(__METHOD__, __LINE__, array_keys($this->confMap));\n foreach ( array_keys( $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'points.' ] ) as $catKey )\n {\n if ( substr( $catKey, -1 ) == '.' )\n {\n continue;\n }\n $catLabels[ $catKey ] = $categoryLabels[ $counter ];\n if ( isset( $row[ $fieldForIcon ] ) )\n {\n $catIcons[ $catKey ] = $categoryIcons[ $categoryLabels[ $counter ] ];\n }\n\n // #i0062, 140714, 4+\n if ( $catLabels[ $catKey ] == $this->pObj->pi_getLL( 'phrase_noMapCat' ) )\n {\n $this->arrWoCategories[ 'iconKey' ] = $catKey;\n }\n // #54548, 131221, dwildt, 9+\n switch ( true )\n {\n case( isset( $row[ $fieldForCssMarker ] ) ):\n case( isset( $row[ $fieldForCssPath ] ) ):\n $catCss[ $catKey ] = $categoryCss[ $categoryLabels[ $counter ] ];\n break;\n default;\n break;\n }\n $counter++;\n if ( $counter >= $maxItem )\n {\n break;\n }\n }\n // Set the keys: keys should correspond with keys of the item colours\n\n $this->arrCategories[ 'labels' ] = $catLabels;\n if ( isset( $row[ $fieldForIcon ] ) )\n {\n $this->arrCategories[ 'icons' ] = $catIcons;\n }\n // #54548, 131221, dwildt, 8+\n if ( !empty( $catCss ) )\n {\n $this->arrCategories[ 'cssClass' ] = $catCss;\n }\n//var_dump(__METHOD__, __LINE__);\n\n return $this->arrCategories;\n }", "function routePermission(){\n\t\n\t$routePermission =[\n\n\t\t'admin_owner_auth_check' =>\t\n\t\t\t\n\t\t\t[\n\t\t\t\t//jobs permission\n\t\t\t\t// 'jobs/create'=>['add_job'],\t\t\t\t\t\n\t\t\t\t// 'jobs/store'=>['add_job'],\n\t\t\t\t'jobs/{reference_id}/{step?}'=>['edit_job'], \n\t\t\t\t'jobs/update'=>['edit_job'],\n\n\t\t\t\t//listing permission\n\t\t\t\t// 'listing/create'=>['add_listing'],\t\t\t\t\t\n\t\t\t\t'listing/{reference}/edit/{step?}'=>['edit_listing'], \n\t\t\t\t\n\n\n\t\t\t\t//admin jobs permission\n\t\t\t\t'admin-dashboard/moderation/listing-approval'=>['listing_approval'],\n\t\t\t\t'admin-dashboard/moderation/manage-listings'=>['listing_approval'],\n\t\t\t\t'admin-dashboard/moderation/manage-enquiries'=>['listing_approval'],\n\t\t\t\t\n\n\n \t\t\t\t'admin-dashboard/jobs/manage-jobs'=>['manage_job_status'],\n \t\t\t\t// 'admin-dashboard/jobs/manage-jobs'=>['manage_job_status','manage_job_view'],\n\t\t\t \t'admin-dashboard/jobs/get-jobs'=>['manage_job_status','manage_job_view'],\n\t\t\t \t'admin-dashboard/jobs/update-job-status'=>['manage_job_status'],\n\t\t\t \t'admin-dashboard/jobs/bulk-update-job-status'=>['manage_job_status'],\n\t\t\t \t'admin-dashboard/config/categories'=>['manage_job_status'],\n\t\t\t\t'admin-dashboard/config/locations'=>['manage_job_status'],\n\t\t\t\t'admin-dashboard/users/internal-users'=>['manage_job_status'],\n\t\t\t\t'admin-dashboard/users/registered-users'=>['manage_job_status'],\n\t\t\t\t'admin-dashboard/users/export'=>['manage_job_status'],\n\t\t\t\t'admin-dashboard/email-notification'=>['manage_job_status'],\n\t\t\t\t'admin-dashboard/internal-email'=>['manage_job_status'],\n\n\t\t\t \t//ui element\n\t\t\t\t'submit_review_element_cls'=>['submit_for_review_job','submit_for_review_listing'],\n\t\t\t\t'edit_permission_element_cls'=>['edit_job','edit_listing'],\n\t\t\t\t'change_status_element_cls'=>['job_status'],\n\t\t\t\t'view_profile_element_cls' => ['listing_approval'],\n\t\t\t],\n\n\t\t'normal_user_check' =>\n\t\t\t[\t\t\t\t\t\t\n\t\t\t\t'delete_element_cls'=>['delete_job_contact'],\t\t\t\t\t\n\t\t\t\t'status_element_cls'=>['change_job_status'],\n\t\t\t\t'edit_element_cls'=>['edit_listing'],\t\n\t\t\t],\n\n\t\t// 'public_access' =>\n\t\t// \t[\t\n\t\t// \t\t//jobs permission\n\t\t// \t\t'jobs/{job}'=>['read_job'],\n\t\t// \t]\n\t\t\t\t\t\t\t\t\t\t\n\t];\n\n\n\treturn $routePermission;\n}", "public function run()\n {\n $basic_permissions = [\n ['id'=>'1z9Sv2fC1ALXdM80L0QHs9c3HLDoAOO8','description'=>'Crear Roles', 'group'=>'SEGURIDAD/ROLES', 'is_super'=>false ],\n ['id'=>'G8aCoYYCgE8fAwegn0MvWjxMXhxIIrhy','description'=>'Seleccionar Permiso', 'group'=>'SEGURIDAD/PERMISOS', 'is_super'=>false ],\n ['id'=>'lJFsnYJCnFcVPVBBUOQrmlv3b6Y2X2ZE','description'=>'Crear Usuarios', 'group'=>'ADMIN/USUARIOS', 'is_super'=>false ],\n ['id'=>'m0D4LIsO7V79aDueMDjgWGOmp8mPW6c0','description'=>'Seleccionar Rol', 'group'=>'SEGURIDAD/ROLES', 'is_super'=>false ],\n ['id'=>'n5TraVIrRoioG1kqdHsIaZLYDvxO8MFD','description'=>'Eliminar Usuarios', 'group'=>'ADMIN/USUARIOS', 'is_super'=>false ],\n ['id'=>'nrPqEhq2TX0mI7qT7glaOCJ7Iqx2QtPs','description'=>'Ver Roles', 'group'=>'SEGURIDAD/ROLES', 'is_super'=>false ],\n ['id'=>'nTSk4Y4SFKMyQmRD4ku0UCiNWIDe8OEt','description'=>'Ver Usuarios', 'group'=>'ADMIN/USUARIOS', 'is_super'=>false ],\n ['id'=>'QpKVz00WUbZVJMPFu3iBNGBTdMFYubQ2','description'=>'Eliminar Roles', 'group'=>'SEGURIDAD/ROLES', 'is_super'=>false ],\n ['id'=>'RGMUpFAiRuv7UFoJroHP6CtvmpoFlQXl','description'=>'CRUD Permisos', 'group'=>'SEGURIDAD/PERMISOS', 'is_super'=>true ],\n ['id'=>'v216XcAzgbt4mIjj6gZP2rdRTupXz0AO','description'=>'Editar Roles', 'group'=>'SEGURIDAD/ROLES', 'is_super'=>false ],\n ['id'=>'W8Xmv3hiIyIpkZfJMaL9MsRxxuSIiO5R','description'=>'Editar Usuarios', 'group'=>'ADMIN/USUARIOS', 'is_super'=>false ],\n ['id'=>'6ARHQGj1N8YPkr02DY04K1Zy7HjIdDcj','description'=>'Herramientas Dev', 'group'=>'DEV-TOOLS', 'is_super'=>false ],\n ['id'=>'BG4ZAI7BqpSs7Z0EsbqQkU3JZtGCkRrO','description'=>'Captura Reporte Checklist', 'group'=>'CHECKLIST', 'is_super'=>false ],\n ];\n\n foreach ($basic_permissions as $permission) {\n \\App\\Models\\Permission::create($permission);\n }\n }", "public function getCategories() : array;", "public function index()\n {\n $categoriess=User_category::all();\n\n if(Auth::user()->category_id ==11){\n $permissions=Permission::all();\n $categories=User_category::where('deleted',false)->get();\n }else{\n $permissions=Permission::where('permission_id','!=',3)->get();\n $categories=User_category::where('deleted',false)->where('user_category_id','!=',11)->get();\n }\n\n\n return view('pages.user_categorys')->with('categories',$categories)->with('permissions',$permissions)->with('categoriess',$categoriess);\n }", "public function get_categories() {\n\t\treturn [ 'happyden' ];\n\t}", "public function getCustom()\n {\n return config('cms-acl-module.permissions', []);\n }", "public function index()\n {\n $perfisId = Auth::user()->roles->pluck('id')->toArray();\n $perfilPermissions = DB::table('role_has_permissions')->whereIn('role_id', $perfisId)->pluck('permission_id')->toArray();\n $userPermissions = Auth::user()->permissions->pluck('id')->toArray();\n\n $permissioesUsuario = array_merge($perfilPermissions,$userPermissions);\n\n $categorias = RelatorioCategoria::where('status','A')->whereHas('relatorios', function ($query) use($permissioesUsuario) {\n $query->where('relatorios.status','A')->whereIn('relatorios.permission_id',$permissioesUsuario)->orderBy('nome');\n })->orderBy('nome')->get();\n return view(\"relatorio.index\",['categorias' => $categorias, 'permissioesUsuario' => $permissioesUsuario]);\n }", "public static function getCategoriesOptions()\n {\n return self::get('categories') ?: [];\n }", "function __getPrivacyConfig(){\n\t\t$privacy['Asset'][519]=\"<b>Public</b> - are publicly listed and visible to anyone.\";\n\t\t$privacy['Asset'][71]=\"<b>Members only </b> - are NOT publicly listed, and are visible only when shared in Groups or Events, and only by Group members.\";\n\t\t$privacy['Asset'][7]=\"<b>Private</b> - are NOT publicly listed and visible only to me.\";\n\n\t\t// TODO: possibly redundant? isn't it set in Asset????\n\t\t$privacy['Groups'][519]=\"Public - are visible to anyone.\";\n\t\t$privacy['Groups'][79]=\"Members only - visible to all common members.\";\n\t\t$privacy['Groups'][7]=\"Private - visible only to designated Admins.\";\n\n\t\t$privacy['SecretKey'][1]=\"Members - are visible to all site members.\";\n\t\t$privacy['SecretKey'][2]=\"Admins - are visible only to Owners and Admins \";\n\t\t$privacy['SecretKey'][4]=\"Nobody - disable Secret Key sharing\";\n\t\treturn $privacy;\n\t}", "function _scholar_polls_user_default_permissions() {\n $permissions = array();\n\n // Exported permission: create poll content\n $permissions[] = array(\n 'name' => 'create poll content',\n 'roles' => array(\n '0' => 'scholar admin',\n ),\n );\n\n // Exported permission: delete own poll content\n $permissions[] = array(\n 'name' => 'delete own poll content',\n 'roles' => array(\n '0' => 'scholar admin',\n ),\n );\n\n // Exported permission: edit own poll content\n $permissions[] = array(\n 'name' => 'edit own poll content',\n 'roles' => array(\n '0' => 'scholar admin',\n ),\n );\n\n // Exported permission: override poll promote to front page option\n $permissions[] = array(\n 'name' => 'override poll promote to front page option',\n 'roles' => array(\n '0' => 'scholar admin',\n ),\n );\n\n // Exported permission: override poll published option\n $permissions[] = array(\n 'name' => 'override poll published option',\n 'roles' => array(\n '0' => 'scholar admin',\n ),\n );\n\n // Exported permission: override poll revision option\n $permissions[] = array(\n 'name' => 'override poll revision option',\n 'roles' => array(),\n );\n\n // Exported permission: override poll sticky option\n $permissions[] = array(\n 'name' => 'override poll sticky option',\n 'roles' => array(\n '0' => 'scholar admin',\n ),\n );\n\n // Exported permission: vote on polls\n $permissions[] = array(\n 'name' => 'vote on polls',\n 'roles' => array(\n '0' => 'anonymous user',\n '1' => 'authenticated user',\n ),\n );\n\n return $permissions;\n}", "public function run()\n {\n //\n\n $permissions = [\n ['id' => '1', 'name' => 'admin.system', 'sort' => '10', 'parent_id' => '0', 'icon' => 'layui-icon layui-icon-set-sm', 'cn_name' => '系统配置', 'menu_name' => '系统配置', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-12 06:44:04', 'updated_at' => '2019-09-12 07:24:31'],\n ['id' => '2', 'name' => 'admin.pemission', 'sort' => '0', 'parent_id' => '0', 'icon' => 'layui-icon layui-icon-user', 'cn_name' => '权限管理', 'menu_name' => '权限管理', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-12 06:46:08', 'updated_at' => '2019-09-12 06:46:08'],\n ['id' => '3', 'name' => 'admin.config.index', 'sort' => '0', 'parent_id' => '1', 'icon' => '', 'cn_name' => '基本配置', 'menu_name' => '基本配置', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-12 06:51:26', 'updated_at' => '2019-09-12 06:51:26'],\n ['id' => '7', 'name' => 'admin.admin.index', 'sort' => '0', 'parent_id' => '2', 'icon' => '', 'cn_name' => '管理员', 'menu_name' => '管理员', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-12 07:20:08', 'updated_at' => '2019-09-12 07:20:17'],\n ['id' => '8', 'name' => 'admin.admin.create', 'sort' => '0', 'parent_id' => '7', 'icon' => NULL, 'cn_name' => '管理员添加', 'menu_name' => '管理员添加', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '9', 'name' => 'admin.admin.edit', 'sort' => '0', 'parent_id' => '7', 'icon' => NULL, 'cn_name' => '管理员编辑', 'menu_name' => '管理员编辑', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '10', 'name' => 'admin.admin.destroy', 'sort' => '0', 'parent_id' => '7', 'icon' => NULL, 'cn_name' => '管理员删除', 'menu_name' => '管理员删除', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '11', 'name' => 'admin.admin.show', 'sort' => '0', 'parent_id' => '7', 'icon' => NULL, 'cn_name' => '管理员详情', 'menu_name' => '管理员详情', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '12', 'name' => 'admin.adminrole.index', 'sort' => '0', 'parent_id' => '2', 'icon' => '', 'cn_name' => '管理组', 'menu_name' => '管理组', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-12 07:20:52', 'updated_at' => '2019-09-12 07:22:03'],\n ['id' => '13', 'name' => 'admin.adminrole.create', 'sort' => '0', 'parent_id' => '12', 'icon' => NULL, 'cn_name' => '管理组添加', 'menu_name' => '管理组添加', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => '2019-09-12 07:22:21'],\n ['id' => '14', 'name' => 'admin.adminrole.edit', 'sort' => '0', 'parent_id' => '12', 'icon' => NULL, 'cn_name' => '管理组编辑', 'menu_name' => '管理组编辑', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => '2019-09-12 07:22:11'],\n ['id' => '15', 'name' => 'admin.adminrole.destroy', 'sort' => '0', 'parent_id' => '12', 'icon' => NULL, 'cn_name' => '管理组删除', 'menu_name' => '管理组删除', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => '2019-09-12 07:22:18'],\n ['id' => '16', 'name' => 'admin.adminrole.show', 'sort' => '0', 'parent_id' => '12', 'icon' => NULL, 'cn_name' => '管理组详情', 'menu_name' => '管理组详情', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => '2019-09-12 07:22:14'],\n ['id' => '17', 'name' => 'admin.adminpermission.index', 'sort' => '0', 'parent_id' => '2', 'icon' => '', 'cn_name' => '权限规则', 'menu_name' => '权限规则', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-12 07:21:53', 'updated_at' => '2019-09-12 07:26:33'],\n ['id' => '18', 'name' => 'admin.adminpermission.create', 'sort' => '0', 'parent_id' => '17', 'icon' => NULL, 'cn_name' => '权限规则添加', 'menu_name' => '权限规则添加', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '19', 'name' => 'admin.adminpermission.edit', 'sort' => '0', 'parent_id' => '17', 'icon' => NULL, 'cn_name' => '权限规则编辑', 'menu_name' => '权限规则编辑', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '20', 'name' => 'admin.adminpermission.destroy', 'sort' => '0', 'parent_id' => '17', 'icon' => NULL, 'cn_name' => '权限规则删除', 'menu_name' => '权限规则删除', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '21', 'name' => 'admin.adminpermission.show', 'sort' => '0', 'parent_id' => '17', 'icon' => NULL, 'cn_name' => '权限规则详情', 'menu_name' => '权限规则详情', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '22', 'name' => 'admin.adminlog.index', 'sort' => '0', 'parent_id' => '2', 'icon' => '', 'cn_name' => '操作日志', 'menu_name' => '操作日志', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-12 07:23:01', 'updated_at' => '2019-09-12 07:23:06'],\n ['id' => '23', 'name' => 'admin.other', 'sort' => '0', 'parent_id' => '0', 'icon' => '', 'cn_name' => '其他', 'menu_name' => '其他', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-12 08:28:38', 'updated_at' => '2019-09-12 08:28:38'],\n ['id' => '24', 'name' => 'admin.icon', 'sort' => '0', 'parent_id' => '23', 'icon' => '', 'cn_name' => '图标选择器', 'menu_name' => '图标选择器', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-12 08:29:01', 'updated_at' => '2019-09-12 08:29:01'],\n ['id' => '25', 'name' => 'admin.upload', 'sort' => '0', 'parent_id' => '23', 'icon' => '', 'cn_name' => '文件上传', 'menu_name' => '文件上传', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-12 08:29:34', 'updated_at' => '2019-09-12 08:29:34'],\n ['id' => '26', 'name' => 'admin.admin.password', 'sort' => '0', 'parent_id' => '7', 'icon' => '', 'cn_name' => '修改自己密码', 'menu_name' => '修改自己密码', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-12 08:33:46', 'updated_at' => '2019-09-12 08:33:46'],\n ['id' => '27', 'name' => 'admin.plugin.index', 'sort' => '0', 'parent_id' => '0', 'icon' => NULL, 'cn_name' => '插件管理', 'menu_name' => '插件管理', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-20 03:31:51', 'updated_at' => '2019-09-20 03:31:51'],\n ['id' => '28', 'name' => 'admin.plugin.create', 'sort' => '0', 'parent_id' => '27', 'icon' => NULL, 'cn_name' => '插件管理添加', 'menu_name' => '插件管理添加', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '29', 'name' => 'admin.plugin.edit', 'sort' => '0', 'parent_id' => '27', 'icon' => NULL, 'cn_name' => '插件管理编辑', 'menu_name' => '插件管理编辑', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '30', 'name' => 'admin.plugin.destroy', 'sort' => '0', 'parent_id' => '27', 'icon' => NULL, 'cn_name' => '插件管理删除', 'menu_name' => '插件管理删除', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '31', 'name' => 'admin.plugin.show', 'sort' => '0', 'parent_id' => '27', 'icon' => NULL, 'cn_name' => '插件管理详情', 'menu_name' => '插件管理详情', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => NULL, 'updated_at' => NULL],\n ['id' => '32', 'name' => 'admin.plugin.install', 'sort' => '0', 'parent_id' => '27', 'icon' => '', 'cn_name' => '插件安装', 'menu_name' => '插件安装', 'menu_show' => '1', 'guard_name' => 'admin', 'created_at' => '2019-09-20 03:32:44', 'updated_at' => '2019-09-20 03:32:44']\n ];\n\n DB::table('permissions')->insert($permissions);\n\n $admins = [\n ['id' => '1', 'nickname' => '超级管理员', 'thumb' => '', 'account' => 'kongqi', 'session_token' => '2uKZYdXMapsmUvTCvqbNin4yNCbOpGvMk8LstseA', 'password' => bcrypt('kongqi1688'), 'email' => NULL, 'qq' => NULL, 'weixin' => NULL, 'github' => NULL, 'mobile' => NULL, 'is_checked' => '1', 'is_root' => '1', 'last_ip' => '127.0.0.1', 'login_numbers' => '3', 'remember_token' => NULL, 'deleted_at' => NULL, 'created_at' => '2019-09-12 06:41:23', 'updated_at' => '2019-09-12 07:38:07']\n ];\n DB::table('admins')->insert($admins);\n\n }", "function sportal_categories()\n{\n\tglobal $context, $scripturl, $txt;\n\n\tloadTemplate('PortalCategories');\n\n\t$context['categories'] = sportal_get_categories(0, true, true);\n\n\t$context['linktree'][] = array(\n\t\t'url' => $scripturl . '?action=portal;sa=categories',\n\t\t'name' => $txt['sp-categories'],\n\t);\n\n\t$context['page_title'] = $txt['sp-categories'];\n\t$context['sub_template'] = 'view_categories';\n}", "public function getPermissionConfig()\n {\n return [\n 'canCreate' => $this->canCreate,\n 'canUpdate' => $this->canUpdate,\n 'canDelete' => $this->canDelete,\n 'canExport' => $this->canExport,\n 'canImport' => $this->canImport,\n 'canBulkEdit' => $this->canBulkEdit,\n 'canBulkCopy' => $this->canBulkCopy,\n 'canBulkDelete' => $this->canBulkDelete,\n 'canEditInNewWindow' => $this->canEditInNewWindow,\n ];\n }", "public function get_categories()\n {\n return ['careerfy'];\n }", "public function get_categories()\n {\n return ['careerfy'];\n }", "function get_categories()\n\t\t{\n\t\t\t$categories = $this->manage_content->getValue('vertical_navbar','menu_name');\n\t\t\treturn $categories;\n\t\t}", "static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }", "private function getPermissionsPermissions()\n {\n return [\n [\n 'name' => 'Permissions - List all permissions',\n 'description' => 'Allow to list all permissions.',\n 'slug' => PermissionsPolicy::PERMISSION_LIST,\n ],\n [\n 'name' => 'Permissions - View a permission',\n 'description' => 'Allow to view the permission\\'s details.',\n 'slug' => PermissionsPolicy::PERMISSION_SHOW,\n ],\n [\n 'name' => 'Permissions - Update a permission',\n 'description' => 'Allow to update a permission.',\n 'slug' => PermissionsPolicy::PERMISSION_UPDATE,\n ],\n ];\n }", "public function get_categories()\n {\n return ['akash-addons'];\n }", "public function get_categories()\n {\n return ['sipsy'];\n }", "public static function getActiveCategories(){}", "public function get_categories()\n {\n return ['hsblog'];\n }", "public function get_categories() {\n return [ 'Alita-elements' ];\n }", "public function get_categories() {\n return [ 'Alita-elements' ];\n }", "public function get_categories() {\n\t\treturn [ 'kodeforest' ];\n\t}", "public function get_categories() {\n\t\treturn [ 'kodeforest' ];\n\t}", "public function getBuiltinCategories()\n {\n $result = parent::getBuiltinCategories();\n\n // allow adding of adhoc categories\n $result['readonly'] = false;\n\n return $result;\n }", "public function GetCategories()\n {\n \n \n global $PAGE;\n $output = '';\n \n \n if ($this->Is_Instructor) {\n $type = \" AND `type_instructor`=1\";\n } else {\n $type = \" AND `type_customer`=1\";\n }\n \n \n # GET THE CURRENTLY SELECTED CATEGORY\n # ============================================================================\n $default_selected_cid = ($this->Use_Common_Category) ? $this->Common_Category_Id : $this->Default_Category_Id;\n $eq_cat = (Get('eq')) ? GetEncryptQuery(Get('eq'), false) : null;\n $selected_cid = (isset($eq_cat['cid'])) ? $eq_cat['cid'] : $default_selected_cid;\n \n if ($this->Use_Common_Category) {\n $selected_common = (isset($eq_cat['special']) && $eq_cat['special'] == 'common') ? true : false;\n $selected_common = ($selected_cid == $this->Common_Category_Id) ? true : $selected_common;\n } else {\n $selected_common = ($selected_cid == $this->Common_Category_Id) ? true : false;\n }\n \n if ($this->Use_Display_All_Category) {\n $selected_all = (isset($eq_cat['special']) && $eq_cat['special'] == 'all') ? true : false;\n $selected_all = ($selected_cid == $this->All_Category_Id) ? true : $selected_all;\n }\n //$selected_all = true;\n \n \n # GET ALL THE CATEGORIES\n # ============================================================================\n $records = $this->SQL->GetArrayAll(array(\n 'table' => $GLOBALS['TABLE_helpcenter_categories'],\n 'keys' => '*',\n 'where' => \"`active`=1 $type\",\n ));\n if ($this->Show_Query) echo \"<br />LAST QUERY = \" . $this->SQL->Db_Last_Query;\n \n \n \n # OUTPUT THE CATEGORIES MENU\n # ============================================================================\n $output .= '<div class=\"orange left_header\">HELP CENTER TOPICS</div><br />';\n $output .= '<div class=\"left_content\">';\n \n # OUTPUT COMMON CATEGORY\n if ($this->Use_Common_Category) {\n $eq = EncryptQuery(\"cat=Most Common;cid=0;special=common\");\n $link = \"{$PAGE['pagelink']};eq=$eq\";\n $class = ($selected_common) ? 'faq_selected_category' : '';\n $output .= \"<div class='$class'><a href='{$link}' class='link_arrow' >Most Common</a></div><br />\";\n }\n \n # OUTPUT ALL DATABASE CATEGORIES\n foreach ($records as $record) {\n \n # MAKE LINKS\n if ($this->Use_Seo_Urls) {\n $title = ProcessStringForSeoUrl($record['title']);\n $query_link = '/' . EncryptQuery(\"cid={$record['helpcenter_categories_id']}\");\n $link = \"{$PAGE['pagelink']}/{$title}\" . $query_link;\n } else {\n $eq = EncryptQuery(\"cat={$record['title']};cid={$record['helpcenter_categories_id']}\");\n $link = \"{$PAGE['pagelink']};eq=$eq\";\n }\n \n $class = ($record['helpcenter_categories_id'] == $selected_cid) ? 'faq_selected_category' : '';\n $output .= \"<div class='$class'><a href='{$link}' class='link_arrow' >{$record['title']}</a></div>\";\n }\n \n # OUTPUT DISPLAY ALL CATEGORY\n if ($this->Use_Display_All_Category) {\n \n # MAKE LINKS\n if ($this->Use_Seo_Urls) {\n $title = ProcessStringForSeoUrl('View All');\n $query_link = '/' . EncryptQuery(\"cid={$this->All_Category_Id}\");\n $link = \"{$PAGE['pagelink']}/{$title}\" . $query_link;\n } else {\n $eq = EncryptQuery(\"cat=View All;cid={$this->All_Category_Id};special=all\");\n $link = \"{$PAGE['pagelink']};eq=$eq\";\n }\n \n $class = ($selected_all) ? 'faq_selected_category' : '';\n $output .= \"<br /><div class='$class'><a href='{$link}' class='link_arrow' >View All</a></div>\";\n }\n \n $output .= '</div>';\n \n \n AddStyle(\"\n .faq_selected_category {\n background-color:#F2935B;\n color:#fff;\n }\n \");\n \n return $output;\n \n\n }", "public function get_categories()\n\t{\n\t\treturn array('general');\n\t}", "public function get_categories() {\n return [ 'rhwow-modules' ];\n }", "public function get_categories() {\n return array ( 'general' );\n }", "public static function GetAliasControllers() {\n /******** Jan 26, 2015 ANH DUNG **********\n * @note: ex: 'childActions'=>array('NameActionAjax1', 'NameActionAjax2', 'NameActionAjax3')\n * with some action you can use: MyFormat::isAllowAccess(\"rolesAuth\", \"group\")\n */\n return array(\n \n 'UsersLandlord'=>array('alias'=>'Landlord Management',\n 'actions'=>array(\n 'Index'=>array('alias'=> Yii::t('translation', 'List'),\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'UsersAgent'=>array('alias'=>'Saleperson Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'UsersTenant'=>array('alias'=>'Tenant Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'UsersRegistered'=>array('alias'=>'Registered Users Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Proopportunity'=>array('alias'=>'Job Opportunity Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Proresume'=>array('alias'=>'Resume Management',\n 'actions'=>array(\n 'ExportResume'=>array('alias'=>'Export Resume',\n 'childActions'=>array()\n ), \n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Listing'=>array('alias'=>'Listings Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array('Extradetail', \"Managephotos\",\n 'Confrimations',\n 'Ajax_upload_photo','Ajax_upload_doc','Ajaxdelete_photo',\n 'Ajaxdelete_doc','Setdefault','Autocomplete_agent',\n )\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'AjaxDeactivate'=>array('alias'=>'Published / Unpublished',\n 'childActions'=>array('AjaxActivate')\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'BankRequest'=>array('alias'=>'Bank Evaluation Report',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Transactions'=>array('alias'=>'Transactions Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array('ViewInvoice')\n ), \n 'ApproveTransaction'=>array('alias'=>'Approve Transaction',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'AjaxGenReceipt'=>array('alias'=>'Generate Receipt',\n 'childActions'=>array()\n ),\n 'SummaryReport'=>array('alias'=>'Summary Report',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Listingcompany'=>array('alias'=>'Company Listings Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n 'UpdateTelemarketer'=>array('alias'=>'Edit Telemaketer',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Tenancy'=>array('alias'=>'Tenancies Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'Tenancies Approved',\n 'childActions'=>array()\n ), \n 'Tenancies_new'=>array('alias'=>'Tenancies New',\n 'childActions'=>array()\n ),\n 'Tenancies_draft'=>array('alias'=>'Tenancies Draft',\n 'childActions'=>array()\n ),\n 'CreateTenancy'=>array('alias'=>'Create Tenancy',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update Tenancy',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete ',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Banners'=>array('alias'=>'Banner Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Pages'=>array('alias'=>'Page Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Testimonial'=>array('alias'=>'Master Files - Testimonial Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'FloorType'=>array('alias'=>'Master Files - Floor Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Furnished'=>array('alias'=>'Master Files - Furnished Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'LeaseTerm'=>array('alias'=>'Master Files - Lease Term Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'SpecialFeatures'=>array('alias'=>'Master Files - Special Features Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Bathroom'=>array('alias'=>'Master Files - Bathroom Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'FixturesFittings'=>array('alias'=>'Master Files - Fixtures & Fitting Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'FurnishingIncluded'=>array('alias'=>'Master Files - Furnishing Included Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'OutdoorIndoorSpace'=>array('alias'=>'Master Files - Outdoor/Indoor Space Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'ProMasterHdbTown'=>array('alias'=>'Master Files - HDB Town/Estate Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Prouploaddocument'=>array('alias'=>'Master Files - Document Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Commission'=>array('alias'=>'Master Files - Commission scheme',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n// 'Create'=>array('alias'=>'Create',\n// 'childActions'=>array()\n// ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n// 'Delete'=>array('alias'=>'Delete',\n// 'childActions'=>array()\n// ),\n )\n ), /* end controller */\n \n 'Floor'=>array('alias'=>'Master Files - Floor Area Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Price'=>array('alias'=>'Master Files - Price For Sale',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'ProMasterPriceRent'=>array('alias'=>'Master Files - Price For Rent',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n \n 'ProPropertyType'=>array('alias'=>'Master Files - Property Types Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n// 'Create'=>array('alias'=>'Create',\n// 'childActions'=>array()\n// ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n// 'Delete'=>array('alias'=>'Delete',\n// 'childActions'=>array()\n// ),\n )\n ), /* end controller */\n \n \n \n 'FiInvoice'=>array('alias'=>'Financial Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'Invoices Management',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create Invoice',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update Invoice',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View Invoice',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete Invoice',\n 'childActions'=>array()\n ),\n 'GenerateReceipt'=>array('alias'=>'Generate Receipt',\n 'childActions'=>array('ViewReceipt')\n ),\n 'AccountsReceivables'=>array('alias'=>'Account Receivables Management',\n 'childActions'=>array()\n ),\n 'Paymentvouchers'=>array('alias'=>'Payment Vouchers Management',\n 'childActions'=>array('Printvoucher')\n ),\n 'Viewvoucher'=>array('alias'=>'View Voucher',\n 'childActions'=>array()\n ),\n 'Updatevoucher'=>array('alias'=>'Update Voucher',\n 'childActions'=>array()\n ),\n 'Deletevoucher'=>array('alias'=>'Delete Voucher',\n 'childActions'=>array()\n ),\n// 'Printvoucher'=>array('alias'=>'Print Voucher',\n// 'childActions'=>array()\n// ),\n 'Accountpayable'=>array('alias'=>'Account Payable Management',\n 'childActions'=>array()\n ),\n 'Report'=>array('alias'=>'Report Financial',\n 'childActions'=>array()\n ),\n 'Report_transaction'=>array('alias'=>'Report Transaction',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Subscriber'=>array('alias'=>'Subscriber Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'Subscriber-Public Management',\n 'childActions'=>array()\n ), \n 'Member'=>array('alias'=>'Subscriber-Member Management',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Newsletter'=>array('alias'=>'Newsletter Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'GlobalEnquiry'=>array('alias'=>'Global Enquiry Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n// 'Create'=>array('alias'=>'Create',\n// 'childActions'=>array()\n// ),\n// 'Update'=>array('alias'=>'Update',\n// 'childActions'=>array()\n// ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'EnquiryProperty'=>array('alias'=>'Enquiry of Property Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n// 'Create'=>array('alias'=>'Create',\n// 'childActions'=>array()\n// ),\n// 'Update'=>array('alias'=>'Update',\n// 'childActions'=>array()\n// ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'ContactUs'=>array('alias'=>'Contact Us Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n// 'Create'=>array('alias'=>'Create',\n// 'childActions'=>array()\n// ),\n// 'Update'=>array('alias'=>'Update',\n// 'childActions'=>array()\n// ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n \n \n \n /******** Jan 26, 2015 ANH DUNG ***********/\n \n );\n }", "public static function getList()\n {\n return collect([\n new Permission('control_panel_access', 'Control Panel Access', 'General'),\n new Permission('manage_users', 'Manage Users', 'ACL'),\n new Permission('manage_roles', 'Manage Roles', 'ACL'),\n new Permission('manage_permissions', 'Manage Permissions', 'ACL'),\n ]);\n }", "public function run()\n {\n $i = 0;\n\n $permissionArray[$i]['name'] = 'dashboard';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'location';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'location_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'location_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'location_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'area';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'area_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'area_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'area_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'category';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'category_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'category_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'category_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'products';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'products_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'products_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'products_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'products_show';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'request-products';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'request-products_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'request-products_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'request-products_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'request-products_show';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'shop';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'shop_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'shop_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'shop_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'shop_show';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'orders';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'orders_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'orders_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'orders_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'orders_show';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'rating';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'order-notification';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'transaction';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'collection';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'collection_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'collection_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'request-withdraw';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'request-withdraw_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'request-withdraw_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'request-withdraw_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'withdraw';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'withdraw_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'withdraw_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'administrators';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'administrators_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'administrators_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'administrators_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'administrators_show';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'customers';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'customers_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'customers_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'customers_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'customers_show';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'delivery-boys';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'delivery-boys_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'delivery-boys_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'delivery-boys_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'delivery-boys_show';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'role';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'role_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'role_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'role_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'role_show';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'shop-owner-sales-report';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'admin-commission-report';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'credit-balance-report';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'cash-on-delivery-order-balance-report';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'banner';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'banner_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'banner_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'banner_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'page';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'page_create';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'page_edit';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'page_delete';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'updates';\n $permissionArray[$i]['guard_name'] = 'web';\n\n $i++;\n $permissionArray[$i]['name'] = 'setting';\n $permissionArray[$i]['guard_name'] = 'web';\n\n Permission::insert($permissionArray);\n }", "public function findCategories();", "private function process_permission_array(Request $request, &$temp_permission){\n if($request->permission !== null){\n $checkbox_values = array_map('intval', $request->permission);\n foreach($checkbox_values as $value){\n $checkbox_values = array_map('intval', $request->permission);\n\n $temp_permission[$value] = \"1\";\n \n }\n }\n $temp_permission = implode(',',$temp_permission);\n }", "public function perms()\n {\n static $perms = array();\n\n if (!empty($perms)) {\n return $perms;\n }\n\n require_once dirname(__FILE__) . '/base.php';\n\n $perms['title']['beatnik:domains'] = _(\"Domains\");\n\n // Run through every domain\n foreach ($GLOBALS['beatnik_driver']->getDomains() as $domain) {\n $perms['tree']['beatnik']['domains'][$domain['zonename']] = false;\n $perms['title']['beatnik:domains:' . $domain['zonename']] = $domain['zonename'];\n }\n\n return $perms;\n }", "public function get_categories() {\n\t\treturn array( 'listeo' );\n\t}", "public function getCategories(Request $request)\n {\n\t\t$user = null;\n\t\t$nope = false;\n\t\t$v = \"\";\n\t\t\n\t\t$signals = $this->helpers->signals;\n\t\t$plugins = $this->helpers->getPlugins();\n\t\t#$this->helpers->populateTips();\n $cpt = ['user','signals','plugins'];\n\t\t\t\t\n\t\tif(Auth::check())\n\t\t{\n\t\t\t\n\t\t\t$user = Auth::user();\n\t\t\t\n\t\t\tif($this->helpers->isAdmin($user))\n\t\t\t{\n\t\t\t\t$hasPermission = $this->helpers->hasPermission($user->id,['view_tickets']);\n\t\t\t\t#dd($hasPermission);\n\t\t\t\t$req = $request->all();\n\t\t\t\t\n\t\t\t\tif($hasPermission)\n\t\t\t\t{\n\t\t\t\t$v = \"categories\";\n\t\t\t\t$req = $request->all();\n $categories = $this->helpers->getCategories();\n\t\t\t\t#dd($categories);\n array_push($cpt,'categories');\n }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsession()->flash(\"permissions-status-error\",\"ok\");\n\t\t\t\t\treturn redirect()->intended('/');\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAuth::logout();\n\t\t\t\t$u = url('/');\n\t\t\t\treturn redirect()->intended($u);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$v = \"login\";\n\t\t}\n\t\treturn view($v,compact($cpt));\n }", "public function getAllCategories();", "public function renderManageCategories()\n\t{\n\t\t// Check access\n\t\tif (! $this->user->isInRole('admin'))\n\t\t{\n\t\t\tthrow new ForbiddenRequestException('Nemáte oprávnění');\n\t\t}\n\t\t$database = $this->context->database;\n\t\t$this->template->categories = $database->table(\"WritingCategories\");\n\t}", "public function getCategoryAccessData()\n\t{\n\t\treturn $this->categoryAccess;\n\t}", "public static function defaultList() {\n\t\t// Super User\n\t\t$super_user = false;\n\n\t\tif( auth()->check() )\n\t\t\t$super_user = auth()->user()->username == \\Constant::SUPER_USER || auth()->user()->username == 'aldrin';\n\t\t\t#$super_user = true;\n\n\t\t// Menu Container\n\t\t$menu = [];\n\n\t\t// Dashboard\n\t\t$menu['dashboard'] = [\n\t\t\t'url' \t=> URL::to('/'),\n\t\t\t'title'\t=> 'Dashboard',\n\t\t\t'icon'\t=>'fa fa-dashboard fa-lg',\n\t\t];\n\n\t\t// Consulting\n\t\t$menu['consulting'] = [\n\t\t\t'url'\t\t=> '',\n\t\t\t'title'\t\t=> 'Consulting',\n\t\t\t'icon'\t\t=>'fa fa-coffee fa-lg',\n\t\t\t'sub_menu'\t=> []\n\t\t];\n\n\t\t// Main Category Group\n\t\t/*$menu['consulting']['sub_menu']['main_category_group'] = array(\n\t\t\t\t'url' \t=> URL::to('main_category_group'),\n\t\t\t\t'title' => 'Category Groups',\n\t\t);*/\n\n\t\t// Company Group\n\t\t$menu['consulting']['sub_menu']['company_group'] = [\n\t\t\t'url' \t=> URL::to('company_group'),\n\t\t\t'title'\t=> 'Company Groups',\n\t\t];\n\n\t\t// Company\n\t\t$menu['consulting']['sub_menu']['company'] = [\n\t\t\t'url' \t=> URL::to('company'),\n\t\t\t'title'\t=> 'Companies',\n\t\t];\n\n\t\t// Company Branches\n\t\t$menu['consulting']['sub_menu']['company_branch'] = [\n\t\t\t\t'url' \t=> URL::to('company_branch'),\n\t\t\t\t'title'\t=> 'Company Branches',\n\t\t];\n\n\t\t// Announcement\n\t\t/*$menu['consulting']['sub_menu']['announcement'] = array(\n\t\t\t\t'url' => URL::to('announcement'),\n\t\t\t\t'title' => 'Announcement',\n\t\t);*/\n\n\t\t#################### CATEGORY ####################\n\t\t$menu['category'] = [\n\t\t\t'url'\t\t=> '',\n\t\t\t'title'\t\t=> 'Category',\n\t\t\t'icon'\t\t=>'fa fa-bars fa-lg',\n\t\t\t'sub_menu'\t=> []\n\t\t];\n\n\t\t// Main Category\n\t\t$menu['category']['sub_menu']['main_category'] = [\n\t\t\t'url' \t=> URL::to('main_category'),\n\t\t\t'title'\t=> 'Categories',\n\t\t];\n\n\t\t// Sub Category\n\t\t$menu['category']['sub_menu']['category'] = [\n\t\t\t'url' \t=> URL::to('category'),\n\t\t\t'title'\t=> 'Sub Categories',\n\t\t];\n\n\t\t// Manufacturer\n\t\t$menu['category']['sub_menu']['manufacturer'] = [\n\t\t\t'url' \t=> URL::to('manufacturer'),\n\t\t\t'title'\t=> 'Brands',\n\t\t];\n\n\t\t// Merchants\n\t\t$menu['category']['sub_menu']['vendor'] = [\n\t\t\t'url' \t=> URL::to('vendor'),\n\t\t\t'title'\t=> 'Merchants',\n\t\t];\n\n\t\t// Payment\n\t\t/*$menu['category']['sub_menu']['payment'] = array(\n\t\t\t\t'url' \t=> URL::to('payment'),\n\t\t\t\t'title' => 'Payments',\n\t\t);*/\n\t\t\n\t\t// Merchant Branch\n\t\t/*$menu['category']['sub_menu']['vendor_branch'] = array(\n\t\t\t\t'url' \t=> URL::to('vendor_branch'),\n\t\t\t\t'title' => 'Merchant Branches',\n\t\t);*/\n\t\t\n\t\t// Merchant Product\n\t\t/*$menu['category']['sub_menu']['merchant_product'] = array(\n\t\t\t\t'url' \t=> URL::to('merchant_product'),\n\t\t\t\t'title' => 'Merchant Product Inventory',\n\t\t);*/\t\n\n\t\t// Product\n\t\t$menu['category']['sub_menu']['product'] = [\n\t\t\t'url' \t=> URL::to('product'),\n\t\t\t'title'\t=> 'Products',\n\t\t];\n\n\t\t// Group\n\t\t$menu['category']['sub_menu']['group'] = [\n\t\t\t'url' \t=> URL::to('group'),\n\t\t\t'title'\t=> 'Product Groups',\n\t\t];\n\n\t\t// Upload\n\t\t$menu['category']['sub_menu']['upload'] = [\n\t\t\t'url' \t=> URL::to('upload'),\n\t\t\t'title'\t=> 'Data Uploads',\n\t\t];\n\n\t\t// Upload\n\t\t$menu['category']['sub_menu']['upload/images/s3'] = [\n\t\t\t'url' \t=> URL::to('upload/images/s3'),\n\t\t\t'title'\t=> 'Images Uploads',\n\t\t];\n\n\t\t// Featured Category\n\t\t$menu['category']['sub_menu']['featured_category'] = [\n\t\t\t'url' \t=> URL::to('featured_category'),\n\t\t\t'title'\t=> 'Featured Categories',\n\t\t];\n\n\t\t// Company Featured Category\n\t\t$menu['category']['sub_menu']['company_featured_category'] = [\n\t\t\t'url' \t=> URL::to('company_featured_category'),\n\t\t\t'title'\t=> 'Company Featured Categories',\n\t\t];\n\n\t\t// Export\n\t\t$menu['category']['sub_menu']['export'] = [\n\t\t\t'url' \t=> URL::to('export'),\n\t\t\t'title'\t=> 'Export',\n\t\t];\n\n\t\t// Company Featured Category\n\t\t/*$menu['category']['sub_menu']['vendor_list'] = array(\n\t\t\t\t'url' \t=> URL::to('vendor_list'),\n\t\t\t\t'title' => 'Merchant List',\n\t\t);*/\n\n\t\t// Supply Chain\n\t\t$menu['supply_chain'] = [\n\t\t\t'url' \t\t=> '',\n\t\t\t'title'\t\t=> 'Supply Chain',\n\t\t\t'icon'\t\t=>'fa fa-chain fa-lg',\n\t\t\t'sub_menu'\t=> []\n\t\t];\n\n\t\t// Size\n\t\t$menu['supply_chain']['sub_menu']['size'] = [\n\t\t\t'url' \t=> URL::to('size'),\n\t\t\t'title'\t=> 'Product Classifications',\n\t\t];\n\n\t\t// Size Delivery\n\t\t$menu['supply_chain']['sub_menu']['size_delivery'] = [\n\t\t\t'url' \t=> URL::to('size_delivery'),\n\t\t\t'title'\t=> 'Product Deliveries',\n\t\t];\n\n\t\t// Volume Matrix\n\t\t$menu['supply_chain']['sub_menu']['volume_matrix'] = [\n\t\t\t'url' \t=> URL::to('volume_matrix'),\n\t\t\t'title'\t=> 'Volume Matrix',\n\t\t];\n\n\t\t// Cities\n\t\t$menu['supply_chain']['sub_menu']['regions'] = [\n\t\t\t'url' \t=> URL::to('regions'),\n\t\t\t'title'\t=> 'Regions',\n\t\t];\n\n\t\t$menu['supply_chain']['sub_menu']['cities'] = [\n\t\t\t'url' \t=> URL::to('cities'),\n\t\t\t'title'\t=> 'Cities',\n\t\t];\n\t\t// Blog\n\t\t/*$menu['blog'] = array(\n\t\t\t\t'url' \t=> '',\n\t\t\t\t'title' => 'Blog',\n\t\t\t\t'icon'\t=>'fa fa-inbox fa-lg',\n\t\t\t\t'sub_menu' => []\n\t\t);\n\t\t\n\t\t// Post\n\t\t$menu['blog']['sub_menu']['blog_post'] = array(\n\t\t\t\t'url' => URL::to('blog_post'),\n\t\t\t\t'title' => 'Posts',\n\t\t);\n\t\t// comment\n\t\t$menu['blog']['sub_menu']['blog_comment'] = array(\n\t\t\t\t'url' => URL::to('blog_comment'),\n\t\t\t\t'title' => 'Comments',\n\t\t);\n\t\t// Category\n\t\t$menu['blog']['sub_menu']['blog_category'] = array(\n\t\t\t\t'url' => URL::to('blog_category'),\n\t\t\t\t'title' => 'Categories',\n\t\t);*/\n\t\t\n\t\t\n\t\t#################### Merchant Approvals - Bebe ####################\n\t\t/*$menu['approvals'] = array(\n\t\t\t\t'url' \t=> '',\n\t\t\t\t'title' => 'Approvals',\n\t\t\t\t'icon'\t=>'fa fa-gavel fa-lg',\n\t\t\t\t'sub_menu' => []\n\t\t);\n\n\t\t$menu['approvals']['sub_menu']['merchant_product_new'] = array(\n\t\t\t\t'url' \t=> URL::to('merchant_product_new'),\n\t\t\t\t'title' => 'New Product Proposals',\n\t\t);\n\n\t\t$menu['approvals']['sub_menu']['product_quantity'] = array(\n\t\t\t\t'url' \t=> URL::to('product_quantity'),\n\t\t\t\t'title' => 'Product Inventory Updates',\n\t\t);\n\n\t\t$menu['approvals']['sub_menu']['merchant_product_price_history'] = array(\n\t\t\t\t'url' \t=> URL::to('merchant_product_price_history'),\n\t\t\t\t'title' => 'Product Prices Updates',\n\t\t);\n\t\t\n\t\t$menu['approvals']['sub_menu']['changes_batch'] = array(\n\t\t\t\t'url' \t=> URL::to('changes_batch'),\n\t\t\t\t'title' => 'Changes Log',\n\t\t);\n\n\t\t\n\t\t// System\n\t\t$menu['system'] = array(\n\t\t\t\t'url' \t=> '',\n\t\t\t\t'title' => 'System',\n\t\t\t\t'icon'\t=>'fa fa-gear fa-lg',\n\t\t\t\t'sub_menu' => []\n\t\t);\n\t\t\n\t\t// User\n\t\t$menu['system']['sub_menu']['user'] = array(\n\t\t\t\t'url' \t=> URL::to('user'),\n\t\t\t\t'title' => 'System User',\n\t\t);\n\t\t\n\t\tif( $super_user ) {\n\t\t\t// User Group\n\t\t\t$menu['system']['sub_menu']['user_group'] = array(\n\t\t\t\t\t'url' \t=> URL::to('user_group'),\n\t\t\t\t\t'title' => 'System User Group',\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Currency system\n\t\t$menu['system']['sub_menu']['currency'] = array(\n\t\t\t\t'url' \t=> URL::to('currency'),\n\t\t\t\t'title' => 'Currency',\n\t\t);\n\t\t\n\t\t// Payment system\n\t\t$menu['system']['sub_menu']['payment'] = array(\n\t\t\t\t'url' \t=> URL::to('payment'),\n\t\t\t\t'title' => 'Payment',\n\t\t);\n\t\t\n\t\t\n\t\t// Company\n\t\t$menu['system']['sub_menu']['company'] = array(\n\t\t\t\t'url' \t=> URL::to('company'),\n\t\t\t\t'title' => 'Companies',\n\t\t);\n\t\t\n\t\t// City\n\t\t$menu['system']['sub_menu']['city'] = array(\n\t\t\t\t'url' \t=> URL::to('city'),\n\t\t\t\t'title' => 'Cities',\n\t\t);\t\t\n\t\t\n\t\t// Wallet\n\t\t$menu['system']['sub_menu']['wallet'] = array(\n\t\t\t\t'url' \t=> URL::to('wallet'),\n\t\t\t\t'title' => 'Wallets',\n\t\t);*/\n\t\t\t\t\n\t\t\n\t\t// Manage Permissions\n\t\t#dd(\\Permission::getAll(auth()->user()->INTERNAL_GROUP_id));\n\t\t/*foreach( $menu as $key1=>$row) {\n\t\t\t$ctr = 0;\n\t\t\tif( !empty($row['sub_menu']) ) {\n\t\t\t\tforeach( $row['sub_menu'] as $key2=>$sm ){\n\n\t\t\t\t\tif( ! \\Permission::check( $key2, 'read' ) && !$super_user) {\n\t\t\t\t\t\tunset( $menu[$key1]['sub_menu'][$key2]);\n\t\t\t\t\t\t$ctr++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $ctr == count($row['sub_menu']) )\n\t\t\t\t\tunset($menu[$key1]);\n\t\t\t}\n\t\t}*/\n\n\t\t// Return Menus\n\t\treturn $menu;\n\t}", "public function getAdminPermissions(): array;", "public static function permissions(): array\n {\n return [];\n }", "public static function menu()\n {\n if (Auth::check()) {\n if (Auth::user()->admin) {\n return [\n 'dashboard' => [\n 'icon' => 'home',\n 'route_name' => 'admin',\n 'params' => [\n 'layout' => 'side-menu'\n ],\n 'title' => 'Dashboard'\n ],\n 'teams' => [\n 'icon' => 'star',\n 'route_name' => 'admin.teams',\n 'params' => [\n 'layout' => 'side-menu'\n ],\n 'title' => 'Teams'\n ],\n 'article' => [\n 'icon' => 'airplay',\n 'route_name' => 'admin.article',\n 'params' => [\n 'layout' => 'side-menu'\n ],\n 'title' => 'Artikel',\n 'extends' => [\n 'admin.article.create',\n 'admin.article.edit',\n 'admin.article.detail',\n ]\n ],\n\n 'devider',\n 'soal' => [\n 'icon' => 'book-open',\n 'route_name' => 'admin.question.category',\n 'params' => null,\n 'title' => 'Soal',\n 'extends' => [\n 'admin.question.category.create',\n 'admin.question.category.edit',\n 'admin.question',\n 'admin.question.create',\n 'admin.question.edit',\n 'admin.question.answer',\n 'admin.question.edit',\n 'admin.question.result',\n ]\n ],\n\n 'devider',\n 'users' => [\n 'icon' => 'users',\n 'title' => 'Users',\n 'route_name' => 'admin.user',\n 'params' => null,\n 'extends' => [\n 'admin.user.show',\n 'admin.user.create',\n 'admin.user.edit',\n ],\n ],\n 'kontak' => [\n 'icon' => 'phone',\n 'route_name' => 'admin.contact',\n 'params' => [\n 'layout' => 'side-menu'\n ],\n 'title' => 'Kontak'\n ],\n ];\n } else {\n return [\n 'dashboard' => [\n 'icon' => 'home',\n 'route_name' => 'member',\n 'params' => null,\n 'title' => 'Dashboard'\n ],\n 'test' => [\n 'icon' => 'file-text',\n 'title' => 'Test',\n 'params' => null,\n 'route_name' => 'member.test',\n 'extends' => [\n 'member.test.start',\n ],\n ],\n 'devider',\n 'riwayat' => [\n 'icon' => 'file',\n 'route_name' => 'member.history',\n 'params' => null,\n 'title' => 'Riwayat',\n 'extends' => [\n 'member.history.test',\n ],\n\n ],\n ];\n }\n }\n return [];\n }", "public function getCategory(Request $request)\n {\n\t\t$user = null;\n\t\t$nope = false;\n\t\t$v = \"\";\n\t\t\n\t\t$signals = $this->helpers->signals;\n\t\t$plugins = $this->helpers->getPlugins();\n\t\t$permissions = $this->helpers->permissions;\n\t\t#$this->helpers->populateTips();\n $cpt = ['user','signals','plugins'];\n\t\t\t\t\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$user = Auth::user();\n\t\t\t\n\t\t\tif($this->helpers->isAdmin($user))\n\t\t\t{\n\t\t\t\t$hasPermission = $this->helpers->hasPermission($user->id,['view_tickets','edit_tickets']);\n\t\t\t\t#dd($hasPermission);\n\t\t\t\t$req = $request->all();\n\t\t\t\t\n\t\t\t\tif($hasPermission)\n\t\t\t\t{\n \n\t\t\t\tif(isset($req['xf']))\n\t\t\t\t{\n\t\t\t\t\t$v = \"category\";\n\t\t\t\t\t$c = $this->helpers->getCategory($req['xf']);\n\t\t\t\t\t#dd($c);\n\t\t\t\t\tif(count($c) < 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsession()->flash(\"validation-status-error\",\"ok\");\n\t\t\t\t\t\treturn redirect()->intended('categories');\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$categories = $this->helpers->getCategories();\n\t\t\t\t\t\tarray_push($cpt,'c'); \n\t\t\t\t\t\tarray_push($cpt,'categories'); \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsession()->flash(\"validation-status-error\",\"ok\");\n\t\t\t\t\treturn redirect()->intended('categories');\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsession()->flash(\"permissions-status-error\",\"ok\");\n\t\t\t\t\treturn redirect()->intended('/');\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAuth::logout();\n\t\t\t\t$u = url('/');\n\t\t\t\treturn redirect()->intended($u);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$v = \"login\";\n\t\t}\n\t\treturn view($v,compact($cpt));\n }", "private function renderMapRoutePathCatRelations()\n {\n $arrReturn = array();\n $rowsRelation = array();\n\n // Example\n // $relation[0]['PATH:tx_route_path->tx_route_path_cat->listOf.uid' => '2.8';\n // '2.8' is a relation like\n // tx_route_path.uid -> tx_route_path_cat.uid\n //\n\n // Get the PATH relations (each element with a prefix PATH - see example above)\n $relations = $this->renderMapRouteRelations( 'PATH' );\n//$this->pObj->dev_var_dump( $relations );\n // Get the key of a relation\n $relationKey = key( $relations[ 0 ] );\n\n // Get the lables for the tables path and pathCat\n list( $prefix, $tables ) = explode( ':', $relationKey );\n unset( $prefix );\n list( $tablePath, $tableCat ) = explode( '->', $tables );\n // Get the lables for the tables path and pathCat\n // LOOP relations\n foreach ( $relations as $relation )\n {\n // LOOP relation\n foreach ( $relation as $tablePathCat )\n {\n $arrTablePathCat = explode( $this->catDevider, $tablePathCat );\n // SWITCH : children\n switch ( true )\n {\n // CASE : children\n case( count( $arrTablePathCat ) > 1 ):\n // LOOP children\n foreach ( $arrTablePathCat as $tablePathCatChildren )\n {\n list( $pathUid, $catUid ) = explode( '.', $tablePathCatChildren );\n if ( $pathUid != null )\n {\n $rowsRelation[ $pathUid ][] = $catUid;\n $rowsRelation[ $pathUid ] = array_unique( $rowsRelation[ $pathUid ] );\n }\n }\n // LOOP children\n break;\n // CASE : children\n // CASE : no children\n case( count( $arrTablePathCat ) == 1 ):\n default:\n list( $pathUid, $catUid ) = explode( '.', $tablePathCat );\n if ( $pathUid != null )\n {\n $rowsRelation[ $pathUid ][] = $catUid;\n $rowsRelation[ $pathUid ] = array_unique( $rowsRelation[ $pathUid ] );\n }\n break;\n // CASE : no children\n }\n // SWITCH : children\n }\n // LOOP relation\n }\n // LOOP relations\n // $rowsRelation will look like:\n // array(\n // 2 => array( 8 ),\n // 1 => array( 7 ),\n // )\n // array(\n // tablePath.uid => array ( tableCat.uid, tableCat.uid, tableCat.uid ),\n // tablePath.uid => array ( tableCat.uid, tableCat.uid, tableCat.uid ),\n // )\n//$this->pObj->dev_var_dump( $rowsRelation );\n $arrReturn[ 'rowsRelation' ] = $rowsRelation;\n $arrReturn[ 'tableCat' ] = $tableCat;\n $arrReturn[ 'tablePath' ] = $tablePath;\n\n // DRS\n if ( $this->pObj->b_drs_map )\n {\n $prompt = var_export( $rowsRelation, true );\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n\n return $arrReturn;\n }", "private static function allPermission()\n {\n $status = false;\n self::$ignore_classes = explode(\",\", config('spatie-permission-generate.ignore_classes_files') ?? '');\n self::$ignore_methods_and_functions = explode(\",\", config('spatie-permission-generate.ignore_methods_and_functions') ?? '');\n self::$controller_classes_suffixes = explode(\",\", config('spatie-permission-generate.controller_classes_suffixes') ?? 'Controller');\n self::$default_guard = config('spatie-permission-generate.default_guard');\n\n foreach (self::classList() as $class_item) {\n\n $path = base_path(config('spatie-permission-generate.controllers_root_path'));\n $path = explode('/', $path);\n $path = $path[count($path) - 1];\n\n\n $class = explode($path . '\\\\', $class_item);\n $class = $class[count($class) - 1];\n if (\n !in_array($class, self::$ignore_classes ?? [])\n ) {\n\n $methods = self::get_this_class_methods($class_item);\n foreach ($methods as $method_name) {\n if (\n !in_array($method_name, self::$ignore_methods_and_functions) &&\n substr($method_name, 0, 3) != \"___\" // Para egnorar methods que iniciam cm ___\n ) {\n $class_name = '';\n foreach (self::$controller_classes_suffixes as $suffix) {\n $class_name = str_replace($suffix, '', $class);\n }\n\n $permission_name = strtolower(str_replace('\\\\', '-', $class_name . '-' . $method_name));\n if (!Permission::where('name', $permission_name)->first()) {\n $permission = Permission::create([\n 'name' => $permission_name,\n 'guard_name' => self::$default_guard,\n ]);\n if ($permission) {\n $status = true;\n }\n }\n }\n }\n }\n }\n\n\n return $status;\n }", "public function get_categories() {\n\t\treturn array( 'general' );\n\t}", "public function getListPermission()\n { \n $permissions = Permission::orderBy('id', 'desc');\n \n return Datatables::of($permissions)\n ->addIndexColumn()\n ->editColumn('description', function($permissions){\n if (Entrust::can([\"permissions-detail\"])) {\n return '<a onclick=\"viewDetail('.$permissions->id.');\" class=\"btn btn-xs btn-info\" title=\"Xem chi tiết\" data-tooltip=\"tooltip\"><i class=\"fa fa-eye\" aria-hidden=\"true\"></i></a>';\n } else {\n return null;\n }\n })\n ->editColumn('created_at', function($permissions){\n $time = $permissions->created_at;\n $time_numb = strtotime($time);\n\n return date(\"H:i | d-m-Y\", $time_numb);\n })\n ->addColumn('action', function($permissions){\n $string = '';\n\n if (Entrust::can([\"permissions-manager\"])) {\n $string = $string .'<a class=\"btn btn-xs yellow\" onclick=\"showEdit('.$permissions->id.');\" title=\"Chỉnh sửa\" data-tooltip=\"tooltip\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></a>';\n }\n\n return $string;\n })\n ->rawColumns(['action', 'description'])\n ->make(true);\n \n }", "public static function impliedPermissions() {\n return [\n self::PERMISSION_READ => [self::PERMISSION_WRITE, self::PERMISSION_ADMIN],\n self::PERMISSION_WRITE => [self::PERMISSION_ADMIN],\n ];\n }", "protected function getAllowedCategories($field)\n\t{\n\t\t$app = Factory::getApplication();\n\t\t$user = Factory::getUser();\n\n\t\t// categories scope parameters\n\t\t$use_cat_acl = $field->parameters->get('use_cat_acl', 1);\n\t\t$method_cat = $field->parameters->get('method_cat', 1);\n\t\t$usesubcats = $field->parameters->get('usesubcats', 0);\n\n\t\t$catids = $field->parameters->get('catids');\n\t\tif (empty($catids)) $catids = array();\n\t\telse if (!is_array($catids)) $catids = !FLEXI_J16GE ? array($catids) : explode(\"|\", $catids);\n\n\n\t\t// ***\n\t\t// *** Get & check Global category related permissions\n\t\t// ***\n\n\t\trequire_once(JPATH_ROOT . DS . 'components' . DS . 'com_flexicontent' . DS . 'helpers' . DS . 'permission.php');\n\t\t$viewallcats = FlexicontentHelperPerm::getPerm()->ViewAllCats;\n\n\n\t\t// ***\n\t\t// *** Calculate categories to use for retrieving the items\n\t\t// ***\n\n\t\t$allowed_cats = $disallowed_cats = false;\n\n\t\t// Get user allowed categories\n\t\t$usercats = $use_cat_acl && !$viewallcats ?\n\t\t\tFlexicontentHelperPerm::getAllowedCats($user, $actions_allowed = array('core.create', 'core.edit', 'core.edit.own'), $require_all = false, $check_published = true) :\n\t\t\tFlexicontentHelperPerm::returnAllCats($check_published = true, $specific_catids = null);\n\n\t\t// Find (if configured) , descendants of the categories\n\t\tif ($usesubcats)\n\t\t{\n\t\t\tglobal $globalcats;\n\t\t\t$_catids = array();\n\t\t\tforeach ($catids as $catid)\n\t\t\t{\n\t\t\t\t$subcats = $globalcats[$catid]->descendantsarray;\n\t\t\t\tforeach ($subcats as $subcat) $_catids[(int) $subcat] = 1;\n\t\t\t}\n\t\t\t$catids = array_keys($_catids);\n\t\t}\n\n\n\t\t// ***\n\t\t// *** Decided allowed categories according to method of CATEGORY SCOPE\n\t\t// ***\n\n\t\t// Include method\n\t\tif ($method_cat == 3)\n\t\t{\n\t\t\t$allowed = array_intersect($usercats, $catids);\n\n\t\t\treturn $allowed;\n\t\t}\n\n\t\t// Exclude method\n\t\telse if ($method_cat == 2)\n\t\t{\n\t\t\t$allowed = array_diff($usercats, $catids);\n\n\t\t\treturn $allowed;\n\t\t}\n\n\t\t// Neither INCLUDE / nor EXCLUDE method, return all user 's allowed categories\n\t\telse\n\t\t{\n\t\t\treturn $usercats;\n\t\t}\n\t}", "public static function permissionLabels()\n {\n return [];\n }", "public function getPermissionArrayAttribute()\n {\n return json_to_array($this->permission);\n }", "public function authorize()\n {\n return PerfilPermissao::AcessoAction('CATEGORIAS');\n }", "public function convensionInit() {\n return [\n// 'Admin' => 'All',\n// 'Customer' => 'actionname',\n// 'Performer' => 'actionname2',\n// 'Guest' => 'actionname-toLogin actionname2-toLogin',\n ];\n }", "public function providePermissions()\n {\n return [\n 'REFUND_PAYMENTS' => [\n 'name' => _t('SilverStripe\\Omnipay\\Model\\Payment.PERMISSION_REFUND_PAYMENTS', 'Refund payments'),\n 'help' => _t(\n 'SilverStripe\\Omnipay\\Model\\Payment.PERMISSION_REFUND_PAYMENTS_HELP',\n 'Allow refunding of captured payments'\n ),\n 'category' => _t('SilverStripe\\Omnipay\\Model\\Payment.PAYMENT_PERMISSIONS', 'Payment actions'),\n 'sort' => 200\n ],\n 'CAPTURE_PAYMENTS' => [\n 'name' => _t('SilverStripe\\Omnipay\\Model\\Payment.PERMISSION_CAPTURE_PAYMENTS', 'Capture payments'),\n 'help' => _t(\n 'SilverStripe\\Omnipay\\Model\\Payment.PERMISSION_CAPTURE_PAYMENTS_HELP',\n 'Allow capturing of authorized payments'\n ),\n 'category' => _t('SilverStripe\\Omnipay\\Model\\Payment.PAYMENT_PERMISSIONS', 'Payment actions'),\n 'sort' => 200\n ],\n 'VOID_PAYMENTS' => [\n 'name' => _t('SilverStripe\\Omnipay\\Model\\Payment.PERMISSION_VOID_PAYMENTS', 'Void payments'),\n 'help' => _t(\n 'SilverStripe\\Omnipay\\Model\\Payment.PERMISSION_VOID_PAYMENTS_HELP',\n 'Allow voiding of authorized payments'\n ),\n 'category' => _t('SilverStripe\\Omnipay\\Model\\Payment.PAYMENT_PERMISSIONS', 'Payment actions'),\n 'sort' => 200\n ]\n ];\n }", "protected function getPermission(){\n if(Session::getKey(\"loggedIn\")):\n $userPermissions = array();\n $userPermission = Session::getKey(\"level\");\n if($userPermission[0]) { // tiene permiso para crear\n $userPermissions[] = \"create\";\n }\n if($userPermission[1]) { // tiene permiso para crear\n $userPermissions[] = \"read\";\n }\n if($userPermission[2]) { // tiene permiso para crear\n $userPermissions[] = \"update\";\n }\n if($userPermission[3]) { // tiene permiso para crear\n $userPermissions[] = \"delete\";\n }\n return $userPermissions; \n else:\n return false;\n endif;\n }", "public function run()\n {\n \tDB::table(\"permissions\")->truncate();\n \t\n DB::table(\"permissions\")->insert( [\n\t\t'id'=>1,\n\t\t'key'=>'browse_admin',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>2,\n\t\t'key'=>'browse_bread',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>3,\n\t\t'key'=>'browse_database',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>4,\n\t\t'key'=>'browse_media',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>5,\n\t\t'key'=>'browse_compass',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>6,\n\t\t'key'=>'browse_menus',\n\t\t'table_name'=>'menus',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>7,\n\t\t'key'=>'read_menus',\n\t\t'table_name'=>'menus',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>8,\n\t\t'key'=>'edit_menus',\n\t\t'table_name'=>'menus',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>9,\n\t\t'key'=>'add_menus',\n\t\t'table_name'=>'menus',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>10,\n\t\t'key'=>'delete_menus',\n\t\t'table_name'=>'menus',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>11,\n\t\t'key'=>'browse_roles',\n\t\t'table_name'=>'roles',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>12,\n\t\t'key'=>'read_roles',\n\t\t'table_name'=>'roles',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>13,\n\t\t'key'=>'edit_roles',\n\t\t'table_name'=>'roles',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>14,\n\t\t'key'=>'add_roles',\n\t\t'table_name'=>'roles',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>15,\n\t\t'key'=>'delete_roles',\n\t\t'table_name'=>'roles',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>16,\n\t\t'key'=>'browse_users',\n\t\t'table_name'=>'users',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>17,\n\t\t'key'=>'read_users',\n\t\t'table_name'=>'users',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>18,\n\t\t'key'=>'edit_users',\n\t\t'table_name'=>'users',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>19,\n\t\t'key'=>'add_users',\n\t\t'table_name'=>'users',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>20,\n\t\t'key'=>'delete_users',\n\t\t'table_name'=>'users',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>21,\n\t\t'key'=>'browse_settings',\n\t\t'table_name'=>'settings',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>22,\n\t\t'key'=>'read_settings',\n\t\t'table_name'=>'settings',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>23,\n\t\t'key'=>'edit_settings',\n\t\t'table_name'=>'settings',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>24,\n\t\t'key'=>'add_settings',\n\t\t'table_name'=>'settings',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>25,\n\t\t'key'=>'delete_settings',\n\t\t'table_name'=>'settings',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>26,\n\t\t'key'=>'browse_hooks',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:42',\n\t\t'updated_at'=>'2019-02-11 14:24:42'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>27,\n\t\t'key'=>'browse_articles',\n\t\t'table_name'=>'articles',\n\t\t'created_at'=>'2019-02-11 14:49:57',\n\t\t'updated_at'=>'2019-02-11 14:49:57'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>28,\n\t\t'key'=>'read_articles',\n\t\t'table_name'=>'articles',\n\t\t'created_at'=>'2019-02-11 14:49:57',\n\t\t'updated_at'=>'2019-02-11 14:49:57'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>29,\n\t\t'key'=>'edit_articles',\n\t\t'table_name'=>'articles',\n\t\t'created_at'=>'2019-02-11 14:49:57',\n\t\t'updated_at'=>'2019-02-11 14:49:57'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>30,\n\t\t'key'=>'add_articles',\n\t\t'table_name'=>'articles',\n\t\t'created_at'=>'2019-02-11 14:49:57',\n\t\t'updated_at'=>'2019-02-11 14:49:57'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>31,\n\t\t'key'=>'delete_articles',\n\t\t'table_name'=>'articles',\n\t\t'created_at'=>'2019-02-11 14:49:57',\n\t\t'updated_at'=>'2019-02-11 14:49:57'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>32,\n\t\t'key'=>'browse_cgys',\n\t\t'table_name'=>'cgys',\n\t\t'created_at'=>'2019-02-11 14:50:46',\n\t\t'updated_at'=>'2019-02-11 14:50:46'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>33,\n\t\t'key'=>'read_cgys',\n\t\t'table_name'=>'cgys',\n\t\t'created_at'=>'2019-02-11 14:50:46',\n\t\t'updated_at'=>'2019-02-11 14:50:46'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>34,\n\t\t'key'=>'edit_cgys',\n\t\t'table_name'=>'cgys',\n\t\t'created_at'=>'2019-02-11 14:50:46',\n\t\t'updated_at'=>'2019-02-11 14:50:46'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>35,\n\t\t'key'=>'add_cgys',\n\t\t'table_name'=>'cgys',\n\t\t'created_at'=>'2019-02-11 14:50:46',\n\t\t'updated_at'=>'2019-02-11 14:50:46'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>36,\n\t\t'key'=>'delete_cgys',\n\t\t'table_name'=>'cgys',\n\t\t'created_at'=>'2019-02-11 14:50:46',\n\t\t'updated_at'=>'2019-02-11 14:50:46'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>37,\n\t\t'key'=>'browse_comments',\n\t\t'table_name'=>'comments',\n\t\t'created_at'=>'2019-02-11 14:52:14',\n\t\t'updated_at'=>'2019-02-11 14:52:14'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>38,\n\t\t'key'=>'read_comments',\n\t\t'table_name'=>'comments',\n\t\t'created_at'=>'2019-02-11 14:52:14',\n\t\t'updated_at'=>'2019-02-11 14:52:14'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>39,\n\t\t'key'=>'edit_comments',\n\t\t'table_name'=>'comments',\n\t\t'created_at'=>'2019-02-11 14:52:14',\n\t\t'updated_at'=>'2019-02-11 14:52:14'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>40,\n\t\t'key'=>'add_comments',\n\t\t'table_name'=>'comments',\n\t\t'created_at'=>'2019-02-11 14:52:14',\n\t\t'updated_at'=>'2019-02-11 14:52:14'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>41,\n\t\t'key'=>'delete_comments',\n\t\t'table_name'=>'comments',\n\t\t'created_at'=>'2019-02-11 14:52:14',\n\t\t'updated_at'=>'2019-02-11 14:52:14'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>42,\n\t\t'key'=>'browse_contacts',\n\t\t'table_name'=>'contacts',\n\t\t'created_at'=>'2019-02-11 14:53:06',\n\t\t'updated_at'=>'2019-02-11 14:53:06'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>43,\n\t\t'key'=>'read_contacts',\n\t\t'table_name'=>'contacts',\n\t\t'created_at'=>'2019-02-11 14:53:06',\n\t\t'updated_at'=>'2019-02-11 14:53:06'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>44,\n\t\t'key'=>'edit_contacts',\n\t\t'table_name'=>'contacts',\n\t\t'created_at'=>'2019-02-11 14:53:06',\n\t\t'updated_at'=>'2019-02-11 14:53:06'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>45,\n\t\t'key'=>'add_contacts',\n\t\t'table_name'=>'contacts',\n\t\t'created_at'=>'2019-02-11 14:53:06',\n\t\t'updated_at'=>'2019-02-11 14:53:06'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>46,\n\t\t'key'=>'delete_contacts',\n\t\t'table_name'=>'contacts',\n\t\t'created_at'=>'2019-02-11 14:53:06',\n\t\t'updated_at'=>'2019-02-11 14:53:06'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>47,\n\t\t'key'=>'browse_elements',\n\t\t'table_name'=>'elements',\n\t\t'created_at'=>'2019-02-11 14:57:08',\n\t\t'updated_at'=>'2019-02-11 14:57:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>48,\n\t\t'key'=>'read_elements',\n\t\t'table_name'=>'elements',\n\t\t'created_at'=>'2019-02-11 14:57:08',\n\t\t'updated_at'=>'2019-02-11 14:57:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>49,\n\t\t'key'=>'edit_elements',\n\t\t'table_name'=>'elements',\n\t\t'created_at'=>'2019-02-11 14:57:08',\n\t\t'updated_at'=>'2019-02-11 14:57:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>50,\n\t\t'key'=>'add_elements',\n\t\t'table_name'=>'elements',\n\t\t'created_at'=>'2019-02-11 14:57:08',\n\t\t'updated_at'=>'2019-02-11 14:57:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>51,\n\t\t'key'=>'delete_elements',\n\t\t'table_name'=>'elements',\n\t\t'created_at'=>'2019-02-11 14:57:08',\n\t\t'updated_at'=>'2019-02-11 14:57:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>52,\n\t\t'key'=>'browse_medias',\n\t\t'table_name'=>'medias',\n\t\t'created_at'=>'2019-02-11 14:57:58',\n\t\t'updated_at'=>'2019-02-11 14:57:58'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>53,\n\t\t'key'=>'read_medias',\n\t\t'table_name'=>'medias',\n\t\t'created_at'=>'2019-02-11 14:57:58',\n\t\t'updated_at'=>'2019-02-11 14:57:58'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>54,\n\t\t'key'=>'edit_medias',\n\t\t'table_name'=>'medias',\n\t\t'created_at'=>'2019-02-11 14:57:58',\n\t\t'updated_at'=>'2019-02-11 14:57:58'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>55,\n\t\t'key'=>'add_medias',\n\t\t'table_name'=>'medias',\n\t\t'created_at'=>'2019-02-11 14:57:58',\n\t\t'updated_at'=>'2019-02-11 14:57:58'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>56,\n\t\t'key'=>'delete_medias',\n\t\t'table_name'=>'medias',\n\t\t'created_at'=>'2019-02-11 14:57:58',\n\t\t'updated_at'=>'2019-02-11 14:57:58'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>57,\n\t\t'key'=>'browse_partners',\n\t\t'table_name'=>'partners',\n\t\t'created_at'=>'2019-02-11 15:01:08',\n\t\t'updated_at'=>'2019-02-11 15:01:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>58,\n\t\t'key'=>'read_partners',\n\t\t'table_name'=>'partners',\n\t\t'created_at'=>'2019-02-11 15:01:08',\n\t\t'updated_at'=>'2019-02-11 15:01:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>59,\n\t\t'key'=>'edit_partners',\n\t\t'table_name'=>'partners',\n\t\t'created_at'=>'2019-02-11 15:01:08',\n\t\t'updated_at'=>'2019-02-11 15:01:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>60,\n\t\t'key'=>'add_partners',\n\t\t'table_name'=>'partners',\n\t\t'created_at'=>'2019-02-11 15:01:08',\n\t\t'updated_at'=>'2019-02-11 15:01:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>61,\n\t\t'key'=>'delete_partners',\n\t\t'table_name'=>'partners',\n\t\t'created_at'=>'2019-02-11 15:01:08',\n\t\t'updated_at'=>'2019-02-11 15:01:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>62,\n\t\t'key'=>'browse_serials',\n\t\t'table_name'=>'serials',\n\t\t'created_at'=>'2019-02-11 15:03:26',\n\t\t'updated_at'=>'2019-02-11 15:03:26'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>63,\n\t\t'key'=>'read_serials',\n\t\t'table_name'=>'serials',\n\t\t'created_at'=>'2019-02-11 15:03:26',\n\t\t'updated_at'=>'2019-02-11 15:03:26'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>64,\n\t\t'key'=>'edit_serials',\n\t\t'table_name'=>'serials',\n\t\t'created_at'=>'2019-02-11 15:03:26',\n\t\t'updated_at'=>'2019-02-11 15:03:26'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>65,\n\t\t'key'=>'add_serials',\n\t\t'table_name'=>'serials',\n\t\t'created_at'=>'2019-02-11 15:03:26',\n\t\t'updated_at'=>'2019-02-11 15:03:26'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>66,\n\t\t'key'=>'delete_serials',\n\t\t'table_name'=>'serials',\n\t\t'created_at'=>'2019-02-11 15:03:26',\n\t\t'updated_at'=>'2019-02-11 15:03:26'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>67,\n\t\t'key'=>'browse_tags',\n\t\t'table_name'=>'tags',\n\t\t'created_at'=>'2019-02-11 15:04:01',\n\t\t'updated_at'=>'2019-02-11 15:04:01'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>68,\n\t\t'key'=>'read_tags',\n\t\t'table_name'=>'tags',\n\t\t'created_at'=>'2019-02-11 15:04:01',\n\t\t'updated_at'=>'2019-02-11 15:04:01'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>69,\n\t\t'key'=>'edit_tags',\n\t\t'table_name'=>'tags',\n\t\t'created_at'=>'2019-02-11 15:04:01',\n\t\t'updated_at'=>'2019-02-11 15:04:01'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>70,\n\t\t'key'=>'add_tags',\n\t\t'table_name'=>'tags',\n\t\t'created_at'=>'2019-02-11 15:04:01',\n\t\t'updated_at'=>'2019-02-11 15:04:01'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>71,\n\t\t'key'=>'delete_tags',\n\t\t'table_name'=>'tags',\n\t\t'created_at'=>'2019-02-11 15:04:01',\n\t\t'updated_at'=>'2019-02-11 15:04:01'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>72,\n\t\t'key'=>'browse_orders',\n\t\t'table_name'=>'orders',\n\t\t'created_at'=>'2019-02-16 13:38:07',\n\t\t'updated_at'=>'2019-02-16 13:38:07'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>73,\n\t\t'key'=>'read_orders',\n\t\t'table_name'=>'orders',\n\t\t'created_at'=>'2019-02-16 13:38:07',\n\t\t'updated_at'=>'2019-02-16 13:38:07'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>74,\n\t\t'key'=>'edit_orders',\n\t\t'table_name'=>'orders',\n\t\t'created_at'=>'2019-02-16 13:38:07',\n\t\t'updated_at'=>'2019-02-16 13:38:07'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>75,\n\t\t'key'=>'add_orders',\n\t\t'table_name'=>'orders',\n\t\t'created_at'=>'2019-02-16 13:38:07',\n\t\t'updated_at'=>'2019-02-16 13:38:07'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>76,\n\t\t'key'=>'delete_orders',\n\t\t'table_name'=>'orders',\n\t\t'created_at'=>'2019-02-16 13:38:07',\n\t\t'updated_at'=>'2019-02-16 13:38:07'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>77,\n\t\t'key'=>'browse_consolidations',\n\t\t'table_name'=>'consolidations',\n\t\t'created_at'=>'2019-02-23 06:15:34',\n\t\t'updated_at'=>'2019-02-23 06:15:34'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>78,\n\t\t'key'=>'read_consolidations',\n\t\t'table_name'=>'consolidations',\n\t\t'created_at'=>'2019-02-23 06:15:34',\n\t\t'updated_at'=>'2019-02-23 06:15:34'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>79,\n\t\t'key'=>'edit_consolidations',\n\t\t'table_name'=>'consolidations',\n\t\t'created_at'=>'2019-02-23 06:15:34',\n\t\t'updated_at'=>'2019-02-23 06:15:34'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>80,\n\t\t'key'=>'add_consolidations',\n\t\t'table_name'=>'consolidations',\n\t\t'created_at'=>'2019-02-23 06:15:34',\n\t\t'updated_at'=>'2019-02-23 06:15:34'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>81,\n\t\t'key'=>'delete_consolidations',\n\t\t'table_name'=>'consolidations',\n\t\t'created_at'=>'2019-02-23 06:15:34',\n\t\t'updated_at'=>'2019-02-23 06:15:34'\n\t\t] );\n\n\n }", "public function getCategories()\n {\n return $this->request(\"core_course_get_categories\");\n }", "function setup_cat()\n {\n $this->ipsclass->DB->simple_construct( array( \"select\" => 'perms_view, def_view, id, name', 'from' => 'gallery_categories', 'where' => \"id={$this->ipsclass->input['cat']}\" ) );\n $this->ipsclass->DB->simple_exec(); \n $cat = $this->ipsclass->DB->fetch_row();\n\n // Are we allowed to view this category?\n if( ! $this->ipsclass->check_perms( $cat['perms_view'] ) )\n {\n $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); \n }\n\n return $cat;\n }", "public function run()\r\n {\r\n\t\tDB::table('permissions')->truncate();\r\n\t\t$permissions = [\r\n\t\t\t['module' => 'dashboard','name' => 'revenue_dashboard','description' => 'Can view Revenu Dashboard'],\r\n\t\t\t['module' => 'dashboard','name' => 'projects_tasks_dashboard','description' => 'Can view projects and tasks who\\'s belongs to in Dashboard'],\r\n\t\t\t['module' => 'dashboard','name' => 'all_projects_tasks_dashboard','description' => 'Can view all projects and tasks in Dashboard'],\r\n\t\t\t['module' => 'dashboard','name' => 'belongs_projects_tasks_dashboard','description' => 'Can view projects and tasks who\\'s belongs to in Dashboard'],\r\n\t\t\t['module' => 'members','name' => 'view_members','description' => 'Can view all members data'],\r\n\t\t\t['module' => 'members','name' => 'invite_members','description' => 'Can invite members by Email'],\r\n\t\t\t['module' => 'offers','name' => 'view_offers','description' => 'Can view all company offer'],\r\n\t\t\t['module' => 'offers','name' => 'create_offers','description' => 'Can create offers'],\r\n\t\t\t['module' => 'offers','name' => 'edit_offers','description' => 'Can mark offer as opened or closed'],\r\n\t\t\t['module' => 'offers','name' => 'delete_offers','description' => 'Can delete offers'],\r\n\t\t\t['module' => 'candidates','name' => 'view_candidates','description' => 'Can view all applicants'],\r\n\t\t\t['module' => 'candidates','name' => 'view_resumes_candidates','description' => 'Can view resumes of applicants'],\r\n\t\t\t['module' => 'candidates','name' => 'view_informations_candidates','description' => 'Can view all informations of applicants'],\r\n\t\t\t['module' => 'candidates','name' => 'delete_candidates','description' => 'Can delete applicants'],\r\n\t\t\t['module' => 'payroll','name' => 'view_payments','description' => 'Can view payments'],\r\n\t\t\t['module' => 'payroll','name' => 'schedule_payments','description' => 'Can schedule payments'],\r\n\t\t\t['module' => 'projects','name' => 'view_projects','description' => 'Can view list of projects, teams and members '],\r\n\t\t\t['module' => 'projects','name' => 'edit_projects','description' => 'Can edit project informations (client, teams)'],\r\n\t\t\t['module' => 'projects','name' => 'create_projects','description' => 'Can create new project'],\r\n\t\t\t['module' => 'teams','name' => 'view_teams','description' => 'Can view list of teams and members'],\r\n\t\t\t['module' => 'teams','name' => 'edit_teams','description' => 'Can edit team informations (team leads, team members)'],\r\n\t\t\t['module' => 'teams','name' => 'create_teams','description' => 'Can create new teams'],\r\n\t\t\t['module' => 'timeoffs','name' => 'create_policies','description' => 'Can create new policies for time-offs and holidays'],\r\n\t\t\t['module' => 'timeoffs','name' => 'view_timeoffs','description' => 'Can view list of time-offs'],\r\n\t\t\t['module' => 'timeoffs','name' => 'request_timeoffs','description' => 'Can request time-offs'],\r\n\t\t\t['module' => 'timeoffs','name' => 'approve_timeoffs','description' => 'Can approve, cancel or delete time-offs'],\r\n\t\t\t['module' => 'schedules','name' => 'view_schedules','description' => 'Can view list of schedules'],\r\n\t\t\t['module' => 'schedules','name' => 'view_belongs_schedules','description' => 'Can view own schedules only'],\r\n\t\t\t['module' => 'schedules','name' => 'create_schedules','description' => 'Can create schedules'],\r\n\t\t\t['module' => 'tasks','name' => 'create_boards','description' => 'Can create boards for projects'],\r\n\t\t\t['module' => 'tasks','name' => 'view_belongs_boards','description' => 'Can view belonging boards only'],\r\n\t\t\t['module' => 'tasks','name' => 'view_all_boards','description' => 'Can view all boards'],\r\n\t\t\t['module' => 'tasks','name' => 'view_all_boards','description' => 'Can view all boards'],\r\n\t\t\t['module' => 'tasks','name' => 'create_lists','description' => 'Can create Task lists'],\r\n\t\t\t['module' => 'tasks','name' => 'create_cards','description' => 'Can create cards (tasks)'],\r\n\t\t\t['module' => 'tasks','name' => 'edit_cards','description' => 'Can edit cards (assign members, change due date, attach files...)'],\r\n\t\t\t['module' => 'tasks','name' => 'remove_cards','description' => 'Can remove cards'],\r\n\t\t\t['module' => 'invoices','name' => 'view_invoices','description' => 'Can view list invoice'],\r\n\t\t\t['module' => 'invoices','name' => 'create_invoices','description' => 'Can create invoices'],\r\n\t\t\t['module' => 'invoices','name' => 'create_invoices','description' => 'Can create invoices'],\r\n\t\t\t['module' => 'invoices','name' => 'edit_invoices','description' => 'Can edit invoices'],\r\n\t\t\t['module' => 'screenshots','name' => 'view_invoices','description' => 'Can monitor members via screenshots'],\r\n\t\t\t['module' => 'apps','name' => 'view_apps','description' => 'Can monitor members via apps'],\r\n\t\t\t['module' => 'apps','name' => 'view_urls','description' => 'Can monitor members via urls'],\r\n\t\t\t['module' => 'clients','name' => 'view_clients','description' => 'Can view list of clients'],\r\n\t\t\t['module' => 'clients','name' => 'create_clients','description' => 'Can create new clients'],\r\n\t\t\t['module' => 'clients','name' => 'edit_clients','description' => 'Can edit clients informations'],\r\n\t\t\t['module' => 'permissions','name' => 'edit_permissions','description' => 'Can edit roles and permissions'],\r\n\t\t\t['module' => 'settings','name' => 'edit_settings','description' => 'Can edit settings of organization']\r\n\t\t];\r\n\t\tDB::table('permissions')->insert($permissions);\r\n\r\n }", "function getPermissions() {\n\t\t$permissions = array();\n\t\t//everyone gets permission to log in and out\n\t\t$permissions[]='users:logout';\n\t\t$permissions[]='users:login';\n\t\t//Import the User Model so we can build up the permission cache\n\t\tApp::import('Model', 'User');\n\t\t$thisUser = new User;\n\t\t//Now bring in the current users full record along with groups\n\t\t$thisRoles = $thisUser->find(array('User.id' => $this->Auth->user('id')));\n\t\t$thisRoles = $thisRoles['Role'];\n\t\tforeach($thisRoles as $thisRole) {\n\t\t\t$thisPermissions = $thisUser->Role->find(array('Role.id' => $thisRole['id']));\n\t\t\t$thisPermissions = $thisPermissions['Permission'];\n\t\t\tforeach($thisPermissions as $thisPermission) {\n\t\t\t\t$permissions[] = $thisPermission['name'];\n\t\t\t}\n\t\t}\n\t\treturn $permissions;\n\t}", "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'milo.food.some_permission' => [\n 'tab' => 'Food',\n 'label' => 'Some permission'\n ],\n ];\n }", "public function accessRules(){// правила доступа к ресурсам контроллера\n $f=array();\n if(!Yii::app()->user->getState('sup')){\n $f=$this->ActionsForUser(__CLASS__);\n }\n return array(\n array('allow', // список разрешений\n 'actions'=>$f,\n 'users'=>array(Yii::app()->user->id),\n ),\n array('deny', // список запрещений\n 'users'=>array('*','$'),\n ),\n );\n }", "public function run()\n {\n \n\n \\DB::table('admin_permissions')->delete();\n \n \\DB::table('admin_permissions')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'name' => '所有权限(All)',\n 'slug' => '*',\n 'http_method' => '',\n 'http_path' => '*',\n 'created_at' => NULL,\n 'updated_at' => '2020-07-31 09:43:51',\n ),\n 1 => \n array (\n 'id' => 2,\n 'name' => '首页',\n 'slug' => 'dashboard',\n 'http_method' => 'GET',\n 'http_path' => '/',\n 'created_at' => NULL,\n 'updated_at' => '2020-07-31 09:43:58',\n ),\n 2 => \n array (\n 'id' => 3,\n 'name' => '登录',\n 'slug' => 'auth.login',\n 'http_method' => '',\n 'http_path' => '/auth/login\n/auth/logout',\n 'created_at' => NULL,\n 'updated_at' => '2020-07-31 09:44:05',\n ),\n 3 => \n array (\n 'id' => 4,\n 'name' => '管理员管理',\n 'slug' => 'auth.setting',\n 'http_method' => 'GET,PUT',\n 'http_path' => '/auth/setting\n/auth/users*',\n 'created_at' => NULL,\n 'updated_at' => '2020-08-10 13:40:05',\n ),\n 4 => \n array (\n 'id' => 5,\n 'name' => '权限管理',\n 'slug' => 'auth.management',\n 'http_method' => '',\n 'http_path' => '/auth/roles*\n/auth/permissions*\n/auth/menu*\n/auth/logs*',\n 'created_at' => NULL,\n 'updated_at' => '2020-07-31 10:05:12',\n ),\n 5 => \n array (\n 'id' => 6,\n 'name' => '日志',\n 'slug' => 'ext.log-viewer',\n 'http_method' => '',\n 'http_path' => '/logs*',\n 'created_at' => '2020-06-13 09:17:41',\n 'updated_at' => '2020-07-31 09:44:38',\n ),\n 6 => \n array (\n 'id' => 7,\n 'name' => 'PHP info',\n 'slug' => 'ext.php-info',\n 'http_method' => 'GET',\n 'http_path' => '/phpinfo',\n 'created_at' => '2020-06-13 10:15:06',\n 'updated_at' => '2020-06-13 10:15:47',\n ),\n 7 => \n array (\n 'id' => 8,\n 'name' => 'ComposerViewer',\n 'slug' => 'ext.compoer-viewer',\n 'http_method' => 'GET',\n 'http_path' => '/composer-viewer',\n 'created_at' => '2020-06-13 10:27:09',\n 'updated_at' => '2020-06-13 10:27:09',\n ),\n 8 => \n array (\n 'id' => 9,\n 'name' => 'EnvManager',\n 'slug' => 'ext.env-manager',\n 'http_method' => 'GET',\n 'http_path' => '/env-manager',\n 'created_at' => '2020-06-13 10:27:43',\n 'updated_at' => '2020-06-13 10:27:43',\n ),\n 9 => \n array (\n 'id' => 10,\n 'name' => 'Media manager',\n 'slug' => 'ext.media-manager',\n 'http_method' => '',\n 'http_path' => '/media*',\n 'created_at' => '2020-06-13 12:20:21',\n 'updated_at' => '2020-06-13 12:20:21',\n ),\n 10 => \n array (\n 'id' => 11,\n 'name' => 'Admin helpers',\n 'slug' => 'ext.helpers',\n 'http_method' => '',\n 'http_path' => '/helpers/*',\n 'created_at' => '2020-06-13 12:33:14',\n 'updated_at' => '2020-06-13 12:33:14',\n ),\n 11 => \n array (\n 'id' => 13,\n 'name' => 'Scheduling',\n 'slug' => 'ext.scheduling',\n 'http_method' => '',\n 'http_path' => '/scheduling*',\n 'created_at' => '2020-06-13 13:42:09',\n 'updated_at' => '2020-06-13 13:42:09',\n ),\n ));\n \n \n }", "public function & GetPermissions ();", "public function permissions()\n\t{\n\t\treturn $this->get('permissions');\n\t}", "public function getCategoriesForListView(): Collection;", "function filtering_menus()\n\t{\n\t\tif ( ! $this->cp->allowed_group('can_access_content'))\n\t\t{\n\t\t\tshow_error($this->lang->line('unauthorized_access'));\n\t\t}\n\n\t\t// In order to build our filtering options we need to gather \n\t\t// all the channels, categories and custom statuses\n\n\t\t$channel_array\t= array();\n\t\t$status_array = array();\n\t\t\n\t\t$this->api->instantiate('channel_categories');\n\n\t\t$allowed_channels = $this->functions->fetch_assigned_channels(TRUE);\n\n\t\tif (count($allowed_channels) > 0)\n\t\t{\n\t\t\t// Fetch channel titles\n\t\t\t$this->db->select('channel_title, channel_id, cat_group, status_group, field_group');\n\t\t\t$this->db->where_in('channel_id', $allowed_channels);\n\t\t\t$this->db->where('site_id', $this->config->item('site_id'));\n\t\t\t\n\t\t\t$this->db->order_by('channel_title');\n\t\t\t$query = $this->db->get('channels');\n\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$channel_array[$row['channel_id']] = array(str_replace('\"','',$row['channel_title']), $row['cat_group'], $row['status_group'], $row['field_group']);\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t/** ----------------------------- \n\t\t/** Category Tree\n\t\t/** -----------------------------*/\n\t\t\n\t\t$order = ($this->nest_categories == 'y') ? 'group_id, parent_id, cat_name' : 'cat_name';\n\n\t\t$this->db->select('categories.group_id, categories.parent_id, categories.cat_id, categories.cat_name');\n\t\t$this->db->from('categories');\n\t\t$this->db->where('site_id', $this->config->item('site_id'));\n\t\t$this->db->order_by($order);\n\t\t\n\t\t$query = $this->db->get();\n\n\t\t// Load the text helper\n\t\t$this->load->helper('text');\n\t\t\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$categories[] = array($row['group_id'], $row['cat_id'], entities_to_ascii($row['cat_name']), $row['parent_id']);\n\t\t\t}\n\n\t\t\tif ($this->nest_categories == 'y')\n\t\t\t{\n\t\t\t\tforeach($categories as $key => $val)\n\t\t\t\t{\n\t\t\t\t\tif (0 == $val['3']) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->api_channel_categories->cat_array[] = array($val['0'], $val['1'], $val['2']);\n\t\t\t\t\t\t$this->api_channel_categories->category_edit_subtree($val['1'], $categories, $depth=1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->api_channel_categories->cat_array = $categories;\n\t\t\t}\n\t\t} \n\t\t \n\t\t/** ----------------------------- \n\t\t/** Entry Statuses\n\t\t/** -----------------------------*/\n\t\t\n\t\t$this->db->select('group_id, status');\n\t\t$this->db->where('site_id', $this->config->item('site_id'));\t\t\n\t\t$this->db->order_by('status_order');\n\t\t$query = $this->db->get('statuses');\n\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$status_array[] = array($row['group_id'], $row['status']);\n\t\t\t}\n\t\t}\n\n\t\t$default_cats[] = array('', $this->lang->line('filter_by_category'));\n\t\t$default_cats[] = array('all', $this->lang->line('all'));\n\t\t$default_cats[] = array('none', $this->lang->line('none'));\t\t\n\t\t\n\t\t$dstatuses[] = array('', $this->lang->line('filter_by_status'));\n\t\t$dstatuses[] = array('open', $this->lang->line('open'));\n\t\t$dstatuses[] = array('closed', $this->lang->line('closed'));\n\n\t\t$channel_info['0']['categories'] = $default_cats;\t\t\n\t\t$channel_info['0']['statuses'] = $dstatuses;\n\n\t\tforeach ($channel_array as $key => $val)\n\t\t{\n\t\t\t$any = 0;\n\t\t\t$cats = $default_cats;\n\t\n\t\t\tif (count($this->api_channel_categories->cat_array) > 0)\n\t\t\t{\n\t\t\t\t$last_group = 0;\n\t\t\n\t\t\t\tforeach ($this->api_channel_categories->cat_array as $k => $v)\n\t\t\t\t{\n\t\t\t\t\tif (in_array($v['0'], explode('|', $val['1'])))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($last_group == 0 OR $last_group != $v['0'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cats[] = array('', '-------');\n\t\t\t\t\t\t\t$last_group = $v['0'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$cats[] = array($v['1'], $v['2']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$channel_info[$key]['categories'] = $cats;\n\t\t\t\n\t\t\t$statuses = array();\n\t\t\t$statuses[] = array('', $this->lang->line('filter_by_status'));\n\n\t\t\tif (count($status_array) > 0)\n\t\t\t{\n\t\t\t\tforeach ($status_array as $k => $v)\n\t\t\t\t{\n\t\t\t\t\tif ($v['0'] == $val['2'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$status_name = ($v['1'] == 'closed' OR $v['1'] == 'open') ? $this->lang->line($v['1']) : $v['1'];\n\t\t\t\t\t\t$statuses[] = array($v['1'], $status_name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$statuses[] = array('open', $this->lang->line('open'));\n\t\t\t\t$statuses[] = array('closed', $this->lang->line('closed'));\n\t\t\t}\n\n\t\t\t$channel_info[$key]['statuses'] = $statuses;\n\t\t}\n\n\t\t$this->javascript->set_global('edit.channelInfo', $channel_info);\n\t}", "protected function properties()\n {\n return [\n 'title' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__TITLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Title'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__title'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__TITLE'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__IMPORT => false,\n C__PROPERTY__PROVIDES__EXPORT => false,\n C__PROPERTY__PROVIDES__REPORT => false\n ]\n ]\n ),\n 'type' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__TYPE',\n C__PROPERTY__INFO__DESCRIPTION => 'Type'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__isys_net_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_net_type',\n 'isys_net_type__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__TYPE',\n C__PROPERTY__UI__PARAMS => [\n 'p_bDisabled' => '1',\n 'p_strTable' => 'isys_net_type',\n 'p_bDbFieldNN' => '1'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'address' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Net'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__NET_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_bReadonly' => '',\n 'p_strClass' => 'input input-mini'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'netmask' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__MASK',\n C__PROPERTY__INFO__DESCRIPTION => 'Netmask'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__mask'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__MASK_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input input-mini',\n 'p_bReadonly' => ''\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'gateway' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DEF_GW',\n C__PROPERTY__INFO__DESCRIPTION => 'Default Gateway'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__isys_catg_ip_list__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DEF_GW_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_s_net',\n 'callback_property_gateway'\n ]\n )\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_gateway'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'range_from' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__ADDRESS_FROM',\n C__PROPERTY__INFO__DESCRIPTION => 'DHCP from'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address_range_from'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__ADDRESS_RANGE_FROM'\n ]\n ]\n ),\n 'range_to' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__ADDRESS_TO',\n C__PROPERTY__INFO__DESCRIPTION => 'DHCP to'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address_range_to'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__ADDRESS_RANGE_TO'\n ]\n ]\n ),\n 'dns_server' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DNS_SERVER',\n C__PROPERTY__INFO__DESCRIPTION => 'DNS server'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_cats_net_list_2_isys_catg_ip_list',\n 'isys_cats_net_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DNS_SERVER'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_net_dns_server'\n ]\n ]\n ]\n ),\n 'dns_domain' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::multiselect(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DNS_DOMAIN',\n C__PROPERTY__INFO__DESCRIPTION => 'Domain / DNS namespace'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__id',\n C__PROPERTY__DATA__TABLE_ALIAS => 'dns_domain',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_cats_net_list_2_isys_net_dns_domain',\n 'isys_cats_net_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DNS_DOMAIN',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_net_dns_domain',\n 'placeholder' => _L('LC__CMDB__CATS__NET__DNS_DOMAIN'),\n 'emptyMessage' => _L('LC__CMDB__CATS__NET__NO_DNS_DOMAINS_FOUND'),\n 'p_onComplete' => \"idoit.callbackManager.triggerCallback('cmdb-cats-net-dns_domain-update', selected);\",\n 'multiselect' => true\n //'p_arData' => new isys_callback(array('isys_cmdb_dao_category_s_net', 'callback_property_dns_domain'))\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__VALIDATION => false,\n C__PROPERTY__PROVIDES__REPORT => false\n ],\n C__PROPERTY__CHECK => [\n C__PROPERTY__CHECK__MANDATORY => false,\n C__PROPERTY__CHECK__VALIDATION => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'dialog_multiselect'\n ]\n ]\n ]\n ),\n 'cidr_suffix' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__CIDR_SUFFIX',\n C__PROPERTY__INFO__DESCRIPTION => 'CIDR-Suffix'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__cidr_suffix'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__CIDR',\n C__PROPERTY__UI__PARAMS => [\n 'p_bReadonly' => '',\n 'p_strClass' => 'input input-mini'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'reverse_dns' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATS__NET__REVERSE_DNS',\n C__PROPERTY__INFO__DESCRIPTION => 'Reverse dns'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__reverse_dns'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__REVERSE_DNS'\n ]\n ]\n ),\n 'layer2_assignments' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__LAYER2_NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Layer-2-net assignments'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_obj__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__LAYER2',\n C__PROPERTY__UI__PARAMS => [\n isys_popup_browser_object_ng::C__TITLE => 'LC__BROWSER__TITLE__NET',\n isys_popup_browser_object_ng::C__MULTISELECTION => true,\n isys_popup_browser_object_ng::C__CAT_FILTER => 'C__CATS__LAYER2_NET'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'layer_2_assignments'\n ]\n ]\n ]\n ),\n 'address_v6' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::virtual(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Net v6'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__NET_V6'\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_SPECIFIC . C__CATS__NET\n ]\n ]\n )\n ];\n }", "public function setPrivilages()\n {\n // $this->acl->allow('guest',null, array('view', 'index'));\n // $this->acl->allow('editor',array('view','edit'));\n // $this->acl->allow('admin');\n \n // Setting privilages for actions as per particular controller\n // $this->acl->allow('<role>','<controller>', <array of controller actions>);\n // You can also fetch it from DB.\n \n// // $this->acl->deny('guest','news', 'index');\n// $this->acl->allow('guest','news', array( 'demo1', 'view', 'index'));\n// $this->acl->allow('guest','job-board', array('index'));\n//\n// $this->acl->allow('editor','news', array( 'edit', 'view', 'index')); \n// $this->acl->allow('editor','job-board', array('edit', 'index'));\n//\n// $this->acl->allow('admin');\n //$this->acl->allow('guest');\n //Guest ACL\n $this->acl->deny('guest',array('user','shop','admin'));\n $this->acl->allow('guest','index');\n \n //User ACL\n $this->acl->deny('user',array('shop','admin'));\n $this->acl->allow('user','user');\n $this->acl->allow('user','index',array('logout','notfound'));\n \n \n // Shop ACL\n $this->acl->deny('shop',array('user','admin'));\n $this->acl->allow('shop',array('index','shop'));\n \n //Admin ACL\n //$this->acl->deny('admin',array('user','shop'));\n //$this->acl->allow('admin',array('index','admin'));\n $this->acl->allow('admin');\n // Note that the actions which are not mentioned above i.e. inside array of\n // controller-action - becomes access-denied automatically\n // as in above example, news controller also have one more action demo2,\n // but demo2 is not mentioned in above allow actions, so \n // when guest tries to access the action - demo2, it would not show the \n // content of demo2, rather It would show content of error/index.phtml\n }", "public static function createMenu(){\n $perms = Security::getPermsFromConnectedUser() ?? [];\n\n $menuData = self::$_menuData;\n\n $actualUri = self::$_actualUri;\n $menuListBuilder = [];\n $html = '';\n foreach ($menuData as $link => $data) {\n if (!empty($data['menuData'])){\n //TODO : check the min-status\n if ($data['menuData']['visible'] \n && (\n array_key_exists(\"all_perms\", $perms) \n || array_key_exists($link, $perms)\n || $link === '/admin/dashboard'\n || $link === '/'\n )) {\n $subSectionSelected = false;\n\n //Create the sub-menu\n $htmlChildren = '';\n if (!empty($data['menuData']['children'])) {\n $htmlChildren = '<ul>';\n foreach ($data['menuData']['children'] as $id => $linkChild) {\n if (array_key_exists(\"all_perms\", $perms) \n || array_key_exists($linkChild, $perms)) {\n if ($actualUri === $linkChild) {\n $subSectionSelected = true;\n }\n $classChildren = $actualUri == $linkChild ? ' class=\"selected\"' : '';\n $htmlChildren .= '<li' . $classChildren . '><a href=\"' . $linkChild . '\">' . $menuData[$linkChild]['label'] . '</li>';\n }\n }\n $htmlChildren .= '</ul>';\n }\n\n $class = ' class=\"'\n . ($actualUri == $link ? 'selected ' : '')\n . ($subSectionSelected ? 'subChildrenSelected ' : '')\n . '\"';\n\n $html = '<li' . $class . '><a href=\"' . $link . '\">'\n . '<img src=\"' . Routing::getBaseUrl() . '/public/images/icons/' . $data['menuData']['icon'] . '.png\" alt=\"\" class=\"icon iconWhite\"><p>' . $data['label'] . '</p></a>'\n . '</a>';\n\n //Adding the sub-menu\n $html .= $htmlChildren;\n\n $html .= '</li>';\n if (array_key_exists($data['menuData']['listId'], $menuListBuilder)) {\n $menuListBuilder[$data['menuData']['listId']] .= $html;\n } else {\n $menuListBuilder[$data['menuData']['listId']] = $html;\n }\n }\n }\n }\n\n $html = '';\n foreach ($menuListBuilder as $listId => $htmlValue) {\n $html.= '<ul id=\"'.$listId.'\">'.$htmlValue.'</ul>';\n }\n\n $htmlMenu = '<nav id=\"back-mainPage-menu\" class=\"d-none d-lg-flex\">'\n . $html . '</nav>'\n . '<nav id=\"back-mainPage-menuResponsive\" class=\"d-block d-lg-none hidden\">'\n . $html . '</nav>';\n echo $htmlMenu;\n }", "public function index()\n {\n// $permissionName = 'faq';\n//\n// $permission = Permission::create(['name' => $permissionName.'.create','guard_name' => 'web', 'group_name' => $permissionName ]);\n// $permission = Permission::create(['name' => $permissionName.'.show','guard_name' => 'web', 'group_name' => $permissionName ]);\n// $permission = Permission::create(['name' => $permissionName.'.update','guard_name' => 'web', 'group_name' => $permissionName ]);\n// $permission = Permission::create(['name' => $permissionName.'.delete','guard_name' => 'web', 'group_name' => $permissionName ]);\n// $permission = Permission::create(['name' => $permissionName.'.approved','guard_name' => 'web', 'group_name' => $permissionName ]);\n// $permission = Permission::create(['name' => $permissionName.'.disapproved','guard_name' => 'web', 'group_name' => $permissionName ]);\n// $permission = Permission::create(['name' => $permissionName.'.ban','guard_name' => 'web', 'group_name' => $permissionName ]);\n\n // check authentication\n if (!Auth::user()->can('role.show')){\n abort(403,'Unauthorized Action');\n }\n\n $data['roles'] = Role::all();\n\n return view('backend.roles.index',$data);\n }", "public function registerPermissions()\n {\n return [\n 'xitara.nexus.mainmenu' => [\n 'tab' => 'Xitara Nexus',\n 'label' => 'xitara.nexus::permissions.mainmenu',\n ],\n 'xitara.nexus.settings' => [\n 'tab' => 'Xitara Nexus',\n 'label' => 'xitara.nexus::permissions.settings',\n ],\n 'xitara.nexus.dashboard' => [\n 'tab' => 'Xitara Nexus',\n 'label' => 'xitara.nexus::permissions.dashboard',\n ],\n 'xitara.nexus.menu' => [\n 'tab' => 'Xitara Nexus',\n 'label' => 'xitara.nexus::permissions.menu',\n ],\n 'xitara.nexus.custommenus' => [\n 'tab' => 'Xitara Nexus',\n 'label' => 'xitara.nexus::permissions.custommenus',\n ],\n ];\n }", "function _getNotificationSettingCategories() {\n\t\treturn array(\n\t\t\t'submissions' => array('categoryKey' => 'notification.type.submissions',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_ARTICLE_SUBMITTED, NOTIFICATION_TYPE_METADATA_MODIFIED, NOTIFICATION_TYPE_SUPP_FILE_MODIFIED)),\n\t\t\t'reviewing' => array('categoryKey' => 'notification.type.reviewing',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_REVIEWER_COMMENT, NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT, NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT)),\n\t\t\t'editing' => array('categoryKey' => 'notification.type.editing',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_GALLEY_MODIFIED, NOTIFICATION_TYPE_SUBMISSION_COMMENT, NOTIFICATION_TYPE_LAYOUT_COMMENT, NOTIFICATION_TYPE_COPYEDIT_COMMENT, NOTIFICATION_TYPE_PROOFREAD_COMMENT)),\n\t\t\t'site' => array('categoryKey' => 'notification.type.site',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_USER_COMMENT, NOTIFICATION_TYPE_PUBLISHED_ISSUE, NOTIFICATION_TYPE_NEW_ANNOUNCEMENT)),\n\t\t);\n\t}", "public function getCategory() {}" ]
[ "0.75904715", "0.6096608", "0.60560286", "0.59835404", "0.59796053", "0.5973939", "0.5953304", "0.5952189", "0.587637", "0.58674043", "0.58674043", "0.5845741", "0.58433443", "0.58433443", "0.5807611", "0.58025277", "0.5789925", "0.5789925", "0.5789925", "0.5776075", "0.5754621", "0.57231015", "0.57093793", "0.5696679", "0.5685905", "0.5685351", "0.5684355", "0.56820333", "0.5677268", "0.5666757", "0.56648207", "0.5639524", "0.5632948", "0.5630472", "0.5596477", "0.55949754", "0.5577627", "0.5577627", "0.5573707", "0.555551", "0.55490035", "0.5540259", "0.5529611", "0.5522081", "0.5517928", "0.55148137", "0.55148137", "0.55132633", "0.55132633", "0.5504857", "0.5503952", "0.5496802", "0.5481728", "0.54611313", "0.54413515", "0.5434821", "0.54347867", "0.54252595", "0.542319", "0.5421851", "0.5420779", "0.5412619", "0.54109573", "0.5409138", "0.53999543", "0.5393137", "0.5392945", "0.5387773", "0.53868365", "0.53856933", "0.538303", "0.53781486", "0.5374481", "0.53730637", "0.5372461", "0.53672403", "0.5361079", "0.5360134", "0.53434205", "0.53429633", "0.53354603", "0.53285605", "0.53285086", "0.5318924", "0.5311741", "0.530418", "0.53036636", "0.53011644", "0.529878", "0.529715", "0.52938014", "0.5291122", "0.52846146", "0.52756596", "0.52753", "0.52676946", "0.5262162", "0.5259375", "0.5259153", "0.525623", "0.525499" ]
0.0
-1
Setup the view only mode for roles
public static function listPermissions($userRole, $currentRole, $systemPage = false) { $result = []; $allRoles = RoleModel::pluck('role', 'id')->toArray(); $permissions = self::setupRoleWithPermissions($userRole, $currentRole, $systemPage)[$currentRole]; foreach ($permissions as $permission) { $details = explode('.', $permission); if(sizeof($details) == 1) { $result[$details[0]][] = trans('admin.view'); } else { if(is_numeric($details[1])) { $result[$details[0]][] = $allRoles[$details[1]]; } else { $result[$details[0]][] = trans('admin.'. $details[1]); } } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function canDisplayRolesMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_ROLE);\n\t}", "public function roles_protected() {\n return true;\n }", "public function rol_conductor_only_access()\n {\n if ($this->rol != 3) {\n exit($this->httpResponse(\"error\", \"forbbiden\", \"Your role do not have permission\", 403)->json());\n }\n }", "public function roles();", "public function roles();", "public function roles();", "public function roles();", "public function index()\n {\n // route admin to different page\n if (Sentinel::check()){\n $user = Sentinel::getUser();\n if ( !$user->inRole('Admin')){\n return view('content.profile', compact('user'));\n }\n else{\n return view('content.profileadmin', compact('user'));\n }\n}\nelse{\n return view('content.profile', compact('user'));\n}\n }", "public function testViewDenyNotAdmin() {\n\t\t$this->setExpectedException('MissingActionException');\n\t\t$userRoles = [\n\t\t\tUSER_ROLE_USER => '',\n\t\t\tUSER_ROLE_USER | USER_ROLE_SECRETARY => 'secret',\n\t\t\tUSER_ROLE_USER | USER_ROLE_HUMAN_RESOURCES => 'hr',\n\t\t];\n\t\t$opt = [\n\t\t\t'method' => 'GET',\n\t\t];\n\t\tforeach ($userRoles as $userRole => $userPrefix) {\n\t\t\t$userInfo = [\n\t\t\t\t'role' => $userRole,\n\t\t\t\t'prefix' => $userPrefix,\n\t\t\t];\n\t\t\t$this->applyUserInfo($userInfo);\n\t\t\t$this->generateMockedController();\n\t\t\t$url = [\n\t\t\t\t'controller' => 'logs',\n\t\t\t\t'action' => 'view',\n\t\t\t\t'1',\n\t\t\t];\n\t\t\tif (!empty($userPrefix)) {\n\t\t\t\t$url['prefix'] = $userPrefix;\n\t\t\t\t$url[$userPrefix] = true;\n\t\t\t}\n\t\t\t$this->testAction($url, $opt);\n\t\t\t$this->checkIsNotAuthorized();\n\t\t\t$this->checkRedirect(true);\n\t\t}\n\t}", "public function unAuthenticated_user_can_see_roles()\n {\n $response = $this->get(route('role.index'));\n $response->assertRedirect('/login');\n }", "public function getUserRole() {\n return view('backend.acl.user_role');\n }", "public function indexRoles()\n {\n\n $users = User::with('roles')\n ->whereNotIn('id', [1, auth()->user()->id])\n ->orderBy('created_at', 'asc')\n ->paginate(10);\n\n $roles = Role::all();\n\n return view('admin.roles.assign', compact('users', 'roles'));\n }", "public function getIndex(Request $request)\n{\n $request->user()->authorizeRoles(['manager']);\n\t//echo \"hi\"; exit;\n\n return view('datatables.index');\n}", "public function index()\n {\n if (!$this->user->isSignin()) {\n\n redirect('auth' . '?next=' . $this->url->currentUrl());\n\n } elseif (!$this->user->isEmailVerification()) {\n\n redirect('admin/user/settings/email' . '?next=' . $this->url->currentUrl());\n\n } elseif (!$this->user->hasPermission('users_viewUserRoles')) {\n\n $this->output->set_status_header(401);\n\n $data['title'] = 'Access denied';\n\n $this->load->view($this->preferences->type('system')->item('app_themesDir') . '/' . $this->preferences->type('system')->item('app_themeDir') . '/common/adminend/errors/access_denied', $data);\n\n } else {\n\n // Load stuff.\n $this->load->library('common/crud'); // Custom library.\n $this->load->library('common/paginator'); // Custom library.\n $this->load->model('modules/users/adminend/user_roles/user_roles_model');\n\n // Gather user roles.\n $data['userRoles'] = $this->user_roles_model->userRoles(\n // Selected fields.\n [\n // 'user roles' table.\n 'ID',\n 'roleName',\n 'roleSlug',\n 'roleDescription',\n 'data',\n 'permissionCount',\n 'state',\n\n // 'userRolesWithRelationsTable' aliased table.\n 'userCount'\n ],\n\n // Default order by field.\n 'ID',\n\n // Default order field.\n 'DESC',\n\n // Number of rows per page.\n $this->config->item('per_page'),\n\n // Search fields.\n [\n // 'user roles' table.\n 'roleName',\n 'roleSlug',\n 'roleDescription',\n 'permissionCount',\n\n // 'userRolesWithRelationsTable' aliased table.\n 'userCount'\n ],\n\n // Filter fields.\n [\n // 'user roles' table.\n 'state'\n ]\n );\n\n // Generate pagination.\n $data['pagination'] = $this->paginator->pagination(\n // First URL.\n site_url([$this->uri->segment(1), $this->uri->segment(2), $this->uri->segment(3)]) . (empty($this->input->server('QUERY_STRING', true)) ? '' : '?' . $this->input->server('QUERY_STRING', true)),\n\n // Base URL.\n site_url() . '/' . $this->uri->segment(1) . '/' . $this->uri->segment(2) . '/' . $this->uri->segment(3) . '/page/',\n\n // Total number of rows.\n $data['userRoles']->numRows,\n\n // URI segment number that captures the page number.\n 5\n );\n\n // Generate pagination meta information.\n $data['paginationInfo'] = $this->paginator->paginationInfo($data['userRoles']->numRows);\n\n // HTML document title.\n $data['title'] = 'User roles';\n\n // Load view.\n $this->load->view($this->preferences->type('system')->item('app_themesDir') . '/' . $this->preferences->type('system')->item('app_themeDir') . '/modules/users/adminend/user_roles/user_roles/user_roles', $data);\n\n }\n }", "public function indexRolesAction(){\n \n $entity = 'Jbig3\\Entity\\RolesEntity';\n $repositoryFunction = 'findAllRoles';\n $viewvar = 'roles';\n \n $repository = $this->em->getRepository($entity)->$repositoryFunction();\n $this->view->$viewvar = $repository;\n }", "public function index()\n {\n //\n return view(\"admin.role.view-all\");\n }", "public function testViewRole()\n {\n\n $item = factory(Role::class)->create();\n $response = $this->actingAs($this->makeAdmin())->get('/api/acl/roles/'.$item->id);\n $response->assertStatus(JsonResponse::HTTP_OK);\n\n\n }", "public function actionRoles()\n\t{\n\t\tYii::app()->user->rightsReturnUrl = array('authItem/roles');\n\t\t\n\t\t$dataProvider = new RAuthItemDataProvider('roles', array(\n\t\t\t'type'=>CAuthItem::TYPE_ROLE,\n\t\t\t'sortable'=>array(\n\t\t\t\t'id'=>'RightsRoleTableSort',\n\t\t\t\t'element'=>'.role-table',\n\t\t\t\t'url'=>$this->createUrl('authItem/sortable'),\n\t\t\t),\n\t\t));\n\n\t\t// Render the view\n\t\t$this->render('roles', array(\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t'isBizRuleEnabled'=>$this->module->enableBizRule,\n\t\t\t'isBizRuleDataEnabled'=>$this->module->enableBizRuleData,\n\t\t));\n\t}", "public function index()\n {\n return view(\"permission.role.index\");\n }", "public function index()\n {\n //\n return view('users.roles');\n }", "public function index()\n {\n $action_nav = array(\n \"add_new\" => array(\"title\" => '<b><i class=\"icon-diff-added\"></i></b> '.trans(\"comman.add_role\"), \"url\" => route('roles.create'), \"attributes\" => array(\"class\" => \"btn bg-success btn-labeled heading-btn\", 'title' => 'Add New')),\n );\n if (!Auth::user()->hasAccess('roles.create')) {\n unset($action_nav['add_new']);\n } \n view()->share('roles', $this->get_index(array()));\n view()->share('module_action',$action_nav);\n return view('roles.index');\n }", "public function testAdminCanViewTheRoleIndex()\n {\n $this->setupRoles();\n\n $response = $this\n ->actingAs($this->admin)\n ->get('/admin/roles');\n \n $response->assertStatus(200);\n $response->assertSee('Role1');\n $response->assertSee('Role2');\n }", "public function testAllowView()\n {\n $this->logOut();\n $viewFalse = LogEntry::create()->canView(null);\n $this->assertFalse($viewFalse);\n\n $this->logInWithPermission('ADMIN');\n $viewTrue = LogEntry::create()->canView();\n $this->assertTrue($viewTrue);\n }", "public function veterinaireDashboard()\n{\n $this->denyAccessUnlessGranted('ROLE_VETERINAIRE');\n\n // or add an optional message - seen by developers\n $this->denyAccessUnlessGranted('ROLE_VETERINAIRE', null, 'User tried to access a page without having ROLE_VETERINAIRE');\n}", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function index()\n {\n $order = [\n 'column' => 'name',\n 'direction' => 'asc'\n ];\n if (auth()->user()->can('super')) {\n $data = Role::orderBy($order['column'], $order['direction'])->paginate(env('APP_RESULTS_PER_PAGE'));\n } else {\n $data = Role::where('visible', 1)->orderBy($order['column'], $order['direction'])->paginate(env('APP_RESULTS_PER_PAGE'));\n }\n\n return view('admin.role.index', compact('data', 'order'));\n }", "function roleListing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $type = $this->login_id;\n $data['userRecords'] = $this->user_model->roleListing($type);\n\n $this->global['pageTitle'] = '角色管理';\n\n $this->loadViews(\"systemrolemanage\", $this->global, $data, NULL);\n }\n }", "public function beforeFilter() {\n parent::beforeFilter();\n\n if ($this->Auth->user('role') == 'admin') {\n \t$this->Auth->allow('index', 'add', 'edit', 'delete', 'logout');\t\n }\n elseif ($this->Auth->user('role') == 'user') {\n \t$this->Auth->allow('add', 'logout');\t\n }\n }", "public function index()\n {\n if(Auth::user()->can('list-roles')){\n $roles = Role::orderBy('id', 'DESC')->get();\n return view(\"roles.index\", compact('roles'));\n }else{\n return back()->with('error',\"Vous n'avez pas ce droit\");\n } \n }", "public function index()\n {\n $this->authorize('before', Role::class);\n $listing = Role::listing();\n $data = ['title' => 'Роли', 'listing' => $listing];\n return view('role', $data);\n }", "public function webIndex()\n {\n $data['roles'] = Role::where('guard_name','web')->paginate(10);\n $data['title'] = 'Available Roles for Web';\n\n if (View::exists('roles.index')) {\n return view('roles.index', $data);\n } else {\n return view('laravel-permission::roles.index', $data);\n }\n }", "public function index()\n {\n return view('settings.rights.role.index')->with([\n 'roles' => $this->roleRepo->getAll(),\n ]);\n }", "public function index()\n {\n $this->authorize('viewAny', Role::class);\n return Role::all();\n }", "public function __construct(){\n $this->middleware('role:super-admin|moderator')->only('index');\n }", "public function index()\n {\n //\n if(! \\App\\Checker::is_permitted('roles'))\n return \\App\\Checker::display();\n\n $roles = Role::all();\n return view('roles.index', compact('roles'));\n }", "public function role()\n {\n if ( ! auth()->guard('admin')->user()->can('access role ' . $this->table)) {\n return redirect()->route('admin.setting.index')->with('alert-danger', __($this->noPermission));\n }\n $view = [\n 'back' => route('admin.setting.index'),\n 'title' => __('Role Settings'),\n 'breadcrumbs' => [\n route('admin.setting.index') => __('Setting'),\n route('admin.setting.role.index') => __('Role'),\n null => __('Edit')\n ],\n 'subtitle' => __('All About Role Settings'),\n 'description' => __('You can adjust all role settings here'),\n 'navs' => $this->settings,\n 'setting' => $this->settings->where('slug', 'role')->first(),\n 'roles' => Role::pluck('name', 'id')->toArray(),\n ];\n return view('admin.setting.role.index', $view);\n }", "public function setDefaultViewOptions()\n\t{\n\t\tparent::setDefaultViewOptions();\n\t\t$this->viewOptions['menuView']='//layouts/_userMenu';\n\t\t$this->viewOptions['activeTab'] = \"students\";\n\t\t$model = $this->model;\n\t\tif ($model->username){\n\t\t\tif(Yii::app()->authManager->checkAccess('staff', $model->username))\n\t\t\t\t$this->viewOptions['activeTab'] = \"staff\";\n\t\t\tif (Yii::app()->authManager->checkAccess('admin', $model->username)) \n\t\t\t\t$this->viewOptions['activeTab'] = \"staff\";\n\t\t\tif (Yii::app()->authManager->checkAccess('faculty', $model->username)) \n\t\t\t\t$this->viewOptions['activeTab'] = \"faculty\";\n\t\t}\n\t}", "public function setPrivilages()\n {\n // $this->acl->allow('guest',null, array('view', 'index'));\n // $this->acl->allow('editor',array('view','edit'));\n // $this->acl->allow('admin');\n \n // Setting privilages for actions as per particular controller\n // $this->acl->allow('<role>','<controller>', <array of controller actions>);\n // You can also fetch it from DB.\n \n// // $this->acl->deny('guest','news', 'index');\n// $this->acl->allow('guest','news', array( 'demo1', 'view', 'index'));\n// $this->acl->allow('guest','job-board', array('index'));\n//\n// $this->acl->allow('editor','news', array( 'edit', 'view', 'index')); \n// $this->acl->allow('editor','job-board', array('edit', 'index'));\n//\n// $this->acl->allow('admin');\n //$this->acl->allow('guest');\n //Guest ACL\n $this->acl->deny('guest',array('user','shop','admin'));\n $this->acl->allow('guest','index');\n \n //User ACL\n $this->acl->deny('user',array('shop','admin'));\n $this->acl->allow('user','user');\n $this->acl->allow('user','index',array('logout','notfound'));\n \n \n // Shop ACL\n $this->acl->deny('shop',array('user','admin'));\n $this->acl->allow('shop',array('index','shop'));\n \n //Admin ACL\n //$this->acl->deny('admin',array('user','shop'));\n //$this->acl->allow('admin',array('index','admin'));\n $this->acl->allow('admin');\n // Note that the actions which are not mentioned above i.e. inside array of\n // controller-action - becomes access-denied automatically\n // as in above example, news controller also have one more action demo2,\n // but demo2 is not mentioned in above allow actions, so \n // when guest tries to access the action - demo2, it would not show the \n // content of demo2, rather It would show content of error/index.phtml\n }", "public function index()\n {\n //\n if(Gate::allows('role.index')){\n $data['roles'] = Role::where('status',1)->get();\n\n return view('dashboard.roles.index',$data);\n }\n else{\n if(Auth::check()){\n abort(403);\n }\n else{\n return redirect('login');\n }\n\n }\n\n\n }", "public function index()\n {\n $this->authorize('view', new Role);\n $roles = Role::all();\n return view('admin.roles.index', compact('roles'));\n }", "public function testViewDenyNotHrAndAdmin() {\n\t\t$this->setExpectedException('MissingActionException');\n\t\t$userRoles = [\n\t\t\tUSER_ROLE_USER => '',\n\t\t\tUSER_ROLE_USER | USER_ROLE_SECRETARY => 'secret',\n\t\t];\n\t\t$opt = [\n\t\t\t'method' => 'GET',\n\t\t];\n\t\tforeach ($userRoles as $userRole => $userPrefix) {\n\t\t\t$userInfo = [\n\t\t\t\t'role' => $userRole,\n\t\t\t\t'prefix' => $userPrefix,\n\t\t\t];\n\t\t\t$this->applyUserInfo($userInfo);\n\t\t\t$this->generateMockedController();\n\t\t\t$url = [\n\t\t\t\t'controller' => 'deferred',\n\t\t\t\t'action' => 'view',\n\t\t\t\t'1'\n\t\t\t];\n\t\t\tif (!empty($userPrefix)) {\n\t\t\t\t$url['prefix'] = $userPrefix;\n\t\t\t\t$url[$userPrefix] = true;\n\t\t\t}\n\t\t\t$this->testAction($url, $opt);\n\t\t\t$this->checkIsNotAuthorized();\n\t\t\t$this->checkRedirect(true);\n\t\t}\n\t}", "public function view()\n { \n $cfg = (new GridConfig())\n ->setName('roles')\n ->setPageSize(10)\n ->setDataProvider(\n new EloquentDataProvider(\n (new Role)->newQuery()\n )\n )\n ->setColumns([\n (new FieldConfig)\n ->setName('id')\n ->setLabel(__('Id'))\n ->addFilter(\n (new FilterConfig)\n ->setName('id')\n ->setOperator(FilterConfig::OPERATOR_LIKE)\n )\n ->setSortable(true),\n (new FieldConfig)\n ->setName('name')\n ->setLabel(__('Name'))\n ->addFilter(\n (new FilterConfig)\n ->setName('name')\n ->setOperator(FilterConfig::OPERATOR_LIKE)\n )\n ->setSortable(true),\n (new FieldConfig)\n ->setName('created_at')\n ->setLabel(__('Created'))\n ->setSortable(true),\n (new FieldConfig)\n ->setName('updated_at')\n ->setLabel(__('Updated'))\n ->setSortable(true),\n (new FieldConfig)\n ->setName('action')\n ->setLabel(__('Action'))\n ->setCallback(function ($val, EloquentDataRow $row) {\n $output = \"\";\n if($this->checkPermissionUpdate()){\n $output .= \"<a class='btn btn-primary' href='\".URL::route('roles.update').'/'.$row->getSrc()->id.\"'><i class='glyphicon glyphicon-edit' aria-hidden='true'></i> \".__('Edit').\"</a>\";\n }\n if($this->checkPermissionDelete()){\n $output .= \"<a class='btn btn-danger' href='\".URL::route('roles.delete',array('id' => $row->getSrc()->id)).\"'><i class='glyphicon glyphicon-trash' aria-hidden='true'></i> \".__('Delete').\"</a>\";\n }\n return $output;\n })\n ])\n ->setComponents([ \n (new OneCellRow)\n ->setRenderSection(RenderableRegistry::SECTION_END)\n ->setComponents([\n new RecordsPerPage,\n ]),\n (new THead),\n (new TFoot) \n ]);\n \n if($this->checkPermissionCreate()){\n $cfg->getComponentByName(THead::NAME)\n ->addComponent(\n (new HtmlTag)\n ->setTagName('a')\n ->setAttributes([\n 'class' => 'btn btn-primary btn-small add-user pull-right',\n 'href' => URL::route('roles.create')\n ])\n ->addComponent(new RenderFunc(function() {\n return '<i class=\"glyphicon glyphicon-plus\"></i> '.__('Add');\n }))\n );\n }\n if($this->checkPermissionExport()){\n $cfg->getComponentByName(THead::NAME)\n ->addComponent(\n (new HtmlTag)\n ->setTagName('span')\n ->setAttributes([\n 'class' => 'btn-export pull-left'\n ])\n ->addComponent(\n (new ExcelExport)\n ->setFileName('roles')\n ->setIgnoredColumns(['action'])\n )\n );\n }\n\n $grid = (new Grid($cfg))->render();\n\n return view('admin.grid.roles', ['user' => $this->getUser()], compact('grid'));\n }", "public function displayRoles()\n { \n\n $user_data = $this->UserOrganisation_model->getAllByGet();\n foreach($user_data as $data){\n $email = $data->email;\n $roles = $this->UserOrganisation_model->findRole($data->id);\n if(count($roles)){\n foreach($roles as $role){\n $data = $role->name;\n $roleId = $role->pivot->role_id;\n $userId = $role->pivot->user_id;\n $arr_data = array('id'=>$roleId,'userId'=>$userId,'role'=>$data,'email'=>$email);\n $datas[]=$arr_data;\n }\n }else{\n $datas=$roles;\n }\n }\n return view('acl\\revoke_role', ['users' => $datas]);\n }", "public function init_roles()\n {\n }", "public function index()\n {\n // display all users, who have been assigned roles\n $users = $this->user->has('roles', true);\n\n return view('backend.access-control.index', compact('users'));\n }", "public function _construct()\n {\n $this->middleware('permission:read_roles')->only(['index']);\n $this->middleware('permission:create_roles')->only(['create','store']);\n $this->middleware('permission:update_roles')->only(['edit','update']);\n $this->middleware('permission:delete_roles')->only(['destroy']);\n \n }", "public function index()\n\t{\n Return View::make(\"roles.index\");\n\t}", "public function index()\n {\n //\n $roles = Role::all();\n return view('role-permission.role.index', compact('roles'));\n }", "public function index()\n {\n return view ('roles.index');\n }", "public function index()\n {\n // Gate::authorize('haveaccess', 'rol.index');\n\n $roles= Role::orderBy('id','Asc')->paginate(5);\n \n return view('Roles.indexr',['roles'=>$roles]);\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 editable_roles( $roles ){\n if( isset( $roles['administrator'] ) && !current_user_can('administrator') ){\n unset( $roles['administrator']);\n }\n return $roles;\n }", "public function setup() { \n\t\t$this->auth_realm = CMS::$admin_realm;\n\t\treturn parent::setup()->use_views_from('../app/views'); \n\t}", "public function test_manual_field_is_view_or_editable_with_view_permissions_on_userset() {\n global $DB, $CFG;\n\n // Skip test if elis/program doesn't exist.\n if (!file_exists($CFG->dirroot.'/elis/program/lib/setup.php')) {\n $this->markTestSkipped('Requires elis/program to be installed.');\n }\n\n $this->resetAfterTest(true);\n $this->load_libraries_for_additional_tests();\n // Load CSV data.\n $this->load_csv_data();\n\n // Setup place holders for capabilities.\n $editcap = 'elis/program:user_edit';\n $viewcap = 'elis/program:user_view';\n\n // Retrieve the PM user id to be assigned to a userset.\n $param = array('id' => 103);\n $pmuserinusersetid = $DB->get_field('crlm_user', 'id', $param);\n\n // Retrieve the user who will be assigned a role in the user set.\n $param = array('id' => 101);\n $userroleinuserset = $DB->get_record('user', $param);\n // Set user with role as logged in user\n $this->setUser($userroleinuserset);\n\n // Get the userset context.\n $usersetcontext = context_elis_userset::instance(1);\n // System context.\n $syscontext = context_system::instance();\n\n // Create role and assign capabilites to it.\n $roleid = create_role('testrole', 'testrole', 'testrole');\n assign_capability($viewcap, CAP_ALLOW, $roleid, $syscontext->id);\n\n // Assin role to user in the userset context.\n role_assign($roleid, $userroleinuserset->id, $usersetcontext->id);\n\n // Add user to cluster/userset.\n $usersetassign = new clusterassignment(array('clusterid' => 1, 'userid' => $pmuserinusersetid, 'plugin' => 'manual'));\n $usersetassign->save();\n\n $field = new field(array('id' => 101));\n $field->load();\n\n $result = manual_field_is_view_or_editable($field, $syscontext, $editcap, $viewcap, 'user', $pmuserinusersetid);\n\n $this->assertEquals(MANUAL_FIELD_VIEWABLE, $result);\n }", "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 }", "public function test_editing_disabled_and_custom_view_capablity() {\n global $USER;\n\n // Setup.\n $this->init_config();\n $coursecontext = $this->init_category_and_course();\n $field = $this->init_field_and_owner('disabled', '');\n $this->init_user();\n\n // Role.\n $roleid = create_role('testrole', 'testrole', 'testrole');\n $syscontext = context_system::instance();\n assign_capability('moodle/course:enrolreview', CAP_ALLOW, $roleid, $syscontext->id);\n\n // User with capability.\n role_assign($roleid, $USER->id, $coursecontext->id);\n\n $form = new custom_field_permissions_form();\n $mform = $form->get_mform();\n manual_field_add_form_element($form, $mform, $coursecontext, array(), $field, false, null, 'moodle/course:enrolreview');\n $element = $mform->getElement('field_field');\n $this->assertTrue($element->isFrozen());\n\n // User without capability.\n role_unassign($roleid, $USER->id, $coursecontext->id);\n\n $form = new custom_field_permissions_form();\n $mform = $form->get_mform();\n manual_field_add_form_element($form, $mform, $coursecontext, array(), $field, false, null, 'moodle/course:enrolreview');\n $this->assertFalse($mform->elementExists('field_field'));\n }", "public function run()\n {\n\n \t// ???\n $role = App\\Role::where('name', 'super')->first();\n\n $role = App\\Role::where('name', 'content')->first();\n $role->addPermission('gallery.create');\n $role->addPermission('gallery.edit');\n $role->addPermission('gallery.delete');\n\n }", "public function index()\n\t{\n\t $role=Auth::User()->user_role;\n if(isset($role))\n {\n $role_id=$role->id;\n $role=$role->name;\n if($role_id==3){\n return view('workfinderviews.customer-index',compact('role'));\n }else if($role_id==2){\n $my_tasks=Auth::User()->tasks;\n// dd($my_tasks);\n return view('workfinderviews.index',compact('role','my_tasks'));\n }else if($role_id==1){\n return view('home',compact('role'));\n }\n\n }\n\t}", "public function __construct()\n {\n view()->share('rolesList', Role::all());\n }", "public function index()\n {\n //\n return view('admin.role.index');\n }", "public function index()\n {\n //\n return view('roles.index');\n }", "public function AdminView(){\n //Restricting this view for operators (Only SuperAdmins should be able to view)\n if(Auth::user()->role ==='Admin'){\n\n $data['allData'] = Admin::all();\n return view('backend.admin.view_admin',$data);\n\n }else{\n return redirect('admin/error')->with('error', 'You are not allowed to access this page');\n }\n }", "public function index()\n {\n $roles = Role::paginate(15);\n\n $permissions = array();\n $user_roles = Auth::user()->roles;\n foreach ($user_roles as $key => $val) {\n foreach ($val->permissions as $permission) {\n $permissions[$permission->id] = $permission->name;\n }\n }\n\n return view('roles.index')->withRoles($roles)->withPermissions($permissions);\n }", "private function require_role($role)\n {\n if(!Core::auth($role) && !Core::auth('developer') )\n {\n \theader('HTTP/1.1 403 Forbidden');\n $this->template_view = \"<h1>403 Forbidden</h1><h3>You do not have access to view this page</h3><p>If you believe this is an error, please see your site administrator.</p>\";\n echo Core::view( _app_server_path .'humblee/views/admin/templates/template.php',get_object_vars($this) );\n exit();\n }\n }", "public function index() {\n $this->authorize('hasaccess', 'roles.index');\n $roles = Role::Orderby('id', 'ASC')->paginate(10);\n $header = 'Roles';\n $slot = 'Slot';\n\t\treturn view('roles.index', compact('roles','header','slot'));\n\t}", "function index()\n {\n $data['t_role'] = $this->Role_model->get_all_t_role();\n $data['nb_role'] = ($data['t_role'] != null && count($data['t_role']) >0 ) ? count($data['t_role']) : 0;\n \n $data['_view'] = 'role/index';\n $this->load->view('layouts/main',$data);\n }", "public function test_custom_edit_capability_and_moodle_view_capability() {\n $this->validate_all_role_assignment_combinations('', 'moodle/user:viewhiddendetails');\n }", "public function index()\n {\n\t\tif (Auth::check()) {\n\t\t\t$roles = Role::all();\n\t\t\treturn view('roles.index', compact('roles'));\n\t\t}else{\n\t\t\treturn view('auth\\login');\n\t\t}\n }", "public function index()\n {\n return view('adminpanel.roles.index')->with('roles',Role::all());\n }", "public function create()\n {\n if(Auth::user()->can('create-roles')){\n return view(\"roles.create\");\n }else{\n return back()->with('error',\"Vous n'avez pas ce droit\");\n } \n }", "public function index()\n {\n if (auth()->check() and auth()->user()->can(\"index\", new Role)) {\n $roleid = auth()->user()->getRolesRight();\n $tasks = Role::where(\"Right\", \"<=\", $roleid)->get();\n return view($this->urltoview . \".index\", [\"roleid\" => $roleid ,\"tasks\" => $tasks ]);\n }\n }", "public function livreurDashboard()\n{\n $this->denyAccessUnlessGranted('ROLE_LIVREUR');\n\n // or add an optional message - seen by developers\n $this->denyAccessUnlessGranted('ROLE_LIVREUR', null, 'User tried to access a page without having ROLE_LIVREUR');\n}", "public function index()\n {\n\n return view('roles.index');\n }", "protected function ensureAdminRoleIfRequested() {}", "public function index()\n {\n return view('admin.users_block.roles.index');\n }", "public function edit(User $user){\n\n if(Gate::denies('edit-users')){\n return redirect(route('admin.users.index'));\n }\n $roles=Role::all();\n return view('admin.users.edit')->with([\n 'user'=>$user,\n 'roles'=>$roles\n\n ]);\n\n}", "public function index()\n { \n // Role::create(['name' => 'writer']);\n //Permission::create(['name' => 'edit articles']);\n \n // Role::create(['name' => 'admin']);\n // Role::create(['name' => 'editor']);\n\n // Permission::create(['name' => 'write articles']);\n // Permission::create(['name' => 'view articles']);\n // Auth::user()->givePermissionTo('edit articles');\n // $permission=Permission::find(2);\n // $role=Role::find(2);\n // $role->givePermissionTo($permission);\n // $user=User::find(2);\n // $user->assignRole('writer');\n // $role=Role::find(1);\n // $role->givePermissionTo('write articles');\n // $user=User::find(1);\n // $user->givePermissionTo('view articles');\n // $user=User::find(1);\n // $user->assignRole('writer');\n // $user->assignRole('editor');\n // $user=User::find(2);\n // $user->assignRole('admin');\n // $user=User::find(3);\n // $user->assignRole('admin');\n\n\n return view('home');\n }", "public function setRoleSupervisor()\n {\n // $role = Role::where('name', 'supervisor')->first();\n // $permissions = Permission::where('name', 'like', 'blog-%')->get();\n // $role->syncPermissions($permissions);\n }", "function role_permission() {\n\t\tif(!has_permission(2)) {\n\t\t\tset_warning_message('Sory you\\'re not allowed to access this page.');\n\t\t\tredirect('admin');\n\t\t\texit;\n\t\t}\n\t\t\n\t\t$this->output_head['function'] = __FUNCTION__;\n\n\t\t$this->output_head['style_extras'] = array(assets_url() . '/plugins/datatables/dataTables.bootstrap.css');\n\t\t$this->output_head['js_extras'] = array(assets_url() . '/plugins/datatables/jquery.dataTables.min.js',\n\t\t\t\t\t\t\t\t\t\t\t\tassets_url() . '/plugins/datatables/dataTables.bootstrap.min.js');\n\t\t$this->output_head['js_function'] = array();\n\t\t$this->load->model('user_model');\n\t\t\n\t\t$this->load->view('global/header', $this->output_head);\n\t\t\n\t\t$this->output_data['title'] = 'Role & Permission Manager';\n\t\t$this->load->view('role_permission', $this->output_data);\n\t\t$this->load->view('global/footer');\n\t}", "public function test_editing_disabled_and_moodle_view_capability() {\n global $USER;\n\n // Setup.\n $this->init_config();\n $coursecontext = $this->init_category_and_course();\n $field = $this->init_field_and_owner('disabled', 'moodle/user:viewhiddendetails');\n $this->init_user();\n\n // Role.\n $roleid = create_role('testrole', 'testrole', 'testrole');\n $syscontext = context_system::instance();\n assign_capability('moodle/user:viewhiddendetails', CAP_ALLOW, $roleid, $syscontext->id);\n\n // User with capability.\n role_assign($roleid, $USER->id, $coursecontext->id);\n\n $form = new custom_field_permissions_form();\n $mform = $form->get_mform();\n manual_field_add_form_element($form, $mform, $coursecontext, array(), $field, false);\n $element = $mform->getElement('field_field');\n $this->assertTrue($element->isFrozen());\n\n // User without capability.\n role_unassign($roleid, $USER->id, $coursecontext->id);\n\n $form = new custom_field_permissions_form();\n $mform = $form->get_mform();\n manual_field_add_form_element($form, $mform, $coursecontext, array(), $field, false);\n $this->assertFalse($mform->elementExists('field_field'));\n }", "public function test_manual_field_is_view_or_editable_with_view_edit_permissions_on_userset() {\n global $DB, $CFG;\n\n // Skip test if elis/program doesn't exist.\n if (!file_exists($CFG->dirroot.'/elis/program/lib/setup.php')) {\n $this->markTestSkipped('Requires elis/program to be installed.');\n }\n\n $this->resetAfterTest(true);\n $this->load_libraries_for_additional_tests();\n // Load CSV data.\n $this->load_csv_data();\n\n // Setup place holders for capabilities.\n $editcap = 'elis/program:user_edit';\n $viewcap = 'elis/program:user_view';\n\n // Retrieve the PM user id to be assigned to a userset\n $param = array('id' => 103);\n $pmuserinusersetid = $DB->get_field('crlm_user', 'id', $param);\n\n // Retrieve the user who will be assigned a role in the user set.\n $param = array('id' => 101);\n $userroleinuserset = $DB->get_record('user', $param);\n // Set user with role as logged in user\n $this->setUser($userroleinuserset);\n\n // Get the userset context.\n $usersetcontext = context_elis_userset::instance(1);\n // System context.\n $syscontext = context_system::instance();\n\n // Create role and assign capabilites to it.\n $roleid = create_role('testrole', 'testrole', 'testrole');\n assign_capability($editcap, CAP_ALLOW, $roleid, $syscontext->id);\n assign_capability($viewcap, CAP_ALLOW, $roleid, $syscontext->id);\n\n // Assin role to user in the userset context.\n role_assign($roleid, $userroleinuserset->id, $usersetcontext->id);\n\n // Add user to cluster/userset.\n $usersetassign = new clusterassignment(array('clusterid' => 1, 'userid' => $pmuserinusersetid, 'plugin' => 'manual'));\n $usersetassign->save();\n\n $field = new field(array('id' => 101));\n $field->load();\n\n $result = manual_field_is_view_or_editable($field, $syscontext, $editcap, $viewcap, 'user', $pmuserinusersetid);\n\n $this->assertEquals(MANUAL_FIELD_EDITABLE, $result);\n }", "public function setViewmode()\n {\n $viewmode = ee()->input->post('ee_cp_viewmode');\n if (in_array($viewmode, ['classic', 'jumpmenu'])) {\n ee()->input->set_cookie('ee_cp_viewmode', $viewmode, 31104000);\n }\n ee()->functions->redirect(ee('CP/URL')->make('homepage'));\n }", "public function rol_conductor_not_access()\n {\n if ($this->rol != 1 && $this->rol != 2) {\n exit($this->httpResponse(\"error\", \"forbbiden\", \"Your role do not have permission\", 403)->json());\n }\n }", "public function index()\n {\n $roles=Role::all();\n\n return view('user.roles',['roles' => $roles]);\n }", "public function index()\n {\n $per_page = 20;\n return view('admin.role.index')\n ->withRoles($this->role->getRolePaginated($per_page));\n }", "public function authorize() {\n\t\treturn $this->user()->hasPermission('edit.roles');\n\t}", "public function index()\n { \n $roles = Rol::all();\n return view('admin.admin_roles',['roles'=>$roles]);\n }", "public function index()\n {\n $roles = Role::where('status',0)->get();\n $permissions = Permission::where('status',0)->get();\n return view('role.list',['roles'=>$roles,'permissions'=>$permissions,'layui'=>true]);\n }", "public function index(Request $request)\n {\n $request->user()->authorizeRoles(['radicacion','administrador']);\n\n }", "public function actionIndex()\n {\n if(!Yii::$app->role->isOwner())\n {\n \n throw new ForbiddenHttpException('You do not have permission to access this page.');\n }\n\n $searchModel = new UserRolesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, Yii::$app->company->getCompanyID());\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function __construct()\n {\n $this->middleware(['auth','check.role:A'])->only('index','show','edit','update');\n }", "public function index()\n\t{\n\t\treturn view('role.index');\n\t}", "public function rolesForUser();", "private function __setNavRendererPerms() {\n\t\t$userPermission = array(\n\t\t\t'allowProxy' => false, \n\t\t\t'allowAdmin' => false\n\t\t);\n\n\t\tif($this->Auth->loggedIn()) {\n\t\t\t$user = array('model' => 'User', 'foreign_key' => $this->Auth->user('id'));\n\t\t\t$isSuper = $this->Acl->check($user, 'role/super');\n\t\t\t$userPermission = array(\n\t\t\t\t'allowProxy' => $isSuper,\n\t\t\t\t'allowAdmin' => $isSuper\n\t\t\t);\n\t\t} \n\n\t\t// pass as settings to the helper constructor\n\t\t$this->helpers['NavRenderer'] = $userPermission;\n\t}", "public function createRole() {\n\t\t$Permissions = discover_permissions();\n\n\t\treturn \\view( 'admin.roles.create', compact( 'Permissions' ) );\n\t}", "public function __construct()\n {\n //$this->middleware(['role:user'],['only' => 'index']);\n\n }", "public function index()\n {\n if (Gate::allows('isContractor')) {\n abort(420, 'You Are not Allowed to access this site');\n }\n /*\n if (Gate::allows('isAdmin')) {\n $roles = DB::table('roles')->where('id', '!=', 1)->get();\n $users = DB::table('users')->get();\n return view('users/index', compact('users','roles'));\n }\n\n\n\n $users = DB::table('users')->get();\n $roles = DB::table('roles')->where('id', '!=', 1)->get();\n return view('users/index',compact('users','roles'));\n if (Gate::allows('isAdmin')) {\n $users = DB::table('users')->where('role_id', '!=', 1)->get();\n return view('users/index', compact('users'));\n\n //abort(404, \"Sorry, You cant Access this Page\");\n }\n\n if (Gate::allows('isManager')) {\n $users = DB::table('users')->where('role_id', '=', 3)->get();\n return view('users/index', compact('users'));\n }\n */\n\n }", "public function create()\n {\n if (Gate::allows('isContractor')) {\n abort(420, 'You Are not Allowed to access this site');\n }\n\n if (Gate::allows('isAdmin')) {\n $roles = DB::table('roles')->where('id', '!=', 1)->get();\n return view('users/create', compact('roles'));\n }\n if (Gate::allows('isManager')) {\n $roles = DB::table('roles')->where('id', '=', 3)->get();\n return view('users/create', compact('roles'));\n }\n\n\n }", "public function network_explorer_right_view(Request $request){\n\t\tif(!empty($request->session()->has('id') && $request->session()->get('role') == 0)){\n\t\t\t//return view\n\t\t\treturn view('admin.members.network-explorer-right');\n\t\t}\n\t\telse{\n\t\t\treturn redirect()->route('admin_login');\n\t\t}\n\t}", "public function index()\n {\n $data['roles'] = RolePermission::orderBy('id', 'desc')->get();\n return view('role.index')->with($data);\n }", "public function testAdministratorRole() {\n $this->drupalLogin($this->adminUser);\n $this->drupalGet('admin/people/role-settings');\n\n // Verify that the administration role is none by default.\n $this->assertTrue($this->assertSession()->optionExists('edit-user-admin-role', '')->isSelected());\n\n $this->assertFalse(Role::load($this->rid)->isAdmin());\n\n // Set the user's role to be the administrator role.\n $edit = [];\n $edit['user_admin_role'] = $this->rid;\n $this->drupalGet('admin/people/role-settings');\n $this->submitForm($edit, 'Save configuration');\n\n \\Drupal::entityTypeManager()->getStorage('user_role')->resetCache();\n $this->assertTrue(Role::load($this->rid)->isAdmin());\n\n // Enable block module and ensure the 'administer news feeds'\n // permission is assigned by default.\n \\Drupal::service('module_installer')->install(['block']);\n\n $this->assertTrue($this->adminUser->hasPermission('administer blocks'), 'The permission was automatically assigned to the administrator role');\n\n // Ensure that selecting '- None -' removes the admin role.\n $edit = [];\n $edit['user_admin_role'] = '';\n $this->drupalGet('admin/people/role-settings');\n $this->submitForm($edit, 'Save configuration');\n\n \\Drupal::entityTypeManager()->getStorage('user_role')->resetCache();\n \\Drupal::configFactory()->reset();\n $this->assertFalse(Role::load($this->rid)->isAdmin());\n\n // Manually create two admin roles, in that case the single select should be\n // hidden.\n Role::create(['id' => 'admin_role_0', 'is_admin' => TRUE, 'label' => 'Admin role 0'])->save();\n Role::create(['id' => 'admin_role_1', 'is_admin' => TRUE, 'label' => 'Admin role 1'])->save();\n $this->drupalGet('admin/people/role-settings');\n $this->assertSession()->fieldNotExists('user_admin_role');\n }" ]
[ "0.6468875", "0.62288415", "0.6203476", "0.6102243", "0.6102243", "0.6102243", "0.6102243", "0.6098629", "0.6078775", "0.60782737", "0.6075366", "0.6046241", "0.6043239", "0.60359174", "0.6014452", "0.6007143", "0.6003408", "0.5988276", "0.59766304", "0.59682846", "0.59558076", "0.59464145", "0.59338754", "0.59213823", "0.59142184", "0.5906401", "0.5880188", "0.5879928", "0.5865752", "0.5856544", "0.58367693", "0.5820786", "0.58044696", "0.58007854", "0.5798845", "0.57847303", "0.576535", "0.57646686", "0.57645774", "0.57641643", "0.57627076", "0.5761937", "0.57607734", "0.5760323", "0.57536054", "0.5751389", "0.57511836", "0.5736449", "0.57286185", "0.57188636", "0.5717925", "0.57142824", "0.57101077", "0.57097185", "0.57059187", "0.57027704", "0.5690853", "0.56896174", "0.56818795", "0.5679044", "0.5670525", "0.56638986", "0.56637657", "0.5662478", "0.5654993", "0.5652957", "0.5649655", "0.56490356", "0.5645085", "0.56446165", "0.5639751", "0.56348574", "0.56348443", "0.56346923", "0.5620222", "0.5619464", "0.56132364", "0.56110543", "0.5609922", "0.5608336", "0.56013113", "0.55991256", "0.5598466", "0.5592318", "0.55923134", "0.5591223", "0.5578116", "0.5578068", "0.55772585", "0.5571366", "0.5566907", "0.5566207", "0.5565804", "0.556457", "0.5564244", "0.556339", "0.5561449", "0.5560806", "0.5555652", "0.555445", "0.555393" ]
0.0
-1
Getting all parent roles, i.e. roles that can manage the passed role and their managers too
public static function getAllParentRoles($userRole, $system) { // Filling $allParentsWithChildren if(empty(self::$allParentsWithChildren)) { // Getting all role-manage permission for the current user $parents = PermissionModel::where('permission' , 'like' , 'role-manage.%'); // if system flag then get all roles in the estate plus the roles with site_id = null if($system) { $rolesInEstate = self::getRolesInEstate(true); $parents = $parents->whereIn('role_id', array_keys($rolesInEstate)); } $parents = $parents->get()->toArray(); // Will store all Parents and their role-manage roles foreach ($parents as $parent) { self::$allParentsWithChildren[$parent['role_id']][] = substr($parent['permission'], 12); } } self::getParentRoles($userRole, $system); return self::$parentRoles; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getParentRoles()\n {\n $parents = collect([]);\n\n $parent = $this->parent;\n\n while (!is_null($parent)) {\n $parents->push($parent);\n $parent = $parent->parent;\n }\n\n return $parents;\n }", "public function getAllRolesWithParentRoles() {\n return RoleHelper::getUserParentRoles($this);\n }", "public function getRoles()\n {\n return $this->acl->getRoleAndParents($this->getRole());\n }", "public function parentPermissions()\n {\n $parentPermissions = collect([]);\n\n $parent = $this->parentrole;\n\n while (!is_null($parent)) {\n if ($parent->permissions->count()) {\n $parentPermissions->push($parent->permissions);\n }\n $parent = $parent->parentrole;\n }\n\n return $parentPermissions;\n }", "public function getAncestors($role)\n {\n $parents = array();\n $model = Pi::model('acl_inherit');\n $rowset = $model->select(array('child' => $role));\n\n foreach ($rowset as $row) {\n $parents[] = $row->parent;\n $sub = $this->getAncestors($row->parent);\n $parents = array_unique(array_merge($parents, $sub));\n }\n\n return $parents;\n }", "public function getChildren($role)\n {\n $children = array();\n $model = Pi::model('acl_inherit');\n $rowset = $model->select(array('parent' => $role));\n\n foreach ($rowset as $row) {\n $children[] = $row->child;\n $sub = $this->getChildren($row->child);\n $children = array_unique(array_merge($children, $sub));\n }\n\n return $children;\n }", "public function getRoles() {\n $ds = \\dibi::dataSource(\"\n SELECT r.*, rr.name AS parent_name\n FROM users_roles AS r\n LEFT JOIN users_roles AS rr ON rr.id = r.parent_id\n \");\n\n return $ds;\n }", "function getRoleSelectTree()\n {\n //find all roles below users current role\n $roles = $this->all();\n if (\\Config::get('user')->isAdmin())\n {\n return [[\n 'name' => $this->name,\n 'value' => $this->id,\n 'children' => $this->findChildren($roles, $this->id, 1)\n ]];\n\n }\n\n return $this->findChildren($roles, $this->id, 1);\n\n\n }", "public function getRoles()\n {\n $roles = $this->getExplicitRoles();\n\n if (!$roles) {\n return null;\n }\n\n $finalRoles = array();\n foreach ($roles as $role) {\n $childRoles = $role->getChildRoles();\n\n foreach ($childRoles as $childRole) {\n if (!in_array($childRole, $finalRoles)) {\n $finalRoles[] = $childRole;\n }\n }\n\n if (!in_array($role, $finalRoles)) {\n $finalRoles[] = $role;\n }\n }\n\n return $finalRoles;\n }", "public function getRoleTree()\n {\n $roleTree = Security::getRoleTree();\n\n $simplifyRoleTree = function (&$level) use (&$simplifyRoleTree) {\n foreach ($level as &$role) {\n $role['role'] = $role['role']->getId();\n if (!empty($role['children'])) {\n $simplifyRoleTree($role['children']);\n }\n }\n };\n\n $simplifyRoleTree($roleTree);\n\n return $roleTree;\n }", "public function parentRole()\n {\n if ($this->parent_id == null) {\n return null;\n }\n return $this->hasOne(Config::get('guardian.role'), 'id', 'parent_id');\n }", "public function children()\n {\n return $this->hasMany(config('rbac.models.role'),'parent_id');\n }", "public function roles(): MorphToMany;", "function get_all_menu_selected_by_parent($params) {\n $sql = \"SELECT a.*, b.role_id, b.role_tp\n FROM com_menu a\n LEFT JOIN (SELECT * FROM com_role_menu WHERE role_id = ?) b ON a.nav_id = b.nav_id\n WHERE portal_id = ? AND parent_id = ?\n ORDER BY nav_no ASC\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function parentPerms()\n {\n if ($this->parent_id == null) {\n return null;\n }\n\n return $this->belongsToMany(Config::get('guardian.permission'), Config::get('guardian.permission_role_table'), Config::get('guardian.role_foreign_key'), Config::get('guardian.permission_foreign_key'));\n }", "public function getChildRoleIDs()\n\t{\n\t\t$returnValue = array();\n\n\t\tif (class_exists('Default_Model_Role', TRUE)) {\n\t\t\ttry {\n\t\t\t\t$roleCollection = Doctrine_Query::create()\n\t\t\t\t\t->from('Default_Model_Role m')\n\t\t\t\t\t->where('m.role_id = ? ', array($this->_roleId))\n\t\t\t\t\t->execute()\n\t\t\t\t;\n\t\t\t\tforeach ($roleCollection as $roleModel) {\n\t\t\t\t\t$returnValue = $this->_retrieveChildRoleId($roleModel->id);\n\t\t\t\t}\n\t\t\t\t$returnValue = array_unique($returnValue);\n\n\t\t\t\t/**\n\t\t\t\t * cause of non ending trees we have to add guestID, if not yet in here\n\t\t\t\t */\n\t\t\t\t$roleGuestModel = Doctrine_Query::create()\n\t\t\t\t\t->from('Default_Model_Role m')\n\t\t\t\t\t->where('m.short = ? ', array('guest'))\n\t\t\t\t\t->limit(1)\n\t\t\t\t\t->execute()\n\t\t\t\t\t->getFirst()\n\t\t\t\t;\n\t\t\t\tif ($roleGuestModel) {\n\t\t\t\t\tif (!in_array($roleGuestModel->id, $returnValue) &&\n\t\t\t\t\t\t$this->_roleId != $roleGuestModel->id) {\n\n\t\t\t\t\t\t$returnValue[] = $roleGuestModel->id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Doctrine_Connection_Exception $exception) {\n\t\t\t\t/**\n\t\t\t\t * @todo maybe do something\n\t\t\t\t */\n\t\t\t}\n\t\t}\n\n\t\treturn $returnValue;\n\t}", "public function getInheritedRoles(array $roles): array;", "function get_user_roles($context, $userid=0, $checkparentcontexts=true, $order='c.contextlevel DESC, r.sortorder ASC', $view=false) {\n\n global $USER, $CFG, $db;\n\n if (empty($userid)) {\n if (empty($USER->id)) {\n return array();\n }\n $userid = $USER->id;\n }\n // set up hidden sql\n $hiddensql = ($view && !has_capability('moodle/role:viewhiddenassigns', $context))? ' AND ra.hidden = 0 ':'';\n\n if ($checkparentcontexts && ($parents = get_parent_contexts($context))) {\n $contexts = ' ra.contextid IN ('.implode(',' , $parents).','.$context->id.')';\n } else {\n $contexts = ' ra.contextid = \\''.$context->id.'\\'';\n }\n\n return get_records_sql('SELECT ra.*, r.name, r.shortname\n FROM '.$CFG->prefix.'role_assignments ra,\n '.$CFG->prefix.'role r,\n '.$CFG->prefix.'context c\n WHERE ra.userid = '.$userid.\n ' AND ra.roleid = r.id\n AND ra.contextid = c.id\n AND '.$contexts . $hiddensql .\n ' ORDER BY '.$order);\n}", "public function roles()\n {\n return $this->belongsToMany(Role::class, 'manager_roles', 'user_id', 'role_id')->withTimestamps();\n }", "abstract protected function getRoles();", "public function findRoles() {\n\t\t\n\t}", "public static function getParentRoles($userRole, $system)\n\t{\n\t\t$parents = [];\n\t\t// Saving userRole to KnownParents to avoid endless recursion\n\t\tself::$knownParents[] = $userRole;\n\n\t\t// Looping in all Parents and if the userRole is in the children then add this parent to knownparents\n\t\tforeach (self::$allParentsWithChildren as $parentRole => $childrenRoles)\n\t\t{\n\t\t\t// If the role is in the childrenRoles then add the $parentRole to $parents\n\t\t\tif(in_array($userRole, $childrenRoles))\n\t\t\t\t$parents[] = $parentRole;\n\t\t}\n\n\t\t// Add to ParentRoles unique roles\n\t\tself::$parentRoles = array_unique (array_merge (self::$parentRoles, $parents));\n\n\t\t// Recursively get paretroles\n\t\tforeach ($parents as $parent)\n\t\t{\n\t\t\tif(!in_array($parent, self::$knownParents))\n\t\t\t\tself::getParentRoles($parent, $system);\n\t\t}\n\t}", "private function get_all_roles(){\n return Role::all();\n }", "protected function parentRole()\n {\n return !empty($this->parentRole) ? $this->parentRole : $this->parent->recordRole();\n }", "public function getRoles()\n {\n // get roles of own Publisher, note: WITHOUT role 'ROLE_PUBLISHER'\n $roles = $this->publisher->getRoles();\n\n if (($key = array_search('ROLE_PUBLISHER', $roles)) !== false) {\n unset($roles[$key]);\n }\n\n // merge all roles of this and own Publisher\n $roles = array_merge($this->roles, $roles);\n\n foreach ($this->getGroups() as $group) {\n $roles = array_merge($roles, $group->getRoles());\n }\n\n // we need to make sure to have at least one role\n $roles[] = static::ROLE_DEFAULT;\n\n return array_unique($roles);\n }", "abstract protected function rolePerms($role);", "public function roles()\n {\n return $this->hasManyThrough(Permission::class);\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class, null, \"context_ids\", \"role_ids\");\n }", "public function get_all_roles(){\n\t\treturn ORM::factory('role')->find_all()->as_array();\n\t}", "function getSelectableParents()\n {\n $roles = $this->all();\n $tree = $this->findChildren($roles, 0, 1);\n\n //recursively go trough the array and delete....\n\n $trimmed_tree = $this->removeTreeNode($tree, $this->id);\n return $trimmed_tree;\n\n\n\n\n }", "public function getAll()\n {\n try{\n return $this->roles;\n }\n catch (\\Exception $exception)\n {\n return null;\n }\n }", "public function getRoles()\n {\n return $this->getRelation('roles');\n }", "public function get_admin_module_parents()\n\t{\n\t\t$this->db->where(array('module_user' => 1, 'module_parent' => 0));\n\t\t$this->db->order_by('module_position');\n\t\treturn $this->db->get('module');\n\t}", "public function getRoles() {\n return $this->getRelation(\"roles\");\n }", "public function getAllowedRoles()\n {\n $userRole = $this->getRole();\n if ($userRole === 'master') {\n $output = $this->acl->getRoles();\n return array_combine($output, $output);\n }\n\n $output = array($userRole => $userRole);\n foreach ($this->acl->getRoles() as $role) {\n if (! $this->acl->inheritsRole($role, $userRole, true)) {\n $output[$role] = $role;\n }\n }\n unset($output['master']);\n return $output;\n }", "public function roleListAll() {\n $this->_adminUserDao = new AdminUserDao();\n\n $ret = array();\n $roles = $this->_adminroledao->getAll();\n foreach ($roles as $role) {\n $user = $this->_adminUserDao->getRow(array(array('username', '=', $role->owner)));\n if($user){\n $ret[$role->owner]['role'][] = $role;\n $ret[$role->owner]['user'] = $user;\n }else{\n if($role->owner == config('admin.user.super_user.username')){\n $ret[$role->owner]['role'][] = $role;\n// $ret[$role->owner]['user'] = (new AdminUserDao())->fill(config('admin.user.super_user'));\n// $ret[$role->owner]['user'] = $this->_adminUserDao->getRow(array(array('id', '=', config('admin.user\n $ret[$role->owner]['user']['username'] = $role->owner;\n }\n }\n }\n return $ret;\n }", "public function get_all_roles()\n {\n return App\\Role::all();\n }", "public function parentrole()\n {\n return $this->belongsTo(self::class, 'parent_id');\n }", "public function getAllRoles()\n {\n return \\EntityManager::getRepository('stoykov\\Ohrana\\Models\\Doctrine\\Role')->findAll();\n }", "public function getRoles(): iterable\n {\n return [];\n }", "public function roles()\r\n {\r\n return $this->belongsToMany(config('bootstrap-menu.models.role'), config('bootstrap-menu.relations.permission_role'))->withTimestamps();\r\n }", "function get_all_roles() {\n return get_records('role', '', '', 'sortorder ASC');\n}", "public function get_roles()\n {\n $users_roles = user_role_active_record::search()->where('uid', $this->uid)->exec();\n $roles = array();\n foreach ($users_roles as $users_role) {\n $roles[] = role_active_record::search()->where('rid', $users_role->rid)->execOne();\n }\n return $roles;\n }", "public function cl_roles()\n {\n return $this->hasMany(ClRole::class);\n }", "public function roles();", "public function roles();", "public function roles();", "public function roles();", "public function getDirectRoles() {\n return $this->roles;\n }", "function getRoles()\n {\n $roles = array();\n\n foreach ($this->grupos as $grupo) {\n $roles[] = $grupo->getRole();\n }\n return $roles;\n }", "public function getRoles()\n {\n #obsolete, I don't wnat user roles, I want the permission those roles are linked to\n # so I just need a getPermissions once, store those constants in a small session array\n #$roles = $this->roles;\n\n #d($roles);\n\n #foreach ($roles as $role) {\n # echo $role->name;\n #}\n }", "public function getRoles()\n {\n $roles = array();\n \n foreach ($this->roles as $role) {\n $roles = array_merge($roles, $role->getRecursiveNames());\n }\n \n return array_unique($roles);\n }", "public function roles() {\n $roleClass = config('cani.models.role');\n $rolePropertieInPermission = config('cani.collections.role_permissions_propertie');\n \n return $this->belongsToMany(\n $roleClass, null, $rolePropertieInPermission . '._id'\n );\n }", "public function getAvailableParents($id) {\n return dibi::fetchPairs(\"\n SELECT id, name\n FROM users_roles\n WHERE id != %i\", (int)$id\n ); \n }", "public function roles()\n {\n return $this->belongsToMany(\n Config::get('able.role'),\n Config::get('able.role_group_table'),\n Config::get('able.group_foreign_key'),\n Config::get('able.role_foreign_key')\n );\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getAllRoles()\n {\n return $this->roles;\n }", "private function getRoles()\n\t{\n\t\tif (!isset($this->roles)) {\n\t\t\t$this->roles = $this->roles()\n\t\t\t\t->with('permissions')\n\t\t\t\t->withCount('users')\n\t\t\t\t->get();\n\t\t}\n\t\treturn $this->roles;\n\t}", "public function getAllRoles(): array;", "function getAllRoles(){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllRoles();\r\n }", "public function & GetRoles ();", "public function getRoles()\n {\n return [$this->role];\n }", "public function getRoles()\n {\n return [$this->role];\n }", "public function getMenuParents()\n {\n return $this->db->select('*')->from('admin_menu')->where('parent',0)->get()->result_array();\n }", "public function getRoles(): array;", "public function roles()\n {\n /** @var \\UserFrosting\\Sprinkle\\Core\\Util\\ClassMapper $classMapper */\n $classMapper = static::$ci->classMapper;\n\n return $this->belongsToMany($classMapper->getClassMapping('role'), 'permission_roles', 'permission_id', 'role_id')->withTimestamps();\n }", "public function roles()\n {\n return $this->belongsToMany(config('gate.models.role'));\n }", "public function roles()\n {\n return $this->belongsToMany(Config::get('laracancan.role_model', 'Hamedmehryar\\Laracancan\\Models\\Role'), 'lcc_role_user', 'user_id', 'role_id');\n }", "public function getRoles()\n {\n $roles = $this->roles;\n foreach ($this->getGroups() as $group) {\n $roles = array_merge($roles, $group->getRoles());\n }\n // we need to make sure to have at least one role\n $roles[] = static::ROLE_DEFAULT;\n \n return array_unique($roles);\n }", "function _get_role_data($role_id)\n\t{\n\t\t// Load models\n\t\t$this->ci->load->model('dx_auth/roles', 'roles');\n\t\t$this->ci->load->model('dx_auth/permissions', 'permissions');\n\t\n\t\t// Clear return value\n\t\t$role_name = '';\n\t\t$parent_roles_id = array();\n\t\t$parent_roles_name = array();\n\t\t$permission = array();\n\t\t$parent_permissions = array();\n\t\t\n\t\t/* Get role_name, parent_roles_id and parent_roles_name */\n\t\t\n\t\t// Get role query from role id\n\t\t$query = $this->ci->roles->get_role_by_id($role_id);\n\t\t\n\t\t// Check if role exist\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\t// Get row\n\t\t\t$role = $query->row();\t\t\n\t\n\t\t\t// Get role name\n\t\t\t$role_name = $role->name;\n\t\t\t\n\t\t\t/* \n\t\t\t\tCode below will search if user role_id have parent_id > 0 (which mean role_id have parent role_id)\n\t\t\t\tand do it recursively until parent_id reach 0 (no parent) or parent_id not found.\n\t\t\t\t\n\t\t\t\tIf anyone have better approach than this code, please let me know.\n\t\t\t*/\n\t\t\t\n\t\t\t// Check if role has parent id\n\t\t\tif ($role->parent_id > 0)\n\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t// Add to result array\n\t\t\t\t$parent_roles_id[] = $role->parent_id;\n\t\t\t\t\n\t\t\t\t// Set variable used in looping\n\t\t\t\t$finished = FALSE;\n\t\t\t\t$parent_id = $role->parent_id;\t\t\t\t\n\n\t\t\t\t// Get all parent id\n\t\t\t\twhile ($finished == FALSE)\n\t\t\t\t{\n\t\t\t\t\t$i_query = $this->ci->roles->get_role_by_id($parent_id);\n\t\t\t\t\t\n\t\t\t\t\t// If role exist\n\t\t\t\t\tif ($i_query->num_rows() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Get row\n\t\t\t\t\t\t$i_role = $i_query->row();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check if role doesn't have parent\n\t\t\t\t\t\tif ($i_role->parent_id == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get latest parent name\n\t\t\t\t\t\t\t$parent_roles_name[] = $i_role->name;\n\t\t\t\t\t\t\t// Stop looping\n\t\t\t\t\t\t\t$finished = TRUE;\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// Change parent id for next looping\n\t\t\t\t\t\t\t$parent_id = $i_role->parent_id;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Add to result array\n\t\t\t\t\t\t\t$parent_roles_id[] = $parent_id;\n\t\t\t\t\t\t\t$parent_roles_name[] = $i_role->name;\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\n\t\t\t\t\t\t// Remove latest parent_roles_id since parent_id not found\n\t\t\t\t\t\tarray_pop($parent_roles_id);\n\t\t\t\t\t\t// Stop looping\n\t\t\t\t\t\t$finished = TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* End of Get role_name, parent_roles_id and parent_roles_name */\n\t\t\n\t\t/* Get user and parents permission */\n\t\t\n\t\t// Get user role permission\n\t\t$permission = $this->ci->permissions->get_permission_data($role_id);\n\t\t\n\t\t// Get user role parent permissions\n\t\tif ( ! empty($parent_roles_id))\n\t\t{\n\t\t\t$parent_permissions = $this->ci->permissions->get_permissions_data($parent_roles_id);\n\t\t}\n\t\t\n\t\t/* End of Get user and parents permission */\n\t\t\n\t\t// Set return value\n\t\t$data['role_name'] = $role_name;\n\t\t$data['parent_roles_id'] = $parent_roles_id;\n\t\t$data['parent_roles_name'] = $parent_roles_name;\n\t\t$data['permission'] = $permission;\n\t\t$data['parent_permissions'] = $parent_permissions;\n\t\t\n\t\treturn $data;\n\t}", "public function getAvailableRoles() ;", "public function roles()\n {\n return $this->hasMany('Role');\n }", "public function getRoles()\n {\n\n $rolesReturn = [];\n $roles = $this->roles()->with(['role'])->get();\n\n $rolesReturn = $roles->pluck('role.name');\n\n // Add Standard role to the user roles\n\n if($rolesReturn->contains(config('user.standardRole')) === false)\n {\n $rolesReturn->push(config('user.standardRole'));\n }\n\n return $rolesReturn;\n\n }", "public function getRoles()\n {\n return $this->hasMany(AuthRole::className(), ['id' => 'role_id'])->viaTable('auth_user_role', ['user_id' => 'id']);\n }", "function get_role_list() {\n\t\treturn $this->db->get('system_security.security_role');\n\t\t\n\t}", "public function roles()\n {\n return $this->belongsToMany(Authorization::roleModel())->using(RolePivot::class);\n }", "public function getRoles()\n\t{\n\t\t$roles = array();\n\n\t\tforeach($this->getSteps() as $step)\n\t\t{\n\t\t\t$roles = array_merge($roles, $step->getRoles());\n\t\t}\n\n\t\treturn array_unique($roles);\n\t}", "function getSubRoleId3($self = true, $role_id=0){\n //echo M('role')->getLastSql();\n //dump($all_role);\n\n $role_id = session('role_id');\n $below_role = getSubRole3($role_id, $all_role);\n\n //dump($below_role);\n\n if ($self) {\n $below_ids[] = $role_id;\n }\n foreach ($below_role as $key=>$value) {\n $below_ids[] = $value['role_id'];\n }\n //dump($below_ids);exit;\n\n return array_unique($below_ids);\n}", "public function getRoles()\n {\n $roles = $this->roles;\n\n foreach ($this->getGroups() as $group) {\n $roles = array_merge($roles, $group->getRoles());\n }\n\n // we need to make sure to have at least one role\n $roles[] = static::ROLE_DEFAULT;\n\n return array_unique($roles);\n }", "public function getRoles()\n {\n $roles = $this->roles;\n\n foreach ($this->getGroups() as $group) {\n $roles = array_merge($roles, $group->getRoles());\n }\n\n // we need to make sure to have at least one role\n $roles[] = static::ROLE_DEFAULT;\n\n return array_unique($roles);\n }", "public function roles()\n {\n\n return Role::all();\n }", "public function getRoles(): array\n { \n\n $roles = [];\n if($this->organization){\n switch($this->organization->getPlan()){\n case 3:\n $roles[] = 'ROLE_FREE';\n break;\n case 2:\n $roles[] = 'ROLE_PREMIUM';\n break;\n case 1:\n $roles[] = 'ROLE_ENTERPRISE';\n break;\n }\n }\n\n switch($this->role){\n case 4:\n $roles[] = 'ROLE_COLLABORATOR';\n break;\n case 3:\n $roles[] = 'ROLE_ACTIVITY_MANAGER';\n break;\n case 2:\n $roles[] = 'ROLE_ADMIN';\n break;\n case 1:\n $roles[] = 'ROLE_SUPER_ADMIN';\n break;\n case 0:\n $roles[] = 'ROLE_ROOT';\n break;\n }\n\n return $roles;\n\n }", "public function roles() {\n\t\treturn $this->belongsToMany('CourseRole', 'course_user')->withPivot('course_role');\n\t}", "public function participantsByRole( $name )\n{\n $results = array();\n foreach ( $this->participants as $participant ) { \n foreach ($participant->roles as $role) { \n if( $participant->hasRole($name) ){\n $results[] = $participant;\n }\n }\n }\n return $results;\n}", "protected abstract function getAllowedRoles();", "public function roles()\n {\n if (($pivotModel = config('laravel-roles.roles.pivot_model'))) {\n return $this->belongsToMany(Role::class, 'user_roles')\n ->using($pivotModel)\n ->withTimestamps()\n ->withPivot(config('laravel-roles.roles.pivot', ['expires_at', 'permitable_id']));\n\n }\n\n return $this->belongsToMany(Role::class, 'user_roles')\n ->withTimestamps()\n ->withPivot(config('laravel-roles.roles.pivot', ['expires_at', 'permitable_id']));\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles()\n {\n $pivotTable = config('permission.database.permission_roles_table');\n\n $relatedModel = config('permission.database.roles_model');\n\n return $this->belongsToMany($relatedModel, $pivotTable, 'permission_id', 'role_id')->withTimestamps();\n }", "protected function getRoles() {\n return $this->roleStorage->loadMultiple();\n }", "public static function getListRole(){\n return SentinelRole::where('company_id_fk',Sentinel::getUser()->company_id_fk)->orWhere('company_id_fk')->lists('name','id')->all();\n }", "public function roles()\n {\n return $this->hasMany(Role::class);\n }", "public function getRoles() {\n return \\array_filter(Role::getMap(), [ $this, 'hasRole' ], \\ARRAY_FILTER_USE_KEY);\n }", "public function getRoles(): array\n {\n return [$this->role];\n }", "public function getParents()\n {\n return Menu::where('locale', getCurrentSessionAppLocale())\n ->where(function ($query){\n $query->whereNull('parent_slug')\n ->orWhere('parent_slug', '');\n })\n ->orderBy('menu_order', 'asc')\n ->get();\n }", "public function getRoles()\r\n {\r\n return $this->roles;\r\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class, 'user__role', 'user_id', 'role_id');\n }", "public function getRoles()\n {\n return array($this->role);\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Role')->withPivot( 'clearance');\n }" ]
[ "0.7576922", "0.755707", "0.6676651", "0.66742086", "0.6570631", "0.6514543", "0.6443818", "0.64192414", "0.6373145", "0.6320286", "0.6260952", "0.62567264", "0.6199791", "0.61962324", "0.618351", "0.61752534", "0.6166003", "0.6156555", "0.60732806", "0.607302", "0.60693574", "0.6047108", "0.6031902", "0.6018446", "0.5963066", "0.59064656", "0.59055823", "0.58904487", "0.5889002", "0.5880175", "0.5852618", "0.58485615", "0.583622", "0.5835871", "0.582874", "0.5815392", "0.5806505", "0.5792081", "0.5787638", "0.5774695", "0.5767152", "0.5767035", "0.57547086", "0.57506746", "0.57505053", "0.57505053", "0.57505053", "0.57505053", "0.5743703", "0.57428133", "0.5727496", "0.572567", "0.57150143", "0.5705465", "0.5697839", "0.56951785", "0.56951785", "0.56951785", "0.5693742", "0.5690436", "0.5682687", "0.5679731", "0.56719023", "0.5664192", "0.5664192", "0.56634533", "0.56617993", "0.56538844", "0.56505287", "0.56445897", "0.5632771", "0.5617384", "0.5615711", "0.5612186", "0.56031895", "0.5602597", "0.55961025", "0.5596009", "0.55898726", "0.5589481", "0.55886316", "0.55886316", "0.5584145", "0.55818206", "0.55813885", "0.5575236", "0.5575099", "0.55737185", "0.55700654", "0.55692595", "0.5562569", "0.55594003", "0.55572116", "0.5545605", "0.5543646", "0.55405194", "0.55377185", "0.5536516", "0.55327404", "0.5531614" ]
0.66226614
4
Recursively get parent roles
public static function getParentRoles($userRole, $system) { $parents = []; // Saving userRole to KnownParents to avoid endless recursion self::$knownParents[] = $userRole; // Looping in all Parents and if the userRole is in the children then add this parent to knownparents foreach (self::$allParentsWithChildren as $parentRole => $childrenRoles) { // If the role is in the childrenRoles then add the $parentRole to $parents if(in_array($userRole, $childrenRoles)) $parents[] = $parentRole; } // Add to ParentRoles unique roles self::$parentRoles = array_unique (array_merge (self::$parentRoles, $parents)); // Recursively get paretroles foreach ($parents as $parent) { if(!in_array($parent, self::$knownParents)) self::getParentRoles($parent, $system); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getParentRoles()\n {\n $parents = collect([]);\n\n $parent = $this->parent;\n\n while (!is_null($parent)) {\n $parents->push($parent);\n $parent = $parent->parent;\n }\n\n return $parents;\n }", "public function getAllRolesWithParentRoles() {\n return RoleHelper::getUserParentRoles($this);\n }", "public function getRoleTree()\n {\n $roleTree = Security::getRoleTree();\n\n $simplifyRoleTree = function (&$level) use (&$simplifyRoleTree) {\n foreach ($level as &$role) {\n $role['role'] = $role['role']->getId();\n if (!empty($role['children'])) {\n $simplifyRoleTree($role['children']);\n }\n }\n };\n\n $simplifyRoleTree($roleTree);\n\n return $roleTree;\n }", "public function parentPermissions()\n {\n $parentPermissions = collect([]);\n\n $parent = $this->parentrole;\n\n while (!is_null($parent)) {\n if ($parent->permissions->count()) {\n $parentPermissions->push($parent->permissions);\n }\n $parent = $parent->parentrole;\n }\n\n return $parentPermissions;\n }", "function getRoleSelectTree()\n {\n //find all roles below users current role\n $roles = $this->all();\n if (\\Config::get('user')->isAdmin())\n {\n return [[\n 'name' => $this->name,\n 'value' => $this->id,\n 'children' => $this->findChildren($roles, $this->id, 1)\n ]];\n\n }\n\n return $this->findChildren($roles, $this->id, 1);\n\n\n }", "public function parentRole()\n {\n if ($this->parent_id == null) {\n return null;\n }\n return $this->hasOne(Config::get('guardian.role'), 'id', 'parent_id');\n }", "protected function parentRole()\n {\n return !empty($this->parentRole) ? $this->parentRole : $this->parent->recordRole();\n }", "public function getChildren($role)\n {\n $children = array();\n $model = Pi::model('acl_inherit');\n $rowset = $model->select(array('parent' => $role));\n\n foreach ($rowset as $row) {\n $children[] = $row->child;\n $sub = $this->getChildren($row->child);\n $children = array_unique(array_merge($children, $sub));\n }\n\n return $children;\n }", "public function children()\n {\n return $this->hasMany(config('rbac.models.role'),'parent_id');\n }", "public function getAncestors($role)\n {\n $parents = array();\n $model = Pi::model('acl_inherit');\n $rowset = $model->select(array('child' => $role));\n\n foreach ($rowset as $row) {\n $parents[] = $row->parent;\n $sub = $this->getAncestors($row->parent);\n $parents = array_unique(array_merge($parents, $sub));\n }\n\n return $parents;\n }", "public function getRoles() {\n $ds = \\dibi::dataSource(\"\n SELECT r.*, rr.name AS parent_name\n FROM users_roles AS r\n LEFT JOIN users_roles AS rr ON rr.id = r.parent_id\n \");\n\n return $ds;\n }", "public function getRoles()\n {\n return $this->acl->getRoleAndParents($this->getRole());\n }", "function _get_role_data($role_id)\n\t{\n\t\t// Load models\n\t\t$this->ci->load->model('dx_auth/roles', 'roles');\n\t\t$this->ci->load->model('dx_auth/permissions', 'permissions');\n\t\n\t\t// Clear return value\n\t\t$role_name = '';\n\t\t$parent_roles_id = array();\n\t\t$parent_roles_name = array();\n\t\t$permission = array();\n\t\t$parent_permissions = array();\n\t\t\n\t\t/* Get role_name, parent_roles_id and parent_roles_name */\n\t\t\n\t\t// Get role query from role id\n\t\t$query = $this->ci->roles->get_role_by_id($role_id);\n\t\t\n\t\t// Check if role exist\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\t// Get row\n\t\t\t$role = $query->row();\t\t\n\t\n\t\t\t// Get role name\n\t\t\t$role_name = $role->name;\n\t\t\t\n\t\t\t/* \n\t\t\t\tCode below will search if user role_id have parent_id > 0 (which mean role_id have parent role_id)\n\t\t\t\tand do it recursively until parent_id reach 0 (no parent) or parent_id not found.\n\t\t\t\t\n\t\t\t\tIf anyone have better approach than this code, please let me know.\n\t\t\t*/\n\t\t\t\n\t\t\t// Check if role has parent id\n\t\t\tif ($role->parent_id > 0)\n\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t// Add to result array\n\t\t\t\t$parent_roles_id[] = $role->parent_id;\n\t\t\t\t\n\t\t\t\t// Set variable used in looping\n\t\t\t\t$finished = FALSE;\n\t\t\t\t$parent_id = $role->parent_id;\t\t\t\t\n\n\t\t\t\t// Get all parent id\n\t\t\t\twhile ($finished == FALSE)\n\t\t\t\t{\n\t\t\t\t\t$i_query = $this->ci->roles->get_role_by_id($parent_id);\n\t\t\t\t\t\n\t\t\t\t\t// If role exist\n\t\t\t\t\tif ($i_query->num_rows() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Get row\n\t\t\t\t\t\t$i_role = $i_query->row();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check if role doesn't have parent\n\t\t\t\t\t\tif ($i_role->parent_id == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get latest parent name\n\t\t\t\t\t\t\t$parent_roles_name[] = $i_role->name;\n\t\t\t\t\t\t\t// Stop looping\n\t\t\t\t\t\t\t$finished = TRUE;\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// Change parent id for next looping\n\t\t\t\t\t\t\t$parent_id = $i_role->parent_id;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Add to result array\n\t\t\t\t\t\t\t$parent_roles_id[] = $parent_id;\n\t\t\t\t\t\t\t$parent_roles_name[] = $i_role->name;\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\n\t\t\t\t\t\t// Remove latest parent_roles_id since parent_id not found\n\t\t\t\t\t\tarray_pop($parent_roles_id);\n\t\t\t\t\t\t// Stop looping\n\t\t\t\t\t\t$finished = TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* End of Get role_name, parent_roles_id and parent_roles_name */\n\t\t\n\t\t/* Get user and parents permission */\n\t\t\n\t\t// Get user role permission\n\t\t$permission = $this->ci->permissions->get_permission_data($role_id);\n\t\t\n\t\t// Get user role parent permissions\n\t\tif ( ! empty($parent_roles_id))\n\t\t{\n\t\t\t$parent_permissions = $this->ci->permissions->get_permissions_data($parent_roles_id);\n\t\t}\n\t\t\n\t\t/* End of Get user and parents permission */\n\t\t\n\t\t// Set return value\n\t\t$data['role_name'] = $role_name;\n\t\t$data['parent_roles_id'] = $parent_roles_id;\n\t\t$data['parent_roles_name'] = $parent_roles_name;\n\t\t$data['permission'] = $permission;\n\t\t$data['parent_permissions'] = $parent_permissions;\n\t\t\n\t\treturn $data;\n\t}", "function getSelectableParents()\n {\n $roles = $this->all();\n $tree = $this->findChildren($roles, 0, 1);\n\n //recursively go trough the array and delete....\n\n $trimmed_tree = $this->removeTreeNode($tree, $this->id);\n return $trimmed_tree;\n\n\n\n\n }", "public function getRoles()\n {\n $roles = $this->getExplicitRoles();\n\n if (!$roles) {\n return null;\n }\n\n $finalRoles = array();\n foreach ($roles as $role) {\n $childRoles = $role->getChildRoles();\n\n foreach ($childRoles as $childRole) {\n if (!in_array($childRole, $finalRoles)) {\n $finalRoles[] = $childRole;\n }\n }\n\n if (!in_array($role, $finalRoles)) {\n $finalRoles[] = $role;\n }\n }\n\n return $finalRoles;\n }", "public function getChildRoleIDs()\n\t{\n\t\t$returnValue = array();\n\n\t\tif (class_exists('Default_Model_Role', TRUE)) {\n\t\t\ttry {\n\t\t\t\t$roleCollection = Doctrine_Query::create()\n\t\t\t\t\t->from('Default_Model_Role m')\n\t\t\t\t\t->where('m.role_id = ? ', array($this->_roleId))\n\t\t\t\t\t->execute()\n\t\t\t\t;\n\t\t\t\tforeach ($roleCollection as $roleModel) {\n\t\t\t\t\t$returnValue = $this->_retrieveChildRoleId($roleModel->id);\n\t\t\t\t}\n\t\t\t\t$returnValue = array_unique($returnValue);\n\n\t\t\t\t/**\n\t\t\t\t * cause of non ending trees we have to add guestID, if not yet in here\n\t\t\t\t */\n\t\t\t\t$roleGuestModel = Doctrine_Query::create()\n\t\t\t\t\t->from('Default_Model_Role m')\n\t\t\t\t\t->where('m.short = ? ', array('guest'))\n\t\t\t\t\t->limit(1)\n\t\t\t\t\t->execute()\n\t\t\t\t\t->getFirst()\n\t\t\t\t;\n\t\t\t\tif ($roleGuestModel) {\n\t\t\t\t\tif (!in_array($roleGuestModel->id, $returnValue) &&\n\t\t\t\t\t\t$this->_roleId != $roleGuestModel->id) {\n\n\t\t\t\t\t\t$returnValue[] = $roleGuestModel->id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Doctrine_Connection_Exception $exception) {\n\t\t\t\t/**\n\t\t\t\t * @todo maybe do something\n\t\t\t\t */\n\t\t\t}\n\t\t}\n\n\t\treturn $returnValue;\n\t}", "public function parentrole()\n {\n return $this->belongsTo(self::class, 'parent_id');\n }", "public function getAvailableParents($id) {\n return dibi::fetchPairs(\"\n SELECT id, name\n FROM users_roles\n WHERE id != %i\", (int)$id\n ); \n }", "function get_user_roles($context, $userid=0, $checkparentcontexts=true, $order='c.contextlevel DESC, r.sortorder ASC', $view=false) {\n\n global $USER, $CFG, $db;\n\n if (empty($userid)) {\n if (empty($USER->id)) {\n return array();\n }\n $userid = $USER->id;\n }\n // set up hidden sql\n $hiddensql = ($view && !has_capability('moodle/role:viewhiddenassigns', $context))? ' AND ra.hidden = 0 ':'';\n\n if ($checkparentcontexts && ($parents = get_parent_contexts($context))) {\n $contexts = ' ra.contextid IN ('.implode(',' , $parents).','.$context->id.')';\n } else {\n $contexts = ' ra.contextid = \\''.$context->id.'\\'';\n }\n\n return get_records_sql('SELECT ra.*, r.name, r.shortname\n FROM '.$CFG->prefix.'role_assignments ra,\n '.$CFG->prefix.'role r,\n '.$CFG->prefix.'context c\n WHERE ra.userid = '.$userid.\n ' AND ra.roleid = r.id\n AND ra.contextid = c.id\n AND '.$contexts . $hiddensql .\n ' ORDER BY '.$order);\n}", "public function getParents() {}", "function get_all_menu_selected_by_parent($params) {\n $sql = \"SELECT a.*, b.role_id, b.role_tp\n FROM com_menu a\n LEFT JOIN (SELECT * FROM com_role_menu WHERE role_id = ?) b ON a.nav_id = b.nav_id\n WHERE portal_id = ? AND parent_id = ?\n ORDER BY nav_no ASC\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function getRole($id) {\n return dibi::fetch(\"\n SELECT r.*, rr.name AS parent_name\n FROM users_roles AS r\n LEFT JOIN users_roles AS rr ON rr.id = r.parent_id\n WHERE r.id = %i\", $id\n );\n }", "public function parentPerms()\n {\n if ($this->parent_id == null) {\n return null;\n }\n\n return $this->belongsToMany(Config::get('guardian.permission'), Config::get('guardian.permission_role_table'), Config::get('guardian.role_foreign_key'), Config::get('guardian.permission_foreign_key'));\n }", "public function parent()\n {\n if ($this->parent_id == null) {\n return null;\n }\n return $this->hasOne(Config::get('guardian.role'), 'id', 'parent_id');\n }", "public function getParents();", "abstract protected function getRoles();", "public static function getAllParentRoles($userRole, $system)\n\t{\n\t\t// Filling $allParentsWithChildren\n\t\tif(empty(self::$allParentsWithChildren))\n\t\t{\n\t\t\t// Getting all role-manage permission for the current user\n\t\t\t$parents = PermissionModel::where('permission' , 'like' , 'role-manage.%');\n\n\t\t\t// if system flag then get all roles in the estate plus the roles with site_id = null\n\t\t\tif($system)\n\t\t\t{\n\t\t\t\t$rolesInEstate = self::getRolesInEstate(true);\n\t\t\t\t$parents = $parents->whereIn('role_id', array_keys($rolesInEstate));\n\t\t\t}\n\n\t\t\t$parents = $parents->get()->toArray();\n\n\t\t\t// Will store all Parents and their role-manage roles\n\t\t\tforeach ($parents as $parent)\n\t\t\t{\n\t\t\t\tself::$allParentsWithChildren[$parent['role_id']][] = substr($parent['permission'], 12);\n\t\t\t}\n\t\t}\n\n\t\tself::getParentRoles($userRole, $system);\n\t\treturn self::$parentRoles;\n\t}", "public function getMenuParents()\n {\n return $this->db->select('*')->from('admin_menu')->where('parent',0)->get()->result_array();\n }", "function getSubRoleId3($self = true, $role_id=0){\n //echo M('role')->getLastSql();\n //dump($all_role);\n\n $role_id = session('role_id');\n $below_role = getSubRole3($role_id, $all_role);\n\n //dump($below_role);\n\n if ($self) {\n $below_ids[] = $role_id;\n }\n foreach ($below_role as $key=>$value) {\n $below_ids[] = $value['role_id'];\n }\n //dump($below_ids);exit;\n\n return array_unique($below_ids);\n}", "public function get_admin_module_parents()\n\t{\n\t\t$this->db->where(array('module_user' => 1, 'module_parent' => 0));\n\t\t$this->db->order_by('module_position');\n\t\treturn $this->db->get('module');\n\t}", "public function getInheritedRoles(array $roles): array;", "function parentNode() {\n if (!$this->id && empty($this->data)) {\n return null;\n }\n if (isset($this->data['User']['role_id'])) {\n $roleId = $this->data['User']['role_id'];\n } else {\n $roleId = $this->field('role_id');\n }\n if (!$roleId) {\n return null;\n } else {\n return array('Role' => array('id' => $roleId));\n }\n }", "public function getParents()\n {\n return Menu::where('locale', getCurrentSessionAppLocale())\n ->where(function ($query){\n $query->whereNull('parent_slug')\n ->orWhere('parent_slug', '');\n })\n ->orderBy('menu_order', 'asc')\n ->get();\n }", "public function findRoles() {\n\t\t\n\t}", "public function get_parents(){\n\t\treturn $this->master->parent_list_construct();\n\t}", "function get_parent_categories()\n \t{\n \t\treturn $this->conn_db->get_parent_categories($this->uid);\t\n \t\t\n \t}", "public function parent()\n {\n return $this->belongsTo(config('rbac.models.role'),'parent_id');\n }", "function getSubRoleId4($self = true, $role_id=0){\n $role_id = session('role_id');\n $below_role = getSubRole4($role_id, $all_role);\n if ($self) {\n $below_ids[] = $role_id;\n }\n foreach ($below_role as $key=>$value) {\n $below_ids[] = $value['role_id'];\n }\n //dump($below_ids);exit;\n\n return array_unique($below_ids);\n}", "public function getParents()\n\t{\n\t\tif ($this->get('parents'))\n\t\t{\n\t\t\treturn $this->get('parents');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->setParents();\n\t\t}\n\t}", "public function getParents()\n {\n return $this->Parents_->filter(function ($persona) {\n return $persona->approved;\n })->pluckNamed('Parent');\n }", "public function getGrandParent();", "public function getParent($role)\n {\n if (!is_object($role)) {\n if (is_numeric($role)) {\n return $this->getData('registry/'.$role)->getParent();\n } else {\n return $this->getIdentifier($role)->getParent();\n }\n } elseif ($role instanceof Unus_Role_Object) {\n return $role->getParent();\n } else {\n throw new Unus_Role_Exception('Cannot retrieve role parents expected string, interger or Unus_Role_Object; instanceof '.get_class($role).' given');\n }\n }", "public function admin_getParents() {\n\t\tif (empty($this->request->data[$this->modelClass]['menu_id'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->set('json', $this->{$this->modelClass}->getParents($this->request->data[$this->modelClass]['menu_id']));\n\t}", "public function & GetRoles ();", "public function ancestors()\n {\n return $this->belongsToMany(Node::class, 'rbac_paths','last_node_id','first_node_id')\n ->as('path')->using(Path::class);\n }", "public function get_parents()\n {\n $hierarchy = array();\n $hierarchy[] = $this;\n\n $d = dirname($this->path);\n while (strlen($d) >= strlen(App::config('src_path')))\n {\n $hierarchy[] = new folder($d);\n $d = dirname($d);\n }\n\n return array_reverse($hierarchy);\n }", "public function parents()\n {\n return $this->belongsToMany(Node::class, 'rbac_edges','child_id','parent_id')\n ->as('edge')->using(Edge::class);\n }", "public function getParents()\n {\n return $this->parents;\n }", "public function parentList()\n {\n return output($this->UserDetails->where([\"roleId\"=>$this->getUserRoleId('parent')])->read(),'success','SM001','',\"\");\n }", "public function getAdminMenu( ) {\n \t$parent = $this->find('all', array(\n 'conditions' => array(\n 'Page.parent_id IS NULL',\n ),\n 'contain'=>array(\n ),\n 'fields'=>array('Page.lft', 'Page.rght'),\n 'order'=>array('Page.lft' => 'ASC')\n ));\n\t\t\n\t\t$recs = array(); \n foreach($parent as $v){\n \t$info = $this->find('threaded', array(\n\t 'conditions' => array(\n\t 'Page.lft >=' => $v['Page']['lft'], \n\t 'Page.rght <=' => $v['Page']['rght'],\n\t ),\n\t 'contain'=>array()\n\t ));\n\t \n\t $recs = array_merge($recs, $info);\n\t }\n\t\t\n\t\treturn $recs;\n }", "public function get_parent_links()\n\t {\n\t\t $parent = array();\n\t\t foreach ($this->get_links() as $link)\n\t\t {\n\t\t\t if (!$link->get_parent_id())\n\t\t\t {\n\t\t\t\t $parent[] = $link;\n\t\t\t }\n\t\t }\n\t\t return $parent;\n\t }", "public function run()\n {\n $roles=[\n [ ///1\n 'id' => '1',\n 'name' => 'الحسابات',\n 'url' => '#',\n 'icon' => 'fas fa-users',\n 'order_id' => '5',\n 'parent_id' => null\n ],\n [ ///2\n 'id' => '2',\n 'name' => 'المستخدمين',\n 'url' => '/admin/users',\n 'icon' => '',\n 'order_id' => '10',\n 'parent_id' => '1'\n ],\n [ ///3\n 'id' => '3',\n 'name' => 'المكاتب',\n 'url' => '/admin/offices',\n 'icon' => '',\n 'order_id' => '15',\n 'parent_id' => '1'\n ],\n [ ///4\n 'id' => '4',\n 'name' => 'تنشيط الحسابات',\n 'url' => '#',\n 'icon' => 'fas fa-user-check',\n 'order_id' => '20',\n 'parent_id' => null\n ],\n [ ///5\n 'id' => '5',\n 'name' => 'تنشيط حسابات المستخدمين',\n 'url' => '/admin/users/active',\n 'icon' => '',\n 'order_id' => '25',\n 'parent_id' => '4'\n ],\n [ ///6\n 'id' => '6',\n 'name' => 'تنشيط حسابات المكاتب',\n 'url' => '/admin/offices/active',\n 'icon' => '',\n 'order_id' => '30',\n 'parent_id' => '4'\n ],\n [ ///7\n 'id' => '7',\n 'name' => 'محفظة أرباح إرسال الأموال',\n 'url' => '/admin/fee/balance',\n 'icon' => 'fas fa-wallet',\n 'order_id' => '35',\n 'parent_id' => null\n ],\n [ ///8\n 'id' => '8',\n 'name' => 'أسعار العملات',\n 'url' => '/admin/currency',\n 'icon' => 'fas fa-coins',\n 'order_id' => '40',\n 'parent_id' => null\n ],\n [ ///9\n 'id' => '9',\n 'name' => 'عمولة الموقع',\n 'url' => '/admin/fee',\n 'icon' => 'fas fa-money-bill-wave-alt',\n 'order_id' => '45',\n 'parent_id' => null\n ],\n [ ///10\n 'id' => '10',\n 'name' => 'سجل العمليات',\n 'url' => '#',\n 'icon' => 'fas fa-history',\n 'order_id' => '50',\n 'parent_id' => null\n ],\n [ ///11\n 'id' => '11',\n 'name' => 'سجل إرسال الأموال',\n 'url' => '/admin/logs',\n 'icon' => '',\n 'order_id' => '55',\n 'parent_id' => '10'\n ],\n [ ///12\n 'id' => '12',\n 'name' => 'سجل تبديل العملات',\n 'url' => '/admin/exchangelogs',\n 'icon' => '',\n 'order_id' => '60',\n 'parent_id' => '10'\n ],\n [ ///13\n 'id' => '13',\n 'name' => 'سجل المكاتب',\n 'url' => '/admin/officelogs',\n 'icon' => '',\n 'order_id' => '65',\n 'parent_id' => '10'\n ],\n [ ///14\n 'id' => '14',\n 'name' => 'الدعم الفني',\n 'url' => '/admin/support',\n 'icon' => 'fa fa-phone-square',\n 'order_id' => '70',\n 'parent_id' => null\n ]\n \n ];\n foreach ($roles as $key=>$value){\n Page::create($value);\n }\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "private function get_current_roles() {\n\t\tif (isset($this->current_user_roles)) {\n\t\t\treturn $this->current_user_roles;\n\t\t}\n\n\t\t$user_info = wp_get_current_user();\n\n\t\t$this->current_user_roles = !empty($user_info->roles) ?\n\t\t\t$user_info->roles :\n\t\t\tarray('guest');\n\n\t\treturn $this->current_user_roles;\n\t}", "public function getRoles()\n {\n #obsolete, I don't wnat user roles, I want the permission those roles are linked to\n # so I just need a getPermissions once, store those constants in a small session array\n #$roles = $this->roles;\n\n #d($roles);\n\n #foreach ($roles as $role) {\n # echo $role->name;\n #}\n }", "public function childrenOf(int $roleId): Collection;", "public function getParents()\n {\n \t$currentPos = trim($this->getPosition());\n \tif($currentPos === '' || $currentPos === '1')\n \t\treturn array($this);\n \t\n \t$posArray = array();\n \t$length = strlen($currentPos);\n \tfor($i = 0; $i < ($length - 1) / self::POS_LENGTH_PER_LEVEL ; $i++)\n \t{\n \t\t$posArray[] = trim(substr($currentPos, 0, ($i * self::POS_LENGTH_PER_LEVEL) + 1));\n \t}\n \treturn self::getAllByCriteria('rootId = ? and position in (' . implode(',', array_fill(0, count($posArray), '?')) . ')', array_merge(array($this->getRoot()->getId()), $posArray), false, null, DaoQuery::DEFAUTL_PAGE_SIZE, array('position' => 'asc'));\n }", "public function getRoleId()\n {\n // return the first parent role\n foreach ($this->getUserRoles() as $role) {\n return $role->getRoleId();\n }\n }", "function get_parent_contexts($context) {\n\n static $pcontexts; // cache\n if (isset($pcontexts[$context->id])) {\n return ($pcontexts[$context->id]); \n }\n\n switch ($context->contextlevel) {\n\n case CONTEXT_SYSTEM: // no parent\n return array();\n break;\n\n case CONTEXT_PERSONAL:\n if (!$parent = get_context_instance(CONTEXT_SYSTEM)) {\n return array();\n } else {\n $res = array($parent->id);\n $pcontexts[$context->id] = $res; \n return $res;\n }\n break;\n\n case CONTEXT_USER:\n if (!$parent = get_context_instance(CONTEXT_SYSTEM)) {\n return array();\n } else {\n $res = array($parent->id);\n $pcontexts[$context->id] = $res; \n return $res;\n }\n break;\n\n case CONTEXT_COURSECAT: // Coursecat -> coursecat or site\n case CONTEXT_COURSE: // 1 to 1 to course cat\n $parents = get_parent_cats($context);\n $parents = array_reverse($parents);\n $systemcontext = get_context_instance(CONTEXT_SYSTEM);\n return $pcontexts[$context->id] = array_merge($parents, array($systemcontext->id));\n break;\n\n case CONTEXT_GROUP: // 1 to 1 to course\n if (! $group = groups_get_group($context->instanceid)) {\n return array();\n }\n if ($parent = get_context_instance(CONTEXT_COURSE, $group->courseid)) {\n $res = array_merge(array($parent->id), get_parent_contexts($parent));\n $pcontexts[$context->id] = $res;\n return $res;\n } else {\n return array();\n }\n break;\n\n case CONTEXT_MODULE: // 1 to 1 to course\n if (!$cm = get_record('course_modules','id',$context->instanceid)) {\n return array();\n }\n if ($parent = get_context_instance(CONTEXT_COURSE, $cm->course)) {\n $res = array_merge(array($parent->id), get_parent_contexts($parent));\n $pcontexts[$context->id] = $res;\n return $res;\n } else {\n return array();\n }\n break;\n\n case CONTEXT_BLOCK: // not necessarily 1 to 1 to course\n if (!$block = get_record('block_instance','id',$context->instanceid)) {\n return array();\n }\n // fix for MDL-9656, block parents are not necessarily courses\n if ($block->pagetype == 'course-view') {\n $parent = get_context_instance(CONTEXT_COURSE, $block->pageid);\n } else {\n $parent = get_context_instance(CONTEXT_SYSTEM); \n } \n \n if ($parent) {\n $res = array_merge(array($parent->id), get_parent_contexts($parent));\n $pcontexts[$context->id] = $res;\n return $res;\n } else {\n return array(); \n }\n break;\n\n default:\n error('This is an unknown context (' . $context->contextlevel . ') in get_parent_contexts!');\n return false;\n }\n}", "public function getGrandparent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT parent FROM pages WHERE guid = (SELECT parent FROM pages where guid = '{$this->guid}')\"); \n\t\t\treturn $data;\n\t\t}", "public function getRoles()\n {\n $roles = array();\n \n foreach ($this->roles as $role) {\n $roles = array_merge($roles, $role->getRecursiveNames());\n }\n \n return array_unique($roles);\n }", "public function getRoles(): array;", "public function getDirectRoles() {\n return $this->roles;\n }", "public function get_parent();", "private function parents() {\n return array_map(array($this, 'page_info_from_id'), $this->parent_ids());\n }", "private static function getParentChildren():array\n {\n $parentChildren = [];\n $categories = self::select('*')->get()->toArray();\n\n foreach ($categories as $id){\n $children = [];\n foreach ($categories as $row){\n if ($id['id'] == $row['parent_id']){\n $children[] = $row['id'];\n }\n }\n $parentChildren[$id['id']] = $children;\n }\n\n return $parentChildren;\n\n }", "protected function getLowerRoles(array $elements, $parentId = 0, &$return = [])\n {\n foreach ($elements as $element) {\n if ($element['parent_id'] != $parentId) {\n continue;\n }\n $children = $this->getLowerRoles($elements, $element['id'], $return);\n if ($children) {\n foreach ($children as $child) {\n $return[] = $child['id'];\n }\n }\n $return[] = $element['id'];\n }\n\n return array_filter($return);\n }", "public function getRoles()\n {\n // get roles of own Publisher, note: WITHOUT role 'ROLE_PUBLISHER'\n $roles = $this->publisher->getRoles();\n\n if (($key = array_search('ROLE_PUBLISHER', $roles)) !== false) {\n unset($roles[$key]);\n }\n\n // merge all roles of this and own Publisher\n $roles = array_merge($this->roles, $roles);\n\n foreach ($this->getGroups() as $group) {\n $roles = array_merge($roles, $group->getRoles());\n }\n\n // we need to make sure to have at least one role\n $roles[] = static::ROLE_DEFAULT;\n\n return array_unique($roles);\n }", "public function get_roles()\n {\n $users_roles = user_role_active_record::search()->where('uid', $this->uid)->exec();\n $roles = array();\n foreach ($users_roles as $users_role) {\n $roles[] = role_active_record::search()->where('rid', $users_role->rid)->execOne();\n }\n return $roles;\n }", "public function all_parent()\r\n\t{\r\n\t\t$query = $this->db->select('*')->get('menu')->result_array(); \r\n\t \treturn $query;\r\n\t}", "private function getChildrens($parentId, $roleId){\r\n\t\t$module = new Table_Modules();\r\n\t\t$acl = new Table_Acl();\r\n\t\t$childrens = $module -> selectModules( $where = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"parent_id\" => array( \"=\" => $parentId ), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"display_order\" => array (\">\" => 0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t \t), $order = \"display_order\"\r\n\t\t\t\t\t\t\t\t\t\t\t);\t\t\r\n\t\t$json = '['; $i=0; // json start\r\n\t\tforeach($childrens as $child){ // browse the childrens one by one\r\n\t\t\tif($acl->hasAccess($roleId, $child->id, \"read\")){ //$acl->hasAccess($roleId, $child->id, \"read\")\r\n\t\t\t\t$i++;\r\n\t\t\t\t// generating json\r\n\t\t\t\t//if this is not the first row, add a comma\r\n\t\t\t\t$json .= ( $i>1 )?\",\":\"\";\t\r\n\t\t\t\t$json .= '{\"title\": \"'.$child->{'name_'.$_SESSION['lang']['selected']}.'\", \"key\": \"'.$child->id.'\" , \"form\": \"'.$child->form_name.'\"';\r\n\t\t\t\t//count the number of childrens for this child\r\n\t\t\t\t$hasChilds = $module->selectModules($where = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"parent_id\" => array(\"=\" => $child->id)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\t\t\r\n\t\t\t\t//if there are any childrens, make a recoursive call\r\n\t\t\t\tif( $hasChilds->count() ){\r\n\t\t\t\t\t$json .= ', \"isFolder\": true, ';\r\n\t\t\t\t\t$json .= '\"children\":'. $this->getChildrens($child->id, $roleId);\r\n\t\t\t\t}\r\n\t\t\t\t$json .= '}';\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t$json .= ']'; // json end\r\n\t\t\r\n\t\treturn $json;\r\n\t}", "public function getParents()\r\n\t{\r\n\t\treturn $this->parentNodes;\r\n\t}", "public function roles(): MorphToMany;", "public function roles();", "public function roles();", "public function roles();", "public function roles();", "function get_all_roles() {\n return get_records('role', '', '', 'sortorder ASC');\n}", "public function getRoles()\n {\n return $this->getRelation('roles');\n }", "public function getAll()\n {\n try{\n return $this->roles;\n }\n catch (\\Exception $exception)\n {\n return null;\n }\n }", "public function getAllParents()\n {\n $parents = array();\n\n $parent = $this;\n\n while ($parent = $parent->getParent()) {\n $parents[] = $parent;\n }\n\n return $parents;\n }", "public function participantsByRole( $name )\n{\n $results = array();\n foreach ( $this->participants as $participant ) { \n foreach ($participant->roles as $role) { \n if( $participant->hasRole($name) ){\n $results[] = $participant;\n }\n }\n }\n return $results;\n}", "public function getRoles() {\n return $this->getRelation(\"roles\");\n }", "function getRoles()\n {\n $roles = array();\n\n foreach ($this->grupos as $grupo) {\n $roles[] = $grupo->getRole();\n }\n return $roles;\n }", "public function getRolePagination()\n {\n try{\n $roles=\\Config::get('app.pagi');\n return Role::paginate($roles);\n //return $this->roles->paginate($roles);\n }\n catch (\\Exception $exception)\n {\n return null;\n }\n }", "function getRoles () {\n return array(\"user.image.edit\",\"user.image.view\");\n }", "public function rolesForUser();", "public static function parentCategories()\n {\n return Category::with('children')\n ->orderBy('priority')\n ->where([\n 'category_type' => static::class,\n 'parent_id' => null,\n ])->get();\n }", "function is_role($roles = array(), $use_role_name = TRUE, $check_parent = TRUE)\n\t{\n\t\t// Default return value\n\t\t$result = FALSE;\n\t\n\t\t// Build checking array\n\t\t$check_array = array();\n\t\t\n\t\tif ($check_parent)\n\t\t{\n\t\t\t// Add parent roles into check array\n\t\t\tif ($use_role_name)\n\t\t\t{\n\t\t\t\t$check_array = $this->ci->session->userdata('DX_parent_roles_name');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$check_array = $this->ci->session->userdata('DX_parent_roles_id');\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Add current role into check array\n\t\tif ($use_role_name)\n\t\t{\n\t\t\tarray_push($check_array, $this->ci->session->userdata('DX_role_name'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarray_push($check_array, $this->ci->session->userdata('DX_role_id'));\n\t\t}\n\t\t\n\t\t// If $roles not array then we add it into an array\n\t\tif ( ! is_array($roles))\n\t\t{\n\t\t\t$roles = array($roles);\n\t\t}\n\t\t\n\t\tif ($use_role_name)\n\t\t{\n\t\t\t// Convert check array into lowercase since we want case insensitive checking\n\t\t\tfor ($i = 0; $i < count($check_array); $i++)\n\t\t\t{\n\t\t\t\t$check_array[$i] = strtolower($check_array[$i]);\n\t\t\t}\n\t\t\n\t\t\t// Convert roles into lowercase since we want insensitive checking\n\t\t\tfor ($i = 0; $i < count($roles); $i++)\n\t\t\t{\n\t\t\t\t$roles[$i] = strtolower($roles[$i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check if roles exist in check_array\n\t\tif ($this->_array_in_array($roles, $check_array))\n\t\t{\n\t\t\t$result = TRUE;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function grandChildren() {\n return $this->children()->children();\n }", "public function currentRoleIds()\n {\n $roles = $this->roles;\n $roleIds = false;\n if( !empty( $roles ) ) {\n $roleIds = array();\n foreach( $roles as &$role )\n {\n $roleIds[] = $role->id;\n }\n }\n return $roleIds;\n }", "public function getRoles(): iterable\n {\n return [];\n }", "private function get_all_roles(){\n return Role::all();\n }", "public function getRole() {}", "function get_role_list() {\n\t\treturn $this->db->get('system_security.security_role');\n\t\t\n\t}", "public function ancestors()\r\n {\r\n $return = array();\r\n \r\n $item = $this;\r\n while (!empty($item->parent))\r\n {\r\n $clone = (new static())->load(array(\r\n '_id' => new \\MongoId((string) $item->parent)\r\n ));\r\n unset($item);\r\n if (!empty($clone->id))\r\n {\r\n array_unshift($return, $clone);\r\n if (!empty($clone->parent))\r\n {\r\n $item = $clone;\r\n }\r\n }\r\n }\r\n \r\n return $return;\r\n }", "protected abstract function getAllowedRoles();", "function current_user_roles($user_id = null)\n{\n if (!is_null($user_id)) {\n return \\Yii::$app->authManager->getRolesByUser($user_id);\n }\n\n// return \\base\\libs\\Redis::getUserRoles($user_id);\n}" ]
[ "0.75837404", "0.74578226", "0.67772174", "0.6699273", "0.66572404", "0.66326034", "0.65161085", "0.6456166", "0.6384521", "0.6374006", "0.6365956", "0.6302173", "0.62929684", "0.6245197", "0.61783767", "0.6143905", "0.6115913", "0.61003155", "0.60457706", "0.6044245", "0.6025045", "0.59567004", "0.5920654", "0.5909006", "0.59029484", "0.5896994", "0.5881237", "0.5874928", "0.58741385", "0.5859269", "0.58233464", "0.57993424", "0.5793922", "0.5784378", "0.57618546", "0.5757317", "0.57440335", "0.5694739", "0.56361455", "0.56336653", "0.56304795", "0.5616734", "0.5561305", "0.55387145", "0.5529665", "0.55245394", "0.5520279", "0.548074", "0.5473228", "0.54598176", "0.5458746", "0.5437825", "0.5432738", "0.5432738", "0.5432738", "0.5421394", "0.5407509", "0.5387371", "0.5383863", "0.53805804", "0.53744656", "0.5374081", "0.53724825", "0.5369031", "0.53649086", "0.5361586", "0.53598905", "0.535053", "0.5348714", "0.53366953", "0.5322929", "0.532224", "0.5317565", "0.5310355", "0.5307952", "0.529297", "0.529297", "0.529297", "0.529297", "0.52678835", "0.5253745", "0.52504385", "0.5244543", "0.52394086", "0.5235802", "0.52352613", "0.5219362", "0.5211384", "0.5207262", "0.5195057", "0.5189359", "0.5188829", "0.518815", "0.518269", "0.5177427", "0.51688325", "0.51617783", "0.51608986", "0.5159476", "0.51563823" ]
0.6107252
17
Getting all roles that user can manage
public static function getManagedRoles($userRole, $system) { // Getting all role-manage permission for the current user $result = PermissionModel::where('role_id', $userRole) ->where('permission' , 'like' , 'role-manage.%') ->select('permission') ->get() ->toArray(); // if system flag then get all roles in the estate plus the roles with site_id = null if($system) { $rolesInEstate = self::getRolesInEstate(true); } // Putting only the role_id in the $rolesToManage array by cutting 12 characters from the permission i.e. cutting 'role-manage.' foreach ($result as $rows) { foreach ($rows as $row) { $roleId = substr($row, 12); if ($roleId != $userRole) { if ($system) { // If in the $rolesInEstate then add it to the results if (in_array($roleId, array_keys($rolesInEstate))) { self::$rolesToManage[$roleId] = $roleId; } } else { self::$rolesToManage[$roleId] = $roleId; } } } } return self::$rolesToManage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_all_roles(){\n return Role::all();\n }", "public function get_all_roles()\n {\n return App\\Role::all();\n }", "public function getAllRoles(): array;", "public function get_all_roles(){\n\t\treturn ORM::factory('role')->find_all()->as_array();\n\t}", "function getAllRoles(){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllRoles();\r\n }", "public function getAllRoles()\n {\n return \\EntityManager::getRepository('stoykov\\Ohrana\\Models\\Doctrine\\Role')->findAll();\n }", "public function getRoles()\n {\n #obsolete, I don't wnat user roles, I want the permission those roles are linked to\n # so I just need a getPermissions once, store those constants in a small session array\n #$roles = $this->roles;\n\n #d($roles);\n\n #foreach ($roles as $role) {\n # echo $role->name;\n #}\n }", "public function getRoles(): array;", "public function getAllRoles()\n {\n $id = $this->get(TableFactory::getUserModel()\n ->getPrimaryKey());\n\n return Cache::remember(sprintf(Constants::CACHE_ROLES, $id), function() use ($id) {\n return TableFactory::getRoleModel()\n ->find()\n ->matching('Users', function(Query $query) use ($id) {\n return $query->where(['Users.id' => $id]);\n })\n ->toArray();\n });\n }", "protected function getRoles() {\n return $this->roleStorage->loadMultiple();\n }", "public function rolesForUser();", "public static function getAll()\n {\n return Role::with(['permissions'])->get();\n }", "function get_all_roles() {\n return get_records('role', '', '', 'sortorder ASC');\n}", "public function roles()\n {\n\n return Role::all();\n }", "public function getAllRoles()\n {\n return $this->roles;\n }", "abstract protected function getRoles();", "function get_role_list() {\n\t\treturn $this->db->get('system_security.security_role');\n\t\t\n\t}", "public function get_roles() {\n return DB::query(Database::SELECT, 'SELECT * FROM roles WHERE id > 1')\n ->as_object()\n ->execute($this->db);\n }", "public function retrieveAllRoles()\n {\n return $this->invoker->getAllRoles($this->factory->createNewRolesObject());\n\n }", "public function getRoles()\n {\n return $this->userRoles->toArray();\n /*$roles = array();\n foreach ($this->userRoles as $role) {\n $roles[] = $role->getRole();\n }\n\n return $roles;*/\n }", "public function getRoles()\n {\n\n $rolesReturn = [];\n $roles = $this->roles()->with(['role'])->get();\n\n $rolesReturn = $roles->pluck('role.name');\n\n // Add Standard role to the user roles\n\n if($rolesReturn->contains(config('user.standardRole')) === false)\n {\n $rolesReturn->push(config('user.standardRole'));\n }\n\n return $rolesReturn;\n\n }", "public function getRoles()\n {\n return $this->hasMany(AuthRole::className(), ['id' => 'role_id'])->viaTable('auth_user_role', ['user_id' => 'id']);\n }", "public function getRoles(): iterable\n {\n return [];\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getAll()\n {\n try{\n return $this->roles;\n }\n catch (\\Exception $exception)\n {\n return null;\n }\n }", "public function getAllRoles()\n {\n return $this->repository->getAllRoles();\n }", "public function getAvailableRoles() ;", "public function getRoles()\n {\n $roles = Role::lists('name','id');\n\n return $roles;\n }", "public function getRoles()\n {\n $id = Auth::id();\n $roles = \\App\\Models\\User::find($id)->roles;\n\n return $roles;\n }", "public function getAll()\n {\n return $this->roles->whereStatus(1)->orderBy('id', 'desc')->get();\n }", "public function & GetRoles ();", "public function roleListAll() {\n $this->_adminUserDao = new AdminUserDao();\n\n $ret = array();\n $roles = $this->_adminroledao->getAll();\n foreach ($roles as $role) {\n $user = $this->_adminUserDao->getRow(array(array('username', '=', $role->owner)));\n if($user){\n $ret[$role->owner]['role'][] = $role;\n $ret[$role->owner]['user'] = $user;\n }else{\n if($role->owner == config('admin.user.super_user.username')){\n $ret[$role->owner]['role'][] = $role;\n// $ret[$role->owner]['user'] = (new AdminUserDao())->fill(config('admin.user.super_user'));\n// $ret[$role->owner]['user'] = $this->_adminUserDao->getRow(array(array('id', '=', config('admin.user\n $ret[$role->owner]['user']['username'] = $role->owner;\n }\n }\n }\n return $ret;\n }", "public function ObtenerRolesSupeAdmin()\r\n {\r\n return Rol::all();\r\n }", "public function get_roles()\n {\n $users_roles = user_role_active_record::search()->where('uid', $this->uid)->exec();\n $roles = array();\n foreach ($users_roles as $users_role) {\n $roles[] = role_active_record::search()->where('rid', $users_role->rid)->execOne();\n }\n return $roles;\n }", "private function getRoles()\n\t{\n\t\tif (!isset($this->roles)) {\n\t\t\t$this->roles = $this->roles()\n\t\t\t\t->with('permissions')\n\t\t\t\t->withCount('users')\n\t\t\t\t->get();\n\t\t}\n\t\treturn $this->roles;\n\t}", "public function getRoles() {\n return DB::table('dx_users_roles as ur')\n ->join('dx_roles as r', 'r.id', '=', 'ur.role_id')\n ->select('r.id', 'r.title', DB::raw('COUNT(*) as total_users'))\n ->where('r.is_system', '=', '0')\n ->groupBy('r.id')\n ->orderBy('r.title')\n ->get();\n }", "public function roles();", "public function roles();", "public function roles();", "public function roles();", "public function getRoles()\n {\n return $this->getMemberRoles()->toArray();\n }", "public function getRoles()\n {\n return [$this->role];\n }", "public function getRoles()\n {\n return [$this->role];\n }", "public function getRoles()\n\t{\n\t\treturn $this->roles->toArray();\n\t}", "public function getRoles(){\n $sql = \"SELECT * FROM rol\";\n\n foreach ($this->bd->query($sql) as $res) {\n $this->rol[] = $res;\n }\n return $this->rol;\n }", "public function getRoles(): array\n {\n return ['admin'];\n }", "public function index()\n {\n return Role::all();\n }", "public function index()\n {\n return Role::all();\n }", "public function findRoles() {\n\t\t\n\t}", "public function getRoles() {\n return $this->getRelation(\"roles\");\n }", "public function getRoles(): array\n {\n return [$this->role];\n }", "function getRoles () {\n return array(\"user.image.edit\",\"user.image.view\");\n }", "public function roles()\n {\n return response()->json(['roles' => UserRole::getRoleList()]);\n }", "protected abstract function getAllowedRoles();", "public function getRoles()\n {\n return $this->roles->toArray();\n }", "public function getRoles()\n {\n return $this->roles->toArray();\n }", "public function getRoles()\r\n {\r\n return $this->roles;\r\n }", "public function getRoles()\n {\n return $this->getRelation('roles');\n }", "public function getRoles(): array\n {\n $roles = $this->userRoles->map(function($role){\n return $role->getTitle();\n })->toArray();\n\n $roles[] = 'ROLE_USER';\n // guarantee every user at least has ROLE_USER\n //$roles[] = 'ROLE_USER';\n\n return $roles;\n }", "public function all()\n {\n $roles = collect($this->table()->where('user_id', $this->user->id())->get());\n\n if ($roles->isEmpty()) {\n return collect();\n }\n\n return $roles; // todo: groups\n }", "public function getRoles()\n {\n\n $roles = $this->roles;\n // guarantee every user at least has ROLE_USER\n $roles[] = 'ROLE_USER';\n return array_unique($roles);\n\n //throw new \\Exception('Method getRoles() is not implemented.');\n }", "static public function get_all_roles() {\n\t\tif ( ! function_exists( 'get_editable_roles' ) ) {\n\t\t\trequire_once( ABSPATH . 'wp-admin/includes/user.php' );\n\t\t}\n\n\t\t$editable_roles = get_editable_roles();\n\t\t$roles = array();\n\t\t$caps = apply_filters( 'fl_builder_user_access_capabilities', array( 'edit_posts' ) );\n\n\t\tforeach ( $editable_roles as $role => $data ) {\n\t\t\tforeach ( $caps as $cap ) {\n\t\t\t\tif ( isset( $data['capabilities'][ $cap ] ) && 1 == $data['capabilities'][ $cap ] ) {\n\t\t\t\t\t$roles[ $role ] = $data['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $roles;\n\t}", "public function roles()\n {\n return $this->belongsToMany(config('access.role'), config('access.role_user_table'), 'user_id', 'role_id');\n }", "public function getAuthUserRoles()\n {\n return $this->hasMany(AuthUserRole::className(), ['user_id' => 'id']);\n }", "public function index()\n {\n $this->authorize('viewAny', Role::class);\n return Role::all();\n }", "public function getRoles()\n {\n return array('1');\n }", "public function getRoles(): array\n {\n return $this->roles;\n }", "public function getRoles(): array\n {\n return $this->roles;\n }", "public function getRoles(){\n\n $roles = $this->visiteur_roles->map(function($role){\n return $role->getTitle();\n })->ToArray();\n\n $roles[]= 'ROLE_USER';\n \n return $roles;\n }", "public function roles()\n {\n return $this->belongsToMany(UserManager::package()->config('models.role'))\n ->withTimestamps();\n }", "public function index()\n {\n $users = User::get()->load('roles');\n return $users;\n }", "public static function getUserRoles()\n\t{\n\t\treturn ArrayHelper::map(UserRoles::find()->where(['is_active'=> Yii::$app->params['IS_ACTIVE']['ACTIVE']])->asArray()->all(), 'id', 'name');\n\t}", "public function roles()\n {\n return $this->belongsToMany(config('gate.models.role'));\n }", "public function getRoles() \n {\n return $this->roles;\n }", "public static function roles(){\n self::init();\n\n return array_keys(AUTH_USER_ROLES);\n }", "public function listRoles($user) {\n return $user->roles;\n }", "public function index()\n {\n return Roles::all();\n }", "public function getRoles() {\n $ds = \\dibi::dataSource(\"\n SELECT r.*, rr.name AS parent_name\n FROM users_roles AS r\n LEFT JOIN users_roles AS rr ON rr.id = r.parent_id\n \");\n\n return $ds;\n }", "public function roles()\n {\n return $this->belongsToMany(Config::get('laracancan.role_model', 'Hamedmehryar\\Laracancan\\Models\\Role'), 'lcc_role_user', 'user_id', 'role_id');\n }", "private static function getUserRole(): array\n\t{\n\t return self::getUser()->roles;\n\t}", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getUserRoles()\n {\n return $this->userRoles;\n }", "public function getRoles()\n {\n return array($this->role);\n }", "public function getRoles(): array {\n\t\t$sql = 'SELECT id, name FROM roles';\n\t\treturn $this->queryRows($sql);\n\t}", "public function getRolesList()\n\t{\n\t\t$roles = Role::select('name as text', 'id')->get();\n\t\treturn $roles;\n\t}", "function get_roles(){\n\t\t$this->db->select('*');\n\t\t$q = $this->db->get('user_role');\n\n\t\treturn $q->result_array();\n\t}", "public function getRoles(){\n $db = new MainModel();\n $query = \"SELECT r.id as idRol, r.name as nameRol from roles as r\";\n return $response = $db->consultQueryAll($query);\n }", "function getRoles () {\n return array(\"user.friendRequest.edit\",\"user.friendRequest.view\");\n }", "public function getRoles(){\n\n return $this->_arrRoles;\n \n }", "public function getRoles()\r\n {\r\n return \\yii\\helpers\\ArrayHelper::map(\r\n $this->hasMany(AuthAssignment::className(), ['user_id' => 'user_id'])\r\n ->select(['id'=>'item_name', 'value'=>'description'])\r\n ->join('left join', 'auth_item', 'auth_item.name = auth_assignment.item_name')\r\n ->asArray()->all(),\r\n 'value', 'id');\r\n }", "public function roles()\n {\n return $this->hasManyThrough(Permission::class);\n }", "protected function getRoles(): array\n {\n $output = [];\n $options = [];\n $options['unlimited'] = true;\n $options['where'] = [\n 'userrole_priority' => '< 10000',\n ];\n $options['sortOrders'] = [['sort' => 'userrole_priority', 'order' => 'ASC']];\n $UserRolesDb = new \\Rdb\\Modules\\RdbAdmin\\Models\\UserRolesDb($this->Container);\n $output['listRoles'] = $UserRolesDb->listItems($options);\n\n unset($options, $UserRolesDb);\n return $output;\n }", "public function index()\n {\n $roles = App\\User::find(1)->roles()->orderBy('name')->get();\n }", "public function getRoles()\n\t{\n\t\t$roles = $this->role_gestion->all();\n\n\t\treturn view('back.users.roles', compact('roles'));\n\t}" ]
[ "0.8534246", "0.8351405", "0.8285688", "0.8250701", "0.8227924", "0.8065377", "0.80469906", "0.8037908", "0.80370104", "0.8025936", "0.8022992", "0.7960547", "0.7945367", "0.7937081", "0.7934523", "0.7818265", "0.78171194", "0.77983", "0.77753156", "0.7768571", "0.77578336", "0.77532315", "0.775224", "0.773908", "0.773908", "0.773908", "0.7734246", "0.77262187", "0.77133167", "0.7710212", "0.77084607", "0.7701108", "0.7694777", "0.7669997", "0.76661265", "0.7662249", "0.76528597", "0.76505035", "0.7624679", "0.7624679", "0.7624679", "0.7624679", "0.761336", "0.7597449", "0.7597449", "0.7595074", "0.7580396", "0.7580031", "0.7579667", "0.7579667", "0.75684357", "0.7552182", "0.7549231", "0.7545685", "0.7545512", "0.75281084", "0.75242895", "0.75242895", "0.7505629", "0.75053936", "0.75005615", "0.75005484", "0.74924165", "0.7484832", "0.7480214", "0.7475184", "0.747423", "0.7471269", "0.7469881", "0.7469881", "0.74670494", "0.7465349", "0.7458744", "0.74552405", "0.74548304", "0.7451407", "0.7449955", "0.74489784", "0.7448427", "0.74464875", "0.74399936", "0.7435471", "0.7435396", "0.7435396", "0.7435396", "0.7435396", "0.7435396", "0.7435396", "0.74323195", "0.7431065", "0.7421721", "0.7421023", "0.74083763", "0.7394764", "0.7377196", "0.7375679", "0.73739415", "0.7370934", "0.73686206", "0.73661333", "0.73655" ]
0.0
-1
setting up rolesWithPermission Array Key is role id Value Array of Permissions
public static function setupRoleWithPermissions($userRole, $currentRole, $systemPage) { $result = []; $sites = session('admin.site.estate'); // Setting up the roles to manage self::getManagedRoles($userRole, $systemPage); $rolesAndPermissions = RoleModel::orderBy('role') ->with('permissions'); $rolesAndPermissions = $rolesAndPermissions ->whereIn( 'id', [$userRole, $currentRole] ); $rolesAndPermissions = $rolesAndPermissions->get()->toArray(); // Looping into the result from DB to setup the rolesWithPermissions array foreach($rolesAndPermissions as $rolesAndPermission) { $roleId = $rolesAndPermission['id']; $roleName = $rolesAndPermission['role']; $permissions = $rolesAndPermission['permissions']; $tempArray = []; // Gathering the permissions per role_id foreach ($permissions as $permission) { $tempArray[] = $permission['permission']; } // Fill only the managed roles //if(!$systemPage or in_array($roleId, self::$rolesToManage) or $roleId == $userRole) if(in_array($roleId, self::$rolesToManage) or $roleId == $userRole ) { // Create an array with a Key as role_id and value as an array of permissions $result[$roleId] = $tempArray; self::$roles[$roleId] = $roleName; } } if(isset($result[$userRole])) { // They key is the role id, so if you pass 0 you will get DevPermissions self::$userPermissions = $result[$userRole]; } // Remove Dev permissions and User's permissions if(!is_null($currentRole)) { //excluding Dev Role array_forget($result,0); array_forget(self::$roles,0); // Excluding the current user role array_forget($result,$userRole); array_forget(self::$roles,$userRole); } self::$rolesWithPermissions = $result; return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function build_permissions_for_role($role_id)\n\t{\n\t\t$permissions = self::get_roles_permissions($role_id);\n\t\t$permissions_array = array();\n\t\t\n\t\tforeach($permissions as $permission)\n\t\t\t$permissions_array[] = $permission->permission_id;\n\t\t\n\t\t$permissions_not_in = array();\n\t\t\n\t\tif(count($permissions_array) > 0)\n\t\t\t$permissions_not_in = DB::select(\"*\")->from(self::TABLE_PERMISSIONS)\n\t\t\t\t->where(\"id\", \"not in\", $permissions_array)\n\t\t\t\t->as_object()->execute();\n\t\telse\n\t\t\t$permissions_not_in = DB::select(\"*\")->from(self::TABLE_PERMISSIONS)\n\t\t\t\t->as_object()->execute();\n\t\t\t\n\t\tforeach($permissions_not_in as $permission_not_in)\n\t\t{\n\t\t\tDB::insert(self::TABLE_ROLES_PERMISSIONS)\n\t\t\t\t->set(array(\n\t\t\t\t\t\"role_id\" => $role_id,\n\t\t\t\t\t\"permission_id\" => $permission_not_in->id,\n\t\t\t\t\t\"active\" => 0\n\t\t\t\t))->execute();\n\t\t}\n\t}", "public function getRolePermissions()\n {\n $headers = ['Ability', 'Role'];\n\n $role_name = $this->argument('needle');\n\n $role = $this->permission->findBy('role_name', $role_name);\n if ($role) {\n $permissions = json_to_array($role->permission);\n\n if (!is_array($permissions)) {\n $permissions = [];\n }\n\n foreach ($permissions as $module=>$permission) {\n $this->warn(\"\\n\" . strtoupper($module));\n $data = [];\n\n foreach ($permission as $ability=>$perm) {\n $vals = [$module, $ability];\n if (is_bool($perm)) {\n if ($perm) {\n $vals[] = 'true';\n } else {\n $vals[] = 'false';\n }\n }\n if (is_string($perm)) {\n $vals[] = $perm;\n }\n $data[] = $vals;\n }\n $this->table($headers, $data);\n }\n\n } else {\n $this->error(\"No role found!\");\n }\n }", "function associatePermissionsToRole()\n {\n $retObj = array();\n try {\n\n if (isset($_POST['role_id']))\n {\n $permission_ids = json_decode($_POST['permission_ids']);\n $params = array(\n 'role_id' => $_POST['role_id'],\n 'permission_ids' => $permission_ids\n );\n\n $objAcl = new AclManager();\n $retObj['completed'] = false;\n $response = $objAcl->associatePermissionsToRole($params);\n $retObj['completed'] = true;\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }", "function update_role_permision() {\n\t\t$user_role = $this->get_role_permission($_POST['role_id']);\n\t\tforeach ($user_role->result() as $role) {\n\t\t\t\n\t\t\t$this->db->where('entry_id', $role->entry_id);\n\t\t\t$list = $_POST['role_permission'];\n\t\t\t$allow = isset($list[$role->entry_id]) ? 1 : 0;\n\t\t\t$this->db->update('system_security.security_role_permission', array('allow_deny' => $allow));\n\t\t}\n\t}", "public function getAllPermissionsForRole(string $role): array;", "public function permissions(){ return new manytomany_link($this, 'permission', 'rolepermissions');\n }", "public function getPermissions()\n\t{\n\t\tif(!$this->id)\n\t\t\treturn array();\n $role= UserRole::model()->getUserRole($this);\n if(!$role->role_id){\n return array();\n }\n\t\t$permissions = array();\n\t\t$sql = \"SELECT pa.ACTION_ID AS id, pa.key from \". PermissionMap::model()->tableName().\" pm left join \". PermissionAction::model()->tableName().\" pa on pa.ACTION_ID = pm.permission_id where pm.type = '\".PermissionMap::TYPE_ROLE.\"' and pm.principal_id = {$role->role_id}\";\n\t\t\tforeach (Yii::app()->db->cache(500)->createCommand($sql)->query()->readAll() as $permission)\n\t\t\t\t$permissions[$permission['id']] = $permission['key'];\n\t\t\n\n\n\t\t// Direct user permission assignments\n\t\t$sql = \"select pa.ACTION_ID as id, pa.key from \". PermissionMap::model()->tableName().\" pm left join \". PermissionAction::model()->tableName().\" pa on pa.ACTION_ID = pm.permission_id where pm.type = '\".PermissionMap::TYPE_USER.\"' and pm.principal_id = {$this->id}\";\n\t\tforeach (Yii::app()->db->cache(500)->createCommand($sql)->query()->readAll() as $permission)\n\t\t\t$permissions[$permission['id']] = $permission['key'];\n\n\n\t\treturn $permissions;\n\t}", "public function permissionOfRole($id)\n {\n return $getAllPermissionOfRole = DB::table('role_permission')->where('role_id',$id)->pluck('permission_id');\n }", "public function perms() {\n return $this->belongsToMany(config('entrust.permission'), config('entrust.permission_role_table'), 'role_id', 'permission_id');\n }", "public function associatePermissionsToRole($params)\n {\n $this->db_removeAllPermissionsFromRole($params);\n\n //2. Add Current Permission To Role\n $permissions_arr = $params['permission_ids'];\n foreach($permissions_arr as $perm)\n {\n $data = array(\n 'role_id' => $params['role_id'],\n 'perm_id' => $perm\n );\n $this->db_addPermissionToRole($data);\n }\n\n return true;\n }", "function assign_permission(){\n\n $data['title'] = \"Assign Permission\";\n $data['page_title'] = \"Assign Permission\";\n $data['page'] = \"assign_permission\";\n $data['breadcrumb'] = array(\"Dashboard\"=> base_url(\"dashboard/\"),\"Role List\"=> base_url('role/list_items'), \"Assign Permission\"=> \"\");\n $user_id = base64_decode($this->uri->segment(3));\n //pr($user_id);die;\n $type = ''; \n $data['modules'] = $this->Role_model->getAllModules(); \n if($this->uri->segment('4') == 'role'){\n $type = 'role';\n \n }else if($this->uri->segment('4') == 'user'){\n $type = 'user';\n } \n $result = $data['userData'] = $this->Role_model->getUserData($user_id,$type); \n \n// pr($result); die;\n $per = array(); \n $perR = json_decode(@$result->permission_ids,true); \n $role_permissions = $per['role_permissions'] = empty(json_decode($result->role_permissions,true))?array():json_decode($result->role_permissions,true);\n $per[\"all_role_permissions\"] = $this->Role_model->get_all_roles();\n $user_extra_permission = $per['user_extra_permission'] = empty(json_decode(@$result->user_extra_permission,true))?array():json_decode($result->user_extra_permission,true); \n $user_removed_permission = $per['user_removed_permission'] = empty(json_decode(@$result->user_removed_permission,true))?array():json_decode($result->user_removed_permission,true); \n// \n// pr($per); die; \n $totalPermission = $role_permissions+$user_extra_permission;\n// pr($totalPermission); die;\n $perA = array();\n foreach($totalPermission as $k => $v) { \n if(array_key_exists($k, $role_permissions) ){\n $uep = empty($user_extra_permission[$k])?array():$user_extra_permission[$k];\n $rp = empty($role_permissions[$k])?array():$role_permissions[$k];\n $result1 = array_merge($uep,$rp);\n// pr($result); die;\n if(array_key_exists($k, $user_removed_permission)){\n $result1 = array_values(array_diff($result1,$user_removed_permission[$k])); \n }\n $perA[$k] = $result1; \n// pr($perA); die;\n }\n \n if(!array_key_exists($k, $role_permissions)){\n $perA[$k] = $user_extra_permission[$k]; \n }\n }\n \n// pr($perA); die;\n $data['permAssigned'] = ($type==\"role\")?$perR:$perA; \n if(isPostBack()){ \n $this->Role_model->assign_permission($per);\n }\n _layout($data);\n }", "private function getUserRolePermissions()\n {\n return [];\n }", "static function getPermissions($role=null){\n\t\t$permissions = Configure::read('App.permissions.options');\n\t\t$controller = '';\n\t\t$action = '';\n\t\t$items = array();\n\n\t\tforeach ($permissions as $perm) {\n\t\t\t$perm = trim($perm);\n\t\t\t$permData = explode(':', $perm);\n\t\t\t$controller = $permData[0];\n\t\t\t$action = $permData[1];\n\n\t\t\tif (!isset($role['Role']['permissions'])) {\n\t\t\t\t$allowed = '0';\n\t\t\t} else {\n\t\t\t\t$allowed = Common::requestAllowed($controller, $action, $role['Role']['permissions'], true);\n\t\t\t}\n\t\t\t$items[$controller][$action] = $allowed;\n\t\t}\n\t\treturn $items;\n\t}", "private static function setupCategoriesPermissions()\n\t{\n\t\t$result = [];\n\n\t\t// Looping into userPermissions and getting the category as the key and the value as an array of permissions\n\t\tforeach(self::$userPermissions as $userPermissionWithDots)\n\t\t{\n\t\t\t// checking if the permission has a menu category or not, it is separated in the DB with |\n\n\t\t\t$userCategoryPermission = explode ('.',$userPermissionWithDots,2);\n\t\t\t$userCategory = $userCategoryPermission[0];\n\n\n\t\t\t// if the permission is without a dot then it is a category only\n\t\t\tif(count($userCategoryPermission) > 1)\n\t\t\t{\n\t\t\t\t$userPermission = $userCategoryPermission[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$userPermission = '';\n\t\t\t}\n\n\t\t\tif(is_numeric($userPermission))\n {\n // If the permission is a number this means it is a role-manage permission\n // Add it if the role is in the roles to manage array\n if (in_array($userPermission, self::$rolesToManage))\n {\n $result[$userCategory][] = $userPermission;\n }\n }\n else\n {\n $result[$userCategory][] = $userPermission;\n }\n\t\t}\n\n\t\tself::$categoryWithPermissions = $result;\n\t\treturn $result;\n\n\t}", "public function setRole() {\n\n $res= $_POST['link']->query(\"SELECT t2.perm_name FROM role_perm as t1\n JOIN permissions as t2 ON t1.perm_id = t2.perm_id\n WHERE t1.role_id = $this->rol_id\");\n\n\n foreach($res as $item)\n $this->role_perm[]= $item['perm_name'];\n }", "public function role(){\n $obj = $this->hasMany(UserRole::class,'user_id','id')\n ->join('role', 'role.id', '=', 'role_id')->with('permissions');\n return $obj;\n }", "protected function _initPermissions () {\r\n\r\n\t\t$bFreshData = false;\r\n\r\n\t\tif (self::$_bUseCache) {\r\n\t\t\t$oCacheManager = Kwgl_Cache::getManager();\r\n\t\t\t$oAclCache = $oCacheManager->getCache('acl');\r\n\r\n\t\t\tif (($aPermissionListing = $oAclCache->load(self::CACHE_IDENTIFIER_PERMISSIONS)) === false) {\r\n\t\t\t\t// Not Cached or Expired\r\n\r\n\t\t\t\t$bFreshData = true;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$bFreshData = true;\r\n\t\t}\r\n\r\n\t\tif ($bFreshData) {\r\n\t\t\t// Get Privileges from the Database\r\n\t\t\t$oDaoRoleResourcePrivilege = Kwgl_Db_Table::factory('System_Role_Resource_Privilege');\r\n\t\t\t//$aPermissionListing = $oDaoRoleResource->fetchAll();\r\n\t\t\t$aPermissionListing = $oDaoRoleResourcePrivilege->getPermissions();\r\n\r\n\t\t\tif (self::$_bUseCache) {\r\n\t\t\t\t$oAclCache->save($aPermissionListing, self::CACHE_IDENTIFIER_PERMISSIONS);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforeach ($aPermissionListing as $aPermissionDetail) {\r\n\t\t\t$sRoleName = $aPermissionDetail['role_name'];\r\n\t\t\t$sResourceName = $aPermissionDetail['resource_name'];\r\n\t\t\t$sPrivilegeName = null;\r\n\t\t\tif (!is_null($aPermissionDetail['privilege_name'])) {\r\n\t\t\t\t$sPrivilegeName = $aPermissionDetail['privilege_name'];\r\n\t\t\t}\r\n\t\t\t$sPermissionType = $aPermissionDetail['permission'];\r\n\r\n\t\t\t// Check the Permission to see if you should allow or deny the Resource/Privilege to the Role\r\n\t\t\tswitch ($sPermissionType) {\r\n\t\t\t\tcase self::PERMISSION_TYPE_ALLOW:\r\n\t\t\t\t\t$this->allow($sRoleName, $sResourceName, $sPrivilegeName);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase self::PERMISSION_TYPE_DENY:\r\n\t\t\t\t\t$this->deny($sRoleName, $sResourceName, $sPrivilegeName);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getPermissionByRoleID($id);", "public function assignPermissions(Request $request)\n {\n $request->validate([\n 'role_id' => 'required',\n 'permissionIds' => 'required'\n ]);\n\n $role = Role::find($request->role_id);\n $role->givePermission($request->permissionIds); \n }", "public function setRoles($roles = [])\n {\n\n $rolesPermissionsToUpdate = Role::whereIn('name',$roles);\n $rolesPermissionsToDelete = $this->roles()->whereNotIn('role_id',$rolesPermissionsToUpdate->pluck('id')->toArray())->where('user_id',$this->id);\n\n UserRole::whereIn('role_id',$rolesPermissionsToDelete->pluck('id')->toArray())->where('user_id',$this->id)->delete();\n\n $diff = array_intersect($rolesPermissionsToUpdate->pluck('name')->toArray(),$roles);\n\n if (sizeOf($diff) > 0)\n {\n collect($diff)->each(function($roleName) use ($rolesPermissionsToUpdate){\n\n $role = Role::where('name',$roleName)->first();\n\n UserRole::create([\n 'user_id' => $this->id,\n 'role_id' => $role->id\n ]);\n\n });\n }\n\n }", "public function getPermissions()\n {\n\n $roles = Role::where(function($query){\n\n $query->whereIn('id',$this->roles()->pluck('role_id'));\n\n })->with('permissions')->get();\n\n\n $permissions = $roles->map(function($role){\n\n $permissionData = $role->permissions->pluck('permission');\n\n if(sizeOf($permissionData) > 0)\n {\n return $permissionData[0];\n }\n\n })->filter(function($item){\n if($item !== null)\n {\n return $item;\n }\n });\n\n if ($permissions->count() <= 1)\n {\n return $permissions;\n }\n\n return $permissions->unique();\n\n }", "public function permissions()\n {\n return $this->embedsMany(\n config('laravel-permission.table_names.role_has_permissions')\n );\n }", "function get_role_permission($role_id) {\n\t\t$sql = \"SELECT p.*, rp.entry_id, rp.allow_deny \"\n\t\t\t. \"FROM system_security.security_permission p \"\n\t\t\t. \"LEFT JOIN system_security.security_role_permission rp ON(rp.permission_id = p.permission_id AND rp.role_id = $role_id) \"\n\t\t\t. \"ORDER BY p.permission_id\";\n\t\treturn $this->db->query($sql);\n\t}", "public function create() {\n// $role = Sentinel::findRoleById(1);\n// $roles = Rol::get();\n// foreach($roles as $role){\n// $role->removePermission(0);\n// $role->removePermission(1);\n// $role->save();\n// }\n// dd(Sentinel::getUser()->hasAccess('sds'));\n// dd(\\Modules\\Permissions\\Entities\\ModulePermission::where('module_id', 10)->where('permission', 'like', '%.view')->orderBy('menu_id')->lists('permission')->toArray());\n }", "public function syncPermissions(): void {\n\t\t$FinalPermissions = discover_permissions( false );\n\t\t$RolesExists = Permission::query()->whereIn( 'name', $FinalPermissions )->get();\n\t\tif ( $RolesExists->count() > 0 ) {\n\t\t\t$FinalPermissionsCollection = collect( $FinalPermissions )->filter( static function ( $item ) use ( $RolesExists ) {\n\t\t\t\treturn ! $RolesExists->contains( 'name', '=', $item );\n\t\t\t} );\n\t\t\t$CreateRoles = [];\n\t\t\tforeach ( $FinalPermissionsCollection as $finalPermission ) {\n\t\t\t\t$CreateRoles[] = [\n\t\t\t\t\t'name' => $finalPermission,\n\t\t\t\t\t'guard_name' => 'admin',\n\t\t\t\t\t'updated_at' => Carbon::now(),\n\t\t\t\t\t'created_at' => Carbon::now(),\n\t\t\t\t];\n\t\t\t}\n\t\t\tif ( ! empty( $CreateRoles ) ) {\n\t\t\t\tPermission::query()->insert( $CreateRoles );\n\t\t\t}\n\t\t} else {\n\t\t\t$CreateRoles = [];\n\t\t\tforeach ( $FinalPermissions as $finalPermission ) {\n\t\t\t\t$CreateRoles[] = [\n\t\t\t\t\t'name' => $finalPermission,\n\t\t\t\t\t'guard_name' => 'admin',\n\t\t\t\t\t'updated_at' => Carbon::now(),\n\t\t\t\t\t'created_at' => Carbon::now(),\n\t\t\t\t];\n\t\t\t}\n\t\t\tPermission::query()->insert( $CreateRoles );\n\t\t}\n\t}", "abstract protected function rolePerms($role);", "function product_line_roles_fun() {\r\n return array(\r\n 'Ventilation' => 'permissiondata',\r\n 'Compression' => 'permissiondata',\r\n 'Infrastructure' => 'permissiondata',\r\n 'Stapling' => 'vlex_permissiondata',\r\n 'Patient Monitoring' => 'vlex_permissiondata',\r\n 'Ablation' => 'vlex_permissiondata',\r\n 'Vessel Sealing' => 'vlex_permissiondata',\r\n );\r\n}", "function update_role ($role_id, $role_name, $role_priv_array) {\r\n $conn = db_connect();\r\n\r\n //if (!check_admin()) return false;\r\n if (isset($role_id) && isset($role_name)) {\r\n // change the role_name\r\n $result = $conn->query(\"update roles set role_name = '\".trim($role_name).\"' where role_id = '\".$role_id.\"'\");\r\n if (!$result) {\r\n throw new Exception(\"Could not connect to the DB.\");\r\n }\r\n }\r\n\r\n if (isset($role_id) && is_array($role_priv_array)) {\r\n $result = $conn->query(\"select priv_id from role_priv where role_id = '\".$role_id.\"'\");\r\n \r\n while (list($id) = $result->fetch_row()) {\r\n $res_array[] = $id;\r\n }\r\n\r\n foreach ($role_priv_array as $key) {\r\n if (!in_array($key, $res_array)) {\r\n // not exsit, then insert\r\n $result = $conn->query(\"insert into role_priv values ('', '\".$role_id.\"', '\".$key.\"')\");\r\n //echo \"sdfjksd1<br />\";\r\n }\r\n }\r\n\r\n foreach ($res_array as $key) {\r\n if (!in_array($key, $role_priv_array)) {\r\n // not exsit, then delete\r\n $result = $conn->query(\"delete from role_priv where role_id = '\".$role_id.\"' and \r\n priv_id = '\".$key.\"'\");\r\n //echo \"sdfjksd2<br />\";\r\n }\r\n }\r\n } \r\n\r\n return true;\r\n }", "private function seedPermissions()\n {\n (new \\Naraki\\Permission\\Models\\Permission())->insert([\n [\n 'entity_type_id' => 4,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::USERS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 4,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::GROUPS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 4,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::BLOG_POSTS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 4,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::MEDIA,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 4,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::SYSTEM,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 5,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::USERS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 5,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::GROUPS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 5,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::BLOG_POSTS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 5,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::MEDIA,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 5,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::SYSTEM,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 6,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::USERS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 6,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::BLOG_POSTS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 6,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::MEDIA,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 6,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::SYSTEM,\n 'permission_mask' => 0b1111\n ],\n ]);\n\n }", "public function providePermissions()\n {\n $category = EcommerceConfig::get(EcommerceRole::class, 'permission_category');\n $perms[EcommerceConfig::get(EcommerceRole::class, 'customer_permission_code')] = [\n 'name' => _t(\n 'EcommerceRole.CUSTOMER_PERMISSION_ANME',\n 'Customers'\n ),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.CUSTOMERS_HELP',\n 'Customer Permissions (usually very little)'\n ),\n 'sort' => 98,\n ];\n $perms[EcommerceConfig::get(EcommerceRole::class, 'admin_permission_code')] = [\n 'name' => EcommerceConfig::get(EcommerceRole::class, 'admin_role_title'),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.ADMINISTRATORS_HELP',\n 'Store Manager - can edit everything to do with the e-commerce application.'\n ),\n 'sort' => 99,\n ];\n $perms[EcommerceConfig::get(EcommerceRole::class, 'assistant_permission_code')] = [\n 'name' => EcommerceConfig::get(EcommerceRole::class, 'assistant_role_title'),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.STORE_ASSISTANTS_HELP',\n 'Store Assistant - can only view sales details and makes notes about orders'\n ),\n 'sort' => 100,\n ];\n $perms[EcommerceConfig::get(EcommerceRole::class, 'process_orders_permission_code')] = [\n 'name' => _t(\n 'EcommerceRole.PROCESS_ORDERS_PERMISSION_NAME',\n 'Can process orders'\n ),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.PROCESS_ORDERS_PERMISSION_HELP',\n 'Can the user progress orders through the order steps (e.g. dispatch orders)'\n ),\n 'sort' => 101,\n ];\n\n return $perms;\n }", "public function perms()\n {\n return $this->belongsToMany(Permission::class, 'permission_role', 'role_id', 'permission_id');\n }", "public function permissions()\n {\n \t// belongsTo(RelatedModel, foreignKey = _id, keyOnRelatedModel = id)\n \treturn $this->belongsToMany('App\\Permission','permission_role','role_id','permission_id')->withTimestamps();\n }", "public function run() {\n $rp = new RolePermission();\n $json = Permission::all()->toArray();\n foreach ($json as $value) {\n $datastore = array('id' => 0,'role_id' => 1,'permission_id' => $value[\"id\"],'is_allowed' => '1','created_by' => 0);\n $rp->store($datastore);\n unset($datastore);\n }\n }", "function psp_add_role_caps()\n{\n $roles = array('manager');\n\n // Loop through each role and assign capabilities\n foreach ($roles as $the_role) {\n\n $role = get_role($the_role);\n\n $role->add_cap('read');\n $role->add_cap('create_cpt_project');\n $role->add_cap('create_private_cpt_project');\n $role->add_cap('read_cpt_project');\n $role->add_cap('read_private_cpt_project');\n $role->add_cap('edit_cpt_project');\n $role->add_cap('edit_published_cpt_project');\n $role->add_cap('publish_cpt_project');\n $role->add_cap('delete_private_cpt_project');\n $role->add_cap('delete_published_cpt_project');\n\n }\n}", "function get_permissions_value($key, $array_key = 'default')\n\t{\n\t\t$result = array();\n\t\t\n\t\t$role_id = $this->ci->session->userdata('DX_role_id');\n\t\t$role_name = $this->ci->session->userdata('DX_role_name');\n\t\t\n\t\t$parent_roles_id = $this->ci->session->userdata('DX_parent_roles_id');\n\t\t$parent_roles_name = $this->ci->session->userdata('DX_parent_roles_name');\n\t\t\n\t\t// Get current user permission\n\t\t$value = $this->get_permission_value($key, FALSE);\n\t\t\n\t\tif ($array_key == 'role_id')\n\t\t{\n\t\t\t$result[$role_id] = $value;\n\t\t}\n\t\telseif ($array_key == 'role_name')\n\t\t{\n\t\t\t$result[$role_name] = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarray_push($result, $value);\n\t\t}\n\t\t\n\t\t// Get current user parent permissions\n\t\t$parent_permissions = $this->ci->session->userdata('DX_parent_permissions');\n\t\t\n\t\t$i = 0;\n\t\tforeach ($parent_permissions as $permission)\n\t\t{\n\t\t\tif (array_key_exists($key, $permission))\n\t\t\t{\n\t\t\t\t$value = $permission[$key];\n\t\t\t}\n\t\t\t\n\t\t\tif ($array_key == 'role_id')\n\t\t\t{\n\t\t\t\t// It's safe to use $parents_roles_id[$i] because array order is same with permission array\n\t\t\t\t$result[$parent_roles_id[$i]] = $value;\n\t\t\t}\n\t\t\telseif ($array_key == 'role_name')\n\t\t\t{\n\t\t\t\t// It's safe to use $parents_roles_name[$i] because array order is same with permission array\n\t\t\t\t$result[$parent_roles_name[$i]] = $value;\n\t\t\t}\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray_push($result, $value);\n\t\t\t}\n\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t// Trigger event\n\t\t$this->got_permissions_value($this->get_user_id(), $key);\n\t\t\n\t\treturn $result;\n\t}", "public function run()\n {\n $basic_permissions = [\n ['id'=>'1z9Sv2fC1ALXdM80L0QHs9c3HLDoAOO8','description'=>'Crear Roles', 'group'=>'SEGURIDAD/ROLES', 'is_super'=>false ],\n ['id'=>'G8aCoYYCgE8fAwegn0MvWjxMXhxIIrhy','description'=>'Seleccionar Permiso', 'group'=>'SEGURIDAD/PERMISOS', 'is_super'=>false ],\n ['id'=>'lJFsnYJCnFcVPVBBUOQrmlv3b6Y2X2ZE','description'=>'Crear Usuarios', 'group'=>'ADMIN/USUARIOS', 'is_super'=>false ],\n ['id'=>'m0D4LIsO7V79aDueMDjgWGOmp8mPW6c0','description'=>'Seleccionar Rol', 'group'=>'SEGURIDAD/ROLES', 'is_super'=>false ],\n ['id'=>'n5TraVIrRoioG1kqdHsIaZLYDvxO8MFD','description'=>'Eliminar Usuarios', 'group'=>'ADMIN/USUARIOS', 'is_super'=>false ],\n ['id'=>'nrPqEhq2TX0mI7qT7glaOCJ7Iqx2QtPs','description'=>'Ver Roles', 'group'=>'SEGURIDAD/ROLES', 'is_super'=>false ],\n ['id'=>'nTSk4Y4SFKMyQmRD4ku0UCiNWIDe8OEt','description'=>'Ver Usuarios', 'group'=>'ADMIN/USUARIOS', 'is_super'=>false ],\n ['id'=>'QpKVz00WUbZVJMPFu3iBNGBTdMFYubQ2','description'=>'Eliminar Roles', 'group'=>'SEGURIDAD/ROLES', 'is_super'=>false ],\n ['id'=>'RGMUpFAiRuv7UFoJroHP6CtvmpoFlQXl','description'=>'CRUD Permisos', 'group'=>'SEGURIDAD/PERMISOS', 'is_super'=>true ],\n ['id'=>'v216XcAzgbt4mIjj6gZP2rdRTupXz0AO','description'=>'Editar Roles', 'group'=>'SEGURIDAD/ROLES', 'is_super'=>false ],\n ['id'=>'W8Xmv3hiIyIpkZfJMaL9MsRxxuSIiO5R','description'=>'Editar Usuarios', 'group'=>'ADMIN/USUARIOS', 'is_super'=>false ],\n ['id'=>'6ARHQGj1N8YPkr02DY04K1Zy7HjIdDcj','description'=>'Herramientas Dev', 'group'=>'DEV-TOOLS', 'is_super'=>false ],\n ['id'=>'BG4ZAI7BqpSs7Z0EsbqQkU3JZtGCkRrO','description'=>'Captura Reporte Checklist', 'group'=>'CHECKLIST', 'is_super'=>false ],\n ];\n\n foreach ($basic_permissions as $permission) {\n \\App\\Models\\Permission::create($permission);\n }\n }", "public function getAllPermissionOfRole($role_id)\n {\n try{\n $permissions = DB::table('role_permission')\n ->where('role_id',$role_id)\n ->pluck('permission_id');\n return $permissions;\n }\n catch (\\Exception $exception)\n {\n return null;\n }\n }", "public function permissions(): BelongsToMany\n {\n return $this->belongsToMany(\n Permission::class,\n 'role_permissions',\n 'role_id',\n 'permission_id'\n );\n }", "public function updateRolePermissions()\n\t{\n\t\t$input = Input::all();\n\n\t\tforeach ($input['permissions'] as $role => $permissions) {\n\t\t\tRole::whereName($role)->first()->perms()->sync($permissions);\n\t\t}\n\n\t\treturn Redirect::route('role.permissions.edit')\n\t\t\t\t\t\t\t->with('message', 'Successfully updated role permissions')\n\t\t\t\t\t\t\t->with('alert-class', 'success');\n\t}", "public function role(){\n return $this->belongsToMany('App\\Models\\Role','permission_role','permission_id', 'role_id');\n }", "public function get_role_permissions($id)\r\n {\r\n $this->db->where('roleid', $id);\r\n $this->db->join('tblpermissions', 'tblpermissions.permissionid = tblrolepermissions.permissionid', 'left');\r\n return $this->db->get('tblrolepermissions')->result_array();\r\n }", "public function permission_mass_assignament(array $roles){\n foreach($roles as $role){\n if(!$this->has_role($role)){\n $role_obj=Role::findOrFail($role);\n $permissions=$role_obj->permissions;\n //como queremos conservar los permisos que ya tiene el usuario NO USAMOS\n //que solamente se sincronizen los nuevos permisos\n //pasamos como parametro la coleccion de modelos\n $this->permissions()->syncWithoutDetaching($permissions);\n\n }\n }\n\n }", "public function run()\n {\n DB::table('role_permissions')->insert([\n 'role_id' => Role::where('name', 'admin')->first()->id,\n 'permission_id' => Permission::where('name', 'show_comments')->first()->id,\n ]);\n\n DB::table('role_permissions')->insert([\n 'role_id' => Role::where('name', 'admin')->first()->id,\n 'permission_id' => Permission::where('name', 'edit_comments')->first()->id,\n ]);\n\n DB::table('role_permissions')->insert([\n 'role_id' => Role::where('name', 'admin')->first()->id,\n 'permission_id' => Permission::where('name', 'delete_comments')->first()->id,\n ]);\n\n DB::table('role_permissions')->insert([\n 'role_id' => Role::where('name', 'admin')->first()->id,\n 'permission_id' => Permission::where('name', 'add_comments')->first()->id,\n ]);\n\n DB::table('role_permissions')->insert([\n 'role_id' => Role::where('name', 'candidate')->first()->id,\n 'permission_id' => Permission::where('name', 'show_comments')->first()->id,\n ]);\n\n DB::table('role_permissions')->insert([\n 'role_id' => Role::where('name', 'recruiter')->first()->id,\n 'permission_id' => Permission::where('name', 'show_comments')->first()->id,\n ]);\n\n DB::table('role_permissions')->insert([\n 'role_id' => Role::where('name', 'recruiter')->first()->id,\n 'permission_id' => Permission::where('name', 'add_comments')->first()->id,\n ]);\n\n\n\n\n\n\n// DB::table('role_permissions')->insert([\n// 'role_id' => '1',\n// 'permission_id' => '2',\n// ]);\n// DB::table('role_permissions')->insert([\n// 'role_id' => '1',\n// 'permission_id' => '3',\n// ]);\n }", "public function permissions()\n {\n return $this->belongsToMany(\n config('laravel-authorisation.models.permission'),\n config('laravel-authorisation.table_names.role_has_permissions')\n );\n }", "public function getPermissionsViaRole()\n {\n return $this->roles->map(function (Role $role) {\n return $role->getAllPermissions();\n })->flatten();\n }", "function getPermissions($company_id = 0, $role_id=0, $project_id=0, $access_id=0, $item_id=0){\n\t\tGLOBAL $AppUI;\n\t\t$rta=Array();\n\n\t\t// set project's filter\n\t\t$whereProject.= \"\\n\\tAND rp.project_id = \";\n\t\t$whereProject .= @$project_id != 0 ? $project_id : \"-1\";\n\t\t$whereCompany .= \"\\n\\tAND rp.company_id = \";\n\t\t$whereCompany .= @$company_id != 0 ? $company_id : \"-1\";\n\t\t// set access's filter\n\t\t$where=\"\";\n\t\tif (@$company_id!=0){\n\t\t\t$where.= \"\\n\\tAND (r.role_type=0 or r.role_type=1 and r.role_company=$company_id)\";\n\t\t}\n\t\t\n\t\t\t\t\t\t\n\t\t// set access's filter\n\t\tif (@$access_id!=0){\n\t\t\t$where.= \"\\n\\tAND rp.access_id = $access_id\";\n\t\t}\n\n\t\t// set permission's filter\n\t\tif (@$item_id!=0){\n\t\t\t$where.= \"\\n\\tAND rp.item_id = $item_id\";\n\t\t}\n\n\t\tif (@$role_id!=0){\n\t\t\t$where.= \"\\n\\tAND (r.role_id=$role_id)\";\n\t\t}\n\t\t$sql=\"\n(select DISTINCT \nr.role_id\n, r.role_name\n, -1 project_id \n, 'All' project_name\n, ta.access_id\n, ta.access_name\n, tpi.item_id\n, tpi.item_name\n, 9 permission_value\nfrom \nroles r\n,task_access ta\n,task_permission_items tpi \nWHERE\t1=1\n\t\t$where\norder by\nrole_id,project_id,access_id,item_id,permission_value)\nunion\n(select DISTINCT \nr.role_id\n, r.role_name\n, rp.project_id \n, 'All' project_name\n, rp.access_id\n, ta.access_name\n, tpi.item_id\n, tpi.item_name\n, rp.permission_value\n\nfrom \nroles r\n,role_permissions rp left join task_access ta on ta.access_id=rp.access_id\n,task_permission_items tpi \nwhere\n\t\trp.role_id = r.role_id \n\tand\ttpi.item_id=rp.item_id\n\tand\t(ta.access_id=rp.access_id or rp.access_id=-1)\n$whereProject\n$whereCompany\n$where\norder by\nrole_id,project_id,access_id,item_id,permission_value\n)\n\t\";\n\t\t//echo \"<pre>$sql</pre>\";\n\t\t$rta=db_loadList( $sql );\t\t\n\t\t$out=array();\n\t\t$r=\"role_id\";\n\t\t$p=\"project_id\";\n\t\t$a=\"access_id\";\n\t\t$i=\"item_id\";\n\t\t$v=\"permission_value\";\n\t\tforeach($rta as $j=>$fila){\n\t\t\t$curval = $out[intval($fila[$r])][intval($fila[$p])][intval($fila[$a])][intval($fila[$i])];\n\t\t\tif (isset($curval)){\n\t\t\t\tif( $curval > $fila[$v]){\n\t\t\t\t\t//echo \"$curval - $fila[$v] {[$fila[$r]][$fila[$p]][$fila[$a]][$fila[$i]]}\";\n\t\t\t\t\t$out[intval($fila[$r])][intval($fila[$p])][intval($fila[$a])][intval($fila[$i])]=$fila[$v];\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$out[intval($fila[$r])][intval($fila[$p])][intval($fila[$a])][intval($fila[$i])]=$fila[$v];\n\t\t\t}\n\t\t\tunset($curval);\n\t\t}\n\t\t//$curval =$out[\"4\"][\"-1\"][\"1\"][\"1\"];\n\t\t//$curval =$out[4][-1][1][1];\n\t\t//echo \"PRM= $curval <br>\";\n\t\t\n\t\treturn $out;\t\n\t}", "public function run()\n {\n \n\n \\DB::table('role_permission')->delete();\n \n \\DB::table('role_permission')->insert(array (\n 0 => \n array (\n 'id' => 1760,\n 'role_id' => 1,\n 'permission_id' => 51,\n 'created_at' => '2019-06-07 20:47:08',\n 'updated_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 1761,\n 'role_id' => 1,\n 'permission_id' => 52,\n 'created_at' => '2019-06-07 20:47:08',\n 'updated_at' => NULL,\n ),\n 2 => \n array (\n 'id' => 1770,\n 'role_id' => 1,\n 'permission_id' => 21,\n 'created_at' => '2019-06-07 20:47:08',\n 'updated_at' => NULL,\n ),\n 3 => \n array (\n 'id' => 1904,\n 'role_id' => 1,\n 'permission_id' => 1,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 4 => \n array (\n 'id' => 1905,\n 'role_id' => 1,\n 'permission_id' => 29,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 5 => \n array (\n 'id' => 1906,\n 'role_id' => 1,\n 'permission_id' => 2,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 6 => \n array (\n 'id' => 1907,\n 'role_id' => 1,\n 'permission_id' => 34,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 7 => \n array (\n 'id' => 1908,\n 'role_id' => 1,\n 'permission_id' => 3,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 8 => \n array (\n 'id' => 1909,\n 'role_id' => 1,\n 'permission_id' => 4,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 9 => \n array (\n 'id' => 1910,\n 'role_id' => 1,\n 'permission_id' => 30,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 10 => \n array (\n 'id' => 1911,\n 'role_id' => 1,\n 'permission_id' => 5,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 11 => \n array (\n 'id' => 1912,\n 'role_id' => 1,\n 'permission_id' => 6,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 12 => \n array (\n 'id' => 1913,\n 'role_id' => 1,\n 'permission_id' => 7,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 13 => \n array (\n 'id' => 1914,\n 'role_id' => 1,\n 'permission_id' => 8,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 14 => \n array (\n 'id' => 1915,\n 'role_id' => 1,\n 'permission_id' => 9,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 15 => \n array (\n 'id' => 1916,\n 'role_id' => 1,\n 'permission_id' => 10,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 16 => \n array (\n 'id' => 1917,\n 'role_id' => 1,\n 'permission_id' => 11,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 17 => \n array (\n 'id' => 1918,\n 'role_id' => 1,\n 'permission_id' => 12,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 18 => \n array (\n 'id' => 1919,\n 'role_id' => 1,\n 'permission_id' => 13,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 19 => \n array (\n 'id' => 1920,\n 'role_id' => 1,\n 'permission_id' => 14,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 20 => \n array (\n 'id' => 1921,\n 'role_id' => 1,\n 'permission_id' => 15,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 21 => \n array (\n 'id' => 1922,\n 'role_id' => 1,\n 'permission_id' => 16,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 22 => \n array (\n 'id' => 1923,\n 'role_id' => 1,\n 'permission_id' => 38,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 23 => \n array (\n 'id' => 1924,\n 'role_id' => 1,\n 'permission_id' => 17,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 24 => \n array (\n 'id' => 1925,\n 'role_id' => 1,\n 'permission_id' => 37,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 25 => \n array (\n 'id' => 1926,\n 'role_id' => 1,\n 'permission_id' => 18,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 26 => \n array (\n 'id' => 1927,\n 'role_id' => 1,\n 'permission_id' => 19,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 27 => \n array (\n 'id' => 1928,\n 'role_id' => 1,\n 'permission_id' => 20,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 28 => \n array (\n 'id' => 1929,\n 'role_id' => 1,\n 'permission_id' => 33,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 29 => \n array (\n 'id' => 1930,\n 'role_id' => 1,\n 'permission_id' => 32,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 30 => \n array (\n 'id' => 1931,\n 'role_id' => 1,\n 'permission_id' => 22,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 31 => \n array (\n 'id' => 1932,\n 'role_id' => 1,\n 'permission_id' => 26,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 32 => \n array (\n 'id' => 1933,\n 'role_id' => 1,\n 'permission_id' => 27,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 33 => \n array (\n 'id' => 1934,\n 'role_id' => 1,\n 'permission_id' => 28,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 34 => \n array (\n 'id' => 1935,\n 'role_id' => 1,\n 'permission_id' => 31,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 35 => \n array (\n 'id' => 1936,\n 'role_id' => 1,\n 'permission_id' => 23,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 36 => \n array (\n 'id' => 1937,\n 'role_id' => 1,\n 'permission_id' => 24,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 37 => \n array (\n 'id' => 1938,\n 'role_id' => 1,\n 'permission_id' => 25,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 38 => \n array (\n 'id' => 1939,\n 'role_id' => 1,\n 'permission_id' => 35,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 39 => \n array (\n 'id' => 1940,\n 'role_id' => 1,\n 'permission_id' => 36,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 40 => \n array (\n 'id' => 1941,\n 'role_id' => 1,\n 'permission_id' => 39,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 41 => \n array (\n 'id' => 1942,\n 'role_id' => 1,\n 'permission_id' => 40,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 42 => \n array (\n 'id' => 1943,\n 'role_id' => 1,\n 'permission_id' => 41,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 43 => \n array (\n 'id' => 1944,\n 'role_id' => 1,\n 'permission_id' => 42,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 44 => \n array (\n 'id' => 1945,\n 'role_id' => 1,\n 'permission_id' => 43,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 45 => \n array (\n 'id' => 1946,\n 'role_id' => 1,\n 'permission_id' => 44,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 46 => \n array (\n 'id' => 1947,\n 'role_id' => 1,\n 'permission_id' => 48,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 47 => \n array (\n 'id' => 1948,\n 'role_id' => 1,\n 'permission_id' => 49,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 48 => \n array (\n 'id' => 1949,\n 'role_id' => 1,\n 'permission_id' => 45,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 49 => \n array (\n 'id' => 1950,\n 'role_id' => 1,\n 'permission_id' => 46,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 50 => \n array (\n 'id' => 1951,\n 'role_id' => 1,\n 'permission_id' => 47,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 51 => \n array (\n 'id' => 1952,\n 'role_id' => 1,\n 'permission_id' => 50,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 52 => \n array (\n 'id' => 1953,\n 'role_id' => 1,\n 'permission_id' => 53,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 53 => \n array (\n 'id' => 1954,\n 'role_id' => 1,\n 'permission_id' => 54,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 54 => \n array (\n 'id' => 1955,\n 'role_id' => 1,\n 'permission_id' => 55,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 55 => \n array (\n 'id' => 1974,\n 'role_id' => 3,\n 'permission_id' => 20,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 56 => \n array (\n 'id' => 1975,\n 'role_id' => 3,\n 'permission_id' => 1,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 57 => \n array (\n 'id' => 1976,\n 'role_id' => 3,\n 'permission_id' => 6,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 58 => \n array (\n 'id' => 1977,\n 'role_id' => 3,\n 'permission_id' => 11,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 59 => \n array (\n 'id' => 1978,\n 'role_id' => 3,\n 'permission_id' => 15,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 60 => \n array (\n 'id' => 1979,\n 'role_id' => 3,\n 'permission_id' => 31,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 61 => \n array (\n 'id' => 1980,\n 'role_id' => 3,\n 'permission_id' => 29,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 62 => \n array (\n 'id' => 1981,\n 'role_id' => 3,\n 'permission_id' => 19,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 63 => \n array (\n 'id' => 1982,\n 'role_id' => 3,\n 'permission_id' => 18,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 64 => \n array (\n 'id' => 1983,\n 'role_id' => 3,\n 'permission_id' => 28,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 65 => \n array (\n 'id' => 1984,\n 'role_id' => 3,\n 'permission_id' => 52,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 66 => \n array (\n 'id' => 1985,\n 'role_id' => 3,\n 'permission_id' => 5,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 67 => \n array (\n 'id' => 1986,\n 'role_id' => 3,\n 'permission_id' => 30,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 68 => \n array (\n 'id' => 1987,\n 'role_id' => 3,\n 'permission_id' => 21,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 69 => \n array (\n 'id' => 1988,\n 'role_id' => 3,\n 'permission_id' => 26,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 70 => \n array (\n 'id' => 1989,\n 'role_id' => 3,\n 'permission_id' => 4,\n 'created_at' => '2019-07-22 08:54:29',\n 'updated_at' => NULL,\n ),\n 71 => \n array (\n 'id' => 1990,\n 'role_id' => 5,\n 'permission_id' => 23,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 72 => \n array (\n 'id' => 1991,\n 'role_id' => 5,\n 'permission_id' => 25,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 73 => \n array (\n 'id' => 1992,\n 'role_id' => 5,\n 'permission_id' => 1,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 74 => \n array (\n 'id' => 1993,\n 'role_id' => 5,\n 'permission_id' => 16,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 75 => \n array (\n 'id' => 1994,\n 'role_id' => 5,\n 'permission_id' => 6,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 76 => \n array (\n 'id' => 1995,\n 'role_id' => 5,\n 'permission_id' => 11,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 77 => \n array (\n 'id' => 1996,\n 'role_id' => 5,\n 'permission_id' => 15,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 78 => \n array (\n 'id' => 1997,\n 'role_id' => 5,\n 'permission_id' => 24,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 79 => \n array (\n 'id' => 1998,\n 'role_id' => 5,\n 'permission_id' => 29,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 80 => \n array (\n 'id' => 1999,\n 'role_id' => 5,\n 'permission_id' => 19,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 81 => \n array (\n 'id' => 2000,\n 'role_id' => 5,\n 'permission_id' => 9,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 82 => \n array (\n 'id' => 2001,\n 'role_id' => 5,\n 'permission_id' => 10,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 83 => \n array (\n 'id' => 2002,\n 'role_id' => 5,\n 'permission_id' => 18,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 84 => \n array (\n 'id' => 2003,\n 'role_id' => 5,\n 'permission_id' => 28,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 85 => \n array (\n 'id' => 2004,\n 'role_id' => 5,\n 'permission_id' => 22,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 86 => \n array (\n 'id' => 2005,\n 'role_id' => 5,\n 'permission_id' => 5,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 87 => \n array (\n 'id' => 2006,\n 'role_id' => 5,\n 'permission_id' => 30,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 88 => \n array (\n 'id' => 2007,\n 'role_id' => 5,\n 'permission_id' => 21,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 89 => \n array (\n 'id' => 2008,\n 'role_id' => 5,\n 'permission_id' => 8,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 90 => \n array (\n 'id' => 2009,\n 'role_id' => 5,\n 'permission_id' => 7,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 91 => \n array (\n 'id' => 2010,\n 'role_id' => 5,\n 'permission_id' => 26,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 92 => \n array (\n 'id' => 2011,\n 'role_id' => 5,\n 'permission_id' => 4,\n 'created_at' => '2019-07-22 08:54:50',\n 'updated_at' => NULL,\n ),\n 93 => \n array (\n 'id' => 2132,\n 'role_id' => 2,\n 'permission_id' => 38,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 94 => \n array (\n 'id' => 2133,\n 'role_id' => 2,\n 'permission_id' => 23,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 95 => \n array (\n 'id' => 2134,\n 'role_id' => 2,\n 'permission_id' => 25,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 96 => \n array (\n 'id' => 2135,\n 'role_id' => 2,\n 'permission_id' => 32,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 97 => \n array (\n 'id' => 2136,\n 'role_id' => 2,\n 'permission_id' => 20,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 98 => \n array (\n 'id' => 2137,\n 'role_id' => 2,\n 'permission_id' => 1,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 99 => \n array (\n 'id' => 2138,\n 'role_id' => 2,\n 'permission_id' => 16,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 100 => \n array (\n 'id' => 2139,\n 'role_id' => 2,\n 'permission_id' => 6,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 101 => \n array (\n 'id' => 2140,\n 'role_id' => 2,\n 'permission_id' => 11,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 102 => \n array (\n 'id' => 2141,\n 'role_id' => 2,\n 'permission_id' => 33,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 103 => \n array (\n 'id' => 2142,\n 'role_id' => 2,\n 'permission_id' => 15,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 104 => \n array (\n 'id' => 2143,\n 'role_id' => 2,\n 'permission_id' => 36,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 105 => \n array (\n 'id' => 2144,\n 'role_id' => 2,\n 'permission_id' => 53,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 106 => \n array (\n 'id' => 2145,\n 'role_id' => 2,\n 'permission_id' => 42,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 107 => \n array (\n 'id' => 2146,\n 'role_id' => 2,\n 'permission_id' => 40,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 108 => \n array (\n 'id' => 2147,\n 'role_id' => 2,\n 'permission_id' => 31,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 109 => \n array (\n 'id' => 2148,\n 'role_id' => 2,\n 'permission_id' => 34,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 110 => \n array (\n 'id' => 2149,\n 'role_id' => 2,\n 'permission_id' => 24,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 111 => \n array (\n 'id' => 2150,\n 'role_id' => 2,\n 'permission_id' => 37,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 112 => \n array (\n 'id' => 2151,\n 'role_id' => 2,\n 'permission_id' => 29,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 113 => \n array (\n 'id' => 2152,\n 'role_id' => 2,\n 'permission_id' => 43,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 114 => \n array (\n 'id' => 2153,\n 'role_id' => 2,\n 'permission_id' => 41,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 115 => \n array (\n 'id' => 2154,\n 'role_id' => 2,\n 'permission_id' => 19,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 116 => \n array (\n 'id' => 2155,\n 'role_id' => 2,\n 'permission_id' => 2,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 117 => \n array (\n 'id' => 2156,\n 'role_id' => 2,\n 'permission_id' => 9,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 118 => \n array (\n 'id' => 2157,\n 'role_id' => 2,\n 'permission_id' => 50,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 119 => \n array (\n 'id' => 2158,\n 'role_id' => 2,\n 'permission_id' => 10,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 120 => \n array (\n 'id' => 2159,\n 'role_id' => 2,\n 'permission_id' => 18,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 121 => \n array (\n 'id' => 2160,\n 'role_id' => 2,\n 'permission_id' => 49,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 122 => \n array (\n 'id' => 2161,\n 'role_id' => 2,\n 'permission_id' => 48,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 123 => \n array (\n 'id' => 2162,\n 'role_id' => 2,\n 'permission_id' => 44,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 124 => \n array (\n 'id' => 2163,\n 'role_id' => 2,\n 'permission_id' => 47,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 125 => \n array (\n 'id' => 2164,\n 'role_id' => 2,\n 'permission_id' => 46,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 126 => \n array (\n 'id' => 2165,\n 'role_id' => 2,\n 'permission_id' => 45,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 127 => \n array (\n 'id' => 2166,\n 'role_id' => 2,\n 'permission_id' => 28,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 128 => \n array (\n 'id' => 2167,\n 'role_id' => 2,\n 'permission_id' => 22,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 129 => \n array (\n 'id' => 2168,\n 'role_id' => 2,\n 'permission_id' => 51,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 130 => \n array (\n 'id' => 2169,\n 'role_id' => 2,\n 'permission_id' => 52,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 131 => \n array (\n 'id' => 2170,\n 'role_id' => 2,\n 'permission_id' => 5,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 132 => \n array (\n 'id' => 2171,\n 'role_id' => 2,\n 'permission_id' => 30,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 133 => \n array (\n 'id' => 2172,\n 'role_id' => 2,\n 'permission_id' => 21,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 134 => \n array (\n 'id' => 2173,\n 'role_id' => 2,\n 'permission_id' => 8,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 135 => \n array (\n 'id' => 2174,\n 'role_id' => 2,\n 'permission_id' => 7,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 136 => \n array (\n 'id' => 2175,\n 'role_id' => 2,\n 'permission_id' => 3,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 137 => \n array (\n 'id' => 2176,\n 'role_id' => 2,\n 'permission_id' => 26,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 138 => \n array (\n 'id' => 2177,\n 'role_id' => 2,\n 'permission_id' => 27,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 139 => \n array (\n 'id' => 2178,\n 'role_id' => 2,\n 'permission_id' => 35,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 140 => \n array (\n 'id' => 2179,\n 'role_id' => 2,\n 'permission_id' => 4,\n 'created_at' => '2019-07-24 11:35:54',\n 'updated_at' => NULL,\n ),\n 141 => \n array (\n 'id' => 2180,\n 'role_id' => 4,\n 'permission_id' => 23,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 142 => \n array (\n 'id' => 2181,\n 'role_id' => 4,\n 'permission_id' => 25,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 143 => \n array (\n 'id' => 2182,\n 'role_id' => 4,\n 'permission_id' => 1,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 144 => \n array (\n 'id' => 2183,\n 'role_id' => 4,\n 'permission_id' => 16,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 145 => \n array (\n 'id' => 2184,\n 'role_id' => 4,\n 'permission_id' => 6,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 146 => \n array (\n 'id' => 2185,\n 'role_id' => 4,\n 'permission_id' => 11,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 147 => \n array (\n 'id' => 2186,\n 'role_id' => 4,\n 'permission_id' => 15,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 148 => \n array (\n 'id' => 2187,\n 'role_id' => 4,\n 'permission_id' => 24,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 149 => \n array (\n 'id' => 2188,\n 'role_id' => 4,\n 'permission_id' => 29,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 150 => \n array (\n 'id' => 2189,\n 'role_id' => 4,\n 'permission_id' => 19,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 151 => \n array (\n 'id' => 2190,\n 'role_id' => 4,\n 'permission_id' => 9,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 152 => \n array (\n 'id' => 2191,\n 'role_id' => 4,\n 'permission_id' => 50,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 153 => \n array (\n 'id' => 2192,\n 'role_id' => 4,\n 'permission_id' => 10,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 154 => \n array (\n 'id' => 2193,\n 'role_id' => 4,\n 'permission_id' => 18,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 155 => \n array (\n 'id' => 2194,\n 'role_id' => 4,\n 'permission_id' => 28,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 156 => \n array (\n 'id' => 2195,\n 'role_id' => 4,\n 'permission_id' => 22,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 157 => \n array (\n 'id' => 2196,\n 'role_id' => 4,\n 'permission_id' => 5,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 158 => \n array (\n 'id' => 2197,\n 'role_id' => 4,\n 'permission_id' => 30,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 159 => \n array (\n 'id' => 2198,\n 'role_id' => 4,\n 'permission_id' => 21,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 160 => \n array (\n 'id' => 2199,\n 'role_id' => 4,\n 'permission_id' => 8,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 161 => \n array (\n 'id' => 2200,\n 'role_id' => 4,\n 'permission_id' => 7,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 162 => \n array (\n 'id' => 2201,\n 'role_id' => 4,\n 'permission_id' => 26,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 163 => \n array (\n 'id' => 2202,\n 'role_id' => 4,\n 'permission_id' => 56,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 164 => \n array (\n 'id' => 2203,\n 'role_id' => 4,\n 'permission_id' => 4,\n 'created_at' => '2019-07-24 12:01:11',\n 'updated_at' => NULL,\n ),\n 165 => \n array (\n 'id' => 2256,\n 'role_id' => 1,\n 'permission_id' => 56,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 166 => \n array (\n 'id' => 2261,\n 'role_id' => 7,\n 'permission_id' => 38,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 167 => \n array (\n 'id' => 2262,\n 'role_id' => 7,\n 'permission_id' => 23,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 168 => \n array (\n 'id' => 2263,\n 'role_id' => 7,\n 'permission_id' => 25,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 169 => \n array (\n 'id' => 2264,\n 'role_id' => 7,\n 'permission_id' => 32,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 170 => \n array (\n 'id' => 2265,\n 'role_id' => 7,\n 'permission_id' => 20,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 171 => \n array (\n 'id' => 2266,\n 'role_id' => 7,\n 'permission_id' => 1,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 172 => \n array (\n 'id' => 2267,\n 'role_id' => 7,\n 'permission_id' => 16,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 173 => \n array (\n 'id' => 2268,\n 'role_id' => 7,\n 'permission_id' => 6,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 174 => \n array (\n 'id' => 2269,\n 'role_id' => 7,\n 'permission_id' => 11,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 175 => \n array (\n 'id' => 2270,\n 'role_id' => 7,\n 'permission_id' => 33,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 176 => \n array (\n 'id' => 2271,\n 'role_id' => 7,\n 'permission_id' => 15,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 177 => \n array (\n 'id' => 2272,\n 'role_id' => 7,\n 'permission_id' => 36,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 178 => \n array (\n 'id' => 2273,\n 'role_id' => 7,\n 'permission_id' => 53,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 179 => \n array (\n 'id' => 2274,\n 'role_id' => 7,\n 'permission_id' => 42,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 180 => \n array (\n 'id' => 2275,\n 'role_id' => 7,\n 'permission_id' => 40,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 181 => \n array (\n 'id' => 2276,\n 'role_id' => 7,\n 'permission_id' => 31,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 182 => \n array (\n 'id' => 2277,\n 'role_id' => 7,\n 'permission_id' => 34,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 183 => \n array (\n 'id' => 2278,\n 'role_id' => 7,\n 'permission_id' => 24,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 184 => \n array (\n 'id' => 2279,\n 'role_id' => 7,\n 'permission_id' => 37,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 185 => \n array (\n 'id' => 2280,\n 'role_id' => 7,\n 'permission_id' => 29,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 186 => \n array (\n 'id' => 2281,\n 'role_id' => 7,\n 'permission_id' => 43,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 187 => \n array (\n 'id' => 2282,\n 'role_id' => 7,\n 'permission_id' => 41,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 188 => \n array (\n 'id' => 2283,\n 'role_id' => 7,\n 'permission_id' => 19,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 189 => \n array (\n 'id' => 2284,\n 'role_id' => 7,\n 'permission_id' => 2,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 190 => \n array (\n 'id' => 2285,\n 'role_id' => 7,\n 'permission_id' => 9,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 191 => \n array (\n 'id' => 2286,\n 'role_id' => 7,\n 'permission_id' => 54,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 192 => \n array (\n 'id' => 2287,\n 'role_id' => 7,\n 'permission_id' => 55,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 193 => \n array (\n 'id' => 2288,\n 'role_id' => 7,\n 'permission_id' => 50,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 194 => \n array (\n 'id' => 2289,\n 'role_id' => 7,\n 'permission_id' => 10,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 195 => \n array (\n 'id' => 2290,\n 'role_id' => 7,\n 'permission_id' => 18,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 196 => \n array (\n 'id' => 2291,\n 'role_id' => 7,\n 'permission_id' => 49,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 197 => \n array (\n 'id' => 2292,\n 'role_id' => 7,\n 'permission_id' => 48,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 198 => \n array (\n 'id' => 2293,\n 'role_id' => 7,\n 'permission_id' => 44,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 199 => \n array (\n 'id' => 2294,\n 'role_id' => 7,\n 'permission_id' => 47,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 200 => \n array (\n 'id' => 2295,\n 'role_id' => 7,\n 'permission_id' => 46,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 201 => \n array (\n 'id' => 2296,\n 'role_id' => 7,\n 'permission_id' => 45,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 202 => \n array (\n 'id' => 2297,\n 'role_id' => 7,\n 'permission_id' => 28,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 203 => \n array (\n 'id' => 2298,\n 'role_id' => 7,\n 'permission_id' => 22,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 204 => \n array (\n 'id' => 2299,\n 'role_id' => 7,\n 'permission_id' => 51,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 205 => \n array (\n 'id' => 2300,\n 'role_id' => 7,\n 'permission_id' => 52,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 206 => \n array (\n 'id' => 2301,\n 'role_id' => 7,\n 'permission_id' => 5,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 207 => \n array (\n 'id' => 2302,\n 'role_id' => 7,\n 'permission_id' => 30,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 208 => \n array (\n 'id' => 2303,\n 'role_id' => 7,\n 'permission_id' => 21,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 209 => \n array (\n 'id' => 2304,\n 'role_id' => 7,\n 'permission_id' => 8,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 210 => \n array (\n 'id' => 2305,\n 'role_id' => 7,\n 'permission_id' => 7,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 211 => \n array (\n 'id' => 2306,\n 'role_id' => 7,\n 'permission_id' => 39,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 212 => \n array (\n 'id' => 2307,\n 'role_id' => 7,\n 'permission_id' => 3,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 213 => \n array (\n 'id' => 2308,\n 'role_id' => 7,\n 'permission_id' => 26,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 214 => \n array (\n 'id' => 2309,\n 'role_id' => 7,\n 'permission_id' => 27,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 215 => \n array (\n 'id' => 2310,\n 'role_id' => 7,\n 'permission_id' => 35,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 216 => \n array (\n 'id' => 2311,\n 'role_id' => 7,\n 'permission_id' => 58,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 217 => \n array (\n 'id' => 2312,\n 'role_id' => 7,\n 'permission_id' => 56,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n 218 => \n array (\n 'id' => 2313,\n 'role_id' => 7,\n 'permission_id' => 4,\n 'created_at' => '2019-07-30 07:02:15',\n 'updated_at' => NULL,\n ),\n ));\n \n \n }", "public function permissions()\n {\n return $this->belongsToMany(EloquentTestPermission::class, 'permission_roles', 'role_id', 'permission_id');\n }", "public function getAllPermissionOfUser($list_role)\n {\n // TODO: Implement getAllPermissionOfUser() method.\n try{\n $permissionsOfUser = DB::table('role_permission')\n ->join('roles', 'roles.id','=', 'role_permission.role_id')\n ->join('permissions', 'role_permission.permission_id', '=', 'permissions.id')\n ->whereIn('roles.id', $list_role)\n ->select('permissions.id')\n ->get()\n ->pluck('id')\n ->unique();\n return $permissionsOfUser;\n }\n catch (\\Exception $exception)\n {\n return null;\n }\n }", "public static function getPermissions($controllerName,$userGroupRole)//forApi\n {\n //$user=User_helper::get_user();\n $permissions = array();\n $task=SystemTask::where('controller', $controllerName)->select('id')->first(); \n $taskId=$task?$task->id:0;\n for($i=0; $i<self::$MAX_MODULE_ACTIONS; $i++)\n {\n if(strpos($userGroupRole['action_'.$i], ','.$taskId.',')!==false){\n $permissions['action_'.$i] = 1;\n }\n else\n {\n $permissions['action_'.$i]=0;\n }\n\n \n }\n // if($user){\n // $item=Query_helper::get_info(TABLE_SYSTEM_TASK,array('id'),array('controller = \"'.$controller_name.'\"', 'status = \"'.SYSTEM_STATUS_ACTIVE.'\"'),1);\n // if($item){\n // for($i=0;$i<Module_task_helper::$MAX_MODULE_ACTIONS;$i++)\n // {\n // if(strpos($user['action_'.$i], ','.$item['id'].',')!==false){\n // $permissions['action_'.$i] = 1;\n // }\n // }\n // }\n // }\n return $permissions;\n }", "public function update(Request $request, $id)\n {\n $this->validation($request, $id);\n\n $role = Role::findOrFail($id);\n\n $role_data = $request->only(\n [\n 'choosable',\n 'parent_role_id',\n 'title',\n 'description',\n 'settings',\n ]\n );\n $role_data['client_ids'] = $request->clients;\n\n $role->update($role_data);\n /**\n * Sync Permission with Role.\n */\n $menu_items = $request->get('menu_items', []);\n\n $permissions = \\App\\Models\\Permission::join(\n 'application_menu_items',\n function ($q) {\n $q->whereRaw('JSON_CONTAINS(application_menu_items.permission_ids, CAST(permissions.id AS CHAR))');\n }\n )->select('permissions.id')->groupBy('permissions.id')\n ->whereIn('application_menu_items.id', $menu_items)\n ->get()->pluck('id')->toArray();\n\n $role_permissions = [];\n\n foreach ($permissions as $permission_id) {\n $role_permissions[$permission_id] = ['limitations' => null];\n }\n\n $_role_permissions = $request->rolePermissions ? $request->rolePermissions : [];\n foreach ($_role_permissions as $role_permission) {\n if (in_array($role_permission['permission_id'], $permissions)) {\n $role_permissions[$role_permission['permission_id']] = [\n 'limitations' => $role_permission['limitations'],\n ];\n }\n }\n\n // Sync Application Menu\n $role->menuItems()->sync($menu_items);\n // Sync Permission field with Role.\n $role->permissions()->sync($role_permissions);\n\n $new_role_permissions = $role->permissions()->get()->map(\n function ($q) {\n return [\n 'permission_id' => $q->id,\n 'role_permission_id' => $q->pivot->id,\n ];\n }\n )->keyBy('permission_id')->toArray();\n\n $permission_fields = [];\n\n $fields = $request->fields ? $request->fields : [];\n\n foreach ($fields as $field) {\n $permission_id = $field['permission_id'];\n if (!isset($new_role_permissions[$permission_id]['role_permission_id'])) {\n continue;\n }\n $permission_fields[$field['permission_field_id']] = [\n 'authority' => $field['authority'],\n 'permission_field_id' => $field['permission_field_id'],\n 'permission_id' => $permission_id,\n 'role_permission_id' => $new_role_permissions[$permission_id]['role_permission_id'],\n ];\n }\n $role->permissionFields()->sync($permission_fields);\n\n // Deleting Role detail from cache repo.\n \\Cache::forget('permission_role_repository_'.$id);\n\n return $this->setMessage('Role has been updated successfully.')->response();\n }", "function rolePermissionFactory()\n {\n return [\n 'factory'=>(new JbRolePermission)\n ];\n }", "private function _saveRolePermissions($request, $role)\n {\n $permissionIds = [];\n\n if (count($request->get('permissions')) > 0) {\n foreach ($request->get('permissions') as $key => $value) {\n if ($value != 1) {\n continue;\n }\n $permissions = explode(',', $key);\n foreach ($permissions as $permissionName) {\n if (null === ($permissionModel = Permission::getPermissionByName($permissionName))) {\n $permissionModel = Permission::create(['name' => $permissionName]);\n }\n $permissionIds[] = $permissionModel->id;\n }\n }\n }\n $ids = array_unique($permissionIds);\n $role->permissions()->sync($ids);\n }", "public function run()\n {\n //create new permission and assign new permission to roles\n\n $permissions_data = [\n [\n 'permission_name' => 'read-logviewer',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n ],\n ],\n [\n 'permission_name' => 'read-passport',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n ],\n ],\n [\n 'permission_name' => 'create-user',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n [\n 'permission_name' => 'read-user',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n [\n 'permission_name' => 'update-user',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n [\n 'permission_name' => 'delete-user',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n [\n 'permission_name' => 'create-role',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n [\n 'permission_name' => 'read-role',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n [\n 'permission_name' => 'update-role',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n [\n 'permission_name' => 'delete-role',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n [\n 'permission_name' => 'create-permission',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n [\n 'permission_name' => 'read-permission',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n [\n 'permission_name' => 'update-permission',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n [\n 'permission_name' => 'delete-permission',\n 'roles' => [\n 'administrator',\n ],\n 'guards' => [\n 'web',\n 'api',\n ],\n ],\n ];\n\n if (!empty($permissions_data)) {\n foreach ($permissions_data as $permission_data) {\n\n $permission_name = $permission_data['permission_name'];\n $permission_guards = array_get($permission_data, 'guards', []);\n $roles = array_get($permission_data, 'roles', []);\n\n if (!empty($permission_guards)) {\n foreach ($permission_guards as $permission_guard) {\n\n if ($permission_guard == 'api') {\n $permission = ApiPermission::firstByName($permission_name);\n } else {\n if ($permission_guard == 'web') {\n $permission = WebPermission::firstByName($permission_name);\n }\n }\n\n if ($permission) {\n\n //assign permission to role\n\n if (!empty($roles)) {\n foreach ($roles as $role_name) {\n\n if ($permission_guard == 'api') {\n $role = ApiRole::firstByName($role_name);\n } else {\n if ($permission_guard == 'web') {\n $role = WebRole::firstByName($role_name);\n }\n }\n\n if ($role) {\n\n //assign permission to role\n\n $role_has_permission = $role->hasPermissionTo($permission);\n\n if (!$role_has_permission) {\n $role->givePermissionTo($permission);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }", "public function permissions()\n {\n return $this->belongsToManyThrough(\n EloquentTestPermission::class,\n EloquentTestRole::class,\n 'role_users',\n 'user_id',\n 'role_id',\n 'permission_roles',\n 'role_id',\n 'permission_id'\n );\n }", "public static function copyPermissions($id){\n $permissions = Permission::all();\n foreach($permissions as $permissionData)\n {\n RolePermission::create([\n \"permission_id\"=>$permissionData->id,\n \"role_id\"=>$id,\n \"add\"=>0,\n \"edit\"=>0,\n \"delte\"=>0,\n \"view\"=>0,\n \"list\"=>0\n ]);\n }\n return;\n }", "public function store(StoreRequest $request)\n{\n $AgentPermission=Permission::where('name','like','%Order%')->get();\n\n $user = User::create([\n 'name' => $request->name,\n 'email' => $request->email,\n 'password'=>Hash::make($request->password),\n 'password_confirmation'=>Hash::make($request->password_confirmation),\n 'mobile'=>$request->mobile,\n 'work'=>$request->work,\n 'is_agent'=>'1'\n ]);\n\n $user->assignRole([3]);\n\n foreach($AgentPermission as $a)\n {\n $user->givePermissionTo($a->id);\n\n }\n\n return $user;\n}", "public function permissions($idr) {\n\n $stmt = $this->connection->prepare(\"SELECT id, permission_id FROM role_permissions WHERE role_id = ?\");\n $stmt->bind_param(\"s\", $idr);\n $stmt->execute();\n $result = $stmt->get_result();\n return $result->fetch_array();\n }", "public function permissions()\n {\n return $this->belongsToMany('bedoke\\LaravelRolePerms\\Models\\Permission', 'role_permissions')\n ->withPivot('id')\n ->withTimestamps();\n }", "public function index($id = null)\n {\n if (is_null($id)) {\n redirect('/roles');\n }\n\n // permissions restrictions are the same as for roles\n $this->checkPermission('roles', 'edit');\n\n // check if role exists\n $this->db->where('id', $id);\n $q = $this->db->get('roles');\n if ($q->num_rows() <= 0) {\n redirect('/roles');\n }\n $role = $q->result()[0];\n\n // form was submitted\n if (\n isset($_SERVER['REQUEST_METHOD']) &&\n $_SERVER['REQUEST_METHOD'] == 'POST'\n ) {\n $this->db->delete('rights', ['role_id' => $id]);\n\n foreach ($this->input->post('permissions') as $name => $values) {\n if (!array_key_exists($name, $this->permissions)) {\n continue;\n }\n $this->db->insert('rights', [\n 'role_id' => $id,\n 'name' => $name,\n 'show' =>\n (\n array_key_exists('show', $values) &&\n $this->permissions[$name]->show\n )\n ? 1\n : 0,\n 'add' =>\n (array_key_exists('add', $values) && $this->permissions[$name]->add)\n ? 1\n : 0,\n 'edit' =>\n (\n array_key_exists('edit', $values) &&\n $this->permissions[$name]->edit\n )\n ? 1\n : 0,\n 'delete' =>\n (\n array_key_exists('delete', $values) &&\n $this->permissions[$name]->delete\n )\n ? 1\n : 0\n ]);\n }\n\n $this->writeLog(\n 'update',\n 'rights',\n ['permissions' => $this->input->post('permissions'), 'role_id' => $id],\n $id\n );\n\n $this->session->set_flashdata(\n 'success',\n \"Les permissions de ce rôle ont bien été modifiées avec succès !\"\n );\n\n redirect('/roles');\n }\n\n // get current role permissions\n $this->db->where('role_id', $id);\n $permissions = $this->db->get('rights')->result();\n\n foreach ($permissions as $permission) {\n if (!array_key_exists($permission->name, $this->permissions)) {\n continue;\n }\n if ($permission->show == 1) {\n $this->permissions[$permission->name]->checked[] = 'show';\n }\n if ($permission->add == 1) {\n $this->permissions[$permission->name]->checked[] = 'add';\n }\n if ($permission->edit == 1) {\n $this->permissions[$permission->name]->checked[] = 'edit';\n }\n if ($permission->delete == 1) {\n $this->permissions[$permission->name]->checked[] = 'delete';\n }\n }\n\n $this->view('permissions', [\n 'role' => $role,\n 'permissions' => $this->permissions\n ]);\n }", "public function permissions()\n {\n return $this->belongsToMany(\n config('admin.permission.models.permission'),\n config('admin.permission.table_names.role_has_permissions')\n );\n }", "private function getRolesPermissions()\n {\n return [\n [\n 'name' => 'Roles - List all roles',\n 'description' => 'Allow to list all roles.',\n 'slug' => RolesPolicy::PERMISSION_LIST,\n ],\n [\n 'name' => 'Roles - View a role',\n 'description' => 'Allow to view the role\\'s details.',\n 'slug' => RolesPolicy::PERMISSION_SHOW,\n ],\n [\n 'name' => 'Roles - Add/Create a role',\n 'description' => 'Allow to create a new role.',\n 'slug' => RolesPolicy::PERMISSION_CREATE,\n ],\n [\n 'name' => 'Roles - Edit/Update a role',\n 'description' => 'Allow to update a role.',\n 'slug' => RolesPolicy::PERMISSION_UPDATE,\n ],\n [\n 'name' => 'Roles - Delete a role',\n 'description' => 'Allow to delete a role.',\n 'slug' => RolesPolicy::PERMISSION_DELETE,\n ],\n ];\n }", "public function ability($roles, $permissions, $options = []);", "public function roles()\n {\n return $this->hasManyThrough(Permission::class);\n }", "public function index($role_id)\n {\n try \n {\n $permissions = Permission::all();\n $role = Role::find($role_id);\n\n if(count($permissions) > 0)\n {\n foreach ($permissions as $permission) \n {\n if('es' == Auth::user()->language)\n {\n $permission->permission_name = $this->permissionsEs[$permission->name][0];\n $permission->section = $this->permissionsEs[$permission->name][1];\n $permission->section_name = $this->permissionsEs[$permission->name][2];\n }\n else\n {\n $permission->permission_name = $this->permissionsEn[$permission->name][0];\n $permission->section = $this->permissionsEn[$permission->name][1];\n $permission->section_name = $this->permissionsEn[$permission->name][2];\n }\n\n if($role->hasPermissionTo($permission->name))\n {\n $permission->allowed = true;\n }\n else\n {\n $permission->allowed = false; \n }\n }\n }\n\n $this->_response = $permissions;\n } \n catch (Exception $e) \n {\n //Write error in log\n Log::error($e->getMessage() . ' line: ' . $e->getLine() . ' file: ' . $e->getFile());\n return response()->json([], self::STATUS_INTERNAL_SERVER_ERROR);\n }\n\n return response()->json($this->_response, self::STATUS_OK);\n }", "public function run()\n {\n \n\n \\DB::table('ori_roles')->delete();\n \n \\DB::table('ori_roles')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'cmpny_id' => 1,\n 'role' => 'Super Administrator',\n 'access_permission' => 'a:98:{i:0;a:2:{s:13:\"permission_id\";s:1:\"1\";s:15:\"permission_name\";s:21:\"permission management\";}i:1;a:2:{s:13:\"permission_id\";s:2:\"45\";s:15:\"permission_name\";s:10:\"emailfetch\";}i:2;a:2:{s:13:\"permission_id\";s:1:\"2\";s:15:\"permission_name\";s:15:\"role management\";}i:3;a:2:{s:13:\"permission_id\";s:1:\"3\";s:15:\"permission_name\";s:15:\"user management\";}i:4;a:2:{s:13:\"permission_id\";s:1:\"4\";s:15:\"permission_name\";s:11:\"plan create\";}i:5;a:2:{s:13:\"permission_id\";s:1:\"5\";s:15:\"permission_name\";s:9:\"plan edit\";}i:6;a:2:{s:13:\"permission_id\";s:1:\"6\";s:15:\"permission_name\";s:9:\"plan list\";}i:7;a:2:{s:13:\"permission_id\";s:1:\"7\";s:15:\"permission_name\";s:11:\"plan delete\";}i:8;a:2:{s:13:\"permission_id\";s:1:\"8\";s:15:\"permission_name\";s:17:\"query type create\";}i:9;a:2:{s:13:\"permission_id\";s:1:\"9\";s:15:\"permission_name\";s:15:\"query type edit\";}i:10;a:2:{s:13:\"permission_id\";s:2:\"10\";s:15:\"permission_name\";s:15:\"query type list\";}i:11;a:2:{s:13:\"permission_id\";s:2:\"11\";s:15:\"permission_name\";s:17:\"query type delete\";}i:12;a:2:{s:13:\"permission_id\";s:2:\"12\";s:15:\"permission_name\";s:19:\"query status create\";}i:13;a:2:{s:13:\"permission_id\";s:2:\"13\";s:15:\"permission_name\";s:17:\"query status edit\";}i:14;a:2:{s:13:\"permission_id\";s:2:\"14\";s:15:\"permission_name\";s:17:\"query status list\";}i:15;a:2:{s:13:\"permission_id\";s:2:\"15\";s:15:\"permission_name\";s:19:\"query status delete\";}i:16;a:2:{s:13:\"permission_id\";s:2:\"16\";s:15:\"permission_name\";s:22:\"customer nature create\";}i:17;a:2:{s:13:\"permission_id\";s:2:\"17\";s:15:\"permission_name\";s:20:\"customer nature edit\";}i:18;a:2:{s:13:\"permission_id\";s:2:\"18\";s:15:\"permission_name\";s:20:\"customer nature list\";}i:19;a:2:{s:13:\"permission_id\";s:2:\"19\";s:15:\"permission_name\";s:22:\"customer nature delete\";}i:20;a:2:{s:13:\"permission_id\";s:2:\"20\";s:15:\"permission_name\";s:24:\"customer priority create\";}i:21;a:2:{s:13:\"permission_id\";s:2:\"21\";s:15:\"permission_name\";s:22:\"customer priority edit\";}i:22;a:2:{s:13:\"permission_id\";s:2:\"22\";s:15:\"permission_name\";s:22:\"customer priority list\";}i:23;a:2:{s:13:\"permission_id\";s:2:\"23\";s:15:\"permission_name\";s:24:\"customer priority delete\";}i:24;a:2:{s:13:\"permission_id\";s:2:\"29\";s:15:\"permission_name\";s:13:\"settings view\";}i:25;a:2:{s:13:\"permission_id\";s:2:\"37\";s:15:\"permission_name\";s:14:\"changepassword\";}i:26;a:2:{s:13:\"permission_id\";s:2:\"24\";s:15:\"permission_name\";s:10:\"faq create\";}i:27;a:2:{s:13:\"permission_id\";s:2:\"25\";s:15:\"permission_name\";s:8:\"faq edit\";}i:28;a:2:{s:13:\"permission_id\";s:2:\"26\";s:15:\"permission_name\";s:8:\"faq list\";}i:29;a:2:{s:13:\"permission_id\";s:2:\"27\";s:15:\"permission_name\";s:10:\"faq delete\";}i:30;a:2:{s:13:\"permission_id\";s:2:\"28\";s:15:\"permission_name\";s:19:\"view faq categories\";}i:31;a:2:{s:13:\"permission_id\";s:2:\"30\";s:15:\"permission_name\";s:15:\"template create\";}i:32;a:2:{s:13:\"permission_id\";s:2:\"31\";s:15:\"permission_name\";s:13:\"template edit\";}i:33;a:2:{s:13:\"permission_id\";s:2:\"32\";s:15:\"permission_name\";s:13:\"template list\";}i:34;a:2:{s:13:\"permission_id\";s:2:\"33\";s:15:\"permission_name\";s:15:\"template delete\";}i:35;a:2:{s:13:\"permission_id\";s:2:\"34\";s:15:\"permission_name\";s:14:\"profile create\";}i:36;a:2:{s:13:\"permission_id\";s:2:\"35\";s:15:\"permission_name\";s:12:\"profile view\";}i:37;a:2:{s:13:\"permission_id\";s:2:\"36\";s:15:\"permission_name\";s:9:\"lead list\";}i:38;a:2:{s:13:\"permission_id\";s:2:\"51\";s:15:\"permission_name\";s:23:\"lead source type create\";}i:39;a:2:{s:13:\"permission_id\";s:2:\"52\";s:15:\"permission_name\";s:21:\"lead source type edit\";}i:40;a:2:{s:13:\"permission_id\";s:2:\"53\";s:15:\"permission_name\";s:21:\"lead source type list\";}i:41;a:2:{s:13:\"permission_id\";s:2:\"54\";s:15:\"permission_name\";s:23:\"lead source type delete\";}i:42;a:2:{s:13:\"permission_id\";s:2:\"55\";s:15:\"permission_name\";s:18:\"lead source create\";}i:43;a:2:{s:13:\"permission_id\";s:2:\"56\";s:15:\"permission_name\";s:16:\"lead source edit\";}i:44;a:2:{s:13:\"permission_id\";s:2:\"57\";s:15:\"permission_name\";s:16:\"lead source list\";}i:45;a:2:{s:13:\"permission_id\";s:2:\"58\";s:15:\"permission_name\";s:18:\"lead source delete\";}i:46;a:2:{s:13:\"permission_id\";s:2:\"40\";s:15:\"permission_name\";s:24:\"service request all list\";}i:47;a:2:{s:13:\"permission_id\";s:2:\"41\";s:15:\"permission_name\";s:24:\"escalation summary chart\";}i:48;a:2:{s:13:\"permission_id\";s:2:\"43\";s:15:\"permission_name\";s:12:\"escalated to\";}i:49;a:2:{s:13:\"permission_id\";s:3:\"100\";s:15:\"permission_name\";s:8:\"escalate\";}i:50;a:2:{s:13:\"permission_id\";s:2:\"44\";s:15:\"permission_name\";s:13:\"followup view\";}i:51;a:2:{s:13:\"permission_id\";s:2:\"47\";s:15:\"permission_name\";s:16:\"Followups Reopen\";}i:52;a:2:{s:13:\"permission_id\";s:2:\"48\";s:15:\"permission_name\";s:21:\"followup history edit\";}i:53;a:2:{s:13:\"permission_id\";s:2:\"99\";s:15:\"permission_name\";s:18:\"export in helpdesk\";}i:54;a:2:{s:13:\"permission_id\";s:2:\"46\";s:15:\"permission_name\";s:17:\"survey management\";}i:55;a:2:{s:13:\"permission_id\";s:2:\"49\";s:15:\"permission_name\";s:13:\"survey report\";}i:56;a:2:{s:13:\"permission_id\";s:2:\"39\";s:15:\"permission_name\";s:17:\"feedback settings\";}i:57;a:2:{s:13:\"permission_id\";s:2:\"50\";s:15:\"permission_name\";s:15:\"feedback report\";}i:58;a:2:{s:13:\"permission_id\";s:2:\"38\";s:15:\"permission_name\";s:19:\"question management\";}i:59;a:2:{s:13:\"permission_id\";s:2:\"42\";s:15:\"permission_name\";s:19:\"campaign management\";}i:60;a:2:{s:13:\"permission_id\";s:2:\"71\";s:15:\"permission_name\";s:15:\"campaign create\";}i:61;a:2:{s:13:\"permission_id\";s:2:\"72\";s:15:\"permission_name\";s:13:\"campaign edit\";}i:62;a:2:{s:13:\"permission_id\";s:2:\"73\";s:15:\"permission_name\";s:13:\"campaign list\";}i:63;a:2:{s:13:\"permission_id\";s:2:\"74\";s:15:\"permission_name\";s:15:\"campaign delete\";}i:64;a:2:{s:13:\"permission_id\";s:2:\"59\";s:15:\"permission_name\";s:23:\"sales automation create\";}i:65;a:2:{s:13:\"permission_id\";s:2:\"60\";s:15:\"permission_name\";s:21:\"sales automation edit\";}i:66;a:2:{s:13:\"permission_id\";s:2:\"61\";s:15:\"permission_name\";s:21:\"sales automation list\";}i:67;a:2:{s:13:\"permission_id\";s:2:\"62\";s:15:\"permission_name\";s:23:\"sales automation delete\";}i:68;a:2:{s:13:\"permission_id\";s:2:\"63\";s:15:\"permission_name\";s:26:\"intimation settings create\";}i:69;a:2:{s:13:\"permission_id\";s:2:\"64\";s:15:\"permission_name\";s:24:\"intimation settings edit\";}i:70;a:2:{s:13:\"permission_id\";s:2:\"65\";s:15:\"permission_name\";s:17:\"notification list\";}i:71;a:2:{s:13:\"permission_id\";s:2:\"66\";s:15:\"permission_name\";s:16:\"group management\";}i:72;a:2:{s:13:\"permission_id\";s:2:\"67\";s:15:\"permission_name\";s:12:\"group create\";}i:73;a:2:{s:13:\"permission_id\";s:2:\"68\";s:15:\"permission_name\";s:10:\"group edit\";}i:74;a:2:{s:13:\"permission_id\";s:2:\"69\";s:15:\"permission_name\";s:10:\"group list\";}i:75;a:2:{s:13:\"permission_id\";s:2:\"70\";s:15:\"permission_name\";s:12:\"group delete\";}i:76;a:2:{s:13:\"permission_id\";s:2:\"84\";s:15:\"permission_name\";s:17:\"group lead import\";}i:77;a:2:{s:13:\"permission_id\";s:2:\"85\";s:15:\"permission_name\";s:18:\"group excel import\";}i:78;a:2:{s:13:\"permission_id\";s:2:\"75\";s:15:\"permission_name\";s:29:\"campaign email delivery graph\";}i:79;a:2:{s:13:\"permission_id\";s:2:\"76\";s:15:\"permission_name\";s:32:\"campaign batch efficiency report\";}i:80;a:2:{s:13:\"permission_id\";s:2:\"77\";s:15:\"permission_name\";s:27:\"campaign email batch report\";}i:81;a:2:{s:13:\"permission_id\";s:2:\"78\";s:15:\"permission_name\";s:27:\"campaign sms delivery graph\";}i:82;a:2:{s:13:\"permission_id\";s:2:\"79\";s:15:\"permission_name\";s:25:\"campaign sms batch report\";}i:83;a:2:{s:13:\"permission_id\";s:2:\"80\";s:15:\"permission_name\";s:30:\"campaign autodial status graph\";}i:84;a:2:{s:13:\"permission_id\";s:2:\"81\";s:15:\"permission_name\";s:30:\"campaign autodial batch report\";}i:85;a:2:{s:13:\"permission_id\";s:2:\"82\";s:15:\"permission_name\";s:32:\"campaign manualcall status graph\";}i:86;a:2:{s:13:\"permission_id\";s:2:\"83\";s:15:\"permission_name\";s:32:\"campaign manualcall batch report\";}i:87;a:2:{s:13:\"permission_id\";s:2:\"86\";s:15:\"permission_name\";s:19:\"customer tab create\";}i:88;a:2:{s:13:\"permission_id\";s:2:\"87\";s:15:\"permission_name\";s:19:\"customer tab delete\";}i:89;a:2:{s:13:\"permission_id\";s:2:\"88\";s:15:\"permission_name\";s:17:\"customer tab edit\";}i:90;a:2:{s:13:\"permission_id\";s:2:\"89\";s:15:\"permission_name\";s:17:\"customer tab list\";}i:91;a:2:{s:13:\"permission_id\";s:2:\"90\";s:15:\"permission_name\";s:18:\"chat configuration\";}i:92;a:2:{s:13:\"permission_id\";s:2:\"91\";s:15:\"permission_name\";s:26:\"view auto reply categories\";}i:93;a:2:{s:13:\"permission_id\";s:2:\"92\";s:15:\"permission_name\";s:15:\"auto reply list\";}i:94;a:2:{s:13:\"permission_id\";s:2:\"94\";s:15:\"permission_name\";s:13:\"outbound call\";}i:95;a:2:{s:13:\"permission_id\";s:2:\"96\";s:15:\"permission_name\";s:16:\"designation list\";}i:96;a:2:{s:13:\"permission_id\";s:2:\"97\";s:15:\"permission_name\";s:18:\"designation create\";}i:97;a:2:{s:13:\"permission_id\";s:2:\"98\";s:15:\"permission_name\";s:16:\"designation edit\";}}',\n 'created_by' => 1,\n 'updated_by' => 1,\n 'created_at' => '2017-08-04 15:33:37',\n 'updated_at' => '2019-01-18 12:07:41',\n 'deleted_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 2,\n 'cmpny_id' => 2,\n 'role' => 'Administrator',\n 'access_permission' => 'a:105:{i:0;a:2:{s:13:\"permission_id\";s:1:\"1\";s:15:\"permission_name\";s:21:\"permission management\";}i:1;a:2:{s:13:\"permission_id\";s:2:\"45\";s:15:\"permission_name\";s:10:\"emailfetch\";}i:2;a:2:{s:13:\"permission_id\";s:1:\"2\";s:15:\"permission_name\";s:15:\"role management\";}i:3;a:2:{s:13:\"permission_id\";s:1:\"3\";s:15:\"permission_name\";s:15:\"user management\";}i:4;a:2:{s:13:\"permission_id\";s:1:\"4\";s:15:\"permission_name\";s:11:\"plan create\";}i:5;a:2:{s:13:\"permission_id\";s:1:\"5\";s:15:\"permission_name\";s:9:\"plan edit\";}i:6;a:2:{s:13:\"permission_id\";s:1:\"6\";s:15:\"permission_name\";s:9:\"plan list\";}i:7;a:2:{s:13:\"permission_id\";s:1:\"7\";s:15:\"permission_name\";s:11:\"plan delete\";}i:8;a:2:{s:13:\"permission_id\";s:1:\"8\";s:15:\"permission_name\";s:17:\"query type create\";}i:9;a:2:{s:13:\"permission_id\";s:1:\"9\";s:15:\"permission_name\";s:15:\"query type edit\";}i:10;a:2:{s:13:\"permission_id\";s:2:\"10\";s:15:\"permission_name\";s:15:\"query type list\";}i:11;a:2:{s:13:\"permission_id\";s:2:\"11\";s:15:\"permission_name\";s:17:\"query type delete\";}i:12;a:2:{s:13:\"permission_id\";s:2:\"12\";s:15:\"permission_name\";s:19:\"query status create\";}i:13;a:2:{s:13:\"permission_id\";s:2:\"13\";s:15:\"permission_name\";s:17:\"query status edit\";}i:14;a:2:{s:13:\"permission_id\";s:2:\"14\";s:15:\"permission_name\";s:17:\"query status list\";}i:15;a:2:{s:13:\"permission_id\";s:2:\"15\";s:15:\"permission_name\";s:19:\"query status delete\";}i:16;a:2:{s:13:\"permission_id\";s:2:\"16\";s:15:\"permission_name\";s:22:\"customer nature create\";}i:17;a:2:{s:13:\"permission_id\";s:2:\"17\";s:15:\"permission_name\";s:20:\"customer nature edit\";}i:18;a:2:{s:13:\"permission_id\";s:2:\"18\";s:15:\"permission_name\";s:20:\"customer nature list\";}i:19;a:2:{s:13:\"permission_id\";s:2:\"19\";s:15:\"permission_name\";s:22:\"customer nature delete\";}i:20;a:2:{s:13:\"permission_id\";s:2:\"20\";s:15:\"permission_name\";s:24:\"customer priority create\";}i:21;a:2:{s:13:\"permission_id\";s:2:\"21\";s:15:\"permission_name\";s:22:\"customer priority edit\";}i:22;a:2:{s:13:\"permission_id\";s:2:\"22\";s:15:\"permission_name\";s:22:\"customer priority list\";}i:23;a:2:{s:13:\"permission_id\";s:2:\"23\";s:15:\"permission_name\";s:24:\"customer priority delete\";}i:24;a:2:{s:13:\"permission_id\";s:2:\"29\";s:15:\"permission_name\";s:13:\"settings view\";}i:25;a:2:{s:13:\"permission_id\";s:2:\"37\";s:15:\"permission_name\";s:14:\"changepassword\";}i:26;a:2:{s:13:\"permission_id\";s:3:\"104\";s:15:\"permission_name\";s:13:\"chat settings\";}i:27;a:2:{s:13:\"permission_id\";s:3:\"105\";s:15:\"permission_name\";s:19:\"escalation settings\";}i:28;a:2:{s:13:\"permission_id\";s:2:\"24\";s:15:\"permission_name\";s:10:\"faq create\";}i:29;a:2:{s:13:\"permission_id\";s:2:\"25\";s:15:\"permission_name\";s:8:\"faq edit\";}i:30;a:2:{s:13:\"permission_id\";s:2:\"26\";s:15:\"permission_name\";s:8:\"faq list\";}i:31;a:2:{s:13:\"permission_id\";s:2:\"27\";s:15:\"permission_name\";s:10:\"faq delete\";}i:32;a:2:{s:13:\"permission_id\";s:2:\"28\";s:15:\"permission_name\";s:19:\"view faq categories\";}i:33;a:2:{s:13:\"permission_id\";s:2:\"30\";s:15:\"permission_name\";s:15:\"template create\";}i:34;a:2:{s:13:\"permission_id\";s:2:\"31\";s:15:\"permission_name\";s:13:\"template edit\";}i:35;a:2:{s:13:\"permission_id\";s:2:\"32\";s:15:\"permission_name\";s:13:\"template list\";}i:36;a:2:{s:13:\"permission_id\";s:2:\"33\";s:15:\"permission_name\";s:15:\"template delete\";}i:37;a:2:{s:13:\"permission_id\";s:2:\"34\";s:15:\"permission_name\";s:14:\"profile create\";}i:38;a:2:{s:13:\"permission_id\";s:2:\"35\";s:15:\"permission_name\";s:12:\"profile view\";}i:39;a:2:{s:13:\"permission_id\";s:3:\"101\";s:15:\"permission_name\";s:21:\"profile customization\";}i:40;a:2:{s:13:\"permission_id\";s:2:\"36\";s:15:\"permission_name\";s:9:\"lead list\";}i:41;a:2:{s:13:\"permission_id\";s:2:\"51\";s:15:\"permission_name\";s:23:\"lead source type create\";}i:42;a:2:{s:13:\"permission_id\";s:2:\"52\";s:15:\"permission_name\";s:21:\"lead source type edit\";}i:43;a:2:{s:13:\"permission_id\";s:2:\"53\";s:15:\"permission_name\";s:21:\"lead source type list\";}i:44;a:2:{s:13:\"permission_id\";s:2:\"54\";s:15:\"permission_name\";s:23:\"lead source type delete\";}i:45;a:2:{s:13:\"permission_id\";s:2:\"55\";s:15:\"permission_name\";s:18:\"lead source create\";}i:46;a:2:{s:13:\"permission_id\";s:2:\"56\";s:15:\"permission_name\";s:16:\"lead source edit\";}i:47;a:2:{s:13:\"permission_id\";s:2:\"57\";s:15:\"permission_name\";s:16:\"lead source list\";}i:48;a:2:{s:13:\"permission_id\";s:2:\"58\";s:15:\"permission_name\";s:18:\"lead source delete\";}i:49;a:2:{s:13:\"permission_id\";s:2:\"40\";s:15:\"permission_name\";s:24:\"service request all list\";}i:50;a:2:{s:13:\"permission_id\";s:2:\"41\";s:15:\"permission_name\";s:24:\"escalation summary chart\";}i:51;a:2:{s:13:\"permission_id\";s:2:\"43\";s:15:\"permission_name\";s:12:\"escalated to\";}i:52;a:2:{s:13:\"permission_id\";s:3:\"100\";s:15:\"permission_name\";s:8:\"escalate\";}i:53;a:2:{s:13:\"permission_id\";s:2:\"44\";s:15:\"permission_name\";s:13:\"followup view\";}i:54;a:2:{s:13:\"permission_id\";s:2:\"47\";s:15:\"permission_name\";s:16:\"Followups Reopen\";}i:55;a:2:{s:13:\"permission_id\";s:2:\"48\";s:15:\"permission_name\";s:21:\"followup history edit\";}i:56;a:2:{s:13:\"permission_id\";s:2:\"99\";s:15:\"permission_name\";s:18:\"export in helpdesk\";}i:57;a:2:{s:13:\"permission_id\";s:2:\"46\";s:15:\"permission_name\";s:17:\"survey management\";}i:58;a:2:{s:13:\"permission_id\";s:2:\"49\";s:15:\"permission_name\";s:13:\"survey report\";}i:59;a:2:{s:13:\"permission_id\";s:2:\"39\";s:15:\"permission_name\";s:17:\"feedback settings\";}i:60;a:2:{s:13:\"permission_id\";s:2:\"50\";s:15:\"permission_name\";s:15:\"feedback report\";}i:61;a:2:{s:13:\"permission_id\";s:2:\"38\";s:15:\"permission_name\";s:19:\"question management\";}i:62;a:2:{s:13:\"permission_id\";s:2:\"42\";s:15:\"permission_name\";s:19:\"campaign management\";}i:63;a:2:{s:13:\"permission_id\";s:2:\"71\";s:15:\"permission_name\";s:15:\"campaign create\";}i:64;a:2:{s:13:\"permission_id\";s:2:\"72\";s:15:\"permission_name\";s:13:\"campaign edit\";}i:65;a:2:{s:13:\"permission_id\";s:2:\"73\";s:15:\"permission_name\";s:13:\"campaign list\";}i:66;a:2:{s:13:\"permission_id\";s:2:\"74\";s:15:\"permission_name\";s:15:\"campaign delete\";}i:67;a:2:{s:13:\"permission_id\";s:2:\"59\";s:15:\"permission_name\";s:23:\"sales automation create\";}i:68;a:2:{s:13:\"permission_id\";s:2:\"60\";s:15:\"permission_name\";s:21:\"sales automation edit\";}i:69;a:2:{s:13:\"permission_id\";s:2:\"61\";s:15:\"permission_name\";s:21:\"sales automation list\";}i:70;a:2:{s:13:\"permission_id\";s:2:\"62\";s:15:\"permission_name\";s:23:\"sales automation delete\";}i:71;a:2:{s:13:\"permission_id\";s:2:\"63\";s:15:\"permission_name\";s:26:\"intimation settings create\";}i:72;a:2:{s:13:\"permission_id\";s:2:\"64\";s:15:\"permission_name\";s:24:\"intimation settings edit\";}i:73;a:2:{s:13:\"permission_id\";s:3:\"102\";s:15:\"permission_name\";s:12:\"company meta\";}i:74;a:2:{s:13:\"permission_id\";s:3:\"103\";s:15:\"permission_name\";s:15:\"channel gateway\";}i:75;a:2:{s:13:\"permission_id\";s:2:\"65\";s:15:\"permission_name\";s:17:\"notification list\";}i:76;a:2:{s:13:\"permission_id\";s:2:\"66\";s:15:\"permission_name\";s:16:\"group management\";}i:77;a:2:{s:13:\"permission_id\";s:2:\"67\";s:15:\"permission_name\";s:12:\"group create\";}i:78;a:2:{s:13:\"permission_id\";s:2:\"68\";s:15:\"permission_name\";s:10:\"group edit\";}i:79;a:2:{s:13:\"permission_id\";s:2:\"69\";s:15:\"permission_name\";s:10:\"group list\";}i:80;a:2:{s:13:\"permission_id\";s:2:\"70\";s:15:\"permission_name\";s:12:\"group delete\";}i:81;a:2:{s:13:\"permission_id\";s:2:\"84\";s:15:\"permission_name\";s:17:\"group lead import\";}i:82;a:2:{s:13:\"permission_id\";s:2:\"85\";s:15:\"permission_name\";s:18:\"group excel import\";}i:83;a:2:{s:13:\"permission_id\";s:2:\"75\";s:15:\"permission_name\";s:29:\"campaign email delivery graph\";}i:84;a:2:{s:13:\"permission_id\";s:2:\"76\";s:15:\"permission_name\";s:32:\"campaign batch efficiency report\";}i:85;a:2:{s:13:\"permission_id\";s:2:\"77\";s:15:\"permission_name\";s:27:\"campaign email batch report\";}i:86;a:2:{s:13:\"permission_id\";s:2:\"78\";s:15:\"permission_name\";s:27:\"campaign sms delivery graph\";}i:87;a:2:{s:13:\"permission_id\";s:2:\"79\";s:15:\"permission_name\";s:25:\"campaign sms batch report\";}i:88;a:2:{s:13:\"permission_id\";s:2:\"80\";s:15:\"permission_name\";s:30:\"campaign autodial status graph\";}i:89;a:2:{s:13:\"permission_id\";s:2:\"81\";s:15:\"permission_name\";s:30:\"campaign autodial batch report\";}i:90;a:2:{s:13:\"permission_id\";s:2:\"82\";s:15:\"permission_name\";s:32:\"campaign manualcall status graph\";}i:91;a:2:{s:13:\"permission_id\";s:2:\"83\";s:15:\"permission_name\";s:32:\"campaign manualcall batch report\";}i:92;a:2:{s:13:\"permission_id\";s:2:\"86\";s:15:\"permission_name\";s:19:\"customer tab create\";}i:93;a:2:{s:13:\"permission_id\";s:2:\"87\";s:15:\"permission_name\";s:19:\"customer tab delete\";}i:94;a:2:{s:13:\"permission_id\";s:2:\"88\";s:15:\"permission_name\";s:17:\"customer tab edit\";}i:95;a:2:{s:13:\"permission_id\";s:2:\"89\";s:15:\"permission_name\";s:17:\"customer tab list\";}i:96;a:2:{s:13:\"permission_id\";s:2:\"90\";s:15:\"permission_name\";s:18:\"chat configuration\";}i:97;a:2:{s:13:\"permission_id\";s:3:\"106\";s:15:\"permission_name\";s:17:\"chat agent report\";}i:98;a:2:{s:13:\"permission_id\";s:2:\"91\";s:15:\"permission_name\";s:26:\"view auto reply categories\";}i:99;a:2:{s:13:\"permission_id\";s:2:\"92\";s:15:\"permission_name\";s:15:\"auto reply list\";}i:100;a:2:{s:13:\"permission_id\";s:2:\"93\";s:15:\"permission_name\";s:26:\"agent manual outbound call\";}i:101;a:2:{s:13:\"permission_id\";s:2:\"94\";s:15:\"permission_name\";s:13:\"outbound call\";}i:102;a:2:{s:13:\"permission_id\";s:2:\"96\";s:15:\"permission_name\";s:16:\"designation list\";}i:103;a:2:{s:13:\"permission_id\";s:2:\"97\";s:15:\"permission_name\";s:18:\"designation create\";}i:104;a:2:{s:13:\"permission_id\";s:2:\"98\";s:15:\"permission_name\";s:16:\"designation edit\";}}',\n 'created_by' => 2,\n 'updated_by' => 2,\n 'created_at' => '2017-08-04 15:33:37',\n 'updated_at' => '2019-02-02 10:20:49',\n 'deleted_at' => NULL,\n ),\n 2 => \n array (\n 'id' => 3,\n 'cmpny_id' => 2,\n 'role' => 'Nodal Officer',\n 'access_permission' => 'a:15:{i:0;a:2:{s:13:\"permission_id\";s:2:\"29\";s:15:\"permission_name\";s:13:\"settings view\";}i:1;a:2:{s:13:\"permission_id\";s:2:\"37\";s:15:\"permission_name\";s:14:\"changepassword\";}i:2;a:2:{s:13:\"permission_id\";s:2:\"35\";s:15:\"permission_name\";s:12:\"profile view\";}i:3;a:2:{s:13:\"permission_id\";s:2:\"36\";s:15:\"permission_name\";s:9:\"lead list\";}i:4;a:2:{s:13:\"permission_id\";s:2:\"40\";s:15:\"permission_name\";s:24:\"service request all list\";}i:5;a:2:{s:13:\"permission_id\";s:2:\"41\";s:15:\"permission_name\";s:24:\"escalation summary chart\";}i:6;a:2:{s:13:\"permission_id\";s:2:\"43\";s:15:\"permission_name\";s:12:\"escalated to\";}i:7;a:2:{s:13:\"permission_id\";s:3:\"100\";s:15:\"permission_name\";s:8:\"escalate\";}i:8;a:2:{s:13:\"permission_id\";s:2:\"44\";s:15:\"permission_name\";s:13:\"followup view\";}i:9;a:2:{s:13:\"permission_id\";s:2:\"47\";s:15:\"permission_name\";s:16:\"Followups Reopen\";}i:10;a:2:{s:13:\"permission_id\";s:2:\"48\";s:15:\"permission_name\";s:21:\"followup history edit\";}i:11;a:2:{s:13:\"permission_id\";s:2:\"99\";s:15:\"permission_name\";s:18:\"export in helpdesk\";}i:12;a:2:{s:13:\"permission_id\";s:2:\"63\";s:15:\"permission_name\";s:26:\"intimation settings create\";}i:13;a:2:{s:13:\"permission_id\";s:2:\"64\";s:15:\"permission_name\";s:24:\"intimation settings edit\";}i:14;a:2:{s:13:\"permission_id\";s:2:\"65\";s:15:\"permission_name\";s:17:\"notification list\";}}',\n 'created_by' => 2,\n 'updated_by' => 2,\n 'created_at' => '2017-08-26 16:34:00',\n 'updated_at' => '2019-01-21 11:45:19',\n 'deleted_at' => NULL,\n ),\n 3 => \n array (\n 'id' => 4,\n 'cmpny_id' => 2,\n 'role' => 'Chat-Agent',\n 'access_permission' => 'a:44:{i:0;a:2:{s:13:\"permission_id\";s:1:\"1\";s:15:\"permission_name\";s:21:\"permission management\";}i:1;a:2:{s:13:\"permission_id\";s:1:\"2\";s:15:\"permission_name\";s:15:\"role management\";}i:2;a:2:{s:13:\"permission_id\";s:1:\"3\";s:15:\"permission_name\";s:15:\"user management\";}i:3;a:2:{s:13:\"permission_id\";s:1:\"4\";s:15:\"permission_name\";s:11:\"plan create\";}i:4;a:2:{s:13:\"permission_id\";s:1:\"5\";s:15:\"permission_name\";s:9:\"plan edit\";}i:5;a:2:{s:13:\"permission_id\";s:1:\"6\";s:15:\"permission_name\";s:9:\"plan list\";}i:6;a:2:{s:13:\"permission_id\";s:1:\"7\";s:15:\"permission_name\";s:11:\"plan delete\";}i:7;a:2:{s:13:\"permission_id\";s:1:\"8\";s:15:\"permission_name\";s:17:\"query type create\";}i:8;a:2:{s:13:\"permission_id\";s:1:\"9\";s:15:\"permission_name\";s:15:\"query type edit\";}i:9;a:2:{s:13:\"permission_id\";s:2:\"10\";s:15:\"permission_name\";s:15:\"query type list\";}i:10;a:2:{s:13:\"permission_id\";s:2:\"11\";s:15:\"permission_name\";s:17:\"query type delete\";}i:11;a:2:{s:13:\"permission_id\";s:2:\"12\";s:15:\"permission_name\";s:19:\"query status create\";}i:12;a:2:{s:13:\"permission_id\";s:2:\"13\";s:15:\"permission_name\";s:17:\"query status edit\";}i:13;a:2:{s:13:\"permission_id\";s:2:\"14\";s:15:\"permission_name\";s:17:\"query status list\";}i:14;a:2:{s:13:\"permission_id\";s:2:\"15\";s:15:\"permission_name\";s:19:\"query status delete\";}i:15;a:2:{s:13:\"permission_id\";s:2:\"16\";s:15:\"permission_name\";s:22:\"customer nature create\";}i:16;a:2:{s:13:\"permission_id\";s:2:\"17\";s:15:\"permission_name\";s:20:\"customer nature edit\";}i:17;a:2:{s:13:\"permission_id\";s:2:\"18\";s:15:\"permission_name\";s:20:\"customer nature list\";}i:18;a:2:{s:13:\"permission_id\";s:2:\"19\";s:15:\"permission_name\";s:22:\"customer nature delete\";}i:19;a:2:{s:13:\"permission_id\";s:2:\"20\";s:15:\"permission_name\";s:24:\"customer priority create\";}i:20;a:2:{s:13:\"permission_id\";s:2:\"21\";s:15:\"permission_name\";s:22:\"customer priority edit\";}i:21;a:2:{s:13:\"permission_id\";s:2:\"22\";s:15:\"permission_name\";s:22:\"customer priority list\";}i:22;a:2:{s:13:\"permission_id\";s:2:\"23\";s:15:\"permission_name\";s:24:\"customer priority delete\";}i:23;a:2:{s:13:\"permission_id\";s:2:\"29\";s:15:\"permission_name\";s:13:\"settings view\";}i:24;a:2:{s:13:\"permission_id\";s:2:\"37\";s:15:\"permission_name\";s:14:\"changepassword\";}i:25;a:2:{s:13:\"permission_id\";s:2:\"24\";s:15:\"permission_name\";s:10:\"faq create\";}i:26;a:2:{s:13:\"permission_id\";s:2:\"25\";s:15:\"permission_name\";s:8:\"faq edit\";}i:27;a:2:{s:13:\"permission_id\";s:2:\"26\";s:15:\"permission_name\";s:8:\"faq list\";}i:28;a:2:{s:13:\"permission_id\";s:2:\"27\";s:15:\"permission_name\";s:10:\"faq delete\";}i:29;a:2:{s:13:\"permission_id\";s:2:\"28\";s:15:\"permission_name\";s:19:\"view faq categories\";}i:30;a:2:{s:13:\"permission_id\";s:2:\"30\";s:15:\"permission_name\";s:15:\"template create\";}i:31;a:2:{s:13:\"permission_id\";s:2:\"31\";s:15:\"permission_name\";s:13:\"template edit\";}i:32;a:2:{s:13:\"permission_id\";s:2:\"32\";s:15:\"permission_name\";s:13:\"template list\";}i:33;a:2:{s:13:\"permission_id\";s:2:\"33\";s:15:\"permission_name\";s:15:\"template delete\";}i:34;a:2:{s:13:\"permission_id\";s:2:\"34\";s:15:\"permission_name\";s:14:\"profile create\";}i:35;a:2:{s:13:\"permission_id\";s:2:\"35\";s:15:\"permission_name\";s:12:\"profile view\";}i:36;a:2:{s:13:\"permission_id\";s:2:\"36\";s:15:\"permission_name\";s:9:\"lead list\";}i:37;a:2:{s:13:\"permission_id\";s:2:\"40\";s:15:\"permission_name\";s:24:\"service request all list\";}i:38;a:2:{s:13:\"permission_id\";s:2:\"41\";s:15:\"permission_name\";s:24:\"escalation summary chart\";}i:39;a:2:{s:13:\"permission_id\";s:2:\"39\";s:15:\"permission_name\";s:17:\"feedback settings\";}i:40;a:2:{s:13:\"permission_id\";s:2:\"38\";s:15:\"permission_name\";s:19:\"question management\";}i:41;a:2:{s:13:\"permission_id\";s:2:\"91\";s:15:\"permission_name\";s:26:\"view auto reply categories\";}i:42;a:2:{s:13:\"permission_id\";s:2:\"92\";s:15:\"permission_name\";s:15:\"auto reply list\";}i:43;a:2:{s:13:\"permission_id\";s:2:\"94\";s:15:\"permission_name\";s:13:\"outbound call\";}}',\n 'created_by' => 2,\n 'updated_by' => 2,\n 'created_at' => '2018-06-29 18:27:05',\n 'updated_at' => '2019-01-23 08:30:49',\n 'deleted_at' => NULL,\n ),\n 4 => \n array (\n 'id' => 5,\n 'cmpny_id' => 2,\n 'role' => 'Manager',\n 'access_permission' => 'a:42:{i:0;a:2:{s:13:\"permission_id\";s:1:\"1\";s:15:\"permission_name\";s:21:\"permission management\";}i:1;a:2:{s:13:\"permission_id\";s:1:\"2\";s:15:\"permission_name\";s:15:\"role management\";}i:2;a:2:{s:13:\"permission_id\";s:1:\"3\";s:15:\"permission_name\";s:15:\"user management\";}i:3;a:2:{s:13:\"permission_id\";s:1:\"4\";s:15:\"permission_name\";s:11:\"plan create\";}i:4;a:2:{s:13:\"permission_id\";s:1:\"5\";s:15:\"permission_name\";s:9:\"plan edit\";}i:5;a:2:{s:13:\"permission_id\";s:1:\"6\";s:15:\"permission_name\";s:9:\"plan list\";}i:6;a:2:{s:13:\"permission_id\";s:1:\"7\";s:15:\"permission_name\";s:11:\"plan delete\";}i:7;a:2:{s:13:\"permission_id\";s:1:\"8\";s:15:\"permission_name\";s:17:\"query type create\";}i:8;a:2:{s:13:\"permission_id\";s:1:\"9\";s:15:\"permission_name\";s:15:\"query type edit\";}i:9;a:2:{s:13:\"permission_id\";s:2:\"10\";s:15:\"permission_name\";s:15:\"query type list\";}i:10;a:2:{s:13:\"permission_id\";s:2:\"11\";s:15:\"permission_name\";s:17:\"query type delete\";}i:11;a:2:{s:13:\"permission_id\";s:2:\"12\";s:15:\"permission_name\";s:19:\"query status create\";}i:12;a:2:{s:13:\"permission_id\";s:2:\"13\";s:15:\"permission_name\";s:17:\"query status edit\";}i:13;a:2:{s:13:\"permission_id\";s:2:\"14\";s:15:\"permission_name\";s:17:\"query status list\";}i:14;a:2:{s:13:\"permission_id\";s:2:\"15\";s:15:\"permission_name\";s:19:\"query status delete\";}i:15;a:2:{s:13:\"permission_id\";s:2:\"16\";s:15:\"permission_name\";s:22:\"customer nature create\";}i:16;a:2:{s:13:\"permission_id\";s:2:\"17\";s:15:\"permission_name\";s:20:\"customer nature edit\";}i:17;a:2:{s:13:\"permission_id\";s:2:\"18\";s:15:\"permission_name\";s:20:\"customer nature list\";}i:18;a:2:{s:13:\"permission_id\";s:2:\"19\";s:15:\"permission_name\";s:22:\"customer nature delete\";}i:19;a:2:{s:13:\"permission_id\";s:2:\"20\";s:15:\"permission_name\";s:24:\"customer priority create\";}i:20;a:2:{s:13:\"permission_id\";s:2:\"21\";s:15:\"permission_name\";s:22:\"customer priority edit\";}i:21;a:2:{s:13:\"permission_id\";s:2:\"22\";s:15:\"permission_name\";s:22:\"customer priority list\";}i:22;a:2:{s:13:\"permission_id\";s:2:\"23\";s:15:\"permission_name\";s:24:\"customer priority delete\";}i:23;a:2:{s:13:\"permission_id\";s:2:\"29\";s:15:\"permission_name\";s:13:\"settings view\";}i:24;a:2:{s:13:\"permission_id\";s:2:\"37\";s:15:\"permission_name\";s:14:\"changepassword\";}i:25;a:2:{s:13:\"permission_id\";s:2:\"24\";s:15:\"permission_name\";s:10:\"faq create\";}i:26;a:2:{s:13:\"permission_id\";s:2:\"25\";s:15:\"permission_name\";s:8:\"faq edit\";}i:27;a:2:{s:13:\"permission_id\";s:2:\"26\";s:15:\"permission_name\";s:8:\"faq list\";}i:28;a:2:{s:13:\"permission_id\";s:2:\"27\";s:15:\"permission_name\";s:10:\"faq delete\";}i:29;a:2:{s:13:\"permission_id\";s:2:\"28\";s:15:\"permission_name\";s:19:\"view faq categories\";}i:30;a:2:{s:13:\"permission_id\";s:2:\"30\";s:15:\"permission_name\";s:15:\"template create\";}i:31;a:2:{s:13:\"permission_id\";s:2:\"31\";s:15:\"permission_name\";s:13:\"template edit\";}i:32;a:2:{s:13:\"permission_id\";s:2:\"32\";s:15:\"permission_name\";s:13:\"template list\";}i:33;a:2:{s:13:\"permission_id\";s:2:\"33\";s:15:\"permission_name\";s:15:\"template delete\";}i:34;a:2:{s:13:\"permission_id\";s:2:\"34\";s:15:\"permission_name\";s:14:\"profile create\";}i:35;a:2:{s:13:\"permission_id\";s:2:\"35\";s:15:\"permission_name\";s:12:\"profile view\";}i:36;a:2:{s:13:\"permission_id\";s:2:\"36\";s:15:\"permission_name\";s:9:\"lead list\";}i:37;a:2:{s:13:\"permission_id\";s:2:\"40\";s:15:\"permission_name\";s:24:\"service request all list\";}i:38;a:2:{s:13:\"permission_id\";s:2:\"41\";s:15:\"permission_name\";s:24:\"escalation summary chart\";}i:39;a:2:{s:13:\"permission_id\";s:2:\"39\";s:15:\"permission_name\";s:17:\"feedback settings\";}i:40;a:2:{s:13:\"permission_id\";s:2:\"38\";s:15:\"permission_name\";s:19:\"question management\";}i:41;a:2:{s:13:\"permission_id\";s:2:\"94\";s:15:\"permission_name\";s:13:\"outbound call\";}}',\n 'created_by' => 2,\n 'updated_by' => 2,\n 'created_at' => '2017-08-08 14:53:59',\n 'updated_at' => '2019-01-23 08:30:56',\n 'deleted_at' => NULL,\n ),\n 5 => \n array (\n 'id' => 257,\n 'cmpny_id' => 1,\n 'role' => 'System Admin',\n 'access_permission' => 'a:40:{i:0;a:2:{s:13:\"permission_id\";s:1:\"1\";s:15:\"permission_name\";s:21:\"permission management\";}i:1;a:2:{s:13:\"permission_id\";s:2:\"45\";s:15:\"permission_name\";s:10:\"emailfetch\";}i:2;a:2:{s:13:\"permission_id\";s:1:\"2\";s:15:\"permission_name\";s:15:\"role management\";}i:3;a:2:{s:13:\"permission_id\";s:1:\"3\";s:15:\"permission_name\";s:15:\"user management\";}i:4;a:2:{s:13:\"permission_id\";s:1:\"4\";s:15:\"permission_name\";s:11:\"plan create\";}i:5;a:2:{s:13:\"permission_id\";s:1:\"5\";s:15:\"permission_name\";s:9:\"plan edit\";}i:6;a:2:{s:13:\"permission_id\";s:1:\"6\";s:15:\"permission_name\";s:9:\"plan list\";}i:7;a:2:{s:13:\"permission_id\";s:1:\"7\";s:15:\"permission_name\";s:11:\"plan delete\";}i:8;a:2:{s:13:\"permission_id\";s:1:\"8\";s:15:\"permission_name\";s:17:\"query type create\";}i:9;a:2:{s:13:\"permission_id\";s:1:\"9\";s:15:\"permission_name\";s:15:\"query type edit\";}i:10;a:2:{s:13:\"permission_id\";s:2:\"10\";s:15:\"permission_name\";s:15:\"query type list\";}i:11;a:2:{s:13:\"permission_id\";s:2:\"11\";s:15:\"permission_name\";s:17:\"query type delete\";}i:12;a:2:{s:13:\"permission_id\";s:2:\"12\";s:15:\"permission_name\";s:19:\"query status create\";}i:13;a:2:{s:13:\"permission_id\";s:2:\"13\";s:15:\"permission_name\";s:17:\"query status edit\";}i:14;a:2:{s:13:\"permission_id\";s:2:\"14\";s:15:\"permission_name\";s:17:\"query status list\";}i:15;a:2:{s:13:\"permission_id\";s:2:\"15\";s:15:\"permission_name\";s:19:\"query status delete\";}i:16;a:2:{s:13:\"permission_id\";s:2:\"16\";s:15:\"permission_name\";s:22:\"customer nature create\";}i:17;a:2:{s:13:\"permission_id\";s:2:\"17\";s:15:\"permission_name\";s:20:\"customer nature edit\";}i:18;a:2:{s:13:\"permission_id\";s:2:\"18\";s:15:\"permission_name\";s:20:\"customer nature list\";}i:19;a:2:{s:13:\"permission_id\";s:2:\"19\";s:15:\"permission_name\";s:22:\"customer nature delete\";}i:20;a:2:{s:13:\"permission_id\";s:2:\"33\";s:15:\"permission_name\";s:15:\"template delete\";}i:21;a:2:{s:13:\"permission_id\";s:2:\"34\";s:15:\"permission_name\";s:14:\"profile create\";}i:22;a:2:{s:13:\"permission_id\";s:2:\"35\";s:15:\"permission_name\";s:12:\"profile view\";}i:23;a:2:{s:13:\"permission_id\";s:2:\"36\";s:15:\"permission_name\";s:9:\"lead list\";}i:24;a:2:{s:13:\"permission_id\";s:2:\"40\";s:15:\"permission_name\";s:24:\"service request all list\";}i:25;a:2:{s:13:\"permission_id\";s:2:\"41\";s:15:\"permission_name\";s:24:\"escalation summary chart\";}i:26;a:2:{s:13:\"permission_id\";s:2:\"43\";s:15:\"permission_name\";s:12:\"escalated to\";}i:27;a:2:{s:13:\"permission_id\";s:2:\"44\";s:15:\"permission_name\";s:13:\"followup view\";}i:28;a:2:{s:13:\"permission_id\";s:2:\"47\";s:15:\"permission_name\";s:16:\"Followups Reopen\";}i:29;a:2:{s:13:\"permission_id\";s:2:\"48\";s:15:\"permission_name\";s:21:\"followup history edit\";}i:30;a:2:{s:13:\"permission_id\";s:2:\"46\";s:15:\"permission_name\";s:17:\"survey management\";}i:31;a:2:{s:13:\"permission_id\";s:2:\"49\";s:15:\"permission_name\";s:13:\"survey report\";}i:32;a:2:{s:13:\"permission_id\";s:2:\"39\";s:15:\"permission_name\";s:17:\"feedback settings\";}i:33;a:2:{s:13:\"permission_id\";s:2:\"71\";s:15:\"permission_name\";s:15:\"campaign create\";}i:34;a:2:{s:13:\"permission_id\";s:2:\"72\";s:15:\"permission_name\";s:13:\"campaign edit\";}i:35;a:2:{s:13:\"permission_id\";s:2:\"73\";s:15:\"permission_name\";s:13:\"campaign list\";}i:36;a:2:{s:13:\"permission_id\";s:2:\"74\";s:15:\"permission_name\";s:15:\"campaign delete\";}i:37;a:2:{s:13:\"permission_id\";s:2:\"59\";s:15:\"permission_name\";s:23:\"sales automation create\";}i:38;a:2:{s:13:\"permission_id\";s:2:\"60\";s:15:\"permission_name\";s:21:\"sales automation edit\";}i:39;a:2:{s:13:\"permission_id\";s:2:\"92\";s:15:\"permission_name\";s:15:\"auto reply list\";}}',\n 'created_by' => 1,\n 'updated_by' => 1,\n 'created_at' => '2019-01-10 14:42:53',\n 'updated_at' => '2019-01-10 14:53:07',\n 'deleted_at' => '2019-01-10 14:53:07',\n ),\n 6 => \n array (\n 'id' => 258,\n 'cmpny_id' => 1,\n 'role' => 'System Admin',\n 'access_permission' => 'a:8:{i:0;a:2:{s:13:\"permission_id\";s:1:\"1\";s:15:\"permission_name\";s:21:\"permission management\";}i:1;a:2:{s:13:\"permission_id\";s:2:\"45\";s:15:\"permission_name\";s:10:\"emailfetch\";}i:2;a:2:{s:13:\"permission_id\";s:1:\"2\";s:15:\"permission_name\";s:15:\"role management\";}i:3;a:2:{s:13:\"permission_id\";s:1:\"3\";s:15:\"permission_name\";s:15:\"user management\";}i:4;a:2:{s:13:\"permission_id\";s:1:\"4\";s:15:\"permission_name\";s:11:\"plan create\";}i:5;a:2:{s:13:\"permission_id\";s:1:\"5\";s:15:\"permission_name\";s:9:\"plan edit\";}i:6;a:2:{s:13:\"permission_id\";s:2:\"37\";s:15:\"permission_name\";s:14:\"changepassword\";}i:7;a:2:{s:13:\"permission_id\";s:2:\"30\";s:15:\"permission_name\";s:15:\"template create\";}}',\n 'created_by' => 1,\n 'updated_by' => 1,\n 'created_at' => '2019-01-10 16:14:52',\n 'updated_at' => '2019-01-16 10:36:42',\n 'deleted_at' => NULL,\n ),\n ));\n \n \n }", "public function permissions(): BelongsToMany\n {\n return $this->belongsToMany(\n HCAclPermission::class,\n 'hc_acl_role_permission_connection',\n 'role_id',\n 'permission_id'\n );\n }", "private function _get_permissions_section_settings() {\r\n\r\n // Get all user roles\r\n global $wp_roles;\r\n\r\n if(!isset($wp_roles))\r\n $wp_roles = new WP_Roles();\r\n\r\n $allUserRoles = $wp_roles->get_names();\r\n\r\n return array(\r\n\r\n array(\r\n 'title' => __( 'Permissions Options' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'title',\r\n 'desc' => '',\r\n 'id' => 'wwof_permissions_main_title'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'User Role Filter' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'multiselect',\r\n 'desc' => __( 'Only allow a given user role/s to access the wholesale page. Left blank to disable filter.' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_user_role_filter',\r\n 'class' => 'chosen_select',\r\n 'css' => 'min-width:300px;',\r\n 'custom_attributes' => array(\r\n 'multiple' => 'multiple',\r\n 'data-placeholder' => __( 'Select Some User Roles...' , 'woocommerce-wholesale-order-form' )\r\n ),\r\n 'options' => $allUserRoles\r\n ),\r\n\r\n array(\r\n 'type' => 'sectionend',\r\n 'id' => 'wwof_permissions_role_filter_sectionend'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Access Denied Message' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'title',\r\n 'desc' => __( 'Message to display to users who do not have permission to access the wholesale order form.' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_permissions_noaccess_section_title'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Title' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'text',\r\n 'desc' => __( 'Defaults to <b>\"Access Denied\"</b> if left blank' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_noaccess_title',\r\n 'css' => 'min-width: 400px;'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Message' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'wwof_editor',\r\n 'desc' => __( 'Defaults to <b>\"You do not have permission to view wholesale product listing\"</b> if left blank' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_noaccess_message',\r\n 'css' => 'min-width: 400px; min-height: 100px;'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Login URL' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'text',\r\n 'desc' => __( 'URL of the login page. Uses default WordPress login URL if left blank' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_noaccess_login_url',\r\n 'css' => 'min-width: 400px;'\r\n ),\r\n\r\n array(\r\n 'type' => 'sectionend',\r\n 'id' => 'wwof_permissions_sectionend'\r\n )\r\n\r\n );\r\n\r\n }", "public function roles()\r\n {\r\n return $this->belongsToMany(config('bootstrap-menu.models.role'), config('bootstrap-menu.relations.permission_role'))->withTimestamps();\r\n }", "public function getFeaturesAndPermissionsWithRole($roleName = null){\n $features = $this->getFeaturesAndPermissions();\n if(is_null($roleName)){\n return $features;\n }\n\n $permissionsByRole = $this->getPermissionsByRole($roleName);\n //$permissionsByRole = $this->getDirectPermissionsByRole($roleName);\n $permissionsByRoleKeys = array_keys($permissionsByRole);\n\n foreach ($features as $f => $feature){\n foreach($feature->permissions as $p => $permission){\n if(in_array($p, $permissionsByRoleKeys)){\n $feature->checked = true;\n $permission->checked = true;\n }\n }\n }\n return $features;\n }", "public function getUserPermissionsWithId(string $username): array\n {\n\n $actions = [];\n $subjects = [];\n $userPermissions = [];\n\n // insert only action name in array\n foreach ($this->getEntityManager()->getRepository(Action::class)->findAll() as $k => $action)\n {\n $actions[] = $action->getName();\n }\n\n // insert only subject name in array\n foreach ($this->getEntityManager()->getRepository(Subject::class)->findAll() as $k => $subject)\n {\n $subjects[$subject->getId()] = $subject->getName();\n }\n\n // insert subject name in array as key\n foreach ($subjects as $key => $subject)\n {\n if(!array_key_exists($key . \"_\" . $subject, $userPermissions))\n $userPermissions[$key . \"_\" . $subject] = [];\n }\n\n // insert action name in array as key\n\n\n\n $user = $this->findOneBy([\"username\" => $username]);\n if(!$user)\n throw new \\Exception(\"User '\" . $username .\"' not found !\");\n\n // permission of user\n foreach ($user->getPermission()->getValues() as $permission)\n {\n\n foreach ($actions as $k => $action)\n {\n if(!in_array($action, $userPermissions[$permission->getSubject()->getId() . \"_\" . $permission->getSubject()->getName()]))\n {\n if($permission->getAction()->getName() === $action)\n $userPermissions[$permission->getSubject()->getId() . \"_\" . $permission->getSubject()->getName()][] = $action;\n }\n\n }\n }\n\n\n // permission of user role\n foreach ($user->getRole()->getPermission()->getValues() as $permission)\n {\n\n foreach ($actions as $k => $action)\n {\n if(!in_array($action, $userPermissions[$permission->getSubject()->getId() . \"_\" . $permission->getSubject()->getName()]))\n {\n if($permission->getAction()->getName() === $action)\n $userPermissions[$permission->getSubject()->getId() . \"_\" . $permission->getSubject()->getName()][] = $action;\n }\n }\n }\n\n return $userPermissions;\n }", "public function perms()\n {\n return $this->belongsToMany(Config::get('guardian.permission'), Config::get('guardian.permission_role_table'), Config::get('guardian.role_foreign_key'), Config::get('guardian.permission_foreign_key'));\n }", "function updateProjectPermissionNames() {\n $project_roles_table = TABLE_PREFIX . 'project_roles';\n $project_users_table = TABLE_PREFIX . 'project_users';\n\n try {\n DB::beginWork('Updating project role keys @ ' . __CLASS__);\n\n $rename = array(\n 'ticket' => 'task',\n 'checklist' => 'todo_list',\n 'page' => 'notebook',\n 'timerecord' => 'tracking',\n );\n\n $rows = DB::execute(\"SELECT id, permissions FROM $project_roles_table\");\n if(is_foreachable($rows)) {\n foreach($rows as $row) {\n $permissions = $row['permissions'] ? unserialize($row['permissions']) : array();\n\n foreach($rename as $k => $v) {\n if(isset($permissions[$k])) {\n $permissions[$v] = $permissions[$k];\n unset($permissions[$k]);\n } // if\n } // foreach\n\n DB::execute(\"UPDATE $project_roles_table SET permissions = ? WHERE id = ?\", serialize($permissions), $row['id']);\n } // foreach\n } // if\n\n $rows = DB::execute(\"SELECT user_id, project_id, permissions FROM $project_users_table\");\n if(is_foreachable($rows)) {\n foreach($rows as $row) {\n $permissions = $row['permissions'] ? unserialize($row['permissions']) : null;\n\n if(is_array($permissions)) {\n foreach($rename as $k => $v) {\n if(isset($permissions[$k])) {\n $permissions[$v] = $permissions[$k];\n unset($permissions[$k]);\n } // if\n } // foreach\n } // if\n\n DB::execute(\"UPDATE $project_users_table SET permissions = ? WHERE user_id = ? AND project_id = ?\", serialize($permissions), $row['user_id'], $row['project_id']);\n } // foreach\n } // if\n\n DB::commit('Project role keys updated @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to update project role keys @ ' . __CLASS__);\n\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function perms()\n {\n return $this->belongsToMany(Config::get('entrust-branch.permission'), Config::get('entrust-branch.permission_role_table'));\n }", "public function listPermissionByRole()\n {\n $roles = $this->roleRepository->all();\n $permissions = $this->permissionRepository->all();\n return view('admin.permission.permission_role', compact('roles', 'permissions'));\n }", "function _get_permissions_as_array($group_id, $item_id, $permissions) {\n $permissions_array = array();\n \n $perms = array('PLUGIN_DOCMAN_READ', 'PLUGIN_DOCMAN_WRITE', 'PLUGIN_DOCMAN_MANAGE');\n\n // Get the ugroups of the parent\n $ugroups = permission_get_ugroups_permissions($group_id, $item_id, $perms, false);\n \n // Initialize the ugroup permissions to the same values as the parent folder\n foreach ($ugroups as $ugroup) {\n $ugroup_id = $ugroup['ugroup']['id'];\n $permissions_array[$ugroup_id] = 100;\n foreach ($perms as $perm) {\n if (isset($ugroup['permissions'][$perm])) {\n $permissions_array[$ugroup_id] = Docman_PermissionsManager::getDefinitionIndexForPermission($perm);\n }\n }\n }\n \n // Set the SOAP-provided permissions\n foreach ($permissions as $index => $permission) {\n $ugroup_id = $permission->ugroup_id;\n if (isset($permissions_array[$ugroup_id])) {\n $permissions_array[$ugroup_id] = Docman_PermissionsManager::getDefinitionIndexForPermission($permission->type);\n }\n }\n \n return $permissions_array;\n}", "function _get_role_data($role_id)\n\t{\n\t\t// Load models\n\t\t$this->ci->load->model('dx_auth/roles', 'roles');\n\t\t$this->ci->load->model('dx_auth/permissions', 'permissions');\n\t\n\t\t// Clear return value\n\t\t$role_name = '';\n\t\t$parent_roles_id = array();\n\t\t$parent_roles_name = array();\n\t\t$permission = array();\n\t\t$parent_permissions = array();\n\t\t\n\t\t/* Get role_name, parent_roles_id and parent_roles_name */\n\t\t\n\t\t// Get role query from role id\n\t\t$query = $this->ci->roles->get_role_by_id($role_id);\n\t\t\n\t\t// Check if role exist\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\t// Get row\n\t\t\t$role = $query->row();\t\t\n\t\n\t\t\t// Get role name\n\t\t\t$role_name = $role->name;\n\t\t\t\n\t\t\t/* \n\t\t\t\tCode below will search if user role_id have parent_id > 0 (which mean role_id have parent role_id)\n\t\t\t\tand do it recursively until parent_id reach 0 (no parent) or parent_id not found.\n\t\t\t\t\n\t\t\t\tIf anyone have better approach than this code, please let me know.\n\t\t\t*/\n\t\t\t\n\t\t\t// Check if role has parent id\n\t\t\tif ($role->parent_id > 0)\n\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t// Add to result array\n\t\t\t\t$parent_roles_id[] = $role->parent_id;\n\t\t\t\t\n\t\t\t\t// Set variable used in looping\n\t\t\t\t$finished = FALSE;\n\t\t\t\t$parent_id = $role->parent_id;\t\t\t\t\n\n\t\t\t\t// Get all parent id\n\t\t\t\twhile ($finished == FALSE)\n\t\t\t\t{\n\t\t\t\t\t$i_query = $this->ci->roles->get_role_by_id($parent_id);\n\t\t\t\t\t\n\t\t\t\t\t// If role exist\n\t\t\t\t\tif ($i_query->num_rows() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Get row\n\t\t\t\t\t\t$i_role = $i_query->row();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check if role doesn't have parent\n\t\t\t\t\t\tif ($i_role->parent_id == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get latest parent name\n\t\t\t\t\t\t\t$parent_roles_name[] = $i_role->name;\n\t\t\t\t\t\t\t// Stop looping\n\t\t\t\t\t\t\t$finished = TRUE;\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// Change parent id for next looping\n\t\t\t\t\t\t\t$parent_id = $i_role->parent_id;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Add to result array\n\t\t\t\t\t\t\t$parent_roles_id[] = $parent_id;\n\t\t\t\t\t\t\t$parent_roles_name[] = $i_role->name;\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\n\t\t\t\t\t\t// Remove latest parent_roles_id since parent_id not found\n\t\t\t\t\t\tarray_pop($parent_roles_id);\n\t\t\t\t\t\t// Stop looping\n\t\t\t\t\t\t$finished = TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* End of Get role_name, parent_roles_id and parent_roles_name */\n\t\t\n\t\t/* Get user and parents permission */\n\t\t\n\t\t// Get user role permission\n\t\t$permission = $this->ci->permissions->get_permission_data($role_id);\n\t\t\n\t\t// Get user role parent permissions\n\t\tif ( ! empty($parent_roles_id))\n\t\t{\n\t\t\t$parent_permissions = $this->ci->permissions->get_permissions_data($parent_roles_id);\n\t\t}\n\t\t\n\t\t/* End of Get user and parents permission */\n\t\t\n\t\t// Set return value\n\t\t$data['role_name'] = $role_name;\n\t\t$data['parent_roles_id'] = $parent_roles_id;\n\t\t$data['parent_roles_name'] = $parent_roles_name;\n\t\t$data['permission'] = $permission;\n\t\t$data['parent_permissions'] = $parent_permissions;\n\t\t\n\t\treturn $data;\n\t}", "protected function getPermissions()\n {\n return Permission::with('roles')->get();\n }", "public function getAdminPermissions(): array;", "public function update(Request $request, $id)\n {\n $validator=\\Validator::make($request->all(),[\n 'add_array' => 'bail|array',\n 'delete_array' => 'bail|array',\n ]);\n if($validator->fails())\n {\n return response()->json(['response' => ['error' => $validator->errors()->all()]],400);\n }\n\n # Here we get the instance of an role\n $role = Role::find($id);\n\n # Here we check if the role does not exist\n if(!$role){\n return response()->json(['response' => ['error' => ['Rol no encontrado']]], 400);\n }\n\n DB::beginTransaction();\n try{\n if(count(request('delete_array')) > 0){\n foreach (request('delete_array') as $delete_array) {\n # We need to remove the permissions id for each record in the list.\n $validate_role_permission = RolePermission::where('role_id', $role->id)->where('permission_id', $delete_array)->first();\n\n if($validate_role_permission){\n $validate_role_permission->delete();\n }\n }\n }\n\n if(count(request('add_array')) > 0){\n foreach (request('add_array') as $add_array) {\n # We need to add the permissions id for each record in the list.\n $validate_role_permission = RolePermission::where('role_id', $role->id)->where('permission_id', $add_array)->first();\n\n if(!$validate_role_permission){\n $role_has_permission = RolePermission::create([\n 'role_id' => $role->id,\n 'permission_id' => $add_array,\n ]);\n }\n }\n }\n }catch(Exception $e){\n DB::rollback();\n return response()->json( ['response' => ['error' => ['Error al agregar permisos al rol'], 'data' => [$e->getMessage(), $e->getFile(), $e->getLine()]]], 400);\n }\n # Here we return success.\n DB::commit();\n return response()->json(['response' => 'Permisos asignados con exito.'], 200);\n }", "public function getRolePermissions()\n {\n return self::select(\"r.*, p.*\")\n ->leftJoin('role_permissions rp', 'r.roleID = rp.roleID')\n ->leftJoin('permissions p', 'p.permissionID = rp.permissionID')\n ->get();\n }", "public function update($request)\n {\n try {\n $data=RolePermission::where('role_id','=',$request->roles_id)->pluck('permission_id');\n $array = json_decode(json_encode($data), true); \n $new_permission=array_diff($request->permission, $array); \n $remove_permission=array_diff($array,$request->permission);\n $removed_permission = RolePermission::where('role_id','=',$request->roles_id)->whereIn('permission_id',$remove_permission)->delete(); \n $new_data=array(); \n foreach ($new_permission as $key => $value) {\n $new_record=array();\n $new_record['permission_id']=$value;\n $new_record['role_id']=$request->roles_id;\n array_push($new_data,$new_record);\n }\n \n $inserted_permission = RolePermission::insert($new_data);\n \n if ($removed_permission || $inserted_permission) { //Check if data was updated\n return true;\n } else {\n return false;\n }\n } catch(\\Exception $err){\n Log::error('message error in update on RoleRepository :'. $err->getMessage());\n return back()->with('error', $err->getMessage());\n }\n}", "public function getPermissionAndRoleList()\n {\n $user = $this->user;\n\n if (!$user) {\n throw new RoleAndPriviledgeServiceException(\"The user is not defined\");\n }\n $permissions = $user->directPermissions;\n\n $user->loadMissing(\"roles\", \"roles.permissions\");\n\n $roles = $user->roles;\n\n // $roles = $user->roles()->with(\"permissions\")->get();\n\n $roles->each(function ($role) use (&$permissions) {\n $permissions = $permissions->merge($role->permissions);\n });\n\n $rv = [\n array_unique($permissions->pluck(\"name\")->all()),\n array_unique($roles->pluck(\"name\")->all())\n ];\n\n return $rv;\n }", "public function create(User $user)\n {\n //user role\n // dd($user->roles,$user);\n $user_role = \\App\\Role::find($user->role_id);\n // dd( $user_role->permissions);\n $role_permissions=$user_role->permissions;\n foreach ($role_permissions as $permission){\n if ($permission->id == 1) {\n return true;\n }\n\n }\n return false;\n\n //user permission role\n /** if (is_array($user)) {\n foreach ($user->roles as $role){\n foreach ($role->permissions as $permission) {\n if ($permission->id == 1) {\n return true;\n }\n }\n }\n return false;\n }*/\n}", "public function getPermissionRoleByRoleID($id);", "public function permission()\n {\n try {\n $data = [\n 'action' => route('store.permission'),\n 'page_title' => 'Permission',\n 'title' => 'Add permission',\n 'permission_id' => 0,\n 'name' => (old('name')) ? old('name') : '',\n 'description' => (old('description')) ? old('description') : '',\n 'modules' => Module::get(),\n ];\n return $data;\n } catch(\\Exception $err){\n Log::error('message error in permission on RoleRepository :'. $err->getMessage());\n return back()->with('error', $err->getMessage());\n }\n }", "function Permissions($Role, $OnlyIDs = true)\n\t{\n\t\tif ($OnlyIDs)\n\t\t{\n\t\t\t$Res = jf::SQL ( \"SELECT PermissionID AS `ID` FROM {$this->TablePrefix()}rbac_rolepermissions WHERE RoleID=? ORDER BY PermissionID\", $Role );\n\t\t\tif (is_array ( $Res ))\n\t\t\t{\n\t\t\t\t$out = array ();\n\t\t\t\tforeach ( $Res as $R )\n\t\t\t\t\t$out [] = $R ['ID'];\n\t\t\t\treturn $out;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t\treturn jf::SQL ( \"SELECT `TP`.* FROM {$this->TablePrefix()}rbac_rolepermissions AS `TR`\n\t\tRIGHT JOIN {$this->TablePrefix()}rbac_permissions AS `TP` ON (`TR`.PermissionID=`TP`.ID)\n\t\tWHERE RoleID=? ORDER BY TP.PermissionID\", $Role );\n\t}", "public function rolesForUser();", "function get_roles_with_capability($capability, $permission=NULL, $context='') {\n\n global $CFG;\n\n if ($context) {\n if ($contexts = get_parent_contexts($context)) {\n $listofcontexts = '('.implode(',', $contexts).')';\n } else {\n $sitecontext = get_context_instance(CONTEXT_SYSTEM);\n $listofcontexts = '('.$sitecontext->id.')'; // must be site\n }\n $contextstr = \"AND (rc.contextid = '$context->id' OR rc.contextid IN $listofcontexts)\";\n } else {\n $contextstr = '';\n }\n\n $selectroles = \"SELECT r.*\n FROM {$CFG->prefix}role r,\n {$CFG->prefix}role_capabilities rc\n WHERE rc.capability = '$capability'\n AND rc.roleid = r.id $contextstr\";\n\n if (isset($permission)) {\n $selectroles .= \" AND rc.permission = '$permission'\";\n }\n return get_records_sql($selectroles);\n}", "public function getAclRoleIdDataProvider()\n {\n $role = $this->getMockForAbstractClass(\n \\Magento\\Company\\Api\\Data\\RoleInterface::class,\n [],\n '',\n false,\n true,\n true,\n ['getData']\n );\n return [\n [[$role], 1],\n [null, 0]\n ];\n }", "public function makePermissionRole($permission_roles_arr = [])\n {\n $theme = $this->fakePermissionRoleData($permission_roles_arr);\n return $this->PermissionRoleRepositoryObj->create($theme);\n }", "public function & GetPermissions ();", "public function run()\n {\n $clients = Permission::where('name', 'like', '%clients%')->get()->toArray();\n $corporations = Permission::where('name', 'like', '%corporations%')->get()->toArray();\n $jobs = Permission::where('name', 'like', '%jobs%')->get()->toArray();\n $users = Permission::where('name', 'like', '%users%')->get()->toArray();\n $tags = Permission::where('name', 'like', '%tags%')->get()->toArray();\n\n \\tecai\\Models\\System\\Role::create([\n 'name' => 'root',\n 'display_name' => 'Super Admin',\n 'description' => 'the root account,Super Admin'\n ]);\n\n $roleAdmin = \\tecai\\Models\\System\\Role::create([\n 'name' => 'admin',\n 'display_name' => 'platform Admin',\n 'description' => 'the guy to admin the platform'\n ]);\n $this->attachPermission($roleAdmin, $clients, $corporations, $jobs, $users, $tags);\n\n\n $roleLegaler = \\tecai\\Models\\System\\Role::create([\n 'name' => 'legaler',\n 'display_name' => 'corporation-legaler',\n 'description' => 'the corporation legal person'\n ]);\n $this->attachPermission($roleLegaler, $corporations, $jobs, $users, $tags);\n\n $roleStaff = \\tecai\\Models\\System\\Role::create([\n 'name' => 'staff',\n 'display_name' => 'corporation-staff',\n 'description' => 'the corporation staff'\n ]);\n $this->attachPermission($roleStaff, $corporations, $jobs, $users, $tags);\n\n }", "public function listPermissionIdsForRole(Role $role)\n {\n \treturn $role->permissions->lists('id');\n }", "function smarty_function_select_user_project_permissions($params, &$smarty) {\n static $counter = 1;\n \n $id = array_var($params, 'id');\n if(empty($id)) {\n $id = 'select_user_project_permissions_' . $counter;\n $counter++;\n } // if\n \n $role_id = array_var($params, 'role_id', 0);\n $permissions = array_var($params, 'permissions', array());\n \n $smarty->assign(array(\n '_select_user_project_permissions_name' => array_var($params, 'name'),\n '_select_user_project_permissions_role_id_field' => array_var($params, 'role_id_field', 'role_id'),\n '_select_user_project_permissions_permissions_field' => array_var($params, 'permissions_field', 'permissions'),\n '_select_user_project_permissions_name' => array_var($params, 'name'),\n '_select_user_project_permissions_id' => $id,\n '_select_user_project_permissions_role_id' => $role_id,\n '_select_user_project_permissions_permissions' => $permissions,\n '_select_user_project_permissions_roles' => Roles::findProjectRoles(),\n ));\n \n \treturn $smarty->fetch(get_template_path('_user_project_permissions', null, SYSTEM_MODULE));\n }", "function wpms_classifieds_build_permissions() {\n\tdo_action(\"wpms_build_premissions\");\n\tif (function_exists('get_role')) {\n\t\t$role = array(get_role('administrator'), get_role('editor'), get_role('author'));\n\t\tforeach ($role as $r) {\n\t\t\tif ($r != null && !$role->has_cap('use_accueil')) {\n\t\t\t\t$r->add_cap('use_accueil');\n\t\t\t}\n\t\t\tif ($r != null && !$role->has_cap('admin_accueil')) {\n\t\t\t\t$r->add_cap('admin_accueil');\n\t\t\t}\n\t\t\tunset($r);\n\t\t}\n\t}\n}", "public function fakePermissionRole($permission_roles_arr = [])\n {\n return new PermissionRole($this->fakePermissionRoleData($permission_roles_arr));\n }", "function get_assignable_roles ($context, $field=\"name\") {\n\n $options = array();\n\n if ($roles = get_all_roles()) {\n foreach ($roles as $role) {\n if (user_can_assign($context, $role->id)) {\n $options[$role->id] = strip_tags(format_string($role->{$field}, true));\n }\n }\n }\n return $options;\n}", "public function permissions(){\n return new manytomany_link($this, 'permission', 'staffpermissions');\n }", "public function to_array_filtered($role = \"anon\") {\n\t\tif(core::$permission[$role]['key_status']['read'] === false) {\n\t\t\treturn false;\n\t\t}\n\t\t$values = array();\n\t\t$everything = $this -> to_array();\n\t\tforeach(core::$permission[$role]['key_status']['read'] as $field) {\n\t\t\tif(!isset($everything[$field])) {\n\t\t\t\tthrow new Exception(\"Check permissions: '$field' is not a real field in key_status\");\n\t\t\t}\n\t\t\t$values[$field] = $everything[$field];\n\t\t}\n\n\t\t/* Add filtered versions of everything that's been loaded */\n\t\t$values['doorkey'] = array();\n\t\t$values['key_history'] = array();\n\t\tforeach($this -> list_doorkey as $doorkey) {\n\t\t\t$values['doorkey'][] = $doorkey -> to_array_filtered($role);\n\t\t}\n\t\tforeach($this -> list_key_history as $key_history) {\n\t\t\t$values['key_history'][] = $key_history -> to_array_filtered($role);\n\t\t}\n\t\treturn $values;\n\t}" ]
[ "0.6899211", "0.66653204", "0.6607921", "0.6488249", "0.64642787", "0.6435225", "0.6271761", "0.6257895", "0.6232714", "0.6183075", "0.6168831", "0.61673814", "0.61548", "0.61502916", "0.6148395", "0.61162215", "0.61159456", "0.60929424", "0.6092681", "0.6079594", "0.60613817", "0.6056545", "0.605589", "0.60546", "0.60486746", "0.6033198", "0.6031245", "0.60080564", "0.60078144", "0.5994731", "0.5986698", "0.5983089", "0.59596103", "0.5956526", "0.5950042", "0.59459376", "0.5940561", "0.5938069", "0.59194785", "0.59112877", "0.59104645", "0.590574", "0.5904783", "0.5896339", "0.58941835", "0.58894986", "0.5882021", "0.5871859", "0.5871446", "0.58682984", "0.5832588", "0.5827523", "0.582337", "0.5822745", "0.58201444", "0.5818814", "0.58181643", "0.5817763", "0.58094203", "0.5807242", "0.58059263", "0.5802334", "0.58002967", "0.5799114", "0.5794844", "0.5789132", "0.578442", "0.57780445", "0.57764006", "0.5768516", "0.5768077", "0.57672167", "0.5763129", "0.57564324", "0.5755451", "0.5751778", "0.5741693", "0.5741605", "0.5740372", "0.57292587", "0.57269865", "0.57185745", "0.57135", "0.5710816", "0.57031256", "0.5693269", "0.56908435", "0.5684245", "0.5682336", "0.56758904", "0.566511", "0.5663639", "0.56466067", "0.5640141", "0.5637758", "0.56258076", "0.5616774", "0.5613481", "0.5604027", "0.559966" ]
0.56442213
93
Sets up the $categoryWithPermissions array Key is the category name Value is permission with dots
private static function setupCategoriesPermissions() { $result = []; // Looping into userPermissions and getting the category as the key and the value as an array of permissions foreach(self::$userPermissions as $userPermissionWithDots) { // checking if the permission has a menu category or not, it is separated in the DB with | $userCategoryPermission = explode ('.',$userPermissionWithDots,2); $userCategory = $userCategoryPermission[0]; // if the permission is without a dot then it is a category only if(count($userCategoryPermission) > 1) { $userPermission = $userCategoryPermission[1]; } else { $userPermission = ''; } if(is_numeric($userPermission)) { // If the permission is a number this means it is a role-manage permission // Add it if the role is in the roles to manage array if (in_array($userPermission, self::$rolesToManage)) { $result[$userCategory][] = $userPermission; } } else { $result[$userCategory][] = $userPermission; } } self::$categoryWithPermissions = $result; return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request)\n {\n $category=new User_category();\n\n $this->validate(request(),[\n 'name'=>'required',\n 'description'=>'required',\n ]);\n\n // User::create($request->all());\n\n\n $category->category_name=$request->input('name');\n $category->category_description=$request->input('description');\n $category->deleted=false;\n\n\n $category->save();\n $category_id=$category->user_category_id;\n\n if (isset($_POST['permissions'])) {\n foreach (($_POST['permissions']) as $permission){\n $perm=new Category_permission();\n $perm->category_id=$category_id;\n $perm->permission_id=$permission;\n $perm->deleted=false;\n $perm->save();\n }\n }\n\n\n // auth()->login();\n\n return redirect('/')->with('success','Category added');\n }", "function publisher_saveCategoryPermissions($groups, $categoryid, $perm_name)\r\n{\r\n $publisher = PublisherPublisher::getInstance();\r\n\r\n $result = true;\r\n\r\n $module_id = $publisher->getModule()->getVar('mid');\r\n $gperm_handler = xoops_gethandler('groupperm');\r\n // First, if the permissions are already there, delete them\r\n $gperm_handler->deleteByModule($module_id, $perm_name, $categoryid);\r\n\r\n // Save the new permissions\r\n if (count($groups) > 0) {\r\n foreach ($groups as $group_id) {\r\n $gperm_handler->addRight($perm_name, $categoryid, $group_id, $module_id);\r\n }\r\n }\r\n return $result;\r\n}", "private function updateCategoryAndChildrenForumPermissions($categoryId, $groupId, $permissions, $isAuthOnly) {\n $categoryIds = $this->myForumService->getCategoryIdsDownStream($categoryId);\n\n foreach ($categoryIds as $categoryId) {\n $forumPermission = ForumPermission::where('categoryId', $categoryId)->where('groupId', $groupId)->first();\n\n if ($forumPermission) {\n $forumPermission->permissions = $permissions;\n $forumPermission->isAuthOnly = $isAuthOnly;\n $forumPermission->save();\n } else {\n $forumPermission = new ForumPermission(\n [\n 'categoryId' => $categoryId,\n 'groupId' => $groupId,\n 'permissions' => $permissions,\n 'isAuthOnly' => $isAuthOnly\n ]\n );\n $forumPermission->save();\n }\n }\n }", "function set_acl_category($category)\n {\n $this->acl_category = $category;\n foreach ($this->plugins as $name => $obj) {\n $this->plugins[$name]->set_acl_category($category);\n }\n }", "public function savePermissions($permissions, $permissionSettings) {\n\t\t// create inserts\n\t\t$groupInserts = '';\n\t\tforeach ($permissions as $key => $permission) {\n\t\t\t// skip default values\n\t\t\t$noDefaultValue = false;\n\t\t\tforeach ($permission['settings'] as $value) {\n\t\t\t\tif ($value != -1) $noDefaultValue = true;\n\t\t\t}\n\t\t\tif (!$noDefaultValue) {\n\t\t\t\tunset($permissions[$key]);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!empty($groupInserts)) $groupInserts .= ',';\n\t\t\t$groupInserts .= '('.$this->categoryID.',\n\t\t\t\t\t '.intval($permission['id']).',\n\t\t\t\t\t '.(implode(', ', ArrayUtil::toIntegerArray($permission['settings']))).')';\n\t\t}\n\t\t\n\t\tif (!empty($groupInserts)) {\n\t\t\t$sql = \"INSERT INTO\twcf\".WCF_N.\"_linklist_category_to_group\n\t\t\t\t\t\t(categoryID, groupID, \".implode(', ', $permissionSettings).\")\n\t\t\t\tVALUES\t\t\".$groupInserts;\n\t\t\tWCF::getDB()->sendQuery($sql);\n\t\t}\n\t}", "public function addMultipleCategoriesToGroup();", "private function buildForumPermissions($permissions) {\n $forumPermissions = [];\n\n if (!isset($permissions)) {\n return $forumPermissions;\n }\n\n foreach (CategoryPermissions::getAsOptions() as $key => $value) {\n $forumPermissions[$key] = $permissions->permissions & $value;\n }\n\n return $forumPermissions;\n }", "public function createCategory();", "public function setPermissions($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->permissions = $arr;\n\n return $this;\n }", "function setup_cat()\n {\n $this->ipsclass->DB->simple_construct( array( \"select\" => 'perms_view, def_view, id, name', 'from' => 'gallery_categories', 'where' => \"id={$this->ipsclass->input['cat']}\" ) );\n $this->ipsclass->DB->simple_exec(); \n $cat = $this->ipsclass->DB->fetch_row();\n\n // Are we allowed to view this category?\n if( ! $this->ipsclass->check_perms( $cat['perms_view'] ) )\n {\n $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); \n }\n\n return $cat;\n }", "public function update(Request $request, $id)\n {\n\n $category=User_category::find($id);\n\n $this->validate(request(),[\n 'name'=>'required',\n 'description'=>'required',\n ]);\n\n // User::create($request->all());\n\n\n $category->category_name=$request->input('name');\n $category->category_description=$request->input('description');\n $category->deleted=false;\n\n\n $category->save();\n //$category_id=$category->user_category_id;\n\n if (isset($_POST['permissions'])) {\n foreach (($_POST['permissions']) as $permission){\n $perm=new Category_permission();\n $perm->category_id=$id;\n $perm->permission_id=$permission;\n $perm->deleted=false;\n $perm->save();\n }\n }\n\n\n // auth()->login();\n\n return redirect('/')->with('success','Category updated');\n\n\n }", "public function setPermissions($permissions) {}", "function createCategories()\n {\n $currentCategories = $this->loadCategories();\n\n foreach ($this->categories as $category)\n {\n // Skip adding category if it already exists\n if (in_array($category, $currentCategories))\n {\n continue;\n }\n\n // Create a copy of the template array for category properties\n $data = array_merge($this->categoryTemplate);\n\n // Set the category description from the translation key in en-GB.com_cajobboard.sys.ini\n // remove any spaces from the category title when building the translation key\n $data['title'] = Text::_('COM_CAJOBBOARD_CATEGORY_TITLE_' . strtoupper(str_replace(' ', '', $category)));\n\n $data['description'] = $data['title'];\n\n // Initialize a new category\n $category = Table::getInstance('Category');\n\n // Bind passed category parameters to Category model\n $category->bind($data);\n\n // setLocation(integer $referenceId, string $position = 'after')\n $category->setLocation($category->getRootId(), 'last-child');\n\n // Check to make sure our data is valid. check() will auto generate alias if not set above.\n if (!$category->check())\n {\n throw new \\Exception($category->getError(), 500);\n\n return false;\n }\n\n // Store the category\n if (!$category->store(true))\n {\n throw new \\Exception($category->getError(), 500);\n\n return false;\n }\n\n // Build the path for our category and set it in the database\n $category->rebuildPath($category->id);\n }\n\n Table::getInstance('Category')->rebuild();\n }", "public function getPermissionArrayToNameWise($permission = []) {\n $data = [];\n if(!empty($permission)) {\n foreach ($permission as $permission_key => $permission_array) {\n foreach ($permission_array as $permission_name => $permission_value) {\n $permi = explode('.', $permission_value);\n $data[$permi[0]][$permission_name] = array(\n 'permission' => base64_encode($permission_value),\n 'label' => $permi[1],\n 'can_inherit' => -1,\n );\n //$data[$permi[0]][$permi[1]] = -1; //inherit\n //$data[$permi[0]][$permi[1]] = base64_encode($permi[1]); //inherit\n }\n }\n }\n return $data;\n }", "public function __construct() {\n $perm_data = 'data/permissions.json';\n if(file_exists($perm_data)) {\n $list = json_decode(file_get_contents($perm_data), true);\n foreach($list as $groupname => $group) {\n if(isset($group['inherit'])) {\n $group['permissions'] = array_merge(\n $group['permissions'],\n $list[$group['inherit']]['permissions']\n );\n }\n $this->permissions[$groupname] = $group['permissions'];\n $this->display_names[$groupname] = $group['display_name'];\n }\n }\n }", "private function packCategory()\n {\n /** @var modCategory $category */\n $category = $this->modx->newObject('modCategory');\n $category->set('category', self::PKG_NAME);\n\n $this->packCategoryElements($category, 'plugins');\n\n $this->builder->putVehicle($this->builder->createVehicle($category, [\n xPDOTransport::UNIQUE_KEY => 'category',\n xPDOTransport::PRESERVE_KEYS => false,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::RELATED_OBJECTS => true,\n xPDOTransport::RELATED_OBJECT_ATTRIBUTES => [\n 'Plugins' => [\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::UNIQUE_KEY => 'name'\n ],\n 'PluginEvents' => [\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::UNIQUE_KEY => ['pluginid','event'],\n ]\n ]\n ]));\n }", "private function process_permission_array(Request $request, &$temp_permission){\n if($request->permission !== null){\n $checkbox_values = array_map('intval', $request->permission);\n foreach($checkbox_values as $value){\n $checkbox_values = array_map('intval', $request->permission);\n\n $temp_permission[$value] = \"1\";\n \n }\n }\n $temp_permission = implode(',',$temp_permission);\n }", "function set_rights_of_cat($p_catid, $p_suggest_right, $p_suggest_group_right, &$p_changed){\n// Hauptprozedur. Diese wird aufgerufen um die Rechte einer Kategorie zu setzen, inklusive deren Unterkategorien.\n// $p_catid = KategorienID, welche gesetzt werden soll.\n// $p_suggested_right = Die rechte welche gesetzt werden sollen.\n// $p_changed = Anzahl der Korrekturen oder (-1): Gewuenschte aenderung war nicht zulaessig! \n $database = &JFactory::getDBO();\n // Kategorie laden aus Datenbank.\n $l_sql = \"SELECT parent_id, cat_access, cat_group_access FROM #__jdownloads_cats WHERE cat_id = \".$p_catid;\n $database->setQuery($l_sql);\n $l_catrow = $database->loadObjectList();\n if (!isset($l_catrow[0]) && ($p_catid > 0)){\n // Die Kategorie existiert nicht. Nicht weiterfahren.\n return '';\n }\n // Urspruengliche Rechte der Kategorie lesen.\n $l_rights_from = $l_catrow[0]->cat_access;\n //$l_rights_from_group = $l_catrow[0]->cat_group_access;\n if ($l_catrow[0]->parent_id == 0){\n // Es ist eine Hauptkategorie. Darueberliegende Kategorien muessen nicht nach niedrigen Rechten durchsucht werden.\n $l_rights_to_set = $p_suggest_right;\n } else {\n // Es ist eine Unterkategorie. Darueberliegenden Kategoriebaum nach niedrigen Rechten (=hoeherer Wert) durchsuchen.\n // Damit wird gewaehrleitet, dass eine Unterkategorie keine hoeheren Rechte erhalten kann.\n $l_rights_to_set = get_lowest_rights($p_catid, $p_suggest_right);\n if ($l_rights_to_set > $p_suggest_right) $p_changed = -1;\n }\n // Die Rechte der Kategorie und aller Unter- und Unter-Unter-Kategorien setzen.\n set_rights_to_tree($p_catid, $l_rights_to_set, $l_rights_from, $p_suggest_group_right, $p_changed);\n}", "public function run()\n {\n $permission = [\n // [\n // 'name' => 'user-list',\n // 'display_name' => 'List Users',\n // 'category' => 'user',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'user-create',\n // 'display_name' => 'Create Users',\n // 'category' => 'user',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'user-edit',\n // 'display_name' => 'Edit Users',\n // 'category' => 'user',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'user-delete',\n // 'display_name' => 'Delete Users',\n // 'category' => 'user',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'role-list',\n // 'display_name' => 'List roles',\n // 'category' => 'role',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'role-create',\n // 'display_name' => 'Create roles',\n // 'category' => 'role',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'role-edit',\n // 'display_name' => 'Edit roles',\n // 'category' => 'role',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'role-delete',\n // 'display_name' => 'Delete roles',\n // 'category' => 'role',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-category-list',\n // 'display_name' => 'List Question Categories',\n // 'category' => 'question-category',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-category-create',\n // 'display_name' => 'Create Question Category',\n // 'category' => 'question-category',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-category-edit',\n // 'display_name' => 'Edit Question Category',\n // 'category' => 'question-category',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-category-delete',\n // 'display_name' => 'Delete Question Category',\n // 'category' => 'question-category',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-list',\n // 'display_name' => 'List Questions',\n // 'category' => 'question',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-create',\n // 'display_name' => 'Create Question',\n // 'category' => 'question',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-edit',\n // 'display_name' => 'Edit Question',\n // 'category' => 'question',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'question-delete',\n // 'display_name' => 'Delete Question',\n // 'category' => 'question',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'exam-list',\n // 'display_name' => 'List Exams',\n // 'category' => 'exam',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'exam-create',\n // 'display_name' => 'Create Exam',\n // 'category' => 'exam',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'exam-edit',\n // 'display_name' => 'Edit Exam',\n // 'category' => 'exam',\n // 'guard_name' => 'admin',\n // ],\n // [\n // 'name' => 'exam-delete',\n // 'display_name' => 'Delete Exam',\n // 'category' => 'exam',\n // 'guard_name' => 'admin',\n // ],\n [\n 'name' => 'group-list',\n 'display_name' => 'List Groups',\n 'category' => 'group',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'group-create',\n 'display_name' => 'Create Group',\n 'category' => 'group',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'group-edit',\n 'display_name' => 'Edit Group',\n 'category' => 'group',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'group-delete',\n 'display_name' => 'Delete Group',\n 'category' => 'group',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'team-list',\n 'display_name' => 'List Teams',\n 'category' => 'team',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'team-create',\n 'display_name' => 'Create Team',\n 'category' => 'team',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'team-edit',\n 'display_name' => 'Edit Team',\n 'category' => 'team',\n 'guard_name' => 'admin',\n ],\n [\n 'name' => 'team-delete',\n 'display_name' => 'Delete Team',\n 'category' => 'team',\n 'guard_name' => 'admin',\n ],\n ];\n\n foreach ($permission as $key => $value) {\n Permission::create($value);\n }\n }", "public function create(Request $request)\n {\n //\n $roles_permission = RolesPermission::where('role_id', Auth::user()->role_id)->get();\n $rolespermission = [];\n foreach ($roles_permission as $rolepermission) {\n array_push($rolespermission, $rolepermission->permission_id);\n }\n if (in_array(10, $rolespermission)) {\n\n $data = $this->validate($request, [\n 'category_id' => 'required',\n ]);\n\n $setting = Setting::first();\n $category = Category::findorfail($data['category_id']);\n return view('backend.subcategories.create', compact('category', 'setting'));\n\n } else {\n return view('backend.permissions.permission');\n }\n }", "function setPermissions($component, $group, $actions, $permissions)\n\t{\n\t\t$this->jClick($component);\n\t\tif ($component == 'Global Configuration')\n\t\t{\n\t\t\t$this->click('permissions');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->jClick('Options');\n\t\t\t$this->click(\"//dt[contains(span,'Permissions')]\");\n\t\t}\n\t\tif (!is_array($actions)) {\n\t\t\t$actions = array($actions);\n\t\t}\n\t\tif (!is_array($permissions)) {\n\t\t\t$permissions = array($permissions);\n\t\t}\n\t\techo \"Open panel for group '$group'\\n\";\n\t\t$this->click(\"//ul[@id='rules']//li/div[@class='panel']//h3[contains(.,'$group')]\");\n\n\t\tfor ($i = 0; $i < count($actions); $i++) {\n\t\t\t$action = $actions[$i];\n\t\t\t$permission = $permissions[$i];\n\t\t\techo \"Setting $action action for $group to $permission in $component.\\n\";\n\t\t\tswitch ($action)\n\t\t\t{\n\t\t\t\tcase 'Site Login':\n\t\t\t\t\t$doAction = 'login.site';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Admin Login':\n\t\t\t\t\t$doAction = 'login.admin';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Configure':\n\t\t\t\tcase 'Super Admin':\n\t\t\t\t\t$doAction = 'core.admin';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Access Component':\n\t\t\t\t\t$doAction = 'core.manage';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Create':\n\t\t\t\t\t$doAction = 'create';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Delete':\n\t\t\t\t\t$doAction = 'delete';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Edit':\n\t\t\t\t\t$doAction = 'edit';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Edit State':\n\t\t\t\t\t$doAction = 'edit.state';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Edit Own':\n\t\t\t\t\t$doAction = 'edit.own';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$this->select(\"//select[contains(@id,'$doAction')][contains(@title,'$group')]\", \"label=$permission\");\n\t\t}\n\n\t\techo \"Close panel for group '$group'\\n\";\n\t\t$this->click(\"//ul[@id='rules']//li/div[@class='panel']//h3[contains(.,'Public')]\");\n\n\t\tif ($component == 'Global Configuration') {\n\t\t\t$this->click(\"//li[@id='toolbar-save']/a/span\");\n\t\t\t$this->waitForPageToLoad(\"30000\");\n\t\t\ttry {\n\t\t\t\t$this->assertTrue($this->isElementPresent(\"//dl[@id='system-message'][contains(., 'success')]\"));\n\t\t\t}\n\t\t\tcatch (PHPUnit_Framework_AssertionFailedError $e) {\n\t\t\t\tarray_push($this->verificationErrors, $this->getTraceFiles($e));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Need to click the Save & Close button\n\t\t\t$this->click(\"//button[contains(text(),'Save')][contains(text(),'Close')]\");\n\t\t\tfor ($second = 0; ; $second++) {\n\t\t\t\tif ($second >= 60) $this->fail(\"timeout\");\n\t\t\t\ttry {\n\t\t\t\t\tif (!$this->isElementPresent(\"//dl[contains(@id, 'configuration')]\")) break;\n\t\t\t\t} catch (Exception $e) {}\n\t\t\t\tsleep(1);\n\t\t\t}\n\t\t}\n\t}", "function _make_cat_compat(&$category)\n {\n }", "function forum_group_permissions( $perms ){\n\t$perms[ 'forum' ] = 'Can Post to Forum';\n\t$perms[ 'forum_moderate' ] = 'Can Moderate Forum';\n\treturn $perms;\n}", "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'milo.food.some_permission' => [\n 'tab' => 'Food',\n 'label' => 'Some permission'\n ],\n ];\n }", "public function permissions();", "public function permissions();", "public function permissions();", "public function permissions();", "public function permissions();", "public function setPermissions($permissions);", "public function addCategoryToGroupByName($gorup_name, $category_name);", "protected function getAllowedCategories($field)\n\t{\n\t\t$app = Factory::getApplication();\n\t\t$user = Factory::getUser();\n\n\t\t// categories scope parameters\n\t\t$use_cat_acl = $field->parameters->get('use_cat_acl', 1);\n\t\t$method_cat = $field->parameters->get('method_cat', 1);\n\t\t$usesubcats = $field->parameters->get('usesubcats', 0);\n\n\t\t$catids = $field->parameters->get('catids');\n\t\tif (empty($catids)) $catids = array();\n\t\telse if (!is_array($catids)) $catids = !FLEXI_J16GE ? array($catids) : explode(\"|\", $catids);\n\n\n\t\t// ***\n\t\t// *** Get & check Global category related permissions\n\t\t// ***\n\n\t\trequire_once(JPATH_ROOT . DS . 'components' . DS . 'com_flexicontent' . DS . 'helpers' . DS . 'permission.php');\n\t\t$viewallcats = FlexicontentHelperPerm::getPerm()->ViewAllCats;\n\n\n\t\t// ***\n\t\t// *** Calculate categories to use for retrieving the items\n\t\t// ***\n\n\t\t$allowed_cats = $disallowed_cats = false;\n\n\t\t// Get user allowed categories\n\t\t$usercats = $use_cat_acl && !$viewallcats ?\n\t\t\tFlexicontentHelperPerm::getAllowedCats($user, $actions_allowed = array('core.create', 'core.edit', 'core.edit.own'), $require_all = false, $check_published = true) :\n\t\t\tFlexicontentHelperPerm::returnAllCats($check_published = true, $specific_catids = null);\n\n\t\t// Find (if configured) , descendants of the categories\n\t\tif ($usesubcats)\n\t\t{\n\t\t\tglobal $globalcats;\n\t\t\t$_catids = array();\n\t\t\tforeach ($catids as $catid)\n\t\t\t{\n\t\t\t\t$subcats = $globalcats[$catid]->descendantsarray;\n\t\t\t\tforeach ($subcats as $subcat) $_catids[(int) $subcat] = 1;\n\t\t\t}\n\t\t\t$catids = array_keys($_catids);\n\t\t}\n\n\n\t\t// ***\n\t\t// *** Decided allowed categories according to method of CATEGORY SCOPE\n\t\t// ***\n\n\t\t// Include method\n\t\tif ($method_cat == 3)\n\t\t{\n\t\t\t$allowed = array_intersect($usercats, $catids);\n\n\t\t\treturn $allowed;\n\t\t}\n\n\t\t// Exclude method\n\t\telse if ($method_cat == 2)\n\t\t{\n\t\t\t$allowed = array_diff($usercats, $catids);\n\n\t\t\treturn $allowed;\n\t\t}\n\n\t\t// Neither INCLUDE / nor EXCLUDE method, return all user 's allowed categories\n\t\telse\n\t\t{\n\t\t\treturn $usercats;\n\t\t}\n\t}", "public function category(){\n\n Excel::import(new ComponentsImport,'/imports/categories.csv');\n $cats = array_values(array_unique(Cache::get('category')));\n for($i=0;$i<count($cats);$i++){\n $sub = new Category();\n $sub->name = $cats[$i];\n $sub->save();\n }\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 }", "private function field_permissions($field_name, $perm_name, $label, $field_values, $is_object, $is_options, $permission) {\n\t $values = self::$FIELD_OPTIONS;\n if ($is_options) {\n unset($values['a']);\n unset($values['d']);\n }\n\n $field = 'permissions-'.$perm_name;\n $params = array();\n if ($is_object) {\n $params['label'] = $label.($is_options ? ' (Options)' : '');\n }\n $params['name'] = $field;\n\t\t$params['values'] = $values;\n $params['value'] = $field_values;\n\t\t$params['placeholder'] = 'No permissions set';\n\t\t$params['is_multiple'] = true;\n\t\t$params['use_template_vars'] = false;\n\t\t$params['is_readonly'] = $permission->has_add() === false && $permission->has_update() === false;\n\t\t$params['attr']['id'] = $field;\n\t\t$params['attr']['class'] = 'permissions';\n\t\t$params['attr']['data-native-menu'] = 'false';\n $params['attr']['data-field'] = $field_name;\n $params['attr']['data-object'] = $is_object ? 1 : 0;\n\t\treturn form_select($params);\n\t}", "public function & GetPermissions ();", "private function _setTaskPermission($loginInfo)\n {\n $taskPermissionList = explode(\",\", $loginInfo['taskpermission']);\n $result = array();\n $rpcClient = Rpc_HttpDao::getInstance();\n $list = $rpcClient->getResultRaw('AU007', array(\n 'type' => Enum_Service::PERMISSION_TYPE_TASK,\n ), true, 0);\n $taskCategory = $list['data']['list'];\n foreach ($taskCategory as $item) {\n if (in_array($item['id'], $taskPermissionList)) {\n $result[] = $item;\n }\n }\n $this->_view->assign('taskPermissionList', $result);\n }", "function insert_category($categories_data, $dest_category_id, $action = 'insert') {\n\n\t\t$categories_id = olc_db_prepare_input($categories_data['categories_id']);\n\n\t\t$sort_order = olc_db_prepare_input($categories_data['sort_order']);\n\t\t$categories_status = olc_db_prepare_input($categories_data['status']);\n\n\n\n\n\n\t\t$customers_statuses_array = olc_get_customers_statuses();\n\n\t\t$permission = array ();\n\t\tfor ($i = 0; $n = sizeof($customers_statuses_array), $i < $n; $i ++) {\n\t\t\tif (isset($customers_statuses_array[$i]['id']))\n\t\t\t\t$permission[$customers_statuses_array[$i]['id']] = 0;\n\t\t}\n\t\tif (isset ($categories_data['groups']))\n\t\t\tforeach ($categories_data['groups'] AS $dummy => $b) {\n\t\t\t\t$permission[$b] = 1;\n\t\t\t}\n\t\t// build array\n\t\tif ($permission['all']==1) {\n\t\t\t$permission = array ();\n\t\t\tend($customers_statuses_array);\n\t\t\tfor ($i = 0; $n = key($customers_statuses_array), $i < $n+1; $i ++) {\n\t\t\t\tif (isset($customers_statuses_array[$i]['id']))\n\t\t\t\t\t$permission[$customers_statuses_array[$i]['id']] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\n\t\t$permission_array = array ();\n\t\t\n\t\t\n\t\t// set pointer to last key\n\t\tend($customers_statuses_array);\t\t\n\t\tfor ($i = 0; $n = key($customers_statuses_array), $i < $n+1; $i ++) {\n\t\t\tif (isset($customers_statuses_array[$i]['id'])) {\n\t\t\t\t$permission_array = array_merge($permission_array, array ('group_permission_'.$customers_statuses_array[$i]['id'] => $permission[$customers_statuses_array[$i]['id']]));\n\t\t\t}\n\t\t}\n\n\n\t\t$sql_data_array = array ('sort_order' => $sort_order, 'categories_status' => $categories_status, 'products_sorting' => olc_db_prepare_input($categories_data['products_sorting']), 'products_sorting2' => olc_db_prepare_input($categories_data['products_sorting2']), 'categories_template' => olc_db_prepare_input($categories_data['categories_template']), 'listing_template' => olc_db_prepare_input($categories_data['listing_template']));\n\t\t$sql_data_array = array_merge($sql_data_array,$permission_array);\n\t\tif ($action == 'insert') {\n\t\t\t$insert_sql_data = array ('parent_id' => $dest_category_id, 'date_added' => 'now()');\n\t\t\t$sql_data_array = olc_array_merge($sql_data_array, $insert_sql_data);\n\t\t\tolc_db_perform(TABLE_CATEGORIES, $sql_data_array);\n\t\t\t$categories_id = olc_db_insert_id();\n\t\t}\n\t\telseif ($action == 'update') {\n\t\t\t$update_sql_data = array ('last_modified' => 'now()');\n\t\t\t$sql_data_array = olc_array_merge($sql_data_array, $update_sql_data);\n\t\t\tolc_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', 'categories_id = \\''.$categories_id.'\\'');\n\t\t}\n\t\tolc_set_groups($categories_id, $permission_array);\n\t\t$languages = olc_get_languages();\n\t\tforeach ($languages AS $lang) {\n\t\t\t$categories_name_array = $categories_data['name'];\n\t\t\t$sql_data_array = array ('categories_name' => olc_db_prepare_input($categories_data['categories_name'][$lang['id']]), 'categories_heading_title' => olc_db_prepare_input($categories_data['categories_heading_title'][$lang['id']]), 'categories_description' => olc_db_prepare_input($categories_data['categories_description'][$lang['id']]), 'categories_meta_title' => olc_db_prepare_input($categories_data['categories_meta_title'][$lang['id']]), 'categories_meta_description' => olc_db_prepare_input($categories_data['categories_meta_description'][$lang['id']]), 'categories_meta_keywords' => olc_db_prepare_input($categories_data['categories_meta_keywords'][$lang['id']]));\n\n\n\t\t\tif ($action == 'insert') {\n\t\t\t\t$insert_sql_data = array ('categories_id' => $categories_id, 'language_id' => $lang['id']);\n\t\t\t\t$sql_data_array = olc_array_merge($sql_data_array, $insert_sql_data);\n\t\t\t\tolc_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array);\n\t\t\t}\n\t\t\telseif ($action == 'update') {\n\t\t\t\tolc_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', 'categories_id = \\''.$categories_id.'\\' and language_id = \\''.$lang['id'].'\\'');\n\t\t\t}\n\t\t}\n\n\t\tif ($categories_image = & olc_try_upload('categories_image', DIR_FS_CATALOG_IMAGES.'categories/')) {\n\t\t\t$cname_arr = explode('.', $categories_image->filename);\n\t\t\t$cnsuffix = array_pop($cname_arr);\n\t\t\t$categories_image_name = $categories_id.'.'.$cnsuffix;\n\t\t\t@ unlink(DIR_FS_CATALOG_IMAGES.'categories/'.$categories_image_name);\n\t\t\trename(DIR_FS_CATALOG_IMAGES.'categories/'.$categories_image->filename, DIR_FS_CATALOG_IMAGES.'categories/'.$categories_image_name);\n\t\t\tolc_db_query(\"SQL_UPDATE \".TABLE_CATEGORIES.\"\n\t\t\t\t\t\t \t\t SET categories_image = '\".olc_db_input($categories_image_name).\"'\n\t\t\t\t\t\t \t\t WHERE categories_id = '\".(int) $categories_id.\"'\");\n\t\t}\n\n\t\tif ($categories_data['del_cat_pic'] == 'yes') {\n\t\t\t@ unlink(DIR_FS_CATALOG_IMAGES.'categories/'.$categories_data['categories_previous_image']);\n\t\t\tolc_db_query(\"SQL_UPDATE \".TABLE_CATEGORIES.\"\n\t\t\t\t\t\t \t\t SET categories_image = ''\n\t\t\t\t\t\t \t\t WHERE categories_id = '\".(int) $categories_id.\"'\");\n\t\t}\n\n\t}", "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'jc91715.music.some_permission' => [\n 'tab' => 'music',\n 'label' => 'Some permission'\n ],\n ];\n }", "function permission_group_types($category='all',$userId='')\n\t{\n\t\tlog_message('debug', '_setting/permission_group_types');\n\t\tlog_message('debug', '_setting/permission_group_types:: [1] category='.$category.' userId='.$userId);\n\n\t\t$result = server_curl(IAM_SERVER_URL, array('__action'=>'get_list', 'query'=>'get_permission_group_types', 'variables'=>array(\n\t\t\t'category_condition'=>($category != 'all'? \" AND group_category='\".$category.\"' \": \"\")\n\t\t)));\n\t\tlog_message('debug', '_setting/permission_group_types:: [2] result='.json_encode($result));\n\n\t\treturn $result;\n\t}", "public function registerMenuOptions()\n {\n if (Auth::user()->hasPermission('property_category.index')) {\n Menu::registerMenuOptions(Category::class, trans('plugins/real-estate::category.menu'));\n }\n }", "public function store(CreatePermissionCategoryRequest $request)\n {\n $input = $request->all();\n\n $permissionCategory = $this->permissionCategoryRepository->create($input);\n\n Flash::success('Permission Category saved successfully.');\n\n return redirect(route('permissionCategories.index'));\n }", "public function stepCategory()\n {\n global $rlSmarty, $rlCategories, $page_info, $account_info, $sError, $config;\n\n parent::step();\n\n $GLOBALS['rlHook']->load('addListingGetCats');\n\n // Define allowed types\n $allowed_type_keys = $account_info['Abilities'];\n\n // \"Individual add listing page\" mode\n if ($page_info['Key'] != 'add_listing') {\n $individual_type_key = substr($page_info['Key'], 3);\n\n if (in_array($individual_type_key, $allowed_type_keys)) {\n $allowed_type_keys = array($individual_type_key);\n } else {\n $sError = true;\n }\n }\n\n // Adapt listing types array\n $allowed_types = $GLOBALS['rlListingTypes']->adaptTypes($allowed_type_keys);\n $rlSmarty->assign_by_ref('allowed_types', $allowed_types);\n\n // Existing membership plan mode\n $this->existingMembershipHandler($account_info);\n\n // Remove unnecessary steps\n if (!$this->singleStep) {\n unset($this->steps['photo'], $this->steps['checkout']);\n }\n }", "protected function buildPermissions(DiscussionType $discussion_type) {\n $type_id = $discussion_type->id();\n $type_params = ['%type' => $discussion_type->label()];\n\n return [\n \"view $type_id discussion\" => [\n 'title' => $this->t('%type: View discussion', $type_params),\n ],\n \"create $type_id discussion\" => [\n 'title' => $this->t('%type: Create new discussion', $type_params),\n ],\n \"edit own $type_id discussion\" => [\n 'title' => $this->t('%type: Edit own discussion', $type_params),\n ],\n \"edit any $type_id discussion\" => [\n 'title' => $this->t('%type: Edit any discussion', $type_params),\n ],\n \"delete own $type_id discussion\" => [\n 'title' => $this->t('%type: Delete own discussion', $type_params),\n ],\n \"delete any $type_id discussion\" => [\n 'title' => $this->t('%type: Delete any discussion', $type_params),\n ],\n \"reply to own $type_id discussion\" => [\n 'title' => $this->t('%type: Reply to own discussion', $type_params),\n ],\n \"reply to any $type_id discussion\" => [\n 'title' => $this->t('%type: Reply to any discussion', $type_params),\n ],\n ];\n }", "public function set__categories($categories)\n\t{\n\t\t// Currently cannot get multiple category groups through relationships\n\t\t$cat_groups = array();\n\n\t\tif ($this->Channel->cat_group)\n\t\t{\n\t\t\t$cat_groups = explode('|', $this->Channel->cat_group);\n\t\t}\n\n\t\tif ($this->isNew() OR empty($categories))\n\t\t{\n\t\t\t$this->Categories = NULL;\n\t\t}\n\n\t\tif (empty($categories))\n\t\t{\n\t\t\tforeach ($cat_groups as $cat_group)\n\t\t\t{\n\t\t\t\t$this->setRawProperty('cat_group_id_'.$cat_group, '');\n\t\t\t\t$this->getCustomField('categories[cat_group_id_'.$cat_group.']')->setData('');\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t$set_cats = array();\n\n\t\t// Set the data on the fields in case we come back from a validation error\n\t\tforeach ($cat_groups as $cat_group)\n\t\t{\n\t\t\tif (array_key_exists('cat_group_id_'.$cat_group, $categories))\n\t\t\t{\n\t\t\t\t$group_cats = $categories['cat_group_id_'.$cat_group];\n\n\t\t\t\t$cats = implode('|', $group_cats);\n\n\t\t\t\t$this->setRawProperty('cat_group_id_'.$cat_group, $cats);\n\t\t\t\t$this->getCustomField('categories[cat_group_id_'.$cat_group.']')->setData($cats);\n\n\t\t\t\t$group_cat_objects = $this->getModelFacade()\n\t\t\t\t\t->get('Category')\n\t\t\t\t\t->filter('site_id', ee()->config->item('site_id'))\n\t\t\t\t\t->filter('cat_id', 'IN', $group_cats)\n\t\t\t\t\t->all();\n\n\t\t\t\tforeach ($group_cat_objects as $cat)\n\t\t\t\t{\n\t\t\t\t\t$set_cats[] = $cat;\n\t\t\t\t}\n\n\t\t\t\t$cat_ids = $group_cat_objects->pluck('cat_id');\n\t\t\t\tif (ee()->config->item('auto_assign_cat_parents') == 'y')\n\t\t\t\t{\n\t\t\t\t\tforeach ($set_cats as $cat)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile ($cat->Parent !== NULL)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cat = $cat->Parent;\n\t\t\t\t\t\t\tif ( ! in_array($cat->getId(), $cat_ids))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$set_cats[] = $cat;\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$this->Categories = $set_cats;\n\t}", "protected function _inheritCategoryPermission($path)\n {\n if (strpos($path, '/') !== false) {\n $parentPath = substr($path, 0, strrpos($path, '/'));\n } else {\n $parentPath = '';\n }\n\n $permissionParent = Enterprise_CatalogPermissions_Model_Permission::PERMISSION_PARENT;\n\n if (isset($this->_permissionCache[$path])) {\n foreach (array_keys($this->_permissionCache[$path]) as $uniqKey) {\n if (isset($this->_permissionCache[$parentPath][$uniqKey])) {\n foreach ($this->_grantsInheritance as $grant => $inheritance) {\n\n $value = $this->_permissionCache[$parentPath][$uniqKey][$grant];\n\n if ($this->_permissionCache[$path][$uniqKey][$grant] == $permissionParent) {\n $this->_permissionCache[$path][$uniqKey][$grant] = $value;\n } else {\n if ($inheritance == 'allow') {\n $value = max(\n $this->_permissionCache[$path][$uniqKey][$grant],\n $value\n );\n }\n\n $value = min(\n $this->_permissionCache[$path][$uniqKey][$grant],\n $value\n );\n\n $this->_permissionCache[$path][$uniqKey][$grant] = $value;\n }\n\n if ($this->_permissionCache[$path][$uniqKey][$grant] == $permissionParent) {\n $this->_permissionCache[$path][$uniqKey][$grant] = null;\n }\n\n }\n }\n }\n if (isset($this->_permissionCache[$parentPath])) {\n foreach (array_keys($this->_permissionCache[$parentPath]) as $uniqKey) {\n if (!isset($this->_permissionCache[$path][$uniqKey])) {\n $this->_permissionCache[$path][$uniqKey] = $this->_permissionCache[$parentPath][$uniqKey];\n }\n }\n }\n } elseif (isset($this->_permissionCache[$parentPath])) {\n $this->_permissionCache[$path] = $this->_permissionCache[$parentPath];\n }\n\n\n\n return $this;\n }", "public function initializePermissions() {\n\t\tLoader::helper('clov_permissions', 'clov');\n\t\t$page = $this->getCollectionObject();\n\t\t\n\t\tClovPermissionsHelper::setBaselinePermissions($page);\n\t\t\n\t\t// Project managers and employees can add new expenses.\n\t\t$clovGroups = Loader::package('clov')->getGroups();\n\t\t$page->assignPermissions($clovGroups[ClovPackage::PROJECT_MANAGERS], array('add_subpage'));\n\t\t$page->assignPermissions($clovGroups[ClovPackage::EMPLOYEES], array('add_subpage'));\n\t\t\n\t\t// Only allow clov_expense pages under this one.\n\t\tClovPermissionsHelper::restrictSubpageType($page, CollectionType::getByHandle('clov_expense'));\n\t}", "public function deletePermissions() {\n\t\t// delete group permissions\n\t\t$sql = \"DELETE FROM\twcf\".WCF_N.\"_linklist_category_to_group\n\t\t\tWHERE\t\tcategoryID = \".$this->categoryID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t}", "function custom_permissions() {\n\t\tif ($this->dx_auth->is_logged_in()) {\n\t\t\techo 'My role: '.$this->dx_auth->get_role_name().'<br/>';\n\t\t\techo 'My permission: <br/>';\n\t\t\t\n\t\t\tif ($this->dx_auth->get_permission_value('edit') != NULL AND $this->dx_auth->get_permission_value('edit')) {\n\t\t\t\techo 'Edit is allowed';\n\t\t\t} else {\n\t\t\t\techo 'Edit is not allowed';\n\t\t\t}\n\t\t\t\n\t\t\techo '<br/>';\n\t\t\t\n\t\t\tif ($this->dx_auth->get_permission_value('delete') != NULL AND $this->dx_auth->get_permission_value('delete')) {\n\t\t\t\techo 'Delete is allowed';\n\t\t\t} else {\n\t\t\t\techo 'Delete is not allowed';\n\t\t\t}\n\t\t}\n\t}", "private static function managePermissions(Role $group, $briefcases, $permissions, $method = 'create')\n { \n if($method == 'update') \n {\n $group->permissions()->delete();\n $group->detachAllPermissions(); \n }\n\n foreach ($briefcases as $key => $value)\n {\n foreach ($permissions[$value] as $keyp => $valuep)\n { \n $group->attachPermission( Permission::create( Self::parseData($valuep, $value) ) ); \n }\n } \n }", "public function setPermissionsAttribute($permissions)\n\t{\n\t\t$this->attributes['permissions'] = serialize($permissions);\n\t}", "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 rename_categories() {\n global $wp_taxonomies;\n $labels = &$wp_taxonomies['category']->labels;\n $labels->name = 'Groups';\n $labels->singular_name = 'Group';\n $labels->add_new = 'Add Group';\n $labels->add_new_item = 'Add Group';\n $labels->edit_item = 'Edit Group';\n $labels->new_item = 'Group';\n $labels->view_item = 'View Group';\n $labels->search_items = 'Search Groups';\n $labels->not_found = 'No Groups found';\n $labels->not_found_in_trash = 'No Groups found in Trash';\n $labels->all_items = 'All Groups';\n $labels->menu_name = 'Groups';\n $labels->name_admin_bar = 'Groups';\n}", "public function setCategory($category)\n {\n if(strlen($category) <= 25 && strlen($category) > 0 && preg_match('#^[a-zA-Z- ]*$#', $category)) {\n $this->category = $category;\n }\n }", "private function createCategoryRules()\n {\n // Validation rules\n $this->form_validation->set_rules('category_title', 'Category Title', 'trim|required|max_length[255]');\n }", "abstract public function getPermissions();", "public function run()\n {\n $permissions = array(\n [\n 'name' => 'view_admin_dashboard',\n 'display_name' => 'View Admin Dashboard',\n 'description' => 'View Admin Dashboard',\n 'category' => 'general'\n ],\n [\n 'name' => 'manage_site_settings',\n 'display_name' => 'Manage Site Settings',\n 'description' => 'Manage Site Settings',\n 'category' => 'general'\n ],\n [\n 'name' => 'add_user_profile',\n 'display_name' => 'Add User Profile',\n 'description' => 'Add User Profile',\n 'category' => 'users'\n ],\n [\n 'name' => 'view_own_profile',\n 'display_name' => 'View Own Profile',\n 'description' => 'View Own Profile',\n 'category' => 'users'\n ],\n [\n 'name' => 'view_any_profile',\n 'display_name' => 'View Any Profile',\n 'description' => 'View Any Profile',\n 'category' => 'users'\n ],\n [\n 'name' => 'edit_own_profile',\n 'display_name' => 'Edit Own Profile',\n 'description' => 'Edit Own Profile',\n 'category' => 'users'\n ],\n [\n 'name' => 'edit_any_profile',\n 'display_name' => 'Edit Any Profile',\n 'description' => 'Edit Any Profile',\n 'category' => 'users'\n ],\n [\n 'name' => 'delete_own_profile',\n 'display_name' => 'Delete Own Profile',\n 'description' => 'Delete Own Profile',\n 'category' => 'users'\n ],\n [\n 'name' => 'delete_any_profile',\n 'display_name' => 'Delete Any Profile',\n 'description' => 'Delete Any Profile',\n 'category' => 'users'\n ],\n [\n 'name' => 'manage_users',\n 'display_name' => 'Manage Users',\n 'description' => 'Manage Users',\n 'category' => 'users'\n ],\n [\n 'name' => 'manage_roles',\n 'display_name' => 'Manage Roles',\n 'description' => 'Manage Roles',\n 'category' => 'roles'\n ],\n [\n 'name' => 'add_roles',\n 'display_name' => 'Add Roles',\n 'description' => 'Add Roles',\n 'category' => 'roles'\n ],\n [\n 'name' => 'view_roles',\n 'display_name' => 'View Roles',\n 'description' => 'View Roles',\n 'category' => 'roles'\n ],\n [\n 'name' => 'edit_roles',\n 'display_name' => 'Edit Roles',\n 'description' => 'Edit Roles',\n 'category' => 'roles'\n ],\n [\n 'name' => 'delete_roles',\n 'display_name' => 'Delete Roles',\n 'description' => 'Delete Roles',\n 'category' => 'roles'\n ],\n [\n 'name' => 'manage_permissions',\n 'display_name' => 'Manage Permissions',\n 'description' => 'Manage Permissions',\n 'category' => 'permissions'\n ],\n [\n 'name' => 'add_permissions',\n 'display_name' => 'Add Permissions',\n 'description' => 'Add Permissions',\n 'category' => 'permissions'\n ],\n [\n 'name' => 'view_permissions',\n 'display_name' => 'View Permissions',\n 'description' => 'View Permissions',\n 'category' => 'permissions'\n ],\n [\n 'name' => 'edit_permissions',\n 'display_name' => 'Edit Permissions',\n 'description' => 'Edit Permissions',\n 'category' => 'permissions'\n ],\n [\n 'name' => 'delete_permissions',\n 'display_name' => 'Delete Permissions',\n 'description' => 'Delete Permissions',\n 'category' => 'permissions'\n ],\n [\n 'name' => 'manage_restaurants',\n 'display_name' => 'Manage Permissions',\n 'description' => 'Manage Permissions',\n 'category' => 'restaurants'\n ],\n [\n 'name' => 'add_restaurants',\n 'display_name' => 'Add Permissions',\n 'description' => 'Add Permissions',\n 'category' => 'restaurants'\n ],\n [\n 'name' => 'view_restaurants',\n 'display_name' => 'View Permissions',\n 'description' => 'View Permissions',\n 'category' => 'restaurants'\n ],\n [\n 'name' => 'edit_restaurants',\n 'display_name' => 'Edit Permissions',\n 'description' => 'Edit Permissions',\n 'category' => 'restaurants'\n ],\n [\n 'name' => 'delete_restaurants',\n 'display_name' => 'Delete Restaurants',\n 'description' => 'Delete Restaurants',\n 'category' => 'restaurants'\n ],\n );\n\n\n foreach($permissions as $permission) {\n $category = PermissionCategory::all()->where('name', $permission['category'])->first();\n unset($permission['category']);\n $perm = new Permission($permission);\n $category->permissions()->save($perm);\n }\n }", "function pico_get_requests4category($mydirname, $cat_id = null)\n{\n\t(method_exists('MyTextSanitizer', 'sGetInstance') and $myts = &MyTextSanitizer::sGetInstance()) || $myts = &MyTextSanitizer::getInstance();\n\t$db = XoopsDatabaseFactory::getDatabaseConnection();\n\n\tinclude dirname(__DIR__) . '/include/configs_can_override.inc.php';\n\t$cat_options = [];\n\tforeach ($GLOBALS['xoopsModuleConfig'] as $key => $val) {\n\t\tif (empty($pico_configs_can_be_override[$key])) continue;\n\t\tforeach (explode(\"\\n\", @$_POST['cat_options']) as $line) {\n\t\t\tif (preg_match('/^' . $key . '\\:(.{1,100})$/', $line, $regs)) {\n\t\t\t\tswitch ($pico_configs_can_be_override[$key]) {\n\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t$cat_options[$key] = trim($regs[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'int':\n\t\t\t\t\t\t$cat_options[$key] = (int)$regs[1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bool':\n\t\t\t\t\t\t$cat_options[$key] = (int)$regs[1] > 0 ? 1 : 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (0 === $cat_id) {\n\t\t// top category\n\t\t$cat_vpath = null;\n\t\t$pid = 0xffff;\n\t} else {\n\t\t// normal category\n\t\t$cat_vpath = trim($myts->stripSlashesGPC(@$_POST['cat_vpath']));\n\t\t$pid = (int)@$_POST['pid'];\n\t\t// check $pid\n\t\tif ($pid) {\n\t\t\t$sql = 'SELECT * FROM ' . $db->prefix($mydirname . '_categories') . \" c WHERE c.cat_id=$pid\";\n\t\t\tif (!$crs = $db->query($sql)) die(_MD_PICO_ERR_SQL . __LINE__);\n\t\t\tif ($db->getRowsNum($crs) <= 0) die(_MD_PICO_ERR_READCATEGORY);\n\t\t}\n\t}\n\n\treturn [\n 'cat_title' => $myts->stripSlashesGPC(@$_POST['cat_title']),\n 'cat_desc' => $myts->stripSlashesGPC(@$_POST['cat_desc']),\n 'cat_weight' => (int)@$_POST['cat_weight'],\n 'cat_vpath' => $cat_vpath,\n 'pid' => $pid,\n 'cat_options' => pico_common_serialize($cat_options),\n ];\n}", "public function getCategory() {}", "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 add_membership_category()\n {\n $this->modify_object('Booking_membership_category');\n }", "public function registerPermissions()\n {\n return [\n 'xitara.nexus.mainmenu' => [\n 'tab' => 'Xitara Nexus',\n 'label' => 'xitara.nexus::permissions.mainmenu',\n ],\n 'xitara.nexus.settings' => [\n 'tab' => 'Xitara Nexus',\n 'label' => 'xitara.nexus::permissions.settings',\n ],\n 'xitara.nexus.dashboard' => [\n 'tab' => 'Xitara Nexus',\n 'label' => 'xitara.nexus::permissions.dashboard',\n ],\n 'xitara.nexus.menu' => [\n 'tab' => 'Xitara Nexus',\n 'label' => 'xitara.nexus::permissions.menu',\n ],\n 'xitara.nexus.custommenus' => [\n 'tab' => 'Xitara Nexus',\n 'label' => 'xitara.nexus::permissions.custommenus',\n ],\n ];\n }", "public function __construct($permissions)\n {\n $this->permissions = $permissions;\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 }", "private function seedPermissions()\n {\n (new \\Naraki\\Permission\\Models\\Permission())->insert([\n [\n 'entity_type_id' => 4,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::USERS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 4,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::GROUPS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 4,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::BLOG_POSTS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 4,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::MEDIA,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 4,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::SYSTEM,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 5,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::USERS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 5,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::GROUPS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 5,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::BLOG_POSTS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 5,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::MEDIA,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 5,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::SYSTEM,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 6,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::USERS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 6,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::BLOG_POSTS,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 6,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::MEDIA,\n 'permission_mask' => 0b1111\n ],\n [\n 'entity_type_id' => 6,\n 'entity_id' => \\Naraki\\Core\\Models\\Entity::SYSTEM,\n 'permission_mask' => 0b1111\n ],\n ]);\n\n }", "function feed_category_admin_access() {\r\n $arguments = func_get_args();\r\n $allow_public = array_shift($arguments);\r\n $feed_category = array_shift($arguments);\r\n foreach ($arguments as $access) {\r\n if (!user_access($access)) {\r\n return FALSE;\r\n }\r\n }\r\n return feed_category_access($allow_public, $feed_category);\r\n}", "public function givePermission($permissions);", "public function providePermissions() {\n return array(\n 'CMS_ACCESS_KapostBridgeLogViewer'=>array(\n 'name'=>_t(\n 'CMSMain.ACCESS',\n \"Access to '{title}' section\",\n \"Item in permission selection identifying the admin section. Example: Access to 'Files & Images'\",\n array('title'=>_t('KapostBridgeLogViewer.MENUTITLE', 'Kapost Bridge Logs'))\n ),\n 'category'=>_t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access')\n )\n );\n }", "public function create()\n {\n return view('permission_categories.create');\n }", "private function setParamsByCategory($categoryName){\n $category = $this->CC->getPublishedItem($categoryName);\n $category = $this->CC->parseItems($category['rows']);\n $params['category'] = (object) $category[0];\n \n if(!$category[0]->url || !$category[0]->uri){\n $this->CC->setCanonical($category[0]->_qname);\n }\n\n $results = $this->CC->getAssociation($category[0]->_qname,'ers:category-association');\n $params['items'] = $this->CC->parseItems($results['rows']);\n $items = $this->CC->parseItems($results['rows']);\n \n $sortedItems = $this->CC->sortItems($items);\n $params['items'] = (object) $sortedItems; \n return $params;\n }", "protected function generatePermissionsField()\n {\n return [\n 'permissions' => [\n 'tab' => 'backend::lang.user.permissions',\n 'type' => 'Modules\\Backend\\FormWidgets\\PermissionEditor',\n 'mode' => 'checkbox'\n ]\n ];\n }", "public function attachPermissions($permissions);", "public function SetPermissions ($permissions);", "public function test_admin_user_can_add_category_test()\n {\n $this->factory\n ->createCategory()\n ->createUser()\n ->signIn($this);\n\n $attribute = [\n 'name' => 'Test Category'\n ];\n\n $response = $this->post('api/category', $attribute);\n\n $response->assertOk();\n\n $this->assertEquals('Test Category', $response->getOriginalContent()['data']['category']['name']);\n }", "public function renderManageCategories()\n\t{\n\t\t// Check access\n\t\tif (! $this->user->isInRole('admin'))\n\t\t{\n\t\t\tthrow new ForbiddenRequestException('Nemáte oprávnění');\n\t\t}\n\t\t$database = $this->context->database;\n\t\t$this->template->categories = $database->table(\"WritingCategories\");\n\t}", "public function index()\n {\n $categoriess=User_category::all();\n\n if(Auth::user()->category_id ==11){\n $permissions=Permission::all();\n $categories=User_category::where('deleted',false)->get();\n }else{\n $permissions=Permission::where('permission_id','!=',3)->get();\n $categories=User_category::where('deleted',false)->where('user_category_id','!=',11)->get();\n }\n\n\n return view('pages.user_categorys')->with('categories',$categories)->with('permissions',$permissions)->with('categoriess',$categoriess);\n }", "public function providePermissions()\n {\n $category = EcommerceConfig::get(EcommerceRole::class, 'permission_category');\n $perms[EcommerceConfig::get(EcommerceRole::class, 'customer_permission_code')] = [\n 'name' => _t(\n 'EcommerceRole.CUSTOMER_PERMISSION_ANME',\n 'Customers'\n ),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.CUSTOMERS_HELP',\n 'Customer Permissions (usually very little)'\n ),\n 'sort' => 98,\n ];\n $perms[EcommerceConfig::get(EcommerceRole::class, 'admin_permission_code')] = [\n 'name' => EcommerceConfig::get(EcommerceRole::class, 'admin_role_title'),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.ADMINISTRATORS_HELP',\n 'Store Manager - can edit everything to do with the e-commerce application.'\n ),\n 'sort' => 99,\n ];\n $perms[EcommerceConfig::get(EcommerceRole::class, 'assistant_permission_code')] = [\n 'name' => EcommerceConfig::get(EcommerceRole::class, 'assistant_role_title'),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.STORE_ASSISTANTS_HELP',\n 'Store Assistant - can only view sales details and makes notes about orders'\n ),\n 'sort' => 100,\n ];\n $perms[EcommerceConfig::get(EcommerceRole::class, 'process_orders_permission_code')] = [\n 'name' => _t(\n 'EcommerceRole.PROCESS_ORDERS_PERMISSION_NAME',\n 'Can process orders'\n ),\n 'category' => $category,\n 'help' => _t(\n 'EcommerceRole.PROCESS_ORDERS_PERMISSION_HELP',\n 'Can the user progress orders through the order steps (e.g. dispatch orders)'\n ),\n 'sort' => 101,\n ];\n\n return $perms;\n }", "function addPermissions(& $obj, & $permissionsElement, $type, $permissionsArray) {\n\t\t$hasPerms = FALSE;\n\t\t$element =& $this->_document->createElement($type.'_permission');\n\t\t\n\t\tforeach ($permissionsArray as $editorName => $array) {\n\t\t\t\n\t\t\t// if they have permission here, create an entry for them.\n\t\t\tif ($this->hasPermission($permissionsArray, $editorName, $type) && !$obj->getField(\"l%$editorName%\".$type)) {\n\t\t\t\t$agent =& $this->_document->createElement('agent');\n\t\t\t\t$agent->appendChild($this->_document->createTextNode($editorName));\n\t\t\t\t$element->appendChild($agent);\n\t\t\t\t$hasPerms = TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($hasPerms)\n\t\t\t$permissionsElement->appendChild($element);\n\t\t\n\t\treturn $hasPerms;\n\t}", "public function getCategory();", "public function getCategory();", "private function getPermissionsPermissions()\n {\n return [\n [\n 'name' => 'Permissions - List all permissions',\n 'description' => 'Allow to list all permissions.',\n 'slug' => PermissionsPolicy::PERMISSION_LIST,\n ],\n [\n 'name' => 'Permissions - View a permission',\n 'description' => 'Allow to view the permission\\'s details.',\n 'slug' => PermissionsPolicy::PERMISSION_SHOW,\n ],\n [\n 'name' => 'Permissions - Update a permission',\n 'description' => 'Allow to update a permission.',\n 'slug' => PermissionsPolicy::PERMISSION_UPDATE,\n ],\n ];\n }", "public function getCategory(Request $request)\n {\n\t\t$user = null;\n\t\t$nope = false;\n\t\t$v = \"\";\n\t\t\n\t\t$signals = $this->helpers->signals;\n\t\t$plugins = $this->helpers->getPlugins();\n\t\t$permissions = $this->helpers->permissions;\n\t\t#$this->helpers->populateTips();\n $cpt = ['user','signals','plugins'];\n\t\t\t\t\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$user = Auth::user();\n\t\t\t\n\t\t\tif($this->helpers->isAdmin($user))\n\t\t\t{\n\t\t\t\t$hasPermission = $this->helpers->hasPermission($user->id,['view_tickets','edit_tickets']);\n\t\t\t\t#dd($hasPermission);\n\t\t\t\t$req = $request->all();\n\t\t\t\t\n\t\t\t\tif($hasPermission)\n\t\t\t\t{\n \n\t\t\t\tif(isset($req['xf']))\n\t\t\t\t{\n\t\t\t\t\t$v = \"category\";\n\t\t\t\t\t$c = $this->helpers->getCategory($req['xf']);\n\t\t\t\t\t#dd($c);\n\t\t\t\t\tif(count($c) < 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsession()->flash(\"validation-status-error\",\"ok\");\n\t\t\t\t\t\treturn redirect()->intended('categories');\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$categories = $this->helpers->getCategories();\n\t\t\t\t\t\tarray_push($cpt,'c'); \n\t\t\t\t\t\tarray_push($cpt,'categories'); \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsession()->flash(\"validation-status-error\",\"ok\");\n\t\t\t\t\treturn redirect()->intended('categories');\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsession()->flash(\"permissions-status-error\",\"ok\");\n\t\t\t\t\treturn redirect()->intended('/');\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAuth::logout();\n\t\t\t\t$u = url('/');\n\t\t\t\treturn redirect()->intended($u);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$v = \"login\";\n\t\t}\n\t\treturn view($v,compact($cpt));\n }", "function wpms_classifieds_build_permissions() {\n\tdo_action(\"wpms_build_premissions\");\n\tif (function_exists('get_role')) {\n\t\t$role = array(get_role('administrator'), get_role('editor'), get_role('author'));\n\t\tforeach ($role as $r) {\n\t\t\tif ($r != null && !$role->has_cap('use_accueil')) {\n\t\t\t\t$r->add_cap('use_accueil');\n\t\t\t}\n\t\t\tif ($r != null && !$role->has_cap('admin_accueil')) {\n\t\t\t\t$r->add_cap('admin_accueil');\n\t\t\t}\n\t\t\tunset($r);\n\t\t}\n\t}\n}", "function permission_group_list($category, $offset, $limit, $phrase)\n\t{\n\t\tlog_message('debug', '_setting/permission_group_list');\n\t\tlog_message('debug', '_setting/permission_group_list:: [1] category='.$category.' offset='.$offset.' limit='.$limit.' phrase='.$phrase);\n\n\t\t$values['phrase_condition'] = !empty($phrase)? \" AND G.name LIKE '%\".htmlentities($phrase, ENT_QUOTES).\"%'\": '';\n\t\t$values['category_condition'] = $category != 'all'? \" AND G.group_category ='\".$category.\"' \": \"\";\n\t\t$values['limit_text'] = \" LIMIT \".$offset.\",\".$limit.\" \";\n\n\t\t$result = server_curl(IAM_SERVER_URL, array('__action'=>'get_list', 'query'=>'get_permission_group_list', 'variables'=>$values));\n\t\tlog_message('debug', '_setting/permission_group_list:: [2] result='.json_encode($result));\n\n\t\treturn $result;\n\t}", "function lm_save_category() {\n\t@copy(LM_CDATA, LM_CBACKUP);\n\t$id = isset($_POST['category-id']) ? intval($_POST['category-id']) : null;\n\t$cid = isset($_POST['category-cid']) ? intval($_POST['category-cid']) : time();\n\t$arr = array('cid'=>$cid, 'name'=>safe_slash_html($_POST['category-name']));\n\tif (function_exists('return_i18n_languages')) {\n\t\tforeach(return_i18n_languages() as $lang) {\n\t\t\tif ($lang != return_i18n_default_language()) {\n\t\t\t\t$arr['name_'.$lang] = safe_slash_html($_POST['category-name_'.$lang]);\n\t\t\t}\n\t\t}\n\t}\n\t$categories = lm_get_categories();\n\tif (isset($id))\n\t\t$categories[$id] = $arr;\n\telse\n\t\t$categories[] = $arr;\n\tif (lm_c_to_xml($categories))\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/SUCCESS_SAVE'), true, false, true);\n\telse\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/ERROR_SAVE'), false);\n}", "protected function normalizePermissions($permissions)\n {\n $permissions = substr($permissions, 1);\n\n // map the string rights to the numeric counterparts\n $map = array('-' => '0', 'r' => '4', 'w' => '2', 'x' => '1');\n $permissions = strtr($permissions, $map);\n\n // split up the permission groups\n $parts = str_split($permissions, 3);\n\n // convert the groups\n $mapper = function ($part) {\n return array_sum(str_split($part));\n };\n\n // get the sum of the groups\n return array_sum(array_map($mapper, $parts));\n }", "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 }", "private function filterByPermission(){\n\n }", "public function getCategoryList()\n {\n global $user;\n\n $returned=array();\n\n if($this->options['galleryRoot'])\n {\n $startLevel=1;\n }\n else\n {\n $startLevel=0;\n }\n\n $sql=\"SELECT DISTINCT pct.id, pct.name, pct.global_rank AS `rank`, pct.status\n FROM \".CATEGORIES_TABLE.\" pct \";\n\n switch($this->options['filter'])\n {\n case self::FILTER_PUBLIC :\n $sql.=\" WHERE pct.status = 'public' \";\n break;\n case self::FILTER_ACCESSIBLE :\n if(!is_admin())\n {\n $sql.=\" JOIN \".USER_CACHE_CATEGORIES_TABLE.\" pucc\n ON (pucc.cat_id = pct.id) AND pucc.user_id='\".$user['id'].\"' \";\n }\n else\n {\n $sql.=\" JOIN (\n SELECT DISTINCT pgat.cat_id AS catId FROM \".GROUP_ACCESS_TABLE.\" pgat\n UNION DISTINCT\n SELECT DISTINCT puat.cat_id AS catId FROM \".USER_ACCESS_TABLE.\" puat\n UNION DISTINCT\n SELECT DISTINCT pct2.id AS catId FROM \".CATEGORIES_TABLE.\" pct2 WHERE pct2.status='public'\n ) pat\n ON pat.catId = pct.id \";\n }\n\n break;\n }\n $sql.=\"ORDER BY global_rank;\";\n\n $result=pwg_query($sql);\n if($result)\n {\n while($row=pwg_db_fetch_assoc($result))\n {\n $row['level']=$startLevel+substr_count($row['rank'], '.');\n\n /* rank is in formated without leading zero, giving bad order\n * 1\n * 1.10\n * 1.11\n * 1.2\n * 1.3\n * ....\n *\n * this loop cp,vert all sub rank in four 0 format, allowing to order\n * categories easily\n * 0001\n * 0001.0010\n * 0001.0011\n * 0001.0002\n * 0001.0003\n */\n $row['rank']=explode('.', $row['rank']);\n foreach($row['rank'] as $key=>$rank)\n {\n $row['rank'][$key]=str_pad($rank, 4, '0', STR_PAD_LEFT);\n }\n $row['rank']=implode('.', $row['rank']);\n\n $row['name']=GPCCore::getUserLanguageDesc($row['name']);\n\n $returned[]=$row;\n }\n }\n\n if($this->options['galleryRoot'])\n {\n $returned[]=array(\n 'id' => 0,\n 'name' => l10n('All the gallery'),\n 'rank' => '0000',\n 'level' => 0,\n 'status' => 'public',\n 'childs' => null\n );\n }\n\n usort($returned, array(&$this, 'compareCat'));\n\n if($this->options['tree'])\n {\n $index=0;\n $returned=$this->buildSubLevel($returned, $index);\n }\n else\n {\n //check if cats have childs & remove rank (enlight the response)\n $prevLevel=-1;\n for($i=count($returned)-1;$i>=0;$i--)\n {\n unset($returned[$i]['rank']);\n if($returned[$i]['status']=='private')\n {\n $returned[$i]['status']='0';\n }\n else\n {\n $returned[$i]['status']='1';\n }\n\n if($returned[$i]['level']>=$prevLevel)\n {\n $returned[$i]['childs']=false;\n }\n else\n {\n $returned[$i]['childs']=true;\n }\n $prevLevel=$returned[$i]['level'];\n }\n }\n\n return($returned);\n }", "public function run()\n {\n \tDB::table(\"permissions\")->truncate();\n \t\n DB::table(\"permissions\")->insert( [\n\t\t'id'=>1,\n\t\t'key'=>'browse_admin',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>2,\n\t\t'key'=>'browse_bread',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>3,\n\t\t'key'=>'browse_database',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>4,\n\t\t'key'=>'browse_media',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>5,\n\t\t'key'=>'browse_compass',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>6,\n\t\t'key'=>'browse_menus',\n\t\t'table_name'=>'menus',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>7,\n\t\t'key'=>'read_menus',\n\t\t'table_name'=>'menus',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>8,\n\t\t'key'=>'edit_menus',\n\t\t'table_name'=>'menus',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>9,\n\t\t'key'=>'add_menus',\n\t\t'table_name'=>'menus',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>10,\n\t\t'key'=>'delete_menus',\n\t\t'table_name'=>'menus',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>11,\n\t\t'key'=>'browse_roles',\n\t\t'table_name'=>'roles',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>12,\n\t\t'key'=>'read_roles',\n\t\t'table_name'=>'roles',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>13,\n\t\t'key'=>'edit_roles',\n\t\t'table_name'=>'roles',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>14,\n\t\t'key'=>'add_roles',\n\t\t'table_name'=>'roles',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>15,\n\t\t'key'=>'delete_roles',\n\t\t'table_name'=>'roles',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>16,\n\t\t'key'=>'browse_users',\n\t\t'table_name'=>'users',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>17,\n\t\t'key'=>'read_users',\n\t\t'table_name'=>'users',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>18,\n\t\t'key'=>'edit_users',\n\t\t'table_name'=>'users',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>19,\n\t\t'key'=>'add_users',\n\t\t'table_name'=>'users',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>20,\n\t\t'key'=>'delete_users',\n\t\t'table_name'=>'users',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>21,\n\t\t'key'=>'browse_settings',\n\t\t'table_name'=>'settings',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>22,\n\t\t'key'=>'read_settings',\n\t\t'table_name'=>'settings',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>23,\n\t\t'key'=>'edit_settings',\n\t\t'table_name'=>'settings',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>24,\n\t\t'key'=>'add_settings',\n\t\t'table_name'=>'settings',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>25,\n\t\t'key'=>'delete_settings',\n\t\t'table_name'=>'settings',\n\t\t'created_at'=>'2019-02-11 14:24:41',\n\t\t'updated_at'=>'2019-02-11 14:24:41'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>26,\n\t\t'key'=>'browse_hooks',\n\t\t'table_name'=>NULL,\n\t\t'created_at'=>'2019-02-11 14:24:42',\n\t\t'updated_at'=>'2019-02-11 14:24:42'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>27,\n\t\t'key'=>'browse_articles',\n\t\t'table_name'=>'articles',\n\t\t'created_at'=>'2019-02-11 14:49:57',\n\t\t'updated_at'=>'2019-02-11 14:49:57'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>28,\n\t\t'key'=>'read_articles',\n\t\t'table_name'=>'articles',\n\t\t'created_at'=>'2019-02-11 14:49:57',\n\t\t'updated_at'=>'2019-02-11 14:49:57'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>29,\n\t\t'key'=>'edit_articles',\n\t\t'table_name'=>'articles',\n\t\t'created_at'=>'2019-02-11 14:49:57',\n\t\t'updated_at'=>'2019-02-11 14:49:57'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>30,\n\t\t'key'=>'add_articles',\n\t\t'table_name'=>'articles',\n\t\t'created_at'=>'2019-02-11 14:49:57',\n\t\t'updated_at'=>'2019-02-11 14:49:57'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>31,\n\t\t'key'=>'delete_articles',\n\t\t'table_name'=>'articles',\n\t\t'created_at'=>'2019-02-11 14:49:57',\n\t\t'updated_at'=>'2019-02-11 14:49:57'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>32,\n\t\t'key'=>'browse_cgys',\n\t\t'table_name'=>'cgys',\n\t\t'created_at'=>'2019-02-11 14:50:46',\n\t\t'updated_at'=>'2019-02-11 14:50:46'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>33,\n\t\t'key'=>'read_cgys',\n\t\t'table_name'=>'cgys',\n\t\t'created_at'=>'2019-02-11 14:50:46',\n\t\t'updated_at'=>'2019-02-11 14:50:46'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>34,\n\t\t'key'=>'edit_cgys',\n\t\t'table_name'=>'cgys',\n\t\t'created_at'=>'2019-02-11 14:50:46',\n\t\t'updated_at'=>'2019-02-11 14:50:46'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>35,\n\t\t'key'=>'add_cgys',\n\t\t'table_name'=>'cgys',\n\t\t'created_at'=>'2019-02-11 14:50:46',\n\t\t'updated_at'=>'2019-02-11 14:50:46'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>36,\n\t\t'key'=>'delete_cgys',\n\t\t'table_name'=>'cgys',\n\t\t'created_at'=>'2019-02-11 14:50:46',\n\t\t'updated_at'=>'2019-02-11 14:50:46'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>37,\n\t\t'key'=>'browse_comments',\n\t\t'table_name'=>'comments',\n\t\t'created_at'=>'2019-02-11 14:52:14',\n\t\t'updated_at'=>'2019-02-11 14:52:14'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>38,\n\t\t'key'=>'read_comments',\n\t\t'table_name'=>'comments',\n\t\t'created_at'=>'2019-02-11 14:52:14',\n\t\t'updated_at'=>'2019-02-11 14:52:14'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>39,\n\t\t'key'=>'edit_comments',\n\t\t'table_name'=>'comments',\n\t\t'created_at'=>'2019-02-11 14:52:14',\n\t\t'updated_at'=>'2019-02-11 14:52:14'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>40,\n\t\t'key'=>'add_comments',\n\t\t'table_name'=>'comments',\n\t\t'created_at'=>'2019-02-11 14:52:14',\n\t\t'updated_at'=>'2019-02-11 14:52:14'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>41,\n\t\t'key'=>'delete_comments',\n\t\t'table_name'=>'comments',\n\t\t'created_at'=>'2019-02-11 14:52:14',\n\t\t'updated_at'=>'2019-02-11 14:52:14'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>42,\n\t\t'key'=>'browse_contacts',\n\t\t'table_name'=>'contacts',\n\t\t'created_at'=>'2019-02-11 14:53:06',\n\t\t'updated_at'=>'2019-02-11 14:53:06'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>43,\n\t\t'key'=>'read_contacts',\n\t\t'table_name'=>'contacts',\n\t\t'created_at'=>'2019-02-11 14:53:06',\n\t\t'updated_at'=>'2019-02-11 14:53:06'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>44,\n\t\t'key'=>'edit_contacts',\n\t\t'table_name'=>'contacts',\n\t\t'created_at'=>'2019-02-11 14:53:06',\n\t\t'updated_at'=>'2019-02-11 14:53:06'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>45,\n\t\t'key'=>'add_contacts',\n\t\t'table_name'=>'contacts',\n\t\t'created_at'=>'2019-02-11 14:53:06',\n\t\t'updated_at'=>'2019-02-11 14:53:06'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>46,\n\t\t'key'=>'delete_contacts',\n\t\t'table_name'=>'contacts',\n\t\t'created_at'=>'2019-02-11 14:53:06',\n\t\t'updated_at'=>'2019-02-11 14:53:06'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>47,\n\t\t'key'=>'browse_elements',\n\t\t'table_name'=>'elements',\n\t\t'created_at'=>'2019-02-11 14:57:08',\n\t\t'updated_at'=>'2019-02-11 14:57:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>48,\n\t\t'key'=>'read_elements',\n\t\t'table_name'=>'elements',\n\t\t'created_at'=>'2019-02-11 14:57:08',\n\t\t'updated_at'=>'2019-02-11 14:57:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>49,\n\t\t'key'=>'edit_elements',\n\t\t'table_name'=>'elements',\n\t\t'created_at'=>'2019-02-11 14:57:08',\n\t\t'updated_at'=>'2019-02-11 14:57:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>50,\n\t\t'key'=>'add_elements',\n\t\t'table_name'=>'elements',\n\t\t'created_at'=>'2019-02-11 14:57:08',\n\t\t'updated_at'=>'2019-02-11 14:57:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>51,\n\t\t'key'=>'delete_elements',\n\t\t'table_name'=>'elements',\n\t\t'created_at'=>'2019-02-11 14:57:08',\n\t\t'updated_at'=>'2019-02-11 14:57:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>52,\n\t\t'key'=>'browse_medias',\n\t\t'table_name'=>'medias',\n\t\t'created_at'=>'2019-02-11 14:57:58',\n\t\t'updated_at'=>'2019-02-11 14:57:58'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>53,\n\t\t'key'=>'read_medias',\n\t\t'table_name'=>'medias',\n\t\t'created_at'=>'2019-02-11 14:57:58',\n\t\t'updated_at'=>'2019-02-11 14:57:58'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>54,\n\t\t'key'=>'edit_medias',\n\t\t'table_name'=>'medias',\n\t\t'created_at'=>'2019-02-11 14:57:58',\n\t\t'updated_at'=>'2019-02-11 14:57:58'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>55,\n\t\t'key'=>'add_medias',\n\t\t'table_name'=>'medias',\n\t\t'created_at'=>'2019-02-11 14:57:58',\n\t\t'updated_at'=>'2019-02-11 14:57:58'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>56,\n\t\t'key'=>'delete_medias',\n\t\t'table_name'=>'medias',\n\t\t'created_at'=>'2019-02-11 14:57:58',\n\t\t'updated_at'=>'2019-02-11 14:57:58'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>57,\n\t\t'key'=>'browse_partners',\n\t\t'table_name'=>'partners',\n\t\t'created_at'=>'2019-02-11 15:01:08',\n\t\t'updated_at'=>'2019-02-11 15:01:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>58,\n\t\t'key'=>'read_partners',\n\t\t'table_name'=>'partners',\n\t\t'created_at'=>'2019-02-11 15:01:08',\n\t\t'updated_at'=>'2019-02-11 15:01:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>59,\n\t\t'key'=>'edit_partners',\n\t\t'table_name'=>'partners',\n\t\t'created_at'=>'2019-02-11 15:01:08',\n\t\t'updated_at'=>'2019-02-11 15:01:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>60,\n\t\t'key'=>'add_partners',\n\t\t'table_name'=>'partners',\n\t\t'created_at'=>'2019-02-11 15:01:08',\n\t\t'updated_at'=>'2019-02-11 15:01:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>61,\n\t\t'key'=>'delete_partners',\n\t\t'table_name'=>'partners',\n\t\t'created_at'=>'2019-02-11 15:01:08',\n\t\t'updated_at'=>'2019-02-11 15:01:08'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>62,\n\t\t'key'=>'browse_serials',\n\t\t'table_name'=>'serials',\n\t\t'created_at'=>'2019-02-11 15:03:26',\n\t\t'updated_at'=>'2019-02-11 15:03:26'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>63,\n\t\t'key'=>'read_serials',\n\t\t'table_name'=>'serials',\n\t\t'created_at'=>'2019-02-11 15:03:26',\n\t\t'updated_at'=>'2019-02-11 15:03:26'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>64,\n\t\t'key'=>'edit_serials',\n\t\t'table_name'=>'serials',\n\t\t'created_at'=>'2019-02-11 15:03:26',\n\t\t'updated_at'=>'2019-02-11 15:03:26'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>65,\n\t\t'key'=>'add_serials',\n\t\t'table_name'=>'serials',\n\t\t'created_at'=>'2019-02-11 15:03:26',\n\t\t'updated_at'=>'2019-02-11 15:03:26'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>66,\n\t\t'key'=>'delete_serials',\n\t\t'table_name'=>'serials',\n\t\t'created_at'=>'2019-02-11 15:03:26',\n\t\t'updated_at'=>'2019-02-11 15:03:26'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>67,\n\t\t'key'=>'browse_tags',\n\t\t'table_name'=>'tags',\n\t\t'created_at'=>'2019-02-11 15:04:01',\n\t\t'updated_at'=>'2019-02-11 15:04:01'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>68,\n\t\t'key'=>'read_tags',\n\t\t'table_name'=>'tags',\n\t\t'created_at'=>'2019-02-11 15:04:01',\n\t\t'updated_at'=>'2019-02-11 15:04:01'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>69,\n\t\t'key'=>'edit_tags',\n\t\t'table_name'=>'tags',\n\t\t'created_at'=>'2019-02-11 15:04:01',\n\t\t'updated_at'=>'2019-02-11 15:04:01'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>70,\n\t\t'key'=>'add_tags',\n\t\t'table_name'=>'tags',\n\t\t'created_at'=>'2019-02-11 15:04:01',\n\t\t'updated_at'=>'2019-02-11 15:04:01'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>71,\n\t\t'key'=>'delete_tags',\n\t\t'table_name'=>'tags',\n\t\t'created_at'=>'2019-02-11 15:04:01',\n\t\t'updated_at'=>'2019-02-11 15:04:01'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>72,\n\t\t'key'=>'browse_orders',\n\t\t'table_name'=>'orders',\n\t\t'created_at'=>'2019-02-16 13:38:07',\n\t\t'updated_at'=>'2019-02-16 13:38:07'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>73,\n\t\t'key'=>'read_orders',\n\t\t'table_name'=>'orders',\n\t\t'created_at'=>'2019-02-16 13:38:07',\n\t\t'updated_at'=>'2019-02-16 13:38:07'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>74,\n\t\t'key'=>'edit_orders',\n\t\t'table_name'=>'orders',\n\t\t'created_at'=>'2019-02-16 13:38:07',\n\t\t'updated_at'=>'2019-02-16 13:38:07'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>75,\n\t\t'key'=>'add_orders',\n\t\t'table_name'=>'orders',\n\t\t'created_at'=>'2019-02-16 13:38:07',\n\t\t'updated_at'=>'2019-02-16 13:38:07'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>76,\n\t\t'key'=>'delete_orders',\n\t\t'table_name'=>'orders',\n\t\t'created_at'=>'2019-02-16 13:38:07',\n\t\t'updated_at'=>'2019-02-16 13:38:07'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>77,\n\t\t'key'=>'browse_consolidations',\n\t\t'table_name'=>'consolidations',\n\t\t'created_at'=>'2019-02-23 06:15:34',\n\t\t'updated_at'=>'2019-02-23 06:15:34'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>78,\n\t\t'key'=>'read_consolidations',\n\t\t'table_name'=>'consolidations',\n\t\t'created_at'=>'2019-02-23 06:15:34',\n\t\t'updated_at'=>'2019-02-23 06:15:34'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>79,\n\t\t'key'=>'edit_consolidations',\n\t\t'table_name'=>'consolidations',\n\t\t'created_at'=>'2019-02-23 06:15:34',\n\t\t'updated_at'=>'2019-02-23 06:15:34'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>80,\n\t\t'key'=>'add_consolidations',\n\t\t'table_name'=>'consolidations',\n\t\t'created_at'=>'2019-02-23 06:15:34',\n\t\t'updated_at'=>'2019-02-23 06:15:34'\n\t\t] );\n\n\n\t\t\t\t\t\n\t\tDB::table(\"permissions\")->insert( [\n\t\t'id'=>81,\n\t\t'key'=>'delete_consolidations',\n\t\t'table_name'=>'consolidations',\n\t\t'created_at'=>'2019-02-23 06:15:34',\n\t\t'updated_at'=>'2019-02-23 06:15:34'\n\t\t] );\n\n\n }", "public function authorize()\n {\n return auth()->user()->can('update', [Category::class, request('category')]);\n }", "public function savePermissions($inputPermissions);", "public function addCathegory($values)\n\t{\n\t\treturn $this->getTable('kategoria')->insert(array(\n\t\t\t'Nazov' => $values->nazov,\n\t\t));\n\t}", "function svbk_policy_block_category( $categories, $post ) {\n\treturn array_merge(\n\t\t$categories,\n\t\tarray(\n\t\t\tarray(\n\t\t\t\t'slug' => 'policy',\n\t\t\t\t'title' => __( 'Policy', 'svbk-wp-policy' ),\n\t\t\t),\n\t\t)\n\t);\n}", "public function getPermissions() {}", "public function getPermissions() {}", "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'ams.core.some_permission' => [\n 'tab' => 'Core',\n 'label' => 'Some permission'\n ],\n ];\n }", "public function addPermission($idGroup, $permissions) {\n foreach($permissions as $permission){\n $idFunction = $permission[\"idFunction\"];\n $idAction = $permission[\"idAction\"];\n $sql = \"INSERT INTO `SM_PERMISSION` (sm_idGroup, sm_idFunction, sm_idAction) VALUES ('$idGroup', '$idFunction', '$idAction')\";\n if (!($resultado = $this->mysqli->query($sql))) {\n return 'Error in the query on the database';\n }\n }\n return true;\n }", "public function testCategoryMap()\n {\n $this->assertEquals(Record::mapCategory('Labor'), 'labor');\n $this->assertEquals(Record::mapCategory('工具器具備品'), 'tools_equipment');\n $this->assertEquals(Record::mapCategory('広告宣伝費'), 'promotion');\n $this->assertEquals(Record::mapCategory('販売キャンペーン'), 'promotion');\n $this->assertEquals(Record::mapCategory('SEO'), 'promotion');\n $this->assertEquals(Record::mapCategory('SEO', true), 'seo');\n $this->assertEquals(Record::mapCategory('地代家賃'), 'rent');\n $this->assertEquals(Record::mapCategory('packing & delivery expenses'), 'delivery');\n $this->assertEquals(Record::mapCategory('Revenue'), 'revenue');\n $this->assertEquals(Record::mapCategory('収益'), 'revenue');\n $this->assertEquals(Record::mapCategory('水道光熱費'), 'utility');\n $this->assertEquals(Record::mapCategory('法定福利費'), 'labor');\n $this->assertEquals(Record::mapCategory('法定福利費', true), 'welfare');\n }", "public function getAccessibleCategories(): array\n {\n $isAllowedToSeeResourceStmt = $this->app->repositories->lockedResourceRepository->buildIsLockForRecordTypeAndTargetStatement();\n $haveCategoriesNotesStmt = $this->app->repositories->myNotesCategoriesRepository->buildHaveCategoriesNotesStatement();\n\n $allCategories = $this->app->repositories->myNotesCategoriesRepository->getCategories();\n $accessibleCategories = [];\n\n foreach ($allCategories as $key => $result) {\n $categoryId = $result[self::CATEGORY_ID];\n\n // check if this category is accessible\n if( !$this->myNotesController->hasCategoryFamilyVisibleNotes($categoryId, $isAllowedToSeeResourceStmt, $haveCategoriesNotesStmt)){\n unset($allCategories[$key]);\n continue;\n }\n\n // check if category is locked (parent)\n if( !$this->lockedResourceController->isAllowedToSeeResource($categoryId, LockedResource::TYPE_ENTITY, ModulesController::MODULE_ENTITY_NOTES_CATEGORY, false, $isAllowedToSeeResourceStmt) ){\n unset($allCategories[$key]);\n continue;\n }\n\n $accessibleCategories[$categoryId] = $result;\n\n if (!is_null($allCategories[$key][self::CHILDRENS_ID])) {\n $accessibleCategories[$categoryId][self::CHILDRENS_ID] = explode(',', $allCategories[$key][self::CHILDRENS_ID]);\n }\n\n // check if children categories are accessible\n if( !array_key_exists(self::CHILDRENS_ID, $accessibleCategories[$categoryId]) ) {\n continue;\n }\n\n $childrenIds = $accessibleCategories[$categoryId][self::CHILDRENS_ID];\n if( is_null($childrenIds) ){\n continue;\n }\n\n foreach( $childrenIds as $index => $childId ){\n $isChildAccessible = true;\n if(\n !$this->myNotesController->hasCategoryFamilyVisibleNotes($childId, $isAllowedToSeeResourceStmt, $haveCategoriesNotesStmt)\n || !$this->lockedResourceController->isAllowedToSeeResource($childId, LockedResource::TYPE_ENTITY, ModulesController::MODULE_ENTITY_NOTES_CATEGORY, false, $isAllowedToSeeResourceStmt)\n ){\n $isChildAccessible = false;\n }\n\n if( !$isChildAccessible ){\n unset($accessibleCategories[$categoryId][self::CHILDRENS_ID][$index]);\n }\n }\n }\n\n // sort alphabetically by category name\n uasort($accessibleCategories, fn(array $currentCategory, array $nextCategory) =>\n $currentCategory[self::CATEGORY] >= $nextCategory[self::CATEGORY]\n );\n return $accessibleCategories;\n }" ]
[ "0.5981092", "0.597878", "0.58900464", "0.5832863", "0.5684485", "0.56338066", "0.5620916", "0.555938", "0.5548968", "0.5526383", "0.53283894", "0.5316216", "0.53121877", "0.530834", "0.53014857", "0.5289787", "0.52774435", "0.5274407", "0.5219961", "0.5214245", "0.52108973", "0.52048737", "0.5199108", "0.5185846", "0.5170143", "0.5170143", "0.5170143", "0.5170143", "0.5170143", "0.5162537", "0.5159717", "0.51593417", "0.51591635", "0.51465964", "0.51459396", "0.514503", "0.51320016", "0.5127192", "0.51182216", "0.51103085", "0.5107618", "0.51018405", "0.50955516", "0.5087383", "0.50775707", "0.5068251", "0.50609004", "0.5056981", "0.5049205", "0.5009079", "0.5007659", "0.50029796", "0.49997264", "0.49863657", "0.4985338", "0.49746656", "0.4974133", "0.49740276", "0.49726802", "0.4964194", "0.49576348", "0.49549013", "0.4951228", "0.49510232", "0.4949269", "0.49418068", "0.49383903", "0.4938206", "0.49366912", "0.49338377", "0.49319053", "0.49286014", "0.4926678", "0.492601", "0.49257365", "0.49163386", "0.4915989", "0.49109513", "0.49107155", "0.49107155", "0.49062157", "0.4906169", "0.4903461", "0.4903375", "0.48972455", "0.48949015", "0.48947406", "0.4887399", "0.48850793", "0.48802242", "0.48733664", "0.48719406", "0.48658597", "0.48653117", "0.48604324", "0.48604324", "0.48548874", "0.4853489", "0.48520878", "0.48498216" ]
0.7674575
0
Checks the widgets array types and return an array of widget arrays for [estate, company, site]
public static function reArrangeWidgets($widgetsWithRoleWidget) { $resultWidgets = []; // Temporary order $tempCount = 1; foreach ($widgetsWithRoleWidget as $widgetWithRoleWidget) { // If it has a role_widget , store the order otherwise increase the tempCount if(!empty($widgetWithRoleWidget['role_widget'])) { $count = 0; foreach($widgetWithRoleWidget['role_widget'] as $roleWidget) { $widgetOrder = $roleWidget['order']; $count++; $resultWidgets[$widgetOrder] = $widgetWithRoleWidget; } } else { // Nothing in the roleWidget table, so do a tempCounter $widgetOrder = 'temporder'.$tempCount++; $resultWidgets[$widgetOrder] = $widgetWithRoleWidget; } } // Arranging the arrays ksort($resultWidgets); $result = []; array_walk($resultWidgets, function(&$item, $key ) use (&$result){ $result[$item['title']] = $item; }); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWidgetsByInputType() {\n\t\t$types = array();\n\t\tif ($this->hasParameter('widgets')) {\n\t\t\tforeach ($this->getParameter('widgets') as $name => $widget) {\n\t\t\t\t$inputs = $widget['input'];\n\t\t\t\tforeach($inputs as $input) {\n\t\t\t\t\tif ($input == 'all') {\n\t\t\t\t\t\t$list = ['select', 'checkbox', 'color', 'date', 'datetime-local', 'email', 'file', 'hidden', 'image', 'month', 'number', 'password', 'radio', 'range', 'search', 'tel', 'text', 'time', 'url', 'week'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$list = [$input];\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($list as $type) {\n\t\t\t\t\t\tif (! isset($types[$type])) {\n\t\t\t\t\t\t\t$types[$type] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$types[$type][] = $name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $types;\n\t}", "public function getWidgetsByType() {\n\t\t$types = array();\n\t\tif ($this->hasParameter('widgets')) {\n\t\t\tforeach ($this->getParameter('widgets') as $name => $widget) {\n\t\t\t\t$targets = $widget['target'];\n\t\t\t\tforeach($targets as $target) {\n\t\t\t\t\tif ($target == 'all') {\n\t\t\t\t\t\t$list = Data::TYPES;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$list = [$target];\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($list as $type) {\n\t\t\t\t\t\tif (! isset($types[$type])) {\n\t\t\t\t\t\t\t$types[$type] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$types[$type][] = $name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $types;\n\t}", "function getWidgets() {\n \t$returnArray = array();\n \tforeach($this->_widgetRegistry as $name => $item) {\n \t\t$returnArray[] = array('name' => $name, 'description' => $item['description']);\n \t}\n \treturn $returnArray;\n }", "public static function get_all_widgets() {\r\n\t\t$ret = array(\r\n\t\t\tself::WIDGET_ACCORDION,\r\n\t\t\tself::WIDGET_DATEPICKER,\r\n\t\t\tself::WIDGET_DIALOG,\r\n\t\t\tself::WIDGET_PROGRESSBAR,\r\n\t\t\tself::WIDGET_SLIDER,\r\n\t\t\tself::WIDGET_TABS,\r\n\t\t\tself::WIDGET_AUTOCOMPLETE\r\n\t\t);\r\n\t\tif (self::is_version_1_8_or_higher()) {\r\n\t\t\t$ret[] = self::WIDGET_BUTTON; \r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "public static function getWidgets(): ?array\n {\n return collect(Filament::getWidgets())\n ->filter(function ($widget) {\n if (Utils::isGeneralExcludeEnabled()) {\n return ! in_array(Str::afterLast($widget, '\\\\'), Utils::getExcludedWidgets());\n }\n\n return true;\n })\n ->reduce(function ($widgets, $widget) {\n $prepend = Str::of(Utils::getWidgetPermissionPrefix())->append('_');\n $name = Str::of(class_basename($widget))\n ->prepend($prepend);\n\n $widgets[\"{$name}\"] = \"{$name}\";\n\n return $widgets;\n }, collect())\n ->toArray();\n }", "protected function getAvailableWidgetList() {\n\t\t$widgets = (array)$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['geckoboard']['widgets'];\n\n\t\t$availableWidgets = array();\n\t\tforeach ($widgets as $widget) {\n\t\t\t//todo: check if there are extension dependencies for the widget\n\t\t\t$availableWidgets[$widget] = $this->language->sL(\n\t\t\t\t'LLL:EXT:geckoboard/Resources/Private/Language/locallang_be.xml:label.' . $widget\n\t\t\t);\n\n\t\t\tif ($availableWidgets[$widget] == '') {\n\t\t\t\t$availableWidgets[$widget] = $widget;\n\t\t\t}\n\t\t}\n\n\t\treturn $availableWidgets;\n\t}", "public function getWidgets(){\n $return = [];\n foreach ($this->widgets as $key => $value) {\n $namespance = str_replace([base_path(\"modules\"),base_path(\"contents/templates\"),'.php','/'], ['Modules','Themes','','\\\\'], $value);\n $namespance = str_replace('Themes\\default', 'Themes\\_default', $namespance);\n if(class_exists($namespance) && method_exists($namespance, \"register\")){\n $paths = str_replace(base_path().'/','',$value);\n $ado = [];\n $ado = with(new $namespance)->register();\n $ado[\"paths\"] = $paths;\n $return[$namespance] = $ado;\n }\n }\n return $return;\n }", "public function getWidgets()\n\t\t{\n\t\t\tif(!isset($this->id))\n\t\t\t\treturn FALSE;\n\t\t\t\n\t\t\tglobal $conn;\n\t\t\tglobal $SERVICENTER_WIDGETS;\n\t\t\t\n\t\t\t$g = $conn->prepare(\"SELECT position,widget FROM ServiCenter_Workspace_Widget WHERE workspace = ?\");\n\t\t\t$g->bindParam(1, $this->id);\n\t\t\t$g->execute();\n\t\t\t\n\t\t\t$widgets = [];\n\t\t\t\n\t\t\tforeach($g->fetchAll() as $widgetData)\n\t\t\t{\n\t\t\t\tif(isset($SERVICENTER_WIDGETS[$widgetData['widget']]))\n\t\t\t\t{\n\t\t\t\t\t$widgets[] = [$widgetData['position'], $SERVICENTER_WIDGETS[$widgetData['widget']][0]];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $widgets;\n\t\t}", "public function get_widgets() {\n\n $sidebar_name = sidebar\\Sidebar::get_sidebar_name();\n \n global $wp_registered_widgets;\n\n $sidebars_widgets = get_option( 'sidebars_widgets' );\n\n $sidebar_widgets = [];\n if ( array_key_exists( $sidebar_name, $sidebars_widgets ) ) {\n\n foreach( $sidebars_widgets[$sidebar_name] as $key => $value ) {\n $widget_id = $value;\n $widget_parts = explode( '-', $widget_id );\n $widget_base_id = $widget_parts[0];\n $widget_number = $widget_parts[1];\n $options = get_option( 'widget_' . $widget_base_id );\n\n $widget_title = '';\n if ( is_array( $options[$widget_number] ) ) {\n\n if ( array_key_exists( 'title', $options[$widget_number] ) && !empty( $options[$widget_number]['title'] ) ) {\n $widget_title = $options[$widget_number]['title'];\n }\n else {\n foreach ( $wp_registered_widgets as $w => $rwidget ) {\n if ( $w == $widget_id ) {\n $widget_title = $rwidget['name']; \n }\n else {\n if ($widget_title == '') {\n $widget_title = $widget_id; \n }\n }\n }\n }\n }\n $sidebar_widgets[] = [ $widget_id => $widget_title ];\n }\n\n }\n\n \n return $sidebar_widgets;\n\n }", "function linkit_allowed_widget_types() {\n $allowed_widget_types = array(\n 'text_textfield',\n 'text_textarea',\n 'link_field',\n );\n drupal_alter('linkit_allowed_widget_types', $allowed_widget_types);\n return $allowed_widget_types;\n}", "protected function formatDataForSaving($data) {\n\t\t$widgets = array();\n\t\tforeach ($data['configuredWidgets'] as $widgetType) {\n\t\t\t$widgets[$widgetType]['id'] = $data[$widgetType]['id'];\n\t\t\t$widgets[$widgetType]['type'] = $data[$widgetType]['type'];\n\t\t}\n\n\t\treturn $widgets;\n\t}", "public function get_available_widgets()\n {\n }", "public function getDafaultsWidgets()\r\n {\r\n\r\n $widgets = array();\r\n\r\n return $widgets;\r\n }", "protected function getValidTypes(Tx_Geckoboard_Widgets_Widget $widget) {\n\t\t$typeList = $widget->getValidTypes();\n\t\t$validTypes = array();\n\t\tforeach ($typeList as $type => $typeInfo) {\n\t\t\t$label = $this->language->sL(\n\t\t\t\t'LLL:EXT:geckoboard/Resources/Private/Language/locallang_be.xml:label.' . $type\n\t\t\t);\n\n\t\t\tif ($typeInfo['url'] != '') {\n\t\t\t\t$label .= ' <a target=\"_blank\" href=\"' . $typeInfo['url'] . '\">(?)</a>';\n\t\t\t}\n\n\t\t\t$validTypes[$type] = ($label != '' ?\n\t\t\t\t$label :\n\t\t\t\t$type);\n\t\t}\n\n\t\treturn $validTypes;\n\t}", "public function get_widget_areas() {\n\n\t\t\t// If the single instance hasn't been set, set it now.\n\t\t\tif ( ! empty( $this->widget_areas ) ) {\n\t\t\t\treturn $this->widget_areas;\n\t\t\t}\n\n\t\t\t// Get widget areas saved in theem mod\n\t\t\t$widget_areas = wprt_get_mod( 'widget_areas' );\n\n\t\t\t// If theme mod isn't empty set to class widget area var\n\t\t\tif ( ! empty( $widget_areas ) && is_array( $widget_areas ) ) {\n\t\t\t\t$this->widget_areas = array_unique( array_merge( $this->widget_areas, $widget_areas ) );\n\t\t\t}\n\n\t\t\t// Return widget areas\n\t\t\treturn $this->widget_areas;\n\t\t}", "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 validateWidgetNeeded()\n {\n return array(\n new Main\\Entity\\Validator\\Length(null, 1),\n );\n }", "protected function _getAdditionalElementTypes()\n {\n /** @var DataObject $result */\n $result = $this->dataObjectFactory->create(['types' => []]);\n $this->_eventManager->dispatch('widget_form_additional_element_types', ['result' => $result]);\n return (array)$result ?: [];\n }", "protected function getWidgetClasses()\n {\n $files = glob(sprintf('%s/Widgets/*Widget.php', $this->getPath()));\n\n $widgetClasses = [];\n foreach ($files as $file) {\n $class = $this->getName() . '\\Widgets\\\\' . basename($file, '.php');\n if (class_exists($class)) {\n $widget = new $class(\n $this->container->get('pluginlogger'),\n $this->container->get('models')\n );\n if ($widget instanceof AbstractWidget) {\n $widgetClasses[] = $widget;\n }\n }\n }\n\n return $widgetClasses;\n }", "function getGeneralWidgets(&$pids)\n {\n $sql = \"select o.id, o.name, facet_type from options o inner join options_settings os on os.name = o.name\".\n \" where (facet_type != '') and r_display_identifier != 'lowest_price'\";\n $stm = $this->vdo->prepare($sql);\n $stm -> execute();\n $widgets = array();\n \n while($opset = $stm->fetchObject()){\n \n if(!in_array($opset->facet_type, OptionHandler::$facet_types)){\n continue; \n }\n /// Generate the right class\n $widget_class_name = ucfirst($opset->facet_type) . 'Widget';\n // $widget = new $widget_class_name($this->getWid(), ucfirst($opset->name));\n $widget = Widget::create($this->getWid(),$opset->facet_type,$opset->name);\n /// Get the options for each facet according to the products in search\n \n $extra_where = '';\n if(sizeof($pids) > 0){\n $extra_where = \" and (product_id = \" .implode(\" or product_id = \", $pids) .\")\";\n }\n $q = \"select name from options_values where option_id = \".$opset->id.\" \".$extra_where.\" group by name\";\n \n \n \n if($widget instanceof SliderWidget)\n {\n \n $this->fillSlider($widget, $q);\n if($widget->min >= 0 && $widget->max >= 0)\n {\n $widgets[$opset->name] = $widget; \n }\n } \n else if ($widget instanceof ListWidget)\n {\n $this->fillList($widget, $q);\n if(($widget->options && !empty($widget->options)))\n {\n $widgets[$opset->name] = $widget; \n }\n \n } \n else \n {\n continue;\n }\n \n /// make sure we only save the usefull ones\n \n \n }\n $stm->closeCursor();\n if(sizeof($widgets) < 1) return null;\n return $widgets;\n \n }", "private function wp_get_sidebars_widgets() {\n\t\t$sidebars_widgets = get_option( 'sidebars_widgets', array() );\n\n\t\tif ( is_array( $sidebars_widgets ) && isset( $sidebars_widgets['array_version'] ) ) {\n\t\t\tunset( $sidebars_widgets['array_version'] );\n\t\t}\n\n\t\treturn $sidebars_widgets;\n\t}", "public static function getWidgets($name) {\n add_filter('dynamic_sidebar_params', 'NpShortcodes::paramsFilter');\n ob_start();\n dynamic_sidebar($name);\n $content = ob_get_clean();\n remove_filter('dynamic_sidebar_params', 'NpShortcodes::paramsFilter');\n\n $data = explode('</widget>', $content);\n $widgets = array();\n for ($i = 0; $i < count($data); $i++) {\n $widget = $data[$i];\n if (!$widget) {\n continue;\n }\n\n $id = null;\n $name = null;\n $class = null;\n $title = null;\n\n if (preg_match('/<widget(.*?)>/', $widget, $matches)) {\n if (preg_match('/id=\"(.*?)\"/', $matches[1], $ids)) {\n $id = $ids[1];\n }\n if (preg_match('/name=\"(.*?)\"/', $matches[1], $names)) {\n $name = $names[1];\n }\n if (preg_match('/class=\"(.*?)\"/', $matches[1], $classes)) {\n $class = $classes[1];\n }\n $widget = preg_replace('/<widget[^>]+>/', '', $widget);\n\n if (preg_match('/<title>(.*)<\\/title>/', $widget, $matches)) {\n $title = $matches[1];\n $widget = preg_replace('/<title>.*?<\\/title>/', '', $widget);\n }\n }\n $widget = str_replace('<ul class=\"product-categories\">', '<ul>', $widget);\n\n $widgets[] = array(\n 'id' => $id,\n 'name' => $name,\n 'class' => $class,\n 'title' => $title,\n 'content' => $widget\n );\n }\n return $widgets;\n }", "function utility_pro_register_widget_areas() {\n\n\t$widget_areas = array(\n\t\tarray(\n\t\t\t'id' => 'utility-bar',\n\t\t\t'name' => __( 'Utility Bar', 'CHILD_TEXT_DOMAIN' ),\n\t\t\t'description' => __( 'This is the utility bar across the top of page.', 'CHILD_TEXT_DOMAIN' ),\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'utility-bar-after-header',\n\t\t\t'name' => __( 'Utility Bar After Header', 'CHILD_TEXT_DOMAIN' ),\n\t\t\t'description' => __( 'This is the utility bar below the bottom of the header area.', 'CHILD_TEXT_DOMAIN' ),\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'utility-home-welcome',\n\t\t\t'name' => __( 'Home Welcome', 'CHILD_TEXT_DOMAIN' ),\n\t\t\t'description' => __( 'This is the welcome section at the top of the home page.', 'CHILD_TEXT_DOMAIN' ),\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'utility-home-gallery-1',\n\t\t\t'name' => sprintf( _x( 'Home Gallery %d', 'Group of Home Gallery widget areas', 'CHILD_TEXT_DOMAIN' ), 1 ),\n\t\t\t'description' => sprintf( _x( 'Home Gallery %d widget area on home page.', 'Description of widget area', 'CHILD_TEXT_DOMAIN' ), 1 ),\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'utility-home-gallery-2',\n\t\t\t'name' => sprintf( _x( 'Home Gallery %d', 'Group of Home Gallery widget areas', 'CHILD_TEXT_DOMAIN' ), 2 ),\n\t\t\t'description' => sprintf( _x( 'Home Gallery %d widget area on home page.', 'Description of widget area', 'CHILD_TEXT_DOMAIN' ), 2 ),\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'utility-home-gallery-3',\n\t\t\t'name' => sprintf( _x( 'Home Gallery %d', 'Group of Home Gallery widget areas', 'CHILD_TEXT_DOMAIN' ), 3 ),\n\t\t\t'description' => sprintf( _x( 'Home Gallery %d widget area on home page.', 'Description of widget area', 'CHILD_TEXT_DOMAIN' ), 3 ),\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'utility-home-gallery-4',\n\t\t\t'name' => sprintf( _x( 'Home Gallery %d', 'Group of Home Gallery widget areas', 'CHILD_TEXT_DOMAIN' ), 4 ),\n\t\t\t'description' => sprintf( _x( 'Home Gallery %d widget area on home page.', 'Description of widget area', 'CHILD_TEXT_DOMAIN' ), 4 ),\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'utility-call-to-action',\n\t\t\t'name' => __( 'Call to Action', 'CHILD_TEXT_DOMAIN' ),\n\t\t\t'description' => __( 'This is the Call to Action section on the home page.', 'CHILD_TEXT_DOMAIN' ),\n\t\t),\n\t);\n\n\t$widget_areas = apply_filters( 'utility_pro_default_widget_areas', $widget_areas );\n\n\tforeach ( $widget_areas as $widget_area ) {\n\t\tgenesis_register_sidebar( $widget_area );\n\t}\n}", "public function getWidgets() {\n\t\t$widgets = array();\n\t\tif ($this->hasParameter('widgets')) {\n\t\t\tforeach ($this->getParameter('widgets') as $name => $widget) {\n\t\t\t\t$widgets[$name] = $this->getTranslator()->trans($widget['label']);\n\t\t\t}\n\t\t}\n\t\treturn $widgets;\n\t}", "function roles_dashboard_update_widget_definitions() {\n\n\t$widget_types = elgg_get_widget_types('all', true);\n\tforeach ($widget_types as $handler => $options) {\n\t\t$context = $options->context;\n\t\t$context[] = 'dashboard';\n\t\t$context = array_unique($context);\n\t\telgg_register_widget_type($handler, $options->name, $options->description, $context, $options->multiple);\n\t}\n\n\t$roles = roles_get_all_selectable_roles();\n\n\t$widget_types = elgg_get_widget_types('dashboard', true);\n\tforeach ($widget_types as $handler => $options) {\n\t\t$context = $options->context;\n\t\tforeach ($roles as $role) {\n\t\t\t$context[] = \"role::{$role->name}\";\n\t\t}\n\t\t$context = array_unique($context);\n\t\telgg_register_widget_type($handler, $options->name, $options->description, $context, $options->multiple);\n\t}\n}", "protected function retrieve_widgets()\n {\n }", "protected function retrieve_widgets()\n {\n }", "function tom_Register_Widgets()\n{\n $settings = array(\n 'name' => 'Home Top Left',\n 'id' => 'home_top_left',\n 'before_widget' => '<div class=\"widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n );\n\n // different widget areas which I want to register.\n $widgets = array(\n 'Home Top Left'\n ,'Home Bottom Left'\n ,'Home Top Middle'\n ,'Home Bottom Middle'\n ,'Home Top Right'\n ,'Home Bottom Right'\n );\n\n // whizz through and register all the widget areas.\n foreach($widgets as $w)\n {\n $name = $w;\n $id = str_replace(' ','_',strtolower($w));\n $settings['name'] = $name;\n $settings['id'] = $id;\n register_sidebar($settings);\n } \n}", "function yz_user_widgets_fields() {\n\n // if ( ! empty( $))\n $fields = array(\n 'instagram' => array(\n 'id' => 'wg_instagram_account_token',\n 'title' => __( 'User Instagram Widget', 'youzer' )\n ),\n 'flickr' => array(\n 'id' => 'wg_flickr_account_id',\n 'title' => __( 'User Flickr Widget', 'youzer' )\n ),\n 'skills' => array(\n 'id' => 'youzer_skills',\n 'title' => __( 'User Skills Widget', 'youzer' )\n ),\n 'services' => array(\n 'id' => 'youzer_services',\n 'title' => __( 'User Services Widget', 'youzer' )\n ),\n 'slideshow' => array(\n 'id' => 'youzer_slideshow',\n 'title' => __( 'User Slideshow Widget', 'youzer' ),\n 'type' => 'images'\n ),\n 'portfolio' => array(\n 'id' => 'youzer_portfolio',\n 'title' => __( 'User Portfolio Widget', 'youzer' ),\n 'type' => 'images'\n ),\n 'post' => array(\n 'title' => __( 'User Post Widget', 'youzer' ),\n 'fields' => array(\n 'yz_profile_wg_post_id' => array(\n 'title' => __( 'Post ID', 'youzer' ),\n ),\n 'wg_post_type' => array(\n 'title' => __( 'Post Type', 'youzer' ),\n )\n )\n ),\n 'video' => array(\n 'title' => __( 'User Video Widget', 'youzer' ),\n 'fields' => array(\n 'wg_video_title' => array(\n 'title' => __( 'Title', 'youzer' ),\n ),\n 'wg_video_desc' => array(\n 'title' => __( 'Description', 'youzer' ),\n ),\n 'wg_video_url' => array(\n 'title' => __( 'URL', 'youzer' ),\n )\n )\n ),\n 'about_me' => array(\n 'title' => __( 'User About me Widget', 'youzer' ),\n 'fields' => array(\n 'wg_about_me_photo' => array(\n 'title' => __( 'Photo', 'youzer' ),\n 'type' => 'image'\n ),\n 'wg_about_me_title' => array(\n 'title' => __( 'Title', 'youzer' ),\n ),\n 'wg_about_me_desc' => array(\n 'title' => __( 'Description', 'youzer' ),\n ),\n 'wg_about_me_bio' => array(\n 'title' => __( 'Biography', 'youzer' ),\n )\n )\n ),\n 'quote' => array(\n 'title' => __( 'User Quote Widget', 'youzer' ),\n 'fields' => array(\n 'wg_quote_owner' => array(\n 'title' => __( 'Owner', 'youzer' ),\n ),\n 'wg_quote_txt' => array(\n 'title' => __( 'Text', 'youzer' ),\n ),\n 'wg_quote_img' => array(\n 'title' => __( 'Cover', 'youzer' ),\n 'type' => 'image'\n ),\n 'wg_quote_use_bg' => array(\n 'title' => __( 'Use Quote Cover?', 'youzer' ),\n )\n )\n ),\n 'link' => array(\n 'title' => __( 'User Link Widget', 'youzer' ),\n 'fields' => array(\n 'wg_link_url' => array(\n 'title' => __( 'URL', 'youzer' ),\n ),\n 'wg_link_txt' => array(\n 'title' => __( 'Text', 'youzer' ),\n ),\n 'wg_link_img' => array(\n 'title' => __( 'Cover', 'youzer' ),\n 'type' => 'image'\n ),\n 'wg_link_use_bg' => array(\n 'title' => __( 'Use Link Cover?', 'youzer' ),\n )\n )\n ),\n 'project' => array(\n 'title' => __( 'User Project Widget', 'youzer' ),\n 'fields' => array(\n 'wg_project_title' => array(\n 'title' => __( 'Title', 'youzer' ),\n ),\n 'wg_project_desc' => array(\n 'title' => __( 'Description', 'youzer' ),\n ),\n 'wg_project_type' => array(\n 'title' => __( 'Type', 'youzer' ),\n ),\n 'wg_project_thumbnail' => array(\n 'title' => __( 'Thumbnail', 'youzer' ),\n 'type' => 'image'\n ),\n 'wg_project_link' => array(\n 'title' => __( 'Link', 'youzer' ),\n ),\n 'wg_project_categories' => array(\n 'title' => __( 'Categories', 'youzer'),\n 'type' => 'options',\n ),\n 'wg_project_tags' => array(\n 'title' => __( 'Tags', 'youzer'),\n 'type' => 'options',\n ),\n )\n ),\n\n );\n\n // Add Networks Fields\n $networks_fields = yz_get_social_networks_fields();\n if ( ! empty( $networks_fields ) ) {\n $fields['social_networks'] = array( 'title' => __( 'Social Networks', 'youzer' ), 'fields' => $networks_fields );\n }\n\n return apply_filters( 'yz_export_fields', $fields );\n}", "public static function getAllWidgets($widgets = [])\n\t{\n\t\t$widgetIds = [];\n\t\tforeach($widgets as $widget)\n\t\t{\n\t\t\t$widgetIds[] = $widget['id'];\n\t\t}\n\n\t\t$allWidgets = [];\n\t\t$widgets = WidgetModel::select('title', 'type', 'routes', 'description')\n\t\t\t->whereIn('id', $widgetIds)\n\t\t\t->get()->toArray();\n\n\t\tforeach($widgets as $widget)\n\t\t{\n\t\t\t$allWidgets[$widget['title']]['type'] \t\t\t= isset($allWidgets[$widget['title']]['type']) ? $allWidgets[$widget['title']]['type']. ',' . $widget['type'] : $widget['type'] ;\n\t\t\t$allWidgets[$widget['title']]['routes'] \t\t= $widget['routes'];\n\t\t\t$allWidgets[$widget['title']]['description'] \t= $widget['description'];\n\t\t}\n\t\treturn $allWidgets;\n\t}", "static public function check_if_builder_is_widget( $id, $builder_type ) {\n\t\tglobal $wpdb;\n\n\t\t// get the profile fields row for the id and save as array\n\t\t$sql = $wpdb->get_row(\n\t\t\t\"SELECT * FROM {$wpdb->base_prefix}pp_builder_widget WHERE builder_type = '$builder_type' AND builder_id = $id\",\n\t\t\t'ARRAY_A'\n\t\t);\n\n\t\treturn $sql;\n\t}", "function ww_find_taxonomy_term_widgets($widgets){\n if (is_null($widgets) &&\n (is_tax() || is_category() || is_tag()) &&\n $term = get_queried_object())\n {\n $where = array(\n 'type' => 'taxonomy',\n 'variety' => 'term',\n 'extra_key' => $term->term_id,\n );\n if ($term_data = $this->ww->_extras_get($where)){\n // look for explicitly set preset\n if (isset($term_data->data['preset_id']) && $term_data->data['preset_id'] != 0){\n $preset = $this->ww->presets->get_preset($term_data->data['preset_id']);\n $this->ww->presets->current_preset_id = $preset->id;\n $widgets = $preset->widgets;\n }\n else {\n $widgets = $term_data->widgets;\n }\n }\n else {\n // see if the taxonomy is overriding\n $where['variety'] = 'taxonomy';\n $where['extra_key'] = $term->taxonomy;\n if ($tax_data = $this->ww->_extras_get($where)){\n if (isset($tax_data->data['override_default'])){\n $widgets = $this->_find_taxonomy_widgets($tax_data);\n }\n }\n }\n }\n \n return $widgets;\n }", "public function widgets()\n {\n\t\t//Many To Many (Polymorphic)\n return $this->morphToMany(Widget::class, 'widgetable');\n }", "public function providerElements() {\n return [\n [\n [\n '#type' => 'date',\n '#states' => [\n 'visible' => [\n ':input[name=\"toggle_me\"]' => ['checked' => TRUE],\n ],\n ],\n ],\n '#attributes',\n ],\n [\n [\n '#type' => 'item',\n '#states' => [\n 'visible' => [\n ':input[name=\"foo\"]' => ['value' => 'bar'],\n ],\n ],\n ],\n '#wrapper_attributes',\n ],\n ];\n }", "public function getWidgetTypesJson()\n {\n return json_encode($this->widgetsMap);\n }", "public function getBoxes()\n\t{\n\t\t$boxes = array();\n\t\tforeach($this->getData() as $data){\n\t\t\tif($this->idAllowed($data['id'])){\n\t\t\t\t$boxes[] = array(\n\t\t\t\t\t'class' => sprintf('Webwijs\\Admin\\Metabox\\%s', $data['type']), \n\t\t\t\t\t'settings' => array('id' => $this->getMetaboxId($data['id']), 'title' => $data['title'])\n\t\t\t\t);\t\n\t\t\t}\n\t\t};\n\t\treturn $boxes;\n\t}", "public function loadWidgetsFromArray($jsonData) {\n\t\t// echo json_encode($jsonData);\n\t\t// die;\n\t\tif(!$this->templateId) {\n\t\t\treturn false;\n\t\t}\n\t\t# get the template for this asset, it contains the widgets\n\t\t$this->assetTemplate = $this->asset_template->getTemplate($this->templateId);\n\t\tif(!$this->assetTemplate) {\n\t\t\treturn false;\n\t\t}\n\t\t$populatedWidgetArray = array();\n\n\t\t# go through all the widgets from the template, see if they're set in the jsonData\n\t\tforeach($this->assetTemplate->widgetArray as $widget) {\n\t\t\t$widgetKey = $widget->getFieldTitle();\n\n\t\t\tif(isset($jsonData[$widgetKey])) {\n\t\t\t\t$populatedWidgetArray[$widgetKey] = clone $widget;\n\t\t\t\t$populatedWidgetArray[$widgetKey]->parentObjectId = $this->getObjectId();\n\t\t\t\tif(is_array($jsonData[$widgetKey])) {\n\t\t\t\t\t$i=0;\n\t\t\t\t\tforeach($jsonData[$widgetKey] as $key=>$value) {\n\t\t\t\t\t\tif(is_array($value)) {\n\t\t\t\t\t\t\t$tempObject = $widget->getContentContainer();\n\t\t\t\t\t\t\t$tempObject->parentObjectId = $this->getObjectId();\n\t\t\t\t\t\t\t$tempObject->parentObject = $this;\n\t\t\t\t\t\t\t$tempObject->loadContentFromArray($value);\n\t\t\t\t\t\t\tif(isset($jsonData[$widgetKey]['isPrimary'])) {\n\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * this case occurs on form submission, as isPrimary is widget level, not content level.\n\t\t\t\t\t\t\t * But we want to track it content-level otherwise.\n\t\t\t\t\t\t\t * technically we don't need to set the false, as false will be the default on loads from\n\t\t\t\t\t\t\t * mongo - we won't end up with duplicate isPrimaries. But this seemed like the smart way to go,\n\t\t\t\t\t\t\t * just in case.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif($jsonData[$widgetKey]['isPrimary'] == $i) {\n\t\t\t\t\t\t\t\t\t$tempObject->isPrimary = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t$tempObject->isPrimary = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// only save this widget if it actually has contents. This assumes widgets are well behaved.\n\t\t\t\t\t\t\tif($tempObject->hasContents()) {\n\t\t\t\t\t\t\t\t$populatedWidgetArray[$widgetKey]->addContent($tempObject);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->assetObjects = $populatedWidgetArray;\n\n\t\t/**\n\t\t * Generally we want to access these in display order\n\t\t */\n\t\t$this->sortBy('viewOrder');\n\n\n\t\treturn TRUE;\n\t}", "protected function get_widgets()\n {\n }", "protected function _getAdditionalElementTypes()\n {\n $result = array(\n 'price' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_price'),\n 'weight' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_weight'),\n 'gallery' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_gallery'),\n 'image' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_image'),\n 'boolean' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_boolean'),\n 'textarea' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_helper_form_wysiwyg'),\n 'file' => Mage::getConfig()->getBlockClassName('teeth/adminhtml_catalog_product_helper_form_file'),\n );\n\n $response = new Varien_Object();\n $response->setTypes(array());\n Mage::dispatchEvent('adminhtml_catalog_product_edit_element_types', array('response' => $response));\n\n foreach ($response->getTypes() as $typeName => $typeClass) {\n $result[$typeName] = $typeClass;\n }\n\n return $result;\n }", "private function widget_fields() {\r\n $fields = array(\r\n 'promo_title' => array(\r\n 'eightstore_lite_widgets_name' => 'promo_title',\r\n 'eightstore_lite_widgets_title' => __('Title', 'eightstore-lite'),\r\n 'eightstore_lite_widgets_field_type' => 'text',\r\n ),\r\n \r\n 'promo_image' => array(\r\n 'eightstore_lite_widgets_name' => 'promo_image',\r\n 'eightstore_lite_widgets_title' => __('Upload Image', 'eightstore-lite'),\r\n 'eightstore_lite_widgets_field_type' => 'upload',\r\n ),\r\n \r\n 'promo_desc' => array(\r\n 'eightstore_lite_widgets_name' => 'promo_desc',\r\n 'eightstore_lite_widgets_title' => __('Enter Promo Desc', 'eightstore-lite'),\r\n 'eightstore_lite_widgets_field_type' => 'textarea', \r\n 'eightstore_lite_widgets_row' =>'4',\r\n ),\r\n \r\n 'promo_link' => array(\r\n 'eightstore_lite_widgets_name' => 'promo_link',\r\n 'eightstore_lite_widgets_title' => __('Enter Promo Link', 'eightstore-lite' ),\r\n 'eightstore_lite_widgets_field_type' => 'url'\r\n ),\r\n\r\n 'promo_btn_text' => array(\r\n 'eightstore_lite_widgets_name' => 'promo_btn_text',\r\n 'eightstore_lite_widgets_title' => __('Enter Promo Button Text', 'eightstore-lite' ),\r\n 'eightstore_lite_widgets_field_type' => 'text'\r\n ),\r\n \r\n \r\n );\r\n\r\n return $fields;\r\n }", "private function get_used_widgets($sidebar_widgets_option) {\n $used_widgets = array();\n if ( is_array($sidebar_widgets_option) ) {\n foreach ( $sidebar_widgets_option as $sidebar => $widgets ) {\n if ( is_array($widgets) ) {\n foreach ( $widgets as $widget ) {\n $used_widgets[]= $this->_get_widget_id_base($widget);\n }\n }\n }\n }\n\n return array_unique($used_widgets);\n }", "public function getWidgetList()\n { \n $widgets = HomePageWidget::where('status', HomePageWidget::ACTIVE)->where('type', HomePageWidget::TYPE_SLIDER)->orderBy('id', 'asc')->take(3)->get();\n return $widgets;\n }", "public function widgetContents($array);", "public function getAvailableWidgets()\r\n {\r\n }", "public function getWidgetConfigs()\n {\n return $this->widgets;\n }", "public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Main_Slider() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Text() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Noble_Cause() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Image() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Project_Facts() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Pillers_Forest() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Fancy_Heading() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Blog_Listing() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Main_Gallery() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Default_Sub_Header() );\n\n\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Banner() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Woo_Listing() );\t\t \n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Events_Listing() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Events_Call_To_Action() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Contact() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Islamic_Centre_Newsletter() );\n\t}", "function _find_taxonomy_widgets($tax_data){\n if (isset($tax_data->data['preset_id']) && $tax_data->data['preset_id'] != 0){\n $preset = $this->ww->presets->get_preset($tax_data->data['preset_id']);\n $this->ww->presets->current_preset_id = $preset->id;\n $widgets = $preset->widgets;\n }\n else {\n $widgets = $tax_data->widgets;\n }\n return $widgets;\n }", "function voyage_mikado_blog_types() {\n\n $types = array_merge(voyage_mikado_blog_grid_types(), voyage_mikado_blog_full_width_types());\n\n return $types;\n\n }", "public function getAllWidgetTypes($theme = false)\n\t{\t\n\t\t$theme = $theme ?: \\CMS::coreModules()->getActiveTheme()->module_key;\n\t\treturn $this->findBy('theme', $theme);\n\t}", "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 }", "static public function get_a_builder_ids( $builder_type ) {\n\t\tglobal $wpdb;\n\t\t$current_blog_id = get_current_blog_id();\n\t\tif ( $builder_type == 'login' ) {\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t$sql = \"SELECT id FROM {$wpdb->base_prefix}pp_login_builder WHERE blog_id = 0 OR blog_id = $current_blog_id\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql = \"SELECT id FROM {$wpdb->base_prefix}pp_login_builder\";\n\t\t\t}\n\t\t}\n\t\telseif ( $builder_type == 'registration' ) {\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t$sql = \"SELECT id FROM {$wpdb->base_prefix}pp_registration_builder WHERE blog_id = 0 OR blog_id = $current_blog_id\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql = \"SELECT id FROM {$wpdb->base_prefix}pp_registration_builder\";\n\t\t\t}\n\t\t}\n\t\telseif ( $builder_type == 'front_end_profile' ) {\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t$sql = \"SELECT id FROM {$wpdb->base_prefix}pp_user_profile_builder WHERE blog_id = 0 OR blog_id = $current_blog_id\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql = \"SELECT id FROM {$wpdb->base_prefix}pp_user_profile_builder\";\n\t\t\t}\n\t\t}\n\t\telseif ( $builder_type == 'password_reset' ) {\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t$sql = \"SELECT id FROM {$wpdb->base_prefix}pp_password_reset_builder WHERE blog_id = 0 OR blog_id = $current_blog_id\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql = \"SELECT id FROM {$wpdb->base_prefix}pp_password_reset_builder\";\n\t\t\t}\n\t\t}\n\t\telseif ( $builder_type == 'edit_user_profile' ) {\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t$sql = \"SELECT id FROM {$wpdb->base_prefix}pp_edit_profile_builder WHERE blog_id = 0 OR blog_id = $current_blog_id\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql = \"SELECT id FROM {$wpdb->base_prefix}pp_edit_profile_builder\";\n\t\t\t}\n\t\t}\n\n\t\treturn $wpdb->get_col( $sql );\n\t}", "function skcw_get_templates_list() {\n\tif (!empty($_GET['page']) && $_GET['page'] == 'code-to-widget') { return; }\n\t$template_path = get_option('skcw_template_directory');\n\tif (empty($template_path)) { return false; }\n\n\t$templates = wp_cache_get('skcw_templates', 'skcw_templates');\n\tif (!is_array($templates) || empty($templates)) {\n\t\t$templates = array();\n\t}\n\telse {\n\t\treturn $templates;\n\t}\n\t\n\t$templ_dir = @opendir($template_path);\n\tif (!$templ_dir) { return false; }\n\t\n\twhile (($file = readdir($templ_dir)) !== false) {\n\t\tif (is_file(trailingslashit($template_path).$file) && is_readable(trailingslashit($template_path).$file)) {\n\t\t\t$template_data = file_get_contents(trailingslashit($template_path).$file);\n\t\t\tif (preg_match('|Widget Name: (.*)$|mi', $template_data, $widget_name)) {\n\t\t\t\t$widget_name = $widget_name[1];\n\t\t\t}\n\t\t\tif (preg_match('|Widget Description: (.*)$|mi', $template_data, $widget_description)) {\n\t\t\t\t$widget_description = $widget_description[1];\n\t\t\t}\n\t\t\tif (preg_match('|Widget Title: (.*)$|mi', $template_data, $widget_title)) {\n\t\t\t\t$widget_title = $widget_title[1];\n\t\t\t}\n\t\t\tif (!empty($widget_name) && !empty($widget_description)) {\n\t\t\t\t$widget_classname = sanitize_title('skcw-'.$widget_name);\n\t\t\t\t$templates[$widget_classname] = array(\n\t\t\t\t\t\t'file' => $file,\n\t\t\t\t\t\t'widget_name' => $widget_name,\n\t\t\t\t\t\t'widget_classname' => $widget_classname,\n\t\t\t\t\t\t'widget_description' => $widget_description,\n\t\t\t\t\t\t'widget_title' => $widget_title\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\t@closedir($templ_dir);\n\tupdate_option('skcw_templates_list',$templates);\n\twp_cache_set('skcw_templates', $templates, 'skcw_templates');\n\treturn is_array($templates) ? $templates : false;\n}", "public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Counter() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Posts() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Subhead_Bodycopy() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Heading_Media_BodyCopy() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Sidebar() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Useful_Links_Info() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Content_Filter() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Accordion_Navigation_Tabs() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Secondary_CTAs() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Alert_Banner() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Resources_Widgets() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Card_Lrg() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Promo() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Latest_Resources() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Popular_Results() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Top_Faq() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Card_Carousel() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Repeater_resources_widget());\n\n\t}", "private static function loadWidgets() {\n\t\t\t$widgetsJson = file_get_contents(JIAOYU_PROJECT_HOME.\"/app/conf/widgets.json\");\n\n\t\t\t// If the file is empty don't build the widgets\n\t\t\tif (!$widgetsJson) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t$appWidgets = JsonUtils::decode($widgetsJson);\n\t\t\t} catch (JsonException $e) {\n\t\t\t\tthrow new ConfigurationException(\"Error initializing widgets: \".$e->getMessage());\n\t\t\t}\n\n\t\t\t// Each json object in the array is a widget, but unlike the routes we won't instantiate\n\t\t\t// the class, only set up some keys for later (because a widget needs to execute code at\n\t\t\t// run time to work)\n\t\t\tforeach ($appWidgets as $rawWidget) {\n\t\t\t\tif (!isset($rawWidget->name)) {\n\t\t\t\t\tthrow new ConfigurationException(\"Malformed widget configuration file - each\n\t\t\t\t\t\twidget must have name, template, controller and action defined.\");\n\t\t\t\t}\n\n\t\t\t\t$widget = Widget::buildFromJson($rawWidget);\n\t\t\t\tself::$widgets[$rawWidget->name] = $widget;\n\t\t\t}\n\t\t}", "function FieldTypesArray() {}", "public function getWidgetClasses()\n {\n return $this->widgetClasses;\n }", "public function getWidgets()\n {\n return $this->_widgets;\n }", "static function widgets($widgets = array( )) {\n\t\t$path = '';\n\t\tif ( !empty( $widgets ) ) {\n\t\t\tforeach ( $widgets as $widget ) {\n\t\t\t\t// 1. include the class based on $widget, throw an error if not exists\n\t\t\t\t// any other way than via create_function?\n\t\t\t\tadd_action( 'widgets_init', create_function( '', 'register_widget( \"' . $widget . '\" );' ) );\n\t\t\t}\n\t\t}\n\t}", "public function addWidgetsSuport( $widgets=array()){\n\t\tif( is_array($widgets) ){\n\t\t\t$this->widgets = $widgets;\n\t\t}\n\t}", "public function getWidgets()\n {\n return $this->widgets;\n }", "function drawGallery($widgettypes, $seen) {\n\tglobal $CONFIG;\n\t$gallery = \"\";\n\tforeach($widgettypes as $handler => $widget) {\n\t\tif(!in_array($widget->name, $seen)) {\n\t\t\t$gallery .= '<table class=\"draggable_widget\" cellspacing=\"0\"><tr><td>';\n\t\t\t$gallery .= '<h3>';\n\t\t\t$gallery .= $widget->name;\n\t\t\t$gallery .= '<input type=\"hidden\" name=\"multiple\" value=\"';\n\n\t\t\tif ((isset($widget->handler)) && (isset($widgettypes[$widget->handler]->multiple))){\n\t\t\t\t$gallery .= $widgettypes[$widget->handler]->multiple;\n\t\t\t}\n\t\t\t$gallery .= '\"/>';\n\t\t\t$gallery .= '<input type=\"hidden\" name=\"side\" value=\"';\n\t\t\tif ((isset($widget->handler)) && (isset($widgettypes[$widget->handler]))\n\t\t\t&& (is_array($widgettypes[$widget->handler]->positions))) {\n\t\t\t\t$gallery .= in_array('side',$widgettypes[$widget->handler]->positions);\n\t\t\t}\n\t\t\t$gallery .= '\" />';\n\t\t\t$gallery .= '<input type=\"hidden\" name=\"main\" value=\"';\n\t\t\tif ((isset($widget->handler)) && (isset($widgettypes[$widget->handler]))\n\t\t\t&& (is_array($widgettypes[$widget->handler]->positions))) {\n\t\t\t\t$gallery .= in_array('main',$widgettypes[$widget->handler]->positions);\n\t\t\t}\n\t\t\t$gallery .= '\" />';\n\t\t\t$gallery .= '<input type=\"hidden\" name=\"handler\" value=\"' . htmlentities($handler) . '\" />';\n\t\t\t$gallery .= '<input type=\"hidden\" name=\"description\" value=\"' . htmlentities($widget->description, null, 'UTF-8') . '\" />';\n\t\t\t$gallery .= '<input type=\"hidden\" name=\"guid\" value=\"0\" />';\n\t\t\t$gallery .= '</h3>';\n\t\t\t$gallery .= '</td>';\n\t\t\t$gallery .= '<td width=\"17px\" align=\"right\"></td>';\n\t\t\t$gallery .= '<td width=\"17px\" align=\"right\"><a href=\"#\"><img src=\"' . $CONFIG->url . '/_graphics/spacer.gif\" width=\"14px\" height=\"14px\" class=\"more_info\" /></a></td>';\n\t\t\t$gallery .= '<td width=\"17px\" align=\"right\"><a href=\"#\"><img src=\"' . $CONFIG->url . '/_graphics/spacer.gif\" width=\"15px\" height=\"15px\" class=\"drag_handle\" />';\n\t\t\t$gallery .= '</a>';\n\t\t\t$gallery .= '</td>';\n\t\t\t$gallery .= '</tr>';\n\t\t\t$gallery .= '</table>';\n\n\t\t}\n\t}\n\n\n\t//\t$gallery .= '<br />';\n\t$gallery .= '<!-- bit of space at the bottom of the widget gallery -->';\n\n\t//\t$gallery .= '</div>';\n\t//\t$gallery .= '<!-- /#customise_editpanel_rhs -->';\n\treturn $gallery;\n}", "function remove_unnecessary_widgets_from_list( $widgets ) {\n\t\tglobal $gantry;\n\n\t\tif( class_exists( 'WP_Widget_Text_Icl' ) || class_exists( 'WPML_Widgets' ) ) {\n\t\t\tif( !empty( $widgets ) ) {\n\t\t\t\tforeach( $widgets as $widget_id ) {\n\t\t\t\t\t$widget_instance = $this->getWidgetInstanceParams( $widget_id );\n\t\t\t\t\tif( ( isset( $widget_instance['icl_language'] ) && ( $widget_instance['icl_language'] != 'multilingual' && $widget_instance['icl_language'] != ICL_LANGUAGE_CODE ) )\n\t\t\t\t || ( isset( $widget_instance['wpml_language'] ) && ( $widget_instance['wpml_language'] != 'all' && $widget_instance['wpml_language'] != ICL_LANGUAGE_CODE ) ) ) {\n\t\t\t\t\t\t$found = array_search( $widget_id, $widgets );\n\t\t\t\t\t\tunset( $widgets[ $found ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $widgets;\n\t}", "public function widgets($params) {\n include_once 'common/widget/WidgetLayoutManager.class.php';\n if ($params['owner_type'] == WidgetLayoutManager::OWNER_TYPE_USER) {\n if ($this->_userCanViewWidget('admindelegation')) {\n include_once 'AdminDelegation_UserWidget.class.php';\n $params['codendi_widgets'][] = 'admindelegation';\n }\n if ($this->_userCanViewWidget('admindelegation_projects')) {\n include_once 'AdminDelegation_ShowProjectWidget.class.php';\n $params['codendi_widgets'][] = 'admindelegation_projects';\n }\n }\n }", "function awm_create_boxes($case, $awm_fields)\n {\n if (empty($awm_fields) || empty($case)) {\n return array();\n }\n $boxes = array();\n foreach ($awm_fields as $id => $awm_field) {\n switch ($case) {\n case 'customizer':\n $section = array(\n $id => array(\n 'title' => __($awm_field['position']['title'], 'extend-wp'),\n 'priority' => $awm_field['position']['priority'] ?: 100,\n 'capability' => $awm_field['position']['cap'] ?: 'edit_theme_options',\n 'library' => awm_create_library($awm_field),\n 'description' => $awm_field['explanation']\n )\n );\n if ($awm_field['position']['panel_id'] != '') {\n $panel_id = $awm_field['position']['panel_id'];\n $boxes[$panel_id]['sections'][$id] = $section[$id];\n break;\n }\n $boxes[$id] = array(\n 'title' => __($awm_field['position']['panel_name'], 'extend-wp'),\n 'priority' => 100,\n 'sections' => $section\n );\n break;\n case 'post_type':\n $boxes[$id] = array(\n 'title' => __($awm_field['content_title'], 'extend-wp'),\n 'postTypes' => isset($awm_field['position']['post_types']) ? $awm_field['position']['post_types'] : array(),\n 'context' => isset($awm_field['position']['context']) ? $awm_field['position']['context'] : 'normal',\n 'priority' => isset($awm_field['position']['priority']) ? $awm_field['position']['priority'] : 100,\n 'library' => awm_create_library($awm_field),\n 'explanation' => isset($awm_field['explanation']) ? $awm_field['explanation'] : '',\n );\n break;\n case 'taxonomy':\n $boxes[$id] = array(\n 'title' => __($awm_field['content_title'], 'extend-wp'),\n 'taxonomies' => $awm_field['position']['taxonomies'],\n 'library' => awm_create_library($awm_field),\n 'explanation' => isset($awm_field['explanation']) ? $awm_field['explanation'] : '',\n );\n break;\n case 'options':\n $boxes['awm_option_' . $id] = array(\n 'title' => isset($awm_field['position']['title']) ? __($awm_field['position']['title'], 'extend-wp') : $id,\n 'library' => awm_create_library($awm_field),\n 'parent' => isset($awm_field['position']['parent']) ? $awm_field['position']['parent'] : '',\n 'hide_submit' => isset($awm_field['position']['hide_submit']) ? $awm_field['position']['hide_submit'] : false,\n 'submit_label' => !empty($awm_field['position']['submit_label']) ? $awm_field['position']['submit_label'] : '',\n 'cap' => isset($awm_field['position']['cap']) ? $awm_field['position']['cap'] : '',\n 'disable_register' => isset($awm_field['position']['disable_register']) ? $awm_field['position']['disable_register'] : false,\n 'explanation' => isset($awm_field['explanation']) ? $awm_field['explanation'] : '',\n );\n break;\n case 'user':\n $boxes[$id] = array(\n 'title' => __($awm_field['content_title'], 'extend-wp'),\n 'library' => awm_create_library($awm_field),\n 'explanation' => isset($awm_field['explanation']) ? $awm_field['explanation'] : '',\n );\n break;\n }\n }\n return $boxes;\n }", "function create_oms_widget_type()\n{\n\n $labels = array(\n 'name' => _x( 'OMS Widgets', 'oms_widget' ),\n 'singular_name' => _x( 'OMS Widget', 'oms_widget' ),\n 'add_new' => _x( 'Add New', 'oms_widget' ),\n 'add_new_item' => _x( 'Add New Widget', 'oms_widget' ),\n 'edit_item' => _x( 'Edit Widget', 'oms_widget' ),\n 'new_item' => _x( 'New Widget', 'oms_widget' ),\n 'view_item' => _x( 'View Widget', 'oms_widget' ),\n 'search_items' => _x( 'Search Widgets', 'oms_widget' ),\n 'not_found' => _x( 'No widgets found', 'oms_widget' ),\n 'not_found_in_trash' => _x( 'No widgets found in Trash', 'oms_widget' ),\n 'parent_item_colon' => _x( 'Parent Widget:', 'oms_widget' ),\n 'menu_name' => _x( 'OMS Widgets', 'oms_widget' ),\n );\n\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => false,\n 'description' => 'Persistent content for Wordpress widgets.',\n 'supports' => array(\n 'title',\n 'custom-fields',\n ),\n 'public' => true,\n 'menu_icon' => 'dashicons-lightbulb',\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 20,\n 'show_in_nav_menus' => false,\n 'publicly_queryable' => true,\n// 'exclude_from_search' => false,\n 'exclude_from_search' => true,\n 'has_archive' => false,\n 'query_var' => true,\n 'can_export' => true,\n 'rewrite' => true,\n 'capability_type' => 'post'\n );\n\n register_post_type( 'oms_widget', $args );\n\n}", "function caldol_disable_all_widgets( $sidebars_widgets ) {\n\tif ( is_home() || is_front_page() )\n\t\t$sidebars_widgets = array( false );\n\treturn $sidebars_widgets;\n}", "public function widgetDemoNamesProvider() : array\n {\n $this->client = self::createClient();\n\n //====================================================================//\n // Get Demo List\n $widgetsList = array();\n foreach ($this->getManager()->getList(ManagerService::DEMO_WIDGETS) as $widget) {\n $widgetsList[] = array(\n \"service\" => $widget->getService(),\n \"type\" => $widget->getType(),\n \"options\" => $this->getManager()->getWidgetOptions($widget->getService(), $widget->getType()),\n \"parameters\" => $this->getManager()->getWidgetParameters($widget->getService(), $widget->getType()),\n );\n }\n\n return $widgetsList;\n }", "public function get_categories() {\r\n\t\treturn [ 'appside_widgets' ];\r\n\t}", "function getValidators() {\n $extra_validators = array();\n \n foreach ($this->_widgets as $oWidget) {\n $res = $oWidget->getValidators();\n \n if (!is_null($res)) {\n if (is_array($res)) {\n $extra_validators = kt_array_merge($extra_validators, $res);\n } else {\n $extra_validators[] = $res;\n }\n }\n }\n \n $oVF =& KTValidatorFactory::getSingleton(); \n return array($oVF->get('ktcore.validators.fieldset', array(\n 'test' => $this->sBasename, \n 'validators' => &$extra_validators,\n )));\n }", "function cdn_register_widget_areas() {\n\t// Home, Single -- Before Content Ad\n\tgenesis_register_widget_area( array(\n\t\t'id' => 'cdn-home-after-header-widget',\n\t\t'name' => __( 'Home After Header Ad', 'cutedecision' ),\n\t\t'description' => __( 'Horizontal ad banner. Placed before the content, at the top of the page.', 'cutedecision' ),\n\t) );\n\n\t// Home -- Inside Content Ad\n\tgenesis_register_widget_area( array(\n\t\t\t'id' => 'cdn-home-inside-loop-widget',\n\t\t\t'name' => __( 'Home Inside Loop Ad', 'cutedecision' ),\n\t\t\t'description' => __( 'Ad banner... Placed...', 'cutedecision' ) // TODO: Заполнить description\n\t) );\n\n\t// Single -- After Content Ad\n\tgenesis_register_widget_area( array(\n\t\t\t'id' => 'cdn-single-after-loop-widget',\n\t\t\t'name' => __( 'Single After Content Ad', 'cutedecision' ),\n\t\t\t'description' => __( 'Ad banner... Placed...', 'cutedecision' )\n\t) );\n\n\t// Taxonomy -- Inside loop widget\n\tgenesis_register_widget_area( array(\n\t\t\t'id' => 'cdn-taxonomy-inside-loop-widget',\n\t\t\t'name' => __( 'Taxonomy Inside Loop', 'cutedecision' ),\n\t\t\t'description' => __( 'Ad banner... Placed...', 'cutedecision' )\n\t) );\n\n\t// LPHT Sidebar\n\tgenesis_register_sidebar( array(\n\t\t\t'id' => 'cdn-lpht-sidebar',\n\t\t\t'name' => __( 'LPHT Sidebar', 'cutedecision' ),\n\t\t\t'description' => __( 'This is a the sidebar displayed on Latest, Popular, Hot, Trending taxonomy pages.', 'cutedecision' )\n\t) );\n}", "function disable_all_widgets($sidebars_widgets) {\n //if (is_home())\n $sidebars_widgets = array(false);\n return $sidebars_widgets;\n}", "function retrieve_widgets($theme_changed = \\false)\n {\n }", "function spm_get_sidebars() {\n\t\t\t$sidebars = array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'home_widgets',\n\t\t\t\t\t'name' => 'Home Widgets',\n\t\t\t\t\t'description' => 'Home page widgets'\n\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'sidebar',\n\t\t\t\t\t'name' => 'Sidebar',\n\t\t\t\t\t'description' => 'The main widget area'\n\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'footer',\n\t\t\t\t\t'name' => 'Footer Widgets',\n\t\t\t\t\t'description' => 'Widgets at the bottom of the page'\n\t\t\t\t)\n\t\t\t);\n\t\t\treturn $sidebars;\n\t\t}", "function wp_list_widgets()\n {\n }", "public function _available_dashboard_widget_options() {\n return array(\n 'none' => __( \"Don't display anything\", 'zendesk' ),\n 'contact-form' => __( 'Show a Contact Form', 'zendesk' ),\n 'tickets-widget' => __( 'Show the Tickets widget', 'zendesk' ),\n );\n }", "function spyropress_builder_render_widgets() {\n global $wp_registered_widgets;\n $content = '';\n\n // Sorting\n $sort = $wp_registered_widgets;\n usort( $sort, 'builder_module_name_sort' );\n $done = array();\n\n foreach ( $sort as $widget ) {\n $callback = $widget['callback'];\n if ( in_array( $callback, $done, true ) )\n continue;\n\n $done[] = $callback;\n $widget_obj = $callback[0];\n $class = get_class( $widget_obj );\n\n if( $class=='WP_Widget_Media_Image' || $class=='WP_Widget_Media_Gallery' || $class=='WP_Widget_Media_Audio' || $class=='WP_Widget_Media_Video')\n continue;\n /** Generate HTML **/\n $content .= sprintf( '\n <li class=\"module-item\">\n <a class=\"builder-module-insert\" href=\"#\" data-module-type=\"%1$s\">\n <span class=\"module-icon-widget\"></span>\n <span class=\"module-item-body\">\n <strong class=\"module-item-title\">%2$s</strong>\n <span class=\"module-item-description\">%3$s</span>\n </span>\n </a>\n </li>', $class, $widget_obj->name, esc_html( $widget_obj->\n widget_options['description'] ) );\n }\n\n echo tomato_html( $content );\n}", "function itg_widget_top_stories_ordering_data($info) {\n if (is_array($info)) {\n if (is_array($info)) {\n $widget_name = $info['widget'];\n $max_limit = $info['max_limit'];\n $min_limit = $info['min_limit'];\n $result = get_view_nodes_form_custom_table_for_widgets($widget_name, TOP_STORIES_LIMIT, TOP_STORIES_MIN_RANGE, 'ASC');\n $entity_data = array();\n foreach ($result as $entity_data_node) {\n //$entity_info = get_required_data_from_entity_id($entity_data_node['nid']);\n $entity_data[] = $entity_data_node;\n }\n return $entity_data;\n }\n }\n}", "function roles_dashboard_create_default_widgets($event, $type, $entity) {\n\n\tif ($entity->getSubtype() != MultiDashboard::SUBTYPE) {\n\t\treturn;\n\t}\n\n\t$default_widget_info = elgg_get_config('default_widget_info');\n\n\tif (!$default_widget_info || !$entity->roles_context) {\n\t\treturn;\n\t}\n\n\t// need to be able to access everything\n\t$ia = elgg_set_ignore_access(true);\n\telgg_push_context('create_default_widgets');\n\n\t// pull in by widget context with widget owners as the site\n\t// not using elgg_get_widgets() because it sorts by columns and we don't care right now.\n\t$options = array(\n\t\t'type' => 'object',\n\t\t'subtype' => 'widget',\n\t\t'owner_guid' => elgg_get_site_entity()->guid,\n\t\t'private_setting_name' => 'context',\n\t\t'private_setting_value' => $entity->roles_context,\n\t\t'limit' => 0\n\t);\n\n\t$widgets = elgg_get_entities_from_private_settings($options);\n\t/* @var \\ElggWidget[] $widgets */\n\n\tforeach ($widgets as $widget) {\n\t\t// change the container and owner\n\t\t$new_widget = clone $widget;\n\t\t$new_widget->container_guid = $entity->owner_guid;\n\t\t$new_widget->owner_guid = $entity->owner_guid;\n\n\t\t// pull in settings\n\t\t$settings = get_all_private_settings($widget->guid);\n\n\t\tforeach ($settings as $name => $value) {\n\t\t\t$new_widget->$name = $value;\n\t\t}\n\n\t\tif ($new_widget->save()) {\n\t\t\t// Add to dashboard\n\t\t\tadd_entity_relationship($new_widget->guid, MultiDashboard::WIDGET_RELATIONSHIP, $entity->guid);\n\t\t}\n\t}\n\n\twidget_manager_update_fixed_widgets($entity->roles_context, $entity->owner_guid);\n\n\telgg_set_ignore_access($ia);\n\telgg_pop_context();\n}", "function voyage_mikado_blog_grid_types() {\n\n $types = array('standard', 'standard-date-on-side', 'masonry', 'split-column', 'standard-whole-post');\n\n return $types;\n\n }", "function import_widget_data( $json_data ) {\r\n\r\n\t\t$json_data \t\t= json_decode( $json_data, true );\r\n\t\t$sidebar_data \t= $json_data[0];\r\n\t\t$widget_data \t= $json_data[1];\r\n \t\t//print_r($sidebar_data);exit;\r\n\t\r\n\t\t// prepare widgets table\r\n\t\t$widgets = array();\r\n\t\tforeach( $widget_data as $k_w => $widget_type ){\r\n\t\t\tif( $k_w ){\r\n\t\t\t\t$widgets[ $k_w ] = array();\r\n\t\t\t\tforeach( $widget_type as $k_wt => $widget ){\r\n\t\t\t\t\tif( is_int( $k_wt ) ) $widgets[$k_w][$k_wt] = 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n// \t\tprint_r($widgets);\r\n\r\n\t\t// sidebars\r\n\t\tforeach ( $sidebar_data as $title => $sidebar ) {\r\n\t\t\t$count = count( $sidebar );\r\n\t\t\tfor ( $i = 0; $i < $count; $i++ ) {\r\n\t\t\t\t$widget = array( );\r\n\t\t\t\t$widget['type'] = trim( substr( $sidebar[$i], 0, strrpos( $sidebar[$i], '-' ) ) );\r\n\t\t\t\t$widget['type-index'] = trim( substr( $sidebar[$i], strrpos( $sidebar[$i], '-' ) + 1 ) );\r\n\t\t\t\tif ( !isset( $widgets[$widget['type']][$widget['type-index']] ) ) {\r\n\t\t\t\t\tunset( $sidebar_data[$title][$i] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$sidebar_data[$title] = array_values( $sidebar_data[$title] );\r\n\t\t}\r\n\t\r\n\t\t// widgets\r\n\t\tforeach ( $widgets as $widget_title => $widget_value ) {\r\n\t\t\tforeach ( $widget_value as $widget_key => $widget_value ) {\r\n\t\t\t\t$widgets[$widget_title][$widget_key] = $widget_data[$widget_title][$widget_key];\r\n\t\t\t}\r\n\t\t}\r\n// \t\tprint_r($sidebar_data);\r\n\t\t\r\n\t\t$sidebar_data = array( array_filter( $sidebar_data ), $widgets );\r\n\t\t$this->parse_import_data( $sidebar_data );\r\n\t}", "function acf_parse_types($array)\n{\n}", "public function registerDashboardWidgets()\n {\n return [];\n }", "function ihc_get_all_post_types(){\n\tglobal $wpdb;\n\t$arr = array();\n\t$data = $wpdb->get_results('SELECT DISTINCT post_type FROM ' . $wpdb->prefix . 'posts WHERE post_status=\"publish\";');\n\tif ($data && count($data)){\n\t\tforeach ($data as $obj){\n\t\t\t$arr[] = $obj->post_type;\n\t\t}\n\t\t$exclude = array('bp-email', 'edd_log', 'nav_menu_item', 'bp-email');\n\t\tforeach ($exclude as $e){\n\t\t\tif ($k=array_search($e, $arr)){\n\t\t\t\tunset($arr[$k]);\n\t\t\t\tunset($k);\n\t\t\t}\n\t\t}\n\t}\n\treturn $arr;\n}", "public function get_chart_widgets() {\n\n\t\t$widgets = array(\n\t\t\tarray(\n\t\t\t\t'title' => __( 'Product Search', 'woocommerce-cost-of-goods' ),\n\t\t\t\t'callback' => array( $this, 'output_product_search_widget' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'callback' => array( $this, 'output_profitable_sellers_widget' ),\n\t\t\t),\n\t\t);\n\n\t\t// add filter widget if filtering by product\n\t\tif ( ! empty( $this->product_ids ) ) {\n\n\t\t\tarray_unshift( $widgets, array(\n\t\t\t\t'title' => __( 'Showing reports for:', 'woocommerce-cost-of-goods' ),\n\t\t\t\t'callback' => array( $this, 'output_current_filters_widget' )\n\t\t\t) );\n\t\t}\n\n\t\treturn $widgets;\n\t}", "public static function registerWidgetAreas()\n {\n /**\n * Footer Area\n */\n register_sidebar(array(\n 'id' => 'footer-area',\n 'name' => __('Footerarea', 'Helsingborg'),\n 'description' => __('Arean längst ner på sidan', 'Helsingborg'),\n 'before_widget' => '<div class=\"left large-6 medium-6 print-6 columns\"><div class=\"footer-content\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2 class=\"footer-title\">',\n 'after_title' => '</h2>'\n ));\n\n /**\n * Slider Area\n */\n register_sidebar(array(\n 'id' => 'slider-area',\n 'name' => __('Topparea', 'Helsingborg'),\n 'description' => __('Visas under huvudmenyn', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>'\n ));\n\n /**\n * Content Area\n */\n register_sidebar(array(\n 'id' => 'content-area',\n 'name' => __('Innehållsarea', 'Helsingborg'),\n 'description' => __('Visas strax under en artikels brödtext', 'Helsingborg'),\n 'before_widget' => '<div class=\"box box-outlined widget %2$s\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Content Area Bottom\n */\n register_sidebar(array(\n 'id' => 'content-area-bottom',\n 'name' => __('Innehåll bottenarea', 'Helsingborg'),\n 'description' => __('Visas under vänstermeny och artikel (fullbredd) ', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-outlined %2$s\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Service Area\n */\n register_sidebar(array(\n 'id' => 'service-area',\n 'name' => __('Servicearea', 'Helsingborg'),\n 'description' => __('De service-länkar som visas i grått fält på startsidan', 'Helsingborg'),\n 'before_widget' => '<div class=\"widget columns large-4 medium-4 small-12 pprint-4\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Fun Facts Area\n */\n register_sidebar(array(\n 'id' => 'fun-facts-area',\n 'name' => __('Fakta', 'Helsingborg'),\n 'description' => __('Faktarutor som visas innan footer (visar tre slumpmässiga).', 'Helsingborg'),\n 'before_widget' => '<div class=\"widget columns large-3 medium-3 print-3 left\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Left Sidebar\n */\n register_sidebar(array(\n 'id' => 'left-sidebar',\n 'name' => __('Vänster area', 'Helsingborg'),\n 'description' => __('Visas ovanför vänstermenyn.', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-filled widget %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ));\n\n /**\n * Left Sidebar Bottom\n */\n register_sidebar(array(\n 'id' => 'left-sidebar-bottom',\n 'name' => __('Vänster bottenarea', 'Helsingborg'),\n 'description' => __('Visas under vänstermenyn.', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-filled widget %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ));\n\n /**\n * Right Sidebar\n */\n register_sidebar(array(\n 'id' => 'right-sidebar',\n 'name' => __('Höger area', 'Helsingborg'),\n 'description' => __('Visas i högerspalten.', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-filled widget %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ));\n }", "function medigroup_mikado_blog_types() {\n\n $types = array_merge(medigroup_mikado_blog_grid_types(), medigroup_mikado_blog_full_width_types());\n\n return $types;\n\n }", "function custom_hide_dashboard_widgets() {\n\n global $wp_meta_boxes;\n\n // Today widget.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] );\n // Last comments.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] );\n // Incoming links.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );\n // Plugins.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );\n // WordPress blog.\n unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );\n // WordPress news.\n unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );\n\n}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Widget oben rechts',\n 'id' => 'widget_top_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget mitte rechts',\n 'id' => 'widget_center_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget unten rechts',\n 'id' => 'widget_bottom_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Newsletter Widget',\n 'id' => 'newsletter_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Custom Footer Widget',\n 'id' => 'footer_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n\n}", "function drawSetDraggables($areaWidgets, $widgettypes, &$seen) {\n\tglobal $CONFIG;\n\t$left = \"\";\n\t$leftcolumn_widgets = \"\";\n\tif (is_array($areaWidgets) && sizeof($areaWidgets) > 0) {\n\t\tforeach($areaWidgets as $widget) {\n\t\t\tif (!empty($leftcolumn_widgets)) {\n\t\t\t\t$leftcolumn_widgets .= \"::\";\n\t\t\t}\n\t\t\t$leftcolumn_widgets .= \"{$widget->handler}::{$widget->getGUID()}\";\n\n\t\t\t$seen[] = $widgettypes[$widget->handler]->name;\n\t\t\t$left .= '<table class=\"draggable_widget\" cellspacing=\"0\">';\n\t\t\t$left .= '<tr>';\n\t\t\t$left .= '<td width=\"149px\">';\n\t\t\t$left .= '<h3>' . $widgettypes[$widget->handler]->name;\n\t\t\t$left .= '<input type=\"hidden\" name=\"handler\"\tvalue=\"' . $widget->handler . '\" />';\n\t\t\t$left .= '<input type=\"hidden\" name=\"multiple\" value=\"' . $widgettypes[$widget->handler]->multiple . '\" />';\n\t\t\t$left .= '<input type=\"hidden\" name=\"side\" value=\"' . in_array('side',$widgettypes[$widget->handler]->positions) . '\"/>';\n\t\t\t$left .= '<input type=\"hidden\" name=\"main\" value=\"' . in_array('main',$widgettypes[$widget->handler]->positions) . '\" />';\n\t\t\t$left .= '<input type=\"hidden\" name=\"description\" value=\"' . htmlentities($widgettypes[$widget->handler]->description) . '\" />';\n\t\t\t$left .= '<input type=\"hidden\" name=\"guid\" value=\"' . $widget->getGUID() . '\" /></h3>';\n\t\t\t$left .= '</td>';\n\t\t\t$left .= '<td width=\"17px\" align=\"right\"></td>';\n\t\t\t$left .= '<td width=\"17px\" align=\"right\"><a href=\"#\"><img';\n\t\t\t$left .= ' src=\"' . $CONFIG->url . '/_graphics/spacer.gif\" width=\"14px\"';\n\t\t\t$left .= 'height=\"14px\" class=\"more_info\" /></a></td>';\n\t\t\t$left .= '<td width=\"17px\" align=\"right\"><a href=\"#\"><img';\n\t\t\t$left .= ' src=\"' . $CONFIG->url . '/_graphics/spacer.gif\" width=\"15px\"';\n\t\t\t$left .= 'height=\"15px\" class=\"drag_handle\" /></a></td>';\n\t\t\t$left .= '</tr>';\n\t\t\t$left .= '</table>';\n\t\t}\n\t}\n\treturn $left;\n}", "function zuhaus_mikado_register_blog_list_widget( $widgets ) {\n\t\t$widgets[] = 'ZuhausMikadoBlogListWidget';\n\t\t\n\t\treturn $widgets;\n\t}", "function wp_listings_register_widgets() {\n\n\t$widgets = array( 'WP_Listings_Featured_Listings_Widget', 'WP_Listings_Search_Widget' );\n\n\tforeach ( (array) $widgets as $widget ) {\n\t\tregister_widget( $widget );\n\t}\n\n}", "public function getOfferTypes() {\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tAn array containing all the offer type keys and names\n\t\t##\n\t\t$sql = <<<EOD\n\t\tSELECT\n\t\t\t{$this->wpdb->prefix}topspin_offer_types.type,\n\t\t\t{$this->wpdb->prefix}topspin_offer_types.name,\n\t\t\t{$this->wpdb->prefix}topspin_offer_types.status\n\t\tFROM {$this->wpdb->prefix}topspin_offer_types\nEOD;\n\t\t$data = $this->wpdb->get_results($this->wpdb->prepare($sql),ARRAY_A);\n\t\t## Store as Class Property\n\t\t$this->offer_types['data'] = $data; ## Raw Data\n\t\tforeach($data as $row) { $this->offer_types['key'][$row['type']] = $row['name']; } ## Key Data\n\t\treturn $data;\n\t}", "public function widgets() {\r\n\t\t// Make sure the user has capability.\r\n\t\tif ( Permission::user_can( 'analytics' ) || ! is_admin() ) {\r\n\t\t\t// Most popular contents.\r\n\t\t\tregister_widget( Widgets\\Popular::instance() );\r\n\t\t}\r\n\t}", "public function setWidgets(array $asWidgets)\n {\n BaseFacilityBookingForm::setWidgets(\n array(\n\t\t\t\t'title' \t\t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 2)),\n\t\t\t\t'surname' \t\t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 3)),\n\t\t\t\t'first_name' \t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 4)),\n\t\t\t\t'middle_name' \t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 5)),\n\t\t\t\t'email' \t\t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 6)),\t\t\t\t\n\t\t\t\t'address' \t\t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 7)),\n\t\t\t\t'suburb_town' \t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 8)),\n\t\t\t\t'country_id' \t\t\t=> new sfWidgetFormChoice(\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray('choices' => array('' => $asWidgets['country_id']) + $this->asCountryList),\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray('tabindex'=> 9)),\n\t\t\t\t'state' \t\t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 10)),\n\t\t\t\t'postal_code' \t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 11)),\n\t\t\t\t'area_code' \t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 12)),\n\t\t\t\t'telephone' \t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 13)),\n\t\t\t\t'mobile' \t\t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 14)),\n\t\t\t\t'fax_area_code' \t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 15)),\n\t\t\t\t'fax' \t\t\t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 16)),\n\t\t\t\t'chapel' \t\t\t\t=> new sfWidgetFormChoice(array('expanded' => true, 'multiple' => false,'choices' => $this->amStatus ), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('tabindex'=> 17)),\n\t\t\t\t'chapel_time_from' \t\t=> new sfWidgetFormDateJQueryUI(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\"change_month\"\t=> true, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"change_year\" \t=> true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"dateFormat\"\t\t=> \"dd-mm-yy\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"showSecond\" \t\t=> true, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"timeFormat\" \t\t=> 'hh:mm:ss',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'show_button_panel' => true),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('tabindex'=>19,'readonly'=>false)),\n\t\t\t\t'chapel_time_to' \t\t=> new sfWidgetFormDateJQueryUI(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\"change_month\"\t=> true, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"change_year\" \t=> true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"dateFormat\"\t\t=> \"dd-mm-yy\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"showSecond\" \t\t=> true, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"timeFormat\" \t\t=> 'hh:mm:ss',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'show_button_panel' => true),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('tabindex'=>20,'readonly'=>false)),\n\t\t\t\t'chapel_cost' \t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 21)),\n\t\t\t\t\n\t\t\t\t'room' \t\t\t\t\t=> new sfWidgetFormChoice(array('expanded' => true, 'multiple' => false,'choices' => $this->amStatus ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('tabindex'=> 22)),\n\t\t\t\t'room_time_from' \t\t=> new sfWidgetFormDateJQueryUI(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\"change_month\"\t=> true, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"change_year\" \t=> true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"dateFormat\"\t\t=> \"dd-mm-yy\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"showSecond\" \t\t=> true, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"timeFormat\" \t\t=> 'hh:mm:ss',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'show_button_panel' => true),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('tabindex'=> 24,'readonly'=>false)),\n\t\t\t\t'room_time_to' \t\t\t=> new sfWidgetFormDateJQueryUI(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\"change_month\"\t=> true, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"change_year\" \t=> true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"dateFormat\"\t\t=> \"dd-mm-yy\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"showSecond\" \t\t=> true, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"timeFormat\" \t\t=> 'hh:mm:ss',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'show_button_panel' => true),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('tabindex'=> 25,'readonly'=>false)),\n\t\t\t\t'no_of_rooms' \t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 26)),\n\t\t\t\t'room_cost' \t\t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 27)),\n\t\t\t\t\n\t\t\t\t'special_instruction'\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 28)),\n\t\t\t\t'receipt_number' \t\t=> new sfWidgetFormInputText(array(), array('maxlength' => 255,'tabindex'=> 29)),\n \t));\n \t\n \t\n \t\n\t\tif(sfContext::getInstance()->getUser()->isSuperAdmin())\n\t\t{\n\t\t\t$this->widgetSchema['country_id'] = new sfWidgetFormChoice(\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray('choices' => array('' => $asWidgets['country_id']) + $this->asCountryList),\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray('tabindex'=>1, 'onChange' => \"callAjaxRequest(this.value,'\".url_for('facilitybooking/getCementryListAsPerCountry').\"','facilitybooking_cementery_list');\")\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\tif($this->isNew())\n\t\t\t\t$this->setDefault('country_id', $this->snDefaultCountryId);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$snCemeteryId = sfContext::getInstance()->getUser()->getAttribute('cemeteryid');\n\t\t\t$oCemetery = Doctrine::getTable('CemCemetery')->find($snCemeteryId);\n\t\t\t$this->widgetSchema['country_id'] = new sfWidgetFormInputHidden(array(), array('value' => $oCemetery->getCountryId(),'readonly' => 'true'));\n\t\t\t$this->widgetSchema['cem_cemetery_id'] = new sfWidgetFormInputHidden(array(), array('value' => $snCemeteryId,'readonly' => 'true'));\n\t\t\t\n\t\t\t$this->widgetSchema['chapel_grouplist']\t= new sfWidgetFormChoice(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('multiple' => true,'choices' => $this->amAllChapelTypes, 'default' => array_keys($this->amChapleAssociated) ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('tabindex'=> 17)\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t\t$this->widgetSchema['room_grouplist']\t= new sfWidgetFormChoice(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('multiple' => true, 'choices' => $this->amAllRoomTypes, 'default' => array_keys($this->amRoomAssociated) ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('tabindex'=> 22)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t$this->setDefault('cem_cemetery_id',$snCemeteryId);\t\t\t\n\t\t\t$this->setDefault('country_id',$oCemetery->getCountryId());\n\t\t} \t\n \t\n\t\tif($this->isNew()){\n\t\t\t$this->setDefault('chapel_time_from', date('d-m-Y H:i:s'));\n\t\t\t$this->setDefault('chapel_time_to', date('d-m-Y H:i:s'));\n\t\t\t$this->setDefault('room_time_from', date('d-m-Y H:i:s'));\n\t\t\t$this->setDefault('room_time_to', date('d-m-Y H:i:s'));\n\t\t}else {\n\t\t\t$this->setDefault('chapel_time_from', date('d-m-Y H:i:s',strtotime($this->getObject()->getChapelTimeFrom())));\n\t\t\t$this->setDefault('chapel_time_to', date('d-m-Y H:i:s',strtotime($this->getObject()->getChapelTimeTo())));\n\t\t\t$this->setDefault('room_time_from', date('d-m-Y H:i:s',strtotime($this->getObject()->getRoomTimeFrom())));\n\t\t\t$this->setDefault('room_time_to', date('d-m-Y H:i:s',strtotime($this->getObject()->getRoomTimeTo())));\n\t\t}\t\t\n\n $this->widgetSchema->setNameFormat('facilitybooking[%s]'); \n }", "private static function _get_active_content_types()\n\t{\n\t\t$data = get_option( CCTM::db_key );\n\t\tif ( !empty($data) && is_array($data) )\n\t\t{\n\t\t\t$known_post_types = array_keys($data);\n\t\t\t$active_post_types = array();\n\t\t\tforeach ($known_post_types as $pt)\n\t\t\t{\n\t\t\t\tif ( isset($data[$pt]['is_active']) && $data[$pt]['is_active'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$active_post_types[] = $pt;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $active_post_types;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t}", "function my_et_builder_post_types( $post_types ) {\n $post_types[] = 'listing';\n\n return $post_types;\n}", "private function loadSubWidgets()\n {\n $subWidgets = [];\n // get widgets for the fields\n foreach ($this->fields as $index => $field) :\n $subWidgets[$index] = $field->widget;\n endforeach;\n\n $this->widget->setSubWidgets($subWidgets);\n }", "public function loadWidgetData(){\n\t\tswitch($this->input->get('widget_id')){\n\t\t\tcase 3:\n\t\t\t\t$data = array(\n\t\t\t\t\t'color' => 'blue_green',\n\t\t\t\t\t'icon' => 'fa-check-square-o',\n\t\t\t\t\t'value1' => 'Bloog Glucose',\n\t\t\t\t\t'value2' => '223',\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$data = array(\n\t\t\t\t\t'color' => 'blue_green',\n\t\t\t\t\t'icon' => 'fa-check-square-o',\n\t\t\t\t\t'value1' => 'Unknown widget',\n\t\t\t\t\t'value2' => '?',\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t\t$this->ajaxResponse($data);\n\t}", "function siteorigin_panels_options_field_post_types( $panels_post_types ){\n\t$all_post_types = array_values( array_merge( array( 'page' => 'page', 'post' => 'post' ), get_post_types( array( '_builtin' => false ) ) ) );\n\n\t// These are post types we know we don't want to show\n\t$all_post_types = array_diff($all_post_types, array(\n\t\t// Meta Slider\n\t\t'ml-slider'\n\t) );\n\n\tforeach($all_post_types as $type){\n\t\t$info = get_post_type_object($type);\n\t\tif(empty($info->labels->name)) continue;\n\t\t$checked = in_array(\n\t\t\t$type,\n\t\t\t$panels_post_types\n\t\t);\n\n\t\t?>\n\t\t<label>\n\t\t\t<input type=\"checkbox\" name=\"siteorigin_panels_post_types[<?php echo esc_attr($type) ?>]\" <?php checked($checked) ?> />\n\t\t\t<?php echo esc_html($info->labels->name) ?>\n\t\t</label><br/>\n\t\t<?php\n\t}\n\n\t?><p class=\"description\">Post types that will have the page builder available</p><?php\n}", "function widgets_icons($widgets){\n\t$widgets['SiteOrigin_Panels_Widgets_Layout']['icon'] = 'dashicons dashicons-analytics';\n\t$widgets['button']['icon'] = 'dashicons dashicons-admin-links';\n\t$widgets['SiteOrigin_Widget_GoogleMap_Widget']['icon'] = 'dashicons dashicons-location-alt';\n\treturn $widgets;\n}", "public static function getPostTypesWithCatsForClient(){\r\n\t\t$arrPostTypes = RevSliderFunctionsWP::getPostTypesWithCats();\r\n\r\n\t\t$globalCounter = 0;\r\n\r\n\t\t$arrOutput = array();\r\n\t\tforeach($arrPostTypes as $postType => $arrTaxWithCats){\r\n\r\n\t\t\t$arrCats = array();\r\n\t\t\tforeach($arrTaxWithCats as $tax){\r\n\t\t\t\t$taxName = $tax[\"name\"];\r\n\t\t\t\t$taxTitle = $tax[\"title\"];\r\n\t\t\t\t$globalCounter++;\r\n\t\t\t\t$arrCats[\"option_disabled_\".$globalCounter] = \"---- \".$taxTitle.\" ----\";\r\n\t\t\t\tforeach($tax[\"cats\"] as $catID=>$catTitle){\r\n\t\t\t\t\t$arrCats[$taxName.\"_\".$catID] = $catTitle;\r\n\t\t\t\t}\r\n\t\t\t}//loop tax\r\n\r\n\t\t\t$arrOutput[$postType] = $arrCats;\r\n\r\n\t\t}//loop types\r\n\r\n\t\treturn($arrOutput);\r\n\t}" ]
[ "0.7318295", "0.72710973", "0.68388367", "0.6704475", "0.66627747", "0.6440505", "0.6228853", "0.6199707", "0.61488533", "0.6118774", "0.6072267", "0.60693485", "0.60111624", "0.5997781", "0.58919805", "0.58465445", "0.58134866", "0.57845575", "0.57830346", "0.5772307", "0.57701176", "0.57617515", "0.5733569", "0.57293", "0.5700577", "0.5700464", "0.5700464", "0.5688712", "0.56678736", "0.5647615", "0.5645466", "0.5638173", "0.563704", "0.5606403", "0.56063616", "0.5589031", "0.55866045", "0.55769014", "0.5552141", "0.55449855", "0.55385286", "0.5515873", "0.551343", "0.54938215", "0.54847664", "0.5463777", "0.54572105", "0.54556835", "0.54520065", "0.5444202", "0.5436586", "0.54269063", "0.54159063", "0.5415636", "0.5414627", "0.54078865", "0.5392293", "0.5376617", "0.53714794", "0.53712803", "0.537113", "0.5371006", "0.5370562", "0.5362461", "0.5343227", "0.53414166", "0.5335949", "0.5333701", "0.5331753", "0.5312677", "0.530839", "0.53039694", "0.52937263", "0.5282359", "0.52798194", "0.5279004", "0.527179", "0.5266968", "0.5260311", "0.52573127", "0.52510697", "0.5245752", "0.52385527", "0.5231626", "0.5228977", "0.5226485", "0.52246696", "0.52181447", "0.52149266", "0.5212404", "0.5208132", "0.52073795", "0.5203081", "0.52026314", "0.51995426", "0.5199265", "0.51981986", "0.5197155", "0.5192826", "0.51887757", "0.5188756" ]
0.0
-1
Getting all roles for all users page Also gets roles that the current user can manage and in his estate in the system>users page
public static function getRolesForUsers($userRole , $system = false) { // Getting id and role name and site id $result = RoleModel::select('id', 'role' , 'site_id') ->where('id' ,'!=' , 0); $rolesToManage = self::getManagedRoles($userRole, $system); $result = $result->whereIn('id' , $rolesToManage) ->get() ->toArray(); $roles = []; // Setting up the dropdownlist as the key will be the role id and the value would be the role name and the site id between brackets foreach ($result as $row) { $roles[$row['id']] = $row['role']. ($row['site_id'] ? ' (' . $row['site_id'] .')' : ''); } return $roles; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllRoles(){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllRoles();\r\n }", "private function get_all_roles(){\n return Role::all();\n }", "public function getAllRoles()\n {\n $id = $this->get(TableFactory::getUserModel()\n ->getPrimaryKey());\n\n return Cache::remember(sprintf(Constants::CACHE_ROLES, $id), function() use ($id) {\n return TableFactory::getRoleModel()\n ->find()\n ->matching('Users', function(Query $query) use ($id) {\n return $query->where(['Users.id' => $id]);\n })\n ->toArray();\n });\n }", "public function get_all_roles()\n {\n return App\\Role::all();\n }", "public function getRoles()\n {\n #obsolete, I don't wnat user roles, I want the permission those roles are linked to\n # so I just need a getPermissions once, store those constants in a small session array\n #$roles = $this->roles;\n\n #d($roles);\n\n #foreach ($roles as $role) {\n # echo $role->name;\n #}\n }", "public function get_all_roles(){\n\t\treturn ORM::factory('role')->find_all()->as_array();\n\t}", "public function getAllRoles(): array;", "function get_all_roles() {\n return get_records('role', '', '', 'sortorder ASC');\n}", "public function getAllRoles()\n {\n return \\EntityManager::getRepository('stoykov\\Ohrana\\Models\\Doctrine\\Role')->findAll();\n }", "public function retrieveAllRoles()\n {\n return $this->invoker->getAllRoles($this->factory->createNewRolesObject());\n\n }", "public function getAllRoles()\n {\n return $this->roles;\n }", "public function roleListAll() {\n $this->_adminUserDao = new AdminUserDao();\n\n $ret = array();\n $roles = $this->_adminroledao->getAll();\n foreach ($roles as $role) {\n $user = $this->_adminUserDao->getRow(array(array('username', '=', $role->owner)));\n if($user){\n $ret[$role->owner]['role'][] = $role;\n $ret[$role->owner]['user'] = $user;\n }else{\n if($role->owner == config('admin.user.super_user.username')){\n $ret[$role->owner]['role'][] = $role;\n// $ret[$role->owner]['user'] = (new AdminUserDao())->fill(config('admin.user.super_user'));\n// $ret[$role->owner]['user'] = $this->_adminUserDao->getRow(array(array('id', '=', config('admin.user\n $ret[$role->owner]['user']['username'] = $role->owner;\n }\n }\n }\n return $ret;\n }", "public function rolesForUser();", "public function getAll()\n {\n try{\n return $this->roles;\n }\n catch (\\Exception $exception)\n {\n return null;\n }\n }", "public function index()\n {\n $users = User::get()->load('roles');\n return $users;\n }", "protected function getRoles() {\n return $this->roleStorage->loadMultiple();\n }", "public function index()\n {\n $roles = App\\User::find(1)->roles()->orderBy('name')->get();\n }", "abstract protected function getRoles();", "public function get_roles()\n {\n $users_roles = user_role_active_record::search()->where('uid', $this->uid)->exec();\n $roles = array();\n foreach ($users_roles as $users_role) {\n $roles[] = role_active_record::search()->where('rid', $users_role->rid)->execOne();\n }\n return $roles;\n }", "public function getRoles() {\n return DB::table('dx_users_roles as ur')\n ->join('dx_roles as r', 'r.id', '=', 'ur.role_id')\n ->select('r.id', 'r.title', DB::raw('COUNT(*) as total_users'))\n ->where('r.is_system', '=', '0')\n ->groupBy('r.id')\n ->orderBy('r.title')\n ->get();\n }", "public function getRoles()\n {\n $id = Auth::id();\n $roles = \\App\\Models\\User::find($id)->roles;\n\n return $roles;\n }", "public function getUserRoles()\n {\n return $this->userRoles;\n }", "public function getRoles()\n {\n return $this->userRoles->toArray();\n /*$roles = array();\n foreach ($this->userRoles as $role) {\n $roles[] = $role->getRole();\n }\n\n return $roles;*/\n }", "public function getAllRoles()\n {\n return $this->repository->getAllRoles();\n }", "public function getUsersRoles()\n\t{\n\t\t$db = $this->getDbTable()->getAdapter();\n\t\t$select = $db->select()\n\t\t\t->from(array('u' => 'users'), array('user_id', 'name', 'surname', 'patronymic'))\n\t\t\t->joinLeft(array('ur' => 'users_roles'),\n\t\t\t\t'ur.user_id = u.user_id', array('role_id'));\n\t\treturn $db->fetchAll($select);\t\n\t}", "public static function getUserRoles()\n\t{\n\t\treturn ArrayHelper::map(UserRoles::find()->where(['is_active'=> Yii::$app->params['IS_ACTIVE']['ACTIVE']])->asArray()->all(), 'id', 'name');\n\t}", "public function getRoles()\n\t{\n\t\t$roles = $this->role_gestion->all();\n\n\t\treturn view('back.users.roles', compact('roles'));\n\t}", "public function getUserRoles()\n {\n if (!ConfigHelper::cacheEnabled()) {\n return $this->getCurrentUserRoles();\n }\n\n $cacheKey = 'laravelroles_roles_' . Users::userModelCacheKey() . '_' . $this->getKey();\n\n return Cache::remember($cacheKey, ConfigHelper::cacheExpiryTime(), function () {\n return $this->getCurrentUserRoles();\n });\n }", "public function getRoles()\n {\n return $this->hasMany(AuthRole::className(), ['id' => 'role_id'])->viaTable('auth_user_role', ['user_id' => 'id']);\n }", "public function & GetRoles ();", "public function getAll()\n {\n return $this->roles->whereStatus(1)->orderBy('id', 'desc')->get();\n }", "public function listRoles($user) {\n return $user->roles;\n }", "public function getRoles()\n {\n\n $rolesReturn = [];\n $roles = $this->roles()->with(['role'])->get();\n\n $rolesReturn = $roles->pluck('role.name');\n\n // Add Standard role to the user roles\n\n if($rolesReturn->contains(config('user.standardRole')) === false)\n {\n $rolesReturn->push(config('user.standardRole'));\n }\n\n return $rolesReturn;\n\n }", "public function getAuthUserRoles()\n {\n return $this->hasMany(AuthUserRole::className(), ['user_id' => 'id']);\n }", "private function getRoles()\n\t{\n\t\tif (!isset($this->roles)) {\n\t\t\t$this->roles = $this->roles()\n\t\t\t\t->with('permissions')\n\t\t\t\t->withCount('users')\n\t\t\t\t->get();\n\t\t}\n\t\treturn $this->roles;\n\t}", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "private static function getUserRole(): array\n\t{\n\t return self::getUser()->roles;\n\t}", "public function findRoles() {\n\t\t\n\t}", "public function getRoles(): array;", "public function all()\n {\n $roles = collect($this->table()->where('user_id', $this->user->id())->get());\n\n if ($roles->isEmpty()) {\n return collect();\n }\n\n return $roles; // todo: groups\n }", "public function getRoles(){\n\n $roles = $this->visiteur_roles->map(function($role){\n return $role->getTitle();\n })->ToArray();\n\n $roles[]= 'ROLE_USER';\n \n return $roles;\n }", "public function getRoles() {\n $ds = \\dibi::dataSource(\"\n SELECT r.*, rr.name AS parent_name\n FROM users_roles AS r\n LEFT JOIN users_roles AS rr ON rr.id = r.parent_id\n \");\n\n return $ds;\n }", "public static function roles(){\n self::init();\n\n return array_keys(AUTH_USER_ROLES);\n }", "public function roles()\n {\n $this->roles = $this->Role->list($_SESSION['guild_id']);\n }", "public function get_roles() {\n return DB::query(Database::SELECT, 'SELECT * FROM roles WHERE id > 1')\n ->as_object()\n ->execute($this->db);\n }", "public function roles()\n {\n\n return Role::all();\n }", "public function getRoles(){\n $db = new MainModel();\n $query = \"SELECT r.id as idRol, r.name as nameRol from roles as r\";\n return $response = $db->consultQueryAll($query);\n }", "public function ObtenerRolesSupeAdmin()\r\n {\r\n return Rol::all();\r\n }", "function get_role_list() {\n\t\treturn $this->db->get('system_security.security_role');\n\t\t\n\t}", "public function getCurrentUserRoles()\n {\n $this->load([\n 'roles' => function($query) {\n $query->active()\n ->whereNull('expires_at')\n ->orWhere('expires_at', '>', Carbon::now());\n },\n ]);\n\n return $this->roles;\n }", "function getRoles () {\n return array(\"user.image.edit\",\"user.image.view\");\n }", "public function getRoles(){\n $sql = \"SELECT * FROM rol\";\n\n foreach ($this->bd->query($sql) as $res) {\n $this->rol[] = $res;\n }\n return $this->rol;\n }", "static public function get_all_roles() {\n\t\tif ( ! function_exists( 'get_editable_roles' ) ) {\n\t\t\trequire_once( ABSPATH . 'wp-admin/includes/user.php' );\n\t\t}\n\n\t\t$editable_roles = get_editable_roles();\n\t\t$roles = array();\n\t\t$caps = apply_filters( 'fl_builder_user_access_capabilities', array( 'edit_posts' ) );\n\n\t\tforeach ( $editable_roles as $role => $data ) {\n\t\t\tforeach ( $caps as $cap ) {\n\t\t\t\tif ( isset( $data['capabilities'][ $cap ] ) && 1 == $data['capabilities'][ $cap ] ) {\n\t\t\t\t\t$roles[ $role ] = $data['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $roles;\n\t}", "public function setRoles()\n {\n if (!array_key_exists(User::ROLE_ADMINISTRATOR, Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId()))) {\n $array = Yii::$app->authManager->getRoles();\n unset($array[self::ADMINISTRATOR]);\n } else {\n $array = Yii::$app->authManager->getRoles();\n }\n\n $roles = ArrayHelper::map(Yii::$app->authManager->getRoles(), 'name', 'name');\n\n $now = Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId());\n\n //unset($roles[array_search('super_administrator', $roles)]);\n unset($roles[array_search('user', $roles)]);\n\n foreach ($roles as $key => $role) {\n $roles[$key] = Yii::t('backend', $role);\n }\n\n if (array_key_exists(User::ROLE_CUSTOMER, Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId()))) {\n $key = array_search(User::ROLE_CUSTOMER, $roles);\n $roles = array_intersect_key($roles, [$key => $roles[$key]]);\n }\n\n return $roles;\n }", "public function getRoles()\n {\n $roles = Role::all();\n\n return Datatables::of($roles)\n ->editColumn('routes', function ($role) {\n return htmlentities(strlen($role->getOriginal('routes')) > 50 ? substr($role->getOriginal('routes'), 0, 50) : $role->getOriginal('routes'));\n })\n ->addColumn('actions', function ($role) {\n $editBtn = '<a style=\"margin-right: 0.2em;\" href=\"' . url('admin/roles/' . $role->id . '/edit/') . '\" title=\"Edit\"><i class=\"fa fa-2 fa-pencil\"></i></a>';\n $deleteBtn = '';\n if ($role->name != 'Admin') {\n $deleteBtn = '&nbsp;<a href=\"' . url('admin/roles/' . $role->id) . '\" class=\"message_box text-danger\" data-box=\"#message-box-delete\" data-action=\"DELETE\" title=\"Permanent Delete\"><i class=\"fa fa-2 fa-remove\"></i></i></a>';\n }\n return $editBtn . $deleteBtn;\n })->make(true);\n }", "function get_user_roles()\n{\n $roles = get_acl()->getRoles();\n foreach ($roles as $key => $val) {\n $roles[$val] = __(Inflector::humanize($val));\n unset($roles[$key]);\n }\n return $roles;\n}", "function getUserRoles()\n {\n $this->db->select('roleId, role');\n $this->db->from('tbl_roles');\n $this->db->where('roleId !=', 1);\n $query = $this->db->get();\n \n return $query->result();\n }", "function getUserRoles()\n {\n $this->db->select('roleId, role');\n $this->db->from('tbl_roles');\n $this->db->where('roleId !=', 1);\n $query = $this->db->get();\n \n return $query->result();\n }", "function getAllUsersWithRoles() {\n $statement = 'SELECT user.id, username, role, email, banned FROM user INNER JOIN \n role_lov role_lov ON user.role_id = role_lov.id ORDER BY user.id';\n $query = $this->prepare($statement);\n $query->execute();\n return $query->fetchAll();\n }", "private function get_current_roles() {\n\t\tif (isset($this->current_user_roles)) {\n\t\t\treturn $this->current_user_roles;\n\t\t}\n\n\t\t$user_info = wp_get_current_user();\n\n\t\t$this->current_user_roles = !empty($user_info->roles) ?\n\t\t\t$user_info->roles :\n\t\t\tarray('guest');\n\n\t\treturn $this->current_user_roles;\n\t}", "public function roles()\n {\n return response()->json(['roles' => UserRole::getRoleList()]);\n }", "function getUserRoles()\n {\n $this->db->select('roleId, role');\n $this->db->from('user_roles');\n $this->db->where('roleId !=', 1);\n $query = $this->db->get();\n \n return $query->result();\n }", "public function index()\n {\n return Roles::all();\n }", "public static function getAll()\n {\n return Role::with(['permissions'])->get();\n }", "function get_all_user_role()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('user_role')->result_array();\n }", "function getRoles () {\n return array(\"user.friendRequest.edit\",\"user.friendRequest.view\");\n }", "function allroles()\n\t{\n\t\t// take the last role id\n\t\t$offset = $this->input->get('offset') ? $this->input->get('offset') : 0;\n\t\t// fetch 10 role from server\n\t\t$perpage = 10;\n\t\t// take search parameters\n\t\t$query['search'] = $this->input->get('search');\n\n\t\t// response object\n\t\t$jsonData = array('success' => false, 'data' => array(), 'links' => '');\n\n\t\t// total rows in roles table according to search query\n\t\t$total_rows = $this->role_model->fetch_total_role_rows($query);\n\t\t// fetch 10 roles start from 'offset' where query\n\t\t$roles = $this->role_model->fetch_all_roles($perpage, $offset, $query);\n\t\t// config data to create pagination\n\t\t$obj = array(\n\t\t\t'base_url' => base_url().'role/allroles/',\n\t\t\t'per_page' => $perpage,\n\t\t\t'uri_segment' => 2,\n\t\t\t'total_rows' => $total_rows\n\t\t);\n\t\t/**\n\t\t * if roles is not empty\n\t\t * @response object\n\t\t * \t success => everything all right\n\t\t * data => rolelist\n\t\t * \t links => pagination links\n\t\t */\n\t\tif (count($roles) > 0) {\n\t\t\t$jsonData['success'] = true;\n\t\t\t$jsonData['data'] = $roles;\n\t\t\t$jsonData['links'] = $this->custom->paginate($obj);\n\t\t}\n\t\t// responde send\n\t\techo json_encode($jsonData);\n\t}", "public function getRoles() {\n return $this->getRelation(\"roles\");\n }", "public function index()\n {\n return Role::all();\n }", "public function index()\n {\n return Role::all();\n }", "public static function getUserRole(){\n\t\t$db = DemoDB::getConnection();\n $sql = \"SELECT *\n FROM user_role\";\n $stmt = $db->prepare($sql);\n $ok = $stmt->execute();\n if ($ok) {\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }\n\t}", "public function roles();", "public function roles();", "public function roles();", "public function roles();", "public function getRoles(): iterable\n {\n return [];\n }", "public function getRoles()\r\n {\r\n return $this->roles;\r\n }", "public function getAllRoles() {\n $path = base_url();\n $url = $path . 'api/admin/Admin_api/getAllRoles';\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n // authenticate API\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);\n curl_setopt($ch, CURLOPT_USERPWD, API_USER . \":\" . API_PASSWD);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTPGET, 1);\n $output = curl_exec($ch);\n //close cURL resource\n curl_close($ch);\n $response = json_decode($output, true);\n //print_r($output);die();\n return $response;\n }", "public function getRoles()\n {\n\n $roles = $this->roles;\n // guarantee every user at least has ROLE_USER\n $roles[] = 'ROLE_USER';\n return array_unique($roles);\n\n //throw new \\Exception('Method getRoles() is not implemented.');\n }", "protected function getRoles(): array\n {\n $output = [];\n $options = [];\n $options['unlimited'] = true;\n $options['where'] = [\n 'userrole_priority' => '< 10000',\n ];\n $options['sortOrders'] = [['sort' => 'userrole_priority', 'order' => 'ASC']];\n $UserRolesDb = new \\Rdb\\Modules\\RdbAdmin\\Models\\UserRolesDb($this->Container);\n $output['listRoles'] = $UserRolesDb->listItems($options);\n\n unset($options, $UserRolesDb);\n return $output;\n }", "public static function getCurrentUserRoles()\r\n {\r\n if(Yii::app()->user->isGuest)\r\n return array('guest'=>Yii::t('MenubuilderModule.messages','Guest'));\r\n else\r\n return array('authenticated'=>Yii::t('MenubuilderModule.messages','Authenticated user'));\r\n }", "function get_all_roles()\n {\n $this->db->order_by('role', 'asc');\n return $this->db->get('tbl_roles')->result_array();\n }", "function get_roles(){\n\t\t$this->db->select('*');\n\t\t$q = $this->db->get('user_role');\n\n\t\treturn $q->result_array();\n\t}", "public function getRoles() {\n return array('ROLE_USER');\n }", "public function indexRoles()\n {\n\n $users = User::with('roles')\n ->whereNotIn('id', [1, auth()->user()->id])\n ->orderBy('created_at', 'asc')\n ->paginate(10);\n\n $roles = Role::all();\n\n return view('admin.roles.assign', compact('users', 'roles'));\n }", "public function getRoles()\n {\n return array('ROLE_USER');\n }", "public function getRoles()\n {\n return array('ROLE_USER');\n }", "public function getRoles(){\n\n return $this->_arrRoles;\n \n }", "static function getUserRoles($application=\"all\"){\n $result = Array();\n return $result;\n }", "public function get_roles()\n {\n $query=$this->db->get('tbl_roles');\n return $query->result();\n }", "public function getRoles()\n\t{\n\t\treturn $this->roles->toArray();\n\t}", "public function getRoles() \n {\n return $this->roles;\n }", "public function getRoles(): array\n {\n $roles = $this->userRoles->map(function($role){\n return $role->getTitle();\n })->toArray();\n\n $roles[] = 'ROLE_USER';\n // guarantee every user at least has ROLE_USER\n //$roles[] = 'ROLE_USER';\n\n return $roles;\n }", "function getListRoleCurUser() {\n $userRoleModel = new UserRoleModel();\n $userId = isset($this->curUserInfo->id)? $this->curUserInfo->id: 0;\n $result = $userRoleModel->filterUserId($userId)->buildCond()->get();\n $retVal = [];\n if((int)$result->count() > 0){\n $retVal = $result->pluck('role')->toArray();\n }\n return $retVal;\n }", "public function getManageRoles()\n {\n $roles = Role::orderBy('id', 'asc')->paginate(10);\n return view('adminlte.pages.admin.manage-roles', compact('roles'));\n }", "public function getRoles()\n {\n return $this->getMemberRoles()->toArray();\n }", "public function getRoles()\n {\n return $this->getRelation('roles');\n }", "public function getRoles()\n {\n $roles = Role::lists('name','id');\n\n return $roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }" ]
[ "0.81732506", "0.80759096", "0.8057559", "0.7959857", "0.79342175", "0.7845392", "0.7789526", "0.7775129", "0.7741722", "0.7731037", "0.77181286", "0.76908153", "0.7643663", "0.7601832", "0.7586477", "0.75755", "0.75644255", "0.7561339", "0.7547973", "0.75365", "0.75161767", "0.7513532", "0.75128436", "0.74963003", "0.7482636", "0.7475288", "0.74564445", "0.7443563", "0.7398508", "0.7393969", "0.7388007", "0.73837453", "0.73765755", "0.7372425", "0.73681045", "0.7366243", "0.7366243", "0.7366243", "0.7361336", "0.7361103", "0.7342634", "0.7338293", "0.7325812", "0.7316383", "0.7309166", "0.7290347", "0.7283421", "0.7283375", "0.72812605", "0.72762764", "0.7268894", "0.7244877", "0.7242055", "0.72365594", "0.72204316", "0.72131735", "0.7196803", "0.71850103", "0.7174614", "0.7174614", "0.71684635", "0.71683836", "0.71645796", "0.71645737", "0.7158535", "0.7151472", "0.7145802", "0.71444756", "0.7140617", "0.7128387", "0.7124389", "0.7124389", "0.7112944", "0.7110449", "0.7110449", "0.7110449", "0.7110449", "0.7109969", "0.71043617", "0.7100218", "0.7097448", "0.70893323", "0.70871514", "0.708207", "0.70815283", "0.707772", "0.70710254", "0.70707977", "0.70707977", "0.70651144", "0.7064803", "0.70637745", "0.7055183", "0.7052081", "0.70515794", "0.70510024", "0.7042395", "0.704044", "0.7031906", "0.70287913", "0.7022918" ]
0.0
-1
Widgets for current permission level Uses the role id to get all widgets linked to the role
public static function getAllowedWidgets($roleId = null) { if(is_null($roleId)) $roleId = session('admin.user.role_id'); // Getting an array of the widgets allowed to the current role_id $allowedWidgets = PermissionModel::where('role_id', $roleId) ->where('permission', 'like', 'widgets.%') ->get() ->pluck('permission') ->map(function($permission){ return explode('.', $permission)[1];}) ->toArray(); // Searching the widgets for the widget title and getting its role_widget data too $widgetsWithRoleWidgets = self::getWidgetsWithRoleWidgets($allowedWidgets, $roleId); return $widgetsWithRoleWidgets; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roles_dashboard_update_widget_definitions() {\n\n\t$widget_types = elgg_get_widget_types('all', true);\n\tforeach ($widget_types as $handler => $options) {\n\t\t$context = $options->context;\n\t\t$context[] = 'dashboard';\n\t\t$context = array_unique($context);\n\t\telgg_register_widget_type($handler, $options->name, $options->description, $context, $options->multiple);\n\t}\n\n\t$roles = roles_get_all_selectable_roles();\n\n\t$widget_types = elgg_get_widget_types('dashboard', true);\n\tforeach ($widget_types as $handler => $options) {\n\t\t$context = $options->context;\n\t\tforeach ($roles as $role) {\n\t\t\t$context[] = \"role::{$role->name}\";\n\t\t}\n\t\t$context = array_unique($context);\n\t\telgg_register_widget_type($handler, $options->name, $options->description, $context, $options->multiple);\n\t}\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 }", "protected function retrieve_widgets()\n {\n }", "protected function retrieve_widgets()\n {\n }", "public function widgets($params) {\n include_once 'common/widget/WidgetLayoutManager.class.php';\n if ($params['owner_type'] == WidgetLayoutManager::OWNER_TYPE_USER) {\n if ($this->_userCanViewWidget('admindelegation')) {\n include_once 'AdminDelegation_UserWidget.class.php';\n $params['codendi_widgets'][] = 'admindelegation';\n }\n if ($this->_userCanViewWidget('admindelegation_projects')) {\n include_once 'AdminDelegation_ShowProjectWidget.class.php';\n $params['codendi_widgets'][] = 'admindelegation_projects';\n }\n }\n }", "public function widget_privileges()\n {\n $site_id = Model_Site::current()->id;\n if ($site_id === NULL)\n {\n return $this->_widget_error('Выберите портал!');\n }\n\n $order_by = $this->request->param('acl_prorder', 'position');\n $desc = (bool) $this->request->param('acl_prdesc', '0');\n\n $privileges = Model::fly('Model_Privilege')->find_all_by_site_id($site_id, array(\n 'order_by' => $order_by,\n 'desc' => $desc\n ));\n\n // Set up view\n $view = new View('backend/privileges');\n\n $view->order_by = $order_by;\n $view->desc = $desc;\n\n $view->privileges = $privileges;\n\n return $view->render();\n }", "protected function get_widgets()\n {\n }", "public function get_available_widgets()\n {\n }", "public function widgets() {\r\n\t\t// Make sure the user has capability.\r\n\t\tif ( Permission::user_can( 'analytics' ) || ! is_admin() ) {\r\n\t\t\t// Most popular contents.\r\n\t\t\tregister_widget( Widgets\\Popular::instance() );\r\n\t\t}\r\n\t}", "private static function getWidgetsWithRoleWidgets($widgets, $roleId)\n\t{\n\t\t$resultArray = [];\n\n\t\t$widgetsWithRoleWidgets = WidgetModel::whereIn('title', $widgets)\n\t\t\t->with(['RoleWidget' => function($q) use ($roleId){\n\t\t\t\t$q->where('role_id', $roleId);\n\t\t\t}])\n\t\t\t->get()\n\t\t\t->toArray();\n\n\t\t// Handling multiple routes per widget\n\t\tarray_map(function($widget) use(&$resultArray){\n\t\t\t$explodedRoutes = explode(',', $widget['routes']);\n\n\t\t\t// If the widget has many routes i.e. comma separated values\n\t\t\tif( count($explodedRoutes) > 1)\n\t\t\t{\n\t\t\t\t// Explode them and create a new item per widget with the new route\n\t\t\t\tforeach ($explodedRoutes as $route)\n\t\t\t\t{\n\t\t\t\t\t$widget['routes'] = $route;\n\t\t\t\t\t$resultArray[] = $widget;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\t$resultArray[] = $widget;\n\t\t}, $widgetsWithRoleWidgets);\n\n\n\t\t// Array Map to remove un-related role_widgets\n\t\t$resultArray = array_map(function($widgetWithRoleWidget){\n\t\t\t$currectRoute = $widgetWithRoleWidget['routes'];\n\n\t\t\t// If there is many role_widgets we need to delete the ones that is not related to the route of the current widget\n\t\t\tif(count($widgetWithRoleWidget['role_widget']) > 1)\n\t\t\t\t// Looping in the role_widget array that comes from the widgets->with('role_widget')\n\t\t\t\tforeach($widgetWithRoleWidget['role_widget'] as $key=>$roleWidget)\n\t\t\t\t\t// If the role_widget has different route than the one we are handling then remove it\n\t\t\t\t\tif($roleWidget['route'] != $currectRoute)\n\t\t\t\t\t\t// Removing un-related role_widget since it has a wrong order and is causing issues\n\t\t\t\t\t\tunset($widgetWithRoleWidget['role_widget'][$key]);\n\n\t\t\t// Rebasing the array $widgetWithRoleWidget['role_widget'] because some items were removed\n\t\t\t$widgetWithRoleWidget['role_widget'] = array_values($widgetWithRoleWidget['role_widget']);\n\t\t\treturn $widgetWithRoleWidget;\n\t\t},$resultArray);\n\n\t\treturn $resultArray;\n\t}", "public function widgets()\n {\n\t\t//Many To Many (Polymorphic)\n return $this->morphToMany(Widget::class, 'widgetable');\n }", "function roles_dashboard_default_widget_contexts($hook, $type, $return, $params) {\n\n\t$roles = roles_get_all_selectable_roles();\n\tif (empty($roles)) {\n\t\treturn;\n\t}\n\n\tforeach ($roles as $role) {\n\t\t// We are not configuring the event information here as we will need to apply some custom logic,\n\t\t// i.e. check relationship between a specific role and a dashboard\n\t\t// @see roles_dashboard_create_default_widgets\n\t\t$return[] = array(\n\t\t\t'name' => $role->getDisplayName(),\n\t\t\t'widget_context' => \"role::{$role->name}\",\n\t\t\t'widget_columns' => ROLES_DASHBOARD_NUM_COLUMNS,\n\t\t);\n\t}\n\n\treturn $return;\n}", "public function uultra_get_custom_widgets_membership($package_id)\r\n\t{\t\t\r\n\t\t\r\n\t\tif(!get_option('userultra_custom_user_widgets_package_'.$package_id.''))\r\n\t\t{\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets');\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets_package_'.$package_id.'');\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $custom_widgets;\r\n\t\t\r\n\t\r\n\t}", "function get_list_widget_admin()\n {\n global $active_modules;\n\n $result = [];\n /**\n * List widgets of Admin\n */\n $result['Admin'] = config('Admin::widget.admin');\n\n /**\n * List widgets of Modules\n */\n if ($active_modules) {\n foreach ($active_modules as $mod) {\n $result[$mod] = config($mod . '::widget.admin');\n }\n }\n\n return $result;\n }", "public function eventRmcommonDashboardRightWidgets(){\n global $xtAssembler, $xtFunctions;\n\n if (!isset($GLOBALS['xtAssembler']))\n $xtAssembler = new XtAssembler();\n\n if ( !$xtAssembler->isSupported() )\n return;\n\n $theme = $xtAssembler->theme();\n\n RMTemplate::get()->add_style('rmc-dashboard.css', 'xthemes');\n\n ?>\n <div class=\"cu-box\">\n <div class=\"box-header\">\n <span class=\"fa fa-caret-up box-handler\"></span>\n <h3><?php _e('Appearance','rmcommon'); ?></h3>\n </div>\n <div class=\"box-content collapsable\" id=\"xthemes-options\">\n <img src=\"<?php echo XOOPS_THEME_URL; ?>/<?php echo $theme->getInfo('dir'); ?>/<?php echo $theme->getInfo('screenshot'); ?>\" class=\"img-thumbnail\">\n <ul class=\"nav nav-pills nav-justified nav-options\">\n <li>\n <a href=\"<?php echo XOOPS_URL; ?>/modules/xthemes/themes.php\" title=\"<?php _e('Manage Themes', 'xthemes'); ?>\" rel=\"tooltip\">\n <span class=\"fa fa-th-large\"></span>\n </a>\n </li>\n <?php if(method_exists($theme, 'controlPanel')): ?>\n <li>\n <a rel=\"tooltip\" href=\"<?php echo XOOPS_URL; ?>/modules/xthemes/theme.php\" title=\"<?php echo sprintf(__('%s Control Panel', 'xthemes'), $theme->getInfo('name')); ?>\">\n <span class=\"fa fa-dashboard\"></span>\n </a>\n </li>\n <?php endif; ?>\n <?php if($xtAssembler->rootMenus()): ?>\n <li>\n <a href=\"<?php echo XOOPS_URL; ?>/modules/xthemes/navigation.php\" title=\"<?php _e('Menu Maker', 'xthemes'); ?>\" rel=\"tooltip\">\n <span class=\"fa fa-bars\"></span>\n </a>\n </li>\n <?php endif; ?>\n <?php if($theme->options()): ?>\n <li>\n <a href=\"<?php echo XOOPS_URL; ?>/modules/xthemes/settings.php\" title=\"<?php _E('Theme Settings', 'xthemes'); ?>\" rel=\"tooltip\">\n <span class=\"fa fa-wrench\"></span>\n </a>\n </li>\n <?php endif; ?>\n </ul>\n <small><?php echo $theme->getInfo('description'); ?></small>\n <?php if( $theme->getInfo('social') ): ?>\n <hr>\n <ul class=\"nav nav-pills xthemes-social\">\n <?php foreach( $theme->getInfo('social') as $type => $link ): ?>\n <li>\n <a href=\"<?php echo $link; ?>\" target=\"_blank\">\n <?php echo $xtFunctions->social_icon( $type ); ?>\n </a>\n </li>\n <?php endforeach; ?>\n </ul>\n <?php endif; ?>\n </div>\n </div>\n <?php\n }", "public function getWidgets()\n {\n return $this->widgets;\n }", "public function getWidgets()\n {\n return $this->_widgets;\n }", "public function getWidgets()\n\t\t{\n\t\t\tif(!isset($this->id))\n\t\t\t\treturn FALSE;\n\t\t\t\n\t\t\tglobal $conn;\n\t\t\tglobal $SERVICENTER_WIDGETS;\n\t\t\t\n\t\t\t$g = $conn->prepare(\"SELECT position,widget FROM ServiCenter_Workspace_Widget WHERE workspace = ?\");\n\t\t\t$g->bindParam(1, $this->id);\n\t\t\t$g->execute();\n\t\t\t\n\t\t\t$widgets = [];\n\t\t\t\n\t\t\tforeach($g->fetchAll() as $widgetData)\n\t\t\t{\n\t\t\t\tif(isset($SERVICENTER_WIDGETS[$widgetData['widget']]))\n\t\t\t\t{\n\t\t\t\t\t$widgets[] = [$widgetData['position'], $SERVICENTER_WIDGETS[$widgetData['widget']][0]];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $widgets;\n\t\t}", "function getWidgets() {\n \t$returnArray = array();\n \tforeach($this->_widgetRegistry as $name => $item) {\n \t\t$returnArray[] = array('name' => $name, 'description' => $item['description']);\n \t}\n \treturn $returnArray;\n }", "public function get_profile_widgets()\r\n\t{\r\n\t\t\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t$user_id = get_current_user_id();\r\n\t\t\r\n\t\t$widgets = array();\r\n\t\t\r\n\t\t//get user package id\r\n\t\t$package_id = get_user_meta($user_id, 'usersultra_user_package_id', true);\r\n\t\t\r\n\t\tif($package_id!='') //user is under a membership pacakge\r\n\t\t{\r\n\t\t\t//get package\r\n\t\t\t$package = $xoouserultra->paypal->get_package($package_id);\r\n\t\t\t\r\n\t\t\t//get widgets layout for this package\r\n\t\t\t$widgets = get_option('userultra_default_user_tabs_package_'.$package_id.'');\r\n\t\t\t\r\n\t\t\t//custom layout package\r\n\t\t\t$custom_package_layout = true;\r\n\t\t\t\t\t\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t$custom_package_layout = false;\t\t\t\t\t\t\r\n\t\t\t$widgets = get_option('userultra_default_user_tabs');\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$html = '';\r\n\t\tforeach($widgets as $key => $widget)\r\n\t\t{\r\n\t\t\t\r\n\t\t\t//check if is in column\t\t\t\r\n\t\t\tif($this->check_if_active($key))\r\n\t\t\t{\r\n\t\t\t\tif(!$this->uultra_check_if_unused_widget($key) && !$custom_package_layout)\r\n\t\t\t\t{\r\n\t\t\t\r\n\t\t\t\t\t$html .= '<li class=\"uultra-profile-widget ui-state-default rounded\" id=\"'.$key.'\"><a class=\"uultra-btn-widget-elements\" href=\"#\" widget-id=\"'.$key.'\"><span><i class=\"fa '.$widget[\"icon\"].' fa-2x\"></i></span>'.$widget[\"title\"].' <span class=\"uultra-widgets-icon-close-open\" id=\"uultra-widgets-icon-close-open-id-'.$key.'\" style=\"background-position: 0px 0px;\" widget-id=\"'.$key.'\"></span></a>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$html .= '<div id=\"uultra-widget-adm-cont-id-'.$key.'\" class=\"uultra-widget-user-options-cont\" style=\"display:none\">';\r\n\t\t\t\t\t//get widget options\t\t\t\t\t\r\n\t\t\t\t\t$html .= $this->get_widget_customization_options($key);\r\n\t\t\t\t\t$html .= '</div>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$html .= '</li>';\r\n\t\t\t\t\t\r\n\t\t\t\t}elseif(!$this->uultra_check_if_unused_widget_settings($key, $package_id) && $custom_package_layout){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$html .= '<li class=\"uultra-profile-widget ui-state-default rounded\" id=\"'.$key.'\"><a class=\"uultra-btn-widget-elements\" href=\"#\" widget-id=\"'.$key.'\"><span><i class=\"fa '.$widget[\"icon\"].' fa-2x\"></i></span>'.$widget[\"title\"].' <span class=\"uultra-widgets-icon-close-open\" id=\"uultra-widgets-icon-close-open-id-'.$key.'\" style=\"background-position: 0px 0px;\" widget-id=\"'.$key.'\"></span></a>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$html .= '<div id=\"uultra-widget-adm-cont-id-'.$key.'\" class=\"uultra-widget-user-options-cont\" style=\"display:none\">';\r\n\t\t\t\t\t//get widget options\t\t\t\t\t\r\n\t\t\t\t\t$html .= $this->get_widget_customization_options($key);\r\n\t\t\t\t\t$html .= '</div>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$html .= '</li>';\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}\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\treturn $html;\r\n\t\t\r\n\t}", "function roles_dashboard_create_default_widgets($event, $type, $entity) {\n\n\tif ($entity->getSubtype() != MultiDashboard::SUBTYPE) {\n\t\treturn;\n\t}\n\n\t$default_widget_info = elgg_get_config('default_widget_info');\n\n\tif (!$default_widget_info || !$entity->roles_context) {\n\t\treturn;\n\t}\n\n\t// need to be able to access everything\n\t$ia = elgg_set_ignore_access(true);\n\telgg_push_context('create_default_widgets');\n\n\t// pull in by widget context with widget owners as the site\n\t// not using elgg_get_widgets() because it sorts by columns and we don't care right now.\n\t$options = array(\n\t\t'type' => 'object',\n\t\t'subtype' => 'widget',\n\t\t'owner_guid' => elgg_get_site_entity()->guid,\n\t\t'private_setting_name' => 'context',\n\t\t'private_setting_value' => $entity->roles_context,\n\t\t'limit' => 0\n\t);\n\n\t$widgets = elgg_get_entities_from_private_settings($options);\n\t/* @var \\ElggWidget[] $widgets */\n\n\tforeach ($widgets as $widget) {\n\t\t// change the container and owner\n\t\t$new_widget = clone $widget;\n\t\t$new_widget->container_guid = $entity->owner_guid;\n\t\t$new_widget->owner_guid = $entity->owner_guid;\n\n\t\t// pull in settings\n\t\t$settings = get_all_private_settings($widget->guid);\n\n\t\tforeach ($settings as $name => $value) {\n\t\t\t$new_widget->$name = $value;\n\t\t}\n\n\t\tif ($new_widget->save()) {\n\t\t\t// Add to dashboard\n\t\t\tadd_entity_relationship($new_widget->guid, MultiDashboard::WIDGET_RELATIONSHIP, $entity->guid);\n\t\t}\n\t}\n\n\twidget_manager_update_fixed_widgets($entity->roles_context, $entity->owner_guid);\n\n\telgg_set_ignore_access($ia);\n\telgg_pop_context();\n}", "function wp_list_widgets()\n {\n }", "public function get_widgets() {\n\n $sidebar_name = sidebar\\Sidebar::get_sidebar_name();\n \n global $wp_registered_widgets;\n\n $sidebars_widgets = get_option( 'sidebars_widgets' );\n\n $sidebar_widgets = [];\n if ( array_key_exists( $sidebar_name, $sidebars_widgets ) ) {\n\n foreach( $sidebars_widgets[$sidebar_name] as $key => $value ) {\n $widget_id = $value;\n $widget_parts = explode( '-', $widget_id );\n $widget_base_id = $widget_parts[0];\n $widget_number = $widget_parts[1];\n $options = get_option( 'widget_' . $widget_base_id );\n\n $widget_title = '';\n if ( is_array( $options[$widget_number] ) ) {\n\n if ( array_key_exists( 'title', $options[$widget_number] ) && !empty( $options[$widget_number]['title'] ) ) {\n $widget_title = $options[$widget_number]['title'];\n }\n else {\n foreach ( $wp_registered_widgets as $w => $rwidget ) {\n if ( $w == $widget_id ) {\n $widget_title = $rwidget['name']; \n }\n else {\n if ($widget_title == '') {\n $widget_title = $widget_id; \n }\n }\n }\n }\n }\n $sidebar_widgets[] = [ $widget_id => $widget_title ];\n }\n\n }\n\n \n return $sidebar_widgets;\n\n }", "public function getPermissionByRoleID($id);", "public function getWidgets(){\n $return = [];\n foreach ($this->widgets as $key => $value) {\n $namespance = str_replace([base_path(\"modules\"),base_path(\"contents/templates\"),'.php','/'], ['Modules','Themes','','\\\\'], $value);\n $namespance = str_replace('Themes\\default', 'Themes\\_default', $namespance);\n if(class_exists($namespance) && method_exists($namespance, \"register\")){\n $paths = str_replace(base_path().'/','',$value);\n $ado = [];\n $ado = with(new $namespance)->register();\n $ado[\"paths\"] = $paths;\n $return[$namespance] = $ado;\n }\n }\n return $return;\n }", "public function getRolePermissions($role_id)\r\n {\r\n $permissions = $this->AdminRoleModel->getPermissions($role_id);\r\n echo $this->load->view('admin/roles/permissions-select', compact('permissions'), TRUE);\r\n }", "function portal_add_dashboard_widgets() {\n\n if(current_user_can('publish_portal_projects')) {\n\n wp_add_dashboard_widget(\n 'portal_dashboard_overview', // Widget slug.\n 'Projects', // Title.\n 'portal_dashboard_overview_widget_function' // Display function.\n );\n\n\t\twp_add_dashboard_widget(\n\t\t\t'portal_dashboard_timing',\n\t\t\t'Project Calendar',\n\t\t\t'portal_dashboard_calendar_widget'\n\t\t);\n\n }\n\n}", "public function getWidgetMenu(){\n $layout = $this->getLayout();\n $widgetType = Yii::app()->controller instanceof TopicsController ?\n 'topics' : 'recordView';\n $layoutName = $widgetType.'WidgetLayout';\n $recordViewWidgetLayout = $this->$layoutName;\n\n $hiddenRecordViewWidgetMenu = '';\n foreach ($recordViewWidgetLayout as $widgetClass => $settings) {\n if ($settings['hidden']) {\n $hiddenRecordViewWidgetMenu .=\n '<li>\n <span class=\"x2-hidden-widgets-menu-item '.$widgetType.'-widget\" \n id=\"'.$widgetClass.'\">'.\n CHtml::encode ($settings['label']).\n '</span>\n </li>';\n }\n }\n\n // used to determine where section dividers should be placed\n $hiddenCenter = $hiddenRecordViewWidgetMenu !== '';\n $hiddenRight = !empty ($layout['hiddenRight']);\n\n $menu = '<div id=\"x2-hidden-widgets-menu\">';\n $menu .= '<ul id=\"x2-hidden-recordView-widgets-menu\" \n class=\"x2-hidden-widgets-menu-section\">';\n $menu .= $hiddenRecordViewWidgetMenu;\n $menu .= '</ul>';\n $menu .= '<ul id=\"x2-hidden-right-widgets-menu\" class=\"x2-hidden-widgets-menu-section\">';\n $menu .= '<li '.(($hiddenCenter && $hiddenRight) ? '' : 'style=\"display: none;\"').\n 'class=\"x2-hidden-widgets-menu-divider\"></li>';\n foreach($layout['hiddenRight'] as $name => $widget){\n $menu .= '<li><span class=\"x2-hidden-widgets-menu-item widget-right\" id=\"'.$name.'\">'.\n $widget['title'].'</span></li>';\n }\n $menu .= '</ul>';\n $menu .= '</div>';\n\n return $menu;\n }", "private function drawPermissions($menu, $roleId, $level = 0)\n {\n $this->id++;\n if(!is_array($menu)) \n {\n return;\n }\n \n $ret = $ret . \"<ul class='permission \"\n . ($level==0?\"root-permission\":\"sub-permission\")\n . \" permission-level-$level' id='permission-{$this->id}'>\";\n\n foreach($menu as $item)\n {\n $link = is_array($item[\"permissions\"]) ? \"<b>{$item[\"title\"]}</b>\" : \"<a href='{$this->urlPath}/permissions/$roleId{$item[\"path\"]}'>{$item[\"title\"]}</a>\";\n\n $ret = $ret . \"<li $style $extra >$link\";\n\n if(is_array($item[\"permissions\"]))\n {\n $this->save = \"<div id='fapi-submit-area'><input type='submit' value='Save'/>\";\n $ret =$ret . \"<div class='permission-box' style='padding-bottom:20px;width:500px'>\n <table width='100%'>\n <thead><tr><td width='50%'></td><td><center>Enabled</center></td><td><center>Disabled</center></td></tr></thead>\";\n foreach($item[\"permissions\"] as $permission)\n {\n $permissionName = str_replace(\".\", \"_\", $permission[\"name\"]);\n $enableChecked = User::getPermission($permissionName, $roleId) == true ? \"checked='checked'\" : \"\";\n $disabledChecked = User::getPermission($permissionName, $roleId) == true ? \"\" : \"checked='checked'\";\n \n $ret .= \"<tr>\n <td>{$permission[\"label\"]}</td>\n <td><center><input type='radio' name='{$permission[\"name\"]}[]' value='1' $enableChecked /></center></td>\n <td>\n <center><input type='radio' name='{$permission[\"name\"]}[]' value='0' $disabledChecked /></center>\n <input type='hidden' name='{$permission[\"name\"]}[]' value = '{$item[\"path\"]}' />\n </td>\n </tr>\";\n }\n $ret .= \"</table></div>\";\n }\n\n if(count($item[\"children\"]>0))\n {\n $ret = $ret \n . $this->drawPermissions($item[\"children\"],$roleId,$level+1);\n }\n $ret = $ret . \"</li>\";\n }\n\n $ret = $ret . \"</ul>\";\n return $ret;\n }", "protected function getWidget()\n {\n $widgets = $this->getPage()->findAll('css', 'body div.filter-container ul.ui-multiselect-checkboxes');\n\n /** @var NodeElement $widget */\n foreach ($widgets as $widget) {\n if ($widget->isVisible()) {\n return $widget;\n }\n }\n\n self::fail('Could not find widget on page or it\\'s not visible');\n }", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function list()\n\t{\n\t\treturn $this->widgets()->orderBy('order')->get();\n\t}", "public function getAvailableWidgets()\r\n {\r\n }", "function roles_dashboard_widget_layout_permissions_check($hook, $type, $return, $params) {\n\n\t$user = elgg_extract('user', $params);\n\t$context = elgg_extract('context', $params);\n\n\tif (strpos($context, 'role::') === 0) {\n\t\treturn $user && $user->isAdmin();\n\t}\n}", "function retrieve_widgets($theme_changed = \\false)\n {\n }", "public static function getWidgets(): ?array\n {\n return collect(Filament::getWidgets())\n ->filter(function ($widget) {\n if (Utils::isGeneralExcludeEnabled()) {\n return ! in_array(Str::afterLast($widget, '\\\\'), Utils::getExcludedWidgets());\n }\n\n return true;\n })\n ->reduce(function ($widgets, $widget) {\n $prepend = Str::of(Utils::getWidgetPermissionPrefix())->append('_');\n $name = Str::of(class_basename($widget))\n ->prepend($prepend);\n\n $widgets[\"{$name}\"] = \"{$name}\";\n\n return $widgets;\n }, collect())\n ->toArray();\n }", "public function Widgets()\n\t{\n\t\treturn $this->hasMany('ThunderID\\Widboard\\Models\\PersonWidget');\n\t}", "function wp_list_widget_controls($sidebar, $sidebar_name = '')\n {\n }", "public function getWidgetListing(){\t\n\t\t$query = 'SELECT '.DB_PREFIX.'widget_category.name AS \"category\", '.DB_PREFIX.'languages.prefix AS \"language\", '.DB_PREFIX.'widget.alias AS \"alias\", '.DB_PREFIX.'widget.language_id AS \"language_id\", '.DB_PREFIX.'widget.id AS \"id\", '.DB_PREFIX.'widget.status AS \"status\", '.DB_PREFIX.'widget.category_id AS \"category_id\", '.DB_PREFIX.'widget.name AS \"name\", '.DB_PREFIX.'widget.data AS \"data\" FROM '.DB_PREFIX.'widget LEFT JOIN '.DB_PREFIX.'languages ON '.DB_PREFIX.'languages.id = '.DB_PREFIX.'widget.language_id LEFT JOIN '.DB_PREFIX.'widget_category ON '.DB_PREFIX.'widget.category_id = '.DB_PREFIX.'widget_category.id ORDER BY '.DB_PREFIX.'widget_category.name ASC, '.DB_PREFIX.'languages.prefix ASC;';\n\t\t$rs = $this->reg->get('db')->query($query);\n\t\tif($rs->num_rows){\n\t\t\treturn $rs->rows;\n\t\t\t}\n\t\treturn false;\n\t\t}", "public static function get_all_widgets() {\r\n\t\t$ret = array(\r\n\t\t\tself::WIDGET_ACCORDION,\r\n\t\t\tself::WIDGET_DATEPICKER,\r\n\t\t\tself::WIDGET_DIALOG,\r\n\t\t\tself::WIDGET_PROGRESSBAR,\r\n\t\t\tself::WIDGET_SLIDER,\r\n\t\t\tself::WIDGET_TABS,\r\n\t\t\tself::WIDGET_AUTOCOMPLETE\r\n\t\t);\r\n\t\tif (self::is_version_1_8_or_higher()) {\r\n\t\t\t$ret[] = self::WIDGET_BUTTON; \r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "public function getRolePermissions()\n {\n $headers = ['Ability', 'Role'];\n\n $role_name = $this->argument('needle');\n\n $role = $this->permission->findBy('role_name', $role_name);\n if ($role) {\n $permissions = json_to_array($role->permission);\n\n if (!is_array($permissions)) {\n $permissions = [];\n }\n\n foreach ($permissions as $module=>$permission) {\n $this->warn(\"\\n\" . strtoupper($module));\n $data = [];\n\n foreach ($permission as $ability=>$perm) {\n $vals = [$module, $ability];\n if (is_bool($perm)) {\n if ($perm) {\n $vals[] = 'true';\n } else {\n $vals[] = 'false';\n }\n }\n if (is_string($perm)) {\n $vals[] = $perm;\n }\n $data[] = $vals;\n }\n $this->table($headers, $data);\n }\n\n } else {\n $this->error(\"No role found!\");\n }\n }", "public function run()\n {\n $currentUser = Auth::user();\n if (!empty($currentUser)) {\n if ($currentUser->role == '2') {\n $public = Rooms::where('type','public')->get();\n $private = $currentUser->rooms()->where('type','private')->get();\n $listRoomPL = collect([$public, $private]);\n $listRoomPL = $listRoomPL->collapse();\n } else {\n $listRoomPL = \\App\\Models\\Rooms::all();\n }\n }\n return view('frontend.widgets.list_rooms', [\n 'config' => $this->config,\n 'listRoomPL' => $listRoomPL,\n ]);\n }", "private function _get_permissions_section_settings() {\r\n\r\n // Get all user roles\r\n global $wp_roles;\r\n\r\n if(!isset($wp_roles))\r\n $wp_roles = new WP_Roles();\r\n\r\n $allUserRoles = $wp_roles->get_names();\r\n\r\n return array(\r\n\r\n array(\r\n 'title' => __( 'Permissions Options' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'title',\r\n 'desc' => '',\r\n 'id' => 'wwof_permissions_main_title'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'User Role Filter' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'multiselect',\r\n 'desc' => __( 'Only allow a given user role/s to access the wholesale page. Left blank to disable filter.' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_user_role_filter',\r\n 'class' => 'chosen_select',\r\n 'css' => 'min-width:300px;',\r\n 'custom_attributes' => array(\r\n 'multiple' => 'multiple',\r\n 'data-placeholder' => __( 'Select Some User Roles...' , 'woocommerce-wholesale-order-form' )\r\n ),\r\n 'options' => $allUserRoles\r\n ),\r\n\r\n array(\r\n 'type' => 'sectionend',\r\n 'id' => 'wwof_permissions_role_filter_sectionend'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Access Denied Message' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'title',\r\n 'desc' => __( 'Message to display to users who do not have permission to access the wholesale order form.' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_permissions_noaccess_section_title'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Title' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'text',\r\n 'desc' => __( 'Defaults to <b>\"Access Denied\"</b> if left blank' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_noaccess_title',\r\n 'css' => 'min-width: 400px;'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Message' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'wwof_editor',\r\n 'desc' => __( 'Defaults to <b>\"You do not have permission to view wholesale product listing\"</b> if left blank' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_noaccess_message',\r\n 'css' => 'min-width: 400px; min-height: 100px;'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Login URL' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'text',\r\n 'desc' => __( 'URL of the login page. Uses default WordPress login URL if left blank' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_permissions_noaccess_login_url',\r\n 'css' => 'min-width: 400px;'\r\n ),\r\n\r\n array(\r\n 'type' => 'sectionend',\r\n 'id' => 'wwof_permissions_sectionend'\r\n )\r\n\r\n );\r\n\r\n }", "public function getDafaultsWidgets()\r\n {\r\n\r\n $widgets = array();\r\n\r\n return $widgets;\r\n }", "protected function get_views() {\n\t\tglobal $role;\n\n\t\t$wp_roles = wp_roles();\n\n\t\t$url = admin_url( 'admin.php?page=itsec&module=user-security-check' );\n\t\tif ( $this->is_site_users ) {\n\t\t\tswitch_to_blog( $this->site_id );\n\t\t\t$users_of_blog = count_users();\n\t\t\trestore_current_blog();\n\t\t} else {\n\t\t\t$users_of_blog = count_users();\n\t\t}\n\n\t\t$total_users = $users_of_blog['total_users'];\n\t\t$avail_roles =& $users_of_blog['avail_roles'];\n\t\tunset($users_of_blog);\n\n\t\t$class = empty($role) ? ' class=\"current\"' : '';\n\t\t$role_links = array();\n\t\t$role_links['all'] = \"<a href='$url' data-role=''$class>\" . sprintf( _nx( 'All <span class=\"count\">(%s)</span>', 'All <span class=\"count\">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>';\n\t\tforeach ( $wp_roles->get_names() as $this_role => $name ) {\n\t\t\tif ( !isset($avail_roles[$this_role]) )\n\t\t\t\tcontinue;\n\n\t\t\t$class = '';\n\n\t\t\tif ( $this_role === $role ) {\n\t\t\t\t$class = ' class=\"current\"';\n\t\t\t}\n\n\t\t\t$name = translate_user_role( $name );\n\t\t\t/* translators: User role name with count */\n\t\t\t$name = sprintf( __('%1$s <span class=\"count\">(%2$s)</span>'), $name, number_format_i18n( $avail_roles[$this_role] ) );\n\t\t\t$role_links[$this_role] = \"<a href='\" . esc_url( add_query_arg( 'role', $this_role, $url ) ) . \"' data-role='\" . esc_attr( $this_role ) . \"'$class>$name</a>\";\n\t\t}\n\n\t\tif ( ! empty( $avail_roles['none' ] ) ) {\n\n\t\t\t$class = '';\n\n\t\t\tif ( 'none' === $role ) {\n\t\t\t\t$class = ' class=\"current\"';\n\t\t\t}\n\n\t\t\t$name = __( 'No role' );\n\t\t\t/* translators: User role name with count */\n\t\t\t$name = sprintf( __('%1$s <span class=\"count\">(%2$s)</span>'), $name, number_format_i18n( $avail_roles['none' ] ) );\n\t\t\t$role_links['none'] = \"<a href='\" . esc_url( add_query_arg( 'role', 'none', $url ) ) . \"' data-role='none'$class>$name</a>\";\n\n\t\t}\n\n\t\treturn $role_links;\n\t}", "function wp_render_widget_control($id)\n {\n }", "public function loadWidgets($params)\r\n {\r\n $ret = array();\r\n \r\n $dashboardId = $params['dashboardId'];\r\n \r\n if($dashboardId)\r\n {\r\n $dashObj = CAntObject::factory($this->ant->dbh, \"dashboard\", $dashboardId, $this->user);\r\n $ret = $dashObj->getWidgets();\r\n }\r\n \r\n $this->sendOutput($ret);\r\n return $ret;\r\n }", "public function getWidget($widgetId);", "public function getWidgetsByContext($context)\r\n {\r\n }", "public function getWidgetList()\n { \n $widgets = HomePageWidget::where('status', HomePageWidget::ACTIVE)->where('type', HomePageWidget::TYPE_SLIDER)->orderBy('id', 'asc')->take(3)->get();\n return $widgets;\n }", "public function uulra_reload_all_widgets_admin()\r\n\t{\r\n\t\t$html = '';\t\r\n\t\t\r\n\t\t$widgets_ids = array();\t\r\n\t\t\r\n\t\t$widgets_col = $this->mWidgetsCol;\t\t\r\n\t\t$widgets_ids = get_option('uultra_profile_widget_col_1');\t\t\r\n\t\t\r\n\t\t$unused = false;\r\n\t\t\r\n\t\tif(isset($_POST[\"unused\"]))\r\n\t\t{\r\n\t\t\t$unused = true;\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(!$unused)\r\n\t\t{\t\t\r\n\t\t\r\n\t\t//col 1\t\t\r\n\t\t$html .= '<ul id=\"uultra-profile-widgets-available\" class=\"uultra-connectedSortable uultra-admin-available-widgets\">';\r\n\t\t\r\n\t\tforeach($widgets_ids as $key)\r\n\t\t{\r\n\t\t\t$widget = $widgets_col[$key];\t\t\t\r\n\t\t\t$html .= $this->get_admin_widget_template($widget, $key);\t\t\r\n\t\t\r\n\t\t}//end for each\r\n\t\t\r\n\t\t$html .= ' </ul> ';\r\n\t\t\r\n\t\t//col 2\t\t\r\n\t\t$html .= '<ul id=\"uultra-profile-widgets-available-2\" class=\"uultra-connectedSortable uultra-admin-available-widgets\">';\r\n\t\t\r\n\t\t$widgets_ids = get_option('uultra_profile_widget_col_2');\r\n\t\t\r\n\t\tforeach($widgets_ids as $key)\r\n\t\t{\r\n\t\t\t$widget = $widgets_col[$key];\t\t\t\r\n\t\t\t$html .= $this->get_admin_widget_template($widget, $key);\t\t\t\r\n\t\t\r\n\t\t}//end for each\r\n\t\t\r\n\t\t$html .= ' </ul> ';\r\n\t\t\r\n\t\t//col 3\t\t\r\n\t\t$html .= '<ul id=\"uultra-profile-widgets-available-3\" class=\"uultra-connectedSortable uultra-admin-available-widgets\">';\r\n\t\t\r\n\t\t$widgets_ids = get_option('uultra_profile_widget_col_3');\r\n\t\t\r\n\t\tforeach($widgets_ids as $key)\r\n\t\t{\r\n\t\t\t$widget = $widgets_col[$key];\t\t\t\r\n\t\t\t$html .= $this->get_admin_widget_template($widget, $key);\r\n\t\t\t\r\n\t\t\r\n\t\t}//end for each\r\n\t\t\r\n\t\t$html .= ' </ul> ';\t\r\n\t\t\r\n\t\t\r\n\t\t}else{ //unused only\r\n\t\t\r\n\t\t\r\n\t\t\tforeach($widgets_col as $key => $widget)\r\n\t\t\t{\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t$html .= $this->get_admin_widget_template($widget, $key,$unused );\t\t\t\t\r\n\t\t\t\r\n\t\t\t}//end for each\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\techo $html;\t\t\r\n\t\tdie();\r\n\t\t\r\n\t}", "function widget_permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'widget')) {\n\t\treturn $return;\n\t}\n\n\tif ($params['entity']->getContext() != 'pinboards') {\n\t\treturn $return;\n\t}\n\n\tif (elgg_get_config('au_sets_widget_noedit')) {\n\t\treturn false;\n\t}\n\n\treturn $return;\n}", "public function getAllControls();", "public function registerDashboardWidgets()\n {\n return [];\n }", "public function getWidgets() {\n\t\t$widgets = array();\n\t\tif ($this->hasParameter('widgets')) {\n\t\t\tforeach ($this->getParameter('widgets') as $name => $widget) {\n\t\t\t\t$widgets[$name] = $this->getTranslator()->trans($widget['label']);\n\t\t\t}\n\t\t}\n\t\treturn $widgets;\n\t}", "function layout_builder_post_update_update_permissions() {\n foreach (Role::loadMultiple() as $role) {\n if ($role->hasPermission('configure any layout')) {\n $role->grantPermission('create and edit custom blocks')->save();\n }\n }\n}", "public static function getWidgets($name) {\n add_filter('dynamic_sidebar_params', 'NpShortcodes::paramsFilter');\n ob_start();\n dynamic_sidebar($name);\n $content = ob_get_clean();\n remove_filter('dynamic_sidebar_params', 'NpShortcodes::paramsFilter');\n\n $data = explode('</widget>', $content);\n $widgets = array();\n for ($i = 0; $i < count($data); $i++) {\n $widget = $data[$i];\n if (!$widget) {\n continue;\n }\n\n $id = null;\n $name = null;\n $class = null;\n $title = null;\n\n if (preg_match('/<widget(.*?)>/', $widget, $matches)) {\n if (preg_match('/id=\"(.*?)\"/', $matches[1], $ids)) {\n $id = $ids[1];\n }\n if (preg_match('/name=\"(.*?)\"/', $matches[1], $names)) {\n $name = $names[1];\n }\n if (preg_match('/class=\"(.*?)\"/', $matches[1], $classes)) {\n $class = $classes[1];\n }\n $widget = preg_replace('/<widget[^>]+>/', '', $widget);\n\n if (preg_match('/<title>(.*)<\\/title>/', $widget, $matches)) {\n $title = $matches[1];\n $widget = preg_replace('/<title>.*?<\\/title>/', '', $widget);\n }\n }\n $widget = str_replace('<ul class=\"product-categories\">', '<ul>', $widget);\n\n $widgets[] = array(\n 'id' => $id,\n 'name' => $name,\n 'class' => $class,\n 'title' => $title,\n 'content' => $widget\n );\n }\n return $widgets;\n }", "function wise_chat_widget_channel_users() {\n\tWiseChatContainer::get('WiseChatWidgetChannelUsers');\n\treturn register_widget(\"WiseChatWidgetChannelUsers\");\n}", "public function getWidgetInfos($id){\t\n\t\t$query = 'SELECT '.DB_PREFIX.'widget_category.name AS \"category\", '.DB_PREFIX.'widget.alias AS \"alias\", '.DB_PREFIX.'widget.language_id AS \"language_id\", '.DB_PREFIX.'widget.id AS \"id\", '.DB_PREFIX.'widget.status AS \"status\", '.DB_PREFIX.'widget.category_id AS \"category_id\", '.DB_PREFIX.'widget.name AS \"name\", '.DB_PREFIX.'widget.data AS \"data\" FROM '.DB_PREFIX.'widget LEFT JOIN '.DB_PREFIX.'widget_category ON '.DB_PREFIX.'widget_category.id = '.DB_PREFIX.'widget.category_id WHERE '.DB_PREFIX.'widget.id = \"'.$id.'\" LIMIT 0,1;';\n\t\t$rs = $this->reg->get('db')->query($query);\n\t\tif($rs->num_rows){\n\t\t\treturn $rs->rows[0];\n\t\t\t}\n\t\treturn false;\n\t\t}", "function my_add_dashboard_widgets() {\n $user = wp_get_current_user();\n if ( ! $user->has_cap( 'manage_options' ) ) {\n wp_add_dashboard_widget( 'my_dashboard_welcome', 'Benvenuto', 'my_add_welcome_widget' );\n }\n}", "public function getSidebars()\n {\n $sidebarsJson = $this->runWpCliCommand('sidebar', 'list', ['format' => 'json', 'fields' => 'id']);\n $sidebars = json_decode($sidebarsJson);\n $sidebarIds = array_map(function ($sidebar) {\n return $sidebar->id;\n }, $sidebars);\n $sidebarIds = array_filter($sidebarIds, function ($id) {\n return $id != 'wp_inactive_widgets';\n });\n return $sidebarIds;\n }", "public function getPermissionRoleByRoleID($id);", "function get_role_permission($role_id) {\n\t\t$sql = \"SELECT p.*, rp.entry_id, rp.allow_deny \"\n\t\t\t. \"FROM system_security.security_permission p \"\n\t\t\t. \"LEFT JOIN system_security.security_role_permission rp ON(rp.permission_id = p.permission_id AND rp.role_id = $role_id) \"\n\t\t\t. \"ORDER BY p.permission_id\";\n\t\treturn $this->db->query($sql);\n\t}", "public static function getWidget($id)\n {\n return (array) BackendModel::getContainer()->get('database')->getRecord(\n 'SELECT i.*\n FROM slideshow_widgets AS i\n WHERE i.id = ?',\n array((int) $id)\n );\n }", "public function widgets()\n {\n return view('pages.widgets');\n }", "public function get_widget_object($id_base)\n {\n }", "public function getByRole($id)\n {\n $permissions = $this->getBaseQuery()\n ->join('prv_role_permissions', 'prv_role_permissions.id_permission = prv_permissions.id')\n ->join('prv_roles', 'prv_role_permissions.id_role = prv_roles.id')\n ->where('prv_roles.id', $id);\n\n return $permissions->get()->result_array();\n }", "public function permissions_callback(){\n $wp_roles = new WP_Roles();\n\t\t$roles = $wp_roles->get_names();\n $checked_values = !isset($this->general_options['permissions']) ? array(BK_DEFAULT_ROLE) : $this->general_options['permissions'];\n\n\t\tforeach ($roles as $role_value => $role_name) {\n\t\t\t$checked = $role_value == 'administrator' || in_array($role_value, $checked_values) ? 'checked' : '';\n\n\t\t\techo '<p><input type=\"checkbox\"'.disabled(\"administrator\", $role_value, false).' name=\"fo_general_options[permissions][]\" value=\"' . $role_value . '\" '.$checked.'>'.translate_user_role($role_name).'</input></p>';\n \t\t}\n }", "public function getWidgetConfigs()\n {\n return $this->widgets;\n }", "function wpscSupportTickets_main_add_dashboard_widgets() {\r\n $this->checkPermissions();\r\n wp_add_dashboard_widget('wpscSupportTickets_main_dashboard_widgets', __('IDB Support Tickets Overview', 'wpsc-support-tickets'), array(&$this, 'wpscSupportTickets_main_dashboard_widget_function'));\r\n \r\n }", "public function getSupportWidgetList()\n { \n $widgets = HomePageWidget::where('status', HomePageWidget::ACTIVE)->where('type', HomePageWidget::TYPE_SUPPORT)->orderBy('id', 'asc')->take(3)->get();\n return $widgets;\n }", "public function actionPermissions()\n\t{\n\t\t$dataProvider = new RPermissionDataProvider('permissions',array(\n\t\t\t\t'pagination'=>array(\n\t\t\t\t\t\t'pageSize'=>5,\n\t\t\t\t),\n\t\t));\n\t\t// Get the roles from the data provider\n\t\t$roles = $dataProvider->getRoles();\n\t\t$roleColumnWidth = $roles!==array() ? 75/count($roles) : 0;\n\n\t\t// Initialize the columns\n\t\t$columns = array(\n\t\t\tarray(\n \t\t\t'name'=>'description',\n\t \t\t'header'=>Rights::t('core', 'Item'),\n\t\t\t\t'type'=>'raw',\n \t\t\t'htmlOptions'=>array(\n \t\t\t\t'class'=>'permission-column',\n \t\t\t\t'style'=>'width:25%',\n\t \t\t),\n \t\t),\n\t\t);\n\n\t\t// Add a column for each role\n \tforeach( $roles as $roleName=>$role )\n \t{\n \t\t$columns[] = array(\n\t\t\t\t'name'=>strtolower($roleName),\n \t\t\t'header'=>$role->getNameText(),\n \t\t\t'type'=>'raw',\n \t\t\t'htmlOptions'=>array(\n \t\t\t\t'class'=>'role-column',\n \t\t\t\t'style'=>'width:'.$roleColumnWidth.'%',\n \t\t\t),\n \t\t);\n\t\t}\n\n\t\t$view = 'permissions';\n\t\t$params = array(\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t'columns'=>$columns,\n\t\t);\n\n\t\t// Render the view\n\t\tisset($_POST['ajax'])===true ? $this->renderPartial($view, $params) : $this->render($view, $params);\n\t}", "public function getAllTabAsPerRole($role_id)\n\t{\n\t\t$this->db->select('a.*, b.*');\n\t\t$this->db->from('tbl_user_permission a'); \n\t\t$this->db->join('tbl_sidebar_tabs b','a.tab_id = b.tab_id','inner');\n\t\t$this->db->where('a.role_id', $role_id);\n\t\t$this->db->where('b.status', 1);\n\t\t$this->db->order_by('b.tab_number', 'ASC');\n\t\t$query = $this->db->get();\t\t\n\t\treturn $query->result() ;\n\t}", "public function listPermissionByRole()\n {\n $roles = $this->roleRepository->all();\n $permissions = $this->permissionRepository->all();\n return view('admin.permission.permission_role', compact('roles', 'permissions'));\n }", "public function getWidgets($sidebar)\n {\n $widgetsJson = $this->runWpCliCommand('widget', 'list', [$sidebar, 'format' => 'json', 'fields' => 'id']);\n $widgets = json_decode($widgetsJson);\n $widgetIds = array_map(function ($widget) {\n return $widget->id;\n }, $widgets);\n return $widgetIds;\n }", "function get_roles_with_capability($capability, $permission=NULL, $context='') {\n\n global $CFG;\n\n if ($context) {\n if ($contexts = get_parent_contexts($context)) {\n $listofcontexts = '('.implode(',', $contexts).')';\n } else {\n $sitecontext = get_context_instance(CONTEXT_SYSTEM);\n $listofcontexts = '('.$sitecontext->id.')'; // must be site\n }\n $contextstr = \"AND (rc.contextid = '$context->id' OR rc.contextid IN $listofcontexts)\";\n } else {\n $contextstr = '';\n }\n\n $selectroles = \"SELECT r.*\n FROM {$CFG->prefix}role r,\n {$CFG->prefix}role_capabilities rc\n WHERE rc.capability = '$capability'\n AND rc.roleid = r.id $contextstr\";\n\n if (isset($permission)) {\n $selectroles .= \" AND rc.permission = '$permission'\";\n }\n return get_records_sql($selectroles);\n}", "private function _get_crud_for_members($role_id=NULL) {\n\t\t$data = array(\n\t\t\t'select' => array(\n\t\t\t\tarray('name' => 'id', 'label' => 'ID', \n\t\t\t\t\t'rules' => array('key', 'hidden', 'trim'),),\n\t\t\t\tarray('name' => 'username', 'label' => 'Username', 'link' => 'example1/preference/show/{id}',\n\t\t\t\t\t'rules' => array('trim', 'htmlspecialchars'),),\n\t\t\t),\n 'search' => array('id', 'username'),\n\t\t\t'datasource' => array(\n\t\t\t\t'table' => 'oci_users',\n\t\t\t\t'where' => array('role_id' => $role_id),\n\t\t\t),\n\t\t\t'properties' => array(\n\t\t\t\t'name' => 'roles_members',\n\t\t\t\t'uri' => 'example1/roles/members/'.$role_id,\n\t\t\t\t'index_column' => TRUE,\n\t\t\t\t'index_column_start' => 1,\n 'pagination' => FALSE,\n\t\t\t\t'pagination_per_page' => 5,\n\t\t\t\t'crud_title' => NULL,\n\t\t\t\t'crud_form_title' => '<h2>'.t('List of Members').'</h2>',\n\t\t\t\t'insert_form_title' => '<h2>'.t('Insert Data').'</h2>',\n\t\t\t\t'update_form_title' => '<h2>'.t('Update Data').'</h2>',\n\t\t\t\t'delete_form_title' => '<h2>'.t('Delete Data').'</h2>',\n\t\t\t),\n\t\t);\n\t\t$this->crud->set_data($data);\n\t\treturn $this->crud->render();\n\t}", "function roles_dashboard_object_permissions_check($hook, $type, $return, $params) {\n\n\t$user = elgg_extract('user', $params);\n\t$entity = elgg_extract('entity', $params);\n\n\tif ($entity->getSubtype() == MultiDashboard::SUBTYPE && !empty($entity->roles_context)) {\n\t\treturn $user && $user->isAdmin();\n\t}\n\n\t$context = elgg_get_context();\n\tif ($entity->getSubtype() == 'widget' && strpos($context, 'role::') === 0) {\n\t\treturn $user && $user->isAdmin();\n\t}\n}", "public function getControls();", "public function get_profile_column_widgets($col)\r\n\t{\r\n\t\t\r\n\t\t$user_id = get_current_user_id();\r\n\t\t\t\t\r\n\t\t$col_widgets = 'uultra_profile_widget_col_'.$col;\t\t\t\t\r\n\t\t$widgets = get_user_meta($user_id, $col_widgets, true);\t\t\t\r\n\t\t\r\n\t\t//if display only 1 column we have to add the other's colum widgets\t\t\r\n\t\t$cols = $this->get_amount_of_cols_by_template();\r\n\t\t\r\n\t\tif($col == 1 && $cols==1) // this is a one column template\r\n\t\t{\r\n\t\t\t$all_widgets = array();\r\n\t\t\t\r\n\t\t\t$widgets_col_2 = array();\r\n\t\t\t$widgets_col_3 = array();\r\n\t\t\t// we have to get the widgets in column 2 and 3\t\t\t\r\n\t\t\t$col_to_get_2 =\"uultra_profile_widget_col_2\";\r\n\t\t\t$widgets_col_2 = $this->get_user_meta($col_to_get_2, $user_id );\r\n\t\t\t\r\n\t\t\t$col_to_get_3 =\"uultra_profile_widget_col_3\";\r\n\t\t\t$widgets_col_3= $this->get_user_meta($col_to_get_3, $user_id );\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(is_array($widgets_col_2) && is_array($widgets_col_3))\r\n\t\t\t{\r\n\t\t\t\r\n\t\t\t\t$all_widgets = array_merge($widgets_col_2, $widgets_col_3);\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(is_array($all_widgets) )\r\n\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t$widgets = array_merge($widgets, $all_widgets);\t\t\r\n\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($col == 2 && $cols==2) // this is a two column template\r\n\t\t{\r\n\t\t\t$widgets_col_3 = array();\r\n\t\t\t\t\t\t\r\n\t\t\t$col_to_get_3 =\"uultra_profile_widget_col_3\";\r\n\t\t\t$widgets_col_3= $this->get_user_meta($col_to_get_3, $user_id );\t\r\n\t\t\t\r\n\t\t\tif(is_array($widgets_col_3) && is_array($widgets))\r\n\t\t\t{\r\n\t\t\t\t$widgets = array_merge($widgets, $widgets_col_3);\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t$html = '';\r\n\t\r\n\t\tif(count($widgets)>0 && is_array($widgets))\r\n\t\t{\r\n\t\t\t\r\n\t\t\tforeach($widgets as $key )\r\n\t\t\t{\r\n\t\t\t\tif(!$this->uultra_check_if_unused_widget($key))\r\n\t\t\t\t{\r\n\t\t\t\t\t$widget = $this->mWidgetsCol[$key];\r\n\t\t\t\t\t\r\n\t\t\t\t\t//check if can be disabled.\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$html .= '<li class=\"uultra-profile-widget ui-state-default rounded\" id=\"'.$key.'\">\r\n\t\t\t\t\t<a class=\"uultra-btn-widget-elements\" href=\"#\" widget-id=\"'.$key.'\"><span><i class=\"fa '.$widget[\"icon\"].' fa-2x\"></i></span>'.$widget[\"title\"].' <span class=\"uultra-widgets-icon-close-open\" id=\"uultra-widgets-icon-close-open-id-'.$key.'\" style=\"background-position: 0px 0px;\" widget-id=\"'.$key.'\"></span></a>';\r\n\t\t\t\t\t$html .= '<div id=\"uultra-widget-adm-cont-id-'.$key.'\" class=\"uultra-widget-user-options-cont\" style=\"display:none\">';\r\n\t\t\t\t\t\r\n\t\t\t\t\t//get widget options\t\t\t\t\t\r\n\t\t\t\t\t$html .= $this->get_widget_customization_options($key);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$html .= '</div>';\t\t\t\t\t\r\n\t\t\t\t\t$html .= '</li>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\t\t\t\r\n\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t}\t\r\n\t\treturn $html;\r\n\t\t\r\n\t}", "public function getWidget();", "public static function getBottomMenu(){\n return ObjectDB::getAllOnField(self::$table, __CLASS__, \"type\", false,\"id\");\n\n }", "private static function build_permissions_for_role($role_id)\n\t{\n\t\t$permissions = self::get_roles_permissions($role_id);\n\t\t$permissions_array = array();\n\t\t\n\t\tforeach($permissions as $permission)\n\t\t\t$permissions_array[] = $permission->permission_id;\n\t\t\n\t\t$permissions_not_in = array();\n\t\t\n\t\tif(count($permissions_array) > 0)\n\t\t\t$permissions_not_in = DB::select(\"*\")->from(self::TABLE_PERMISSIONS)\n\t\t\t\t->where(\"id\", \"not in\", $permissions_array)\n\t\t\t\t->as_object()->execute();\n\t\telse\n\t\t\t$permissions_not_in = DB::select(\"*\")->from(self::TABLE_PERMISSIONS)\n\t\t\t\t->as_object()->execute();\n\t\t\t\n\t\tforeach($permissions_not_in as $permission_not_in)\n\t\t{\n\t\t\tDB::insert(self::TABLE_ROLES_PERMISSIONS)\n\t\t\t\t->set(array(\n\t\t\t\t\t\"role_id\" => $role_id,\n\t\t\t\t\t\"permission_id\" => $permission_not_in->id,\n\t\t\t\t\t\"active\" => 0\n\t\t\t\t))->execute();\n\t\t}\n\t}", "public function getPermission($id) {\n\t\t$group = AdminGroup::findOrFail($id);\n\t\t$resources = \\AdminResource::$resources;\n\t\t$currentPers = json_decode($group['permissions']);\n\t\t$this->layout->content = View::make('admin.groups.permission', array(\n\t\t\t\t\t'group' => $group,\n\t\t\t\t\t'resources' => $resources,\n\t\t\t\t\t'currentPers' => $currentPers\n\t\t));\n\t}", "public function loadwidgetsAction() {\n\t\t$this->_helper->getHelper('layout')->disableLayout();\n\t\tif($this->getRequest()->isPost()) {\n\t\t\tif(!($widgetsData = $this->_helper->cache->load('widgetsData', 'wd_'))) {\n\t\t\t\t$widgetsData = Tools_Widgets_Tools::getAllowedOptions();\n\t\t\t\t$this->_helper->cache->save('widgetsData', $widgetsData, 'wd_', array(), Helpers_Action_Cache::CACHE_LONG);\n\t\t\t}\n\t\t\t$this->getResponse()->setBody(json_encode($widgetsData))->sendResponse();\n\t\t}\n\t\texit;\n\t}", "public function getWidgetsByType() {\n\t\t$types = array();\n\t\tif ($this->hasParameter('widgets')) {\n\t\t\tforeach ($this->getParameter('widgets') as $name => $widget) {\n\t\t\t\t$targets = $widget['target'];\n\t\t\t\tforeach($targets as $target) {\n\t\t\t\t\tif ($target == 'all') {\n\t\t\t\t\t\t$list = Data::TYPES;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$list = [$target];\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($list as $type) {\n\t\t\t\t\t\tif (! isset($types[$type])) {\n\t\t\t\t\t\t\t$types[$type] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$types[$type][] = $name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $types;\n\t}", "function list_permissions( $role_in ) {\n global $_SESSION;\n if (!isset($_SESSION)) {\n session_start();\n }\n $user_name = check_logged(); /// function checks if visitor is logged in.\n if (!$user_name)\n return;\n\n $allowed = false;\n if (!check_role( \"admin\" )) {\n return false;\n }\n\n // read the permissions database\n $d = loadDB();\n if ($role_in !== null) { // return role names of the current user\n foreach ($d[\"roles\"] as $key => $value) {\n if ( $value[\"name\"] == $role_in ) {\n $permissions_names = array();\n foreach ($value[\"permissions\"] as $perm) {\n foreach ($d[\"permissions\"] as $r) {\n if ($perm == $r[\"id\"])\n $permissions_names[] = $r[\"name\"];\n }\n }\n return $permissions_names;\n }\n }\n } else { // return all role names\n $permissions_names = array();\n foreach ($d[\"permissions\"] as $r) {\n $permissions_names[] = $r['name'];\n }\n return $permissions_names;\n }\n return;\n }", "public function index($roleId)\n {\n //\n $permissions = Permission::where('guard_name', 'user')->get();\n $role = Role::findById($roleId, 'user');\n\n if ($role->permissions->count() > 0) {\n foreach ($permissions as $permission) {\n $permission->setAttribute('is_active', false);\n if ($role->hasPermissionTo($permission)) {\n $permission->setAttribute('is_active', true);\n }\n }\n }\n return response()->view('cms.spatie.roles.index-permissions', ['roleId' => $roleId, 'permissions' => $permissions]);\n }", "public function permissionOfRole($id)\n {\n return $getAllPermissionOfRole = DB::table('role_permission')->where('role_id',$id)->pluck('permission_id');\n }", "public function get_widget_control($args)\n {\n }", "private function get_widget_obj( $id_base ) {\n\t\tglobal $wp_widget_factory;\n\n\t\t$widget = wp_filter_object_list( $wp_widget_factory->widgets, array( 'id_base' => $id_base ) );\n\t\tif ( empty( $widget ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn array_pop( $widget );\n\t}", "public static function get_roles_permissions($role_id)\n\t{\n\t\t$rows = DB::select(\"*\")->from(self::TABLE_ROLES_PERMISSIONS)\n\t\t\t->where(\"role_id\", \"=\", $role_id)\n\t\t\t->as_object()->execute();\n\t\t\t\n\t\treturn $rows;\n\t}", "public function Widgets()\n\t{\n\t\treturn $this->hasMany('App\\Models\\PersonWidget');\n\t}", "public function permissions($idr) {\n\n $stmt = $this->connection->prepare(\"SELECT id, permission_id FROM role_permissions WHERE role_id = ?\");\n $stmt->bind_param(\"s\", $idr);\n $stmt->execute();\n $result = $stmt->get_result();\n return $result->fetch_array();\n }", "function spyropress_builder_render_widgets() {\n global $wp_registered_widgets;\n $content = '';\n\n // Sorting\n $sort = $wp_registered_widgets;\n usort( $sort, 'builder_module_name_sort' );\n $done = array();\n\n foreach ( $sort as $widget ) {\n $callback = $widget['callback'];\n if ( in_array( $callback, $done, true ) )\n continue;\n\n $done[] = $callback;\n $widget_obj = $callback[0];\n $class = get_class( $widget_obj );\n\n if( $class=='WP_Widget_Media_Image' || $class=='WP_Widget_Media_Gallery' || $class=='WP_Widget_Media_Audio' || $class=='WP_Widget_Media_Video')\n continue;\n /** Generate HTML **/\n $content .= sprintf( '\n <li class=\"module-item\">\n <a class=\"builder-module-insert\" href=\"#\" data-module-type=\"%1$s\">\n <span class=\"module-icon-widget\"></span>\n <span class=\"module-item-body\">\n <strong class=\"module-item-title\">%2$s</strong>\n <span class=\"module-item-description\">%3$s</span>\n </span>\n </a>\n </li>', $class, $widget_obj->name, esc_html( $widget_obj->\n widget_options['description'] ) );\n }\n\n echo tomato_html( $content );\n}", "public function get_selective_refreshable_widgets()\n {\n }", "function wp_find_widgets_sidebar($widget_id)\n {\n }", "function qrd_add_dashboard_widgets() {\n\twp_add_dashboard_widget('qrp_dashboard_widget', 'Quick REST Draft', 'qrd_widget_function');\n}", "function cera_grimlock_widget_area( $id ) {\n\t\tif ( is_active_sidebar( $id ) ) : ?>\n\t\t\t<div class=\"widget-area\">\n\t\t\t\t<?php if ( is_page_template( 'template-dashboard.php' ) ): ?>\n\t\t\t\t\t<div class=\"grid-sizer\"></div>\n\t\t\t\t\t<div class=\"gutter-sizer\"></div>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<?php dynamic_sidebar( $id ); ?>\n\t\t\t</div><!-- .widget-area -->\n\t\t\t<?php\n\t\tendif;\n\t}" ]
[ "0.622101", "0.5974379", "0.58389336", "0.58389336", "0.5833121", "0.5819376", "0.5814579", "0.5766606", "0.57638645", "0.568372", "0.5662139", "0.5602385", "0.5586383", "0.55735177", "0.555928", "0.55482394", "0.5543467", "0.55425495", "0.5511548", "0.5493753", "0.54492646", "0.544343", "0.5414689", "0.54077846", "0.5401044", "0.5363017", "0.53536755", "0.5315067", "0.53045106", "0.5286375", "0.5278612", "0.5278612", "0.5270078", "0.52699316", "0.5263758", "0.5245585", "0.52420807", "0.522708", "0.5221947", "0.52185184", "0.52102625", "0.52068156", "0.5206144", "0.5203062", "0.5193812", "0.5193495", "0.51816714", "0.5181193", "0.515517", "0.51250726", "0.51177293", "0.5113375", "0.50775397", "0.5047922", "0.5043193", "0.5035949", "0.5028779", "0.5025564", "0.5011757", "0.4997305", "0.49970528", "0.49817717", "0.49754408", "0.49724302", "0.49605164", "0.49306095", "0.49289104", "0.49272066", "0.49191535", "0.49180916", "0.4917361", "0.4916751", "0.49120745", "0.49092945", "0.48906755", "0.48904064", "0.4877329", "0.4874107", "0.48689714", "0.4862245", "0.48613012", "0.48604622", "0.48559862", "0.48557404", "0.48555747", "0.48502338", "0.48496655", "0.48471892", "0.4846904", "0.48439264", "0.48431617", "0.4843023", "0.4840487", "0.4835922", "0.48340064", "0.48339662", "0.48335686", "0.48271537", "0.4813343", "0.48131424" ]
0.73286635
0
Getting all Widgets and their types and routes
public static function getAllWidgets($widgets = []) { $widgetIds = []; foreach($widgets as $widget) { $widgetIds[] = $widget['id']; } $allWidgets = []; $widgets = WidgetModel::select('title', 'type', 'routes', 'description') ->whereIn('id', $widgetIds) ->get()->toArray(); foreach($widgets as $widget) { $allWidgets[$widget['title']]['type'] = isset($allWidgets[$widget['title']]['type']) ? $allWidgets[$widget['title']]['type']. ',' . $widget['type'] : $widget['type'] ; $allWidgets[$widget['title']]['routes'] = $widget['routes']; $allWidgets[$widget['title']]['description'] = $widget['description']; } return $allWidgets; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list()\n\t{\n\t\treturn $this->widgets()->orderBy('order')->get();\n\t}", "function getWidgets() {\n \t$returnArray = array();\n \tforeach($this->_widgetRegistry as $name => $item) {\n \t\t$returnArray[] = array('name' => $name, 'description' => $item['description']);\n \t}\n \treturn $returnArray;\n }", "public function getWidgets(){\n $return = [];\n foreach ($this->widgets as $key => $value) {\n $namespance = str_replace([base_path(\"modules\"),base_path(\"contents/templates\"),'.php','/'], ['Modules','Themes','','\\\\'], $value);\n $namespance = str_replace('Themes\\default', 'Themes\\_default', $namespance);\n if(class_exists($namespance) && method_exists($namespance, \"register\")){\n $paths = str_replace(base_path().'/','',$value);\n $ado = [];\n $ado = with(new $namespance)->register();\n $ado[\"paths\"] = $paths;\n $return[$namespance] = $ado;\n }\n }\n return $return;\n }", "public function getWidgets()\n {\n return $this->widgets;\n }", "public function getWidgets()\n {\n return $this->_widgets;\n }", "public function get_widgets() {\n\n $sidebar_name = sidebar\\Sidebar::get_sidebar_name();\n \n global $wp_registered_widgets;\n\n $sidebars_widgets = get_option( 'sidebars_widgets' );\n\n $sidebar_widgets = [];\n if ( array_key_exists( $sidebar_name, $sidebars_widgets ) ) {\n\n foreach( $sidebars_widgets[$sidebar_name] as $key => $value ) {\n $widget_id = $value;\n $widget_parts = explode( '-', $widget_id );\n $widget_base_id = $widget_parts[0];\n $widget_number = $widget_parts[1];\n $options = get_option( 'widget_' . $widget_base_id );\n\n $widget_title = '';\n if ( is_array( $options[$widget_number] ) ) {\n\n if ( array_key_exists( 'title', $options[$widget_number] ) && !empty( $options[$widget_number]['title'] ) ) {\n $widget_title = $options[$widget_number]['title'];\n }\n else {\n foreach ( $wp_registered_widgets as $w => $rwidget ) {\n if ( $w == $widget_id ) {\n $widget_title = $rwidget['name']; \n }\n else {\n if ($widget_title == '') {\n $widget_title = $widget_id; \n }\n }\n }\n }\n }\n $sidebar_widgets[] = [ $widget_id => $widget_title ];\n }\n\n }\n\n \n return $sidebar_widgets;\n\n }", "public function getWidgetsByType() {\n\t\t$types = array();\n\t\tif ($this->hasParameter('widgets')) {\n\t\t\tforeach ($this->getParameter('widgets') as $name => $widget) {\n\t\t\t\t$targets = $widget['target'];\n\t\t\t\tforeach($targets as $target) {\n\t\t\t\t\tif ($target == 'all') {\n\t\t\t\t\t\t$list = Data::TYPES;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$list = [$target];\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($list as $type) {\n\t\t\t\t\t\tif (! isset($types[$type])) {\n\t\t\t\t\t\t\t$types[$type] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$types[$type][] = $name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $types;\n\t}", "public function getWidgetList()\n { \n $widgets = HomePageWidget::where('status', HomePageWidget::ACTIVE)->where('type', HomePageWidget::TYPE_SLIDER)->orderBy('id', 'asc')->take(3)->get();\n return $widgets;\n }", "protected function get_widgets()\n {\n }", "protected function retrieve_widgets()\n {\n }", "protected function retrieve_widgets()\n {\n }", "public function getDafaultsWidgets()\r\n {\r\n\r\n $widgets = array();\r\n\r\n return $widgets;\r\n }", "public function get_available_widgets()\n {\n }", "public function index()\n {\n $widgets = Widget::query()\n ->where('inventory', '>', 0);\n\n // Implement filtering logic by size, type, and finish\n // Implement search logic by name\n $params = request()->all();\n $paramsKeys = array_keys($params);\n if (count($params)) {\n if (in_array('widgetSize', $paramsKeys)) {\n $size = $params['widgetSize'];\n if ($size && WidgetSize::findOrFail($size)) {\n $widgets->whereHas('widgetSize', function ($query) use ($size) {\n $query->where('id', '=', $size);\n });\n }\n }\n\n if (in_array('widgetType', $paramsKeys)) {\n $type = $params['widgetType'];\n if ($type && WidgetType::findOrFail($type)) {\n $widgets->whereHas('widgetType', function ($query) use ($type) {\n $query->where('id', '=', $type);\n });\n }\n }\n\n if (in_array('widgetFinish', $paramsKeys)) {\n $finish = $params['widgetFinish'];\n if ($finish && WidgetFinish::findOrFail($finish)) {\n $widgets->whereHas('widgetFinish', function ($query) use ($finish) {\n $query->where('id', '=', $finish);\n });\n }\n }\n\n if (in_array('name', $paramsKeys)) {\n $name = $params['name'];\n if ($name) {\n $widgets->where('name', 'LIKE', '%' . $name . '%');\n }\n }\n }\n\n $widgets->with(['widgetSize', 'widgetType', 'widgetFinish']);\n return $widgets->sortable(['name'])->paginate();\n }", "public function getWidgetConfigs()\n {\n return $this->widgets;\n }", "public function widgets()\n {\n\t\t//Many To Many (Polymorphic)\n return $this->morphToMany(Widget::class, 'widgetable');\n }", "public static function get_all_widgets() {\r\n\t\t$ret = array(\r\n\t\t\tself::WIDGET_ACCORDION,\r\n\t\t\tself::WIDGET_DATEPICKER,\r\n\t\t\tself::WIDGET_DIALOG,\r\n\t\t\tself::WIDGET_PROGRESSBAR,\r\n\t\t\tself::WIDGET_SLIDER,\r\n\t\t\tself::WIDGET_TABS,\r\n\t\t\tself::WIDGET_AUTOCOMPLETE\r\n\t\t);\r\n\t\tif (self::is_version_1_8_or_higher()) {\r\n\t\t\t$ret[] = self::WIDGET_BUTTON; \r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "function wp_list_widgets()\n {\n }", "public function index()\n {\n return new WidgetResource(Widget::all());\n }", "public function WidgetList()\n {\n $widgets = ExtensionData::get()->filter(array('Type' => 'Widget', 'Accepted' => '1'))->sort('Name');\n $paginatedList = new PaginatedList($widgets, $this->request);\n $paginatedList->setPageLength(4);\n return $paginatedList;\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 getWidgets(): ?array\n {\n return collect(Filament::getWidgets())\n ->filter(function ($widget) {\n if (Utils::isGeneralExcludeEnabled()) {\n return ! in_array(Str::afterLast($widget, '\\\\'), Utils::getExcludedWidgets());\n }\n\n return true;\n })\n ->reduce(function ($widgets, $widget) {\n $prepend = Str::of(Utils::getWidgetPermissionPrefix())->append('_');\n $name = Str::of(class_basename($widget))\n ->prepend($prepend);\n\n $widgets[\"{$name}\"] = \"{$name}\";\n\n return $widgets;\n }, collect())\n ->toArray();\n }", "public function getWidgets()\n\t\t{\n\t\t\tif(!isset($this->id))\n\t\t\t\treturn FALSE;\n\t\t\t\n\t\t\tglobal $conn;\n\t\t\tglobal $SERVICENTER_WIDGETS;\n\t\t\t\n\t\t\t$g = $conn->prepare(\"SELECT position,widget FROM ServiCenter_Workspace_Widget WHERE workspace = ?\");\n\t\t\t$g->bindParam(1, $this->id);\n\t\t\t$g->execute();\n\t\t\t\n\t\t\t$widgets = [];\n\t\t\t\n\t\t\tforeach($g->fetchAll() as $widgetData)\n\t\t\t{\n\t\t\t\tif(isset($SERVICENTER_WIDGETS[$widgetData['widget']]))\n\t\t\t\t{\n\t\t\t\t\t$widgets[] = [$widgetData['position'], $SERVICENTER_WIDGETS[$widgetData['widget']][0]];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $widgets;\n\t\t}", "public function widgets()\n {\n return view('pages.widgets');\n }", "public function getAvailableWidgets()\r\n {\r\n }", "public function registerDashboardWidgets()\n {\n return [];\n }", "public function indexAction()\n {\n $contentTypes = $this->contentTypes();\n $model = $this->getModel('widget');\n $rowset = $model->select(array('type' => array_keys($contentTypes)));\n $widgets = array();\n foreach ($rowset as $row) {\n $widgets[$row->block] = $row->toArray();\n }\n if ($widgets) {\n $blocks = Pi::model('block_root')\n ->select(array('id' => array_keys($widgets)))->toArray();\n foreach ($blocks as $block) {\n $widgets[$block['id']]['block'] = $block;\n }\n }\n\n $data = array(\n 'widgets' => array_values($widgets)\n );\n\n $this->view()->assign('data', $data);\n $this->view()->setTemplate('ng');\n }", "public function getWidgetsByInputType() {\n\t\t$types = array();\n\t\tif ($this->hasParameter('widgets')) {\n\t\t\tforeach ($this->getParameter('widgets') as $name => $widget) {\n\t\t\t\t$inputs = $widget['input'];\n\t\t\t\tforeach($inputs as $input) {\n\t\t\t\t\tif ($input == 'all') {\n\t\t\t\t\t\t$list = ['select', 'checkbox', 'color', 'date', 'datetime-local', 'email', 'file', 'hidden', 'image', 'month', 'number', 'password', 'radio', 'range', 'search', 'tel', 'text', 'time', 'url', 'week'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$list = [$input];\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($list as $type) {\n\t\t\t\t\t\tif (! isset($types[$type])) {\n\t\t\t\t\t\t\t$types[$type] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$types[$type][] = $name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $types;\n\t}", "public function getWidgetListing(){\t\n\t\t$query = 'SELECT '.DB_PREFIX.'widget_category.name AS \"category\", '.DB_PREFIX.'languages.prefix AS \"language\", '.DB_PREFIX.'widget.alias AS \"alias\", '.DB_PREFIX.'widget.language_id AS \"language_id\", '.DB_PREFIX.'widget.id AS \"id\", '.DB_PREFIX.'widget.status AS \"status\", '.DB_PREFIX.'widget.category_id AS \"category_id\", '.DB_PREFIX.'widget.name AS \"name\", '.DB_PREFIX.'widget.data AS \"data\" FROM '.DB_PREFIX.'widget LEFT JOIN '.DB_PREFIX.'languages ON '.DB_PREFIX.'languages.id = '.DB_PREFIX.'widget.language_id LEFT JOIN '.DB_PREFIX.'widget_category ON '.DB_PREFIX.'widget.category_id = '.DB_PREFIX.'widget_category.id ORDER BY '.DB_PREFIX.'widget_category.name ASC, '.DB_PREFIX.'languages.prefix ASC;';\n\t\t$rs = $this->reg->get('db')->query($query);\n\t\tif($rs->num_rows){\n\t\t\treturn $rs->rows;\n\t\t\t}\n\t\treturn false;\n\t\t}", "public function getWidgetDefinitions()\n {\n return $this->widgetDefinitionNodes;\n }", "public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Counter() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Posts() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Subhead_Bodycopy() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Heading_Media_BodyCopy() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Sidebar() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Useful_Links_Info() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Content_Filter() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Accordion_Navigation_Tabs() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Secondary_CTAs() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Alert_Banner() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Resources_Widgets() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Card_Lrg() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Promo() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Latest_Resources() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Popular_Results() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Top_Faq() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Card_Carousel() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Repeater_resources_widget());\n\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Main_Slider() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Text() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Noble_Cause() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Image() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Project_Facts() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Pillers_Forest() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Fancy_Heading() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Blog_Listing() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Main_Gallery() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Default_Sub_Header() );\n\n\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Banner() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Woo_Listing() );\t\t \n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Events_Listing() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Events_Call_To_Action() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Contact() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Islamic_Centre_Newsletter() );\n\t}", "public function Widgets()\n\t{\n\t\treturn $this->hasMany('ThunderID\\Widboard\\Models\\PersonWidget');\n\t}", "public function widgets() {\r\n\t\t// Make sure the user has capability.\r\n\t\tif ( Permission::user_can( 'analytics' ) || ! is_admin() ) {\r\n\t\t\t// Most popular contents.\r\n\t\t\tregister_widget( Widgets\\Popular::instance() );\r\n\t\t}\r\n\t}", "public function index()\n {\n $widgetsFrontend = Widgets::frontend()->all();\n $widgetsBackend = Widgets::backend()->all();\n\n return view_backend('widget.index', compact('widgetsFrontend', 'widgetsBackend'));\n }", "function spyropress_builder_render_widgets() {\n global $wp_registered_widgets;\n $content = '';\n\n // Sorting\n $sort = $wp_registered_widgets;\n usort( $sort, 'builder_module_name_sort' );\n $done = array();\n\n foreach ( $sort as $widget ) {\n $callback = $widget['callback'];\n if ( in_array( $callback, $done, true ) )\n continue;\n\n $done[] = $callback;\n $widget_obj = $callback[0];\n $class = get_class( $widget_obj );\n\n if( $class=='WP_Widget_Media_Image' || $class=='WP_Widget_Media_Gallery' || $class=='WP_Widget_Media_Audio' || $class=='WP_Widget_Media_Video')\n continue;\n /** Generate HTML **/\n $content .= sprintf( '\n <li class=\"module-item\">\n <a class=\"builder-module-insert\" href=\"#\" data-module-type=\"%1$s\">\n <span class=\"module-icon-widget\"></span>\n <span class=\"module-item-body\">\n <strong class=\"module-item-title\">%2$s</strong>\n <span class=\"module-item-description\">%3$s</span>\n </span>\n </a>\n </li>', $class, $widget_obj->name, esc_html( $widget_obj->\n widget_options['description'] ) );\n }\n\n echo tomato_html( $content );\n}", "public function getWidgetsByContext($context)\r\n {\r\n }", "public function getWidgetClasses()\n {\n return $this->widgetClasses;\n }", "public static function getWidgets($name) {\n add_filter('dynamic_sidebar_params', 'NpShortcodes::paramsFilter');\n ob_start();\n dynamic_sidebar($name);\n $content = ob_get_clean();\n remove_filter('dynamic_sidebar_params', 'NpShortcodes::paramsFilter');\n\n $data = explode('</widget>', $content);\n $widgets = array();\n for ($i = 0; $i < count($data); $i++) {\n $widget = $data[$i];\n if (!$widget) {\n continue;\n }\n\n $id = null;\n $name = null;\n $class = null;\n $title = null;\n\n if (preg_match('/<widget(.*?)>/', $widget, $matches)) {\n if (preg_match('/id=\"(.*?)\"/', $matches[1], $ids)) {\n $id = $ids[1];\n }\n if (preg_match('/name=\"(.*?)\"/', $matches[1], $names)) {\n $name = $names[1];\n }\n if (preg_match('/class=\"(.*?)\"/', $matches[1], $classes)) {\n $class = $classes[1];\n }\n $widget = preg_replace('/<widget[^>]+>/', '', $widget);\n\n if (preg_match('/<title>(.*)<\\/title>/', $widget, $matches)) {\n $title = $matches[1];\n $widget = preg_replace('/<title>.*?<\\/title>/', '', $widget);\n }\n }\n $widget = str_replace('<ul class=\"product-categories\">', '<ul>', $widget);\n\n $widgets[] = array(\n 'id' => $id,\n 'name' => $name,\n 'class' => $class,\n 'title' => $title,\n 'content' => $widget\n );\n }\n return $widgets;\n }", "public function load_widgets() {\n\n /**\n * The function responsible for Widgets\n * of the plugin.\n */\n include plugin_dir_path(dirname(__FILE__)) . 'includes/widgets/recent-posts.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/widgets/newsletter.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/widgets/simple-newsletter.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/widgets/flickr.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/widgets/instagram.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/widgets/twitter.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/widgets/contact-info.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/widgets/contact-info2.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/widgets/contact-info3.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/widgets/about-info.php';\n }", "public function loadWidgets($params)\r\n {\r\n $ret = array();\r\n \r\n $dashboardId = $params['dashboardId'];\r\n \r\n if($dashboardId)\r\n {\r\n $dashObj = CAntObject::factory($this->ant->dbh, \"dashboard\", $dashboardId, $this->user);\r\n $ret = $dashObj->getWidgets();\r\n }\r\n \r\n $this->sendOutput($ret);\r\n return $ret;\r\n }", "public function renderWidgets()\r\n {\r\n foreach ($this->_widgets as $widget)\r\n {\r\n echo current($widget);\r\n }\r\n\r\n }", "public static function get()\n {\n $list = new static;\n\n $widgets = StaticContainer::get('Piwik\\Plugin\\WidgetsProvider');\n\n $widgetContainerConfigs = $widgets->getWidgetContainerConfigs();\n foreach ($widgetContainerConfigs as $config) {\n if ($config->isEnabled()) {\n $list->addWidgetConfig($config);\n }\n }\n\n $widgetConfigs = $widgets->getWidgetConfigs();\n foreach ($widgetConfigs as $widget) {\n if ($widget->isEnabled()) {\n $list->addWidgetConfig($widget);\n }\n }\n\n $reports = StaticContainer::get('Piwik\\Plugin\\ReportsProvider');\n $reports = $reports->getAllReports();\n foreach ($reports as $report) {\n if ($report->isEnabled()) {\n $factory = new ReportWidgetFactory($report);\n $report->configureWidgets($list, $factory);\n }\n }\n\n /**\n * Triggered to filter widgets.\n *\n * **Example**\n *\n * public function removeWidgetConfigs(Piwik\\Widget\\WidgetsList $list)\n * {\n * $list->remove($category='General_Visits'); // remove all widgets having this category\n * }\n *\n * @param WidgetsList $list An instance of the WidgetsList. You can change the list of widgets this way.\n */\n Piwik::postEvent('Widget.filterWidgets', array($list));\n\n return $list;\n }", "public function Widgets()\n\t{\n\t\treturn $this->hasMany('App\\Models\\PersonWidget');\n\t}", "public function getSupportWidgetList()\n { \n $widgets = HomePageWidget::where('status', HomePageWidget::ACTIVE)->where('type', HomePageWidget::TYPE_SUPPORT)->orderBy('id', 'asc')->take(3)->get();\n return $widgets;\n }", "function spm_get_sidebars() {\n\t\t\t$sidebars = array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'home_widgets',\n\t\t\t\t\t'name' => 'Home Widgets',\n\t\t\t\t\t'description' => 'Home page widgets'\n\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'sidebar',\n\t\t\t\t\t'name' => 'Sidebar',\n\t\t\t\t\t'description' => 'The main widget area'\n\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'footer',\n\t\t\t\t\t'name' => 'Footer Widgets',\n\t\t\t\t\t'description' => 'Widgets at the bottom of the page'\n\t\t\t\t)\n\t\t\t);\n\t\t\treturn $sidebars;\n\t\t}", "function wp_listings_register_widgets() {\n\n\t$widgets = array( 'WP_Listings_Featured_Listings_Widget', 'WP_Listings_Search_Widget' );\n\n\tforeach ( (array) $widgets as $widget ) {\n\t\tregister_widget( $widget );\n\t}\n\n}", "public function widgets($params) {\n include_once 'common/widget/WidgetLayoutManager.class.php';\n if ($params['owner_type'] == WidgetLayoutManager::OWNER_TYPE_USER) {\n if ($this->_userCanViewWidget('admindelegation')) {\n include_once 'AdminDelegation_UserWidget.class.php';\n $params['codendi_widgets'][] = 'admindelegation';\n }\n if ($this->_userCanViewWidget('admindelegation_projects')) {\n include_once 'AdminDelegation_ShowProjectWidget.class.php';\n $params['codendi_widgets'][] = 'admindelegation_projects';\n }\n }\n }", "function get_list_widget_admin()\n {\n global $active_modules;\n\n $result = [];\n /**\n * List widgets of Admin\n */\n $result['Admin'] = config('Admin::widget.admin');\n\n /**\n * List widgets of Modules\n */\n if ($active_modules) {\n foreach ($active_modules as $mod) {\n $result[$mod] = config($mod . '::widget.admin');\n }\n }\n\n return $result;\n }", "protected function getRelations()\n\t{\n\t\treturn ['widgets'];\n\t}", "protected function getAvailableWidgetList() {\n\t\t$widgets = (array)$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['geckoboard']['widgets'];\n\n\t\t$availableWidgets = array();\n\t\tforeach ($widgets as $widget) {\n\t\t\t//todo: check if there are extension dependencies for the widget\n\t\t\t$availableWidgets[$widget] = $this->language->sL(\n\t\t\t\t'LLL:EXT:geckoboard/Resources/Private/Language/locallang_be.xml:label.' . $widget\n\t\t\t);\n\n\t\t\tif ($availableWidgets[$widget] == '') {\n\t\t\t\t$availableWidgets[$widget] = $widget;\n\t\t\t}\n\t\t}\n\n\t\treturn $availableWidgets;\n\t}", "protected function getWidgetClasses()\n {\n $files = glob(sprintf('%s/Widgets/*Widget.php', $this->getPath()));\n\n $widgetClasses = [];\n foreach ($files as $file) {\n $class = $this->getName() . '\\Widgets\\\\' . basename($file, '.php');\n if (class_exists($class)) {\n $widget = new $class(\n $this->container->get('pluginlogger'),\n $this->container->get('models')\n );\n if ($widget instanceof AbstractWidget) {\n $widgetClasses[] = $widget;\n }\n }\n }\n\n return $widgetClasses;\n }", "public function loadwidgetsAction() {\n\t\t$this->_helper->getHelper('layout')->disableLayout();\n\t\tif($this->getRequest()->isPost()) {\n\t\t\tif(!($widgetsData = $this->_helper->cache->load('widgetsData', 'wd_'))) {\n\t\t\t\t$widgetsData = Tools_Widgets_Tools::getAllowedOptions();\n\t\t\t\t$this->_helper->cache->save('widgetsData', $widgetsData, 'wd_', array(), Helpers_Action_Cache::CACHE_LONG);\n\t\t\t}\n\t\t\t$this->getResponse()->setBody(json_encode($widgetsData))->sendResponse();\n\t\t}\n\t\texit;\n\t}", "private function wp_get_sidebars_widgets() {\n\t\t$sidebars_widgets = get_option( 'sidebars_widgets', array() );\n\n\t\tif ( is_array( $sidebars_widgets ) && isset( $sidebars_widgets['array_version'] ) ) {\n\t\t\tunset( $sidebars_widgets['array_version'] );\n\t\t}\n\n\t\treturn $sidebars_widgets;\n\t}", "private static function loadWidgets() {\n\t\t\t$widgetsJson = file_get_contents(JIAOYU_PROJECT_HOME.\"/app/conf/widgets.json\");\n\n\t\t\t// If the file is empty don't build the widgets\n\t\t\tif (!$widgetsJson) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t$appWidgets = JsonUtils::decode($widgetsJson);\n\t\t\t} catch (JsonException $e) {\n\t\t\t\tthrow new ConfigurationException(\"Error initializing widgets: \".$e->getMessage());\n\t\t\t}\n\n\t\t\t// Each json object in the array is a widget, but unlike the routes we won't instantiate\n\t\t\t// the class, only set up some keys for later (because a widget needs to execute code at\n\t\t\t// run time to work)\n\t\t\tforeach ($appWidgets as $rawWidget) {\n\t\t\t\tif (!isset($rawWidget->name)) {\n\t\t\t\t\tthrow new ConfigurationException(\"Malformed widget configuration file - each\n\t\t\t\t\t\twidget must have name, template, controller and action defined.\");\n\t\t\t\t}\n\n\t\t\t\t$widget = Widget::buildFromJson($rawWidget);\n\t\t\t\tself::$widgets[$rawWidget->name] = $widget;\n\t\t\t}\n\t\t}", "function _find_taxonomy_widgets($tax_data){\n if (isset($tax_data->data['preset_id']) && $tax_data->data['preset_id'] != 0){\n $preset = $this->ww->presets->get_preset($tax_data->data['preset_id']);\n $this->ww->presets->current_preset_id = $preset->id;\n $widgets = $preset->widgets;\n }\n else {\n $widgets = $tax_data->widgets;\n }\n return $widgets;\n }", "function registerWidgets( ) {\r\n\t\t\twp_register_sidebar_widget( 'iluvwalking-com-widget', __( 'ILuvWalking.com Stats' ), array( &$this, 'widgetOutput' ) );\r\n\t\t\twp_register_widget_control( 'iluvwalking-com-widget', __( 'ILuvWalking.com Stats' ), array( &$this, 'widgetControlOutput' ) );\r\n\t\t}", "public function getWidgets() {\n\t\t$widgets = array();\n\t\tif ($this->hasParameter('widgets')) {\n\t\t\tforeach ($this->getParameter('widgets') as $name => $widget) {\n\t\t\t\t$widgets[$name] = $this->getTranslator()->trans($widget['label']);\n\t\t\t}\n\t\t}\n\t\treturn $widgets;\n\t}", "public function add_widget_areas() {\n\n\t\tregister_sidebar( array(\n\t\t\t'id' => 'wpchaos-obj-featured',\n\t\t\t'name' => __('CHAOS Object - Featured','wpchaosclient'),\n\t\t\t'before_widget' => '',\n\t\t\t'after_widget' => '',\n\t\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t\t'after_title' => '</h2>',\n\t\t) );\n\n\t\tregister_sidebar( array(\n\t\t\t'id' => 'wpchaos-obj-main',\n\t\t\t'name' => __('CHAOS Object - Main','wpchaosclient'),\n\t\t\t'before_widget' => '',\n\t\t\t'after_widget' => '',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\tregister_sidebar( array(\n\t\t\t'id' => 'wpchaos-obj-sidebar',\n\t\t\t'name' => __('CHAOS Object - Sidebar','wpchaosclient'),\n\t\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</li>',\n\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t'after_title' => '</h4>',\n\t\t) );\n\n\t\t register_widget( 'WPChaosObjectAttrWidget' );\n\t\t register_widget( 'WPChaosObjectMultiWidget' );\n\t}", "public function index(Request $request)\n {\n $this->authorize('index', new Widget);\n\n //Get All Widgets\n $input = $request->all();\n if (empty($input['page_s'])){\n $pagesize=Widget::all()->count();\n }else{\n $pagesize=$input['page_s'];\n }\n\n if (empty($input['sort'])){\n $field_order=\"id\";\n }else{\n $field_order= $input['sort'];\n }\n\n $widget = DB::table('widget');\n if (isset($field_order)){\n $widget->orderBy($field_order);\n }\n\n $results= $widget->paginate($pagesize,['*'],'page_n');\n $results= $results->appends(array('sort' => $field_order, 'page_s' => $pagesize ));\n\n return $results;\n }", "private function loadSubWidgets()\n {\n $subWidgets = [];\n // get widgets for the fields\n foreach ($this->fields as $index => $field) :\n $subWidgets[$index] = $field->widget;\n endforeach;\n\n $this->widget->setSubWidgets($subWidgets);\n }", "function create_oms_widget_type()\n{\n\n $labels = array(\n 'name' => _x( 'OMS Widgets', 'oms_widget' ),\n 'singular_name' => _x( 'OMS Widget', 'oms_widget' ),\n 'add_new' => _x( 'Add New', 'oms_widget' ),\n 'add_new_item' => _x( 'Add New Widget', 'oms_widget' ),\n 'edit_item' => _x( 'Edit Widget', 'oms_widget' ),\n 'new_item' => _x( 'New Widget', 'oms_widget' ),\n 'view_item' => _x( 'View Widget', 'oms_widget' ),\n 'search_items' => _x( 'Search Widgets', 'oms_widget' ),\n 'not_found' => _x( 'No widgets found', 'oms_widget' ),\n 'not_found_in_trash' => _x( 'No widgets found in Trash', 'oms_widget' ),\n 'parent_item_colon' => _x( 'Parent Widget:', 'oms_widget' ),\n 'menu_name' => _x( 'OMS Widgets', 'oms_widget' ),\n );\n\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => false,\n 'description' => 'Persistent content for Wordpress widgets.',\n 'supports' => array(\n 'title',\n 'custom-fields',\n ),\n 'public' => true,\n 'menu_icon' => 'dashicons-lightbulb',\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 20,\n 'show_in_nav_menus' => false,\n 'publicly_queryable' => true,\n// 'exclude_from_search' => false,\n 'exclude_from_search' => true,\n 'has_archive' => false,\n 'query_var' => true,\n 'can_export' => true,\n 'rewrite' => true,\n 'capability_type' => 'post'\n );\n\n register_post_type( 'oms_widget', $args );\n\n}", "public function getWidgets($sidebar)\n {\n $widgetsJson = $this->runWpCliCommand('widget', 'list', [$sidebar, 'format' => 'json', 'fields' => 'id']);\n $widgets = json_decode($widgetsJson);\n $widgetIds = array_map(function ($widget) {\n return $widget->id;\n }, $widgets);\n return $widgetIds;\n }", "public function index()\n\t{\n $widget = Widget::first();\n\n\t\treturn view('admin.widget', compact('widget'));\n\t}", "public function testDimmersReturnsCollectionOfConfiguredWidgets()\n {\n Config::set('voyager.dashboard.widgets', [\n 'TCG\\\\Voyager\\\\Tests\\\\Stubs\\\\Widgets\\\\AccessibleDimmer',\n 'TCG\\\\Voyager\\\\Tests\\\\Stubs\\\\Widgets\\\\AccessibleDimmer',\n ]);\n\n $dimmers = Voyager::dimmers();\n\n $this->assertEquals(2, $dimmers->count());\n }", "public function getWidgetTypesJson()\n {\n return json_encode($this->widgetsMap);\n }", "public function action_widgets_init() {\n\n // Our widgets\n register_widget( '\\Pedestal\\Widgets\\Recent_Content_Widget' );\n register_widget( '\\Pedestal\\Widgets\\Recent_Video_Widget' );\n\n if ( PEDESTAL_ENABLE_INSTAGRAM_OF_THE_DAY ) {\n register_widget( '\\Pedestal\\Widgets\\Daily_Insta_Widget' );\n }\n\n // Unregister core widgets we won't be using\n unregister_widget( 'WP_Widget_Archives' );\n unregister_widget( 'WP_Widget_Calendar' );\n unregister_widget( 'WP_Widget_Categories' );\n unregister_widget( 'WP_Widget_Custom_HTML' );\n unregister_widget( 'WP_Widget_Links' );\n unregister_widget( 'WP_Widget_Media_Audio' );\n unregister_widget( 'WP_Widget_Media_Gallery' );\n unregister_widget( 'WP_Widget_Media_Image' );\n unregister_widget( 'WP_Widget_Media_Video' );\n unregister_widget( 'WP_Widget_Meta' );\n unregister_widget( 'WP_Widget_Pages' );\n unregister_widget( 'WP_Widget_Recent_Comments' );\n unregister_widget( 'WP_Widget_Recent_Posts' );\n unregister_widget( 'WP_Widget_RSS' );\n unregister_widget( 'WP_Widget_Search' );\n unregister_widget( 'WP_Widget_Tag_Cloud' );\n unregister_widget( 'WP_Widget_Text' );\n\n // Unregister widgets added by plugins\n unregister_widget( 'P2P_Widget' );\n }", "function roles_dashboard_update_widget_definitions() {\n\n\t$widget_types = elgg_get_widget_types('all', true);\n\tforeach ($widget_types as $handler => $options) {\n\t\t$context = $options->context;\n\t\t$context[] = 'dashboard';\n\t\t$context = array_unique($context);\n\t\telgg_register_widget_type($handler, $options->name, $options->description, $context, $options->multiple);\n\t}\n\n\t$roles = roles_get_all_selectable_roles();\n\n\t$widget_types = elgg_get_widget_types('dashboard', true);\n\tforeach ($widget_types as $handler => $options) {\n\t\t$context = $options->context;\n\t\tforeach ($roles as $role) {\n\t\t\t$context[] = \"role::{$role->name}\";\n\t\t}\n\t\t$context = array_unique($context);\n\t\telgg_register_widget_type($handler, $options->name, $options->description, $context, $options->multiple);\n\t}\n}", "public function index()\n {\n //\n $widgets = Widget::orderBy('updated_at', 'desc')->get();\n $widget_datas = WidgetData::orderBy('updated_at', 'desc')->get();\n $pages = Page::orderBy('updated_at', 'desc')->get();\n $posts = Post::orderBy('updated_at', 'desc')->get();\n return view('admin.website.settings.widgets.widget_datas.index', compact('widgets', 'pages', 'posts', 'widget_datas'));\n }", "function MWX__load_widgets() {\n register_widget( 'widget_MWX__list_pages' );\n}", "function wp_list_widget_controls($sidebar, $sidebar_name = '')\n {\n }", "public function getWidgetByPath(array $names);", "public function get_widget_areas() {\n\n\t\t\t// If the single instance hasn't been set, set it now.\n\t\t\tif ( ! empty( $this->widget_areas ) ) {\n\t\t\t\treturn $this->widget_areas;\n\t\t\t}\n\n\t\t\t// Get widget areas saved in theem mod\n\t\t\t$widget_areas = wprt_get_mod( 'widget_areas' );\n\n\t\t\t// If theme mod isn't empty set to class widget area var\n\t\t\tif ( ! empty( $widget_areas ) && is_array( $widget_areas ) ) {\n\t\t\t\t$this->widget_areas = array_unique( array_merge( $this->widget_areas, $widget_areas ) );\n\t\t\t}\n\n\t\t\t// Return widget areas\n\t\t\treturn $this->widget_areas;\n\t\t}", "public static function registerWidgetAreas()\n {\n /**\n * Footer Area\n */\n register_sidebar(array(\n 'id' => 'footer-area',\n 'name' => __('Footerarea', 'Helsingborg'),\n 'description' => __('Arean längst ner på sidan', 'Helsingborg'),\n 'before_widget' => '<div class=\"left large-6 medium-6 print-6 columns\"><div class=\"footer-content\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2 class=\"footer-title\">',\n 'after_title' => '</h2>'\n ));\n\n /**\n * Slider Area\n */\n register_sidebar(array(\n 'id' => 'slider-area',\n 'name' => __('Topparea', 'Helsingborg'),\n 'description' => __('Visas under huvudmenyn', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>'\n ));\n\n /**\n * Content Area\n */\n register_sidebar(array(\n 'id' => 'content-area',\n 'name' => __('Innehållsarea', 'Helsingborg'),\n 'description' => __('Visas strax under en artikels brödtext', 'Helsingborg'),\n 'before_widget' => '<div class=\"box box-outlined widget %2$s\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Content Area Bottom\n */\n register_sidebar(array(\n 'id' => 'content-area-bottom',\n 'name' => __('Innehåll bottenarea', 'Helsingborg'),\n 'description' => __('Visas under vänstermeny och artikel (fullbredd) ', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-outlined %2$s\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Service Area\n */\n register_sidebar(array(\n 'id' => 'service-area',\n 'name' => __('Servicearea', 'Helsingborg'),\n 'description' => __('De service-länkar som visas i grått fält på startsidan', 'Helsingborg'),\n 'before_widget' => '<div class=\"widget columns large-4 medium-4 small-12 pprint-4\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Fun Facts Area\n */\n register_sidebar(array(\n 'id' => 'fun-facts-area',\n 'name' => __('Fakta', 'Helsingborg'),\n 'description' => __('Faktarutor som visas innan footer (visar tre slumpmässiga).', 'Helsingborg'),\n 'before_widget' => '<div class=\"widget columns large-3 medium-3 print-3 left\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Left Sidebar\n */\n register_sidebar(array(\n 'id' => 'left-sidebar',\n 'name' => __('Vänster area', 'Helsingborg'),\n 'description' => __('Visas ovanför vänstermenyn.', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-filled widget %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ));\n\n /**\n * Left Sidebar Bottom\n */\n register_sidebar(array(\n 'id' => 'left-sidebar-bottom',\n 'name' => __('Vänster bottenarea', 'Helsingborg'),\n 'description' => __('Visas under vänstermenyn.', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-filled widget %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ));\n\n /**\n * Right Sidebar\n */\n register_sidebar(array(\n 'id' => 'right-sidebar',\n 'name' => __('Höger area', 'Helsingborg'),\n 'description' => __('Visas i högerspalten.', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-filled widget %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ));\n }", "function our_widget_inits(){\n\tregister_sidebar(array(\n\t\t'name' => 'Sidebar',\n\t\t'id' => 'sidebar1',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s widget_area\">',\n\t\t'after_widget' => \"</div>\",\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n\tregister_sidebar(array(\n\t\t'name' => 'Footer area 1',\n\t\t'id' => 'footer1',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n\tregister_sidebar(array(\n\t\t'name' => 'Footer area 2',\n\t\t'id' => 'footer2',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n\tregister_sidebar(array(\n\t\t'name' => 'Footer area 3',\n\t\t'id' => 'footer3',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n}", "public function testDimmersReturnsCollectionOfConfiguredWidgetsWhichShouldBeDisplayed()\n {\n Config::set('voyager.dashboard.widgets', [\n 'TCG\\\\Voyager\\\\Tests\\\\Stubs\\\\Widgets\\\\AccessibleDimmer',\n 'TCG\\\\Voyager\\\\Tests\\\\Stubs\\\\Widgets\\\\InAccessibleDimmer',\n 'TCG\\\\Voyager\\\\Tests\\\\Stubs\\\\Widgets\\\\InAccessibleDimmer',\n ]);\n\n $dimmers = Voyager::dimmers();\n\n $this->assertEquals(1, $dimmers->count());\n }", "function ww_find_taxonomy_term_widgets($widgets){\n if (is_null($widgets) &&\n (is_tax() || is_category() || is_tag()) &&\n $term = get_queried_object())\n {\n $where = array(\n 'type' => 'taxonomy',\n 'variety' => 'term',\n 'extra_key' => $term->term_id,\n );\n if ($term_data = $this->ww->_extras_get($where)){\n // look for explicitly set preset\n if (isset($term_data->data['preset_id']) && $term_data->data['preset_id'] != 0){\n $preset = $this->ww->presets->get_preset($term_data->data['preset_id']);\n $this->ww->presets->current_preset_id = $preset->id;\n $widgets = $preset->widgets;\n }\n else {\n $widgets = $term_data->widgets;\n }\n }\n else {\n // see if the taxonomy is overriding\n $where['variety'] = 'taxonomy';\n $where['extra_key'] = $term->taxonomy;\n if ($tax_data = $this->ww->_extras_get($where)){\n if (isset($tax_data->data['override_default'])){\n $widgets = $this->_find_taxonomy_widgets($tax_data);\n }\n }\n }\n }\n \n return $widgets;\n }", "function retrieve_widgets($theme_changed = \\false)\n {\n }", "public function getAllWidgetTypes($theme = false)\n\t{\t\n\t\t$theme = $theme ?: \\CMS::coreModules()->getActiveTheme()->module_key;\n\t\treturn $this->findBy('theme', $theme);\n\t}", "public function initialize_widgets() {\n\n\t\t/**\n\t\t * Array of all the main sidebars registered in the theme\n\t\t */\n\t\t$sidebars_array = array(\n\t\t\t'sidebar-1' => esc_html__( 'Sidebar', 'hestia' ),\n\t\t\t'subscribe-widgets' => esc_html__( 'Subscribe', 'hestia' ),\n\t\t\t'sidebar-woocommerce' => esc_html__( 'WooCommerce Sidebar', 'hestia' ),\n\t\t\t'sidebar-top-bar' => esc_html__( 'Very Top Bar', 'hestia' ),\n\t\t\t'header-sidebar' => esc_html__( 'Navigation', 'hestia' ),\n\t\t\t'sidebar-big-title' => apply_filters( 'hestia_big_title_fs_label', esc_html__( 'Big Title Section', 'hestia' ) ),\n\t\t);\n\n\t\t/**\n\t\t * Array of sidebars registered in the footer area.\n\t\t * The hestia_footer_widget_areas_array filter is used in the PRO version to add the extra forth sidebar.\n\t\t */\n\t\t$footer_sidebars_array = apply_filters(\n\t\t\t'hestia_footer_widget_areas_array',\n\t\t\tarray(\n\t\t\t\t'footer-one-widgets' => esc_html__( 'Footer One', 'hestia' ),\n\t\t\t\t'footer-two-widgets' => esc_html__( 'Footer Two', 'hestia' ),\n\t\t\t\t'footer-three-widgets' => esc_html__( 'Footer Three', 'hestia' ),\n\t\t\t\t'footer-four-widgets' => esc_html__( 'Footer Four', 'hestia' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Number of footer sidebars that need to be registered.\n\t\t * This option is available only in the PRO version. In Hestia, the value is always 3.\n\t\t */\n\t\t$hestia_nr_footer_widgets = is_customize_preview() ? '4' : get_theme_mod( 'hestia_nr_footer_widgets', '3' );\n\n\t\t/**\n\t\t * If the Number of widgets areas option is selected, add the specific number of footer sidebars in the main sidebars array to be registered.\n\t\t */\n\t\tif ( ! empty( $hestia_nr_footer_widgets ) ) {\n\t\t\t$footer_sidebars_array = array_slice( $footer_sidebars_array, 0, $hestia_nr_footer_widgets );\n\t\t}\n\n\t\tif ( ! empty( $footer_sidebars_array ) ) {\n\t\t\t$sidebars_array = array_merge( $sidebars_array, $footer_sidebars_array );\n\t\t}\n\n\t\t/**\n\t\t * Register the sidebars\n\t\t */\n\t\tforeach ( $sidebars_array as $sidebar_id => $sidebar_name ) {\n\t\t\t$sidebar_settings = array(\n\t\t\t\t'name' => $sidebar_name,\n\t\t\t\t'id' => $sidebar_id,\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t'before_title' => '<h5>',\n\t\t\t\t'after_title' => '</h5>',\n\t\t\t);\n\t\t\tif ( $sidebar_id === 'subscribe-widgets' || $sidebar_id === 'blog-subscribe-widgets' ) {\n\t\t\t\t$sidebar_settings['before_widget'] = '';\n\t\t\t\t$sidebar_settings['after_widget'] = '';\n\t\t\t}\n\n\t\t\tregister_sidebar( $sidebar_settings );\n\t\t}\n\t}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Widget oben rechts',\n 'id' => 'widget_top_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget mitte rechts',\n 'id' => 'widget_center_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget unten rechts',\n 'id' => 'widget_bottom_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Newsletter Widget',\n 'id' => 'newsletter_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Custom Footer Widget',\n 'id' => 'footer_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n\n}", "function arphabet_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => 'Event Widget',\n\t\t'id' => 'event_widget',\n\t)\n \t);\n\tregister_sidebar( array(\n\t\t'name' => 'Landing Photo Widget',\n\t\t'id' => 'landingphoto_widget',\n\t)\n \t);\n\tregister_sidebar( array(\n\t\t'name' => 'Gallery Widget',\n\t\t'id' => 'gallery_widget',\n\t)\n\t );\n\t register_sidebar( array(\n\t\t'name' => 'About Widget',\n\t\t'id' => 'about_widget',\n\t)\n \t);\n}", "function cdn_register_widget_areas() {\n\t// Home, Single -- Before Content Ad\n\tgenesis_register_widget_area( array(\n\t\t'id' => 'cdn-home-after-header-widget',\n\t\t'name' => __( 'Home After Header Ad', 'cutedecision' ),\n\t\t'description' => __( 'Horizontal ad banner. Placed before the content, at the top of the page.', 'cutedecision' ),\n\t) );\n\n\t// Home -- Inside Content Ad\n\tgenesis_register_widget_area( array(\n\t\t\t'id' => 'cdn-home-inside-loop-widget',\n\t\t\t'name' => __( 'Home Inside Loop Ad', 'cutedecision' ),\n\t\t\t'description' => __( 'Ad banner... Placed...', 'cutedecision' ) // TODO: Заполнить description\n\t) );\n\n\t// Single -- After Content Ad\n\tgenesis_register_widget_area( array(\n\t\t\t'id' => 'cdn-single-after-loop-widget',\n\t\t\t'name' => __( 'Single After Content Ad', 'cutedecision' ),\n\t\t\t'description' => __( 'Ad banner... Placed...', 'cutedecision' )\n\t) );\n\n\t// Taxonomy -- Inside loop widget\n\tgenesis_register_widget_area( array(\n\t\t\t'id' => 'cdn-taxonomy-inside-loop-widget',\n\t\t\t'name' => __( 'Taxonomy Inside Loop', 'cutedecision' ),\n\t\t\t'description' => __( 'Ad banner... Placed...', 'cutedecision' )\n\t) );\n\n\t// LPHT Sidebar\n\tgenesis_register_sidebar( array(\n\t\t\t'id' => 'cdn-lpht-sidebar',\n\t\t\t'name' => __( 'LPHT Sidebar', 'cutedecision' ),\n\t\t\t'description' => __( 'This is a the sidebar displayed on Latest, Popular, Hot, Trending taxonomy pages.', 'cutedecision' )\n\t) );\n}", "function tom_Register_Widgets()\n{\n $settings = array(\n 'name' => 'Home Top Left',\n 'id' => 'home_top_left',\n 'before_widget' => '<div class=\"widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n );\n\n // different widget areas which I want to register.\n $widgets = array(\n 'Home Top Left'\n ,'Home Bottom Left'\n ,'Home Top Middle'\n ,'Home Bottom Middle'\n ,'Home Top Right'\n ,'Home Bottom Right'\n );\n\n // whizz through and register all the widget areas.\n foreach($widgets as $w)\n {\n $name = $w;\n $id = str_replace(' ','_',strtolower($w));\n $settings['name'] = $name;\n $settings['id'] = $id;\n register_sidebar($settings);\n } \n}", "function skcw_get_templates_list() {\n\tif (!empty($_GET['page']) && $_GET['page'] == 'code-to-widget') { return; }\n\t$template_path = get_option('skcw_template_directory');\n\tif (empty($template_path)) { return false; }\n\n\t$templates = wp_cache_get('skcw_templates', 'skcw_templates');\n\tif (!is_array($templates) || empty($templates)) {\n\t\t$templates = array();\n\t}\n\telse {\n\t\treturn $templates;\n\t}\n\t\n\t$templ_dir = @opendir($template_path);\n\tif (!$templ_dir) { return false; }\n\t\n\twhile (($file = readdir($templ_dir)) !== false) {\n\t\tif (is_file(trailingslashit($template_path).$file) && is_readable(trailingslashit($template_path).$file)) {\n\t\t\t$template_data = file_get_contents(trailingslashit($template_path).$file);\n\t\t\tif (preg_match('|Widget Name: (.*)$|mi', $template_data, $widget_name)) {\n\t\t\t\t$widget_name = $widget_name[1];\n\t\t\t}\n\t\t\tif (preg_match('|Widget Description: (.*)$|mi', $template_data, $widget_description)) {\n\t\t\t\t$widget_description = $widget_description[1];\n\t\t\t}\n\t\t\tif (preg_match('|Widget Title: (.*)$|mi', $template_data, $widget_title)) {\n\t\t\t\t$widget_title = $widget_title[1];\n\t\t\t}\n\t\t\tif (!empty($widget_name) && !empty($widget_description)) {\n\t\t\t\t$widget_classname = sanitize_title('skcw-'.$widget_name);\n\t\t\t\t$templates[$widget_classname] = array(\n\t\t\t\t\t\t'file' => $file,\n\t\t\t\t\t\t'widget_name' => $widget_name,\n\t\t\t\t\t\t'widget_classname' => $widget_classname,\n\t\t\t\t\t\t'widget_description' => $widget_description,\n\t\t\t\t\t\t'widget_title' => $widget_title\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\t@closedir($templ_dir);\n\tupdate_option('skcw_templates_list',$templates);\n\twp_cache_set('skcw_templates', $templates, 'skcw_templates');\n\treturn is_array($templates) ? $templates : false;\n}", "function load_widget() {\n\n\t\tregister_widget( 'WordpressConnectWidgetActivityFeed' );\n\t\tregister_widget( 'WordpressConnectWidgetComments' );\n\t\tregister_widget( 'WordpressConnectWidgetFacepile' );\n\t\tregister_widget( 'WordpressConnectWidgetLikeBox' );\n\t\tregister_widget( 'WordpressConnectWidgetLikeButton' );\n\t\tregister_widget( 'WordpressConnectWidgetLiveStream' );\n\t\tregister_widget( 'WordpressConnectWidgetLoginButton' );\n\t\tregister_widget( 'WordpressConnectWidgetRecommendations' );\n\t\tregister_widget( 'WordpressConnectWidgetSendButton' );\n\n\t}", "function responsive_il_register_widgets() {\n\tregister_sidebar( array(\n\t\t'name' => 'Home half widget',\n\t\t'id' => 'main-half-sidebar',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Footer bottom text area',\n\t\t'id' => 'footer-bottom',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Single footer',\n\t\t'id' => 'single-footer-bottom',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Single Top head',\n\t\t'id' => 'single-top-head',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "public function getAllControls();", "public function index()\n {\n $types = $this->allResources($this->typeRepository);\n\n return TypeResource::collection($types);\n }", "protected function getWidget()\n {\n $widgets = $this->getPage()->findAll('css', 'body div.filter-container ul.ui-multiselect-checkboxes');\n\n /** @var NodeElement $widget */\n foreach ($widgets as $widget) {\n if ($widget->isVisible()) {\n return $widget;\n }\n }\n\n self::fail('Could not find widget on page or it\\'s not visible');\n }", "public function registerFormWidgets()\n {\n return [];\n }", "public function index()\n {\n $types = Type::all();\n\n return $this->showAll($types);\n }", "public function index()\n {\n $types = Type::all();\n return $this->showAll($types);\n }", "public function getAllThemes();", "function msdlab_homepage_widgets(){\n\tprint '<div id=\"homepage-widgets\" class=\"widget-area\">';\n\tprint '<div class=\"wrap\"><div class=\"row\">';\n dynamic_sidebar('homepage-widgets');\n \tprint '</div></div>';\n\tprint '</div>';\n}", "function mgc_widgets_init() {\n\n // Area 1, located in the sidebar. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Sidebar Widget Area', 'mgc' ),\n 'id' => 'first-sidebar-widget-area',\n 'description' => __( 'The first sidebar widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widget-title title\">',\n 'after_title' => '</h2>',\n ) );\n\n // Area 2, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Sidebar Widget Area', 'mgc' ),\n 'id' => 'second-sidebar-widget-area',\n 'description' => __( 'The second sidebar widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widget-title title\">',\n 'after_title' => '</h2>',\n ) );\n\n // Area 3, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Page Widget Area', 'mgc' ),\n 'id' => 'first-page-widget-area',\n 'description' => __( 'The first page widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 4, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Page Widget Area', 'mgc' ),\n 'id' => 'second-page-widget-area',\n 'description' => __( 'The second page widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 5, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Footer Widget Area', 'mgc' ),\n 'id' => 'first-footer-widget-area',\n 'description' => __( 'The first footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 6, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Footer Widget Area', 'mgc' ),\n 'id' => 'second-footer-widget-area',\n 'description' => __( 'The second footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 7, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Third Footer Widget Area', 'mgc' ),\n 'id' => 'third-footer-widget-area',\n 'description' => __( 'The third footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n}", "public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Dropdown() );\n\t}", "public function getSidebarsIndex()\n\t{\n\t\t// Sidebar list\n\t\t$listSidebars = Sidebar::with([\n\t\t\t'widgets' => function($q) {\n\t\t\t\t$q->orderBy('widget_order', 'ASC');\n\t\t\t\t$q->addSelect('label');\n\t\t\t}\n\t\t\t])->get();\n\t\t// Fresh Sidebar for the form\n\t\t$sidebar = new Sidebar;\n\t\t// Widgets for the form\n\t\t$widgets = SidebarWidget::all();\n\n\t\t// Show the page\n\t\treturn View::make('backend.appearance.sidebars', compact('listSidebars', 'sidebar', 'widgets'));\n\t}" ]
[ "0.73280096", "0.7266385", "0.70905507", "0.7090283", "0.70264596", "0.6970121", "0.69011205", "0.6875017", "0.6836236", "0.6819798", "0.6819798", "0.6769803", "0.6704183", "0.6682997", "0.66001445", "0.6578597", "0.6556884", "0.6556642", "0.64795953", "0.6478857", "0.6478131", "0.64359355", "0.6422836", "0.64042664", "0.6327804", "0.6322925", "0.63182545", "0.62704813", "0.62682927", "0.6248105", "0.6169317", "0.61670184", "0.61670184", "0.6114043", "0.6100614", "0.60774416", "0.6075546", "0.60562843", "0.60293394", "0.60272586", "0.60181445", "0.59743136", "0.59524804", "0.59473705", "0.5937024", "0.5929613", "0.59251356", "0.591796", "0.59171355", "0.5911045", "0.5903042", "0.58883363", "0.588266", "0.586867", "0.58525217", "0.5843464", "0.58357024", "0.58313173", "0.58029425", "0.5794614", "0.5780942", "0.57556033", "0.5754469", "0.5720312", "0.57194513", "0.5714915", "0.5713992", "0.5685793", "0.5672707", "0.5657418", "0.5652188", "0.5650804", "0.564421", "0.56417155", "0.56380504", "0.5606949", "0.5598618", "0.55914104", "0.5582604", "0.5573088", "0.5569975", "0.556243", "0.55610514", "0.5521464", "0.55148846", "0.5511582", "0.54944897", "0.54539585", "0.5452978", "0.5448271", "0.5446162", "0.54420614", "0.5436605", "0.5435577", "0.54344743", "0.54201573", "0.5415457", "0.54146874", "0.54063094", "0.54033613" ]
0.59951735
41
Search the widget table with an array of widget names to see if it exists NOTE: $roleId is the role of the current page
private static function getWidgetsWithRoleWidgets($widgets, $roleId) { $resultArray = []; $widgetsWithRoleWidgets = WidgetModel::whereIn('title', $widgets) ->with(['RoleWidget' => function($q) use ($roleId){ $q->where('role_id', $roleId); }]) ->get() ->toArray(); // Handling multiple routes per widget array_map(function($widget) use(&$resultArray){ $explodedRoutes = explode(',', $widget['routes']); // If the widget has many routes i.e. comma separated values if( count($explodedRoutes) > 1) { // Explode them and create a new item per widget with the new route foreach ($explodedRoutes as $route) { $widget['routes'] = $route; $resultArray[] = $widget; } } else $resultArray[] = $widget; }, $widgetsWithRoleWidgets); // Array Map to remove un-related role_widgets $resultArray = array_map(function($widgetWithRoleWidget){ $currectRoute = $widgetWithRoleWidget['routes']; // If there is many role_widgets we need to delete the ones that is not related to the route of the current widget if(count($widgetWithRoleWidget['role_widget']) > 1) // Looping in the role_widget array that comes from the widgets->with('role_widget') foreach($widgetWithRoleWidget['role_widget'] as $key=>$roleWidget) // If the role_widget has different route than the one we are handling then remove it if($roleWidget['route'] != $currectRoute) // Removing un-related role_widget since it has a wrong order and is causing issues unset($widgetWithRoleWidget['role_widget'][$key]); // Rebasing the array $widgetWithRoleWidget['role_widget'] because some items were removed $widgetWithRoleWidget['role_widget'] = array_values($widgetWithRoleWidget['role_widget']); return $widgetWithRoleWidget; },$resultArray); return $resultArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAllowedWidgets($roleId = null)\n\t{\n\t\tif(is_null($roleId))\n\t\t\t$roleId = session('admin.user.role_id');\n\n\t\t// Getting an array of the widgets allowed to the current role_id\n\t\t$allowedWidgets = PermissionModel::where('role_id', $roleId)\n\t\t\t->where('permission', 'like', 'widgets.%')\n\t\t\t->get()\n\t\t\t->pluck('permission')\n\t\t\t->map(function($permission){ return explode('.', $permission)[1];})\n\t\t\t->toArray();\n\n\t\t// Searching the widgets for the widget title and getting its role_widget data too\n\t\t$widgetsWithRoleWidgets = self::getWidgetsWithRoleWidgets($allowedWidgets, $roleId);\n\n\t\treturn $widgetsWithRoleWidgets;\n\t}", "public static function existsWidget($id)\n {\n return (bool) BackendModel::getContainer()->get('database')->getVar(\n 'SELECT COUNT(i.id)\n FROM slideshow_widgets AS i\n WHERE i.id = ? AND i.language = ?',\n array((int) $id, BL::getWorkingLanguage())\n );\n }", "function acadp_has_active_listing_widgets() {\n\n\t// Vars\n\t$sidebars_widgets = get_option( 'sidebars_widgets' );\n\t$listing_widgets = array(\n\t\tACADP_PLUGIN_NAME.'-widget-listing-video',\n\t\tACADP_PLUGIN_NAME.'-widget-listing-address',\n\t\tACADP_PLUGIN_NAME.'-widget-listing-contact'\n\t);\n\t$found = 0;\n\n\t// Loop through active widgets list\n\tforeach( $sidebars_widgets as $sidebar => $widgets ) {\n\t\t// Check if the sidebar is active\n\t\tif( is_active_sidebar( $sidebar ) ) {\n\t\t\t// Loop through widgets registered inside this sidebar\n\t\t\tforeach( $widgets as $widget ) {\n\t\t\t\t// Loop through our listing specific widgets list\n\t\t\t\tforeach( $listing_widgets as $listing_widget ) {\n\t\t\t\t\t// Check if the current widget belongs to one of our listing specific widgets\n\t\t\t\t\tif( strpos( $widget, $listing_widget ) !== FALSE ) {\n\t\t\t\t\t\t$found = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $found;\n\n}", "function yz_is_ad_widget( $widget_name ) {\n if ( false !== strpos( $widget_name, 'yz_ad_' ) ) {\n return true;\n }\n return false;\n}", "public function has($name)\n {\n return array_has($this->widgets, $name);\n }", "function roles_dashboard_update_widget_definitions() {\n\n\t$widget_types = elgg_get_widget_types('all', true);\n\tforeach ($widget_types as $handler => $options) {\n\t\t$context = $options->context;\n\t\t$context[] = 'dashboard';\n\t\t$context = array_unique($context);\n\t\telgg_register_widget_type($handler, $options->name, $options->description, $context, $options->multiple);\n\t}\n\n\t$roles = roles_get_all_selectable_roles();\n\n\t$widget_types = elgg_get_widget_types('dashboard', true);\n\tforeach ($widget_types as $handler => $options) {\n\t\t$context = $options->context;\n\t\tforeach ($roles as $role) {\n\t\t\t$context[] = \"role::{$role->name}\";\n\t\t}\n\t\t$context = array_unique($context);\n\t\telgg_register_widget_type($handler, $options->name, $options->description, $context, $options->multiple);\n\t}\n}", "static public function check_if_builder_is_widget( $id, $builder_type ) {\n\t\tglobal $wpdb;\n\n\t\t// get the profile fields row for the id and save as array\n\t\t$sql = $wpdb->get_row(\n\t\t\t\"SELECT * FROM {$wpdb->base_prefix}pp_builder_widget WHERE builder_type = '$builder_type' AND builder_id = $id\",\n\t\t\t'ARRAY_A'\n\t\t);\n\n\t\treturn $sql;\n\t}", "function is_ss_widget($widget_id_base){\n\t\t$arr_ss_widget = array(\n\t\t\t\t\t\t\t'ss_logo_widget', \n\t\t\t\t\t\t\t'ss_menu_widget', \n\t\t\t\t\t\t\t'ss_page_widget', \n\t\t\t\t\t\t\t'ss_current_page_widget', \n\t\t\t\t\t\t\t'ss_parent_child_links_widget', \n\t\t\t\t\t\t\t'ss_part_widget',\n\t\t\t\t\t\t\t'ss_container_open_widget',\n\t\t\t\t\t\t\t'ss_container_close_widget',\n\t\t\t\t\t\t\t'ss_parts_accordion_widget',\n\t\t\t\t\t\t\t'ss_parts_slider_widget',\n\t\t\t\t\t\t\t'ss_parts_widget',\n\t\t\t\t\t\t\t'ss_ypnz_footer_widget'\n\t\t\t\t\t\t);\n\n\t\tif(in_array($widget_id_base, $arr_ss_widget)){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function voyage_mikado_has_blog_widget() {\n $widgets_array = array(\n 'mkd_latest_posts_widget'\n );\n\n foreach($widgets_array as $widget) {\n $active_widget = is_active_widget(false, false, $widget);\n\n if($active_widget) {\n return true;\n }\n }\n\n return false;\n }", "function yz_is_custom_widget( $widget_name ) {\n if ( false !== strpos( $widget_name, 'yz_custom_widget_' ) ) {\n return true;\n }\n return false;\n}", "public function getWidgetListing(){\t\n\t\t$query = 'SELECT '.DB_PREFIX.'widget_category.name AS \"category\", '.DB_PREFIX.'languages.prefix AS \"language\", '.DB_PREFIX.'widget.alias AS \"alias\", '.DB_PREFIX.'widget.language_id AS \"language_id\", '.DB_PREFIX.'widget.id AS \"id\", '.DB_PREFIX.'widget.status AS \"status\", '.DB_PREFIX.'widget.category_id AS \"category_id\", '.DB_PREFIX.'widget.name AS \"name\", '.DB_PREFIX.'widget.data AS \"data\" FROM '.DB_PREFIX.'widget LEFT JOIN '.DB_PREFIX.'languages ON '.DB_PREFIX.'languages.id = '.DB_PREFIX.'widget.language_id LEFT JOIN '.DB_PREFIX.'widget_category ON '.DB_PREFIX.'widget.category_id = '.DB_PREFIX.'widget_category.id ORDER BY '.DB_PREFIX.'widget_category.name ASC, '.DB_PREFIX.'languages.prefix ASC;';\n\t\t$rs = $this->reg->get('db')->query($query);\n\t\tif($rs->num_rows){\n\t\t\treturn $rs->rows;\n\t\t\t}\n\t\treturn false;\n\t\t}", "function medigroup_mikado_has_blog_widget() {\n $widgets_array = array(\n 'mkd_latest_posts_widget'\n );\n\n foreach($widgets_array as $widget) {\n $active_widget = is_active_widget(false, false, $widget);\n\n if($active_widget) {\n return true;\n }\n }\n\n return false;\n }", "public function get_available_widgets()\n {\n }", "function mixtape_qodef_has_woocommerce_widgets() {\n\t\t$widgets_array = array(\n\t\t\t'qodef_woocommerce_dropdown_cart',\n\t\t\t'woocommerce_widget_cart',\n\t\t\t'woocommerce_layered_nav',\n\t\t\t'woocommerce_layered_nav_filters',\n\t\t\t'woocommerce_price_filter',\n\t\t\t'woocommerce_product_categories',\n\t\t\t'woocommerce_product_search',\n\t\t\t'woocommerce_product_tag_cloud',\n\t\t\t'woocommerce_products',\n\t\t\t'woocommerce_recent_reviews',\n\t\t\t'woocommerce_recently_viewed_products',\n\t\t\t'woocommerce_top_rated_products'\n\t\t);\n\n\t\tforeach($widgets_array as $widget) {\n\t\t\t$active_widget = is_active_widget(false, false, $widget);\n\n\t\t\tif($active_widget) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "protected function retrieve_widgets()\n {\n }", "protected function retrieve_widgets()\n {\n }", "function yz_mycred_is_user_have_widgets( $widget_visibility, $widget_name ) {\n\n if ( 'user_badges' != $widget_name ) {\n return $widget_visibility;\n }\n\n // Get User Badges.\n $user_badges = mycred_get_users_badges( bp_displayed_user_id() );\n\n if ( empty( $user_badges ) ) {\n return false;\n }\n\n return true;\n}", "function wp_find_widgets_sidebar($widget_id)\n {\n }", "function CheckButtonAccess($roleID,$userroles){\n $totaluserroles = count($userroles);\n $showbutton = 'style=\"display:none\"';\n //loop through all the roles and check if they exist in the array\n for($index=0;$index<$totaluserroles;$index++)\n {\n if($userroles[$index]===$roleID){\n \n $showbutton = 'style=\"display:block\"';\n \n break;\n }\n }\n return $showbutton;\n }", "public function register_dashboard_widgets() {\n\t\t$widget_render = array( &$this, 'render_widget' );\n\n\t\tif ( false !== $this->option( 'widget_id' ) && false !== $this->option( 'widget_name' ) ) {\n\t\t\t$wid = $this->option( 'widget_id' );\n\t\t\t$wname = $this->option( 'widget_name' );\n\t\t\t$save_widget = ( ! empty( $this->fields() ) ) ? array( &$this, 'save_widget' ) : false;\n\t\t\twp_add_dashboard_widget( $wid, $wname, $widget_render, $save_widget );\n\t\t}\n\t}", "private function validate_sidebar_widget( $widget_id ) {\n\n\t\t$sidebars_widgets = $this->wp_get_sidebars_widgets();\n\n\t\t$widget_exists = false;\n\t\tforeach ( $sidebars_widgets as $sidebar_id => $widgets ) {\n\n\t\t\tif ( in_array( $widget_id, $widgets, true ) ) {\n\t\t\t\t$widget_exists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $widget_exists;\n\t}", "public function uulra_reload_all_widgets_admin()\r\n\t{\r\n\t\t$html = '';\t\r\n\t\t\r\n\t\t$widgets_ids = array();\t\r\n\t\t\r\n\t\t$widgets_col = $this->mWidgetsCol;\t\t\r\n\t\t$widgets_ids = get_option('uultra_profile_widget_col_1');\t\t\r\n\t\t\r\n\t\t$unused = false;\r\n\t\t\r\n\t\tif(isset($_POST[\"unused\"]))\r\n\t\t{\r\n\t\t\t$unused = true;\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(!$unused)\r\n\t\t{\t\t\r\n\t\t\r\n\t\t//col 1\t\t\r\n\t\t$html .= '<ul id=\"uultra-profile-widgets-available\" class=\"uultra-connectedSortable uultra-admin-available-widgets\">';\r\n\t\t\r\n\t\tforeach($widgets_ids as $key)\r\n\t\t{\r\n\t\t\t$widget = $widgets_col[$key];\t\t\t\r\n\t\t\t$html .= $this->get_admin_widget_template($widget, $key);\t\t\r\n\t\t\r\n\t\t}//end for each\r\n\t\t\r\n\t\t$html .= ' </ul> ';\r\n\t\t\r\n\t\t//col 2\t\t\r\n\t\t$html .= '<ul id=\"uultra-profile-widgets-available-2\" class=\"uultra-connectedSortable uultra-admin-available-widgets\">';\r\n\t\t\r\n\t\t$widgets_ids = get_option('uultra_profile_widget_col_2');\r\n\t\t\r\n\t\tforeach($widgets_ids as $key)\r\n\t\t{\r\n\t\t\t$widget = $widgets_col[$key];\t\t\t\r\n\t\t\t$html .= $this->get_admin_widget_template($widget, $key);\t\t\t\r\n\t\t\r\n\t\t}//end for each\r\n\t\t\r\n\t\t$html .= ' </ul> ';\r\n\t\t\r\n\t\t//col 3\t\t\r\n\t\t$html .= '<ul id=\"uultra-profile-widgets-available-3\" class=\"uultra-connectedSortable uultra-admin-available-widgets\">';\r\n\t\t\r\n\t\t$widgets_ids = get_option('uultra_profile_widget_col_3');\r\n\t\t\r\n\t\tforeach($widgets_ids as $key)\r\n\t\t{\r\n\t\t\t$widget = $widgets_col[$key];\t\t\t\r\n\t\t\t$html .= $this->get_admin_widget_template($widget, $key);\r\n\t\t\t\r\n\t\t\r\n\t\t}//end for each\r\n\t\t\r\n\t\t$html .= ' </ul> ';\t\r\n\t\t\r\n\t\t\r\n\t\t}else{ //unused only\r\n\t\t\r\n\t\t\r\n\t\t\tforeach($widgets_col as $key => $widget)\r\n\t\t\t{\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t$html .= $this->get_admin_widget_template($widget, $key,$unused );\t\t\t\t\r\n\t\t\t\r\n\t\t\t}//end for each\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\techo $html;\t\t\r\n\t\tdie();\r\n\t\t\r\n\t}", "public function getWidget($widgetId);", "public function widgets() {\r\n\t\t// Make sure the user has capability.\r\n\t\tif ( Permission::user_can( 'analytics' ) || ! is_admin() ) {\r\n\t\t\t// Most popular contents.\r\n\t\t\tregister_widget( Widgets\\Popular::instance() );\r\n\t\t}\r\n\t}", "function register_widgets() {\n\t if ( ! is_dir( $this->addon->dir . 'include/widgets/' ) ) { return; }\n\t $widget_files = scandir( $this->addon->dir . 'include/widgets/' );\n\t $widget_slug = array();\n\n\t foreach ( $widget_files as $widget_file ) {\n\t\t if ( preg_match( '/^class\\.([^.]*?)\\.php/' , $widget_file , $widget_slug ) === 1 ) {\n\t\t\t require_once( $this->addon->dir . 'include/widgets/' . $widget_file );\n\t\t\t register_widget( 'SLPWidget_' . $widget_slug[1] );\n\t\t }\n\t }\n }", "public function uultra_check_if_custom_widget_membership($widget_id, $package_id)\r\n\t{\r\n\t\t$custom_widgets = get_option('userultra_custom_user_widgets');\r\n\t\t\r\n\t\tif(isset($custom_widgets[$widget_id]))\r\n\t\t{\r\n\t\t\t//it's a custom widget\t\t\t\r\n\t\t\treturn true;\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\r\n\t}", "public function getWidgets()\n\t\t{\n\t\t\tif(!isset($this->id))\n\t\t\t\treturn FALSE;\n\t\t\t\n\t\t\tglobal $conn;\n\t\t\tglobal $SERVICENTER_WIDGETS;\n\t\t\t\n\t\t\t$g = $conn->prepare(\"SELECT position,widget FROM ServiCenter_Workspace_Widget WHERE workspace = ?\");\n\t\t\t$g->bindParam(1, $this->id);\n\t\t\t$g->execute();\n\t\t\t\n\t\t\t$widgets = [];\n\t\t\t\n\t\t\tforeach($g->fetchAll() as $widgetData)\n\t\t\t{\n\t\t\t\tif(isset($SERVICENTER_WIDGETS[$widgetData['widget']]))\n\t\t\t\t{\n\t\t\t\t\t$widgets[] = [$widgetData['position'], $SERVICENTER_WIDGETS[$widgetData['widget']][0]];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $widgets;\n\t\t}", "protected function getAvailableWidgetList() {\n\t\t$widgets = (array)$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['geckoboard']['widgets'];\n\n\t\t$availableWidgets = array();\n\t\tforeach ($widgets as $widget) {\n\t\t\t//todo: check if there are extension dependencies for the widget\n\t\t\t$availableWidgets[$widget] = $this->language->sL(\n\t\t\t\t'LLL:EXT:geckoboard/Resources/Private/Language/locallang_be.xml:label.' . $widget\n\t\t\t);\n\n\t\t\tif ($availableWidgets[$widget] == '') {\n\t\t\t\t$availableWidgets[$widget] = $widget;\n\t\t\t}\n\t\t}\n\n\t\treturn $availableWidgets;\n\t}", "function retrieve_widgets($theme_changed = \\false)\n {\n }", "public function is_widget_rendered($widget_id)\n {\n }", "public function widgets($params) {\n include_once 'common/widget/WidgetLayoutManager.class.php';\n if ($params['owner_type'] == WidgetLayoutManager::OWNER_TYPE_USER) {\n if ($this->_userCanViewWidget('admindelegation')) {\n include_once 'AdminDelegation_UserWidget.class.php';\n $params['codendi_widgets'][] = 'admindelegation';\n }\n if ($this->_userCanViewWidget('admindelegation_projects')) {\n include_once 'AdminDelegation_ShowProjectWidget.class.php';\n $params['codendi_widgets'][] = 'admindelegation_projects';\n }\n }\n }", "public function getWidget($widgetName)\r\n {\r\n foreach($this->_widgets as $widget)\r\n {\r\n if(key($widget) === $widgetName)\r\n return current($widget);\r\n }\r\n\r\n return false;\r\n }", "function wp_list_widgets()\n {\n }", "function wimb_add_dashboard_widgets()\n{\n\twp_add_dashboard_widget(\n\t\t'where-is-my-blogroll-feed',\t// Widget slug.\n\t\t__('Blogroll Feed','wimb'),\t// Title.\n\t\t'wimb_dashboard_widget_function' // Display function.\n\t);\t\n}", "public function findFirstBookingWidget($sidebar_widgets){\n\t\tforeach ($sidebar_widgets as $dd) {\n\t\t\tif ($dd != null){\n\t\t\t\tforeach ($dd as $d) {\n\t\t\t\t\t$string = 'hbgbookingwidget';\n\t\t\t\t\tif (stripos($d,$string) !== false) {\n\t\t\t\t\t $data = $d;\n\t\t\t\t\t\t$widget_id = substr($data, strpos($data, \"-\") + 1);\n\t\t\t\t\t return $widget_id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "static function widgets($widgets = array( )) {\n\t\t$path = '';\n\t\tif ( !empty( $widgets ) ) {\n\t\t\tforeach ( $widgets as $widget ) {\n\t\t\t\t// 1. include the class based on $widget, throw an error if not exists\n\t\t\t\t// any other way than via create_function?\n\t\t\t\tadd_action( 'widgets_init', create_function( '', 'register_widget( \"' . $widget . '\" );' ) );\n\t\t\t}\n\t\t}\n\t}", "function wp_maybe_load_widgets()\n {\n }", "function wp_listings_register_widgets() {\n\n\t$widgets = array( 'WP_Listings_Featured_Listings_Widget', 'WP_Listings_Search_Widget' );\n\n\tforeach ( (array) $widgets as $widget ) {\n\t\tregister_widget( $widget );\n\t}\n\n}", "public function getWidgetInfos($id){\t\n\t\t$query = 'SELECT '.DB_PREFIX.'widget_category.name AS \"category\", '.DB_PREFIX.'widget.alias AS \"alias\", '.DB_PREFIX.'widget.language_id AS \"language_id\", '.DB_PREFIX.'widget.id AS \"id\", '.DB_PREFIX.'widget.status AS \"status\", '.DB_PREFIX.'widget.category_id AS \"category_id\", '.DB_PREFIX.'widget.name AS \"name\", '.DB_PREFIX.'widget.data AS \"data\" FROM '.DB_PREFIX.'widget LEFT JOIN '.DB_PREFIX.'widget_category ON '.DB_PREFIX.'widget_category.id = '.DB_PREFIX.'widget.category_id WHERE '.DB_PREFIX.'widget.id = \"'.$id.'\" LIMIT 0,1;';\n\t\t$rs = $this->reg->get('db')->query($query);\n\t\tif($rs->num_rows){\n\t\t\treturn $rs->rows[0];\n\t\t\t}\n\t\treturn false;\n\t\t}", "public function index()\n {\n $widgets = Widget::query()\n ->where('inventory', '>', 0);\n\n // Implement filtering logic by size, type, and finish\n // Implement search logic by name\n $params = request()->all();\n $paramsKeys = array_keys($params);\n if (count($params)) {\n if (in_array('widgetSize', $paramsKeys)) {\n $size = $params['widgetSize'];\n if ($size && WidgetSize::findOrFail($size)) {\n $widgets->whereHas('widgetSize', function ($query) use ($size) {\n $query->where('id', '=', $size);\n });\n }\n }\n\n if (in_array('widgetType', $paramsKeys)) {\n $type = $params['widgetType'];\n if ($type && WidgetType::findOrFail($type)) {\n $widgets->whereHas('widgetType', function ($query) use ($type) {\n $query->where('id', '=', $type);\n });\n }\n }\n\n if (in_array('widgetFinish', $paramsKeys)) {\n $finish = $params['widgetFinish'];\n if ($finish && WidgetFinish::findOrFail($finish)) {\n $widgets->whereHas('widgetFinish', function ($query) use ($finish) {\n $query->where('id', '=', $finish);\n });\n }\n }\n\n if (in_array('name', $paramsKeys)) {\n $name = $params['name'];\n if ($name) {\n $widgets->where('name', 'LIKE', '%' . $name . '%');\n }\n }\n }\n\n $widgets->with(['widgetSize', 'widgetType', 'widgetFinish']);\n return $widgets->sortable(['name'])->paginate();\n }", "protected function get_widgets()\n {\n }", "public function getAvailableWidgets()\r\n {\r\n }", "public function getWidget($position)\n\t\t{\n\t\t\tif(!isset($this->id))\n\t\t\t\treturn FALSE;\n\t\t\t\n\t\t\tglobal $SERVICENTER_WIDGETS;\n\t\t\tglobal $SERVICENTER_WIDGET_LIMIT;\n\t\t\tglobal $conn;\n\t\t\tglobal $faCurrentUser;\n\t\t\t\n\t\t\t// Find widget, if it exists\n\t\t\t$f = $conn->prepare(\"SELECT widget FROM ServiCenter_Workspace_Widget WHERE workspace = ? AND position = ? LIMIT 1\");\n\t\t\t$f->bindParam(1, $this->id);\n\t\t\t$f->bindParam(2, $position);\n\t\t\t$f->execute();\n\t\t\t\n\t\t\tif($f->rowCount() != 1) // No widget in position\n\t\t\t\treturn FALSE;\n\t\t\t\n\t\t\t$widgetIndex = $f->fetchColumn(); // Get widget's position in array\n\t\t\t\n\t\t\t// Check if there is a widget in that position\n\t\t\tif(!isset($SERVICENTER_WIDGETS[$widgetIndex]))\n\t\t\t\treturn FALSE;\n\t\t\t\n\t\t\t// Build Widget\n\t\t\t$widget = $SERVICENTER_WIDGETS[$widgetIndex];\n\t\t\t\n\t\t\t$title = $widget[0]; // Get widget title\n\t\t\t\n\t\t\t// Query Tickets\n\t\t\t$params = $widget[1];\n\t\t\t$q = \"SELECT ServiCenter_Ticket.id FROM ServiCenter_Ticket \n\t\t\t\tINNER JOIN ServiCenter_TicketDetail ON ServiCenter_Ticket.id = ServiCenter_TicketDetail.ticket \n\t\t\t\tWHERE ServiCenter_Ticket.workspace = ?\";\n\t\t\t\n\t\t\t// Severity\n\t\t\tif(isset($params['seve']) AND is_array($params['seve']))\n\t\t\t\t$q .= \" AND ServiCenter_Ticket.severity IN (SELECT ServiCenter_TicketAttribute.id FROM ServiCenter_TicketAttribute WHERE ServiCenter_TicketAttribute.type = 'seve' AND ServiCenter_TicketAttribute.code IN ('\" . implode(\"','\", $params['seve']) . \"'))\";\n\t\t\t\n\t\t\t// Type\n\t\t\tif(isset($params['type']) AND is_array($params['type']))\n\t\t\t\t$q .= \" AND ServiCenter_Ticket.type IN (SELECT ServiCenter_TicketAttribute.id FROM ServiCenter_TicketAttribute WHERE ServiCenter_TicketAttribute.type = 'type' AND ServiCenter_TicketAttribute.code IN ('\" . implode(\"','\", $params['type']) . \"'))\";\n\t\t\t\n\t\t\t// Status\n\t\t\tif(isset($params['tsta']) AND is_array($params['tsta']))\n\t\t\t\t$q .= \" AND ServiCenter_Ticket.status IN ('\" . implode(\"','\", $params['tsta']) . \"')\";\n\t\t\t\n\t\t\t// Not Status\n\t\t\tif(isset($params['nsta']) AND is_array($params['nsta']))\n\t\t\t\t$q .= \" AND ServiCenter_Ticket.status NOT IN ('\" . implode(\"','\", $params['nsta']) . \"')\";\n\t\t\t\n\t\t\t// Assignee\n\t\t\tif(isset($params['assi']))\n\t\t\t{\n\t\t\t\tif($params['assi'] == 'self') // Get all tickets assigned to current user\n\t\t\t\t{\n\t\t\t\t\t$q .= \" AND ServiCenter_Ticket.id IN (SELECT ServiCenter_Ticket_Assignee.ticket FROM ServiCenter_Ticket_Assignee WHERE ServiCenter_Ticket_Assignee.user = ?)\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$q .= \" GROUP BY ServiCenter_Ticket.id ORDER BY MAX(ServiCenter_TicketDetail.date) DESC\";\n\t\t\t\n\t\t\t// Add limit to results\n\t\t\tif(isset($SERVICENTER_WIDGET_LIMIT) AND ctype_digit($SERVICENTER_WIDGET_LIMIT))\n\t\t\t\t$q .= \" LIMIT \" . $SERVICENTER_WIDGET_LIMIT;\n\t\t\t\n\t\t\t$g = $conn->prepare($q);\n\t\t\t$g->bindParam(1, $this->id);\n\t\t\t\n\t\t\tif(isset($params['assi']) AND $params['assi'] == \"self\")\n\t\t\t\t$g->bindParam(2, $faCurrentUser->getId());\n\t\t\t\n\t\t\t$g->execute();\n\t\t\t\n\t\t\t$tickets = [];\n\t\t\t\n\t\t\tforeach($g->fetchAll(\\PDO::FETCH_COLUMN, 0) as $id)\n\t\t\t{\n\t\t\t\t$ticket = new Ticket($id);\n\t\t\t\tif($ticket->load())\n\t\t\t\t\t$tickets[] = $ticket;\n\t\t\t}\n\t\t\t\n\t\t\treturn [$title, $tickets];\n\t\t}", "public function registerDashboardWidgets()\n {\n return [];\n }", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function testOnlyThemeWidgetFilter() {\n $this->drupalGet('/listjs-theme-test');\n $page = $this->getSession()->getPage();\n\n /* --- Start: Check whether theme widget filter is working --- */\n $page->fillField('mykittens-are-unique-filter', 'sin');\n\n $this->assertCount(1, $page->findAll('css', '.mykittens li'));\n $this->assertEquals($page->find('css', '.mykittens li .value_name-house')->getText(), \"Singh's\");\n /* --- End: Check whether theme widget filter is working --- */\n\n // Check whether views widget is not affected.\n $this->assertCount(count($this->contents), $page->findAll('css', '#listjs_test_views_block-block_1-wrapper li'));\n }", "public function disable_dashboard_widgets() {\n\n\t\t//Init vars\n\t\t$defaults = array(\n\t\t\t'id' \t\t=> NULL,\n\t\t\t'page'\t\t=> 'dashboard',\n\t\t\t'context'\t=> NULL\n\t\t);\n\n\t\t//Check if disable_dashboard_widgets array isset in config class\n\t\tif( isset($this->admin_disable_dashboard_widgets) && is_array($this->admin_disable_dashboard_widgets) ) {\n\n\t\t\t//Loop each request and call WP remove_meta_box for each\n\t\t\tforeach( $this->admin_disable_dashboard_widgets as $method_args ) {\n\n\t\t\t\t$method_args = wp_parse_args( $method_args, $defaults );\n\n\t\t\t\tif( isset( $method_args['id'], $method_args['page'], $method_args['context'] ) ) {\n\t\t\t\t\tremove_meta_box( $method_args['id'], $method_args['page'], $method_args['context'] );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "function portal_add_dashboard_widgets() {\n\n if(current_user_can('publish_portal_projects')) {\n\n wp_add_dashboard_widget(\n 'portal_dashboard_overview', // Widget slug.\n 'Projects', // Title.\n 'portal_dashboard_overview_widget_function' // Display function.\n );\n\n\t\twp_add_dashboard_widget(\n\t\t\t'portal_dashboard_timing',\n\t\t\t'Project Calendar',\n\t\t\t'portal_dashboard_calendar_widget'\n\t\t);\n\n }\n\n}", "function inafx_load_widgets() {\r\n\t$widget_files = array(\r\n 'MY_TabbedPosts_Widget' => 'my-tabbed-posts.php',\r\n\t\t'My_SocialNetworks_Widget' => 'my-social-widget.php',\r\n\t\t'MY_Ad_125x125_Widget' => 'my-ad125-widget.php',\r\n 'MY_Ad_300_Widget' => 'my-ad300-widget.php',\r\n 'MY_Twitter_Widget' => 'my-twitter-widget.php',\r\n\t\t'MY_Flickr_Widget' => 'my-flickr-widget.php',\r\n\t\t'MY_Instagram_Widget' => 'my-instagram-widget.php',\r\n\t);\r\n\tforeach ( $widget_files as $class_name => $file_name ) {\r\n if ( file_exists( INAFX_PARENT_DIR . '/includes/widgets/' . $file_name ) ) {\r\n $widget_dir = INAFX_PARENT_DIR . '/includes/widgets/' . $file_name;\r\n\t\t include_once ( $widget_dir );\r\n\t\t if ( class_exists( $class_name ) ) {\r\n\t\t\t register_widget( $class_name );\r\n\t\t }\r\n }\r\n\t}\r\n}", "public function getWidgetsByType() {\n\t\t$types = array();\n\t\tif ($this->hasParameter('widgets')) {\n\t\t\tforeach ($this->getParameter('widgets') as $name => $widget) {\n\t\t\t\t$targets = $widget['target'];\n\t\t\t\tforeach($targets as $target) {\n\t\t\t\t\tif ($target == 'all') {\n\t\t\t\t\t\t$list = Data::TYPES;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$list = [$target];\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($list as $type) {\n\t\t\t\t\t\tif (! isset($types[$type])) {\n\t\t\t\t\t\t\t$types[$type] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$types[$type][] = $name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $types;\n\t}", "function add_dashboard_widgets() {\n\twp_add_dashboard_widget('dashboard_widget', 'Al-Zwaid FrameWork', 'dashboard_widget_function');\n}", "function wp_dashboard_trigger_widget_control($widget_control_id = \\false)\n {\n }", "static function register_search_widget_area(){\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Hot Search' ,\n\t\t\t'id' => 'hotsearch',\n\t\t\t'description' => 'Advanced Search beside user 1 widget',\n\t\t\t'before_widget' => '<div class=\"widget widget_hotsearch\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle widgettitle_hotsearch\" >',\n\t\t\t'after_title' => '</h3>'\n\t\t));\n\t\t\n\t\tif(class_exists('widget_hot_search')){\n\t\t\tregister_widget( 'widget_hot_search' );\n\t\t}\n\t}", "function wp_add_dashboard_widget($widget_id, $widget_name, $callback, $control_callback = \\null, $callback_args = \\null, $context = 'normal', $priority = 'core')\n {\n }", "function tom_Register_Widgets()\n{\n $settings = array(\n 'name' => 'Home Top Left',\n 'id' => 'home_top_left',\n 'before_widget' => '<div class=\"widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n );\n\n // different widget areas which I want to register.\n $widgets = array(\n 'Home Top Left'\n ,'Home Bottom Left'\n ,'Home Top Middle'\n ,'Home Bottom Middle'\n ,'Home Top Right'\n ,'Home Bottom Right'\n );\n\n // whizz through and register all the widget areas.\n foreach($widgets as $w)\n {\n $name = $w;\n $id = str_replace(' ','_',strtolower($w));\n $settings['name'] = $name;\n $settings['id'] = $id;\n register_sidebar($settings);\n } \n}", "public function uultra_check_if_custom_widget($widget_id)\r\n\t{\r\n\t\t$custom_widgets = get_option('userultra_custom_user_widgets');\r\n\t\t\r\n\t\tif(isset($custom_widgets[$widget_id]))\r\n\t\t{\r\n\t\t\t//it's a custom widget\t\t\t\r\n\t\t\treturn true;\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\r\n\t}", "protected function getWidget()\n {\n $widgets = $this->getPage()->findAll('css', 'body div.filter-container ul.ui-multiselect-checkboxes');\n\n /** @var NodeElement $widget */\n foreach ($widgets as $widget) {\n if ($widget->isVisible()) {\n return $widget;\n }\n }\n\n self::fail('Could not find widget on page or it\\'s not visible');\n }", "public static function add_dashboard_widgets() {\n global $settings, $translations;\n\n\t\twp_add_dashboard_widget(\n\t\t\t$settings['id'],\n\t\t\t$translations['widget_title'],\n\t\t\tarray('QuickInfoWidget','widget'),\n\t\t\tarray('QuickInfoWidget','config')\n\t\t);\n\t}", "public function WidgetSearch()\n {\n return $this->extensionSearch();\n }", "function qrd_add_dashboard_widgets() {\n\twp_add_dashboard_widget('qrp_dashboard_widget', 'Quick REST Draft', 'qrd_widget_function');\n}", "public function getWidgetByPath(array $names);", "function is_sp_widget_context() {\n\t\tif ( isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'],$this->id_base) !== false ) {\n\t\t\treturn true;\n\t\t} elseif ( isset($_REQUEST['_wp_http_referer']) && strpos($_REQUEST['_wp_http_referer'],$this->id_base) !== false ) {\n\t\t\treturn true;\n\t\t} elseif ( isset($_REQUEST['widget_id']) && strpos($_REQUEST['widget_id'],$this->id_base) !== false ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function skcw_get_templates_list() {\n\tif (!empty($_GET['page']) && $_GET['page'] == 'code-to-widget') { return; }\n\t$template_path = get_option('skcw_template_directory');\n\tif (empty($template_path)) { return false; }\n\n\t$templates = wp_cache_get('skcw_templates', 'skcw_templates');\n\tif (!is_array($templates) || empty($templates)) {\n\t\t$templates = array();\n\t}\n\telse {\n\t\treturn $templates;\n\t}\n\t\n\t$templ_dir = @opendir($template_path);\n\tif (!$templ_dir) { return false; }\n\t\n\twhile (($file = readdir($templ_dir)) !== false) {\n\t\tif (is_file(trailingslashit($template_path).$file) && is_readable(trailingslashit($template_path).$file)) {\n\t\t\t$template_data = file_get_contents(trailingslashit($template_path).$file);\n\t\t\tif (preg_match('|Widget Name: (.*)$|mi', $template_data, $widget_name)) {\n\t\t\t\t$widget_name = $widget_name[1];\n\t\t\t}\n\t\t\tif (preg_match('|Widget Description: (.*)$|mi', $template_data, $widget_description)) {\n\t\t\t\t$widget_description = $widget_description[1];\n\t\t\t}\n\t\t\tif (preg_match('|Widget Title: (.*)$|mi', $template_data, $widget_title)) {\n\t\t\t\t$widget_title = $widget_title[1];\n\t\t\t}\n\t\t\tif (!empty($widget_name) && !empty($widget_description)) {\n\t\t\t\t$widget_classname = sanitize_title('skcw-'.$widget_name);\n\t\t\t\t$templates[$widget_classname] = array(\n\t\t\t\t\t\t'file' => $file,\n\t\t\t\t\t\t'widget_name' => $widget_name,\n\t\t\t\t\t\t'widget_classname' => $widget_classname,\n\t\t\t\t\t\t'widget_description' => $widget_description,\n\t\t\t\t\t\t'widget_title' => $widget_title\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\t@closedir($templ_dir);\n\tupdate_option('skcw_templates_list',$templates);\n\twp_cache_set('skcw_templates', $templates, 'skcw_templates');\n\treturn is_array($templates) ? $templates : false;\n}", "public function get_dashboard_widget_options( $widget_id='' )\n {\n //Fetch ALL dashboard widget options from the db...\n $opts = get_site_option( 'red_flag_widget_options' );\n\n //If no widget is specified, return everything\n if ( empty( $widget_id ) )\n return $opts;\n\n //If we request a widget and it exists, return it\n if ( isset( $opts[$widget_id] ) )\n return $opts[$widget_id];\n\n //Something went wrong...\n return false;\n }", "public function sanitize_sidebar_widgets($widget_ids)\n {\n }", "public function getWidgetCategoryDropBox(){\t\n\t\t$query = 'SELECT '.DB_PREFIX.'widget_category.name AS \"name\", '.DB_PREFIX.'widget_category.id AS \"id\" FROM '.DB_PREFIX.'widget_category;';\n\t\t$rs = $this->reg->get('db')->query($query);\n\t\tif($rs->num_rows){\n\t\t\treturn $rs->rows;\n\t\t\t}\n\t\treturn false;\n\t\t}", "function acfwidget($name, $widgetid) {\n if (get_field($name, 'widget_'.$widgetid)) {\n $afcfield = get_field($name, 'widget_'.$widgetid);\n //print_r($afcfield);\n\n if ( !empty( $afcfield ) ) {\n foreach ($afcfield as $field) {\n $layout = $field['acf_fc_layout'];\n\n try {\n Timber::render($layout . '.twig', $field);\n } catch (Exception $e) {\n echo 'Could not find a twig file for layout type: ' . $layout;\n }\n }\n }\n }\n return;\n}", "function wpscSupportTickets_main_add_dashboard_widgets() {\r\n $this->checkPermissions();\r\n wp_add_dashboard_widget('wpscSupportTickets_main_dashboard_widgets', __('IDB Support Tickets Overview', 'wpsc-support-tickets'), array(&$this, 'wpscSupportTickets_main_dashboard_widget_function'));\r\n \r\n }", "public function filter_sidebars_widgets_for_rendering_widget($sidebars_widgets)\n {\n }", "public function load_widgets() {\r\n \r\n $files = glob( get_template_directory(). '/inc/widgets/*.php' );\r\n \r\n if( is_array($files) ){\r\n foreach( $files as $filename ) {\r\n include_once( $filename );\r\n }\r\n }\r\n\t\t \r\n\t }", "function textbook_exists($db, $id)\n{\n\t$sql = 'SELECT * FROM textbooks where id=:id';\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':id'=>$id));\n\t$us = $st->fetchAll();\n\treturn (count($us) >=1);\n}", "public static function get_dashboard_widget_options( $widget_id='' )\n {\n //Fetch ALL dashboard widget options from the db...\n $opts = get_option( 'widget_broker_widget' );\n\n //If no widget is specified, return everything\n if ( empty( $widget_id ) )\n return $opts;\n\n //If we request a widget and it exists, return it\n if ( isset( $opts[$widget_id] ) )\n return $opts[$widget_id];\n\n //Something went wrong...\n return false;\n }", "function widget_permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'widget')) {\n\t\treturn $return;\n\t}\n\n\tif ($params['entity']->getContext() != 'pinboards') {\n\t\treturn $return;\n\t}\n\n\tif (elgg_get_config('au_sets_widget_noedit')) {\n\t\treturn false;\n\t}\n\n\treturn $return;\n}", "public function loadWidgetsFromArray($jsonData) {\n\t\t// echo json_encode($jsonData);\n\t\t// die;\n\t\tif(!$this->templateId) {\n\t\t\treturn false;\n\t\t}\n\t\t# get the template for this asset, it contains the widgets\n\t\t$this->assetTemplate = $this->asset_template->getTemplate($this->templateId);\n\t\tif(!$this->assetTemplate) {\n\t\t\treturn false;\n\t\t}\n\t\t$populatedWidgetArray = array();\n\n\t\t# go through all the widgets from the template, see if they're set in the jsonData\n\t\tforeach($this->assetTemplate->widgetArray as $widget) {\n\t\t\t$widgetKey = $widget->getFieldTitle();\n\n\t\t\tif(isset($jsonData[$widgetKey])) {\n\t\t\t\t$populatedWidgetArray[$widgetKey] = clone $widget;\n\t\t\t\t$populatedWidgetArray[$widgetKey]->parentObjectId = $this->getObjectId();\n\t\t\t\tif(is_array($jsonData[$widgetKey])) {\n\t\t\t\t\t$i=0;\n\t\t\t\t\tforeach($jsonData[$widgetKey] as $key=>$value) {\n\t\t\t\t\t\tif(is_array($value)) {\n\t\t\t\t\t\t\t$tempObject = $widget->getContentContainer();\n\t\t\t\t\t\t\t$tempObject->parentObjectId = $this->getObjectId();\n\t\t\t\t\t\t\t$tempObject->parentObject = $this;\n\t\t\t\t\t\t\t$tempObject->loadContentFromArray($value);\n\t\t\t\t\t\t\tif(isset($jsonData[$widgetKey]['isPrimary'])) {\n\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * this case occurs on form submission, as isPrimary is widget level, not content level.\n\t\t\t\t\t\t\t * But we want to track it content-level otherwise.\n\t\t\t\t\t\t\t * technically we don't need to set the false, as false will be the default on loads from\n\t\t\t\t\t\t\t * mongo - we won't end up with duplicate isPrimaries. But this seemed like the smart way to go,\n\t\t\t\t\t\t\t * just in case.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif($jsonData[$widgetKey]['isPrimary'] == $i) {\n\t\t\t\t\t\t\t\t\t$tempObject->isPrimary = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t$tempObject->isPrimary = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// only save this widget if it actually has contents. This assumes widgets are well behaved.\n\t\t\t\t\t\t\tif($tempObject->hasContents()) {\n\t\t\t\t\t\t\t\t$populatedWidgetArray[$widgetKey]->addContent($tempObject);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->assetObjects = $populatedWidgetArray;\n\n\t\t/**\n\t\t * Generally we want to access these in display order\n\t\t */\n\t\t$this->sortBy('viewOrder');\n\n\n\t\treturn TRUE;\n\t}", "public function exists() {\n\t\tglobal $wpdb;\n\n\t\treturn (bool) $wpdb->get_var( $wpdb->prepare(\n\t\t\t\"SELECT `mutex_id` FROM {$wpdb->base_prefix}itsec_mutexes WHERE `mutex_id` = %d\",\n\t\t\t$this->get_id()\n\t\t) );\n\t}", "function wp_parse_widget_id($id)\n {\n }", "function disable_all_widgets($sidebars_widgets) {\n //if (is_home())\n $sidebars_widgets = array(false);\n return $sidebars_widgets;\n}", "public function getWidgetIds($namespace, $name) {\n\t\t$query = $this->createQuery(0);\n\t\t$query->addCondition('{namespace} = %1% AND {name} = %2%', $namespace, $name);\n\n\t\t$widgets = $query->query();\n\n\t\t$widgetIds = array();\n\t\tforeach ($widgets as $widget) {\n\t\t\t$widgetIds[$widget->id] = $widget->id;\n\t\t}\n\n\t\treturn $widgetIds;\n\t}", "function add_dash_widgets() {\n\n\t\tglobal $wp_meta_boxes;\n\n\t\t$dash_widgets = $this->dash_widgets;\n\n\t\t// If any new widgets are already set, this means they aren't AC widgets and only have the title modified. So\n\t\t// we need to change the title and then unset the new widget.\n\t\tif ( $dash_widgets ) {\n\t\t\tforeach ( $wp_meta_boxes['dashboard'] as &$priorities ) {\n\t\t\t\tforeach ( $priorities as &$widgets ) {\n\t\t\t\t\tforeach ( $widgets as $widget_ID => &$widget ) {\n\t\t\t\t\t\tif ( isset( $dash_widgets[ $widget_ID ] ) ) {\n\n\t\t\t\t\t\t\tif ( isset( $dash_widgets[ $widget_ID ]['title'] ) ) {\n\t\t\t\t\t\t\t\t$widget['title'] = $dash_widgets[ $widget_ID ]['title'];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tunset( $dash_widgets[ $widget_ID ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tunset( $priorities, $widgets, $widget );\n\t\t}\n\n\t\t// Now we continue on and add any remaining new widgets.\n\t\tif ( $dash_widgets ) {\n\t\t\tforeach ( $dash_widgets as $widget_ID => $widget ) {\n\n\t\t\t\t// Make sure this is indeed an AC widget\n\t\t\t\tif ( ! isset( $widget['ac_id'] ) ) {\n\t\t\t\t\tunset( $dash_widgets[ $widget_ID ] );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Make sure the saved widget exists\n\t\t\t\tif ( ! isset( AC_Interface::$widgets[ $widget['ac_id'] ] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tcall_user_func( array(\n\t\t\t\t\tAC_Interface::$widgets[ $widget['ac_id'] ],\n\t\t\t\t\t'add_to_dashboard'\n\t\t\t\t), $widget );\n\t\t\t}\n\t\t}\n\t}", "public function get_widgets() {\n\n $sidebar_name = sidebar\\Sidebar::get_sidebar_name();\n \n global $wp_registered_widgets;\n\n $sidebars_widgets = get_option( 'sidebars_widgets' );\n\n $sidebar_widgets = [];\n if ( array_key_exists( $sidebar_name, $sidebars_widgets ) ) {\n\n foreach( $sidebars_widgets[$sidebar_name] as $key => $value ) {\n $widget_id = $value;\n $widget_parts = explode( '-', $widget_id );\n $widget_base_id = $widget_parts[0];\n $widget_number = $widget_parts[1];\n $options = get_option( 'widget_' . $widget_base_id );\n\n $widget_title = '';\n if ( is_array( $options[$widget_number] ) ) {\n\n if ( array_key_exists( 'title', $options[$widget_number] ) && !empty( $options[$widget_number]['title'] ) ) {\n $widget_title = $options[$widget_number]['title'];\n }\n else {\n foreach ( $wp_registered_widgets as $w => $rwidget ) {\n if ( $w == $widget_id ) {\n $widget_title = $rwidget['name']; \n }\n else {\n if ($widget_title == '') {\n $widget_title = $widget_id; \n }\n }\n }\n }\n }\n $sidebar_widgets[] = [ $widget_id => $widget_title ];\n }\n\n }\n\n \n return $sidebar_widgets;\n\n }", "function register_widget($widget)\n {\n }", "function wp_map_sidebars_widgets($existing_sidebars_widgets)\n {\n }", "public static function get_dashboard_widget_options( $widget_id='' )\n {\n //Fetch ALL dashboard widget options from the db...\n $opts = get_option( 'dashboard_widget_options' );\n\n //If no widget is specified, return everything\n if ( empty( $widget_id ) )\n return $opts;\n\n //If we request a widget and it exists, return it\n if ( isset( $opts[$widget_id] ) )\n return $opts[$widget_id];\n\n //Something went wrong...\n return false;\n }", "public static function get_dashboard_widget_options( $widget_id='' )\n {\n //Fetch ALL dashboard widget options from the db...\n $opts = get_option( 'dashboard_widget_options' );\n\n //If no widget is specified, return everything\n if ( empty( $widget_id ) )\n return $opts;\n\n //If we request a widget and it exists, return it\n if ( isset( $opts[$widget_id] ) )\n return $opts[$widget_id];\n\n //Something went wrong...\n return false;\n }", "public static function get_dashboard_widget_options( $widget_id='' )\n {\n //Fetch ALL dashboard widget options from the db...\n $opts = get_option( 'dashboard_widget_options' );\n\n //If no widget is specified, return everything\n if ( empty( $widget_id ) )\n return $opts;\n\n //If we request a widget and it exists, return it\n if ( isset( $opts[$widget_id] ) )\n return $opts[$widget_id];\n\n //Something went wrong...\n return false;\n }", "function widget($args, $instance){\r\n\t//on déclare $wpdb en globale pour exécuter le SQL qui retourne un objet PHP \r\n\tglobal $wpdb;\r\n\r\n\t//si les tables users et jets n'existent pas, on les crée\r\n\t$create_tableUsers_query = \"\r\n\t CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}widgetDice_users` (\r\n\t `id` INTEGER unsigned NOT NULL default '0',\r\n\t `name` VARCHAR(255) NOT NULL,\r\n\t `pwd` VARCHAR(255) NOT NULL\r\n\t ) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r\n\t \";\r\n\t$create_tableJets_query = \"\r\n\t CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}widgetDice_jets` (\r\n\t `id` INTEGER unsigned NOT NULL default '0',\r\n\t `idUser` INTEGER unsigned NOT NULL default '0',\r\n\t `DateJet` DATETIME NOT NULL,\r\n\t `StringJet` VARCHAR(255) NOT NULL\r\n\t ) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r\n\t \";\r\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n dbDelta( $create_tableUsers_query );\r\n dbDelta( $create_tableJets_query );\r\n\r\n\t$myrows = $wpdb->get_results( \"SELECT * FROM {$wpdb->prefix}widgetDice_users WHERE name = 'moi' AND pwd = 'moi'\", OBJECT );\r\n\t$user_count = $wpdb->get_var( \"SELECT COUNT(*) FROM $wpdb->users\" );\r\n\t//on récupère l'historique des 500 derniers lancers dans la base\r\n\t$monhistorique = $wpdb->get_results( \"SELECT * FROM {$wpdb->prefix}widgetDice_jets LEFT JOIN {$wpdb->prefix}widgetDice_users ON {$wpdb->prefix}widgetDice_jets.`idUser` = {$wpdb->prefix}widgetDice_users.`id` ORDER BY DateJet DESC LIMIT 500\", OBJECT );\r\n\r\n\t//on récupère les variables\r\n\textract($args);\r\n\t//on récupère ce qu'on doit afficher avant le widget\r\n\techo $before_widget;\r\n\t//on met le contenu du widget\r\n\t//un titre avec les var after et before pour que wp mette autoatiquement les balises et qu'on n'ait rien à règler\r\n\t//comme ça on s'adapte au thème et le widget s'affiche correctement\r\n\t//on récupère dynamiquement le titre tapé par l'utilisateur avec $instance[\"titre\"]\r\n\techo $before_title.$instance[\"titre\"].$after_title;\r\n\t?>\r\n\t\t<!-- on récupère le nom du form -->\r\n\t\t<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\" integrity=\"sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm\" crossorigin=\"anonymous\">\r\n\t\t<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js\" integrity=\"sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl\" crossorigin=\"anonymous\"></script>\r\n\t\t<!-- <p> <strong><?php echo $instance[\"nom\"]; ?></strong> </p> -->\r\n\t\t<!-- <p> <strong>Ajouter des dés</strong> </p> -->\r\n\t\t<!-- <div class=\"alert alert-info\" role=\"alert\">\r\n\r\n\t\t<?php\r\n\t\tif(isset($_POST['loginUser'])){\r\n\t\t\t//var_dump($_POST['loginUser']);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//echo \"Vous devez vous loguer pour lancer les dés\".PHP_EOL.PHP_EOL;\r\n\t\t}\r\n\t\t//if (!isset($_GET['loginUser'])){\r\n\t\t\t//echo \" - Utilisateur non logué\";\r\n\t\t\techo \" Version sans blocage du login activé.\";\r\n\t\t\t//le post retourné par le form est vide : je n'ai pas pu faire la requête pour vérifier le login en base\r\n\t\t\t//le select est prêt dans la variable $myrows\r\n\t\t\t?>\r\n\t\t\t<!-- Login Form -->\r\n\t\t <form method=\"POST\" action=\"\" name=\"formLogin\">\r\n\t\t <!-- <form action=\"<?php echo esc_url( admin_url('admin-post.php') ); ?>\" method=\"post\"> -->\r\n\t\t \t<div class=\"container\">\r\n\t\t \t\t<div class=\"row\">\r\n\t\t\t\t <input type=\"text\" id=\"loginUser\" class=\"fadeIn second\" name=\"login\" placeholder=\"login\">\r\n\t\t\t\t </div>\r\n\t\t\t\t <div class=\"row\">\r\n\t\t\t\t <input type=\"text\" id=\"password\" class=\"fadeIn third\" name=\"login\" placeholder=\"password\">\r\n\t\t\t\t </div>\r\n\t\t\t\t <div class=\"row\">\r\n\t\t\t\t <input type=\"submit\" class=\"fadeIn fourth\" value=\"Log In\">\r\n\t\t\t\t </div>\r\n\t\t\t\t <div class=\"row\">\r\n\t\t\t\t <input type=\"hidden\" name=\"action\" value=\"contact_form\">\r\n\t\t\t\t </div>\r\n\t\t\t\t</div>\r\n\t\t </form>\r\n\t\t <?php\r\n\t\t//}\r\n\t\t//else{\r\n\t\t\t//echo \"Utilisateur logué\";\r\n\t\t//$this->check_password( \"\", \"\" );\r\n\t\t?>\r\n\t\r\n\t\t<form method=\"post\" action=\"\" name=\"form1\">\r\n\t\t\t<div class=\"container\"> \r\n\t <h4 class=\"ZoneDes\" id=\"ZoneDes\" margin=\"0\">Sélectionnez les dés :</h4>\r\n\t <div class=\"row\">\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D2</h4>\r\n\t\t <input type=\"text\" id=\"d2\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t\t </div>\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D4</h4>\r\n\t\t <input type=\"text\" id=\"d4\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t \t</div>\r\n\t \t</div>\r\n\t \t<div class=\"row\">\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D6</h4>\r\n\t\t <input type=\"text\" id=\"d6\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t\t </div>\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D8</h4>\r\n\t\t <input type=\"text\" id=\"d8\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t \t</div>\r\n\t \t</div>\r\n\t \t <div class=\"row\">\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D10</h4>\r\n\t\t <input type=\"text\" id=\"d10\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t\t </div>\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D12</h4>\r\n\t\t <input type=\"text\" id=\"d12\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t \t</div>\r\n\t \t</div>\r\n\t \t <div class=\"row\">\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D20</h4>\r\n\t\t <input type=\"text\" id=\"d20\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t\t </div>\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D100</h4>\r\n\t\t <input type=\"text\" id=\"d100\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t \t</div>\r\n\t \t</div>\r\n\t \t <div class=\"row\">\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>Modifier</h4>\r\n\t\t <input type=\"text\" id=\"dmodifier\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t\t </div>\r\n\t \t</div>\r\n\t \t<br /><br />\r\n\t \t<a href=\"javascript:void(null)\" onclick=\"getResult()\"><img src=\"https://www.wizards.com/dnd/dice/images/roll1.jpg\" alt=\"Roll dices\" name=\"rd\" border=\"0\"></a><br /><br />\r\n\t \t<textarea name=\"runningtotal\" cols=\"25\" rows=\"10\"></textarea>\r\n \t\t</div>\r\n\t\t</form>\r\n <script>\r\n function getResult() {\r\n\r\n\t var jetDesArr = [];\r\n\t d2rolls = parseInt(document.form1.d2.value); //Nombre de dés de 2 entré exemple 2\r\n\t d4rolls = parseInt(document.form1.d4.value); //Nombre de dés de 4 entré exemple 2\r\n\t d6rolls = parseInt(document.form1.d6.value); //Nombre de dés de 6 entré exemple 2\r\n\t d8rolls = parseInt(document.form1.d8.value); //Nombre de dés de 8 entré exemple 2\r\n\t d10rolls = parseInt(document.form1.d10.value); //Nombre de dés de 10 entré exemple 2\r\n\t d12rolls = parseInt(document.form1.d12.value); //Nombre de dés de 12 entré exemple 2\r\n\t d20rolls = parseInt(document.form1.d20.value); //Nombre de dés de 20 entré exemple 2\r\n\t d100rolls = parseInt(document.form1.d100.value); //Nombre de dés de 100 entré exemple 2\r\n\t dmodifier = parseInt(document.form1.dmodifier.value); //Nombre de dés de 100 entré exemple 2\r\n\r\n\t dtotal = \"\";\r\n\t d2res = 0;\r\n\t d4res = 0;\r\n\t d6res = 0;\r\n\t d8res = 0;\r\n\t d10res = 0;\r\n\t d12res = 0;\r\n\t d20res = 0;\r\n\t d100res = 0;\r\n\t rtotal = document.form1.runningtotal.value; \r\n \r\n \t \t //Nombre de dés de 4 entré exemple 2\r\n\t\tdtotal = dtotal + \"Roll(\" + d2rolls.toString() + \"d2\" + \")\" + \": \"; \r\n\t\tfor (r=0; r<d2rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d2 = Math.floor((Math.random() * 2) + 1);\t\r\n\t d2res = d2res + d2;\t\r\n\t dtotal = dtotal + d2.toString() + (r == (d2rolls - 1) ? \"\" : \",\");\r\n\t\t //=> on prépare l'affichage dans l'historique\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t\tdtotal = dtotal + \"Roll(\" + d4rolls.toString() + \"d4\" + \")\" + \": \"; \r\n\t\tfor (r=0; r<d4rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d4 = Math.floor((Math.random() * 4) + 1);\t\r\n\t d4res = d4res + d4;\t\r\n\t\t dtotal = dtotal + d4.toString() + (r == (d4rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d6rolls.toString() + \"d62\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d6rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d6 = Math.floor((Math.random() * 6) + 1);\t\r\n\t d6res = d6res + d6;\t\r\n\t\t dtotal = dtotal + d6.toString() + (r == (d6rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d8rolls.toString() + \"d8\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d8rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d8 = Math.floor((Math.random() * 8) + 1);\t\r\n\t d8res = d8res + d8;\t\r\n\t\t dtotal = dtotal + d8.toString() + (r == (d8rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d10rolls.toString() + \"d10\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d10rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d10 = Math.floor((Math.random() * 10) + 1);\t\r\n\t d10res = d10res + d10;\t\r\n\t\t dtotal = dtotal + d10.toString() + (r == (d10rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d12rolls.toString() + \"d12\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d12rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d12 = Math.floor((Math.random() * 12) + 1);\t\r\n\t d12res = d12res + d12;\t\r\n\t\t dtotal = dtotal + d12.toString() + (r == (d12rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d20rolls.toString() + \"d20\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d20rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d20 = Math.floor((Math.random() * 20) + 1);\t\r\n\t d20res = d20res + d20;\t\r\n\t\t dtotal = dtotal + d20.toString() + (r == (d20rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d100rolls.toString() + \"d100\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d100rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d100 = Math.floor((Math.random() * 100) + 1);\t\r\n\t d100res = d100res + d100;\t\r\n\t\t dtotal = dtotal + d100.toString() + (r == (d100rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \t//on ajoute le modificateur\r\n\t \tdtotal = dtotal + \"\\n\" + \"Modifier : \" + dmodifier.toString();\r\n\t \tvar dtotalres = d2res + d4res + d6res + d8res + d10res + d12res + d20res + d100res + dmodifier;\r\n\t\tdtotal = dtotal + \"\\n\" + \"Total:\" + dtotalres;\t\r\n\t rtotal = dtotal + \"\\n\\n\" + rtotal; \r\n\t document.form1.runningtotal.value = rtotal;\t\r\n\t}\r\n\t</script> \r\n\r\n\t<?php\r\n\t//} //fin else le user est logué - fonctionnalité désactivée\r\n\t?>\r\n\t<br /><br />\r\n\t<!-- HISTORIQUE récupéré dans la base de données : il reste à faire l'enregistrement-->\r\n\t<div class=\"container\"> \r\n <h4 class=\"arrayHistoClass\" id=\"arrayHisto\" margin=\"0\">Historique dés :</h4>\r\n <div class=\"row\"> \r\n\t\t\t<div class=\"col-6\">User</div>\r\n\t\t\t<div class=\"col-6\">Jet</div>\r\n </div>\r\n \t<div class=\"row\"> \r\n\t<?php\r\n\t foreach ($monhistorique as $details) {\r\n\t?><div class=\"col-6\"><?php\r\n\t echo $details->name;\r\n\t?></div><div class=\"col-6\"><?php\r\n\t echo $details->StringJet;\r\n\t?></div><?php\r\n\t} \r\n\t?>\r\n\t</div>\r\n\t</div>\r\n\t<br /><br /><br />\r\n\t<?php\r\n\t//on récupère ce qu'on doit afficher après le widget\r\n\techo $after_widget;\r\n\t\t\r\n\t}", "public function loadWidgets($params)\r\n {\r\n $ret = array();\r\n \r\n $dashboardId = $params['dashboardId'];\r\n \r\n if($dashboardId)\r\n {\r\n $dashObj = CAntObject::factory($this->ant->dbh, \"dashboard\", $dashboardId, $this->user);\r\n $ret = $dashObj->getWidgets();\r\n }\r\n \r\n $this->sendOutput($ret);\r\n return $ret;\r\n }", "function avhamazon_widgets_init ()\n{\n\tregister_widget( 'WP_Widget_AVHAmazon_Wishlist' );\n}", "function qed_register_widgets() {\r\n\t\t// Make a Wordpress built-in Text widget process shortcodes.\r\n\t\tadd_filter( 'widget_text', 'shortcode_unautop' );\r\n\t\tadd_filter( 'widget_text', 'do_shortcode', 11 );\r\n\r\n\t\tregister_widget( 'QED_Widget_Latest_Posts' );\r\n\t\tregister_widget( 'QED_Widget_Contact_Us' );\r\n\t\tregister_widget( 'QED_Widget_Advanced_Text' );\r\n\r\n\t\t// if ( class_exists( 'woocommerce' ) ) {\r\n\t\t\t// TODO: Widget for woocommerce.\r\n\t\t// }\r\n\r\n\t\tregister_sidebar(array(\r\n\t\t\t'id' => 'sidebar',\r\n\t\t\t'name' => esc_html__( 'Sidebar', 'swishdesign' ),\r\n\t\t\t'description' => esc_html__( 'Sidebar located on the right side of blog page.', 'swishdesign' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t'after_title' => '</h3>',\r\n\t\t));\r\n\r\n\t\tregister_sidebar(array(\r\n\t\t\t'id' => 'footer1',\r\n\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 1 ),\r\n\t\t\t'description' => esc_html__( 'Located in 1st column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t'after_title' => '</h3>',\r\n\t\t));\r\n\r\n\t\t$footer_columns_count = qed_get_footer_columns();\r\n\t\tif ( $footer_columns_count >= 2 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer2',\r\n\t\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 2 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 2nd column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tif ( $footer_columns_count >= 3 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer3',\r\n\t\t\t\t'name' =>sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 3 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 3rd column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tif ( $footer_columns_count >= 4 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer4',\r\n\t\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 4 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 4th column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\t}", "public function setupDashboards()\n {\n $dashboardColumnCount = 3;\n $dashboardCount = 4;\n\n $layout = array();\n for ($j = 0; $j != $dashboardColumnCount; ++$j) {\n $layout[] = array();\n }\n\n $dashboards = array();\n for ($i = 0; $i != $dashboardCount; ++$i) {\n $dashboards[] = $layout;\n }\n\n $oldGet = $_GET;\n $_GET['idSite'] = 1;\n\n // collect widgets & sort them so widget order is not important\n $allWidgets = array();\n foreach (WidgetsList::get() as $category => $widgets) {\n $allWidgets = array_merge($allWidgets, $widgets);\n }\n usort($allWidgets, function ($lhs, $rhs) {\n return strcmp($lhs['uniqueId'], $rhs['uniqueId']);\n });\n\n $widgetsPerDashboard = ceil(count($allWidgets) / $dashboardCount);\n\n // group widgets so they will be spread out across 3 dashboards\n $groupedWidgets = array();\n $dashboard = 0;\n foreach ($allWidgets as $widget) {\n if ($widget['uniqueId'] == 'widgetSEOgetRank'\n || $widget['uniqueId'] == 'widgetReferrersgetKeywordsForPage'\n || $widget['uniqueId'] == 'widgetLivegetVisitorProfilePopup'\n || $widget['uniqueId'] == 'widgetActionsgetPageTitles'\n || strpos($widget['uniqueId'], 'widgetExample') === 0\n ) {\n continue;\n }\n\n $widgetEntry = array(\n 'uniqueId' => $widget['uniqueId'],\n 'parameters' => $widget['parameters']\n );\n\n // dashboard images must have height of less than 4000px to avoid odd discoloration of last line of image\n $widgetEntry['parameters']['filter_limit'] = 5;\n\n $groupedWidgets[$dashboard][] = $widgetEntry;\n\n if (count($groupedWidgets[$dashboard]) >= $widgetsPerDashboard) {\n $dashboard = $dashboard + 1;\n }\n\n // sanity check\n if ($dashboard >= $dashboardCount) {\n throw new Exception(\"Unexpected error: Incorrect dashboard widget placement logic. Something's wrong w/ the code.\");\n }\n }\n\n // distribute widgets in each dashboard\n $column = 0;\n foreach ($groupedWidgets as $dashboardIndex => $dashboardWidgets) {\n foreach ($dashboardWidgets as $widget) {\n $column = ($column + 1) % $dashboardColumnCount;\n\n $dashboards[$dashboardIndex][$column][] = $widget;\n }\n }\n\n foreach ($dashboards as $id => $layout) {\n if ($id == 0) {\n $_GET['name'] = self::makeXssContent('dashboard name' . $id);\n } else {\n $_GET['name'] = 'dashboard name' . $id;\n }\n $_GET['layout'] = Common::json_encode($layout);\n $_GET['idDashboard'] = $id + 1;\n FrontController::getInstance()->fetchDispatch('Dashboard', 'saveLayout');\n }\n\n // create empty dashboard\n $dashboard = array(\n array(\n array(\n 'uniqueId' => \"widgetVisitsSummarygetEvolutionGraphcolumnsArray\",\n 'parameters' => array(\n 'module' => 'VisitsSummary',\n 'action' => 'getEvolutionGraph',\n 'columns' => 'nb_visits'\n )\n )\n ),\n array(),\n array()\n );\n\n $_GET['name'] = 'D4';\n $_GET['layout'] = Common::json_encode($dashboard);\n $_GET['idDashboard'] = 5;\n $_GET['idSite'] = 2;\n FrontController::getInstance()->fetchDispatch('Dashboard', 'saveLayout');\n\n $_GET = $oldGet;\n }", "public function loadwidgetsAction() {\n\t\t$this->_helper->getHelper('layout')->disableLayout();\n\t\tif($this->getRequest()->isPost()) {\n\t\t\tif(!($widgetsData = $this->_helper->cache->load('widgetsData', 'wd_'))) {\n\t\t\t\t$widgetsData = Tools_Widgets_Tools::getAllowedOptions();\n\t\t\t\t$this->_helper->cache->save('widgetsData', $widgetsData, 'wd_', array(), Helpers_Action_Cache::CACHE_LONG);\n\t\t\t}\n\t\t\t$this->getResponse()->setBody(json_encode($widgetsData))->sendResponse();\n\t\t}\n\t\texit;\n\t}", "function comanche_widget($name,$args = null) {\n\t$a = get_app();\n\t$func = 'widget_' . trim($name);\n\tif(function_exists($func))\n\t\treturn $func($args);\n}", "function MCW_eval_foreign_widget($id, $mcw_theme){\n\n global $wp_registered_widgets;\n\n\n\n $params = array_merge(\n\n array( array_merge( $mcw_theme, array('widget_id' => $id, 'widget_name' => $wp_registered_widgets[$id]['name']) ) ),\n\n (array) $wp_registered_widgets[$id]['params']\n\n );\n\n// Substitute HTML id and class attributes into before_widget\n\n $classname_ = '';\n\n foreach ( (array) $wp_registered_widgets[$id]['classname'] as $cn ) {\n\n if ( is_string($cn) )\n\n $classname_ .= '_' . $cn;\n\n elseif ( is_object($cn) )\n\n $classname_ .='_' . get_class($cn);\n\n }\n\n $classname_ = ltrim($classname_, '_');\n\n $params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $classname_);\n\n $params = apply_filters('dynamic_sidebar_params', $params );\n\n $callback = $wp_registered_widgets[$id]['callback'];\n\n if ( is_callable($callback) ) {\n\n ob_start();\n\n call_user_func_array($callback, $params);\n\n $output = ob_get_contents();\n\n ob_end_clean();\n\n }\n\n return $output;\n\n }", "function widget($args, $instance)\r\r\n {\r\r\n\r\r\n global $bookyourtravel_theme_globals;\r\r\n\r\r\n extract($args);\r\r\n\r\r\n\r\r\n $what = 1;\r\r\n if (isset($_GET['what'])) {\r\r\n $what = intval(wp_kses($_GET['what'], array()));\r\r\n }\r\r\n\r\r\n $searchable_count = 0;\r\r\n\r\r\n $this->make_cruises_searchable = isset($instance['make_cruises_searchable']) ? $instance['make_cruises_searchable'] : true;\r\r\n $this->make_car_rentals_searchable = isset($instance['make_car_rentals_searchable']) ? $instance['make_car_rentals_searchable'] : true;\r\r\n $this->make_accommodations_searchable = isset($instance['make_accommodations_searchable']) ? $instance['make_accommodations_searchable'] : true;\r\r\n $this->make_tours_searchable = isset($instance['make_tours_searchable']) ? $instance['make_tours_searchable'] : true;\r\r\n\r\r\n if ($this->enable_accommodations && $this->make_accommodations_searchable)\r\r\n $searchable_count++;\r\r\n if ($this->enable_car_rentals && $this->make_car_rentals_searchable)\r\r\n $searchable_count++;\r\r\n if ($this->enable_tours && $this->make_tours_searchable)\r\r\n $searchable_count++;\r\r\n if ($this->enable_cruises && $this->make_cruises_searchable)\r\r\n $searchable_count++;\r\r\n\r\r\n /* Our variables from the widget settings. */\r\r\n $title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : esc_html__('Refine search results', 'bookyourtravel'));\r\r\n\r\r\n $show_what_filter = isset($instance['show_what_filter']) ? $instance['show_what_filter'] : true;\r\r\n $show_where_filter = isset($instance['show_where_filter']) ? $instance['show_where_filter'] : true;\r\r\n $show_when_filter = isset($instance['show_when_filter']) ? $instance['show_when_filter'] : true;\r\r\n $show_price_filter = isset($instance['show_price_filter']) ? $instance['show_price_filter'] : false;\r\r\n\r\r\n $show_stars_filter = isset($instance['show_stars_filter']) ? $instance['show_stars_filter'] : false;\r\r\n $show_rating_filter = isset($instance['show_rating_filter']) ? $instance['show_rating_filter'] : false;\r\r\n $show_room_count_filter = isset($instance['show_room_count_filter']) ? $instance['show_room_count_filter'] : false;\r\r\n $show_accommodation_type_filter = isset($instance['show_accommodation_type_filter']) ? $instance['show_accommodation_type_filter'] : false;\r\r\n\r\r\n $show_cruise_type_filter = isset($instance['show_cruise_type_filter']) ? $instance['show_cruise_type_filter'] : false;\r\r\n $show_cabin_count_filter = isset($instance['show_cabin_count_filter']) ? $instance['show_cabin_count_filter'] : false;\r\r\n $show_car_type_filter = isset($instance['show_car_type_filter']) ? $instance['show_car_type_filter'] : false;\r\r\n $show_tour_type_filter = isset($instance['show_tour_type_filter']) ? $instance['show_tour_type_filter'] : false;\r\r\n\r\r\n $what_text = isset($instance['what_text']) ? $instance['what_text'] : esc_html__('What?', 'bookyourtravel');\r\r\n $when_text = isset($instance['when_text']) ? $instance['when_text'] : esc_html__('When?', 'bookyourtravel');\r\r\n $where_text = isset($instance['where_text']) ? $instance['where_text'] : esc_html__('Where?', 'bookyourtravel');\r\r\n\r\r\n $accommodation_date_from_label_text = isset($instance['accommodation_date_from_label_text']) ? $instance['accommodation_date_from_label_text'] : esc_html__('Check-in date', 'bookyourtravel');\r\r\n $accommodation_date_to_label_text = isset($instance['accommodation_date_to_label_text']) ? $instance['accommodation_date_to_label_text'] : esc_html__('Check-out date', 'bookyourtravel');\r\r\n\r\r\n $rooms_label_text = isset($instance['rooms_label_text']) ? $instance['rooms_label_text'] : esc_html__('Rooms', 'bookyourtravel');\r\r\n $accommodation_type_label_text = isset($instance['accommodation_type_label_text']) ? $instance['accommodation_type_label_text'] : esc_html__('Accommodation type', 'bookyourtravel');\r\r\n $star_rating_label_text = isset($instance['star_rating_label_text']) ? $instance['star_rating_label_text'] : esc_html__('Star rating', 'bookyourtravel');\r\r\n $user_rating_label_text = isset($instance['user_rating_label_text']) ? $instance['user_rating_label_text'] : esc_html__('User rating', 'bookyourtravel');\r\r\n\r\r\n $car_rental_date_from_label_text = isset($instance['car_rental_date_from_label_text']) ? $instance['car_rental_date_from_label_text'] : esc_html__('Pick-up date', 'bookyourtravel');\r\r\n $car_rental_date_to_label_text = isset($instance['car_rental_date_to_label_text']) ? $instance['car_rental_date_to_label_text'] : esc_html__('Drop-off date', 'bookyourtravel');\r\r\n $car_type_label_text = isset($instance['car_type_label_text']) ? $instance['car_type_label_text'] : esc_html__('Car type', 'bookyourtravel');\r\r\n\r\r\n $tour_type_label_text = isset($instance['tour_type_label_text']) ? $instance['tour_type_label_text'] : esc_html__('Tour type', 'bookyourtravel');\r\r\n $tour_date_from_label_text = isset($instance['tour_date_from_label_text']) ? $instance['tour_date_from_label_text'] : esc_html__('Start date', 'bookyourtravel');\r\r\n\r\r\n $cruise_type_label_text = isset($instance['cruise_type_label_text']) ? $instance['cruise_type_label_text'] : esc_html__('Cruise type', 'bookyourtravel');\r\r\n $cruise_date_from_label_text = isset($instance['cruise_date_from_label_text']) ? $instance['cruise_date_from_label_text'] : esc_html__('Start date', 'bookyourtravel');\r\r\n $cabins_label_text = isset($instance['cabins_label_text']) ? $instance['cabins_label_text'] : esc_html__('Cabins', 'bookyourtravel');\r\r\n\r\r\n $price_per_person_label_text = isset($instance['price_per_person_label_text']) ? $instance['price_per_person_label_text'] : esc_html__('Price per person', 'bookyourtravel');\r\r\n $price_per_night_label_text = isset($instance['price_per_night_label_text']) ? $instance['price_per_night_label_text'] : esc_html__('Price per night', 'bookyourtravel');\r\r\n $price_per_day_label_text = isset($instance['price_per_day_label_text']) ? $instance['price_per_day_label_text'] : esc_html__('Price per day', 'bookyourtravel');\r\r\n\r\r\n $location_select_label_text = isset($instance['location_select_label_text']) ? $instance['location_select_label_text'] : esc_html__('Location', 'bookyourtravel');\r\r\n\r\r\n $submit_button_text = isset($instance['submit_button_text']) ? $instance['submit_button_text'] : esc_html__('Search again', 'bookyourtravel');\r\r\n\r\r\n $search_page_id = 0;\r\r\n $permalinks_enabled = $bookyourtravel_theme_globals->permalinks_enabled();\r\r\n if (!$permalinks_enabled) {\r\r\n $search_page_id = $bookyourtravel_theme_globals->get_custom_search_results_page_id();\r\r\n }\r\r\n\r\r\n /* Before widget (defined by themes). */\r\r\n echo $before_widget;\r\r\n\r\r\n /* Display Widget */\r\r\n /* Display the widget title if one was input (before and after defined by themes). */\r\r\n if ($title) {\r\r\n }\r\r\n // echo $before_title . $title . $after_title;\r\r\n\r\r\n if ($searchable_count > 0) {\r\r\n ?>\r\r\n <script>\r\r\n\r\r\n window.searchWidgetPricePerPersonLabel = <?php echo json_encode($price_per_person_label_text); ?>;\r\r\n window.searchWidgetPricePerNightLabel = <?php echo json_encode($price_per_night_label_text); ?>;\r\r\n window.searchWidgetPricePerDayLabel = <?php echo json_encode($price_per_day_label_text); ?>;\r\r\n\r\r\n </script>\r\r\n <article class=\"refine-search-results byt_search_widget BookYourTravel_Search_Widget\">\r\r\n <form class=\"widget-search\" method=\"get\"\r\r\n action=\"<?php echo esc_url($this->custom_search_results_page); ?>\">\r\r\n <?php if ($search_page_id > 0) { ?>\r\r\n <input type=\"hidden\" name=\"page_id\" value=\"<?php echo esc_attr($search_page_id); ?>\"/>\r\r\n <?php } ?>\r\r\n <?php echo $before_title . $title . $after_title; ?>\r\r\n <div>\r\r\n <?php\r\r\n if ($this->enable_tours && $show_tour_type_filter)\r\r\n $this->render_tour_type_section($tour_type_label_text);\r\r\n if ($show_what_filter)\r\r\n $this->render_what_section($searchable_count, $what_text);\r\r\n else {\r\r\n if ($this->enable_accommodations && $this->make_accommodations_searchable) {\r\r\n echo '<input type=\"hidden\" id=\"what\" name=\"what\" value=\"1\" />';\r\r\n echo '<script>window.activeSearchableNumber = 1;</script>';\r\r\n } elseif ($this->enable_car_rentals && $this->make_car_rentals_searchable) {\r\r\n echo '<input type=\"hidden\" id=\"what\" name=\"what\" value=\"2\" />';\r\r\n echo '<script>window.activeSearchableNumber = 2;</script>';\r\r\n } elseif ($this->enable_tours && $this->make_tours_searchable) {\r\r\n echo '<input type=\"hidden\" id=\"what\" name=\"what\" value=\"3\" />';\r\r\n echo '<script>window.activeSearchableNumber = 3;</script>';\r\r\n } elseif ($this->enable_cruises && $this->make_cruises_searchable) {\r\r\n echo '<input type=\"hidden\" id=\"what\" name=\"what\" value=\"4\" />';\r\r\n echo '<script>window.activeSearchableNumber = 4;</script>';\r\r\n }\r\r\n }\r\r\n\r\r\n if ($show_when_filter)\r\r\n $this->render_when_section($when_text, $accommodation_date_from_label_text, $accommodation_date_to_label_text, $car_rental_date_from_label_text, $car_rental_date_to_label_text, $tour_date_from_label_text, $cruise_date_from_label_text);\r\r\n\r\r\n if ($show_where_filter)\r\r\n $this->render_where_section($where_text, $location_select_label_text);\r\r\n\r\r\n $this->render_start_city();\r\r\n\r\r\n //$this->render_duration_day();\r\r\n\r\r\n if ($show_price_filter)\r\r\n $this->render_price_range_section($what, $price_per_person_label_text, $price_per_night_label_text, $price_per_day_label_text);\r\r\n\r\r\n if ($this->enable_accommodations && $show_stars_filter)\r\r\n $this->render_star_rating_section($star_rating_label_text);\r\r\n\r\r\n if ($this->enable_reviews && $show_rating_filter)\r\r\n $this->render_user_rating_section($user_rating_label_text);\r\r\n\r\r\n if ($this->enable_accommodations && $show_accommodation_type_filter)\r\r\n $this->render_accommodation_type_section($accommodation_type_label_text);\r\r\n\r\r\n if ($this->enable_accommodations && $show_room_count_filter)\r\r\n $this->render_room_count_section($rooms_label_text);\r\r\n\r\r\n if ($this->enable_car_rentals && $show_car_type_filter)\r\r\n $this->render_car_type_section($car_type_label_text);\r\r\n\r\r\n if ($this->enable_cruises && $show_cruise_type_filter)\r\r\n $this->render_cruise_type_section($cruise_type_label_text);\r\r\n\r\r\n if ($this->enable_cruises && $show_cabin_count_filter)\r\r\n $this->render_cabin_count_section($cabins_label_text);\r\r\n\r\r\n ?>\r\r\n </div>\r\r\n <input type=\"submit\" value=\"<?php echo esc_attr($submit_button_text); ?>\" class=\"gradient-button\"\r\r\n id=\"search-submit\"/>\r\r\n </form>\r\r\n </article>\r\r\n <?php\r\r\n }\r\r\n\r\r\n /* After widget (defined by themes). */\r\r\n echo $after_widget;\r\r\n }", "public function get_dashboard_widget_options( $widget_id='' )\n {\n $opts = get_option( 'dashboard_widget_options' );\n\n //If no widget is specified, return everything\n if ( empty( $widget_id ) )\n return $opts;\n\n //If we request a widget and it exists, return it\n if ( isset( $opts[$widget_id] ) )\n return $opts[$widget_id];\n\n //Something went wrong...\n return false;\n }", "function where_in_theme()\n\t{\n\t\t$theme = Kohana::$config->load('config')->get('assets_folder_path');\n\t\treturn $this\n\t\t\t->and_where_open()\n\t\t\t\t->where('theme', '=', $theme)\n\t\t\t\t->or_where('theme', '=', '')\n\t\t\t\t->or_where('theme', 'is', NULL)\n\t\t\t->and_where_close();\n\t}", "public function uultra_custom_widgets_actions ($user_id, $widget_id)\t\r\n\t{\r\n\t\t//\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\tif($this->mIsPaidMembership!='')\r\n\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets_package_'.$this->mIsPaidMembership.'');\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets');\t\t\r\n\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t\t\r\n\t\t$widget = $custom_widgets[$widget_id];\r\n\t\t\r\n\t\t$widget_text = $widget[\"title\"];\r\n\t\t$uu_type = $widget[\"type\"];\r\n\t\t$uu_editable = $widget[\"editable\"];\r\n\t\t$uu_content = $widget[\"content\"];\r\n\t\t\r\n\t\t$header_css = $this->get_widget_header_inline_css($widget_id);\r\n\t\t$widget_bg_css = $this->get_widget_bg_inline_css($widget_id);\r\n\t\t$widget_font_color_css = $this->get_widget_box_color_css($widget_id);\t\t\t\t\r\n\t\t$widget_text = $this->get_widget_header_text($widget_id);\t\r\n\t\t\r\n\t\tif($widget_text==\"\")\r\n\t\t{\r\n\t\t\t$widget_text = $widget[\"title\"];\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$html = '';\r\n\t\t\r\n\t\tif(!empty($widget))\r\n\t\t{\r\n\t\t\r\n\t\t\t$html .=' <li><!--- custom widget---> \r\n\t\t\t\t\t <div class=\"widget-ultra\" >\r\n\t\t\t\t\t\t<h3 class=\"uultra-basic\" '.$header_css .' >'.$widget_text.'</h3>\r\n\t\t\t\t\t\t <section class=\"default-bg uultra-profile-widget-arrow-'.$widget_id.' \" ></section>\r\n\t\t\t\t\t\t <div class=\"uultra-table-widget-custom\" '.$widget_bg_css.'>';\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\tif($uu_type==1) //text\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//check if custom text has been set for this widget\t\t\r\n\t\t\t\t\t\tif($uu_editable ==1 ) //this is a text widget that can be edited by the user\r\n\t\t\t\t\t\t{\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$custom_user_options = 'uultra_custom_user_widget_content_id_' .$widget_id;\t\t\t\r\n\t\t\t\t\t\t\t//check if uses has set a custom text\r\n\t\t\t\t\t\t\t$custom_text = get_user_meta($user_id, $custom_user_options, true);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($custom_text!=\"\")\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= $custom_text;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$html .= $uu_content;\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else{\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$html .= $uu_content;\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}elseif($uu_type==2){ //shortcode\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$uu_content = stripslashes($uu_content);\t\t\t\t\r\n\t\t\t\t\t\t$html .= do_shortcode($uu_content);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t$html .= '</div> \r\n\t\t\t\t\t </div> \r\n\t\t\t\t\t </li><!--- End widget 1 --->';\r\n\t\t\t\t \r\n\t\t}\t\t \r\n\t \r\n\t\treturn $html;\r\n\t\r\n\t}", "public function include_widgets() {\n\t\t\n\t\t$sidebar_settings = kopa_get_sidebar_arguments();\n\n\t\tif ( is_null( $sidebar_settings ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! isset( $sidebar_settings['id'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$sidebars = kopa_get_option( $sidebar_settings['id'] );\n\n\t\tif ( empty( $sidebars ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $sidebars && is_array( $sidebars ) ) {\n\t\t\tforeach ( $sidebars as $sidebar_id => $sidebar_args ) {\n\t\t\t\t$sidebar_args['id'] = $sidebar_id;\n\n\t\t\t\t// must sanitize and validate\n\t\t\t\t// if ( empty( $sidebar_args['name'] ) ) {\n\t\t\t\t// \t$sidebar_args['name'] = $sidebar_id;\n\t\t\t\t// }\n\n\t\t\t\t/**\n\t\t\t\t * Check before_widget, after_widget, before_title, after_title\n\t\t\t\t * before registering\n\t\t\t\t * If empty, use the default common attributes\n\t\t\t\t */\n\t\t\t\tforeach ( $sidebar_settings['default_atts'] as $key => $val ) {\n\t\t\t\t\t// if attribute is empty and default common attribute is not empty\n\t\t\t\t\t// use default common attribute value\n\t\t\t\t\tif ( empty( $sidebar_args[ $key ] ) && ! empty( $val ) ) {\n\t\t\t\t\t\t$sidebar_args[ $key ] = $val;\n\t\t\t\t\t}\n\n\t\t\t\t\t// if still empty after checking,\n\t\t\t\t\t// unset this attribute to use default value of wordpress core\n\t\t\t\t\tif ( empty( $sidebar_args[ $key ] ) ) {\n\t\t\t\t\t\tunset( $sidebar_args[ $key ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tregister_sidebar( $sidebar_args );\n\t\t\t}\n\t\t}\n\t}", "public function runExists() {\r\n $db = static::getDB();\r\n $stmt = $db->query(\r\n \"SELECT * FROM runboard \"\r\n . \"WHERE fromStore='$this->fromStore' \"\r\n . \"AND toStore='$this->toStore' \"\r\n . \"AND category='$this->category' \"\r\n . \"AND item='$this->item' \"\r\n );\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n \r\n return $results;\r\n }" ]
[ "0.6091939", "0.59373146", "0.5907592", "0.5765418", "0.57094204", "0.565774", "0.5656863", "0.5650943", "0.5532597", "0.55309236", "0.5510215", "0.54818714", "0.5468283", "0.54403627", "0.54263186", "0.54263186", "0.54260135", "0.537454", "0.5350149", "0.5344331", "0.52958727", "0.5263969", "0.5248975", "0.52253294", "0.5206407", "0.5187812", "0.51873535", "0.5098418", "0.50922024", "0.5078771", "0.5074692", "0.50078326", "0.499375", "0.49711427", "0.49685532", "0.49267387", "0.49247065", "0.49168473", "0.49161232", "0.49159044", "0.49034742", "0.49011582", "0.49005935", "0.4894052", "0.48902324", "0.48902324", "0.48823538", "0.4866464", "0.4847674", "0.48411027", "0.48354834", "0.4832328", "0.4825085", "0.48151094", "0.4800942", "0.47841266", "0.47803557", "0.47773778", "0.47696963", "0.47677663", "0.47656468", "0.47612125", "0.4757911", "0.47558188", "0.47487268", "0.4748408", "0.47435445", "0.47363436", "0.47359252", "0.47301337", "0.47290584", "0.47173655", "0.4712287", "0.47108638", "0.4708273", "0.47042197", "0.46884352", "0.46875206", "0.46848738", "0.46801168", "0.46798155", "0.46770078", "0.46694636", "0.46668294", "0.46668294", "0.46668294", "0.4665694", "0.4664975", "0.46632582", "0.46576962", "0.46556315", "0.46513277", "0.4640452", "0.4611058", "0.46108583", "0.4604046", "0.46034187", "0.45951366", "0.45940977", "0.45891502" ]
0.56317306
8
Getting all roles in your estate
public static function getRolesInEstate($includeNullSiteId) { $sites = session('admin.site.estate'); $result = RoleModel::whereIn('site_id', $sites); if ($includeNullSiteId) $result = $result->orWhere('site_id', null); $result = $result->pluck('role', 'id')->toArray(); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllRoles(){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllRoles();\r\n }", "private function get_all_roles(){\n return Role::all();\n }", "function get_all_roles() {\n return get_records('role', '', '', 'sortorder ASC');\n}", "public function getAllRoles(): array;", "public function get_all_roles(){\n\t\treturn ORM::factory('role')->find_all()->as_array();\n\t}", "public function getRoles()\n {\n #obsolete, I don't wnat user roles, I want the permission those roles are linked to\n # so I just need a getPermissions once, store those constants in a small session array\n #$roles = $this->roles;\n\n #d($roles);\n\n #foreach ($roles as $role) {\n # echo $role->name;\n #}\n }", "public function getAllRoles()\n {\n return \\EntityManager::getRepository('stoykov\\Ohrana\\Models\\Doctrine\\Role')->findAll();\n }", "public function get_all_roles()\n {\n return App\\Role::all();\n }", "abstract protected function getRoles();", "public function findRoles() {\n\t\t\n\t}", "public function getRoles(): array;", "public function retrieveAllRoles()\n {\n return $this->invoker->getAllRoles($this->factory->createNewRolesObject());\n\n }", "protected function getRoles() {\n return $this->roleStorage->loadMultiple();\n }", "public function & GetRoles ();", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getAll()\n {\n try{\n return $this->roles;\n }\n catch (\\Exception $exception)\n {\n return null;\n }\n }", "function get_role_list() {\n\t\treturn $this->db->get('system_security.security_role');\n\t\t\n\t}", "public function getRoles(): iterable\n {\n return [];\n }", "public function roles();", "public function roles();", "public function roles();", "public function roles();", "public function getAllRoles()\n {\n return $this->roles;\n }", "public function getRoles(){\n $sql = \"SELECT * FROM rol\";\n\n foreach ($this->bd->query($sql) as $res) {\n $this->rol[] = $res;\n }\n return $this->rol;\n }", "public function get_roles() {\n return DB::query(Database::SELECT, 'SELECT * FROM roles WHERE id > 1')\n ->as_object()\n ->execute($this->db);\n }", "public function getAll()\n {\n return $this->roles->whereStatus(1)->orderBy('id', 'desc')->get();\n }", "public function rolesForUser();", "public function getAvailableRoles() ;", "public function roles()\n {\n $this->roles = $this->Role->list($_SESSION['guild_id']);\n }", "public function getRoles(): array {\n\t\t$sql = 'SELECT id, name FROM roles';\n\t\treturn $this->queryRows($sql);\n\t}", "public function getRoles(){\n\n $roles = $this->visiteur_roles->map(function($role){\n return $role->getTitle();\n })->ToArray();\n\n $roles[]= 'ROLE_USER';\n \n return $roles;\n }", "public function getRoles()\n {\n return $this->userRoles->toArray();\n /*$roles = array();\n foreach ($this->userRoles as $role) {\n $roles[] = $role->getRole();\n }\n\n return $roles;*/\n }", "public function get_roles()\n {\n $users_roles = user_role_active_record::search()->where('uid', $this->uid)->exec();\n $roles = array();\n foreach ($users_roles as $users_role) {\n $roles[] = role_active_record::search()->where('rid', $users_role->rid)->execOne();\n }\n return $roles;\n }", "public function getAllRoles()\n {\n $id = $this->get(TableFactory::getUserModel()\n ->getPrimaryKey());\n\n return Cache::remember(sprintf(Constants::CACHE_ROLES, $id), function() use ($id) {\n return TableFactory::getRoleModel()\n ->find()\n ->matching('Users', function(Query $query) use ($id) {\n return $query->where(['Users.id' => $id]);\n })\n ->toArray();\n });\n }", "public function getRoles()\n {\n $roles = Role::lists('name','id');\n\n return $roles;\n }", "public function getAllRoles()\n {\n return $this->repository->getAllRoles();\n }", "public function getRoles(){\n $db = new MainModel();\n $query = \"SELECT r.id as idRol, r.name as nameRol from roles as r\";\n return $response = $db->consultQueryAll($query);\n }", "public function getRoles()\n\t{\n\t\treturn $this->roles->toArray();\n\t}", "public function getRoles() {\n $ds = \\dibi::dataSource(\"\n SELECT r.*, rr.name AS parent_name\n FROM users_roles AS r\n LEFT JOIN users_roles AS rr ON rr.id = r.parent_id\n \");\n\n return $ds;\n }", "public function getRoles()\r\n {\r\n return $this->roles;\r\n }", "public function getRoles() \n {\n return $this->roles;\n }", "public function roleListAll() {\n $this->_adminUserDao = new AdminUserDao();\n\n $ret = array();\n $roles = $this->_adminroledao->getAll();\n foreach ($roles as $role) {\n $user = $this->_adminUserDao->getRow(array(array('username', '=', $role->owner)));\n if($user){\n $ret[$role->owner]['role'][] = $role;\n $ret[$role->owner]['user'] = $user;\n }else{\n if($role->owner == config('admin.user.super_user.username')){\n $ret[$role->owner]['role'][] = $role;\n// $ret[$role->owner]['user'] = (new AdminUserDao())->fill(config('admin.user.super_user'));\n// $ret[$role->owner]['user'] = $this->_adminUserDao->getRow(array(array('id', '=', config('admin.user\n $ret[$role->owner]['user']['username'] = $role->owner;\n }\n }\n }\n return $ret;\n }", "public function getRoles()\n {\n return array('1');\n }", "public static function getListRole(){\n return SentinelRole::where('company_id_fk',Sentinel::getUser()->company_id_fk)->orWhere('company_id_fk')->lists('name','id')->all();\n }", "public function getRoles() {\n return $this->getRelation(\"roles\");\n }", "public function getRoles()\n {\n return $this->getMemberRoles()->toArray();\n }", "function get_roles () {\r\n //if (!check_admin()) return false;\r\n $conn = db_connect();\r\n $query = \"select * from roles\";\r\n $result = $conn->query(\"set names utf8\");\r\n $result = $conn->query($query);\r\n if (!$result) {\r\n throw new Exception(\"Could not connect to the db!\");\r\n }\r\n if ($result->num_rows == 0) {\r\n // throw new Exception(\"No records in roles table!\");\r\n }\r\n\r\n $result = db_result_to_array($result);\r\n return $result;\r\n }", "public function getRoles() {\n return DB::table('dx_users_roles as ur')\n ->join('dx_roles as r', 'r.id', '=', 'ur.role_id')\n ->select('r.id', 'r.title', DB::raw('COUNT(*) as total_users'))\n ->where('r.is_system', '=', '0')\n ->groupBy('r.id')\n ->orderBy('r.title')\n ->get();\n }", "public function getRoles()\n {\n return [$this->role];\n }", "public function getRoles()\n {\n return [$this->role];\n }", "public function roles()\n {\n\n return Role::all();\n }", "private function load_roles() {\n $query = $this->PDO->prepare(\"SELECT * FROM rol\");\n $query->execute();\n return $query->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getRoles(): array\n {\n return [$this->role];\n }", "public function getProductionRoles();", "static public function get_all_roles() {\n\t\tif ( ! function_exists( 'get_editable_roles' ) ) {\n\t\t\trequire_once( ABSPATH . 'wp-admin/includes/user.php' );\n\t\t}\n\n\t\t$editable_roles = get_editable_roles();\n\t\t$roles = array();\n\t\t$caps = apply_filters( 'fl_builder_user_access_capabilities', array( 'edit_posts' ) );\n\n\t\tforeach ( $editable_roles as $role => $data ) {\n\t\t\tforeach ( $caps as $cap ) {\n\t\t\t\tif ( isset( $data['capabilities'][ $cap ] ) && 1 == $data['capabilities'][ $cap ] ) {\n\t\t\t\t\t$roles[ $role ] = $data['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $roles;\n\t}", "public function getRoles()\n {\n return $this->getRelation('roles');\n }", "public function getAllEmployeeRoles()\n {\n try {\n $employeeRoles = ['Administrator', 'Manager', 'Accountant', 'Nurse', 'Receptionist', 'Pharmacist'];\n\n if ($employeeRoles == null) {\n return response()->json([common::$EMP_ROLE_NOT_FOUND], common::$HTTP_NOT_FOUND);\n } else {\n return response()->json(compact('employeeRoles'));\n }\n } catch (Exception $e) {\n return response()->json([common::$EMP_ROLE_UNABLE_TO_GET], common::$HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "function getRoles () {\n return array(\"user.image.edit\",\"user.image.view\");\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles->toArray();\n }", "public function getRoles()\n {\n return $this->roles->toArray();\n }", "public function roles()\n {\n\n $roles = get_editable_roles();\n $output = array();\n foreach ($roles as $key => $val) {\n $output[$key] = $val['name'];\n }\n return $output;\n }", "function getRolesList(){\r\n\t\t$sql=\"select * from m_employee_roles\";\r\n\t\t$res=$this->db->query($sql);\r\n\t\tif($res->num_rows()){\r\n\t\t\treturn $res->result_array($sql);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function getRoles(): array\n {\n return $this->roles;\n }", "public function getRoles(): array\n {\n return $this->roles;\n }", "public function index()\n {\n return Role::all();\n }", "public function index()\n {\n return Role::all();\n }", "public function get_roles()\n {\n $query=$this->db->get('tbl_roles');\n return $query->result();\n }", "function getRoles () {\n return array(\"user.friendRequest.edit\",\"user.friendRequest.view\");\n }", "public function getRolesList()\n\t{\n\t\t$roles = Role::select('name as text', 'id')->get();\n\t\treturn $roles;\n\t}", "public function getRoles()\n {\n\n $rolesReturn = [];\n $roles = $this->roles()->with(['role'])->get();\n\n $rolesReturn = $roles->pluck('role.name');\n\n // Add Standard role to the user roles\n\n if($rolesReturn->contains(config('user.standardRole')) === false)\n {\n $rolesReturn->push(config('user.standardRole'));\n }\n\n return $rolesReturn;\n\n }", "function get_all_roles()\n {\n $this->db->order_by('role', 'asc');\n return $this->db->get('tbl_roles')->result_array();\n }", "public function getRoles()\n {\n return array($this->role);\n }", "public function index()\n {\n $roles = App\\User::find(1)->roles()->orderBy('name')->get();\n }", "function getRoles()\n {\n $roles = array();\n\n foreach ($this->grupos as $grupo) {\n $roles[] = $grupo->getRole();\n }\n return $roles;\n }", "function getAllRoles() {\n // connexion à la BDD\n $db = connect();\n // requête\n $query = $db -> prepare('SELECT DISTINCT role FROM users');\n // exécution\n $query -> execute();\n // renvoie un tableau associatif\n return $query -> fetchAll();\n}", "public function index()\n {\n return Roles::all();\n }", "public function ObtenerRolesSupeAdmin()\r\n {\r\n return Rol::all();\r\n }", "public function getRoles(): array\n\t{\n\t\treturn $this->roles;\n\t}", "function _rtm_mail_get_roles() {\n\n $sql = \"select * from {role} where rid > 2\";\n $result = db_query($sql);\n\n $items = array();\n while ($row = db_fetch_object($result)) {\n array_push($items, $row);\n }\n\n return $items;\n}", "function getAll()\n\t{\n\t\t$this->db->order_by(\"roleName\",\"ASC\");\n\t\t$query = $this->db->get('roles');\n\t\treturn $query;\n\t}", "public function findAll() {\n\n // Récupération des différents type d'utilisateur\n $result = $this->getDb()->fetchAll(\"select * from roles order by nom asc\");\n \n $roles = array();\n foreach ($result as $row) {\n $roles[$row['id']] = $this->buildDomainObject($row);\n }\n return $roles;\n }", "public static function manageRole(){\n $rolelist = [];\n $db = Db::getInstance(); \t \n $req = $db->query('SELECT * FROM hp_role'); \n foreach($req->fetchAll() as $row) {\n $rolelist[] = $row;\n }\n return $rolelist;\n \n }", "public function getRolesNames ();", "function get_roles(){\n\t\t$this->db->select('*');\n\t\t$q = $this->db->get('user_role');\n\n\t\treturn $q->result_array();\n\t}", "private function getRoles()\n\t{\n\t\tif (!isset($this->roles)) {\n\t\t\t$this->roles = $this->roles()\n\t\t\t\t->with('permissions')\n\t\t\t\t->withCount('users')\n\t\t\t\t->get();\n\t\t}\n\t\treturn $this->roles;\n\t}", "public function getRoles()\n\t{\n\t\t$roles = $this->role_gestion->all();\n\n\t\treturn view('back.users.roles', compact('roles'));\n\t}", "public function index()\n {\n // return collection of all roles\n return RoleIndexResource::collection(Role::info()->get());\n }", "public function getRoles()\n {\n\n $roles = $this->roles;\n // guarantee every user at least has ROLE_USER\n $roles[] = 'ROLE_USER';\n return array_unique($roles);\n\n //throw new \\Exception('Method getRoles() is not implemented.');\n }", "public function all()\n {\n $qb = $this->em->createQueryBuilder();\n $qb->select('r')\n ->from(Role::class, 'r');\n\n return $qb->getQuery()->getResult();\n }", "public static function getUserRole(){\n\t\t$db = DemoDB::getConnection();\n $sql = \"SELECT *\n FROM user_role\";\n $stmt = $db->prepare($sql);\n $ok = $stmt->execute();\n if ($ok) {\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }\n\t}", "public function index()\n {\n $users = User::get()->load('roles');\n return $users;\n }", "public function getRoles(){\n\n return $this->_arrRoles;\n \n }", "public function getRoles()\n\t{\n\t\t$roles = array_map(function($value)\n\t\t{\n\t\t\treturn Html::a($value, $value->links['self']);\n\t\t}, $this->entity->roles);\n\n\t\treturn join('<br>', $roles);\n\t}" ]
[ "0.8438758", "0.8363587", "0.835138", "0.83139884", "0.8311581", "0.82662916", "0.82418776", "0.8193743", "0.8166139", "0.81491333", "0.814431", "0.8109995", "0.80133724", "0.80125684", "0.7985148", "0.7985148", "0.7985148", "0.79817426", "0.7955572", "0.7946759", "0.79171425", "0.79171425", "0.79171425", "0.79171425", "0.79095036", "0.777852", "0.7767332", "0.7732765", "0.7729035", "0.7719623", "0.7710946", "0.7687237", "0.76670873", "0.7661063", "0.7635293", "0.7627316", "0.7616371", "0.7605705", "0.7601554", "0.7592394", "0.75829744", "0.7577266", "0.75744796", "0.75709784", "0.75622666", "0.7551666", "0.7539438", "0.75382435", "0.75369054", "0.7524021", "0.7514885", "0.7514885", "0.751133", "0.7511169", "0.75037694", "0.7487498", "0.7483606", "0.74758506", "0.74757785", "0.74724483", "0.74712557", "0.74712557", "0.74712557", "0.74712557", "0.74712557", "0.74712557", "0.7459028", "0.7459028", "0.7458082", "0.7455663", "0.74554855", "0.74554855", "0.7453659", "0.7453659", "0.7445032", "0.7444739", "0.74421835", "0.7439978", "0.7439673", "0.74367887", "0.7429525", "0.7426562", "0.74158406", "0.7414466", "0.74107736", "0.74101096", "0.7408346", "0.74047434", "0.739592", "0.7380457", "0.7373859", "0.7367883", "0.7366048", "0.7366018", "0.7364858", "0.73594844", "0.73589337", "0.7358747", "0.7357523", "0.7349086", "0.7346724" ]
0.0
-1
Returns a string representation of the entity.
public function __toString() { return (string) $this->getToken(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __toString(){\n\t\t$strings = array();\n\t\tforeach ($this->entities as $entity){\n\t\t\t$strings[] = sprintf(\"%s\", $entity);\n\t\t}\n\t\treturn implode($strings);\n\t}", "public function __toString() {\n\t\t$str = \"\";\n\t\t$str .= \"EntityMapperClassName: \" . $this->_entityMapperClassName . \"<br />\";\n\t\t$str .= \"EntityRelatedMapperClassName: \" . $this->_entityRelatedMapperClassName . \"<br />\";\n\t\t$str .= \"EntityRelatedPk: \" . $this->_entityRelatedPk. \"<br />\";\t\t\t\n\t\treturn $str;\t\t\t\n\t}", "public function __tostring() {\r\n return (string) $this->object->getId();\r\n }", "public function __toString()\n {\n return (string) $this->getId();\n }", "public function __toString() {\n return \"{ \" . $this->id .\n \", \" . $this->parent_id .\n \", \" . $this->post_id .\n \", \" . $this->username .\n \", \" . $this->message .\n \", \" . $this->timestamp .\n \", \" . $this->ip .\n \", \" . $this->is_deleted .\n \", \" . $this->is_hidden .\n \" }\";\n }", "public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n $context[] = \"$key=\".$value->format('Y-m-d\\TH:i:s');\n } else { \n $context[] = \"$key=$value\";\n }\n }\n return '[ Fire.Business.Model.ExternalAccount: ' . implode(' ', $context) . ' ]';\n }", "public function __toString()\n {\n return (string)$this->getId();\n }", "public function __toString(): string\n {\n return (string) $this->repository->toString();\n }", "public function __toString()\n {\n\n return (string) $this->id;\n }", "public function __toString()\n\t{\n\t\treturn \n\t\t\t'$id\t\t\t\t: ' . $this->id .\t\t\t\t'<br/>' .\n\t\t\t'$id_person\t\t\t: ' . $this->id_person .\t\t\t'<br/>' .\n\t\t\t'$aanvraag\t\t\t: ' . $this->aanvraag .\t\t\t'<br/>' .\n\t\t\t'$invitation\t\t: ' . $this->invitation\t . '<br/>' .\n\t\t\t'$invitationSent\t: ' . $this->invitationSent . '<br/>' .\n\t\t\t'$reaction\t: ' . $this->reaction . '<br/>';\n\t\t\t'$emailadres\t: ' . $this->emailadres . '<br/>';\n\t}", "public function __toString()\n\t{\n\t\treturn (string) $this->id();\n\t}", "public function toString()\n {\n return $this->cast('string');\n }", "public function __toString () {\n return $this->encode();\n }", "public function __toString(): string\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toNative();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function __toString()\n {\n return $this->toJson();\n }", "public function toString() {\n \n return $this->toScalar();\n }", "public function to_string() { return $this->__toString(); }", "public function __toString(): string\n {\n return sprintf(\n '%3d - %20s - %30s - %1d - %1d',\n $this->id,\n utf8_encode($this->username),\n utf8_encode($this->email),\n $this->enabled,\n $this->isAdmin\n );\n }", "public function __toString()\n\t{\n\t\treturn $this->get();\n\t}", "public function __toString(): string\n {\n return sprintf(\n '%s(id=%d, name=\"%s\")',\n self::class,\n $this->getId(),\n $this->getName()\n );\n }", "public function __toString()\n {\n return $this->getId();\n }", "public function __toString() {\n return $this->as_string();\n }", "public function __toString() { return $this->as_string(); }", "public function __toString()\n {\n return (string) $this->getValue();\n }", "public function __toString()\n {\n return (string) $this->getValue();\n }", "public function __toString()\n {\n return (string) $this->getValue();\n }", "public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n \t$context[] = \"$key=\".$value->format('Y-m-d\\TH:i:s');\n } else { \n \t$context[] = \"$key=$value\";\n }\n }\n return '[ Fire.Business.Model.User: ' . implode(' ', $context) . ' ]';\n }", "public function __toString()\n {\n return (string) $this->exportTo(SanitasiPeer::DEFAULT_STRING_FORMAT);\n }", "public function __tostring() {\n\n\t\t\t//convet to string\n\t\t\treturn \"{\".\n\t\t\t\t\t\t\"id:\".$this->_id.\n\t\t\t\t\t\t\"type:\".$this->_type.\n\t\t\t\t\t\t\"path:\".$this->_path.\n\t\t\t\t\t\t\"name:\".$this->_name.\n\t\t\t\t\t\"}\";\n\n\t\t}", "public function __toString()\n {\n return $this->make()->toString();\n }", "public function __toString()\n {\n return $this->getIdentifier();\n }", "public function __toString()\n {\n return $this->formatAsString();\n }", "public function __toString()\n {\n return (string) $this->exportTo(ArticleTableMap::DEFAULT_STRING_FORMAT);\n }", "protected function toAuditString()\n {\n return \"WARNING NEED TO IMPLEMENT ENTITY TO STRING \".get_class($this);\n }", "public function __toString() {\n return $this->getContent();\n }", "public function __toString() {\n \n return $this->toString();\n }", "function to_str(){\n //\n //Get the entity name using the magic function get parent since the \n //parent entity is protected \n $e = $this->column->get_parent();\n //\n //Include the alias\n $alias= is_null($this->alias) ? \"\":\"as `$this->alias`\";\n //\n //compile the complete string version of the \n return \"`{$e->name}`.`{$this->column->name}` $alias\";\n }", "public function __toString()\n {\n return $this->fetch();\n }", "public function __toString()\n {\n return $this->fetch();\n }", "public function __toString() {\n return $this->toJson($this->data);\n }", "public function __toString()\n {\n return $this->reference ?? '';\n }", "public function __toString()\n {\n return $this->build();\n }", "public function toString()\n {\n return serialize($this->getData());\n }", "public function __toString()\n\t{\n\t\treturn (string) $this->exportTo(CidadePeer::DEFAULT_STRING_FORMAT);\n\t}", "public function __toString() {\n return $this->toString();\n }", "public function __toString() {\n return $this->toString();\n }", "public function __toString() {\n return (string)$this->id();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n return (string) $this->exportTo(JadwalPeer::DEFAULT_STRING_FORMAT);\n }", "public function __toString()\n {\n return $this->toFormattedString();\n }", "public function __tostring()\n\t\t{\n\t\t\treturn (string) $this->ID;\n\t\t}", "public function __toString(): string\n {\n return $this->to_string();\n }", "public function __toString()\n {\n return $this->assemble();\n }", "public function __toString()\n {\n \treturn $this->get();\n }", "function to_string() {\n\t\treturn $this->get($this->name_field);\n\n\t}", "public function __toString() {\r\n return $this->toString();\r\n }", "public function __toString()\n {\n try {\n return $this->toString();\n } catch (\\Exception $e) {\n return '';\n }\n }", "public function getToString()\n {\n return $this->toString();\n }", "public function toString()\n {\n $data = $this->origin->data();\n $out = '';\n if (is_scalar($data) || is_null($data)) {\n $out = (string) $data;\n } elseif (is_object($data) && method_exists($data, '__toString')) {\n $out = (string) $data;\n }\n return $out;\n }", "public function __toString(): string\n {\n return $this->toJSON();\n }", "public function __toString()\n\t{\n\t\treturn $this->serialize();\n\t}", "function __toString() {\n return $this->name . \" says \" . $this->sound . \" give me some \" . $this->favoriteFood . \" my id is \" . $this->id . \"<br>Total animals: \" . Animal::$numberOfAnimals . \"<br><br>\";\n }", "public function __toString()\n {\n return (string) $this->exportTo(OrdrhedTableMap::DEFAULT_STRING_FORMAT);\n }", "public function __toString() {\n return $this->toString();\n }", "public function __toString(): string\n {\n return (string) $this->getValue();\n }", "public function __toString()\n {\n return \"\";\n }", "public function __toString()\n {\n return \"\";\n }", "public function __toString(): string\n {\n return $this->toString();\n }", "public function __toString(): string\n {\n return $this->toString();\n }" ]
[ "0.761324", "0.73691225", "0.7357622", "0.729037", "0.7267188", "0.71429473", "0.7123928", "0.70859015", "0.70589125", "0.7055733", "0.7022846", "0.7011571", "0.70051783", "0.7005033", "0.69886297", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.69778335", "0.6966388", "0.69530964", "0.69508487", "0.6945082", "0.69418854", "0.6933901", "0.69248676", "0.6915733", "0.69123507", "0.69123507", "0.69123507", "0.6900368", "0.68979055", "0.6892192", "0.68903834", "0.6890052", "0.68878156", "0.6882586", "0.68795437", "0.68753964", "0.68725234", "0.6864643", "0.68599546", "0.68599546", "0.68590546", "0.68511003", "0.6850324", "0.6847352", "0.6843456", "0.6833916", "0.6833916", "0.68319666", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.68195426", "0.6816474", "0.68129724", "0.6811771", "0.6808482", "0.679923", "0.6795182", "0.67878646", "0.6786818", "0.6773931", "0.67725325", "0.6770112", "0.67633945", "0.67614937", "0.6761279", "0.6759505", "0.6758893", "0.67563343", "0.67525125", "0.67525125", "0.6750214", "0.6750214" ]
0.0
-1
Register any events for your application.
public function boot() { parent::boot(); Brand::observe(BrandObserver::class); Email::observe(EmailObserver::class); Media::observe(MediaObserver::class); Category::observe(ScrappedCategoryMappingObserver::class); ScrapedProducts::observe(ScrappedProductCategoryMappingObserver::class); // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerEvents()\n {\n $events = $this->app->make(Dispatcher::class);\n\n foreach ($this->events as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "protected function registerEvents(): void\n {\n $events = $this->app->make(Dispatcher::class);\n\n foreach ($this->events as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "protected static function events()\n {\n foreach (self::fetch('app/events', false) as $file) {\n Bus::need($file);\n }\n //\n Event::register();\n }", "public function registerEvents() {\n $this->cx->getEvents()->addEvent('model/expired');\n $this->cx->getEvents()->addEvent('model/terminated');\n $this->cx->getEvents()->addEvent('model/payComplete');\n }", "protected function registerEvents(): void\n {\n Event::listen(MessageLogged::class, function (MessageLogged $e) {\n if( app()->bound('current-context') )\n app('current-context')->log((array)$e);\n });\n }", "public function registerEvents()\n {\n $this->subscribeEvent(\n 'Shopware_Controllers_Widgets_Emotion_AddElement',\n 'onEmotionAddElement'\n );\n\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Widgets_Campaign',\n 'extendsEmotionTemplates'\n );\n\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n\n /**\n * Subscribe to the post dispatch event of the emotion backend module to extend the components.\n */\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Emotion',\n 'onPostDispatchBackendEmotion'\n );\n }", "public static function __events () {\n \n }", "public static function events();", "public function boot(Dispatcher $events)\n {\n parent::boot($events);\n\n //\n require app_path('Events.php');\n }", "public function register(): void\n {\n $eventManager = EventManager::getInstance();\n\n $this->discoverEvents();\n\n foreach ($this->getListeners() as $moduleName => $moduleEvents) {\n foreach ($moduleEvents as $eventName => $eventListeners) {\n foreach (array_unique($eventListeners) as $listener) {\n $eventManager->addEventHandler(\n $moduleName,\n $eventName,\n [$listener, 'handle']\n );\n }\n }\n }\n }", "public function registerEvents() {\n $this->registerEvent(Api_TraderApiEvents::AJAX_PLUGIN, \"ajaxPlugin\");\n $this->registerEvent(Api_TraderApiEvents::USER_REGISTER_CHECK, \"userRegisterCheck\");\n $this->registerEvent(Api_TraderApiEvents::USER_NEW, \"userNew\");\n $this->registerEvent(Api_TraderApiEvents::USER_DELETE, \"userDelete\");\n $this->registerEvent(Api_TraderApiEvents::USER_PROFILE_CHECK, \"userProfileCheck\");\n $this->registerEvent(Api_TraderApiEvents::USER_PROFILE_CHANGE, \"userProfileChange\");\n $this->registerEvent(Api_TraderApiEvents::ADMIN_WELCOME_TODO, \"adminWelcomeTodo\");\n $this->registerEvent(Api_TraderApiEvents::TEMPLATE_PLUGIN_FUNCTION, \"templateFunction\");\n return true;\n }", "public function __initEvents($app)\n {\n }", "protected function registerListeners()\n {\n // Login event listener\n #Event::listen('auth.login', function($user) {\n //\n #});\n\n // Logout event subscriber\n #Event::subscribe('Mrcore\\Parser\\Listeners\\MyEventSubscription');\n }", "public function setDispatcherEvents()\n\t{\n\t\t$this->dispatcher = (new Dispatcher())->register($this->routes);\n\t}", "public function registerAppEvents()\n {\n return [\n 'beforeBootingApplication' => '\\Apps\\Resources\\Extensions\\Api@payment',\n 'afterBootingApplication' => '\\Apps\\Resources\\Extensions\\Api@paymentSuccess'\n ];\n }", "public function register() : void\n {\n $this->registerDefaultEventSourcingBindings();\n $this->registerEventStore();\n }", "public function boot()\n {\n// Event::listen('*', function ($event){\n// var_dump($event);\n// });\n }", "public function boot()\n {\n BelongsTo::setEventDispatcher($this->app['events']);\n HasMany::setEventDispatcher($this->app['events']);\n HasOne::setEventDispatcher($this->app['events']);\n MorphMany::setEventDispatcher($this->app['events']);\n MorphOne::setEventDispatcher($this->app['events']);\n MorphTo::setEventDispatcher($this->app['events']);\n }", "function defineHandlers() {\n EventsManager::listen('on_rawtext_to_richtext', 'on_rawtext_to_richtext');\n EventsManager::listen('on_daily', 'on_daily');\n EventsManager::listen('on_wireframe_updates', 'on_wireframe_updates');\n }", "public function attachEvents();", "public function attachEvents();", "public function registerConfiguredEvents()\n {\n // Clean previously registered events\n foreach ($this->registeredEvents as $event) {\n $this->events->forget('rocketeer.'.$event);\n }\n\n // Clean previously registered plugins\n $plugins = $this->registeredPlugins;\n $this->registeredPlugins = [];\n\n // Register plugins again\n foreach ($plugins as $plugin) {\n $this->plugin($plugin['plugin'], $plugin['configuration']);\n }\n\n // Get the registered events\n $hooks = (array) $this->rocketeer->getOption('hooks');\n unset($hooks['custom']);\n\n // Bind events\n foreach ($hooks as $event => $tasks) {\n foreach ($tasks as $task => $listeners) {\n $this->addTaskListeners($task, $event, $listeners, 0, true);\n }\n }\n }", "public function boot()\n {\n Event::listen(\n AppointmentConfirmed::class,\n [SendConfirmMail::class, 'handle']\n );\n\n Event::listen(\n DoctorAccepted::class,\n [SendDoctorAcceptanceMail::class, 'handle']\n );\n\n Event::listen(\n ClinicAccepted::class,\n [SendClinicAcceptanceMail::class, 'handle']\n );\n \n Event::listen(\n NewRegistered::class,\n [SendCodeMail::class, 'handle']\n );\n }", "private function registerEventHandlers()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Frontend_PaymentProcessorCsrf',\n 'onGetControllerPathFrontend'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Frontend_PaymentProcessor',\n 'onGetControllerPathFrontend'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Frontend_PaymentInformation',\n 'onGetControllerPathFrontendInformation'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Backend_Order_Save',\n 'onOrderSaveAction'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_VrpayecommerceClient',\n 'onInitResourceVrpayecommerceClient'\n );\n $this->subscribeEvent(\n 'Shopware_Modules_Admin_GetPaymentMeans_DataFilter',\n 'onGetPaymentMeans'\n );\n $this->subscribeEvent(\n 'Shopware_Modules_Admin_GetPaymentMeanById_DataFilter',\n 'onGetPaymentMeanById'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch',\n 'onPostDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchTemplate'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Checkout',\n 'onPostDispatchFinish'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Checkout',\n 'onFrontendCheckoutPostDispatch'\n );\n }", "protected function registerInputEvents() {\n\t\t$this->getEventLoop()->addEventListener('HANG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->offHook = (bool)$event['value'];\n\n\t\t\t// Trigger specific events for receiver up and down states\n\t\t\t$eventName = $this->isOffHook() ? 'RECEIVER_UP' : 'RECEIVER_DOWN';\n\t\t\t$this->fireEvents($eventName, $event);\n\t\t});\n\n\t\t$this->getEventLoop()->addEventListener('TRIG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->dialling = (bool)$event['value'];\n\t\t});\n\n\t\t// Proxy registration for all EventLoop events to pass them back up to our own listeners\n\t\t$this->getEventLoop()->addEventListener(true, function ($event, $type) {\n\t\t\t// Fire event to our own listeners\n\t\t\t$this->fireEvents($type, $event);\n\t\t});\n\t}", "public function listenForEvents()\n {\n Event::listen(DummyEvent::class, DummyListener::class);\n\n event(new DummyEvent);\n }", "public function registerEvents()\n {\n if (!empty($this->clientEvents)) {\n $js = [];\n foreach ($this->clientEvents as $event => $handle) {\n $handle = new JsExpression($handle);\n $js[] = \"$({$this->var}).on('{$event}', {$handle});\";\n }\n $this->getView()->registerJs(implode(PHP_EOL, $js));\n }\n }", "private function subscribeEvents()\n {\n // Subscribe the needed event for less merge and compression\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n\n $this->subscribeEvent(\n 'Shopware_Controllers_Widgets_Emotion_AddElement',\n 'onEmotionAddElement'\n );\n\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend',\n 'onPostDispatchFrontend'\n );\n }", "private function createMyEvents()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout',\n 'onPostDispatchCheckoutSecure'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_Checkout_PreRedirect',\n 'onPreRedirectToPayPal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch_Frontend_PaymentPaypal',\n 'onPreDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_Webhook',\n 'onPaymentPaypalWebhook'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_PlusRedirect',\n 'onPaymentPaypalPlusRedirect'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchAccount'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Javascript',\n 'onCollectJavascript'\n );\n $this->subscribeEvent(\n 'Shopware_Components_Document::assignValues::after',\n 'onBeforeRenderDocument'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Config',\n 'onPostDispatchConfig'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_Order',\n 'onPostDispatchOrder'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_PaymentPaypal',\n 'onPostDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_paypal_plus.rest_client',\n 'onInitRestClient'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Api_PaypalPaymentInstruction',\n 'onGetPaymentInstructionsApiController'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Front_StartDispatch',\n 'onEnlightControllerFrontStartDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch',\n 'onPreDispatchSecure'\n );\n }", "private function installEvents()\n {\n $this->load->model('setting/event');\n\n $this->model_setting_event->addEvent(\n 'payment_mundipagg',\n 'catalog/model/account/customer/editCustomer/after',\n 'extension/payment/mundipagg_events/onCustomerEdit'\n );\n \n $this->model_setting_event->addEvent(\n 'payment_mundipagg',\n 'catalog/model/account/address/addAddress/after',\n 'extension/payment/mundipagg_events/onAddressAdd'\n );\n }", "public function subscribe(Dispatcher $events): void\n {\n $events->listen('admin_enqueue_scripts', [$this, 'enqueueAdminAssets']);\n $events->listen('wp_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('login_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('admin_init', [$this, 'enqueueEditorAssets']);\n }", "public function subscribe(Dispatcher $events): void\n {\n $events->listen('admin_enqueue_scripts', [$this, 'enqueueAdminAssets']);\n $events->listen('wp_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('login_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('admin_init', [$this, 'enqueueEditorAssets']);\n }", "public function boot()\n {\n Event::listen('eloquent.created: *', function($data,$data2) {\n $this->save_event('crear',$data2);\n });\n\n Event::listen('eloquent.updated: *', function($data,$data2) {\n $this->save_event('actualizar',$data2);\n });\n\n Event::listen('eloquent.deleting: *', function($data,$data2) {\n $this->save_event('borrar',$data2);\n });\n }", "private function registerEventStore() : void\n {\n $this->app->bind(IlluminateEventStore::class, function ($app) {\n $connection = $app->make(Connection::class);\n $serializer = $app->make(Serializer::class);\n $eventStoreTable = $app->config->get('event_sourcing.event_store_table');\n\n return new IlluminateEventStore(\n $connection,\n $serializer,\n $eventStoreTable\n // decorators (we could decorate the stream with account_id)\n );\n });\n\n $this->app->bind(\n EventStore::class,\n IlluminateEventStore::class\n );\n }", "public function listenToEvents()\n\t{\n\t\tif ($scope = $this->getModelResolvingScope()) {\n\t\t\t$this->eventDispatcher->listen('eloquent.booted: *', function ($model, $data = null) use ($scope) {\n\t\t\t\tif (is_string($model) && is_array($data)) { // Laravel 5.4 wildcard event\n\t\t\t\t\t$model = reset($data);\n\t\t\t\t}\n\n\t\t\t\t$model->addGlobalScope($scope);\n\t\t\t});\n\t\t}\n\n\t\tif (class_exists(\\Illuminate\\Database\\Events\\QueryExecuted::class)) {\n\t\t\t// Laravel 5.2 and up\n\t\t\t$this->eventDispatcher->listen(\\Illuminate\\Database\\Events\\QueryExecuted::class, function ($event) {\n\t\t\t\t$this->registerQuery($event);\n\t\t\t});\n\t\t} else {\n\t\t\t// Laravel 5.0 to 5.1\n\t\t\t$this->eventDispatcher->listen('illuminate.query', function ($event) {\n\t\t\t\t$this->registerLegacyQuery($event);\n\t\t\t});\n\t\t}\n\n\t\t// register all event listeners individually so we don't have to regex the event type and support Laravel <5.4\n\t\t$this->listenToModelEvent('retrieved');\n\t\t$this->listenToModelEvent('created');\n\t\t$this->listenToModelEvent('updated');\n\t\t$this->listenToModelEvent('deleted');\n\t}", "public function boot(DispatcherContract $events)\n\t{\n\t\t\n\t\tparent::boot($events);\n\t\t\n\t\t\\Event::listen('Rapidweb\\Admin\\Events\\PodcastWasPurchased', function($event)\n\t\t{\n\t\t\t// Handle the event...\n\t\t\treturn 'hello world';\n\t\t\t\t\n\t\t});\n\t\t\n\n\t\t//\n\t}", "protected function registerEventListeners()\n {\n Event::listen(Started::class, function (Started $event) {\n $this->progress = $this->output->createProgressBar($event->objects->count());\n });\n\n Event::listen(Imported::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(ImportFailed::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(DeletedMissing::class, function (DeletedMissing $event) {\n $event->deleted->isEmpty()\n ? $this->info(\"\\n No missing users found. None have been soft-deleted.\")\n : $this->info(\"\\n Successfully soft-deleted [{$event->deleted->count()}] users.\");\n });\n\n Event::listen(Completed::class, function (Completed $event) {\n if ($this->progress) {\n $this->progress->finish();\n }\n });\n }", "protected static function boot()\n {\n static::addGlobalScope(new EventScope);\n static::addGlobalScope(new ApprovedEventScope);\n parent::boot();\n }", "public function boot()\n {\n // When a Signup's why_participated, quantity, quantity_pending, or deleted_at are changed, create an event.\n // @TODO: when we move quantity on the post, we'll want to remove this check below.\n Signup::saved(function ($signup) {\n if ($signup->isDirty('why_participated') || $signup->isDirty('quantity') || $signup->isDirty('quantity_pending') || $signup->isDirty('deleted_at') || $signup->isDirty('source')) {\n $signup->events()->create([\n 'content' => $signup->toJson(),\n // Use the authenticated user if coming from the web,\n // otherwise use the id of the user in the request.\n 'user' => auth()->id() ? auth()->id() : $signup->northstar_id,\n ]);\n }\n });\n\n // When Posts are saved create an event for them.\n Post::saved(function ($post) {\n $post->events()->create([\n // @TODO: this should include the tags with the post\n 'content' => $post->toJson(),\n // Use the authenticated user if coming from the web,\n // otherwise use the id of the user in the request.\n 'user' => auth()->id() ? auth()->id() : $post->northstar_id,\n ]);\n });\n\n // When Reviews are saved create an event for them.\n Review::saved(function ($review) {\n $review->events()->create([\n 'content' => $review->toJson(),\n 'user' => $review->admin_northstar_id,\n ]);\n });\n }", "public function subscribeEvents()\n {\n $this->subscribeEvent('Enlight_Controller_Front_StartDispatch', 'onStartDispatch');\n }", "function defineHandlers(&$events) {\n /*\n * example handlers see: handlers/on_admin_sections.php and handlers/on_build_menu.php\n * \n */\n\n //$events->listen('on_build_menu', 'on_build_menu');\n //$events->listen('on_admin_sections', 'on_admin_sections');\n }", "public function boot(DispatcherContract $events)\n {\n parent::boot($events);\n \n // 添加用户观察者\n User::observe(new UserObserver);\n \n // 添加分享观察者\n Stuff::observe(new StuffObserver);\n \n // 添加评论观察者\n Comment::observe(new CommentObserver);\n \n // 添加意见反馈观察者\n Feedback::observe(new FeedbackObserver);\n \n // 添加关注观察者\n Follow::observe(new FollowObserver);\n \n // 添加点赞观察者\n Like::observe(new LikeObserver);\n }", "private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public static function getSubscribedEvents(): array\n {\n return [KernelEvents::EXCEPTION => ['onException', 20]];\n }", "protected function initializeEvents()\n\t{\n\t\tparent::initializeEvents();\n\t\t$this->events->add('beforeRender');\n\t\t$this->events->add('render');\n\t}", "public function boot()\n {\n $this->registerObservers();\n }", "public function boot(DispatcherContract $events)\n {\n parent::boot($events);\n\n //\n }", "public function boot(DispatcherContract $events)\n {\n parent::boot($events);\n\n //\n }", "public function boot(DispatcherContract $events)\n {\n parent::boot($events);\n\n //\n }", "public function boot(DispatcherContract $events)\n {\n parent::boot($events);\n\n //\n }", "public function boot(DispatcherContract $events)\n {\n parent::boot($events);\n\n //\n }", "public function boot(DispatcherContract $events)\n {\n parent::boot($events);\n\n //\n }", "public function boot(DispatcherContract $events)\n {\n parent::boot($events);\n }", "public function boot(DispatcherContract $events)\n {\n parent::boot($events);\n }", "public function boot(): void\n {\n foreach ($this->observers as $model => $observer) {\n foreach ($observer as $item) {\n $model::observe($item);\n }\n }\n\n foreach ($this->listen as $event => $listeners) {\n foreach (array_unique($listeners, SORT_REGULAR) as $listener) {\n Event::listen($event, $listener);\n }\n }\n }", "private function initEvents() : void {\n\n $arenas = MineceitCore::getArenas()->getEventArenas();\n\n foreach($arenas as $arena) {\n $this->createEvent($arena);\n }\n }", "public function subscribe(): void\n {\n foreach (static::$eventHandlerMap as $eventName => $handler) {\n $this->events->listen($eventName, [$this, $handler]);\n }\n }", "public function boot(DispatcherContract $events)\n\t{\n\t\tparent::boot($events);\n\n\t\t//\n\t}", "public function boot()\n {\n parent::boot();\n\n ///Переобернули события старого типа в более удобный тип\n\n Event::listen('cron.collectJobs', function () {\n Event::fire(new CronCollectJobs());\n });\n Event::listen('cron.beforeRun', function ($RunDate) {\n Event::fire(new CronBeforeRun($RunDate));\n });\n Event::listen('cron.jobError', function ($name, $return, $runtime, $rundate) {\n Event::fire(new CronJobError($name, $return, $runtime, $rundate));\n });\n Event::listen('cron.jobSuccess', function ($name, $runtime, $rundate) {\n Event::fire(new CronJobSuccess($name, $runtime, $rundate));\n });\n Event::listen('cron.afterRun', function ($name, $return, $runtime, $rundate) {\n Event::fire(new CronAfterRun($name, $return, $runtime, $rundate));\n });\n Event::listen('cron.locked', function ($lockfile) {\n Event::fire(new CronLocked($lockfile));\n });\n }", "public function send_events()\n {\n }", "function register_events() {\n\n\t\t// Labels for the backend Event publisher\n\t\t$event_labels = array(\n\t\t\t'name'\t\t\t\t\t=> 'Events',\n\t\t\t'singular_name'\t\t\t=> 'Event',\n\t\t\t'add_new'\t\t\t\t=> 'New Event',\n\t\t\t'add_new_item'\t\t\t=> 'Schedule Event',\n\t\t\t'edit_item'\t\t\t\t=> 'Edit Event',\n\t\t\t'new_item'\t\t\t\t=> 'New Event',\n\t\t\t'view_item'\t\t\t\t=> 'View Event',\n\t\t\t'search_items'\t\t\t=> 'Search Events',\n\t\t\t'not_found'\t\t\t\t=> 'No events found',\n\t\t\t'not_found_in_trash'\t=> 'No events found in Trash', \n\t\t\t'parent_item_colon'\t\t=> '',\n\t\t\t'menu_name'\t\t\t\t=> 'Events',\n\t\t);\n\t\t\n\t\t$event_capabilities = array(\n\t\t\t'edit_post'\t\t\t\t=> 'edit_post',\n\t\t\t'edit_posts'\t\t\t=> 'edit_posts',\n\t\t\t'edit_others_posts'\t\t=> 'edit_others_posts',\n\t\t\t'publish_posts'\t\t\t=> 'publish_posts',\n\t\t\t'read_post'\t\t\t\t=> 'read_post',\n\t\t\t'read_private_posts'\t=> 'read_private_posts',\n\t\t\t'delete_post'\t\t\t=> 'delete_post'\n\t\t);\t\t\t\n\t\t\t\n\t\t// Construct the arguments for our custom slide post type\n\t\t$event_args = array(\n\t\t\t'labels'\t\t\t\t=> $event_labels,\n\t\t\t'description'\t\t\t=> 'Scheduled calendar events',\n\t\t\t'public'\t\t\t\t=> true,\n\t\t\t'publicly_queryable'\t=> true,\n\t\t\t'exclude_from_search'\t=> true,\n\t\t\t'show_ui'\t\t\t\t=> true,\n\t\t\t'show_in_menu'\t\t\t=> true,\n\t\t\t'show_in_nav_menus'\t\t=> false,\n\t\t\t'menu_icon'\t\t\t\t=> THEME_URI . '/images/icons/calendar-icon-20.png',\n\t\t\t'capabilities'\t\t\t=> $event_capabilities,\n\t\t\t'map_meta_cap'\t\t\t=> true,\n\t\t\t'hierarchical'\t\t\t=> false,\n\t\t\t'supports'\t\t\t\t=> array( 'title', 'editor', 'thumbnail' ),\n\t\t\t'taxonomies'\t\t\t=> array( 'calendar' , 'occurence' ),\n\t\t\t'has_archive'\t\t\t=> false,\n\t\t\t'rewrite'\t\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t'slug' \t=> 'event',\n\t\t\t\t\t\t\t\t\t\t'feeds'\t=> false,\n\t\t\t\t\t\t\t\t\t\t'pages'\t=> false,\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t'query_var'\t\t\t\t=> true,\n\t\t\t'can_export'\t\t\t=> true,\n\t\t);\n\n\t\t\n\t\t// Register the Event post type!\n\t\tregister_post_type( 'event', $event_args );\n\t}", "public function events()\n {\n $eventdata = $this->Event->find('all', \n array(\n 'order' => array('Event.time' => 'DESC'),\n 'condition' => array('type' => 'Event')\n ));\n \n $this->set('events', $eventdata);\n \n $this->assignUserToView($this->Auth->user('id'));\n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Info');\n }", "public function boot()\n {\n $this->registerPublishing();\n\n Telescope::start($this->app);\n Telescope::listenForStorageOpportunities($this->app);\n }", "protected function _subscribeToEngineEvents()\n {\n $controller = $this->getController();\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::ENDOFFAX,\n array(\n 'callback' => array( $this, 'onEndOfFax' ),\n 'options' => array( 'autoRemove' => 'before' )\n )\n );\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::FAXPAGE,\n array( 'callback' => array( $this, 'onFaxPage' ) )\n );\n }", "public function boot()\n {\n if (!chdir($this->path)) {\n return;\n }\n\n $directories = array_filter(glob('*'), 'is_dir');\n\n foreach ($directories as $directory) {\n if ($this->hasListenFile($directory)) {\n $this->registerListeners($directory);\n }\n }\n\n foreach ($this->subscribe as $subscriber) {\n Event::subscribe($subscriber);\n }\n }", "public function boot()\n {\n parent::boot();\n\n User::observe($this->app->make(UserObserver::class));\n AnalyticsEvent::observe($this->app->make(AnalyticsEventObserver::class));\n }", "private function listeners()\n {\n foreach ($this['config']['listeners'] as $eventName => $classService) {\n $this['dispatcher']->addListener($classService::NAME, [new $classService($this), 'dispatch']);\n }\n }", "public function boot()\n {\n if ($this->app->isLocal()) {\n Redis::enableEvents();\n }\n\n Image::observe(ImageObserver::class);\n Domain::observe(DomainObserver::class);\n }", "public function boot()\n {\n Dictionary::observe(DictionaryObserver::class);\n HouseLevy::observe(HouseLevyObserver::class);\n LandLevy::observe(LandLevyObserver::class);\n Period::observe(PeriodObserver::class);\n }", "protected function setEvents()\n {\n foreach ($this->preloadList as $preload) {\n include_once XOOPS_ROOT_PATH . '/modules/' . $preload['module'] . '/preloads/' . $preload['file']. '.php';\n $class_name = ucfirst($preload['module'])\n . ($preload['file'] == 'preload' ? '' : ucfirst($preload['file']) )\n . 'Preload';\n if (!class_exists($class_name)) {\n continue;\n }\n $class_methods = get_class_methods($class_name);\n foreach ($class_methods as $method) {\n if (strpos($method, 'event') === 0) {\n $event_name = strtolower(str_replace('event', '', $method));\n $event= array($class_name, $method);\n $this->eventListeners[$event_name][] = $event;\n }\n }\n }\n }", "public function registerEvents(Container $container)\n {\n $container->singleton('events', function ($container) {\n return (new Dispatcher($container))->setQueueResolver(function () use ($container) {\n return $container->make(QueueFactoryContract::class);\n });\n });\n }", "public function boot()\n {\n Artist::observe(ArtistObserver::class);\n Album::observe(AlbumObserver::class);\n Genre::observe(GenreObserver::class);\n Label::observe(LabelObserver::class);\n User::observe(UserObserver::class);\n }", "function Doku_Event_Handler() {\n\n // load action plugins\n $plugin = NULL;\n $pluginlist = plugin_list('action');\n\n foreach ($pluginlist as $plugin_name) {\n $plugin =& plugin_load('action',$plugin_name);\n\n if ($plugin !== NULL) $plugin->register($this);\n }\n }", "public function boot() : void\n {\n $eventBus = $this->app->make(EventBus::class);\n\n // The projections config contains a list of class names or projectors.\n // Each of these projectors will be subscribed to the given event bus.\n $projectors = $this->app->config->get('event_sourcing.projectors');\n\n foreach ($projectors as $projector) {\n $eventBus->subscribe(\n $this->app->make($projector)\n );\n }\n\n Reconstitution::reconstituteUsing(\n new ReconstituteUsingInstantiatorAndHydrator(\n new Instantiator(),\n new HydrateUsingReflection()\n )\n );\n }", "public function boot()\n {\n Image::observe(ImageObserver::class);\n Section::observe(SectionObserver::class);\n Post::observe(PostObserver::class);\n Virtual_Book::observe(VirtualBookObserver::class);\n Book::observe(BookObserver::class);\n }", "public function boot()\n {\n // Event Listeners\n $this->eventListeners($this->events);\n\n // Event Subscriptions\n $this->eventSubscriptions($this->eventSubscribers);\n\n // Observers\n $this->addObservers($this->observers);\n\n // Extensions\n $this->registerExtensions($this->extensions);\n\n // Features\n $this->registerFeatures($this->features);\n\n // Permissions\n $this->registerPermissions($this->permissions);\n }", "public function boot(Dispatcher $events)\n {\n Schema::defaultStringLength(191);\n setlocale(LC_TIME, \"{$this->app->getLocale()}.UTF8\");\n\n $events->listen(BuildingMenu::class, function (BuildingMenu $event) {\n $this->loadMenu($event->menu);\n });\n }", "protected function registerListeners()\n {\n }", "public static function registerListeners()\n {\n static::creating('Wildside\\Userstamps\\Listeners\\Creating@handle');\n static::updating('Wildside\\Userstamps\\Listeners\\Updating@handle');\n\n if( method_exists(get_called_class(), 'deleting') )\n {\n static::deleting('Wildside\\Userstamps\\Listeners\\Deleting@handle');\n }\n\n if( method_exists(get_called_class(), 'restoring') )\n {\n static::restoring('Wildside\\Userstamps\\Listeners\\Restoring@handle');\n }\n }", "public function boot()\n {\n // Observe event\n // For example:\n // User::observe( new UserObserver );\n }", "protected function registerListeners()\n {\n $this->container['listener.server'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\ServerListener($c['filesystem'], $c['generator.server']);\n });\n\n $this->container['listener.gateway'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\GatewayListener($c['filesystem'], $c['generator.gateway']);\n });\n }", "public function boot(DispatcherContract $events)\r\n {\r\n parent::boot($events);\r\n //Event::listen('GetUploadsDir', 'FileUploadEventListener');\r\n //\r\n }", "public function __construct()\n {\n $this->events = new EventDispatcher();\n }", "private function registerAll()\n {\n $this->registerApp();\n $this->registerPsr();\n $this->registerRequests();\n $this->registerResponses();\n $this->registerPlugins();\n $this->registerCallables();\n $this->registerViews();\n $this->registerUtils();\n }", "public function init()\n\t{\n\t\tEvents::register('user_insert', array($this, 'user_insert'));\n\t\tEvents::register('user_insert_ldap', array($this, 'user_insert_ldap'));\n\t\tEvents::register('user_update', array($this, 'user_update'));\n\t\tEvents::register('user_delete', array($this, 'user_delete'));\n\t\tEvents::register('users_import', array($this, 'users_import'));\n\t}", "public function boot(): void\n {\n $this->registerEvents();\n $this->registerQueueConnectors();\n }", "public function boot()\n {\n $this->app->make(RouteEventRegister::class)->resolve();\n }", "public function getSubscribedEvents()\n {\n return [Events::loadClassMetadata];\n }", "public function mount()\n {\n $this->events = Event::all();\n }", "public function boot()\n {\n Exchange::observe(ExchangeObserver::class);\n Withdrawal::observe(WithdrawalObserver::class);\n Topup::observe(TopupObserver::class);\n }", "protected static function boot()\r\n {\r\n parent::boot();\r\n\r\n foreach (static::$handleableEvents as $event) {\r\n static::$event(function($model) use ($event) {\r\n /** @var Model $model */\r\n return $model->handleEvent($event);\r\n });\r\n }\r\n }", "public function HookEvents() {\n\t\tadd_action( 'add_attachment', array( $this, 'EventFileUploaded' ) );\n\t\tadd_action( 'delete_attachment', array( $this, 'EventFileUploadedDeleted' ) );\n\t\tadd_action( 'admin_init', array( $this, 'EventAdminInit' ) );\n\t}", "public static function getSubscribedEvents()\n {\n return array(KernelEvents::REQUEST => 'onKernelRequestEvent');\n }", "protected function registerSubscribers(EventDispatcher $eventDispatcher): void\n {\n parent::registerSubscribers($eventDispatcher);\n\n // Register additional event subscribers that are only meant to be notified in a development environment:\n }", "public function boot(Dispatcher $events)\n {\n Carbon::setUtf8(true);\n Carbon::setLocale(config('app.locale'));\n setlocale(LC_TIME, config('app.locale'));\n $events->listen(BuildingMenu::class, function (BuildingMenu $event) {\n $event->menu->add([\n 'text' => 'Categories',\n 'route' => 'categories.index',\n 'label' => Category::all()->count(),\n 'icon' => 'fas fa-fw fa-list',\n ]);\n $event->menu->add([\n 'text' => 'Products',\n 'route' => 'products.index',\n 'label' => Product::all()->count(),\n 'label_color' => 'success',\n 'icon' => 'fas fa-fw fa-fan',\n ]);\n $event->menu->add([\n 'text' => 'Posts',\n 'route' => 'posts.index',\n 'label' => Post::all()->count(),\n 'label_color' => 'info',\n 'icon' => 'fas fa-fw fa-blog',\n ]);\n });\n\n\n View::composer('*', function ($view) {\n $view->with('categories', Category::all())\n ->with('product_count', Product::count())\n ->with('latest_posts', Post::orderBy('updated_at', 'desc')->take(config('app.latest_posts_count'))->get()) ;\n });\n }", "protected function scanEvents()\n {\n $scans = $this->eventScans();\n\n if (empty($scans)) {\n return;\n }\n\n $scanner = $this->app->make('annotations.event.scanner');\n\n $scanner->setClassesToScan($scans);\n\n file_put_contents(\n $this->finder->getScannedEventsPath(), '<?php '.$scanner->getEventDefinitions()\n );\n }", "abstract function HookEvents();", "public function boot()\n {\n //Register Observers\n Employee::observe(EmployeeObserver::class);\n Lead::observe(LeadObserver::class);\n }", "public function register()\n\t{\n\t\t$this->runListeners();\n\t}", "public function boot()\n {\n parent::boot();\n // 如果变量$events不存在,你也可以通过Facade调用\\Event::listen()。\n \\Event::listen('laravels.received_request', function (\\Illuminate\\Http\\Request $req, $app) {\n $req->query->set('get_key', 'hhxsv5');// 修改querystring\n $req->request->set('post_key', 'hhxsv5'); // 修改post body\n });\n \\Event::listen('laravels.generated_response', function (\\Illuminate\\Http\\Request $req, \\Symfony\\Component\\HttpFoundation\\Response $rsp, $app) {\n $rsp->headers->set('header-key', 'hhxsv5');// 修改header\n });\n }", "public function initEvents()\n\t{\n\t\t$this->collEvents = new PropelObjectCollection();\n\t\t$this->collEvents->setModel('Event');\n\t}" ]
[ "0.82186323", "0.8194245", "0.76956534", "0.7522409", "0.7307849", "0.7138719", "0.69926506", "0.69516087", "0.68208784", "0.6811024", "0.6798247", "0.6771752", "0.6726646", "0.66949767", "0.66883945", "0.6659465", "0.66186184", "0.6601663", "0.6570876", "0.6551585", "0.6551585", "0.6550772", "0.6538717", "0.6538382", "0.653794", "0.65262866", "0.6483142", "0.6471556", "0.6456312", "0.64528203", "0.64314634", "0.64314634", "0.64205617", "0.6400313", "0.6386298", "0.63774675", "0.63336647", "0.6318395", "0.63077563", "0.6257293", "0.625209", "0.6238304", "0.6228273", "0.6223863", "0.62152207", "0.62110513", "0.6173437", "0.6173437", "0.6173437", "0.6173437", "0.6173437", "0.6173437", "0.6159006", "0.6159006", "0.6157904", "0.6152517", "0.6138212", "0.61251163", "0.6122647", "0.6122155", "0.61204636", "0.61186516", "0.61178756", "0.61136544", "0.61121625", "0.6100552", "0.608469", "0.6084245", "0.60834175", "0.6081722", "0.6075762", "0.6075075", "0.60666203", "0.60586476", "0.60520196", "0.60458755", "0.60404724", "0.6039974", "0.6039838", "0.6037042", "0.60361505", "0.60358983", "0.6029695", "0.602114", "0.60164785", "0.6013353", "0.60037595", "0.60005975", "0.59975857", "0.59868616", "0.5959547", "0.5954472", "0.5939224", "0.5938794", "0.593836", "0.59317356", "0.59278196", "0.59270173", "0.59115344", "0.59077996", "0.590256" ]
0.0
-1
Create a new controller instance.
public function __construct() { try { $this->middleware('auth:admin'); $this->middleware('admin'); } catch (Exception $ex) { return redirect()->back()->withErrors($ex->getMessage() . " In " . $ex->getFile() . " At Line " . $ex->getLine())->withInput(); } }
{ "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
Display a listing of the resource.
public function index() { try { $user = Auth::guard('admin')->user(); $all_records = new AmenityList; $datas = $all_records->orderBy('name', 'ASC')->paginate(5); return view('admin.amenitylist.index')->with(compact('user', 'datas')); } catch (Exception $ex) { return redirect()->back()->withErrors($ex->getMessage() . " In " . $ex->getFile() . " At Line " . $ex->getLine())->withInput(); } }
{ "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() { try { $user = Auth::guard('admin')->user(); return view('admin.amenitylist.create')->with(compact('user')); } catch (Exception $ex) { return redirect()->back()->withErrors($ex->getMessage() . " In " . $ex->getFile() . " At Line " . $ex->getLine())->withInput(); } }
{ "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(AmenityListRequest $request) { try { $amenity_list = new AmenityList; $amenity_list->name = $request->name; if ($amenity_list->save()) { $flag = 'success'; $msg = "Record Added Successfully"; } else { $flag = 'danger'; $msg = "Record Not Added Successfully"; } $request->session()->flash($flag, $msg); return redirect(route('amenitylist.index')); } catch (Exception $ex) { return redirect()->back()->withErrors($ex->getMessage() . " In " . $ex->getFile() . " At Line " . $ex->getLine())->withInput(); } }
{ "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) { try { } catch (Exception $ex) { return redirect()->back()->withErrors($ex->getMessage() . " In " . $ex->getFile() . " At Line " . $ex->getLine())->withInput(); } }
{ "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) { try { $user = Auth::guard('admin')->user(); $edit_data = AmenityList::find($id); return view('admin.amenitylist.edit')->with(compact('user', 'edit_data')); } catch (Exception $ex) { return redirect()->back()->withErrors($ex->getMessage() . " In " . $ex->getFile() . " At Line " . $ex->getLine())->withInput(); } }
{ "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(AmenityListRequest $request, $id) { try { $edit_data = AmenityList::find($id); if ($request->name) { $edit_data->name = $request->name; } else { $edit_data->status = $request->status; } if ($edit_data->save()) { $flag = 'success'; $msg = 'Record Updated Successfully'; } else { $flag = 'danger'; $msg = 'Record Not Updated Successfully'; } $request->session()->flash($flag, $msg); return redirect(route('amenitylist.index')); } catch (Exception $ex) { return redirect()->back()->withErrors($ex->getMessage() . " In " . $ex->getFile() . " At Line " . $ex->getLine())->withInput(); } }
{ "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(Request $request, $id) { try { if (AmenityList::where('id', $id)->delete()) { $flag = 'success'; $msg = 'Record Deleted Successfully'; } else { $flag = 'danger'; $msg = 'Record Not Deleted Successfully'; } $request->session()->flash($flag, $msg); return redirect()->back(); } catch (Exception $ex) { return redirect()->back()->withErrors($ex->getMessage() . " In " . $ex->getFile() . " At Line " . $ex->getLine())->withInput(); } }
{ "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
get returns after a listing has been made
public function get_item_return_details($dom, $sku, $item_id){ //push each entry into new array $update_item_array = array(); $update_item_response = $dom->getElementsByTagName(DOM_ELEMENT_REVISE_INV_RESPONSE); foreach ($update_item_response as $item){ //ad sku to first entry of array array_push($update_item_array, $sku); array_push($update_item_array, $item_id); //errors $error_messages = $item->getElementsByTagName(DOM_ELEMENT_ERRORS); foreach ($error_messages as $errormsg){ $error = trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) != "" ? trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) : "No Error"; array_push($update_item_array, $error); } } return $update_item_array; //DOM_ELEMENT_SHORT_ERROR_MSG }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listing();", "function listing() {\r\n\r\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}", "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}", "function getItems();", "function getItems();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n\n $header = array(\"优惠券编号\", \"优惠券金额\", \"所属终端便利店账号\", \"终端便利店\", \"状态\", \"赠送时间\", \"使用时间\");\n $cols = 7;\n\n $contentList = $this->coupon_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有优惠券.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "public function listing() {\n $this->response->setData(1);\r\n $this->response->setHeader('__OK', Http::Response(Http::OK));\r\n return TRUE;\r\n }", "public function listAction() {\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $photo_id = (int) $this->_getParam('photo_id');\n\n // CHECK AUTHENTICATION\n // CHECK AUTHENTICATION\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $sitereview = $subject = Engine_Api::_()->core()->getSubject('sitereview_listing');\n } else if (Engine_Api::_()->core()->hasSubject('sitereview_photo')) {\n $photo = $subject = Engine_Api::_()->core()->getSubject('sitereview_photo');\n $listing_id = $photo->listing_id;\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n }\n $bodyResponse = $tempResponse = array();\n $listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, \"edit_listtype_$sitereview->listingtype_id\");\n $listingtype_id = $this->_listingType->listingtype_id;\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $photoCount = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id)->photo_count;\n $paginator = $sitereview->getSingletonAlbum()->getCollectiblesPaginator();\n\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo = $allowed_upload_photo;\n if (empty($photoCount))\n $allowed_upload_photo = $allowed_upload_photo;\n elseif ($photoCount <= $paginator->getTotalItemCount())\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = $allowed_upload_photo;\n\n //GET ALBUM\n $album = $sitereview->getSingletonAlbum();\n\n\n /* RETURN THE LIST OF IMAGES, IF FOLLOWED THE FOLLOWING CASES: \n * - IF THERE ARE GET METHOD AVAILABLE.\n * - iF THERE ARE NO $_FILES AVAILABLE.\n */\n if (empty($_FILES) && $this->getRequest()->isGet()) {\n $requestLimit = $this->getRequestParam(\"limit\", 10);\n $page = $requestPage = $this->getRequestParam(\"page\", 1);\n\n //GET PAGINATOR\n $album = $sitereview->getSingletonAlbum();\n $paginator = $album->getCollectiblesPaginator();\n\n $bodyResponse[' totalPhotoCount'] = $totalItemCount = $bodyResponse['totalItemCount'] = $paginator->getTotalItemCount();\n $paginator->setItemCountPerPage($requestLimit);\n $paginator->setCurrentPageNumber($requestPage);\n // Check the Page Number for pass photo_id.\n if (!empty($photo_id)) {\n for ($page = 1; $page <= ceil($totalItemCount / $requestLimit); $page++) {\n $paginator->setCurrentPageNumber($page);\n $tmpGetPhotoIds = array();\n foreach ($paginator as $photo) {\n $tmpGetPhotoIds[] = $photo->photo_id;\n }\n if (in_array($photo_id, $tmpGetPhotoIds)) {\n $bodyResponse['page'] = $page;\n break;\n }\n }\n }\n\n if ($totalItemCount > 0) {\n foreach ($paginator as $photo) {\n $tempImages = $photo->toArray();\n\n // Add images\n $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo);\n $tempImages = array_merge($tempImages, $getContentImages);\n\n $tempImages['user_title'] = $photo->getOwner()->getTitle();\n $tempImages['likes_count'] = $photo->likes()->getLikeCount();\n $tempImages['is_like'] = ($photo->likes()->isLike($viewer)) ? 1 : 0;\n \n //Sitereaction Plugin work start here\n if (Engine_Api::_()->getApi('Siteapi_Feed', 'advancedactivity')->isSitereactionPluginLive()) {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitereaction') && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereaction.reaction.active', 1)) {\n $popularity = Engine_Api::_()->getApi('core', 'sitereaction')->getLikesReactionPopularity($photo);\n $feedReactionIcons = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getLikesReactionIcons($popularity, 1);\n $tempImages['reactions']['feed_reactions'] =$tempImages['feed_reactions'] = $feedReactionIcons;\n\n if (isset($viewer_id) && !empty($viewer_id)) {\n $myReaction = $photo->likes()->getLike($viewer);\n if (isset($myReaction) && !empty($myReaction) && isset($myReaction->reaction) && !empty($myReaction->reaction)) {\n $myReactionIcon = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getIcons($myReaction->reaction, 1);\n $tempImages['reactions']['my_feed_reaction'] =$tempImages['my_feed_reaction'] = $myReactionIcon;\n }\n }\n }\n }\n //Sitereaction Plugin work end here\n if (!empty($viewer) && ($tempMenu = $this->getRequestParam('menu', 1)) && !empty($tempMenu)) {\n $menu = array();\n\n if ($photo->user_id == $viewer_id) {\n $menu[] = array(\n 'label' => $this->translate('Edit'),\n 'name' => 'edit',\n 'url' => 'listings/photo/edit/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Delete'),\n 'name' => 'delete',\n 'url' => 'listings/photo/delete/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n }\n $menu[] = array(\n 'label' => $this->translate('Share'),\n 'name' => 'share',\n 'url' => 'activity/index/share',\n 'urlParams' => array(\n \"type\" => $photo->getType(),\n \"id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Report'),\n 'name' => 'report',\n 'url' => 'report/create/subject/' . $photo->getGuid()\n );\n\n $menu[] = array(\n 'label' => $this->translate('Make Profile Photo'),\n 'name' => 'make_profile_photo',\n 'url' => 'members/edit/external-photo',\n 'urlParams' => array(\n \"photo\" => $photo->getGuid()\n )\n );\n\n $tempImages['menu'] = $menu;\n }\n\n if (isset($tempImages) && !empty($tempImages))\n $bodyResponse['images'][] = $tempImages;\n }\n }\n $bodyResponse['canUpload'] = $allowed_upload_photo;\n $this->respondWithSuccess($bodyResponse, true);\n } else if (isset($_FILES) && $this->getRequest()->isPost()) { // UPLOAD IMAGES TO RESPECTIVE EVENT\n if (empty($viewer_id) || empty($allowed_upload_photo))\n $this->respondWithError('unauthorized');\n $tablePhoto = Engine_Api::_()->getDbtable('photos', 'sitereview');\n $db = $tablePhoto->getAdapter();\n $db->beginTransaction();\n\n try {\n $viewer = Engine_Api::_()->user()->getViewer();\n $album = $sitereview->getSingletonAlbum();\n $rows = $tablePhoto->fetchRow($tablePhoto->select()->from($tablePhoto->info('name'), 'order')->order('order DESC')->limit(1));\n $order = 0;\n if (!empty($rows)) {\n $order = $rows->order + 1;\n }\n $params = array(\n 'collection_id' => $album->getIdentity(),\n 'album_id' => $album->getIdentity(),\n 'listing_id' => $sitereview->getIdentity(),\n 'user_id' => $viewer->getIdentity(),\n 'order' => $order\n );\n $photoCount = count($_FILES);\n if (isset($_FILES['photo']) && $photoCount == 1) {\n $photo_id = Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $_FILES['photo'])->photo_id;\n if (!$sitereview->photo_id) {\n $sitereview->photo_id = $photo_id;\n $sitereview->save();\n }\n } else if (!empty($_FILES) && $photoCount > 1) {\n foreach ($_FILES as $photo) {\n Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $photo);\n }\n }\n\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n }\n }\n }", "public function get_results()\n {\n }", "public function get_results()\n {\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['kind'] = 1;\n $searchData['login_user'] = $this->login_id;\n\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"账号\", \"姓名\", \"角色\", \"新增时间\", \"操作\");\n $cols = 6;\n\n $contentList = $this->user_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有数据.\" : '';\n break;\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "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}", "function item( $args )\n {\n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n\t\t$limit = 10;\n\t\t$offer_page = 0;\n \n // add a test if this listing has already been accepted\n if( $result[0]['status'] ==\n GarageSale\\BaseDatabase::STATUS_ACCEPTED \n ){\n \n // get offer result\n $offers_result = $offer_model->limit(1)->get_accepted( \n (int) $result[0]['id']\n );\n \n // set accepted flag to true\n $accepted = true;\n \n } else {\n \n \n // limit to 10 displayed at a time\n $limit = 10;\n \n // default offer_page to 0\n $offer_page = 0;\n \n // set up offers page\n if( isset( $_GET['offerpage'] ) && \n is_numeric($_GET['offerpage']) \n ){\n \n // set offer_page to the user provided value\n $offer_page = ((int) $_GET['offerpage'] ) - 1;\n }\n \n $offers_result = $offer_model->limit($limit)->\n page($offer_page)->\n get_item_any_offer( (int) $result[0]['id'] );\n }\n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t // load comment form\n\t $comment_form = $this->view->\n\t form('comment','listings/postcomment/'.$postid);\n\t $this->view->add('comment_form',$comment_form);\n\t \n\t \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Images 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}", "public function getResults()\n {\n }", "protected abstract function fetchLists();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['provider_id'] =$this->user_model->getProviderId($this->global['login_id']);\n\n // get top list data in homepage\n switch ($id) {\n case 1:\n if($this->isTicketter() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"配送员\", \"提交时间\", \"操作\");\n $cols = 10;\n }else if($this->isAdmin() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"所属区域总代理\", \"提交时间\", \"操作\");\n $cols = 10;\n }\n\n $contentList = $this->order_model->getItems($searchData);\n// foreach ($contentList as $item){\n// // get activity information\n// $activity = $this->activity_model->getItemById($item->activity_ids);\n// $activity->products = $this->activity_model->getProductsFromIds($activity->product_id, $activity->provider_id);\n//\n// $orderinfo = array(\n// 'id' => $item->id,\n// 'product_info' => json_encode($activity->products)\n// );\n// $this->order_model->update($orderinfo, $item->id);\n// }\n\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有订单.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function get_result($item)\n {\n }", "public function fetchList();", "public function getResults();", "public function getResults(/* ... */)\n {\n return $this->_return;\n }", "function _syndicated_content_listings_page()\n{\n}", "static private function retrieveList() {\n\t\ttry {\n\t\t\t\n\t\t\tif (!isset($_SESSION['starCollection'])) {\n\t\t\t\tthrow new Exception('No list found in memory');\n\t\t\t} else {\n\t\t\t\treturn $_SESSION['starCollection'];\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $ex) {\n\t\t\tthrow $ex;\n\t\t}\n\t}", "public function what_ever_you_want()\n {\n $sql = \"Make a custom sql query for grabbing your data\";\n return static::custom_list($sql);\n }", "public function getListing(){\n $BusInfo = $this->BusinessOwnerModel->getBusinessID();\n \n foreach($BusInfo as $row1){\n $busID = $row1->bid;\n }\n \n $query = $this->db->get_where('BusinessListing', array('bid' => $busID));\n \n if($query->num_rows() > 0){\n foreach($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n return false;\n }", "public function lister()\r\n {\r\n }", "public function list();", "public function list();", "public function list();", "function print_results() {\r\n if ($list = $this->print_list()) {\r\n echo '<p>' . $this->print_count() . '</p>';\r\n echo $list;\r\n echo '<p class=\"more\">' . $this->print_more() . '</p>';\r\n }\r\n else {\r\n echo $this->zero_results;\r\n }\r\n }", "public abstract function getResults();", "public abstract function get_lists();", "function wp_ajax_fetch_list()\n {\n }", "public function index()\n {\n return auth()->user()\n ->wishlist()\n ->with('files')\n ->latest()\n ->paginate(request('per_page', config('fleetcart_api.per_page', 10)));\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n // get top10 datas\n // id: 1-top1, 2-top2, 3-top3, 4-top4, 5-top5\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"轮播图片\", \"类型\", \"单品活动/餐装活动/区域总代理\", \"排序\", \"新增日期\", \"操作\",);\n $cols = 7;\n $contentList = $this->carousel_model->getItems();\n $footer = (count($contentList) == 0||$contentList=='') ? $footer = \"没有轮播图项目.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function getShares();", "public static function add_to_comparison() {\n header( 'HTTP/1.0 200 OK' );\n header( 'Content-Type: application/json' );\n\n if ( ! empty( $_GET['id'] ) ) {\n $compare = Inventor_Visitor::get_data('compare');\n $compare = ! is_array( $compare ) || empty( $compare ) ? array() : $compare;\n\n $post = get_post( $_GET['id'] );\n $post_type = get_post_type( $post->ID );\n\n if ( ! in_array( $post_type, Inventor_Post_Types::get_listing_post_types() ) ) {\n $data = array(\n 'success' => false,\n 'message' => __( 'This is not listing ID.', 'inventor-compare' ),\n );\n } else {\n $found = false;\n\n foreach ( $compare as $listing_id ) {\n if ( $listing_id == $_GET['id']) {\n $found = true;\n break;\n }\n }\n\n if ( ! $found ) {\n $max_compare = 5;\n\n if ( count( $compare ) >= $max_compare ) {\n $data = array(\n 'success' => false,\n 'message' => sprintf( __( 'You can compare at most %d listings', 'inventor-compare' ), $max_compare )\n );\n } else {\n $compare[] = $post->ID;\n $count = count( $compare );\n\n $timeout_in_seconds = apply_filters( 'inventor_compare_timeout', 60*60 );\n Inventor_Visitor::save_data( 'compare', $compare, time() + $timeout_in_seconds );\n\n $data = array(\n 'success' => true,\n 'count' => $count,\n 'text' => sprintf( _n( 'Compare %d item', 'Compare %d items', $count, 'inventor-compare' ), $count )\n );\n }\n\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing is already in list', 'inventor-compare' ),\n );\n }\n }\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing ID is missing.', 'inventor-compare' ),\n );\n }\n\n echo json_encode( $data );\n exit();\n }", "function sold( $args )\n {\n \n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_sold_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n \n \n \n \n\t\t// limit to 10 displayed at a time\n\t\t$limit = 10;\n\t\t\n\t\t// default offer_page to 0\n\t\t$offer_page = 0;\n\t\t\n\t\t// set up offers page\n\t\tif( isset( $_GET['offerpage'] ) && \n\t\t\tis_numeric($_GET['offerpage']) \n\t\t){\n\t\t\t\n\t\t\t// set offer_page to the user provided value\n\t\t\t$offer_page = ((int) $_GET['offerpage'] ) - 1;\n\t\t}\n\t\t\n\t\t$offers_result = $offer_model->limit($limit)->\n\t\t\tpage($offer_page)->\n\t\t\tget_item_any_offer( (int) $result[0]['id'] );\n \n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "function publishResults()\n{\n\n //return\n\n}", "function waiting_list_list(){\r\n\t\t$jenis_rawat = isset($_POST['jenis_rawat']) ? $_POST['jenis_rawat'] : \"\";\r\n\t\t$tgl_app = isset($_POST['wl_tgl_app']) ? $_POST['wl_tgl_app'] : \"\";\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$karyawan_id = isset($_POST['karyawan_id']) ? $_POST['karyawan_id'] : \"\";\r\n\t\t$result=$this->m_waiting_list->waiting_list_list($query,$start,$end,$tgl_app,$jenis_rawat,$karyawan_id);\r\n\t\techo $result;\r\n\t}", "public function doListingsSearch()\r\n\t{\r\n\t\t$searchUrl = $this->dispatchNow(new GenerateSearchUrl(Input::all()));\r\n\r\n\t\treturn redirect()->route('browselistings.index', $searchUrl);\r\n\t}", "public function handel()\n {\n $this->run($this->listKey);\n }", "function wck_refresh_list( $meta = '', $id = '' ){\r\n\t\tif( isset( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\t\r\n\t\tif( isset( $_POST['id'] ) )\r\n\t\t\t$id = absint($_POST['id']);\t\t\r\n\r\n\t\tob_start();\t\t\t\r\n\t\t\techo self::wck_output_meta_content($meta, $id, $this->args['meta_array']);\r\n\t\t\tdo_action( \"wck_refresh_list_{$meta}\", $id );\r\n\t\t$entry_list = ob_get_clean();\r\n\t\t\r\n\t\tif( strpos( current_filter(), 'wp_ajax_wck_refresh_list') === 0 ){\r\n\t\t\techo $entry_list;\t\t\t\r\n\t\t\texit;\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn $entry_list;\r\n\t\t}\r\n\t}", "function getLista(){\n\n }", "function listContent()\n {\n }", "public function run() {\n\t\t$this->db->fetchAll('pundits');\n\t\t$this->response = array(\n\t\t\t'status' => 'success',\n\t\t\t'command'=> 'list',\n\t\t\t'data' => $this->db->get_last_result()\n\t\t);\n\t}", "public function listAction()\n {\n // some logic\n }", "public function listItems()\n {\n return null;\n }", "public function itemreturndetails(){\n\t$sel='ir_id,ir_itemid,ir_mtid,ir_name,ir_qty,ir_desc,ir_staffpfno,ir_staffname,ir_dept,ir_receivername,ir_creatordate';\n\t$whorder='ir_mtid asc,ir_itemid asc';\n\t$data['result'] = $this->picomodel->get_orderlistspficemore('items_return',$sel,'',$whorder);\n $this->logger->write_logmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n\t$this->logger->write_dblogmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n $this->load->view('itemaction/displayreturnitem',$data);\n }", "public function getItems()\n {\n }", "public function listAction() {}", "public function getItemsList(){\n return $this->_get(4);\n }", "public function lst()\n\t{\n\t\t$list = AdminModel::paginate(3);\n\t\t$this->assign('list',$list);\n\t\treturn $this->fetch();\n\t}", "public function returnWebmounts() {}", "public function onRefreshList()\n {\n $this->prepareComponent();\n\n return $this->refreshList();\n }", "public function getEntriesList(){\n return $this->_get(2);\n }", "abstract public function getList();", "public function sales_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/sales_return/list';\n $data['sales_returns'] = $this->MSales_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "public function browseAction() {\n $this->validateRequestMethod();\n // Prepare the response\n $params = $response = array();\n $params = $this->_getAllParams();\n Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n\n //GET PAGINATOR\n $params['pagination'] = 1;\n $paginator = Engine_Api::_()->getDbtable('wishlists', 'sitereview')->getBrowseWishlists($params);\n $page = $this->_getParam('page', 1);\n $limit = $this->_getParam('limit', 20);\n $paginator->setItemCountPerPage($limit);\n $paginator->setCurrentPageNumber($page);\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $totalItemCount = $paginator->getTotalItemCount();\n $totalPages = ceil(($totalItemCount) / $limit);\n $response['totalItemCount'] = $totalItemCount;\n if (!empty($totalItemCount)) {\n foreach ($paginator as $wishlistObj) {\n $wishlist = $wishlistObj->toArray();\n if (isset($wishlist['body']) && !empty($wishlist['body']))\n $wishlist['body'] = strip_tags($wishlist['body']);\n $lists = $wishlistObj->getWishlistMap(array('orderby' => 'listing_id'));\n $count = $lists->getTotalItemCount();\n $tempListings = array();\n $counter = 0;\n if (_ANDROID_VERSION >= '1.8.6' || _IOS_VERSION >= '1.8.0') {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n } else {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n }\n $wishlist = array_merge($wishlist, $tempListings);\n $check_availability = Engine_Api::_()->sitereview()->check_availability('sitereview_wishlist', $wishlistObj->wishlist_id);\n $checkFollowAvailablity = $wishlistObj->follows()->isFollow($viewer);\n $tempMenu = array();\n if (!empty($viewer_id)) {\n if (empty($check_availability)) {\n $wishlist['isLike'] = 0;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Like'),\n 'url' => '/like',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n } else {\n $wishlist['isLike'] = 1;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Unlike'),\n 'url' => '/unlike',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n }\n\n if (!empty($checkFollowAvailablity)) {\n $wishlist['followed'] = 1;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Unfollow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n } else {\n $wishlist['followed'] = 0;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Follow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n }\n\n $wishlist['gutterMenu'] = $tempMenu;\n }\n $tempResponse[] = $wishlist;\n }\n }\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $level_id = Engine_Api::_()->getDbtable('levels', 'authorization')->fetchRow(array('type = ?' => \"public\"))->level_id;\n }\n $can_create = ($viewer_id) ? 1 : 0;\n $response['canCreate'] = $can_create;\n if (!empty($tempResponse))\n $response['response'] = $tempResponse;\n $this->respondWithSuccess($response, true);\n }", "function my_list()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['list'] = $this->_bid->my_list();\n\t\t\n\t\t$this->load->view('bids/my_list', $data);\n\t}", "public function getItems(){\n\t\treturn $this->_makeCall('items?');\n\t}", "function listitems($name)\r\n\t\t{\r\n\t\t \t\r\n\t\t}", "function warkslibsGetCurrentLoans() {\n\trequire_once('simple_html_dom.php');\n\t// get barcode and PIN - just guessing how this works here (from warkslibs.php) - need to find out how to do this properly!\n\t$warkslibs_options = get_option('warkslibs_settings_values');\n\t$warkslibs_user_barcode = $warkslibs_options['warkslibs_user_barcode'];\n\t$warkslibs_user_pin = $warkslibs_options['warkslibs_user_pin'];\n\t$warkslibs_url = \"http://library.warwickshire.gov.uk/vs/Pa.csp?OpacLanguage=eng&Profile=Default\";\n\t$login = getLogin($warkslibs_url,$warkslibs_user_barcode,$warkslibs_user_pin);\n\t$currentLoans = getCurrent($login);\n\t\n\t$html = str_get_html($currentLoans);\n\n\tforeach($html->find('td.listitemOdd',0)->parent()->parent()->find('tr') as $list) {\n\t\t$libItem['title'] = $list->find('td', 1)->plaintext;\n\t\t$libItem['barcode'] = $list->find('td', 2)->plaintext;\n\t\t$libItem['dateBorrowed'] = $list->find('td', 4)->plaintext;\n\t\t$libItem['dateDue']\t= $list->find('td', 5)->plaintext;\n\t\t$libItem['timesRenewed']\t= $list->find('td', 6)->plaintext;\n\t\t$libItem['charge']\t\t= $list->find('td', 7)->plaintext;\n\t\tif ($libItem['title'] === \"Title\") {\n\t\t\tcontinue;\n\t\t}\n\t\t$libItems[] = $libItem;\n\t}\n\n\tforeach($libItems as $libItem) {\n\t\t$title_search = urlencode($libItem['title']);\n\t\tif (strlen($title_search) > 255) {\n\t\t\t$title_search = substr($title_search,0,255); \n\t\t}\n\t\t$xml = searchAquaB($title_search);\n\t\t$doc = new DOMDocument();\n\t\t$doc->loadXML($xml);\n\t\t$xpath = new DOMXPath($doc);\n\t\t$records = $doc->getElementsByTagName(\"record\");\n\t\tforeach($records as $record) {\n\t\t\t$title = aquaBTitle($record,$xpath);\n\t\t\t$titlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$title));\n\t\t\t$searchtitlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$libItem['title']));\n\t\t\tif (strcmp($titlekey,$searchtitlekey) != 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$libItem['title'] = $title;\n\t\t\t$libItem['isbn'] = aquaBISBN($record,$xpath);\n\t\t\t$libItem['auth'] = aquaBAuth($record,$xpath);\n\t\t\t$libItem['image'] = aquaBImage($record,$xpath);\n\t\t\t// ID retrieval not work at the moment\n\t\t\t// Why not?\n\t\t\t$libItem['id'] = aquaBID($record,$xpath);\n\t\t\t//Need to output dates etc. as well if want to preserve these?\n\t\t\t\n\t\t\t$libItems1[] = $libItem;\n\t\t}\n\t}\n\t// At this point we have an array of arrays listing all of the current loans\n\t// Non-unique titles have been expanded into multiple records\n\t// The user can (in theory) choose the ones they actually have (or just the ones they want to blog)\n\t// Then press 'blog these' (or similar) and create multiple blog posts (in draft)\n\t// So at this point want to output stuff to the screen with all information included in form\n\t// Then grab this all back when form submitted?\n\t// Alternative is to just submit the relevant URLs of the form\n\t// http://librarycatalogue.warwickshire.gov.uk/abwarwick/fullrecordinnerframe.ashx?hreciid=|library/vubissmart-marc|494187&output=xml\n\t// And do a further retrieve to get the information needed - but this increases network traffic for no gain?\n\t// See http://www.sitepoint.com/forums/php-34/$_post-ing-checkbox-values-corresponding-form-values-182722.html for how to do this\n\t\n\t// So - try outputting items\n\techo '<form method=\"post\" action=\"\"><input name=\"blogem\" value=\"yes\" id=\"blogem\" type=\"hidden\">';\n\techo '<ul>';\n\t$no_libItems = count($libItems1);\n\tfor($i=0; $i<$no_libItems; $i++){\n\t\techo '<li>';\n\t\techo '<h3>'.$libItems1[$i]['title'].'</h3>';\n\t\t// display cover image\n\t\techo \"<img src=\".$libItems1[$i]['image'].\" alt='Coverimage of \".$libItems1[$i]['title'].\"'>\\n\"; // need to check if it exists, otherwise?\n\t\t// print the item title\n\t\t// Do any of these need encoding? URL?\n\t\techo '<input name=\"libitem['.$i.'][choose]\" value=\"1\" id=\"choose\" type=\"checkbox\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][title]\" value=\"'.$libItems1[$i]['title'].'\" id=\"title\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][isbn]\" value=\"'.$libItems1[$i]['isbn'].'\" id=\"isbn\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][auth]\" value=\"'.$libItems1[$i]['auth'].'\" id=\"auth\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][image]\" value=\"'.$libItems1[$i]['image'].'\" id=\"image\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][id]\" value=\"'.$libItems1[$i]['id'].'\" id=\"id\" type=\"hidden\">'; // is 'id' required?\n\t\techo '</li>';\n }\n\techo '<input type=\"submit\" name=\"itemstoblog\" value=\"Blog these...\" /></form><br />';\n echo '</ul>';\n\t\n/* This is where the Amazon Enhancement could go\n// Some idea of the code might be:\n$no_libItems = count($libItems1);\nfor($i=0; $i<$no_libItems; $i++){\n\t// Do Amazon lookup and enhance item (via function)\n}\n*/\n\n}", "public function getResults(){\n $this->results;\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();", "public function api_entry_list() {\n $data = $this->Mdl_Users->get_list(\n $_POST['rp'],\n $_POST['page'],\n $_POST['query'],\n $_POST['qtype'],\n $_POST['sortname'],\n $_POST['sortorder']);\n\n echo json_encode(array(\n 'page'=>$_POST['page'],\n 'total'=>$this->Mdl_Users->get_length(),\n 'rows'=>$data,\n ));\n }", "private function buildListing(){\n\t\t// link any necessary javascript files\n\t\t$html = Loader::helper('html');\n\t\t$f = Loader::helper('concrete/file');\n\t\t$expensiveCache = \\Core::make('cache/expensive');\n\n\t\t// listing cache file\n\t\t$listCacheFle = DIR_FILES_UPLOADED_STANDARD.'/listingcache.js';\n\t\t\n\t\t// init vars\t\t\n\t\t$movie_data_arr = array();\n\t\t$sel_dates_arr = array();\n\t\t$soon_dates_arr = array();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&movie_id=211358'));\n\t\t\t\t\t\t\t\n\t\t// retrieve cached values\n\t\t$updated_listing = $expensiveCache->getItem('movieFeed');\n\t\t//$updated_listing->clear();\n\t\t$listCheck = $updated_listing;\n\t\t$updated_listing = $updated_listing->get();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&search=AL13222'));\n\t\t\n\t\t// reload listing if cache is found to be empty\n\t\tif($listCheck->isMiss()){\n\n\t\t\t// gather theater movie listing\n\t\t\t$rtsListing = json_decode(json_encode((array) simplexml_load_string($this->getRTSData('ShowTimeXml'))), 1);\n\t\t\t$listing = $this->getWWMListingData();\n\t\t\t//$rtsListing = $this->getRTSListing();\n\t\t\t\n\t\t\t// 11-29-2013 force reload if listing data if blank\n\t//\t\tif(empty($listing)){\n//\t\t\t\t$this->buildListing();\n//\t\t\t}\n\t\t\t\n\t\t\t// convert to PHP array\n\t\t\t$listing = json_decode(json_encode((array) simplexml_load_string($listing)), 1);\n\n\t\t\t// store movie data\n\t\t\t$movie_listing = $listing['house']['schedule']['movie'];\n\t\t\t$updated_listing = $movie_listing;\n\n\t\t\t// walk through all movies per location\n\t\t\tforeach($movie_listing as $movie){\n\t\t\t\t\n\t\t\t\t// check for movie tickets film code\n\t\t\t\tif(!empty($movie['movie_id'])){\n\t\t\t\t\t// gather movie data\n\t\t\t\t\t$movie_data = $expensiveCache->getItem('movieData'.$movie['movie_id']);\n\t\t\t\t\t// store in cache if not found\n\t\t\t\t\tif ($movie_data->isMiss()) {\n\t\t\t\t\t\t$movie_data->lock();\n\t\t\t\t\t\t$movie_data_new = $this->getMovieDataWWM($movie['movie_id']);\n\t\t\t\t\t\t$movie_data->set($movie_data_new,86400);\n\t\t\t\t\t}\n\t\t\t\t\t$movie_data = $movie_data->get();\n\t\t\t\t\t\n\t\t\t\t\t// add to movie data array\n\t\t\t\t\t$movie_data_arr[$movie['movie_id']] = $movie_data;\n\n\t\t\t\t\t// generate selectable date hash\n\t\t\t\t\t// check for show within assigned RTS showtimes\n\t\t\t\t\tforeach($rtsListing['ShowSchedule']['Films']['Film'] as $film){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check cinema source film code vs stored RTS cinema source film code\n\t\t\t\t\t\tif($film['CSCode'] == $movie['movie_id']){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// check for single or multiple shows\n\t\t\t\t\t\t\t$shows = array();\n\t\t\t\t\t\t\tif(empty($film['Shows']['Show']['DT'])){\n\t\t\t\t\t\t\t\t$shows = $film['Shows']['Show'];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$shows[0] = $film['Shows']['Show'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t// add date/time values to selectable date hash\n\t\t\t\t\t\t\tforeach($shows as $curShow){\n\t\t\t\t\t\t\t\t// check for ticket internet availability\n\t\t\t\t\t\t\t\t$tickets = array();\n\t\t\t\t\t\t\t\tif(empty($curShow['TIs']['TI']['C'])){\n\t\t\t\t\t\t\t\t\t$tickets = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$tickets[0] = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tforeach($tickets as $TI){\n\t\t\t\t\t\t\t\t\t$ticket = $this->ticketLookup($rtsListing, $TI['C']);\n\t\t\t\t\t\t\t\t\t// store current showtimes\n\t\t\t\t\t\t\t\t\t// convert date/time\n\t\t\t\t\t\t\t\t\t$showDate = substr($curShow['DT'], 0, 8);\n\t\t\t\t\t\t\t\t\tif(!empty($ticket) && empty($ticket['HideOnInternet'])){\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tforeach($movie['showtimes'] as $curShowTime){\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$curShowTime['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$curShowTime['@attributes']['date']] = strtotime($curShowTime['@attributes']['date']);\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\t\n\t\t\t\t\t\t\t\t\t// store upcoming showtimes\n\t\t\t\t\t\t\t\t\t} elseif (count($tickets) == 1 && !empty($ticket) && $ticket['HideOnInternet'] == 1 && $ticket['Name'] == 'rSupersvr') {\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$soon_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t}\n\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\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\t//print_r($movie_data);\n\t\t\t\t\t\n\t\t\t\t\t// walk through movie data and save images to media library where needed\n\t\t\t\t\tif($movie_data['photos']['photo'] || $movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// download image save to cache then delete\n\t\t\t\t\t\t$myFile = ereg_replace(\"[^A-Za-z0-9-]\", \"_\", trim($movie_data['name'])).'.jpg';\n\t\t\t\t\t\t$myFile = preg_replace('/[_]+/', '_', $myFile);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check for existing poster file\n\t\t\t\t\t\t$db = Loader::db();\n\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\tif (!$det) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// pull remote file\n\t\t\t\t\t\t\tif(count($movie_data['hiphotos']['photo']) > 1){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'];\n\t\t\t\t\t\t\t} elseif(count($movie_data['photos']['photo']) > 0) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['photos']['photo']) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$new_image = $this->get_data($imgLnk);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$myFileLocation = DIR_FILES_UPLOADED_STANDARD.'/cache/'.$myFile;\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation)){\n\t\t\t\t\t\t\t\t$fh = fopen($myFileLocation, 'w');\n\t\t\t\t\t\t\t\t$stringData = $new_image;\n\t\t\t\t\t\t\t\tfwrite($fh, $stringData);\n\t\t\t\t\t\t\t\tfclose($fh);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation) || filesize($myFileLocation) > 0){\n\t\t\t\t\t\t\t\t$error = \\Concrete\\Core\\File\\Importer::E_PHP_FILE_ERROR_DEFAULT;\n\t\t\t\t\t\t\t\t$fi = new \\Concrete\\Core\\File\\Importer();\n\t\t\t\t\t\t\t\t$newFile = $fi->import($myFileLocation,$myFile);\n\t\t\t\t\t\t\t\tif(!is_object($newFile)) {\n\t\t\t\t\t\t\t\t\t$this->set('errorMessage', \\Concrete\\Core\\File\\Importer::getErrorMessage($error)); \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// delete cached file\n\t\t\t\t\t\t\t\tunlink($myFileLocation);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//echo $myFileLocation;\n//\t\t\t\t\t\t\techo $myFile;\n//\t\t\t\t\t\t\tprint_r($movie_data);\n//\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// update poster art to use local relative path\n\t\t\t\t\t\t$movie_data_arr[$movie['movie_id']]['photos']['photo'] = $path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$path = 'null';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// store queried show dates\n\t\t\t$movieFeed = $expensiveCache->getItem('movieFeed');\n\t\t\t// store in cache if not found\n\t\t\tif ($movieFeed->isMiss()) {\n\t\t\t\t$movieFeed->lock();\n\t\t\t\t$movie_feed_new = $updated_listing;\n\t\t\t\t$movieFeed->set($movie_feed_new,7200);\n\t\t\t}\n\t\t\t$movieFeed = $movieFeed->get();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t// convert to JSON\n\t\t\tasort($sel_dates_arr);\n\t\t\t$sel_dates_arr = json_encode($sel_dates_arr);\n\t\t\tasort($soon_dates_arr);\n\t\t\t$soon_dates_arr = json_encode($soon_dates_arr);\n\t\t\t$updated_listing = json_encode($updated_listing);\n\t\t\t$rtsListing = json_encode($rtsListing);\n\t\t\t$movie_data_arr = json_encode($movie_data_arr);\n\t\t\t\n\t\t\t$final_listing = 'var dateOpts = ' . $sel_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var soonDateOpts = ' . $soon_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var listingData = ' . $updated_listing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var rtsListingData = ' . $rtsListing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var movieData = ' . $movie_data_arr . ';';\n\t\t\t\n\t\t\t// save as static file\n\t\t\ttouch($listCacheFle);\n\t\t\t$fh = fopen($listCacheFle, 'w');\n\t\t\tfwrite($fh, $final_listing);\n\t\t\tfclose($fh);\n\n\t\t}\n\t\t\n\t\t// add json variables to footer\n\t\t$this->addFooterItem($html->javascript(DIR_REL.'/application/files/listingcache.js'));\n\t\t\n\t\t// transfer usable variables\n\t\t//$this->set('jsAPI', $updated_listing);\n\t}", "function getListResults ( $ListID, $use_cache = TRUE )\n\t{\n\n\t\t$is_cached = false;\n\t\tif ( $use_cache ) {\n\t\t\t$wishlist = get_option( $this->db_options_name_cached_wishlist );\n\n\t\t\tif ( is_array( $wishlist ) ) {\n\t\t\t\tif ( isset( $wishlist[$ListID] ) ) {\n\t\t\t\t\t//$wishlist = unserialize( $cached_wishlist );\n\t\t\t\t\tif ( (time() - $wishlist[$ListID]['time']) < 60 * 60 * 23 ) {\n\t\t\t\t\t\t$is_cached = true;\n\t\t\t\t\t\t$list = $wishlist[$ListID]['list'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( ! $is_cached ) {\n\t\t\t$list = $this->handleRESTcall( $this->getRestListLookupParams( $ListID ) );\n\n\t\t\tif ( 1 == $list['Lists']['List']['TotalItems'] ) {\n\t\t\t\t$list['Lists']['List']['ListItem'] = array ('0' => $list['Lists']['List']['ListItem'] ); // If one item in the list we need to make it a multi array\n\t\t\t} else {\n\t\t\t\tif ( $list['Lists']['List']['TotalPages'] > 1 ) { // If the list contains over 10 items we need to process the other pages.\n\t\t\t\t\t$page = 2;\n\t\t\t\t\twhile ( $page <= $list['Lists']['List']['TotalPages'] ) {\n\t\t\t\t\t\t$result = $this->handleRESTcall( $this->getRestListLookupParams( $ListID, null, $page ) );\n\t\t\t\t\t\tforeach ( $result['Lists']['List']['ListItem'] as $key => $value ) {\n\t\t\t\t\t\t\t$newkey = 10 * ($page - 1) + $key;\n\t\t\t\t\t\t\t$list['Lists']['List']['ListItem'][$newkey] = $value; //Add the items from the remaining pages to the lists.\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$page ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! (isset( $list['Lists']['Request']['Errors'] ) || isset( $list['Error'] )) ) {\n\t\t\t\t$wishlist[$ListID]['time'] = time();\n\t\t\t\t$wishlist[$ListID]['list'] = $list;\n\t\t\t\tupdate_option( $this->db_options_name_cached_wishlist, $wishlist );\n\t\t\t}\n\t\t}\n\n\t\treturn ($list);\n\t}", "function _ajax_fetch_custom_list_callback() {\n\n\t$wp_list_table = new TT_Example_List_Table();\n\t$wp_list_table->ajax_response();\n}", "public function listings($method='GET')\n\t{\n \n $data_tmp['listing_uri'] = config_item('listing_uri');\n if(empty($data_tmp['listing_uri']))$data_tmp['listing_uri'] = 'property'; \n \n $this->load->model('language_m');\n $this->load->model('estate_m');\n $this->load->model('option_m');\n \n $this->data['message'] = lang_check('Something is wrong with request');\n $this->data['token_available'] = FALSE;\n $POST = $this->input->get_post(NULL, TRUE);\n \n if(isset($POST['lang_code']))\n {\n $lang_id = $this->language_m->get_id($POST['lang_code']);\n }\n \n if(empty($lang_id))$lang_id=$this->language_m->get_default_id();\n $lang_code = $this->language_m->get_code($lang_id);\n \n $token = $this->token_m->get_token($POST);\n if(is_object($token))\n $this->data['token_available'] = TRUE;\n \n if(is_object($token))\n {\n if($method == 'GET')\n {\n $options = $this->option_m->get_field_list($this->language_m->get_default_id());\n $this->db->join('property_user', 'property_user.property_id = property.id', 'right');\n $this->db->where('user_id', $token->user_id);\n $estates = $this->estate_m->get_by(array('language_id'=>$lang_id));\n \n // Set website details\n $json_data = array();\n // Add listings to rss feed \n foreach($estates as $key=>$row){\n $estate_date = array();\n $title = $this->estate_m->get_field_from_listing($row, 10);\n $url = site_url($data_tmp['listing_uri'].'/'.$row->id.'/'.$lang_code.'/'.url_title_cro($title));\n \n $row->json_object = json_decode($row->json_object);\n $row->image_repository = json_decode($row->image_repository);\n $estate_date['url'] = $url;\n $estate_date['listing'] = $row;\n \n $json_data[] = $estate_date;\n }\n \n $this->data['results'] = $json_data;\n \n $this->data['message'] = lang_check('Results available');\n }\n elseif($method == 'DELETE' && isset($POST['property_id']))\n {\n $this->load->library('session');\n $property_id = $POST['property_id'];\n \n $this->data['success'] = false;\n // Check if property_id already saved, stop and write message\n if($this->estate_m->check_user_permission($property_id, $token->user_id)>0)\n {\n $this->estate_m->delete($property_id);\n \n $this->data['message'] = lang_check('Listing removed!');\n $this->data['success'] = true;\n }\n // Save favorites to database\n else\n {\n $this->data['message'] = lang_check('Listing doesnt exists!');\n $this->data['success'] = true;\n }\n }\n }\n\n echo json_encode($this->data);\n exit();\n\t}", "protected function _executeGetList() {\n // Init\n $list = array();\n\n $pid = (int)$this->_postVar['pid'];\n $offset = (int)$this->_postVar['start'];\n $limit = (int)$this->_postVar['limit'];\n $itemsPerPage = (int)$this->_postVar['pagingSize'];\n $depth = (int)$this->_postVar['depth'];\n $sysLanguage = (int)$this->_postVar['sysLanguage'];\n $listType = (string)$this->_postVar['listType'];\n\n // Store last selected language\n $GLOBALS['BE_USER']->setAndSaveSessionData('TQSeo.sysLanguage', $sysLanguage);\n\n if (!empty($pid)) {\n $page = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord('pages', $pid);\n\n $fieldList = array();\n\n switch ($listType) {\n case 'metadata':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'keywords',\n 'description',\n 'abstract',\n 'author',\n 'author_email',\n 'lastupdated',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n\n unset($row);\n foreach ($list as &$row) {\n if (!empty($row['lastupdated'])) {\n $row['lastupdated'] = date('Y-m-d', $row['lastupdated']);\n } else {\n $row['lastupdated'] = '';\n }\n }\n unset($row);\n break;\n\n case 'geo':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_geo_lat',\n 'tx_tqseo_geo_long',\n 'tx_tqseo_geo_place',\n 'tx_tqseo_geo_region'\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'searchengines':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_canonicalurl',\n 'tx_tqseo_is_exclude',\n 'tx_tqseo_priority',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'url':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'title',\n 'url_scheme',\n 'alias',\n 'tx_realurl_pathsegment',\n 'tx_realurl_pathoverride',\n 'tx_realurl_exclude',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitle':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_pagetitle',\n 'tx_tqseo_pagetitle_rel',\n 'tx_tqseo_pagetitle_prefix',\n 'tx_tqseo_pagetitle_suffix',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitlesim':\n $buildTree = FALSE;\n $list = $this->_listPageTitleSim($page, $depth, $sysLanguage);\n break;\n\n default:\n // Not defined\n return;\n break;\n }\n }\n\n $ret = array(\n 'results' => count($list),\n 'rows' => array_values($list),\n );\n\n return $ret;\n }", "function displayCreateListing() {\r\n displayModifyListing(\"processListing.php\", \"createListing\", \"\", \"\", \"\",\"\",\"\", \"\");\r\n}", "public function getArtists($status);", "function getMainActions(){\n $step = $this->getStep($this->listing->user_id);\n $data=[];\n\n /**\n * Hide buttons when listing is not on steps\n */\n if(isset($step) && $step->date_end != '0000-00-00 00:00:00')\n {\n /**\n * APPROVE AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_ACTIVE)\n {\n $data[]=[\n /** Approve and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_approve_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-approve action-btn',\n ];\n }\n /**\n * REJECT AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->featured == \\Orm\\Model\\Listings\\Listings::NOT_FEATURED){\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_DELETED)\n {\n $data[]=[\n /** REJECT and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_reject_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-reject action-btn',\n ];\n }\n }\n return $data;\n }\n }", "public function listing() {\r\n $options = get_option( 'myhome_redux' );\r\n $show_advanced = is_null( $options['mh-listing-show_advanced'] ) ? true : intval( $options['mh-listing-show_advanced'] );\r\n $show_clear = is_null( $options['mh-listing-show_clear'] ) ? true : intval( $options['mh-listing-show_clear'] );\r\n $show_sort_by = is_null( $options['mh-listing-show_sort_by'] ) ? true : intval( $options['mh-listing-show_sort_by'] );\r\n $show_view_types = is_null( $options['mh-listing-show_view_types'] ) ? true : intval( $options['mh-listing-show_view_types'] );\r\n $advanced_number = is_null( $options['mh-listing-search_form_advanced_number'] ) ? 3 : intval( $options['mh-listing-search_form_advanced_number'] );\r\n // settings from Listing options page\r\n $atts = array(\r\n 'lazy_loading' => $options['mh-listing-lazy_loading'] ? 'true' : 'false',\r\n 'lazy_loading_limit' => intval( $options['mh-listing-load_more_button_number'] ),\r\n 'load_more_button' => $options['mh-listing-load_more_button_label'],\r\n 'load_prev_button' => $options['mh-listing-load_prev_button_label'],\r\n 'listing_default_view' => $options['mh-listing-default_view'],\r\n 'estates_per_page' => $options['mh-listing-estates_limit'],\r\n 'search_form_position' => $options['mh-listing-search_form_position'],\r\n 'label' => $options['mh-listing-label'],\r\n 'search_form_advanced_number' => $advanced_number,\r\n 'show_advanced' => $show_advanced ? 'true' : 'false',\r\n 'show_clear' => $show_clear ? 'true' : 'false',\r\n 'show_sort_by' => $show_sort_by ? 'true' : 'false',\r\n 'show_view_types' => $show_view_types ? 'true' : 'false',\r\n 'agent_id' => $this->id, // get estates only from this agent\r\n 'map' => false\r\n );\r\n\r\n // prepare attributes\r\n foreach ( My_Home_Attribute::get_attributes() as $attr ) {\r\n $value = $options['mh-listing-' . $attr->get_slug() . '_show'];\r\n $atts[$attr->get_slug() . '_show'] = $value ? 'true' : 'false';\r\n }\r\n\r\n // initiate listing\r\n $listing = new My_Home_Listing( $atts );\r\n ?>\r\n <div class=\"mh-listing--full-width mh-listing--horizontal-boxed\">\r\n <?php $listing->listing(); ?>\r\n </div>\r\n <?php\r\n }", "public function getList()\n {\n }", "public function purchase_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/purchase_return/list';\n $data['purchase_returns'] = $this->MPurchase_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "function get_results($args)\n {\n }", "function get_results($args)\n {\n }", "function alat_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\r\n\t\t$result=$this->m_alat->alat_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "function booksList($offset, $total_records_per_page, $order, $ascdesc)\n{\n $booksManager = new ListManager();\n\n\n\n if (isset($_GET['search']) && $_GET['search']!='') {\n $search = input(addcslashes($_GET['search'], '_'));\n $search=\"%\".$search.\"%\";\n $books = $booksManager->get_search($offset, $total_records_per_page, $order, $ascdesc, $search);\n } elseif (isset($_GET['cat']) && $_GET['cat']!='') {\n $cat = input($_GET['cat']);\n $books = $booksManager-> get_cat($offset, $total_records_per_page, $order, $ascdesc, $cat);\n } else {\n $books = $booksManager->selectAll($offset, $total_records_per_page, $order, $ascdesc); // Appel la fonction qui renvoie toutes les données sur les livres en bdd\n }\n // require('view/listView.php');\n return $books;\n echo selectAll();\n}", "public function index() {\n $output = $this->verifyProvidedInput(['keywords' => 'Keywords are required to perform a search']);\n\n if (empty($output)) {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n if (!empty($this->request->advancedSearch) && $this->request->advancedSearch) {\n $sortBy = (isset($this->request->sortBy) ? $this->request->sortBy : 'rawListPrice');\n $reverseSort = (isset($this->request->reverseSort) ? boolval($this->request->reverseSort) : false);\n $data = $this->getRETS->getListing()\n ->setSortBy($sortBy)\n ->setReverseSort($reverseSort)\n ->search($preparedKeywords, \n $this->request->extra, \n $this->request->maxPrice, \n $this->request->minPrice, \n $this->request->beds, \n $this->request->baths, \n $this->request->includeResidential, \n $this->request->includeLand, \n $this->request->includeCommercial);\n \n $this->addThumbnails($data);\n $output = $this->respondData($data);\n } else {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n $data = $this->getRETS->getListing()->searchByKeyword($preparedKeywords);\n $this->addThumbnails($data);\n $output = $this->respondData($data);\n }\n }\n\n return $output;\n }", "public function get_json_results() {\n }", "public function index()\n {\n //qui ritorno l'elenco delle liste\n //return TodoList::paginate(20);\n $lists = TodoList::paginate(20);\n return $this->getResult($lists->toArray());\n }", "public function index()\n {\n $data= Pizza::get()->toArray();\n if($data)\n {\n return $this->response(true,'rows successfully listed',$data);\n }\n return $this->response(false,'no rows found',[]);\n }", "function list(){\n $res = $res = $this->client->request('GET',$this->path,[]);\n $this->checkResponse($res,array(200));\n return $res;\n }", "public function action() {\n $this->curPos ++;\n usleep(250000);\n// # advanced finish if you need it for some reason:\n// if($this->curPos>40) return 'We have finished right now!';\n return array('lastItem'=>$this->curPos, 'itemCount'=>$this->count);\n }", "abstract public function getResults(): mixed;" ]
[ "0.69911814", "0.69135123", "0.6191085", "0.61634105", "0.6106261", "0.6106261", "0.60919493", "0.6079555", "0.60730743", "0.60586506", "0.6057292", "0.5979495", "0.59759116", "0.5966504", "0.5867618", "0.58074546", "0.5806632", "0.58025557", "0.5796107", "0.5766682", "0.57637703", "0.57054", "0.5705112", "0.56637645", "0.56479096", "0.5631926", "0.5583362", "0.5580018", "0.5580018", "0.5580018", "0.55795205", "0.5572956", "0.5563976", "0.5549063", "0.5546685", "0.55426294", "0.55390215", "0.552659", "0.55246454", "0.5522747", "0.5511233", "0.548951", "0.5487353", "0.54846007", "0.54828846", "0.54735667", "0.54718083", "0.5470762", "0.5467904", "0.5464692", "0.5455951", "0.545373", "0.54340076", "0.5425628", "0.5422889", "0.5420882", "0.5418302", "0.54169947", "0.5415513", "0.54146254", "0.5407161", "0.5389055", "0.5387423", "0.53825194", "0.5381398", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5375336", "0.536375", "0.53622645", "0.53530973", "0.53520507", "0.5348448", "0.5329882", "0.53291476", "0.53288126", "0.53225636", "0.5321964", "0.53211683", "0.5318913", "0.5318913", "0.53172415", "0.53120136", "0.52992517", "0.5295117", "0.52885616", "0.5285489", "0.5285226", "0.52809364", "0.52773446" ]
0.0
-1
get returns after a listing has been made
public function get_item_title_details($dom, $sku, $item_id){ //push each entry into new array $update_item_array = array(); $update_item_response = $dom->getElementsByTagName(DOM_ELEMENT_REVISE_ITEM_RESPONSE); foreach ($update_item_response as $item){ //ad sku to first entry of array array_push($update_item_array, $sku); array_push($update_item_array, $item_id); //errors $error_messages = $item->getElementsByTagName(DOM_ELEMENT_ERRORS); foreach ($error_messages as $errormsg){ $error = trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) != "" ? trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) : "No Error"; array_push($update_item_array, $error); } } return $update_item_array; //DOM_ELEMENT_SHORT_ERROR_MSG }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listing();", "function listing() {\r\n\r\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}", "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}", "function getItems();", "function getItems();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n\n $header = array(\"优惠券编号\", \"优惠券金额\", \"所属终端便利店账号\", \"终端便利店\", \"状态\", \"赠送时间\", \"使用时间\");\n $cols = 7;\n\n $contentList = $this->coupon_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有优惠券.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "public function listing() {\n $this->response->setData(1);\r\n $this->response->setHeader('__OK', Http::Response(Http::OK));\r\n return TRUE;\r\n }", "public function listAction() {\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $photo_id = (int) $this->_getParam('photo_id');\n\n // CHECK AUTHENTICATION\n // CHECK AUTHENTICATION\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $sitereview = $subject = Engine_Api::_()->core()->getSubject('sitereview_listing');\n } else if (Engine_Api::_()->core()->hasSubject('sitereview_photo')) {\n $photo = $subject = Engine_Api::_()->core()->getSubject('sitereview_photo');\n $listing_id = $photo->listing_id;\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n }\n $bodyResponse = $tempResponse = array();\n $listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, \"edit_listtype_$sitereview->listingtype_id\");\n $listingtype_id = $this->_listingType->listingtype_id;\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $photoCount = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id)->photo_count;\n $paginator = $sitereview->getSingletonAlbum()->getCollectiblesPaginator();\n\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo = $allowed_upload_photo;\n if (empty($photoCount))\n $allowed_upload_photo = $allowed_upload_photo;\n elseif ($photoCount <= $paginator->getTotalItemCount())\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = $allowed_upload_photo;\n\n //GET ALBUM\n $album = $sitereview->getSingletonAlbum();\n\n\n /* RETURN THE LIST OF IMAGES, IF FOLLOWED THE FOLLOWING CASES: \n * - IF THERE ARE GET METHOD AVAILABLE.\n * - iF THERE ARE NO $_FILES AVAILABLE.\n */\n if (empty($_FILES) && $this->getRequest()->isGet()) {\n $requestLimit = $this->getRequestParam(\"limit\", 10);\n $page = $requestPage = $this->getRequestParam(\"page\", 1);\n\n //GET PAGINATOR\n $album = $sitereview->getSingletonAlbum();\n $paginator = $album->getCollectiblesPaginator();\n\n $bodyResponse[' totalPhotoCount'] = $totalItemCount = $bodyResponse['totalItemCount'] = $paginator->getTotalItemCount();\n $paginator->setItemCountPerPage($requestLimit);\n $paginator->setCurrentPageNumber($requestPage);\n // Check the Page Number for pass photo_id.\n if (!empty($photo_id)) {\n for ($page = 1; $page <= ceil($totalItemCount / $requestLimit); $page++) {\n $paginator->setCurrentPageNumber($page);\n $tmpGetPhotoIds = array();\n foreach ($paginator as $photo) {\n $tmpGetPhotoIds[] = $photo->photo_id;\n }\n if (in_array($photo_id, $tmpGetPhotoIds)) {\n $bodyResponse['page'] = $page;\n break;\n }\n }\n }\n\n if ($totalItemCount > 0) {\n foreach ($paginator as $photo) {\n $tempImages = $photo->toArray();\n\n // Add images\n $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo);\n $tempImages = array_merge($tempImages, $getContentImages);\n\n $tempImages['user_title'] = $photo->getOwner()->getTitle();\n $tempImages['likes_count'] = $photo->likes()->getLikeCount();\n $tempImages['is_like'] = ($photo->likes()->isLike($viewer)) ? 1 : 0;\n \n //Sitereaction Plugin work start here\n if (Engine_Api::_()->getApi('Siteapi_Feed', 'advancedactivity')->isSitereactionPluginLive()) {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitereaction') && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereaction.reaction.active', 1)) {\n $popularity = Engine_Api::_()->getApi('core', 'sitereaction')->getLikesReactionPopularity($photo);\n $feedReactionIcons = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getLikesReactionIcons($popularity, 1);\n $tempImages['reactions']['feed_reactions'] =$tempImages['feed_reactions'] = $feedReactionIcons;\n\n if (isset($viewer_id) && !empty($viewer_id)) {\n $myReaction = $photo->likes()->getLike($viewer);\n if (isset($myReaction) && !empty($myReaction) && isset($myReaction->reaction) && !empty($myReaction->reaction)) {\n $myReactionIcon = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getIcons($myReaction->reaction, 1);\n $tempImages['reactions']['my_feed_reaction'] =$tempImages['my_feed_reaction'] = $myReactionIcon;\n }\n }\n }\n }\n //Sitereaction Plugin work end here\n if (!empty($viewer) && ($tempMenu = $this->getRequestParam('menu', 1)) && !empty($tempMenu)) {\n $menu = array();\n\n if ($photo->user_id == $viewer_id) {\n $menu[] = array(\n 'label' => $this->translate('Edit'),\n 'name' => 'edit',\n 'url' => 'listings/photo/edit/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Delete'),\n 'name' => 'delete',\n 'url' => 'listings/photo/delete/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n }\n $menu[] = array(\n 'label' => $this->translate('Share'),\n 'name' => 'share',\n 'url' => 'activity/index/share',\n 'urlParams' => array(\n \"type\" => $photo->getType(),\n \"id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Report'),\n 'name' => 'report',\n 'url' => 'report/create/subject/' . $photo->getGuid()\n );\n\n $menu[] = array(\n 'label' => $this->translate('Make Profile Photo'),\n 'name' => 'make_profile_photo',\n 'url' => 'members/edit/external-photo',\n 'urlParams' => array(\n \"photo\" => $photo->getGuid()\n )\n );\n\n $tempImages['menu'] = $menu;\n }\n\n if (isset($tempImages) && !empty($tempImages))\n $bodyResponse['images'][] = $tempImages;\n }\n }\n $bodyResponse['canUpload'] = $allowed_upload_photo;\n $this->respondWithSuccess($bodyResponse, true);\n } else if (isset($_FILES) && $this->getRequest()->isPost()) { // UPLOAD IMAGES TO RESPECTIVE EVENT\n if (empty($viewer_id) || empty($allowed_upload_photo))\n $this->respondWithError('unauthorized');\n $tablePhoto = Engine_Api::_()->getDbtable('photos', 'sitereview');\n $db = $tablePhoto->getAdapter();\n $db->beginTransaction();\n\n try {\n $viewer = Engine_Api::_()->user()->getViewer();\n $album = $sitereview->getSingletonAlbum();\n $rows = $tablePhoto->fetchRow($tablePhoto->select()->from($tablePhoto->info('name'), 'order')->order('order DESC')->limit(1));\n $order = 0;\n if (!empty($rows)) {\n $order = $rows->order + 1;\n }\n $params = array(\n 'collection_id' => $album->getIdentity(),\n 'album_id' => $album->getIdentity(),\n 'listing_id' => $sitereview->getIdentity(),\n 'user_id' => $viewer->getIdentity(),\n 'order' => $order\n );\n $photoCount = count($_FILES);\n if (isset($_FILES['photo']) && $photoCount == 1) {\n $photo_id = Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $_FILES['photo'])->photo_id;\n if (!$sitereview->photo_id) {\n $sitereview->photo_id = $photo_id;\n $sitereview->save();\n }\n } else if (!empty($_FILES) && $photoCount > 1) {\n foreach ($_FILES as $photo) {\n Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $photo);\n }\n }\n\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n }\n }\n }", "public function get_results()\n {\n }", "public function get_results()\n {\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['kind'] = 1;\n $searchData['login_user'] = $this->login_id;\n\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"账号\", \"姓名\", \"角色\", \"新增时间\", \"操作\");\n $cols = 6;\n\n $contentList = $this->user_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有数据.\" : '';\n break;\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "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}", "function item( $args )\n {\n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n\t\t$limit = 10;\n\t\t$offer_page = 0;\n \n // add a test if this listing has already been accepted\n if( $result[0]['status'] ==\n GarageSale\\BaseDatabase::STATUS_ACCEPTED \n ){\n \n // get offer result\n $offers_result = $offer_model->limit(1)->get_accepted( \n (int) $result[0]['id']\n );\n \n // set accepted flag to true\n $accepted = true;\n \n } else {\n \n \n // limit to 10 displayed at a time\n $limit = 10;\n \n // default offer_page to 0\n $offer_page = 0;\n \n // set up offers page\n if( isset( $_GET['offerpage'] ) && \n is_numeric($_GET['offerpage']) \n ){\n \n // set offer_page to the user provided value\n $offer_page = ((int) $_GET['offerpage'] ) - 1;\n }\n \n $offers_result = $offer_model->limit($limit)->\n page($offer_page)->\n get_item_any_offer( (int) $result[0]['id'] );\n }\n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t // load comment form\n\t $comment_form = $this->view->\n\t form('comment','listings/postcomment/'.$postid);\n\t $this->view->add('comment_form',$comment_form);\n\t \n\t \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Images 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}", "public function getResults()\n {\n }", "protected abstract function fetchLists();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['provider_id'] =$this->user_model->getProviderId($this->global['login_id']);\n\n // get top list data in homepage\n switch ($id) {\n case 1:\n if($this->isTicketter() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"配送员\", \"提交时间\", \"操作\");\n $cols = 10;\n }else if($this->isAdmin() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"所属区域总代理\", \"提交时间\", \"操作\");\n $cols = 10;\n }\n\n $contentList = $this->order_model->getItems($searchData);\n// foreach ($contentList as $item){\n// // get activity information\n// $activity = $this->activity_model->getItemById($item->activity_ids);\n// $activity->products = $this->activity_model->getProductsFromIds($activity->product_id, $activity->provider_id);\n//\n// $orderinfo = array(\n// 'id' => $item->id,\n// 'product_info' => json_encode($activity->products)\n// );\n// $this->order_model->update($orderinfo, $item->id);\n// }\n\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有订单.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function get_result($item)\n {\n }", "public function fetchList();", "public function getResults();", "public function getResults(/* ... */)\n {\n return $this->_return;\n }", "function _syndicated_content_listings_page()\n{\n}", "static private function retrieveList() {\n\t\ttry {\n\t\t\t\n\t\t\tif (!isset($_SESSION['starCollection'])) {\n\t\t\t\tthrow new Exception('No list found in memory');\n\t\t\t} else {\n\t\t\t\treturn $_SESSION['starCollection'];\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $ex) {\n\t\t\tthrow $ex;\n\t\t}\n\t}", "public function what_ever_you_want()\n {\n $sql = \"Make a custom sql query for grabbing your data\";\n return static::custom_list($sql);\n }", "public function getListing(){\n $BusInfo = $this->BusinessOwnerModel->getBusinessID();\n \n foreach($BusInfo as $row1){\n $busID = $row1->bid;\n }\n \n $query = $this->db->get_where('BusinessListing', array('bid' => $busID));\n \n if($query->num_rows() > 0){\n foreach($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n return false;\n }", "public function lister()\r\n {\r\n }", "public function list();", "public function list();", "public function list();", "function print_results() {\r\n if ($list = $this->print_list()) {\r\n echo '<p>' . $this->print_count() . '</p>';\r\n echo $list;\r\n echo '<p class=\"more\">' . $this->print_more() . '</p>';\r\n }\r\n else {\r\n echo $this->zero_results;\r\n }\r\n }", "public abstract function getResults();", "public abstract function get_lists();", "function wp_ajax_fetch_list()\n {\n }", "public function index()\n {\n return auth()->user()\n ->wishlist()\n ->with('files')\n ->latest()\n ->paginate(request('per_page', config('fleetcart_api.per_page', 10)));\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n // get top10 datas\n // id: 1-top1, 2-top2, 3-top3, 4-top4, 5-top5\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"轮播图片\", \"类型\", \"单品活动/餐装活动/区域总代理\", \"排序\", \"新增日期\", \"操作\",);\n $cols = 7;\n $contentList = $this->carousel_model->getItems();\n $footer = (count($contentList) == 0||$contentList=='') ? $footer = \"没有轮播图项目.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function getShares();", "public static function add_to_comparison() {\n header( 'HTTP/1.0 200 OK' );\n header( 'Content-Type: application/json' );\n\n if ( ! empty( $_GET['id'] ) ) {\n $compare = Inventor_Visitor::get_data('compare');\n $compare = ! is_array( $compare ) || empty( $compare ) ? array() : $compare;\n\n $post = get_post( $_GET['id'] );\n $post_type = get_post_type( $post->ID );\n\n if ( ! in_array( $post_type, Inventor_Post_Types::get_listing_post_types() ) ) {\n $data = array(\n 'success' => false,\n 'message' => __( 'This is not listing ID.', 'inventor-compare' ),\n );\n } else {\n $found = false;\n\n foreach ( $compare as $listing_id ) {\n if ( $listing_id == $_GET['id']) {\n $found = true;\n break;\n }\n }\n\n if ( ! $found ) {\n $max_compare = 5;\n\n if ( count( $compare ) >= $max_compare ) {\n $data = array(\n 'success' => false,\n 'message' => sprintf( __( 'You can compare at most %d listings', 'inventor-compare' ), $max_compare )\n );\n } else {\n $compare[] = $post->ID;\n $count = count( $compare );\n\n $timeout_in_seconds = apply_filters( 'inventor_compare_timeout', 60*60 );\n Inventor_Visitor::save_data( 'compare', $compare, time() + $timeout_in_seconds );\n\n $data = array(\n 'success' => true,\n 'count' => $count,\n 'text' => sprintf( _n( 'Compare %d item', 'Compare %d items', $count, 'inventor-compare' ), $count )\n );\n }\n\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing is already in list', 'inventor-compare' ),\n );\n }\n }\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing ID is missing.', 'inventor-compare' ),\n );\n }\n\n echo json_encode( $data );\n exit();\n }", "function sold( $args )\n {\n \n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_sold_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n \n \n \n \n\t\t// limit to 10 displayed at a time\n\t\t$limit = 10;\n\t\t\n\t\t// default offer_page to 0\n\t\t$offer_page = 0;\n\t\t\n\t\t// set up offers page\n\t\tif( isset( $_GET['offerpage'] ) && \n\t\t\tis_numeric($_GET['offerpage']) \n\t\t){\n\t\t\t\n\t\t\t// set offer_page to the user provided value\n\t\t\t$offer_page = ((int) $_GET['offerpage'] ) - 1;\n\t\t}\n\t\t\n\t\t$offers_result = $offer_model->limit($limit)->\n\t\t\tpage($offer_page)->\n\t\t\tget_item_any_offer( (int) $result[0]['id'] );\n \n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "function publishResults()\n{\n\n //return\n\n}", "function waiting_list_list(){\r\n\t\t$jenis_rawat = isset($_POST['jenis_rawat']) ? $_POST['jenis_rawat'] : \"\";\r\n\t\t$tgl_app = isset($_POST['wl_tgl_app']) ? $_POST['wl_tgl_app'] : \"\";\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$karyawan_id = isset($_POST['karyawan_id']) ? $_POST['karyawan_id'] : \"\";\r\n\t\t$result=$this->m_waiting_list->waiting_list_list($query,$start,$end,$tgl_app,$jenis_rawat,$karyawan_id);\r\n\t\techo $result;\r\n\t}", "public function doListingsSearch()\r\n\t{\r\n\t\t$searchUrl = $this->dispatchNow(new GenerateSearchUrl(Input::all()));\r\n\r\n\t\treturn redirect()->route('browselistings.index', $searchUrl);\r\n\t}", "public function handel()\n {\n $this->run($this->listKey);\n }", "function wck_refresh_list( $meta = '', $id = '' ){\r\n\t\tif( isset( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\t\r\n\t\tif( isset( $_POST['id'] ) )\r\n\t\t\t$id = absint($_POST['id']);\t\t\r\n\r\n\t\tob_start();\t\t\t\r\n\t\t\techo self::wck_output_meta_content($meta, $id, $this->args['meta_array']);\r\n\t\t\tdo_action( \"wck_refresh_list_{$meta}\", $id );\r\n\t\t$entry_list = ob_get_clean();\r\n\t\t\r\n\t\tif( strpos( current_filter(), 'wp_ajax_wck_refresh_list') === 0 ){\r\n\t\t\techo $entry_list;\t\t\t\r\n\t\t\texit;\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn $entry_list;\r\n\t\t}\r\n\t}", "function getLista(){\n\n }", "function listContent()\n {\n }", "public function run() {\n\t\t$this->db->fetchAll('pundits');\n\t\t$this->response = array(\n\t\t\t'status' => 'success',\n\t\t\t'command'=> 'list',\n\t\t\t'data' => $this->db->get_last_result()\n\t\t);\n\t}", "public function listAction()\n {\n // some logic\n }", "public function listItems()\n {\n return null;\n }", "public function itemreturndetails(){\n\t$sel='ir_id,ir_itemid,ir_mtid,ir_name,ir_qty,ir_desc,ir_staffpfno,ir_staffname,ir_dept,ir_receivername,ir_creatordate';\n\t$whorder='ir_mtid asc,ir_itemid asc';\n\t$data['result'] = $this->picomodel->get_orderlistspficemore('items_return',$sel,'',$whorder);\n $this->logger->write_logmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n\t$this->logger->write_dblogmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n $this->load->view('itemaction/displayreturnitem',$data);\n }", "public function getItems()\n {\n }", "public function listAction() {}", "public function getItemsList(){\n return $this->_get(4);\n }", "public function lst()\n\t{\n\t\t$list = AdminModel::paginate(3);\n\t\t$this->assign('list',$list);\n\t\treturn $this->fetch();\n\t}", "public function returnWebmounts() {}", "public function onRefreshList()\n {\n $this->prepareComponent();\n\n return $this->refreshList();\n }", "public function getEntriesList(){\n return $this->_get(2);\n }", "abstract public function getList();", "public function sales_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/sales_return/list';\n $data['sales_returns'] = $this->MSales_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "public function browseAction() {\n $this->validateRequestMethod();\n // Prepare the response\n $params = $response = array();\n $params = $this->_getAllParams();\n Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n\n //GET PAGINATOR\n $params['pagination'] = 1;\n $paginator = Engine_Api::_()->getDbtable('wishlists', 'sitereview')->getBrowseWishlists($params);\n $page = $this->_getParam('page', 1);\n $limit = $this->_getParam('limit', 20);\n $paginator->setItemCountPerPage($limit);\n $paginator->setCurrentPageNumber($page);\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $totalItemCount = $paginator->getTotalItemCount();\n $totalPages = ceil(($totalItemCount) / $limit);\n $response['totalItemCount'] = $totalItemCount;\n if (!empty($totalItemCount)) {\n foreach ($paginator as $wishlistObj) {\n $wishlist = $wishlistObj->toArray();\n if (isset($wishlist['body']) && !empty($wishlist['body']))\n $wishlist['body'] = strip_tags($wishlist['body']);\n $lists = $wishlistObj->getWishlistMap(array('orderby' => 'listing_id'));\n $count = $lists->getTotalItemCount();\n $tempListings = array();\n $counter = 0;\n if (_ANDROID_VERSION >= '1.8.6' || _IOS_VERSION >= '1.8.0') {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n } else {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n }\n $wishlist = array_merge($wishlist, $tempListings);\n $check_availability = Engine_Api::_()->sitereview()->check_availability('sitereview_wishlist', $wishlistObj->wishlist_id);\n $checkFollowAvailablity = $wishlistObj->follows()->isFollow($viewer);\n $tempMenu = array();\n if (!empty($viewer_id)) {\n if (empty($check_availability)) {\n $wishlist['isLike'] = 0;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Like'),\n 'url' => '/like',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n } else {\n $wishlist['isLike'] = 1;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Unlike'),\n 'url' => '/unlike',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n }\n\n if (!empty($checkFollowAvailablity)) {\n $wishlist['followed'] = 1;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Unfollow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n } else {\n $wishlist['followed'] = 0;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Follow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n }\n\n $wishlist['gutterMenu'] = $tempMenu;\n }\n $tempResponse[] = $wishlist;\n }\n }\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $level_id = Engine_Api::_()->getDbtable('levels', 'authorization')->fetchRow(array('type = ?' => \"public\"))->level_id;\n }\n $can_create = ($viewer_id) ? 1 : 0;\n $response['canCreate'] = $can_create;\n if (!empty($tempResponse))\n $response['response'] = $tempResponse;\n $this->respondWithSuccess($response, true);\n }", "function my_list()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['list'] = $this->_bid->my_list();\n\t\t\n\t\t$this->load->view('bids/my_list', $data);\n\t}", "public function getItems(){\n\t\treturn $this->_makeCall('items?');\n\t}", "function listitems($name)\r\n\t\t{\r\n\t\t \t\r\n\t\t}", "function warkslibsGetCurrentLoans() {\n\trequire_once('simple_html_dom.php');\n\t// get barcode and PIN - just guessing how this works here (from warkslibs.php) - need to find out how to do this properly!\n\t$warkslibs_options = get_option('warkslibs_settings_values');\n\t$warkslibs_user_barcode = $warkslibs_options['warkslibs_user_barcode'];\n\t$warkslibs_user_pin = $warkslibs_options['warkslibs_user_pin'];\n\t$warkslibs_url = \"http://library.warwickshire.gov.uk/vs/Pa.csp?OpacLanguage=eng&Profile=Default\";\n\t$login = getLogin($warkslibs_url,$warkslibs_user_barcode,$warkslibs_user_pin);\n\t$currentLoans = getCurrent($login);\n\t\n\t$html = str_get_html($currentLoans);\n\n\tforeach($html->find('td.listitemOdd',0)->parent()->parent()->find('tr') as $list) {\n\t\t$libItem['title'] = $list->find('td', 1)->plaintext;\n\t\t$libItem['barcode'] = $list->find('td', 2)->plaintext;\n\t\t$libItem['dateBorrowed'] = $list->find('td', 4)->plaintext;\n\t\t$libItem['dateDue']\t= $list->find('td', 5)->plaintext;\n\t\t$libItem['timesRenewed']\t= $list->find('td', 6)->plaintext;\n\t\t$libItem['charge']\t\t= $list->find('td', 7)->plaintext;\n\t\tif ($libItem['title'] === \"Title\") {\n\t\t\tcontinue;\n\t\t}\n\t\t$libItems[] = $libItem;\n\t}\n\n\tforeach($libItems as $libItem) {\n\t\t$title_search = urlencode($libItem['title']);\n\t\tif (strlen($title_search) > 255) {\n\t\t\t$title_search = substr($title_search,0,255); \n\t\t}\n\t\t$xml = searchAquaB($title_search);\n\t\t$doc = new DOMDocument();\n\t\t$doc->loadXML($xml);\n\t\t$xpath = new DOMXPath($doc);\n\t\t$records = $doc->getElementsByTagName(\"record\");\n\t\tforeach($records as $record) {\n\t\t\t$title = aquaBTitle($record,$xpath);\n\t\t\t$titlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$title));\n\t\t\t$searchtitlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$libItem['title']));\n\t\t\tif (strcmp($titlekey,$searchtitlekey) != 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$libItem['title'] = $title;\n\t\t\t$libItem['isbn'] = aquaBISBN($record,$xpath);\n\t\t\t$libItem['auth'] = aquaBAuth($record,$xpath);\n\t\t\t$libItem['image'] = aquaBImage($record,$xpath);\n\t\t\t// ID retrieval not work at the moment\n\t\t\t// Why not?\n\t\t\t$libItem['id'] = aquaBID($record,$xpath);\n\t\t\t//Need to output dates etc. as well if want to preserve these?\n\t\t\t\n\t\t\t$libItems1[] = $libItem;\n\t\t}\n\t}\n\t// At this point we have an array of arrays listing all of the current loans\n\t// Non-unique titles have been expanded into multiple records\n\t// The user can (in theory) choose the ones they actually have (or just the ones they want to blog)\n\t// Then press 'blog these' (or similar) and create multiple blog posts (in draft)\n\t// So at this point want to output stuff to the screen with all information included in form\n\t// Then grab this all back when form submitted?\n\t// Alternative is to just submit the relevant URLs of the form\n\t// http://librarycatalogue.warwickshire.gov.uk/abwarwick/fullrecordinnerframe.ashx?hreciid=|library/vubissmart-marc|494187&output=xml\n\t// And do a further retrieve to get the information needed - but this increases network traffic for no gain?\n\t// See http://www.sitepoint.com/forums/php-34/$_post-ing-checkbox-values-corresponding-form-values-182722.html for how to do this\n\t\n\t// So - try outputting items\n\techo '<form method=\"post\" action=\"\"><input name=\"blogem\" value=\"yes\" id=\"blogem\" type=\"hidden\">';\n\techo '<ul>';\n\t$no_libItems = count($libItems1);\n\tfor($i=0; $i<$no_libItems; $i++){\n\t\techo '<li>';\n\t\techo '<h3>'.$libItems1[$i]['title'].'</h3>';\n\t\t// display cover image\n\t\techo \"<img src=\".$libItems1[$i]['image'].\" alt='Coverimage of \".$libItems1[$i]['title'].\"'>\\n\"; // need to check if it exists, otherwise?\n\t\t// print the item title\n\t\t// Do any of these need encoding? URL?\n\t\techo '<input name=\"libitem['.$i.'][choose]\" value=\"1\" id=\"choose\" type=\"checkbox\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][title]\" value=\"'.$libItems1[$i]['title'].'\" id=\"title\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][isbn]\" value=\"'.$libItems1[$i]['isbn'].'\" id=\"isbn\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][auth]\" value=\"'.$libItems1[$i]['auth'].'\" id=\"auth\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][image]\" value=\"'.$libItems1[$i]['image'].'\" id=\"image\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][id]\" value=\"'.$libItems1[$i]['id'].'\" id=\"id\" type=\"hidden\">'; // is 'id' required?\n\t\techo '</li>';\n }\n\techo '<input type=\"submit\" name=\"itemstoblog\" value=\"Blog these...\" /></form><br />';\n echo '</ul>';\n\t\n/* This is where the Amazon Enhancement could go\n// Some idea of the code might be:\n$no_libItems = count($libItems1);\nfor($i=0; $i<$no_libItems; $i++){\n\t// Do Amazon lookup and enhance item (via function)\n}\n*/\n\n}", "public function getResults(){\n $this->results;\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();", "public function api_entry_list() {\n $data = $this->Mdl_Users->get_list(\n $_POST['rp'],\n $_POST['page'],\n $_POST['query'],\n $_POST['qtype'],\n $_POST['sortname'],\n $_POST['sortorder']);\n\n echo json_encode(array(\n 'page'=>$_POST['page'],\n 'total'=>$this->Mdl_Users->get_length(),\n 'rows'=>$data,\n ));\n }", "private function buildListing(){\n\t\t// link any necessary javascript files\n\t\t$html = Loader::helper('html');\n\t\t$f = Loader::helper('concrete/file');\n\t\t$expensiveCache = \\Core::make('cache/expensive');\n\n\t\t// listing cache file\n\t\t$listCacheFle = DIR_FILES_UPLOADED_STANDARD.'/listingcache.js';\n\t\t\n\t\t// init vars\t\t\n\t\t$movie_data_arr = array();\n\t\t$sel_dates_arr = array();\n\t\t$soon_dates_arr = array();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&movie_id=211358'));\n\t\t\t\t\t\t\t\n\t\t// retrieve cached values\n\t\t$updated_listing = $expensiveCache->getItem('movieFeed');\n\t\t//$updated_listing->clear();\n\t\t$listCheck = $updated_listing;\n\t\t$updated_listing = $updated_listing->get();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&search=AL13222'));\n\t\t\n\t\t// reload listing if cache is found to be empty\n\t\tif($listCheck->isMiss()){\n\n\t\t\t// gather theater movie listing\n\t\t\t$rtsListing = json_decode(json_encode((array) simplexml_load_string($this->getRTSData('ShowTimeXml'))), 1);\n\t\t\t$listing = $this->getWWMListingData();\n\t\t\t//$rtsListing = $this->getRTSListing();\n\t\t\t\n\t\t\t// 11-29-2013 force reload if listing data if blank\n\t//\t\tif(empty($listing)){\n//\t\t\t\t$this->buildListing();\n//\t\t\t}\n\t\t\t\n\t\t\t// convert to PHP array\n\t\t\t$listing = json_decode(json_encode((array) simplexml_load_string($listing)), 1);\n\n\t\t\t// store movie data\n\t\t\t$movie_listing = $listing['house']['schedule']['movie'];\n\t\t\t$updated_listing = $movie_listing;\n\n\t\t\t// walk through all movies per location\n\t\t\tforeach($movie_listing as $movie){\n\t\t\t\t\n\t\t\t\t// check for movie tickets film code\n\t\t\t\tif(!empty($movie['movie_id'])){\n\t\t\t\t\t// gather movie data\n\t\t\t\t\t$movie_data = $expensiveCache->getItem('movieData'.$movie['movie_id']);\n\t\t\t\t\t// store in cache if not found\n\t\t\t\t\tif ($movie_data->isMiss()) {\n\t\t\t\t\t\t$movie_data->lock();\n\t\t\t\t\t\t$movie_data_new = $this->getMovieDataWWM($movie['movie_id']);\n\t\t\t\t\t\t$movie_data->set($movie_data_new,86400);\n\t\t\t\t\t}\n\t\t\t\t\t$movie_data = $movie_data->get();\n\t\t\t\t\t\n\t\t\t\t\t// add to movie data array\n\t\t\t\t\t$movie_data_arr[$movie['movie_id']] = $movie_data;\n\n\t\t\t\t\t// generate selectable date hash\n\t\t\t\t\t// check for show within assigned RTS showtimes\n\t\t\t\t\tforeach($rtsListing['ShowSchedule']['Films']['Film'] as $film){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check cinema source film code vs stored RTS cinema source film code\n\t\t\t\t\t\tif($film['CSCode'] == $movie['movie_id']){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// check for single or multiple shows\n\t\t\t\t\t\t\t$shows = array();\n\t\t\t\t\t\t\tif(empty($film['Shows']['Show']['DT'])){\n\t\t\t\t\t\t\t\t$shows = $film['Shows']['Show'];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$shows[0] = $film['Shows']['Show'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t// add date/time values to selectable date hash\n\t\t\t\t\t\t\tforeach($shows as $curShow){\n\t\t\t\t\t\t\t\t// check for ticket internet availability\n\t\t\t\t\t\t\t\t$tickets = array();\n\t\t\t\t\t\t\t\tif(empty($curShow['TIs']['TI']['C'])){\n\t\t\t\t\t\t\t\t\t$tickets = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$tickets[0] = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tforeach($tickets as $TI){\n\t\t\t\t\t\t\t\t\t$ticket = $this->ticketLookup($rtsListing, $TI['C']);\n\t\t\t\t\t\t\t\t\t// store current showtimes\n\t\t\t\t\t\t\t\t\t// convert date/time\n\t\t\t\t\t\t\t\t\t$showDate = substr($curShow['DT'], 0, 8);\n\t\t\t\t\t\t\t\t\tif(!empty($ticket) && empty($ticket['HideOnInternet'])){\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tforeach($movie['showtimes'] as $curShowTime){\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$curShowTime['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$curShowTime['@attributes']['date']] = strtotime($curShowTime['@attributes']['date']);\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\t\n\t\t\t\t\t\t\t\t\t// store upcoming showtimes\n\t\t\t\t\t\t\t\t\t} elseif (count($tickets) == 1 && !empty($ticket) && $ticket['HideOnInternet'] == 1 && $ticket['Name'] == 'rSupersvr') {\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$soon_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t}\n\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\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\t//print_r($movie_data);\n\t\t\t\t\t\n\t\t\t\t\t// walk through movie data and save images to media library where needed\n\t\t\t\t\tif($movie_data['photos']['photo'] || $movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// download image save to cache then delete\n\t\t\t\t\t\t$myFile = ereg_replace(\"[^A-Za-z0-9-]\", \"_\", trim($movie_data['name'])).'.jpg';\n\t\t\t\t\t\t$myFile = preg_replace('/[_]+/', '_', $myFile);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check for existing poster file\n\t\t\t\t\t\t$db = Loader::db();\n\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\tif (!$det) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// pull remote file\n\t\t\t\t\t\t\tif(count($movie_data['hiphotos']['photo']) > 1){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'];\n\t\t\t\t\t\t\t} elseif(count($movie_data['photos']['photo']) > 0) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['photos']['photo']) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$new_image = $this->get_data($imgLnk);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$myFileLocation = DIR_FILES_UPLOADED_STANDARD.'/cache/'.$myFile;\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation)){\n\t\t\t\t\t\t\t\t$fh = fopen($myFileLocation, 'w');\n\t\t\t\t\t\t\t\t$stringData = $new_image;\n\t\t\t\t\t\t\t\tfwrite($fh, $stringData);\n\t\t\t\t\t\t\t\tfclose($fh);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation) || filesize($myFileLocation) > 0){\n\t\t\t\t\t\t\t\t$error = \\Concrete\\Core\\File\\Importer::E_PHP_FILE_ERROR_DEFAULT;\n\t\t\t\t\t\t\t\t$fi = new \\Concrete\\Core\\File\\Importer();\n\t\t\t\t\t\t\t\t$newFile = $fi->import($myFileLocation,$myFile);\n\t\t\t\t\t\t\t\tif(!is_object($newFile)) {\n\t\t\t\t\t\t\t\t\t$this->set('errorMessage', \\Concrete\\Core\\File\\Importer::getErrorMessage($error)); \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// delete cached file\n\t\t\t\t\t\t\t\tunlink($myFileLocation);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//echo $myFileLocation;\n//\t\t\t\t\t\t\techo $myFile;\n//\t\t\t\t\t\t\tprint_r($movie_data);\n//\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// update poster art to use local relative path\n\t\t\t\t\t\t$movie_data_arr[$movie['movie_id']]['photos']['photo'] = $path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$path = 'null';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// store queried show dates\n\t\t\t$movieFeed = $expensiveCache->getItem('movieFeed');\n\t\t\t// store in cache if not found\n\t\t\tif ($movieFeed->isMiss()) {\n\t\t\t\t$movieFeed->lock();\n\t\t\t\t$movie_feed_new = $updated_listing;\n\t\t\t\t$movieFeed->set($movie_feed_new,7200);\n\t\t\t}\n\t\t\t$movieFeed = $movieFeed->get();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t// convert to JSON\n\t\t\tasort($sel_dates_arr);\n\t\t\t$sel_dates_arr = json_encode($sel_dates_arr);\n\t\t\tasort($soon_dates_arr);\n\t\t\t$soon_dates_arr = json_encode($soon_dates_arr);\n\t\t\t$updated_listing = json_encode($updated_listing);\n\t\t\t$rtsListing = json_encode($rtsListing);\n\t\t\t$movie_data_arr = json_encode($movie_data_arr);\n\t\t\t\n\t\t\t$final_listing = 'var dateOpts = ' . $sel_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var soonDateOpts = ' . $soon_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var listingData = ' . $updated_listing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var rtsListingData = ' . $rtsListing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var movieData = ' . $movie_data_arr . ';';\n\t\t\t\n\t\t\t// save as static file\n\t\t\ttouch($listCacheFle);\n\t\t\t$fh = fopen($listCacheFle, 'w');\n\t\t\tfwrite($fh, $final_listing);\n\t\t\tfclose($fh);\n\n\t\t}\n\t\t\n\t\t// add json variables to footer\n\t\t$this->addFooterItem($html->javascript(DIR_REL.'/application/files/listingcache.js'));\n\t\t\n\t\t// transfer usable variables\n\t\t//$this->set('jsAPI', $updated_listing);\n\t}", "function getListResults ( $ListID, $use_cache = TRUE )\n\t{\n\n\t\t$is_cached = false;\n\t\tif ( $use_cache ) {\n\t\t\t$wishlist = get_option( $this->db_options_name_cached_wishlist );\n\n\t\t\tif ( is_array( $wishlist ) ) {\n\t\t\t\tif ( isset( $wishlist[$ListID] ) ) {\n\t\t\t\t\t//$wishlist = unserialize( $cached_wishlist );\n\t\t\t\t\tif ( (time() - $wishlist[$ListID]['time']) < 60 * 60 * 23 ) {\n\t\t\t\t\t\t$is_cached = true;\n\t\t\t\t\t\t$list = $wishlist[$ListID]['list'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( ! $is_cached ) {\n\t\t\t$list = $this->handleRESTcall( $this->getRestListLookupParams( $ListID ) );\n\n\t\t\tif ( 1 == $list['Lists']['List']['TotalItems'] ) {\n\t\t\t\t$list['Lists']['List']['ListItem'] = array ('0' => $list['Lists']['List']['ListItem'] ); // If one item in the list we need to make it a multi array\n\t\t\t} else {\n\t\t\t\tif ( $list['Lists']['List']['TotalPages'] > 1 ) { // If the list contains over 10 items we need to process the other pages.\n\t\t\t\t\t$page = 2;\n\t\t\t\t\twhile ( $page <= $list['Lists']['List']['TotalPages'] ) {\n\t\t\t\t\t\t$result = $this->handleRESTcall( $this->getRestListLookupParams( $ListID, null, $page ) );\n\t\t\t\t\t\tforeach ( $result['Lists']['List']['ListItem'] as $key => $value ) {\n\t\t\t\t\t\t\t$newkey = 10 * ($page - 1) + $key;\n\t\t\t\t\t\t\t$list['Lists']['List']['ListItem'][$newkey] = $value; //Add the items from the remaining pages to the lists.\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$page ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! (isset( $list['Lists']['Request']['Errors'] ) || isset( $list['Error'] )) ) {\n\t\t\t\t$wishlist[$ListID]['time'] = time();\n\t\t\t\t$wishlist[$ListID]['list'] = $list;\n\t\t\t\tupdate_option( $this->db_options_name_cached_wishlist, $wishlist );\n\t\t\t}\n\t\t}\n\n\t\treturn ($list);\n\t}", "function _ajax_fetch_custom_list_callback() {\n\n\t$wp_list_table = new TT_Example_List_Table();\n\t$wp_list_table->ajax_response();\n}", "public function listings($method='GET')\n\t{\n \n $data_tmp['listing_uri'] = config_item('listing_uri');\n if(empty($data_tmp['listing_uri']))$data_tmp['listing_uri'] = 'property'; \n \n $this->load->model('language_m');\n $this->load->model('estate_m');\n $this->load->model('option_m');\n \n $this->data['message'] = lang_check('Something is wrong with request');\n $this->data['token_available'] = FALSE;\n $POST = $this->input->get_post(NULL, TRUE);\n \n if(isset($POST['lang_code']))\n {\n $lang_id = $this->language_m->get_id($POST['lang_code']);\n }\n \n if(empty($lang_id))$lang_id=$this->language_m->get_default_id();\n $lang_code = $this->language_m->get_code($lang_id);\n \n $token = $this->token_m->get_token($POST);\n if(is_object($token))\n $this->data['token_available'] = TRUE;\n \n if(is_object($token))\n {\n if($method == 'GET')\n {\n $options = $this->option_m->get_field_list($this->language_m->get_default_id());\n $this->db->join('property_user', 'property_user.property_id = property.id', 'right');\n $this->db->where('user_id', $token->user_id);\n $estates = $this->estate_m->get_by(array('language_id'=>$lang_id));\n \n // Set website details\n $json_data = array();\n // Add listings to rss feed \n foreach($estates as $key=>$row){\n $estate_date = array();\n $title = $this->estate_m->get_field_from_listing($row, 10);\n $url = site_url($data_tmp['listing_uri'].'/'.$row->id.'/'.$lang_code.'/'.url_title_cro($title));\n \n $row->json_object = json_decode($row->json_object);\n $row->image_repository = json_decode($row->image_repository);\n $estate_date['url'] = $url;\n $estate_date['listing'] = $row;\n \n $json_data[] = $estate_date;\n }\n \n $this->data['results'] = $json_data;\n \n $this->data['message'] = lang_check('Results available');\n }\n elseif($method == 'DELETE' && isset($POST['property_id']))\n {\n $this->load->library('session');\n $property_id = $POST['property_id'];\n \n $this->data['success'] = false;\n // Check if property_id already saved, stop and write message\n if($this->estate_m->check_user_permission($property_id, $token->user_id)>0)\n {\n $this->estate_m->delete($property_id);\n \n $this->data['message'] = lang_check('Listing removed!');\n $this->data['success'] = true;\n }\n // Save favorites to database\n else\n {\n $this->data['message'] = lang_check('Listing doesnt exists!');\n $this->data['success'] = true;\n }\n }\n }\n\n echo json_encode($this->data);\n exit();\n\t}", "protected function _executeGetList() {\n // Init\n $list = array();\n\n $pid = (int)$this->_postVar['pid'];\n $offset = (int)$this->_postVar['start'];\n $limit = (int)$this->_postVar['limit'];\n $itemsPerPage = (int)$this->_postVar['pagingSize'];\n $depth = (int)$this->_postVar['depth'];\n $sysLanguage = (int)$this->_postVar['sysLanguage'];\n $listType = (string)$this->_postVar['listType'];\n\n // Store last selected language\n $GLOBALS['BE_USER']->setAndSaveSessionData('TQSeo.sysLanguage', $sysLanguage);\n\n if (!empty($pid)) {\n $page = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord('pages', $pid);\n\n $fieldList = array();\n\n switch ($listType) {\n case 'metadata':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'keywords',\n 'description',\n 'abstract',\n 'author',\n 'author_email',\n 'lastupdated',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n\n unset($row);\n foreach ($list as &$row) {\n if (!empty($row['lastupdated'])) {\n $row['lastupdated'] = date('Y-m-d', $row['lastupdated']);\n } else {\n $row['lastupdated'] = '';\n }\n }\n unset($row);\n break;\n\n case 'geo':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_geo_lat',\n 'tx_tqseo_geo_long',\n 'tx_tqseo_geo_place',\n 'tx_tqseo_geo_region'\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'searchengines':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_canonicalurl',\n 'tx_tqseo_is_exclude',\n 'tx_tqseo_priority',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'url':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'title',\n 'url_scheme',\n 'alias',\n 'tx_realurl_pathsegment',\n 'tx_realurl_pathoverride',\n 'tx_realurl_exclude',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitle':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_pagetitle',\n 'tx_tqseo_pagetitle_rel',\n 'tx_tqseo_pagetitle_prefix',\n 'tx_tqseo_pagetitle_suffix',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitlesim':\n $buildTree = FALSE;\n $list = $this->_listPageTitleSim($page, $depth, $sysLanguage);\n break;\n\n default:\n // Not defined\n return;\n break;\n }\n }\n\n $ret = array(\n 'results' => count($list),\n 'rows' => array_values($list),\n );\n\n return $ret;\n }", "function displayCreateListing() {\r\n displayModifyListing(\"processListing.php\", \"createListing\", \"\", \"\", \"\",\"\",\"\", \"\");\r\n}", "public function getArtists($status);", "function getMainActions(){\n $step = $this->getStep($this->listing->user_id);\n $data=[];\n\n /**\n * Hide buttons when listing is not on steps\n */\n if(isset($step) && $step->date_end != '0000-00-00 00:00:00')\n {\n /**\n * APPROVE AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_ACTIVE)\n {\n $data[]=[\n /** Approve and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_approve_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-approve action-btn',\n ];\n }\n /**\n * REJECT AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->featured == \\Orm\\Model\\Listings\\Listings::NOT_FEATURED){\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_DELETED)\n {\n $data[]=[\n /** REJECT and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_reject_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-reject action-btn',\n ];\n }\n }\n return $data;\n }\n }", "public function listing() {\r\n $options = get_option( 'myhome_redux' );\r\n $show_advanced = is_null( $options['mh-listing-show_advanced'] ) ? true : intval( $options['mh-listing-show_advanced'] );\r\n $show_clear = is_null( $options['mh-listing-show_clear'] ) ? true : intval( $options['mh-listing-show_clear'] );\r\n $show_sort_by = is_null( $options['mh-listing-show_sort_by'] ) ? true : intval( $options['mh-listing-show_sort_by'] );\r\n $show_view_types = is_null( $options['mh-listing-show_view_types'] ) ? true : intval( $options['mh-listing-show_view_types'] );\r\n $advanced_number = is_null( $options['mh-listing-search_form_advanced_number'] ) ? 3 : intval( $options['mh-listing-search_form_advanced_number'] );\r\n // settings from Listing options page\r\n $atts = array(\r\n 'lazy_loading' => $options['mh-listing-lazy_loading'] ? 'true' : 'false',\r\n 'lazy_loading_limit' => intval( $options['mh-listing-load_more_button_number'] ),\r\n 'load_more_button' => $options['mh-listing-load_more_button_label'],\r\n 'load_prev_button' => $options['mh-listing-load_prev_button_label'],\r\n 'listing_default_view' => $options['mh-listing-default_view'],\r\n 'estates_per_page' => $options['mh-listing-estates_limit'],\r\n 'search_form_position' => $options['mh-listing-search_form_position'],\r\n 'label' => $options['mh-listing-label'],\r\n 'search_form_advanced_number' => $advanced_number,\r\n 'show_advanced' => $show_advanced ? 'true' : 'false',\r\n 'show_clear' => $show_clear ? 'true' : 'false',\r\n 'show_sort_by' => $show_sort_by ? 'true' : 'false',\r\n 'show_view_types' => $show_view_types ? 'true' : 'false',\r\n 'agent_id' => $this->id, // get estates only from this agent\r\n 'map' => false\r\n );\r\n\r\n // prepare attributes\r\n foreach ( My_Home_Attribute::get_attributes() as $attr ) {\r\n $value = $options['mh-listing-' . $attr->get_slug() . '_show'];\r\n $atts[$attr->get_slug() . '_show'] = $value ? 'true' : 'false';\r\n }\r\n\r\n // initiate listing\r\n $listing = new My_Home_Listing( $atts );\r\n ?>\r\n <div class=\"mh-listing--full-width mh-listing--horizontal-boxed\">\r\n <?php $listing->listing(); ?>\r\n </div>\r\n <?php\r\n }", "public function getList()\n {\n }", "public function purchase_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/purchase_return/list';\n $data['purchase_returns'] = $this->MPurchase_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "function get_results($args)\n {\n }", "function get_results($args)\n {\n }", "function alat_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\r\n\t\t$result=$this->m_alat->alat_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "function booksList($offset, $total_records_per_page, $order, $ascdesc)\n{\n $booksManager = new ListManager();\n\n\n\n if (isset($_GET['search']) && $_GET['search']!='') {\n $search = input(addcslashes($_GET['search'], '_'));\n $search=\"%\".$search.\"%\";\n $books = $booksManager->get_search($offset, $total_records_per_page, $order, $ascdesc, $search);\n } elseif (isset($_GET['cat']) && $_GET['cat']!='') {\n $cat = input($_GET['cat']);\n $books = $booksManager-> get_cat($offset, $total_records_per_page, $order, $ascdesc, $cat);\n } else {\n $books = $booksManager->selectAll($offset, $total_records_per_page, $order, $ascdesc); // Appel la fonction qui renvoie toutes les données sur les livres en bdd\n }\n // require('view/listView.php');\n return $books;\n echo selectAll();\n}", "public function index() {\n $output = $this->verifyProvidedInput(['keywords' => 'Keywords are required to perform a search']);\n\n if (empty($output)) {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n if (!empty($this->request->advancedSearch) && $this->request->advancedSearch) {\n $sortBy = (isset($this->request->sortBy) ? $this->request->sortBy : 'rawListPrice');\n $reverseSort = (isset($this->request->reverseSort) ? boolval($this->request->reverseSort) : false);\n $data = $this->getRETS->getListing()\n ->setSortBy($sortBy)\n ->setReverseSort($reverseSort)\n ->search($preparedKeywords, \n $this->request->extra, \n $this->request->maxPrice, \n $this->request->minPrice, \n $this->request->beds, \n $this->request->baths, \n $this->request->includeResidential, \n $this->request->includeLand, \n $this->request->includeCommercial);\n \n $this->addThumbnails($data);\n $output = $this->respondData($data);\n } else {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n $data = $this->getRETS->getListing()->searchByKeyword($preparedKeywords);\n $this->addThumbnails($data);\n $output = $this->respondData($data);\n }\n }\n\n return $output;\n }", "public function get_json_results() {\n }", "public function index()\n {\n //qui ritorno l'elenco delle liste\n //return TodoList::paginate(20);\n $lists = TodoList::paginate(20);\n return $this->getResult($lists->toArray());\n }", "public function index()\n {\n $data= Pizza::get()->toArray();\n if($data)\n {\n return $this->response(true,'rows successfully listed',$data);\n }\n return $this->response(false,'no rows found',[]);\n }", "function list(){\n $res = $res = $this->client->request('GET',$this->path,[]);\n $this->checkResponse($res,array(200));\n return $res;\n }", "public function action() {\n $this->curPos ++;\n usleep(250000);\n// # advanced finish if you need it for some reason:\n// if($this->curPos>40) return 'We have finished right now!';\n return array('lastItem'=>$this->curPos, 'itemCount'=>$this->count);\n }", "abstract public function getResults(): mixed;" ]
[ "0.69911814", "0.69135123", "0.6191085", "0.61634105", "0.6106261", "0.6106261", "0.60919493", "0.6079555", "0.60730743", "0.60586506", "0.6057292", "0.5979495", "0.59759116", "0.5966504", "0.5867618", "0.58074546", "0.5806632", "0.58025557", "0.5796107", "0.5766682", "0.57637703", "0.57054", "0.5705112", "0.56637645", "0.56479096", "0.5631926", "0.5583362", "0.5580018", "0.5580018", "0.5580018", "0.55795205", "0.5572956", "0.5563976", "0.5549063", "0.5546685", "0.55426294", "0.55390215", "0.552659", "0.55246454", "0.5522747", "0.5511233", "0.548951", "0.5487353", "0.54846007", "0.54828846", "0.54735667", "0.54718083", "0.5470762", "0.5467904", "0.5464692", "0.5455951", "0.545373", "0.54340076", "0.5425628", "0.5422889", "0.5420882", "0.5418302", "0.54169947", "0.5415513", "0.54146254", "0.5407161", "0.5389055", "0.5387423", "0.53825194", "0.5381398", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5375336", "0.536375", "0.53622645", "0.53530973", "0.53520507", "0.5348448", "0.5329882", "0.53291476", "0.53288126", "0.53225636", "0.5321964", "0.53211683", "0.5318913", "0.5318913", "0.53172415", "0.53120136", "0.52992517", "0.5295117", "0.52885616", "0.5285489", "0.5285226", "0.52809364", "0.52773446" ]
0.0
-1
get returns after a listing has been made
public function get_item_remove_details($dom, $sku, $item_id){ //push each entry into new array $update_item_array = array(); $update_item_response = $dom->getElementsByTagName(DOM_ELEMENT_END_ITEM_RESPONSE); foreach ($update_item_response as $item){ //ad sku to first entry of array array_push($update_item_array, $sku); array_push($update_item_array, $item_id); //errors $error_messages = $item->getElementsByTagName(DOM_ELEMENT_ERRORS); foreach ($error_messages as $errormsg){ $error = trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) != "" ? trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) : "No Error"; array_push($update_item_array, $error); } } return $update_item_array; //DOM_ELEMENT_SHORT_ERROR_MSG }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listing();", "function listing() {\r\n\r\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}", "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}", "function getItems();", "function getItems();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n\n $header = array(\"优惠券编号\", \"优惠券金额\", \"所属终端便利店账号\", \"终端便利店\", \"状态\", \"赠送时间\", \"使用时间\");\n $cols = 7;\n\n $contentList = $this->coupon_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有优惠券.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "public function listing() {\n $this->response->setData(1);\r\n $this->response->setHeader('__OK', Http::Response(Http::OK));\r\n return TRUE;\r\n }", "public function listAction() {\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $photo_id = (int) $this->_getParam('photo_id');\n\n // CHECK AUTHENTICATION\n // CHECK AUTHENTICATION\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $sitereview = $subject = Engine_Api::_()->core()->getSubject('sitereview_listing');\n } else if (Engine_Api::_()->core()->hasSubject('sitereview_photo')) {\n $photo = $subject = Engine_Api::_()->core()->getSubject('sitereview_photo');\n $listing_id = $photo->listing_id;\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n }\n $bodyResponse = $tempResponse = array();\n $listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, \"edit_listtype_$sitereview->listingtype_id\");\n $listingtype_id = $this->_listingType->listingtype_id;\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $photoCount = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id)->photo_count;\n $paginator = $sitereview->getSingletonAlbum()->getCollectiblesPaginator();\n\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo = $allowed_upload_photo;\n if (empty($photoCount))\n $allowed_upload_photo = $allowed_upload_photo;\n elseif ($photoCount <= $paginator->getTotalItemCount())\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = $allowed_upload_photo;\n\n //GET ALBUM\n $album = $sitereview->getSingletonAlbum();\n\n\n /* RETURN THE LIST OF IMAGES, IF FOLLOWED THE FOLLOWING CASES: \n * - IF THERE ARE GET METHOD AVAILABLE.\n * - iF THERE ARE NO $_FILES AVAILABLE.\n */\n if (empty($_FILES) && $this->getRequest()->isGet()) {\n $requestLimit = $this->getRequestParam(\"limit\", 10);\n $page = $requestPage = $this->getRequestParam(\"page\", 1);\n\n //GET PAGINATOR\n $album = $sitereview->getSingletonAlbum();\n $paginator = $album->getCollectiblesPaginator();\n\n $bodyResponse[' totalPhotoCount'] = $totalItemCount = $bodyResponse['totalItemCount'] = $paginator->getTotalItemCount();\n $paginator->setItemCountPerPage($requestLimit);\n $paginator->setCurrentPageNumber($requestPage);\n // Check the Page Number for pass photo_id.\n if (!empty($photo_id)) {\n for ($page = 1; $page <= ceil($totalItemCount / $requestLimit); $page++) {\n $paginator->setCurrentPageNumber($page);\n $tmpGetPhotoIds = array();\n foreach ($paginator as $photo) {\n $tmpGetPhotoIds[] = $photo->photo_id;\n }\n if (in_array($photo_id, $tmpGetPhotoIds)) {\n $bodyResponse['page'] = $page;\n break;\n }\n }\n }\n\n if ($totalItemCount > 0) {\n foreach ($paginator as $photo) {\n $tempImages = $photo->toArray();\n\n // Add images\n $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo);\n $tempImages = array_merge($tempImages, $getContentImages);\n\n $tempImages['user_title'] = $photo->getOwner()->getTitle();\n $tempImages['likes_count'] = $photo->likes()->getLikeCount();\n $tempImages['is_like'] = ($photo->likes()->isLike($viewer)) ? 1 : 0;\n \n //Sitereaction Plugin work start here\n if (Engine_Api::_()->getApi('Siteapi_Feed', 'advancedactivity')->isSitereactionPluginLive()) {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitereaction') && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereaction.reaction.active', 1)) {\n $popularity = Engine_Api::_()->getApi('core', 'sitereaction')->getLikesReactionPopularity($photo);\n $feedReactionIcons = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getLikesReactionIcons($popularity, 1);\n $tempImages['reactions']['feed_reactions'] =$tempImages['feed_reactions'] = $feedReactionIcons;\n\n if (isset($viewer_id) && !empty($viewer_id)) {\n $myReaction = $photo->likes()->getLike($viewer);\n if (isset($myReaction) && !empty($myReaction) && isset($myReaction->reaction) && !empty($myReaction->reaction)) {\n $myReactionIcon = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getIcons($myReaction->reaction, 1);\n $tempImages['reactions']['my_feed_reaction'] =$tempImages['my_feed_reaction'] = $myReactionIcon;\n }\n }\n }\n }\n //Sitereaction Plugin work end here\n if (!empty($viewer) && ($tempMenu = $this->getRequestParam('menu', 1)) && !empty($tempMenu)) {\n $menu = array();\n\n if ($photo->user_id == $viewer_id) {\n $menu[] = array(\n 'label' => $this->translate('Edit'),\n 'name' => 'edit',\n 'url' => 'listings/photo/edit/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Delete'),\n 'name' => 'delete',\n 'url' => 'listings/photo/delete/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n }\n $menu[] = array(\n 'label' => $this->translate('Share'),\n 'name' => 'share',\n 'url' => 'activity/index/share',\n 'urlParams' => array(\n \"type\" => $photo->getType(),\n \"id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Report'),\n 'name' => 'report',\n 'url' => 'report/create/subject/' . $photo->getGuid()\n );\n\n $menu[] = array(\n 'label' => $this->translate('Make Profile Photo'),\n 'name' => 'make_profile_photo',\n 'url' => 'members/edit/external-photo',\n 'urlParams' => array(\n \"photo\" => $photo->getGuid()\n )\n );\n\n $tempImages['menu'] = $menu;\n }\n\n if (isset($tempImages) && !empty($tempImages))\n $bodyResponse['images'][] = $tempImages;\n }\n }\n $bodyResponse['canUpload'] = $allowed_upload_photo;\n $this->respondWithSuccess($bodyResponse, true);\n } else if (isset($_FILES) && $this->getRequest()->isPost()) { // UPLOAD IMAGES TO RESPECTIVE EVENT\n if (empty($viewer_id) || empty($allowed_upload_photo))\n $this->respondWithError('unauthorized');\n $tablePhoto = Engine_Api::_()->getDbtable('photos', 'sitereview');\n $db = $tablePhoto->getAdapter();\n $db->beginTransaction();\n\n try {\n $viewer = Engine_Api::_()->user()->getViewer();\n $album = $sitereview->getSingletonAlbum();\n $rows = $tablePhoto->fetchRow($tablePhoto->select()->from($tablePhoto->info('name'), 'order')->order('order DESC')->limit(1));\n $order = 0;\n if (!empty($rows)) {\n $order = $rows->order + 1;\n }\n $params = array(\n 'collection_id' => $album->getIdentity(),\n 'album_id' => $album->getIdentity(),\n 'listing_id' => $sitereview->getIdentity(),\n 'user_id' => $viewer->getIdentity(),\n 'order' => $order\n );\n $photoCount = count($_FILES);\n if (isset($_FILES['photo']) && $photoCount == 1) {\n $photo_id = Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $_FILES['photo'])->photo_id;\n if (!$sitereview->photo_id) {\n $sitereview->photo_id = $photo_id;\n $sitereview->save();\n }\n } else if (!empty($_FILES) && $photoCount > 1) {\n foreach ($_FILES as $photo) {\n Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $photo);\n }\n }\n\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n }\n }\n }", "public function get_results()\n {\n }", "public function get_results()\n {\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['kind'] = 1;\n $searchData['login_user'] = $this->login_id;\n\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"账号\", \"姓名\", \"角色\", \"新增时间\", \"操作\");\n $cols = 6;\n\n $contentList = $this->user_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有数据.\" : '';\n break;\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "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}", "function item( $args )\n {\n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n\t\t$limit = 10;\n\t\t$offer_page = 0;\n \n // add a test if this listing has already been accepted\n if( $result[0]['status'] ==\n GarageSale\\BaseDatabase::STATUS_ACCEPTED \n ){\n \n // get offer result\n $offers_result = $offer_model->limit(1)->get_accepted( \n (int) $result[0]['id']\n );\n \n // set accepted flag to true\n $accepted = true;\n \n } else {\n \n \n // limit to 10 displayed at a time\n $limit = 10;\n \n // default offer_page to 0\n $offer_page = 0;\n \n // set up offers page\n if( isset( $_GET['offerpage'] ) && \n is_numeric($_GET['offerpage']) \n ){\n \n // set offer_page to the user provided value\n $offer_page = ((int) $_GET['offerpage'] ) - 1;\n }\n \n $offers_result = $offer_model->limit($limit)->\n page($offer_page)->\n get_item_any_offer( (int) $result[0]['id'] );\n }\n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t // load comment form\n\t $comment_form = $this->view->\n\t form('comment','listings/postcomment/'.$postid);\n\t $this->view->add('comment_form',$comment_form);\n\t \n\t \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Images 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}", "public function getResults()\n {\n }", "protected abstract function fetchLists();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['provider_id'] =$this->user_model->getProviderId($this->global['login_id']);\n\n // get top list data in homepage\n switch ($id) {\n case 1:\n if($this->isTicketter() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"配送员\", \"提交时间\", \"操作\");\n $cols = 10;\n }else if($this->isAdmin() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"所属区域总代理\", \"提交时间\", \"操作\");\n $cols = 10;\n }\n\n $contentList = $this->order_model->getItems($searchData);\n// foreach ($contentList as $item){\n// // get activity information\n// $activity = $this->activity_model->getItemById($item->activity_ids);\n// $activity->products = $this->activity_model->getProductsFromIds($activity->product_id, $activity->provider_id);\n//\n// $orderinfo = array(\n// 'id' => $item->id,\n// 'product_info' => json_encode($activity->products)\n// );\n// $this->order_model->update($orderinfo, $item->id);\n// }\n\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有订单.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function get_result($item)\n {\n }", "public function fetchList();", "public function getResults();", "public function getResults(/* ... */)\n {\n return $this->_return;\n }", "function _syndicated_content_listings_page()\n{\n}", "static private function retrieveList() {\n\t\ttry {\n\t\t\t\n\t\t\tif (!isset($_SESSION['starCollection'])) {\n\t\t\t\tthrow new Exception('No list found in memory');\n\t\t\t} else {\n\t\t\t\treturn $_SESSION['starCollection'];\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $ex) {\n\t\t\tthrow $ex;\n\t\t}\n\t}", "public function what_ever_you_want()\n {\n $sql = \"Make a custom sql query for grabbing your data\";\n return static::custom_list($sql);\n }", "public function getListing(){\n $BusInfo = $this->BusinessOwnerModel->getBusinessID();\n \n foreach($BusInfo as $row1){\n $busID = $row1->bid;\n }\n \n $query = $this->db->get_where('BusinessListing', array('bid' => $busID));\n \n if($query->num_rows() > 0){\n foreach($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n return false;\n }", "public function lister()\r\n {\r\n }", "public function list();", "public function list();", "public function list();", "function print_results() {\r\n if ($list = $this->print_list()) {\r\n echo '<p>' . $this->print_count() . '</p>';\r\n echo $list;\r\n echo '<p class=\"more\">' . $this->print_more() . '</p>';\r\n }\r\n else {\r\n echo $this->zero_results;\r\n }\r\n }", "public abstract function getResults();", "public abstract function get_lists();", "function wp_ajax_fetch_list()\n {\n }", "public function index()\n {\n return auth()->user()\n ->wishlist()\n ->with('files')\n ->latest()\n ->paginate(request('per_page', config('fleetcart_api.per_page', 10)));\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n // get top10 datas\n // id: 1-top1, 2-top2, 3-top3, 4-top4, 5-top5\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"轮播图片\", \"类型\", \"单品活动/餐装活动/区域总代理\", \"排序\", \"新增日期\", \"操作\",);\n $cols = 7;\n $contentList = $this->carousel_model->getItems();\n $footer = (count($contentList) == 0||$contentList=='') ? $footer = \"没有轮播图项目.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function getShares();", "public static function add_to_comparison() {\n header( 'HTTP/1.0 200 OK' );\n header( 'Content-Type: application/json' );\n\n if ( ! empty( $_GET['id'] ) ) {\n $compare = Inventor_Visitor::get_data('compare');\n $compare = ! is_array( $compare ) || empty( $compare ) ? array() : $compare;\n\n $post = get_post( $_GET['id'] );\n $post_type = get_post_type( $post->ID );\n\n if ( ! in_array( $post_type, Inventor_Post_Types::get_listing_post_types() ) ) {\n $data = array(\n 'success' => false,\n 'message' => __( 'This is not listing ID.', 'inventor-compare' ),\n );\n } else {\n $found = false;\n\n foreach ( $compare as $listing_id ) {\n if ( $listing_id == $_GET['id']) {\n $found = true;\n break;\n }\n }\n\n if ( ! $found ) {\n $max_compare = 5;\n\n if ( count( $compare ) >= $max_compare ) {\n $data = array(\n 'success' => false,\n 'message' => sprintf( __( 'You can compare at most %d listings', 'inventor-compare' ), $max_compare )\n );\n } else {\n $compare[] = $post->ID;\n $count = count( $compare );\n\n $timeout_in_seconds = apply_filters( 'inventor_compare_timeout', 60*60 );\n Inventor_Visitor::save_data( 'compare', $compare, time() + $timeout_in_seconds );\n\n $data = array(\n 'success' => true,\n 'count' => $count,\n 'text' => sprintf( _n( 'Compare %d item', 'Compare %d items', $count, 'inventor-compare' ), $count )\n );\n }\n\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing is already in list', 'inventor-compare' ),\n );\n }\n }\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing ID is missing.', 'inventor-compare' ),\n );\n }\n\n echo json_encode( $data );\n exit();\n }", "function sold( $args )\n {\n \n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_sold_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n \n \n \n \n\t\t// limit to 10 displayed at a time\n\t\t$limit = 10;\n\t\t\n\t\t// default offer_page to 0\n\t\t$offer_page = 0;\n\t\t\n\t\t// set up offers page\n\t\tif( isset( $_GET['offerpage'] ) && \n\t\t\tis_numeric($_GET['offerpage']) \n\t\t){\n\t\t\t\n\t\t\t// set offer_page to the user provided value\n\t\t\t$offer_page = ((int) $_GET['offerpage'] ) - 1;\n\t\t}\n\t\t\n\t\t$offers_result = $offer_model->limit($limit)->\n\t\t\tpage($offer_page)->\n\t\t\tget_item_any_offer( (int) $result[0]['id'] );\n \n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "function publishResults()\n{\n\n //return\n\n}", "function waiting_list_list(){\r\n\t\t$jenis_rawat = isset($_POST['jenis_rawat']) ? $_POST['jenis_rawat'] : \"\";\r\n\t\t$tgl_app = isset($_POST['wl_tgl_app']) ? $_POST['wl_tgl_app'] : \"\";\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$karyawan_id = isset($_POST['karyawan_id']) ? $_POST['karyawan_id'] : \"\";\r\n\t\t$result=$this->m_waiting_list->waiting_list_list($query,$start,$end,$tgl_app,$jenis_rawat,$karyawan_id);\r\n\t\techo $result;\r\n\t}", "public function doListingsSearch()\r\n\t{\r\n\t\t$searchUrl = $this->dispatchNow(new GenerateSearchUrl(Input::all()));\r\n\r\n\t\treturn redirect()->route('browselistings.index', $searchUrl);\r\n\t}", "public function handel()\n {\n $this->run($this->listKey);\n }", "function wck_refresh_list( $meta = '', $id = '' ){\r\n\t\tif( isset( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\t\r\n\t\tif( isset( $_POST['id'] ) )\r\n\t\t\t$id = absint($_POST['id']);\t\t\r\n\r\n\t\tob_start();\t\t\t\r\n\t\t\techo self::wck_output_meta_content($meta, $id, $this->args['meta_array']);\r\n\t\t\tdo_action( \"wck_refresh_list_{$meta}\", $id );\r\n\t\t$entry_list = ob_get_clean();\r\n\t\t\r\n\t\tif( strpos( current_filter(), 'wp_ajax_wck_refresh_list') === 0 ){\r\n\t\t\techo $entry_list;\t\t\t\r\n\t\t\texit;\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn $entry_list;\r\n\t\t}\r\n\t}", "function getLista(){\n\n }", "function listContent()\n {\n }", "public function run() {\n\t\t$this->db->fetchAll('pundits');\n\t\t$this->response = array(\n\t\t\t'status' => 'success',\n\t\t\t'command'=> 'list',\n\t\t\t'data' => $this->db->get_last_result()\n\t\t);\n\t}", "public function listAction()\n {\n // some logic\n }", "public function listItems()\n {\n return null;\n }", "public function itemreturndetails(){\n\t$sel='ir_id,ir_itemid,ir_mtid,ir_name,ir_qty,ir_desc,ir_staffpfno,ir_staffname,ir_dept,ir_receivername,ir_creatordate';\n\t$whorder='ir_mtid asc,ir_itemid asc';\n\t$data['result'] = $this->picomodel->get_orderlistspficemore('items_return',$sel,'',$whorder);\n $this->logger->write_logmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n\t$this->logger->write_dblogmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n $this->load->view('itemaction/displayreturnitem',$data);\n }", "public function getItems()\n {\n }", "public function listAction() {}", "public function getItemsList(){\n return $this->_get(4);\n }", "public function lst()\n\t{\n\t\t$list = AdminModel::paginate(3);\n\t\t$this->assign('list',$list);\n\t\treturn $this->fetch();\n\t}", "public function returnWebmounts() {}", "public function onRefreshList()\n {\n $this->prepareComponent();\n\n return $this->refreshList();\n }", "public function getEntriesList(){\n return $this->_get(2);\n }", "abstract public function getList();", "public function sales_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/sales_return/list';\n $data['sales_returns'] = $this->MSales_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "public function browseAction() {\n $this->validateRequestMethod();\n // Prepare the response\n $params = $response = array();\n $params = $this->_getAllParams();\n Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n\n //GET PAGINATOR\n $params['pagination'] = 1;\n $paginator = Engine_Api::_()->getDbtable('wishlists', 'sitereview')->getBrowseWishlists($params);\n $page = $this->_getParam('page', 1);\n $limit = $this->_getParam('limit', 20);\n $paginator->setItemCountPerPage($limit);\n $paginator->setCurrentPageNumber($page);\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $totalItemCount = $paginator->getTotalItemCount();\n $totalPages = ceil(($totalItemCount) / $limit);\n $response['totalItemCount'] = $totalItemCount;\n if (!empty($totalItemCount)) {\n foreach ($paginator as $wishlistObj) {\n $wishlist = $wishlistObj->toArray();\n if (isset($wishlist['body']) && !empty($wishlist['body']))\n $wishlist['body'] = strip_tags($wishlist['body']);\n $lists = $wishlistObj->getWishlistMap(array('orderby' => 'listing_id'));\n $count = $lists->getTotalItemCount();\n $tempListings = array();\n $counter = 0;\n if (_ANDROID_VERSION >= '1.8.6' || _IOS_VERSION >= '1.8.0') {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n } else {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n }\n $wishlist = array_merge($wishlist, $tempListings);\n $check_availability = Engine_Api::_()->sitereview()->check_availability('sitereview_wishlist', $wishlistObj->wishlist_id);\n $checkFollowAvailablity = $wishlistObj->follows()->isFollow($viewer);\n $tempMenu = array();\n if (!empty($viewer_id)) {\n if (empty($check_availability)) {\n $wishlist['isLike'] = 0;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Like'),\n 'url' => '/like',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n } else {\n $wishlist['isLike'] = 1;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Unlike'),\n 'url' => '/unlike',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n }\n\n if (!empty($checkFollowAvailablity)) {\n $wishlist['followed'] = 1;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Unfollow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n } else {\n $wishlist['followed'] = 0;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Follow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n }\n\n $wishlist['gutterMenu'] = $tempMenu;\n }\n $tempResponse[] = $wishlist;\n }\n }\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $level_id = Engine_Api::_()->getDbtable('levels', 'authorization')->fetchRow(array('type = ?' => \"public\"))->level_id;\n }\n $can_create = ($viewer_id) ? 1 : 0;\n $response['canCreate'] = $can_create;\n if (!empty($tempResponse))\n $response['response'] = $tempResponse;\n $this->respondWithSuccess($response, true);\n }", "function my_list()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['list'] = $this->_bid->my_list();\n\t\t\n\t\t$this->load->view('bids/my_list', $data);\n\t}", "public function getItems(){\n\t\treturn $this->_makeCall('items?');\n\t}", "function listitems($name)\r\n\t\t{\r\n\t\t \t\r\n\t\t}", "function warkslibsGetCurrentLoans() {\n\trequire_once('simple_html_dom.php');\n\t// get barcode and PIN - just guessing how this works here (from warkslibs.php) - need to find out how to do this properly!\n\t$warkslibs_options = get_option('warkslibs_settings_values');\n\t$warkslibs_user_barcode = $warkslibs_options['warkslibs_user_barcode'];\n\t$warkslibs_user_pin = $warkslibs_options['warkslibs_user_pin'];\n\t$warkslibs_url = \"http://library.warwickshire.gov.uk/vs/Pa.csp?OpacLanguage=eng&Profile=Default\";\n\t$login = getLogin($warkslibs_url,$warkslibs_user_barcode,$warkslibs_user_pin);\n\t$currentLoans = getCurrent($login);\n\t\n\t$html = str_get_html($currentLoans);\n\n\tforeach($html->find('td.listitemOdd',0)->parent()->parent()->find('tr') as $list) {\n\t\t$libItem['title'] = $list->find('td', 1)->plaintext;\n\t\t$libItem['barcode'] = $list->find('td', 2)->plaintext;\n\t\t$libItem['dateBorrowed'] = $list->find('td', 4)->plaintext;\n\t\t$libItem['dateDue']\t= $list->find('td', 5)->plaintext;\n\t\t$libItem['timesRenewed']\t= $list->find('td', 6)->plaintext;\n\t\t$libItem['charge']\t\t= $list->find('td', 7)->plaintext;\n\t\tif ($libItem['title'] === \"Title\") {\n\t\t\tcontinue;\n\t\t}\n\t\t$libItems[] = $libItem;\n\t}\n\n\tforeach($libItems as $libItem) {\n\t\t$title_search = urlencode($libItem['title']);\n\t\tif (strlen($title_search) > 255) {\n\t\t\t$title_search = substr($title_search,0,255); \n\t\t}\n\t\t$xml = searchAquaB($title_search);\n\t\t$doc = new DOMDocument();\n\t\t$doc->loadXML($xml);\n\t\t$xpath = new DOMXPath($doc);\n\t\t$records = $doc->getElementsByTagName(\"record\");\n\t\tforeach($records as $record) {\n\t\t\t$title = aquaBTitle($record,$xpath);\n\t\t\t$titlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$title));\n\t\t\t$searchtitlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$libItem['title']));\n\t\t\tif (strcmp($titlekey,$searchtitlekey) != 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$libItem['title'] = $title;\n\t\t\t$libItem['isbn'] = aquaBISBN($record,$xpath);\n\t\t\t$libItem['auth'] = aquaBAuth($record,$xpath);\n\t\t\t$libItem['image'] = aquaBImage($record,$xpath);\n\t\t\t// ID retrieval not work at the moment\n\t\t\t// Why not?\n\t\t\t$libItem['id'] = aquaBID($record,$xpath);\n\t\t\t//Need to output dates etc. as well if want to preserve these?\n\t\t\t\n\t\t\t$libItems1[] = $libItem;\n\t\t}\n\t}\n\t// At this point we have an array of arrays listing all of the current loans\n\t// Non-unique titles have been expanded into multiple records\n\t// The user can (in theory) choose the ones they actually have (or just the ones they want to blog)\n\t// Then press 'blog these' (or similar) and create multiple blog posts (in draft)\n\t// So at this point want to output stuff to the screen with all information included in form\n\t// Then grab this all back when form submitted?\n\t// Alternative is to just submit the relevant URLs of the form\n\t// http://librarycatalogue.warwickshire.gov.uk/abwarwick/fullrecordinnerframe.ashx?hreciid=|library/vubissmart-marc|494187&output=xml\n\t// And do a further retrieve to get the information needed - but this increases network traffic for no gain?\n\t// See http://www.sitepoint.com/forums/php-34/$_post-ing-checkbox-values-corresponding-form-values-182722.html for how to do this\n\t\n\t// So - try outputting items\n\techo '<form method=\"post\" action=\"\"><input name=\"blogem\" value=\"yes\" id=\"blogem\" type=\"hidden\">';\n\techo '<ul>';\n\t$no_libItems = count($libItems1);\n\tfor($i=0; $i<$no_libItems; $i++){\n\t\techo '<li>';\n\t\techo '<h3>'.$libItems1[$i]['title'].'</h3>';\n\t\t// display cover image\n\t\techo \"<img src=\".$libItems1[$i]['image'].\" alt='Coverimage of \".$libItems1[$i]['title'].\"'>\\n\"; // need to check if it exists, otherwise?\n\t\t// print the item title\n\t\t// Do any of these need encoding? URL?\n\t\techo '<input name=\"libitem['.$i.'][choose]\" value=\"1\" id=\"choose\" type=\"checkbox\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][title]\" value=\"'.$libItems1[$i]['title'].'\" id=\"title\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][isbn]\" value=\"'.$libItems1[$i]['isbn'].'\" id=\"isbn\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][auth]\" value=\"'.$libItems1[$i]['auth'].'\" id=\"auth\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][image]\" value=\"'.$libItems1[$i]['image'].'\" id=\"image\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][id]\" value=\"'.$libItems1[$i]['id'].'\" id=\"id\" type=\"hidden\">'; // is 'id' required?\n\t\techo '</li>';\n }\n\techo '<input type=\"submit\" name=\"itemstoblog\" value=\"Blog these...\" /></form><br />';\n echo '</ul>';\n\t\n/* This is where the Amazon Enhancement could go\n// Some idea of the code might be:\n$no_libItems = count($libItems1);\nfor($i=0; $i<$no_libItems; $i++){\n\t// Do Amazon lookup and enhance item (via function)\n}\n*/\n\n}", "public function getResults(){\n $this->results;\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();", "public function api_entry_list() {\n $data = $this->Mdl_Users->get_list(\n $_POST['rp'],\n $_POST['page'],\n $_POST['query'],\n $_POST['qtype'],\n $_POST['sortname'],\n $_POST['sortorder']);\n\n echo json_encode(array(\n 'page'=>$_POST['page'],\n 'total'=>$this->Mdl_Users->get_length(),\n 'rows'=>$data,\n ));\n }", "private function buildListing(){\n\t\t// link any necessary javascript files\n\t\t$html = Loader::helper('html');\n\t\t$f = Loader::helper('concrete/file');\n\t\t$expensiveCache = \\Core::make('cache/expensive');\n\n\t\t// listing cache file\n\t\t$listCacheFle = DIR_FILES_UPLOADED_STANDARD.'/listingcache.js';\n\t\t\n\t\t// init vars\t\t\n\t\t$movie_data_arr = array();\n\t\t$sel_dates_arr = array();\n\t\t$soon_dates_arr = array();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&movie_id=211358'));\n\t\t\t\t\t\t\t\n\t\t// retrieve cached values\n\t\t$updated_listing = $expensiveCache->getItem('movieFeed');\n\t\t//$updated_listing->clear();\n\t\t$listCheck = $updated_listing;\n\t\t$updated_listing = $updated_listing->get();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&search=AL13222'));\n\t\t\n\t\t// reload listing if cache is found to be empty\n\t\tif($listCheck->isMiss()){\n\n\t\t\t// gather theater movie listing\n\t\t\t$rtsListing = json_decode(json_encode((array) simplexml_load_string($this->getRTSData('ShowTimeXml'))), 1);\n\t\t\t$listing = $this->getWWMListingData();\n\t\t\t//$rtsListing = $this->getRTSListing();\n\t\t\t\n\t\t\t// 11-29-2013 force reload if listing data if blank\n\t//\t\tif(empty($listing)){\n//\t\t\t\t$this->buildListing();\n//\t\t\t}\n\t\t\t\n\t\t\t// convert to PHP array\n\t\t\t$listing = json_decode(json_encode((array) simplexml_load_string($listing)), 1);\n\n\t\t\t// store movie data\n\t\t\t$movie_listing = $listing['house']['schedule']['movie'];\n\t\t\t$updated_listing = $movie_listing;\n\n\t\t\t// walk through all movies per location\n\t\t\tforeach($movie_listing as $movie){\n\t\t\t\t\n\t\t\t\t// check for movie tickets film code\n\t\t\t\tif(!empty($movie['movie_id'])){\n\t\t\t\t\t// gather movie data\n\t\t\t\t\t$movie_data = $expensiveCache->getItem('movieData'.$movie['movie_id']);\n\t\t\t\t\t// store in cache if not found\n\t\t\t\t\tif ($movie_data->isMiss()) {\n\t\t\t\t\t\t$movie_data->lock();\n\t\t\t\t\t\t$movie_data_new = $this->getMovieDataWWM($movie['movie_id']);\n\t\t\t\t\t\t$movie_data->set($movie_data_new,86400);\n\t\t\t\t\t}\n\t\t\t\t\t$movie_data = $movie_data->get();\n\t\t\t\t\t\n\t\t\t\t\t// add to movie data array\n\t\t\t\t\t$movie_data_arr[$movie['movie_id']] = $movie_data;\n\n\t\t\t\t\t// generate selectable date hash\n\t\t\t\t\t// check for show within assigned RTS showtimes\n\t\t\t\t\tforeach($rtsListing['ShowSchedule']['Films']['Film'] as $film){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check cinema source film code vs stored RTS cinema source film code\n\t\t\t\t\t\tif($film['CSCode'] == $movie['movie_id']){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// check for single or multiple shows\n\t\t\t\t\t\t\t$shows = array();\n\t\t\t\t\t\t\tif(empty($film['Shows']['Show']['DT'])){\n\t\t\t\t\t\t\t\t$shows = $film['Shows']['Show'];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$shows[0] = $film['Shows']['Show'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t// add date/time values to selectable date hash\n\t\t\t\t\t\t\tforeach($shows as $curShow){\n\t\t\t\t\t\t\t\t// check for ticket internet availability\n\t\t\t\t\t\t\t\t$tickets = array();\n\t\t\t\t\t\t\t\tif(empty($curShow['TIs']['TI']['C'])){\n\t\t\t\t\t\t\t\t\t$tickets = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$tickets[0] = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tforeach($tickets as $TI){\n\t\t\t\t\t\t\t\t\t$ticket = $this->ticketLookup($rtsListing, $TI['C']);\n\t\t\t\t\t\t\t\t\t// store current showtimes\n\t\t\t\t\t\t\t\t\t// convert date/time\n\t\t\t\t\t\t\t\t\t$showDate = substr($curShow['DT'], 0, 8);\n\t\t\t\t\t\t\t\t\tif(!empty($ticket) && empty($ticket['HideOnInternet'])){\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tforeach($movie['showtimes'] as $curShowTime){\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$curShowTime['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$curShowTime['@attributes']['date']] = strtotime($curShowTime['@attributes']['date']);\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\t\n\t\t\t\t\t\t\t\t\t// store upcoming showtimes\n\t\t\t\t\t\t\t\t\t} elseif (count($tickets) == 1 && !empty($ticket) && $ticket['HideOnInternet'] == 1 && $ticket['Name'] == 'rSupersvr') {\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$soon_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t}\n\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\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\t//print_r($movie_data);\n\t\t\t\t\t\n\t\t\t\t\t// walk through movie data and save images to media library where needed\n\t\t\t\t\tif($movie_data['photos']['photo'] || $movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// download image save to cache then delete\n\t\t\t\t\t\t$myFile = ereg_replace(\"[^A-Za-z0-9-]\", \"_\", trim($movie_data['name'])).'.jpg';\n\t\t\t\t\t\t$myFile = preg_replace('/[_]+/', '_', $myFile);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check for existing poster file\n\t\t\t\t\t\t$db = Loader::db();\n\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\tif (!$det) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// pull remote file\n\t\t\t\t\t\t\tif(count($movie_data['hiphotos']['photo']) > 1){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'];\n\t\t\t\t\t\t\t} elseif(count($movie_data['photos']['photo']) > 0) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['photos']['photo']) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$new_image = $this->get_data($imgLnk);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$myFileLocation = DIR_FILES_UPLOADED_STANDARD.'/cache/'.$myFile;\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation)){\n\t\t\t\t\t\t\t\t$fh = fopen($myFileLocation, 'w');\n\t\t\t\t\t\t\t\t$stringData = $new_image;\n\t\t\t\t\t\t\t\tfwrite($fh, $stringData);\n\t\t\t\t\t\t\t\tfclose($fh);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation) || filesize($myFileLocation) > 0){\n\t\t\t\t\t\t\t\t$error = \\Concrete\\Core\\File\\Importer::E_PHP_FILE_ERROR_DEFAULT;\n\t\t\t\t\t\t\t\t$fi = new \\Concrete\\Core\\File\\Importer();\n\t\t\t\t\t\t\t\t$newFile = $fi->import($myFileLocation,$myFile);\n\t\t\t\t\t\t\t\tif(!is_object($newFile)) {\n\t\t\t\t\t\t\t\t\t$this->set('errorMessage', \\Concrete\\Core\\File\\Importer::getErrorMessage($error)); \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// delete cached file\n\t\t\t\t\t\t\t\tunlink($myFileLocation);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//echo $myFileLocation;\n//\t\t\t\t\t\t\techo $myFile;\n//\t\t\t\t\t\t\tprint_r($movie_data);\n//\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// update poster art to use local relative path\n\t\t\t\t\t\t$movie_data_arr[$movie['movie_id']]['photos']['photo'] = $path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$path = 'null';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// store queried show dates\n\t\t\t$movieFeed = $expensiveCache->getItem('movieFeed');\n\t\t\t// store in cache if not found\n\t\t\tif ($movieFeed->isMiss()) {\n\t\t\t\t$movieFeed->lock();\n\t\t\t\t$movie_feed_new = $updated_listing;\n\t\t\t\t$movieFeed->set($movie_feed_new,7200);\n\t\t\t}\n\t\t\t$movieFeed = $movieFeed->get();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t// convert to JSON\n\t\t\tasort($sel_dates_arr);\n\t\t\t$sel_dates_arr = json_encode($sel_dates_arr);\n\t\t\tasort($soon_dates_arr);\n\t\t\t$soon_dates_arr = json_encode($soon_dates_arr);\n\t\t\t$updated_listing = json_encode($updated_listing);\n\t\t\t$rtsListing = json_encode($rtsListing);\n\t\t\t$movie_data_arr = json_encode($movie_data_arr);\n\t\t\t\n\t\t\t$final_listing = 'var dateOpts = ' . $sel_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var soonDateOpts = ' . $soon_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var listingData = ' . $updated_listing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var rtsListingData = ' . $rtsListing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var movieData = ' . $movie_data_arr . ';';\n\t\t\t\n\t\t\t// save as static file\n\t\t\ttouch($listCacheFle);\n\t\t\t$fh = fopen($listCacheFle, 'w');\n\t\t\tfwrite($fh, $final_listing);\n\t\t\tfclose($fh);\n\n\t\t}\n\t\t\n\t\t// add json variables to footer\n\t\t$this->addFooterItem($html->javascript(DIR_REL.'/application/files/listingcache.js'));\n\t\t\n\t\t// transfer usable variables\n\t\t//$this->set('jsAPI', $updated_listing);\n\t}", "function getListResults ( $ListID, $use_cache = TRUE )\n\t{\n\n\t\t$is_cached = false;\n\t\tif ( $use_cache ) {\n\t\t\t$wishlist = get_option( $this->db_options_name_cached_wishlist );\n\n\t\t\tif ( is_array( $wishlist ) ) {\n\t\t\t\tif ( isset( $wishlist[$ListID] ) ) {\n\t\t\t\t\t//$wishlist = unserialize( $cached_wishlist );\n\t\t\t\t\tif ( (time() - $wishlist[$ListID]['time']) < 60 * 60 * 23 ) {\n\t\t\t\t\t\t$is_cached = true;\n\t\t\t\t\t\t$list = $wishlist[$ListID]['list'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( ! $is_cached ) {\n\t\t\t$list = $this->handleRESTcall( $this->getRestListLookupParams( $ListID ) );\n\n\t\t\tif ( 1 == $list['Lists']['List']['TotalItems'] ) {\n\t\t\t\t$list['Lists']['List']['ListItem'] = array ('0' => $list['Lists']['List']['ListItem'] ); // If one item in the list we need to make it a multi array\n\t\t\t} else {\n\t\t\t\tif ( $list['Lists']['List']['TotalPages'] > 1 ) { // If the list contains over 10 items we need to process the other pages.\n\t\t\t\t\t$page = 2;\n\t\t\t\t\twhile ( $page <= $list['Lists']['List']['TotalPages'] ) {\n\t\t\t\t\t\t$result = $this->handleRESTcall( $this->getRestListLookupParams( $ListID, null, $page ) );\n\t\t\t\t\t\tforeach ( $result['Lists']['List']['ListItem'] as $key => $value ) {\n\t\t\t\t\t\t\t$newkey = 10 * ($page - 1) + $key;\n\t\t\t\t\t\t\t$list['Lists']['List']['ListItem'][$newkey] = $value; //Add the items from the remaining pages to the lists.\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$page ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! (isset( $list['Lists']['Request']['Errors'] ) || isset( $list['Error'] )) ) {\n\t\t\t\t$wishlist[$ListID]['time'] = time();\n\t\t\t\t$wishlist[$ListID]['list'] = $list;\n\t\t\t\tupdate_option( $this->db_options_name_cached_wishlist, $wishlist );\n\t\t\t}\n\t\t}\n\n\t\treturn ($list);\n\t}", "function _ajax_fetch_custom_list_callback() {\n\n\t$wp_list_table = new TT_Example_List_Table();\n\t$wp_list_table->ajax_response();\n}", "public function listings($method='GET')\n\t{\n \n $data_tmp['listing_uri'] = config_item('listing_uri');\n if(empty($data_tmp['listing_uri']))$data_tmp['listing_uri'] = 'property'; \n \n $this->load->model('language_m');\n $this->load->model('estate_m');\n $this->load->model('option_m');\n \n $this->data['message'] = lang_check('Something is wrong with request');\n $this->data['token_available'] = FALSE;\n $POST = $this->input->get_post(NULL, TRUE);\n \n if(isset($POST['lang_code']))\n {\n $lang_id = $this->language_m->get_id($POST['lang_code']);\n }\n \n if(empty($lang_id))$lang_id=$this->language_m->get_default_id();\n $lang_code = $this->language_m->get_code($lang_id);\n \n $token = $this->token_m->get_token($POST);\n if(is_object($token))\n $this->data['token_available'] = TRUE;\n \n if(is_object($token))\n {\n if($method == 'GET')\n {\n $options = $this->option_m->get_field_list($this->language_m->get_default_id());\n $this->db->join('property_user', 'property_user.property_id = property.id', 'right');\n $this->db->where('user_id', $token->user_id);\n $estates = $this->estate_m->get_by(array('language_id'=>$lang_id));\n \n // Set website details\n $json_data = array();\n // Add listings to rss feed \n foreach($estates as $key=>$row){\n $estate_date = array();\n $title = $this->estate_m->get_field_from_listing($row, 10);\n $url = site_url($data_tmp['listing_uri'].'/'.$row->id.'/'.$lang_code.'/'.url_title_cro($title));\n \n $row->json_object = json_decode($row->json_object);\n $row->image_repository = json_decode($row->image_repository);\n $estate_date['url'] = $url;\n $estate_date['listing'] = $row;\n \n $json_data[] = $estate_date;\n }\n \n $this->data['results'] = $json_data;\n \n $this->data['message'] = lang_check('Results available');\n }\n elseif($method == 'DELETE' && isset($POST['property_id']))\n {\n $this->load->library('session');\n $property_id = $POST['property_id'];\n \n $this->data['success'] = false;\n // Check if property_id already saved, stop and write message\n if($this->estate_m->check_user_permission($property_id, $token->user_id)>0)\n {\n $this->estate_m->delete($property_id);\n \n $this->data['message'] = lang_check('Listing removed!');\n $this->data['success'] = true;\n }\n // Save favorites to database\n else\n {\n $this->data['message'] = lang_check('Listing doesnt exists!');\n $this->data['success'] = true;\n }\n }\n }\n\n echo json_encode($this->data);\n exit();\n\t}", "protected function _executeGetList() {\n // Init\n $list = array();\n\n $pid = (int)$this->_postVar['pid'];\n $offset = (int)$this->_postVar['start'];\n $limit = (int)$this->_postVar['limit'];\n $itemsPerPage = (int)$this->_postVar['pagingSize'];\n $depth = (int)$this->_postVar['depth'];\n $sysLanguage = (int)$this->_postVar['sysLanguage'];\n $listType = (string)$this->_postVar['listType'];\n\n // Store last selected language\n $GLOBALS['BE_USER']->setAndSaveSessionData('TQSeo.sysLanguage', $sysLanguage);\n\n if (!empty($pid)) {\n $page = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord('pages', $pid);\n\n $fieldList = array();\n\n switch ($listType) {\n case 'metadata':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'keywords',\n 'description',\n 'abstract',\n 'author',\n 'author_email',\n 'lastupdated',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n\n unset($row);\n foreach ($list as &$row) {\n if (!empty($row['lastupdated'])) {\n $row['lastupdated'] = date('Y-m-d', $row['lastupdated']);\n } else {\n $row['lastupdated'] = '';\n }\n }\n unset($row);\n break;\n\n case 'geo':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_geo_lat',\n 'tx_tqseo_geo_long',\n 'tx_tqseo_geo_place',\n 'tx_tqseo_geo_region'\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'searchengines':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_canonicalurl',\n 'tx_tqseo_is_exclude',\n 'tx_tqseo_priority',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'url':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'title',\n 'url_scheme',\n 'alias',\n 'tx_realurl_pathsegment',\n 'tx_realurl_pathoverride',\n 'tx_realurl_exclude',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitle':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_pagetitle',\n 'tx_tqseo_pagetitle_rel',\n 'tx_tqseo_pagetitle_prefix',\n 'tx_tqseo_pagetitle_suffix',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitlesim':\n $buildTree = FALSE;\n $list = $this->_listPageTitleSim($page, $depth, $sysLanguage);\n break;\n\n default:\n // Not defined\n return;\n break;\n }\n }\n\n $ret = array(\n 'results' => count($list),\n 'rows' => array_values($list),\n );\n\n return $ret;\n }", "function displayCreateListing() {\r\n displayModifyListing(\"processListing.php\", \"createListing\", \"\", \"\", \"\",\"\",\"\", \"\");\r\n}", "public function getArtists($status);", "function getMainActions(){\n $step = $this->getStep($this->listing->user_id);\n $data=[];\n\n /**\n * Hide buttons when listing is not on steps\n */\n if(isset($step) && $step->date_end != '0000-00-00 00:00:00')\n {\n /**\n * APPROVE AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_ACTIVE)\n {\n $data[]=[\n /** Approve and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_approve_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-approve action-btn',\n ];\n }\n /**\n * REJECT AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->featured == \\Orm\\Model\\Listings\\Listings::NOT_FEATURED){\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_DELETED)\n {\n $data[]=[\n /** REJECT and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_reject_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-reject action-btn',\n ];\n }\n }\n return $data;\n }\n }", "public function listing() {\r\n $options = get_option( 'myhome_redux' );\r\n $show_advanced = is_null( $options['mh-listing-show_advanced'] ) ? true : intval( $options['mh-listing-show_advanced'] );\r\n $show_clear = is_null( $options['mh-listing-show_clear'] ) ? true : intval( $options['mh-listing-show_clear'] );\r\n $show_sort_by = is_null( $options['mh-listing-show_sort_by'] ) ? true : intval( $options['mh-listing-show_sort_by'] );\r\n $show_view_types = is_null( $options['mh-listing-show_view_types'] ) ? true : intval( $options['mh-listing-show_view_types'] );\r\n $advanced_number = is_null( $options['mh-listing-search_form_advanced_number'] ) ? 3 : intval( $options['mh-listing-search_form_advanced_number'] );\r\n // settings from Listing options page\r\n $atts = array(\r\n 'lazy_loading' => $options['mh-listing-lazy_loading'] ? 'true' : 'false',\r\n 'lazy_loading_limit' => intval( $options['mh-listing-load_more_button_number'] ),\r\n 'load_more_button' => $options['mh-listing-load_more_button_label'],\r\n 'load_prev_button' => $options['mh-listing-load_prev_button_label'],\r\n 'listing_default_view' => $options['mh-listing-default_view'],\r\n 'estates_per_page' => $options['mh-listing-estates_limit'],\r\n 'search_form_position' => $options['mh-listing-search_form_position'],\r\n 'label' => $options['mh-listing-label'],\r\n 'search_form_advanced_number' => $advanced_number,\r\n 'show_advanced' => $show_advanced ? 'true' : 'false',\r\n 'show_clear' => $show_clear ? 'true' : 'false',\r\n 'show_sort_by' => $show_sort_by ? 'true' : 'false',\r\n 'show_view_types' => $show_view_types ? 'true' : 'false',\r\n 'agent_id' => $this->id, // get estates only from this agent\r\n 'map' => false\r\n );\r\n\r\n // prepare attributes\r\n foreach ( My_Home_Attribute::get_attributes() as $attr ) {\r\n $value = $options['mh-listing-' . $attr->get_slug() . '_show'];\r\n $atts[$attr->get_slug() . '_show'] = $value ? 'true' : 'false';\r\n }\r\n\r\n // initiate listing\r\n $listing = new My_Home_Listing( $atts );\r\n ?>\r\n <div class=\"mh-listing--full-width mh-listing--horizontal-boxed\">\r\n <?php $listing->listing(); ?>\r\n </div>\r\n <?php\r\n }", "public function getList()\n {\n }", "public function purchase_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/purchase_return/list';\n $data['purchase_returns'] = $this->MPurchase_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "function get_results($args)\n {\n }", "function get_results($args)\n {\n }", "function alat_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\r\n\t\t$result=$this->m_alat->alat_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "function booksList($offset, $total_records_per_page, $order, $ascdesc)\n{\n $booksManager = new ListManager();\n\n\n\n if (isset($_GET['search']) && $_GET['search']!='') {\n $search = input(addcslashes($_GET['search'], '_'));\n $search=\"%\".$search.\"%\";\n $books = $booksManager->get_search($offset, $total_records_per_page, $order, $ascdesc, $search);\n } elseif (isset($_GET['cat']) && $_GET['cat']!='') {\n $cat = input($_GET['cat']);\n $books = $booksManager-> get_cat($offset, $total_records_per_page, $order, $ascdesc, $cat);\n } else {\n $books = $booksManager->selectAll($offset, $total_records_per_page, $order, $ascdesc); // Appel la fonction qui renvoie toutes les données sur les livres en bdd\n }\n // require('view/listView.php');\n return $books;\n echo selectAll();\n}", "public function index() {\n $output = $this->verifyProvidedInput(['keywords' => 'Keywords are required to perform a search']);\n\n if (empty($output)) {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n if (!empty($this->request->advancedSearch) && $this->request->advancedSearch) {\n $sortBy = (isset($this->request->sortBy) ? $this->request->sortBy : 'rawListPrice');\n $reverseSort = (isset($this->request->reverseSort) ? boolval($this->request->reverseSort) : false);\n $data = $this->getRETS->getListing()\n ->setSortBy($sortBy)\n ->setReverseSort($reverseSort)\n ->search($preparedKeywords, \n $this->request->extra, \n $this->request->maxPrice, \n $this->request->minPrice, \n $this->request->beds, \n $this->request->baths, \n $this->request->includeResidential, \n $this->request->includeLand, \n $this->request->includeCommercial);\n \n $this->addThumbnails($data);\n $output = $this->respondData($data);\n } else {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n $data = $this->getRETS->getListing()->searchByKeyword($preparedKeywords);\n $this->addThumbnails($data);\n $output = $this->respondData($data);\n }\n }\n\n return $output;\n }", "public function get_json_results() {\n }", "public function index()\n {\n //qui ritorno l'elenco delle liste\n //return TodoList::paginate(20);\n $lists = TodoList::paginate(20);\n return $this->getResult($lists->toArray());\n }", "public function index()\n {\n $data= Pizza::get()->toArray();\n if($data)\n {\n return $this->response(true,'rows successfully listed',$data);\n }\n return $this->response(false,'no rows found',[]);\n }", "function list(){\n $res = $res = $this->client->request('GET',$this->path,[]);\n $this->checkResponse($res,array(200));\n return $res;\n }", "public function action() {\n $this->curPos ++;\n usleep(250000);\n// # advanced finish if you need it for some reason:\n// if($this->curPos>40) return 'We have finished right now!';\n return array('lastItem'=>$this->curPos, 'itemCount'=>$this->count);\n }", "abstract public function getResults(): mixed;" ]
[ "0.69911814", "0.69135123", "0.6191085", "0.61634105", "0.6106261", "0.6106261", "0.60919493", "0.6079555", "0.60730743", "0.60586506", "0.6057292", "0.5979495", "0.59759116", "0.5966504", "0.5867618", "0.58074546", "0.5806632", "0.58025557", "0.5796107", "0.5766682", "0.57637703", "0.57054", "0.5705112", "0.56637645", "0.56479096", "0.5631926", "0.5583362", "0.5580018", "0.5580018", "0.5580018", "0.55795205", "0.5572956", "0.5563976", "0.5549063", "0.5546685", "0.55426294", "0.55390215", "0.552659", "0.55246454", "0.5522747", "0.5511233", "0.548951", "0.5487353", "0.54846007", "0.54828846", "0.54735667", "0.54718083", "0.5470762", "0.5467904", "0.5464692", "0.5455951", "0.545373", "0.54340076", "0.5425628", "0.5422889", "0.5420882", "0.5418302", "0.54169947", "0.5415513", "0.54146254", "0.5407161", "0.5389055", "0.5387423", "0.53825194", "0.5381398", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5375336", "0.536375", "0.53622645", "0.53530973", "0.53520507", "0.5348448", "0.5329882", "0.53291476", "0.53288126", "0.53225636", "0.5321964", "0.53211683", "0.5318913", "0.5318913", "0.53172415", "0.53120136", "0.52992517", "0.5295117", "0.52885616", "0.5285489", "0.5285226", "0.52809364", "0.52773446" ]
0.0
-1
get returns after a listing has been made
public function get_shipcost_details($dom, $sku, $item_id){ //push each entry into new array $update_item_array = array(); $update_item_response = $dom->getElementsByTagName(DOM_ELEMENT_SHIPCOST_RESPONSE); foreach ($update_item_response as $item){ //ad sku to first entry of array array_push($update_item_array, $sku); array_push($update_item_array, $item_id); $costs = $item->getElementsByTagName(DOM_ELEMENT_SHIP_DETAILS); foreach ($costs as $costsmsg){ $serv_opts = $costsmsg->getElementsByTagName(DOM_ELEMENT_SHIP_SERVICE_OPTIONS); foreach($serv_opts as $serv){ $costers = trim($serv->getElementsByTagName(DOM_ELEMENT_SHIP_SERVICE_CST)->item(0)->nodeValue) != "" ? trim($serv->getElementsByTagName(DOM_ELEMENT_SHIP_SERVICE_CST)->item(0)->nodeValue) : "No Cost Entered - Error"; array_push($update_item_array, $costers); } } //errors $error_messages = $item->getElementsByTagName(DOM_ELEMENT_ERRORS); foreach ($error_messages as $errormsg){ $error = trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) != "" ? trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) : "No Error"; array_push($update_item_array, $error); } } return $update_item_array; //DOM_ELEMENT_SHORT_ERROR_MSG }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listing();", "function listing() {\r\n\r\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}", "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}", "function getItems();", "function getItems();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n\n $header = array(\"优惠券编号\", \"优惠券金额\", \"所属终端便利店账号\", \"终端便利店\", \"状态\", \"赠送时间\", \"使用时间\");\n $cols = 7;\n\n $contentList = $this->coupon_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有优惠券.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "public function listing() {\n $this->response->setData(1);\r\n $this->response->setHeader('__OK', Http::Response(Http::OK));\r\n return TRUE;\r\n }", "public function listAction() {\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $photo_id = (int) $this->_getParam('photo_id');\n\n // CHECK AUTHENTICATION\n // CHECK AUTHENTICATION\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $sitereview = $subject = Engine_Api::_()->core()->getSubject('sitereview_listing');\n } else if (Engine_Api::_()->core()->hasSubject('sitereview_photo')) {\n $photo = $subject = Engine_Api::_()->core()->getSubject('sitereview_photo');\n $listing_id = $photo->listing_id;\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n }\n $bodyResponse = $tempResponse = array();\n $listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, \"edit_listtype_$sitereview->listingtype_id\");\n $listingtype_id = $this->_listingType->listingtype_id;\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $photoCount = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id)->photo_count;\n $paginator = $sitereview->getSingletonAlbum()->getCollectiblesPaginator();\n\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo = $allowed_upload_photo;\n if (empty($photoCount))\n $allowed_upload_photo = $allowed_upload_photo;\n elseif ($photoCount <= $paginator->getTotalItemCount())\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = $allowed_upload_photo;\n\n //GET ALBUM\n $album = $sitereview->getSingletonAlbum();\n\n\n /* RETURN THE LIST OF IMAGES, IF FOLLOWED THE FOLLOWING CASES: \n * - IF THERE ARE GET METHOD AVAILABLE.\n * - iF THERE ARE NO $_FILES AVAILABLE.\n */\n if (empty($_FILES) && $this->getRequest()->isGet()) {\n $requestLimit = $this->getRequestParam(\"limit\", 10);\n $page = $requestPage = $this->getRequestParam(\"page\", 1);\n\n //GET PAGINATOR\n $album = $sitereview->getSingletonAlbum();\n $paginator = $album->getCollectiblesPaginator();\n\n $bodyResponse[' totalPhotoCount'] = $totalItemCount = $bodyResponse['totalItemCount'] = $paginator->getTotalItemCount();\n $paginator->setItemCountPerPage($requestLimit);\n $paginator->setCurrentPageNumber($requestPage);\n // Check the Page Number for pass photo_id.\n if (!empty($photo_id)) {\n for ($page = 1; $page <= ceil($totalItemCount / $requestLimit); $page++) {\n $paginator->setCurrentPageNumber($page);\n $tmpGetPhotoIds = array();\n foreach ($paginator as $photo) {\n $tmpGetPhotoIds[] = $photo->photo_id;\n }\n if (in_array($photo_id, $tmpGetPhotoIds)) {\n $bodyResponse['page'] = $page;\n break;\n }\n }\n }\n\n if ($totalItemCount > 0) {\n foreach ($paginator as $photo) {\n $tempImages = $photo->toArray();\n\n // Add images\n $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo);\n $tempImages = array_merge($tempImages, $getContentImages);\n\n $tempImages['user_title'] = $photo->getOwner()->getTitle();\n $tempImages['likes_count'] = $photo->likes()->getLikeCount();\n $tempImages['is_like'] = ($photo->likes()->isLike($viewer)) ? 1 : 0;\n \n //Sitereaction Plugin work start here\n if (Engine_Api::_()->getApi('Siteapi_Feed', 'advancedactivity')->isSitereactionPluginLive()) {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitereaction') && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereaction.reaction.active', 1)) {\n $popularity = Engine_Api::_()->getApi('core', 'sitereaction')->getLikesReactionPopularity($photo);\n $feedReactionIcons = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getLikesReactionIcons($popularity, 1);\n $tempImages['reactions']['feed_reactions'] =$tempImages['feed_reactions'] = $feedReactionIcons;\n\n if (isset($viewer_id) && !empty($viewer_id)) {\n $myReaction = $photo->likes()->getLike($viewer);\n if (isset($myReaction) && !empty($myReaction) && isset($myReaction->reaction) && !empty($myReaction->reaction)) {\n $myReactionIcon = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getIcons($myReaction->reaction, 1);\n $tempImages['reactions']['my_feed_reaction'] =$tempImages['my_feed_reaction'] = $myReactionIcon;\n }\n }\n }\n }\n //Sitereaction Plugin work end here\n if (!empty($viewer) && ($tempMenu = $this->getRequestParam('menu', 1)) && !empty($tempMenu)) {\n $menu = array();\n\n if ($photo->user_id == $viewer_id) {\n $menu[] = array(\n 'label' => $this->translate('Edit'),\n 'name' => 'edit',\n 'url' => 'listings/photo/edit/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Delete'),\n 'name' => 'delete',\n 'url' => 'listings/photo/delete/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n }\n $menu[] = array(\n 'label' => $this->translate('Share'),\n 'name' => 'share',\n 'url' => 'activity/index/share',\n 'urlParams' => array(\n \"type\" => $photo->getType(),\n \"id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Report'),\n 'name' => 'report',\n 'url' => 'report/create/subject/' . $photo->getGuid()\n );\n\n $menu[] = array(\n 'label' => $this->translate('Make Profile Photo'),\n 'name' => 'make_profile_photo',\n 'url' => 'members/edit/external-photo',\n 'urlParams' => array(\n \"photo\" => $photo->getGuid()\n )\n );\n\n $tempImages['menu'] = $menu;\n }\n\n if (isset($tempImages) && !empty($tempImages))\n $bodyResponse['images'][] = $tempImages;\n }\n }\n $bodyResponse['canUpload'] = $allowed_upload_photo;\n $this->respondWithSuccess($bodyResponse, true);\n } else if (isset($_FILES) && $this->getRequest()->isPost()) { // UPLOAD IMAGES TO RESPECTIVE EVENT\n if (empty($viewer_id) || empty($allowed_upload_photo))\n $this->respondWithError('unauthorized');\n $tablePhoto = Engine_Api::_()->getDbtable('photos', 'sitereview');\n $db = $tablePhoto->getAdapter();\n $db->beginTransaction();\n\n try {\n $viewer = Engine_Api::_()->user()->getViewer();\n $album = $sitereview->getSingletonAlbum();\n $rows = $tablePhoto->fetchRow($tablePhoto->select()->from($tablePhoto->info('name'), 'order')->order('order DESC')->limit(1));\n $order = 0;\n if (!empty($rows)) {\n $order = $rows->order + 1;\n }\n $params = array(\n 'collection_id' => $album->getIdentity(),\n 'album_id' => $album->getIdentity(),\n 'listing_id' => $sitereview->getIdentity(),\n 'user_id' => $viewer->getIdentity(),\n 'order' => $order\n );\n $photoCount = count($_FILES);\n if (isset($_FILES['photo']) && $photoCount == 1) {\n $photo_id = Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $_FILES['photo'])->photo_id;\n if (!$sitereview->photo_id) {\n $sitereview->photo_id = $photo_id;\n $sitereview->save();\n }\n } else if (!empty($_FILES) && $photoCount > 1) {\n foreach ($_FILES as $photo) {\n Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $photo);\n }\n }\n\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n }\n }\n }", "public function get_results()\n {\n }", "public function get_results()\n {\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['kind'] = 1;\n $searchData['login_user'] = $this->login_id;\n\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"账号\", \"姓名\", \"角色\", \"新增时间\", \"操作\");\n $cols = 6;\n\n $contentList = $this->user_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有数据.\" : '';\n break;\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "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}", "function item( $args )\n {\n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n\t\t$limit = 10;\n\t\t$offer_page = 0;\n \n // add a test if this listing has already been accepted\n if( $result[0]['status'] ==\n GarageSale\\BaseDatabase::STATUS_ACCEPTED \n ){\n \n // get offer result\n $offers_result = $offer_model->limit(1)->get_accepted( \n (int) $result[0]['id']\n );\n \n // set accepted flag to true\n $accepted = true;\n \n } else {\n \n \n // limit to 10 displayed at a time\n $limit = 10;\n \n // default offer_page to 0\n $offer_page = 0;\n \n // set up offers page\n if( isset( $_GET['offerpage'] ) && \n is_numeric($_GET['offerpage']) \n ){\n \n // set offer_page to the user provided value\n $offer_page = ((int) $_GET['offerpage'] ) - 1;\n }\n \n $offers_result = $offer_model->limit($limit)->\n page($offer_page)->\n get_item_any_offer( (int) $result[0]['id'] );\n }\n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t // load comment form\n\t $comment_form = $this->view->\n\t form('comment','listings/postcomment/'.$postid);\n\t $this->view->add('comment_form',$comment_form);\n\t \n\t \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Images 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}", "public function getResults()\n {\n }", "protected abstract function fetchLists();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['provider_id'] =$this->user_model->getProviderId($this->global['login_id']);\n\n // get top list data in homepage\n switch ($id) {\n case 1:\n if($this->isTicketter() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"配送员\", \"提交时间\", \"操作\");\n $cols = 10;\n }else if($this->isAdmin() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"所属区域总代理\", \"提交时间\", \"操作\");\n $cols = 10;\n }\n\n $contentList = $this->order_model->getItems($searchData);\n// foreach ($contentList as $item){\n// // get activity information\n// $activity = $this->activity_model->getItemById($item->activity_ids);\n// $activity->products = $this->activity_model->getProductsFromIds($activity->product_id, $activity->provider_id);\n//\n// $orderinfo = array(\n// 'id' => $item->id,\n// 'product_info' => json_encode($activity->products)\n// );\n// $this->order_model->update($orderinfo, $item->id);\n// }\n\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有订单.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function get_result($item)\n {\n }", "public function fetchList();", "public function getResults();", "public function getResults(/* ... */)\n {\n return $this->_return;\n }", "function _syndicated_content_listings_page()\n{\n}", "static private function retrieveList() {\n\t\ttry {\n\t\t\t\n\t\t\tif (!isset($_SESSION['starCollection'])) {\n\t\t\t\tthrow new Exception('No list found in memory');\n\t\t\t} else {\n\t\t\t\treturn $_SESSION['starCollection'];\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $ex) {\n\t\t\tthrow $ex;\n\t\t}\n\t}", "public function what_ever_you_want()\n {\n $sql = \"Make a custom sql query for grabbing your data\";\n return static::custom_list($sql);\n }", "public function getListing(){\n $BusInfo = $this->BusinessOwnerModel->getBusinessID();\n \n foreach($BusInfo as $row1){\n $busID = $row1->bid;\n }\n \n $query = $this->db->get_where('BusinessListing', array('bid' => $busID));\n \n if($query->num_rows() > 0){\n foreach($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n return false;\n }", "public function lister()\r\n {\r\n }", "public function list();", "public function list();", "public function list();", "function print_results() {\r\n if ($list = $this->print_list()) {\r\n echo '<p>' . $this->print_count() . '</p>';\r\n echo $list;\r\n echo '<p class=\"more\">' . $this->print_more() . '</p>';\r\n }\r\n else {\r\n echo $this->zero_results;\r\n }\r\n }", "public abstract function getResults();", "public abstract function get_lists();", "function wp_ajax_fetch_list()\n {\n }", "public function index()\n {\n return auth()->user()\n ->wishlist()\n ->with('files')\n ->latest()\n ->paginate(request('per_page', config('fleetcart_api.per_page', 10)));\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n // get top10 datas\n // id: 1-top1, 2-top2, 3-top3, 4-top4, 5-top5\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"轮播图片\", \"类型\", \"单品活动/餐装活动/区域总代理\", \"排序\", \"新增日期\", \"操作\",);\n $cols = 7;\n $contentList = $this->carousel_model->getItems();\n $footer = (count($contentList) == 0||$contentList=='') ? $footer = \"没有轮播图项目.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function getShares();", "public static function add_to_comparison() {\n header( 'HTTP/1.0 200 OK' );\n header( 'Content-Type: application/json' );\n\n if ( ! empty( $_GET['id'] ) ) {\n $compare = Inventor_Visitor::get_data('compare');\n $compare = ! is_array( $compare ) || empty( $compare ) ? array() : $compare;\n\n $post = get_post( $_GET['id'] );\n $post_type = get_post_type( $post->ID );\n\n if ( ! in_array( $post_type, Inventor_Post_Types::get_listing_post_types() ) ) {\n $data = array(\n 'success' => false,\n 'message' => __( 'This is not listing ID.', 'inventor-compare' ),\n );\n } else {\n $found = false;\n\n foreach ( $compare as $listing_id ) {\n if ( $listing_id == $_GET['id']) {\n $found = true;\n break;\n }\n }\n\n if ( ! $found ) {\n $max_compare = 5;\n\n if ( count( $compare ) >= $max_compare ) {\n $data = array(\n 'success' => false,\n 'message' => sprintf( __( 'You can compare at most %d listings', 'inventor-compare' ), $max_compare )\n );\n } else {\n $compare[] = $post->ID;\n $count = count( $compare );\n\n $timeout_in_seconds = apply_filters( 'inventor_compare_timeout', 60*60 );\n Inventor_Visitor::save_data( 'compare', $compare, time() + $timeout_in_seconds );\n\n $data = array(\n 'success' => true,\n 'count' => $count,\n 'text' => sprintf( _n( 'Compare %d item', 'Compare %d items', $count, 'inventor-compare' ), $count )\n );\n }\n\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing is already in list', 'inventor-compare' ),\n );\n }\n }\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing ID is missing.', 'inventor-compare' ),\n );\n }\n\n echo json_encode( $data );\n exit();\n }", "function sold( $args )\n {\n \n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_sold_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n \n \n \n \n\t\t// limit to 10 displayed at a time\n\t\t$limit = 10;\n\t\t\n\t\t// default offer_page to 0\n\t\t$offer_page = 0;\n\t\t\n\t\t// set up offers page\n\t\tif( isset( $_GET['offerpage'] ) && \n\t\t\tis_numeric($_GET['offerpage']) \n\t\t){\n\t\t\t\n\t\t\t// set offer_page to the user provided value\n\t\t\t$offer_page = ((int) $_GET['offerpage'] ) - 1;\n\t\t}\n\t\t\n\t\t$offers_result = $offer_model->limit($limit)->\n\t\t\tpage($offer_page)->\n\t\t\tget_item_any_offer( (int) $result[0]['id'] );\n \n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "function publishResults()\n{\n\n //return\n\n}", "function waiting_list_list(){\r\n\t\t$jenis_rawat = isset($_POST['jenis_rawat']) ? $_POST['jenis_rawat'] : \"\";\r\n\t\t$tgl_app = isset($_POST['wl_tgl_app']) ? $_POST['wl_tgl_app'] : \"\";\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$karyawan_id = isset($_POST['karyawan_id']) ? $_POST['karyawan_id'] : \"\";\r\n\t\t$result=$this->m_waiting_list->waiting_list_list($query,$start,$end,$tgl_app,$jenis_rawat,$karyawan_id);\r\n\t\techo $result;\r\n\t}", "public function doListingsSearch()\r\n\t{\r\n\t\t$searchUrl = $this->dispatchNow(new GenerateSearchUrl(Input::all()));\r\n\r\n\t\treturn redirect()->route('browselistings.index', $searchUrl);\r\n\t}", "public function handel()\n {\n $this->run($this->listKey);\n }", "function wck_refresh_list( $meta = '', $id = '' ){\r\n\t\tif( isset( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\t\r\n\t\tif( isset( $_POST['id'] ) )\r\n\t\t\t$id = absint($_POST['id']);\t\t\r\n\r\n\t\tob_start();\t\t\t\r\n\t\t\techo self::wck_output_meta_content($meta, $id, $this->args['meta_array']);\r\n\t\t\tdo_action( \"wck_refresh_list_{$meta}\", $id );\r\n\t\t$entry_list = ob_get_clean();\r\n\t\t\r\n\t\tif( strpos( current_filter(), 'wp_ajax_wck_refresh_list') === 0 ){\r\n\t\t\techo $entry_list;\t\t\t\r\n\t\t\texit;\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn $entry_list;\r\n\t\t}\r\n\t}", "function getLista(){\n\n }", "function listContent()\n {\n }", "public function run() {\n\t\t$this->db->fetchAll('pundits');\n\t\t$this->response = array(\n\t\t\t'status' => 'success',\n\t\t\t'command'=> 'list',\n\t\t\t'data' => $this->db->get_last_result()\n\t\t);\n\t}", "public function listAction()\n {\n // some logic\n }", "public function listItems()\n {\n return null;\n }", "public function itemreturndetails(){\n\t$sel='ir_id,ir_itemid,ir_mtid,ir_name,ir_qty,ir_desc,ir_staffpfno,ir_staffname,ir_dept,ir_receivername,ir_creatordate';\n\t$whorder='ir_mtid asc,ir_itemid asc';\n\t$data['result'] = $this->picomodel->get_orderlistspficemore('items_return',$sel,'',$whorder);\n $this->logger->write_logmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n\t$this->logger->write_dblogmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n $this->load->view('itemaction/displayreturnitem',$data);\n }", "public function getItems()\n {\n }", "public function listAction() {}", "public function getItemsList(){\n return $this->_get(4);\n }", "public function lst()\n\t{\n\t\t$list = AdminModel::paginate(3);\n\t\t$this->assign('list',$list);\n\t\treturn $this->fetch();\n\t}", "public function returnWebmounts() {}", "public function onRefreshList()\n {\n $this->prepareComponent();\n\n return $this->refreshList();\n }", "public function getEntriesList(){\n return $this->_get(2);\n }", "abstract public function getList();", "public function sales_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/sales_return/list';\n $data['sales_returns'] = $this->MSales_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "public function browseAction() {\n $this->validateRequestMethod();\n // Prepare the response\n $params = $response = array();\n $params = $this->_getAllParams();\n Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n\n //GET PAGINATOR\n $params['pagination'] = 1;\n $paginator = Engine_Api::_()->getDbtable('wishlists', 'sitereview')->getBrowseWishlists($params);\n $page = $this->_getParam('page', 1);\n $limit = $this->_getParam('limit', 20);\n $paginator->setItemCountPerPage($limit);\n $paginator->setCurrentPageNumber($page);\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $totalItemCount = $paginator->getTotalItemCount();\n $totalPages = ceil(($totalItemCount) / $limit);\n $response['totalItemCount'] = $totalItemCount;\n if (!empty($totalItemCount)) {\n foreach ($paginator as $wishlistObj) {\n $wishlist = $wishlistObj->toArray();\n if (isset($wishlist['body']) && !empty($wishlist['body']))\n $wishlist['body'] = strip_tags($wishlist['body']);\n $lists = $wishlistObj->getWishlistMap(array('orderby' => 'listing_id'));\n $count = $lists->getTotalItemCount();\n $tempListings = array();\n $counter = 0;\n if (_ANDROID_VERSION >= '1.8.6' || _IOS_VERSION >= '1.8.0') {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n } else {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n }\n $wishlist = array_merge($wishlist, $tempListings);\n $check_availability = Engine_Api::_()->sitereview()->check_availability('sitereview_wishlist', $wishlistObj->wishlist_id);\n $checkFollowAvailablity = $wishlistObj->follows()->isFollow($viewer);\n $tempMenu = array();\n if (!empty($viewer_id)) {\n if (empty($check_availability)) {\n $wishlist['isLike'] = 0;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Like'),\n 'url' => '/like',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n } else {\n $wishlist['isLike'] = 1;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Unlike'),\n 'url' => '/unlike',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n }\n\n if (!empty($checkFollowAvailablity)) {\n $wishlist['followed'] = 1;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Unfollow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n } else {\n $wishlist['followed'] = 0;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Follow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n }\n\n $wishlist['gutterMenu'] = $tempMenu;\n }\n $tempResponse[] = $wishlist;\n }\n }\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $level_id = Engine_Api::_()->getDbtable('levels', 'authorization')->fetchRow(array('type = ?' => \"public\"))->level_id;\n }\n $can_create = ($viewer_id) ? 1 : 0;\n $response['canCreate'] = $can_create;\n if (!empty($tempResponse))\n $response['response'] = $tempResponse;\n $this->respondWithSuccess($response, true);\n }", "function my_list()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['list'] = $this->_bid->my_list();\n\t\t\n\t\t$this->load->view('bids/my_list', $data);\n\t}", "public function getItems(){\n\t\treturn $this->_makeCall('items?');\n\t}", "function listitems($name)\r\n\t\t{\r\n\t\t \t\r\n\t\t}", "function warkslibsGetCurrentLoans() {\n\trequire_once('simple_html_dom.php');\n\t// get barcode and PIN - just guessing how this works here (from warkslibs.php) - need to find out how to do this properly!\n\t$warkslibs_options = get_option('warkslibs_settings_values');\n\t$warkslibs_user_barcode = $warkslibs_options['warkslibs_user_barcode'];\n\t$warkslibs_user_pin = $warkslibs_options['warkslibs_user_pin'];\n\t$warkslibs_url = \"http://library.warwickshire.gov.uk/vs/Pa.csp?OpacLanguage=eng&Profile=Default\";\n\t$login = getLogin($warkslibs_url,$warkslibs_user_barcode,$warkslibs_user_pin);\n\t$currentLoans = getCurrent($login);\n\t\n\t$html = str_get_html($currentLoans);\n\n\tforeach($html->find('td.listitemOdd',0)->parent()->parent()->find('tr') as $list) {\n\t\t$libItem['title'] = $list->find('td', 1)->plaintext;\n\t\t$libItem['barcode'] = $list->find('td', 2)->plaintext;\n\t\t$libItem['dateBorrowed'] = $list->find('td', 4)->plaintext;\n\t\t$libItem['dateDue']\t= $list->find('td', 5)->plaintext;\n\t\t$libItem['timesRenewed']\t= $list->find('td', 6)->plaintext;\n\t\t$libItem['charge']\t\t= $list->find('td', 7)->plaintext;\n\t\tif ($libItem['title'] === \"Title\") {\n\t\t\tcontinue;\n\t\t}\n\t\t$libItems[] = $libItem;\n\t}\n\n\tforeach($libItems as $libItem) {\n\t\t$title_search = urlencode($libItem['title']);\n\t\tif (strlen($title_search) > 255) {\n\t\t\t$title_search = substr($title_search,0,255); \n\t\t}\n\t\t$xml = searchAquaB($title_search);\n\t\t$doc = new DOMDocument();\n\t\t$doc->loadXML($xml);\n\t\t$xpath = new DOMXPath($doc);\n\t\t$records = $doc->getElementsByTagName(\"record\");\n\t\tforeach($records as $record) {\n\t\t\t$title = aquaBTitle($record,$xpath);\n\t\t\t$titlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$title));\n\t\t\t$searchtitlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$libItem['title']));\n\t\t\tif (strcmp($titlekey,$searchtitlekey) != 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$libItem['title'] = $title;\n\t\t\t$libItem['isbn'] = aquaBISBN($record,$xpath);\n\t\t\t$libItem['auth'] = aquaBAuth($record,$xpath);\n\t\t\t$libItem['image'] = aquaBImage($record,$xpath);\n\t\t\t// ID retrieval not work at the moment\n\t\t\t// Why not?\n\t\t\t$libItem['id'] = aquaBID($record,$xpath);\n\t\t\t//Need to output dates etc. as well if want to preserve these?\n\t\t\t\n\t\t\t$libItems1[] = $libItem;\n\t\t}\n\t}\n\t// At this point we have an array of arrays listing all of the current loans\n\t// Non-unique titles have been expanded into multiple records\n\t// The user can (in theory) choose the ones they actually have (or just the ones they want to blog)\n\t// Then press 'blog these' (or similar) and create multiple blog posts (in draft)\n\t// So at this point want to output stuff to the screen with all information included in form\n\t// Then grab this all back when form submitted?\n\t// Alternative is to just submit the relevant URLs of the form\n\t// http://librarycatalogue.warwickshire.gov.uk/abwarwick/fullrecordinnerframe.ashx?hreciid=|library/vubissmart-marc|494187&output=xml\n\t// And do a further retrieve to get the information needed - but this increases network traffic for no gain?\n\t// See http://www.sitepoint.com/forums/php-34/$_post-ing-checkbox-values-corresponding-form-values-182722.html for how to do this\n\t\n\t// So - try outputting items\n\techo '<form method=\"post\" action=\"\"><input name=\"blogem\" value=\"yes\" id=\"blogem\" type=\"hidden\">';\n\techo '<ul>';\n\t$no_libItems = count($libItems1);\n\tfor($i=0; $i<$no_libItems; $i++){\n\t\techo '<li>';\n\t\techo '<h3>'.$libItems1[$i]['title'].'</h3>';\n\t\t// display cover image\n\t\techo \"<img src=\".$libItems1[$i]['image'].\" alt='Coverimage of \".$libItems1[$i]['title'].\"'>\\n\"; // need to check if it exists, otherwise?\n\t\t// print the item title\n\t\t// Do any of these need encoding? URL?\n\t\techo '<input name=\"libitem['.$i.'][choose]\" value=\"1\" id=\"choose\" type=\"checkbox\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][title]\" value=\"'.$libItems1[$i]['title'].'\" id=\"title\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][isbn]\" value=\"'.$libItems1[$i]['isbn'].'\" id=\"isbn\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][auth]\" value=\"'.$libItems1[$i]['auth'].'\" id=\"auth\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][image]\" value=\"'.$libItems1[$i]['image'].'\" id=\"image\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][id]\" value=\"'.$libItems1[$i]['id'].'\" id=\"id\" type=\"hidden\">'; // is 'id' required?\n\t\techo '</li>';\n }\n\techo '<input type=\"submit\" name=\"itemstoblog\" value=\"Blog these...\" /></form><br />';\n echo '</ul>';\n\t\n/* This is where the Amazon Enhancement could go\n// Some idea of the code might be:\n$no_libItems = count($libItems1);\nfor($i=0; $i<$no_libItems; $i++){\n\t// Do Amazon lookup and enhance item (via function)\n}\n*/\n\n}", "public function getResults(){\n $this->results;\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();", "public function api_entry_list() {\n $data = $this->Mdl_Users->get_list(\n $_POST['rp'],\n $_POST['page'],\n $_POST['query'],\n $_POST['qtype'],\n $_POST['sortname'],\n $_POST['sortorder']);\n\n echo json_encode(array(\n 'page'=>$_POST['page'],\n 'total'=>$this->Mdl_Users->get_length(),\n 'rows'=>$data,\n ));\n }", "private function buildListing(){\n\t\t// link any necessary javascript files\n\t\t$html = Loader::helper('html');\n\t\t$f = Loader::helper('concrete/file');\n\t\t$expensiveCache = \\Core::make('cache/expensive');\n\n\t\t// listing cache file\n\t\t$listCacheFle = DIR_FILES_UPLOADED_STANDARD.'/listingcache.js';\n\t\t\n\t\t// init vars\t\t\n\t\t$movie_data_arr = array();\n\t\t$sel_dates_arr = array();\n\t\t$soon_dates_arr = array();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&movie_id=211358'));\n\t\t\t\t\t\t\t\n\t\t// retrieve cached values\n\t\t$updated_listing = $expensiveCache->getItem('movieFeed');\n\t\t//$updated_listing->clear();\n\t\t$listCheck = $updated_listing;\n\t\t$updated_listing = $updated_listing->get();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&search=AL13222'));\n\t\t\n\t\t// reload listing if cache is found to be empty\n\t\tif($listCheck->isMiss()){\n\n\t\t\t// gather theater movie listing\n\t\t\t$rtsListing = json_decode(json_encode((array) simplexml_load_string($this->getRTSData('ShowTimeXml'))), 1);\n\t\t\t$listing = $this->getWWMListingData();\n\t\t\t//$rtsListing = $this->getRTSListing();\n\t\t\t\n\t\t\t// 11-29-2013 force reload if listing data if blank\n\t//\t\tif(empty($listing)){\n//\t\t\t\t$this->buildListing();\n//\t\t\t}\n\t\t\t\n\t\t\t// convert to PHP array\n\t\t\t$listing = json_decode(json_encode((array) simplexml_load_string($listing)), 1);\n\n\t\t\t// store movie data\n\t\t\t$movie_listing = $listing['house']['schedule']['movie'];\n\t\t\t$updated_listing = $movie_listing;\n\n\t\t\t// walk through all movies per location\n\t\t\tforeach($movie_listing as $movie){\n\t\t\t\t\n\t\t\t\t// check for movie tickets film code\n\t\t\t\tif(!empty($movie['movie_id'])){\n\t\t\t\t\t// gather movie data\n\t\t\t\t\t$movie_data = $expensiveCache->getItem('movieData'.$movie['movie_id']);\n\t\t\t\t\t// store in cache if not found\n\t\t\t\t\tif ($movie_data->isMiss()) {\n\t\t\t\t\t\t$movie_data->lock();\n\t\t\t\t\t\t$movie_data_new = $this->getMovieDataWWM($movie['movie_id']);\n\t\t\t\t\t\t$movie_data->set($movie_data_new,86400);\n\t\t\t\t\t}\n\t\t\t\t\t$movie_data = $movie_data->get();\n\t\t\t\t\t\n\t\t\t\t\t// add to movie data array\n\t\t\t\t\t$movie_data_arr[$movie['movie_id']] = $movie_data;\n\n\t\t\t\t\t// generate selectable date hash\n\t\t\t\t\t// check for show within assigned RTS showtimes\n\t\t\t\t\tforeach($rtsListing['ShowSchedule']['Films']['Film'] as $film){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check cinema source film code vs stored RTS cinema source film code\n\t\t\t\t\t\tif($film['CSCode'] == $movie['movie_id']){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// check for single or multiple shows\n\t\t\t\t\t\t\t$shows = array();\n\t\t\t\t\t\t\tif(empty($film['Shows']['Show']['DT'])){\n\t\t\t\t\t\t\t\t$shows = $film['Shows']['Show'];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$shows[0] = $film['Shows']['Show'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t// add date/time values to selectable date hash\n\t\t\t\t\t\t\tforeach($shows as $curShow){\n\t\t\t\t\t\t\t\t// check for ticket internet availability\n\t\t\t\t\t\t\t\t$tickets = array();\n\t\t\t\t\t\t\t\tif(empty($curShow['TIs']['TI']['C'])){\n\t\t\t\t\t\t\t\t\t$tickets = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$tickets[0] = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tforeach($tickets as $TI){\n\t\t\t\t\t\t\t\t\t$ticket = $this->ticketLookup($rtsListing, $TI['C']);\n\t\t\t\t\t\t\t\t\t// store current showtimes\n\t\t\t\t\t\t\t\t\t// convert date/time\n\t\t\t\t\t\t\t\t\t$showDate = substr($curShow['DT'], 0, 8);\n\t\t\t\t\t\t\t\t\tif(!empty($ticket) && empty($ticket['HideOnInternet'])){\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tforeach($movie['showtimes'] as $curShowTime){\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$curShowTime['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$curShowTime['@attributes']['date']] = strtotime($curShowTime['@attributes']['date']);\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\t\n\t\t\t\t\t\t\t\t\t// store upcoming showtimes\n\t\t\t\t\t\t\t\t\t} elseif (count($tickets) == 1 && !empty($ticket) && $ticket['HideOnInternet'] == 1 && $ticket['Name'] == 'rSupersvr') {\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$soon_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t}\n\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\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\t//print_r($movie_data);\n\t\t\t\t\t\n\t\t\t\t\t// walk through movie data and save images to media library where needed\n\t\t\t\t\tif($movie_data['photos']['photo'] || $movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// download image save to cache then delete\n\t\t\t\t\t\t$myFile = ereg_replace(\"[^A-Za-z0-9-]\", \"_\", trim($movie_data['name'])).'.jpg';\n\t\t\t\t\t\t$myFile = preg_replace('/[_]+/', '_', $myFile);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check for existing poster file\n\t\t\t\t\t\t$db = Loader::db();\n\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\tif (!$det) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// pull remote file\n\t\t\t\t\t\t\tif(count($movie_data['hiphotos']['photo']) > 1){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'];\n\t\t\t\t\t\t\t} elseif(count($movie_data['photos']['photo']) > 0) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['photos']['photo']) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$new_image = $this->get_data($imgLnk);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$myFileLocation = DIR_FILES_UPLOADED_STANDARD.'/cache/'.$myFile;\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation)){\n\t\t\t\t\t\t\t\t$fh = fopen($myFileLocation, 'w');\n\t\t\t\t\t\t\t\t$stringData = $new_image;\n\t\t\t\t\t\t\t\tfwrite($fh, $stringData);\n\t\t\t\t\t\t\t\tfclose($fh);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation) || filesize($myFileLocation) > 0){\n\t\t\t\t\t\t\t\t$error = \\Concrete\\Core\\File\\Importer::E_PHP_FILE_ERROR_DEFAULT;\n\t\t\t\t\t\t\t\t$fi = new \\Concrete\\Core\\File\\Importer();\n\t\t\t\t\t\t\t\t$newFile = $fi->import($myFileLocation,$myFile);\n\t\t\t\t\t\t\t\tif(!is_object($newFile)) {\n\t\t\t\t\t\t\t\t\t$this->set('errorMessage', \\Concrete\\Core\\File\\Importer::getErrorMessage($error)); \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// delete cached file\n\t\t\t\t\t\t\t\tunlink($myFileLocation);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//echo $myFileLocation;\n//\t\t\t\t\t\t\techo $myFile;\n//\t\t\t\t\t\t\tprint_r($movie_data);\n//\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// update poster art to use local relative path\n\t\t\t\t\t\t$movie_data_arr[$movie['movie_id']]['photos']['photo'] = $path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$path = 'null';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// store queried show dates\n\t\t\t$movieFeed = $expensiveCache->getItem('movieFeed');\n\t\t\t// store in cache if not found\n\t\t\tif ($movieFeed->isMiss()) {\n\t\t\t\t$movieFeed->lock();\n\t\t\t\t$movie_feed_new = $updated_listing;\n\t\t\t\t$movieFeed->set($movie_feed_new,7200);\n\t\t\t}\n\t\t\t$movieFeed = $movieFeed->get();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t// convert to JSON\n\t\t\tasort($sel_dates_arr);\n\t\t\t$sel_dates_arr = json_encode($sel_dates_arr);\n\t\t\tasort($soon_dates_arr);\n\t\t\t$soon_dates_arr = json_encode($soon_dates_arr);\n\t\t\t$updated_listing = json_encode($updated_listing);\n\t\t\t$rtsListing = json_encode($rtsListing);\n\t\t\t$movie_data_arr = json_encode($movie_data_arr);\n\t\t\t\n\t\t\t$final_listing = 'var dateOpts = ' . $sel_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var soonDateOpts = ' . $soon_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var listingData = ' . $updated_listing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var rtsListingData = ' . $rtsListing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var movieData = ' . $movie_data_arr . ';';\n\t\t\t\n\t\t\t// save as static file\n\t\t\ttouch($listCacheFle);\n\t\t\t$fh = fopen($listCacheFle, 'w');\n\t\t\tfwrite($fh, $final_listing);\n\t\t\tfclose($fh);\n\n\t\t}\n\t\t\n\t\t// add json variables to footer\n\t\t$this->addFooterItem($html->javascript(DIR_REL.'/application/files/listingcache.js'));\n\t\t\n\t\t// transfer usable variables\n\t\t//$this->set('jsAPI', $updated_listing);\n\t}", "function getListResults ( $ListID, $use_cache = TRUE )\n\t{\n\n\t\t$is_cached = false;\n\t\tif ( $use_cache ) {\n\t\t\t$wishlist = get_option( $this->db_options_name_cached_wishlist );\n\n\t\t\tif ( is_array( $wishlist ) ) {\n\t\t\t\tif ( isset( $wishlist[$ListID] ) ) {\n\t\t\t\t\t//$wishlist = unserialize( $cached_wishlist );\n\t\t\t\t\tif ( (time() - $wishlist[$ListID]['time']) < 60 * 60 * 23 ) {\n\t\t\t\t\t\t$is_cached = true;\n\t\t\t\t\t\t$list = $wishlist[$ListID]['list'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( ! $is_cached ) {\n\t\t\t$list = $this->handleRESTcall( $this->getRestListLookupParams( $ListID ) );\n\n\t\t\tif ( 1 == $list['Lists']['List']['TotalItems'] ) {\n\t\t\t\t$list['Lists']['List']['ListItem'] = array ('0' => $list['Lists']['List']['ListItem'] ); // If one item in the list we need to make it a multi array\n\t\t\t} else {\n\t\t\t\tif ( $list['Lists']['List']['TotalPages'] > 1 ) { // If the list contains over 10 items we need to process the other pages.\n\t\t\t\t\t$page = 2;\n\t\t\t\t\twhile ( $page <= $list['Lists']['List']['TotalPages'] ) {\n\t\t\t\t\t\t$result = $this->handleRESTcall( $this->getRestListLookupParams( $ListID, null, $page ) );\n\t\t\t\t\t\tforeach ( $result['Lists']['List']['ListItem'] as $key => $value ) {\n\t\t\t\t\t\t\t$newkey = 10 * ($page - 1) + $key;\n\t\t\t\t\t\t\t$list['Lists']['List']['ListItem'][$newkey] = $value; //Add the items from the remaining pages to the lists.\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$page ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! (isset( $list['Lists']['Request']['Errors'] ) || isset( $list['Error'] )) ) {\n\t\t\t\t$wishlist[$ListID]['time'] = time();\n\t\t\t\t$wishlist[$ListID]['list'] = $list;\n\t\t\t\tupdate_option( $this->db_options_name_cached_wishlist, $wishlist );\n\t\t\t}\n\t\t}\n\n\t\treturn ($list);\n\t}", "function _ajax_fetch_custom_list_callback() {\n\n\t$wp_list_table = new TT_Example_List_Table();\n\t$wp_list_table->ajax_response();\n}", "public function listings($method='GET')\n\t{\n \n $data_tmp['listing_uri'] = config_item('listing_uri');\n if(empty($data_tmp['listing_uri']))$data_tmp['listing_uri'] = 'property'; \n \n $this->load->model('language_m');\n $this->load->model('estate_m');\n $this->load->model('option_m');\n \n $this->data['message'] = lang_check('Something is wrong with request');\n $this->data['token_available'] = FALSE;\n $POST = $this->input->get_post(NULL, TRUE);\n \n if(isset($POST['lang_code']))\n {\n $lang_id = $this->language_m->get_id($POST['lang_code']);\n }\n \n if(empty($lang_id))$lang_id=$this->language_m->get_default_id();\n $lang_code = $this->language_m->get_code($lang_id);\n \n $token = $this->token_m->get_token($POST);\n if(is_object($token))\n $this->data['token_available'] = TRUE;\n \n if(is_object($token))\n {\n if($method == 'GET')\n {\n $options = $this->option_m->get_field_list($this->language_m->get_default_id());\n $this->db->join('property_user', 'property_user.property_id = property.id', 'right');\n $this->db->where('user_id', $token->user_id);\n $estates = $this->estate_m->get_by(array('language_id'=>$lang_id));\n \n // Set website details\n $json_data = array();\n // Add listings to rss feed \n foreach($estates as $key=>$row){\n $estate_date = array();\n $title = $this->estate_m->get_field_from_listing($row, 10);\n $url = site_url($data_tmp['listing_uri'].'/'.$row->id.'/'.$lang_code.'/'.url_title_cro($title));\n \n $row->json_object = json_decode($row->json_object);\n $row->image_repository = json_decode($row->image_repository);\n $estate_date['url'] = $url;\n $estate_date['listing'] = $row;\n \n $json_data[] = $estate_date;\n }\n \n $this->data['results'] = $json_data;\n \n $this->data['message'] = lang_check('Results available');\n }\n elseif($method == 'DELETE' && isset($POST['property_id']))\n {\n $this->load->library('session');\n $property_id = $POST['property_id'];\n \n $this->data['success'] = false;\n // Check if property_id already saved, stop and write message\n if($this->estate_m->check_user_permission($property_id, $token->user_id)>0)\n {\n $this->estate_m->delete($property_id);\n \n $this->data['message'] = lang_check('Listing removed!');\n $this->data['success'] = true;\n }\n // Save favorites to database\n else\n {\n $this->data['message'] = lang_check('Listing doesnt exists!');\n $this->data['success'] = true;\n }\n }\n }\n\n echo json_encode($this->data);\n exit();\n\t}", "protected function _executeGetList() {\n // Init\n $list = array();\n\n $pid = (int)$this->_postVar['pid'];\n $offset = (int)$this->_postVar['start'];\n $limit = (int)$this->_postVar['limit'];\n $itemsPerPage = (int)$this->_postVar['pagingSize'];\n $depth = (int)$this->_postVar['depth'];\n $sysLanguage = (int)$this->_postVar['sysLanguage'];\n $listType = (string)$this->_postVar['listType'];\n\n // Store last selected language\n $GLOBALS['BE_USER']->setAndSaveSessionData('TQSeo.sysLanguage', $sysLanguage);\n\n if (!empty($pid)) {\n $page = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord('pages', $pid);\n\n $fieldList = array();\n\n switch ($listType) {\n case 'metadata':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'keywords',\n 'description',\n 'abstract',\n 'author',\n 'author_email',\n 'lastupdated',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n\n unset($row);\n foreach ($list as &$row) {\n if (!empty($row['lastupdated'])) {\n $row['lastupdated'] = date('Y-m-d', $row['lastupdated']);\n } else {\n $row['lastupdated'] = '';\n }\n }\n unset($row);\n break;\n\n case 'geo':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_geo_lat',\n 'tx_tqseo_geo_long',\n 'tx_tqseo_geo_place',\n 'tx_tqseo_geo_region'\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'searchengines':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_canonicalurl',\n 'tx_tqseo_is_exclude',\n 'tx_tqseo_priority',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'url':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'title',\n 'url_scheme',\n 'alias',\n 'tx_realurl_pathsegment',\n 'tx_realurl_pathoverride',\n 'tx_realurl_exclude',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitle':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_pagetitle',\n 'tx_tqseo_pagetitle_rel',\n 'tx_tqseo_pagetitle_prefix',\n 'tx_tqseo_pagetitle_suffix',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitlesim':\n $buildTree = FALSE;\n $list = $this->_listPageTitleSim($page, $depth, $sysLanguage);\n break;\n\n default:\n // Not defined\n return;\n break;\n }\n }\n\n $ret = array(\n 'results' => count($list),\n 'rows' => array_values($list),\n );\n\n return $ret;\n }", "function displayCreateListing() {\r\n displayModifyListing(\"processListing.php\", \"createListing\", \"\", \"\", \"\",\"\",\"\", \"\");\r\n}", "public function getArtists($status);", "function getMainActions(){\n $step = $this->getStep($this->listing->user_id);\n $data=[];\n\n /**\n * Hide buttons when listing is not on steps\n */\n if(isset($step) && $step->date_end != '0000-00-00 00:00:00')\n {\n /**\n * APPROVE AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_ACTIVE)\n {\n $data[]=[\n /** Approve and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_approve_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-approve action-btn',\n ];\n }\n /**\n * REJECT AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->featured == \\Orm\\Model\\Listings\\Listings::NOT_FEATURED){\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_DELETED)\n {\n $data[]=[\n /** REJECT and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_reject_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-reject action-btn',\n ];\n }\n }\n return $data;\n }\n }", "public function listing() {\r\n $options = get_option( 'myhome_redux' );\r\n $show_advanced = is_null( $options['mh-listing-show_advanced'] ) ? true : intval( $options['mh-listing-show_advanced'] );\r\n $show_clear = is_null( $options['mh-listing-show_clear'] ) ? true : intval( $options['mh-listing-show_clear'] );\r\n $show_sort_by = is_null( $options['mh-listing-show_sort_by'] ) ? true : intval( $options['mh-listing-show_sort_by'] );\r\n $show_view_types = is_null( $options['mh-listing-show_view_types'] ) ? true : intval( $options['mh-listing-show_view_types'] );\r\n $advanced_number = is_null( $options['mh-listing-search_form_advanced_number'] ) ? 3 : intval( $options['mh-listing-search_form_advanced_number'] );\r\n // settings from Listing options page\r\n $atts = array(\r\n 'lazy_loading' => $options['mh-listing-lazy_loading'] ? 'true' : 'false',\r\n 'lazy_loading_limit' => intval( $options['mh-listing-load_more_button_number'] ),\r\n 'load_more_button' => $options['mh-listing-load_more_button_label'],\r\n 'load_prev_button' => $options['mh-listing-load_prev_button_label'],\r\n 'listing_default_view' => $options['mh-listing-default_view'],\r\n 'estates_per_page' => $options['mh-listing-estates_limit'],\r\n 'search_form_position' => $options['mh-listing-search_form_position'],\r\n 'label' => $options['mh-listing-label'],\r\n 'search_form_advanced_number' => $advanced_number,\r\n 'show_advanced' => $show_advanced ? 'true' : 'false',\r\n 'show_clear' => $show_clear ? 'true' : 'false',\r\n 'show_sort_by' => $show_sort_by ? 'true' : 'false',\r\n 'show_view_types' => $show_view_types ? 'true' : 'false',\r\n 'agent_id' => $this->id, // get estates only from this agent\r\n 'map' => false\r\n );\r\n\r\n // prepare attributes\r\n foreach ( My_Home_Attribute::get_attributes() as $attr ) {\r\n $value = $options['mh-listing-' . $attr->get_slug() . '_show'];\r\n $atts[$attr->get_slug() . '_show'] = $value ? 'true' : 'false';\r\n }\r\n\r\n // initiate listing\r\n $listing = new My_Home_Listing( $atts );\r\n ?>\r\n <div class=\"mh-listing--full-width mh-listing--horizontal-boxed\">\r\n <?php $listing->listing(); ?>\r\n </div>\r\n <?php\r\n }", "public function getList()\n {\n }", "public function purchase_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/purchase_return/list';\n $data['purchase_returns'] = $this->MPurchase_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "function get_results($args)\n {\n }", "function get_results($args)\n {\n }", "function alat_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\r\n\t\t$result=$this->m_alat->alat_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "function booksList($offset, $total_records_per_page, $order, $ascdesc)\n{\n $booksManager = new ListManager();\n\n\n\n if (isset($_GET['search']) && $_GET['search']!='') {\n $search = input(addcslashes($_GET['search'], '_'));\n $search=\"%\".$search.\"%\";\n $books = $booksManager->get_search($offset, $total_records_per_page, $order, $ascdesc, $search);\n } elseif (isset($_GET['cat']) && $_GET['cat']!='') {\n $cat = input($_GET['cat']);\n $books = $booksManager-> get_cat($offset, $total_records_per_page, $order, $ascdesc, $cat);\n } else {\n $books = $booksManager->selectAll($offset, $total_records_per_page, $order, $ascdesc); // Appel la fonction qui renvoie toutes les données sur les livres en bdd\n }\n // require('view/listView.php');\n return $books;\n echo selectAll();\n}", "public function index() {\n $output = $this->verifyProvidedInput(['keywords' => 'Keywords are required to perform a search']);\n\n if (empty($output)) {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n if (!empty($this->request->advancedSearch) && $this->request->advancedSearch) {\n $sortBy = (isset($this->request->sortBy) ? $this->request->sortBy : 'rawListPrice');\n $reverseSort = (isset($this->request->reverseSort) ? boolval($this->request->reverseSort) : false);\n $data = $this->getRETS->getListing()\n ->setSortBy($sortBy)\n ->setReverseSort($reverseSort)\n ->search($preparedKeywords, \n $this->request->extra, \n $this->request->maxPrice, \n $this->request->minPrice, \n $this->request->beds, \n $this->request->baths, \n $this->request->includeResidential, \n $this->request->includeLand, \n $this->request->includeCommercial);\n \n $this->addThumbnails($data);\n $output = $this->respondData($data);\n } else {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n $data = $this->getRETS->getListing()->searchByKeyword($preparedKeywords);\n $this->addThumbnails($data);\n $output = $this->respondData($data);\n }\n }\n\n return $output;\n }", "public function get_json_results() {\n }", "public function index()\n {\n //qui ritorno l'elenco delle liste\n //return TodoList::paginate(20);\n $lists = TodoList::paginate(20);\n return $this->getResult($lists->toArray());\n }", "public function index()\n {\n $data= Pizza::get()->toArray();\n if($data)\n {\n return $this->response(true,'rows successfully listed',$data);\n }\n return $this->response(false,'no rows found',[]);\n }", "function list(){\n $res = $res = $this->client->request('GET',$this->path,[]);\n $this->checkResponse($res,array(200));\n return $res;\n }", "public function action() {\n $this->curPos ++;\n usleep(250000);\n// # advanced finish if you need it for some reason:\n// if($this->curPos>40) return 'We have finished right now!';\n return array('lastItem'=>$this->curPos, 'itemCount'=>$this->count);\n }", "abstract public function getResults(): mixed;" ]
[ "0.69911814", "0.69135123", "0.6191085", "0.61634105", "0.6106261", "0.6106261", "0.60919493", "0.6079555", "0.60730743", "0.60586506", "0.6057292", "0.5979495", "0.59759116", "0.5966504", "0.5867618", "0.58074546", "0.5806632", "0.58025557", "0.5796107", "0.5766682", "0.57637703", "0.57054", "0.5705112", "0.56637645", "0.56479096", "0.5631926", "0.5583362", "0.5580018", "0.5580018", "0.5580018", "0.55795205", "0.5572956", "0.5563976", "0.5549063", "0.5546685", "0.55426294", "0.55390215", "0.552659", "0.55246454", "0.5522747", "0.5511233", "0.548951", "0.5487353", "0.54846007", "0.54828846", "0.54735667", "0.54718083", "0.5470762", "0.5467904", "0.5464692", "0.5455951", "0.545373", "0.54340076", "0.5425628", "0.5422889", "0.5420882", "0.5418302", "0.54169947", "0.5415513", "0.54146254", "0.5407161", "0.5389055", "0.5387423", "0.53825194", "0.5381398", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5375336", "0.536375", "0.53622645", "0.53530973", "0.53520507", "0.5348448", "0.5329882", "0.53291476", "0.53288126", "0.53225636", "0.5321964", "0.53211683", "0.5318913", "0.5318913", "0.53172415", "0.53120136", "0.52992517", "0.5295117", "0.52885616", "0.5285489", "0.5285226", "0.52809364", "0.52773446" ]
0.0
-1
get returns after a listing has been made
public function get_promo_update_details($dom, $sku, $item_id){ //push each entry into new array $update_item_array = array(); $update_item_response = $dom->getElementsByTagName(DOM_ELEMENT_ADD_PROMO_RESPONSE); foreach ($update_item_response as $item){ //ad sku to first entry of array array_push($update_item_array, $sku); array_push($update_item_array, $item_id); //errors $error_messages = $item->getElementsByTagName(DOM_ELEMENT_ERRORS); foreach ($error_messages as $errormsg){ $error = trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) != "" ? trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) : "No Error"; array_push($update_item_array, $error); } } return $update_item_array; //DOM_ELEMENT_SHORT_ERROR_MSG }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listing();", "function listing() {\r\n\r\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}", "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}", "function getItems();", "function getItems();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n\n $header = array(\"优惠券编号\", \"优惠券金额\", \"所属终端便利店账号\", \"终端便利店\", \"状态\", \"赠送时间\", \"使用时间\");\n $cols = 7;\n\n $contentList = $this->coupon_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有优惠券.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "public function listing() {\n $this->response->setData(1);\r\n $this->response->setHeader('__OK', Http::Response(Http::OK));\r\n return TRUE;\r\n }", "public function listAction() {\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $photo_id = (int) $this->_getParam('photo_id');\n\n // CHECK AUTHENTICATION\n // CHECK AUTHENTICATION\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $sitereview = $subject = Engine_Api::_()->core()->getSubject('sitereview_listing');\n } else if (Engine_Api::_()->core()->hasSubject('sitereview_photo')) {\n $photo = $subject = Engine_Api::_()->core()->getSubject('sitereview_photo');\n $listing_id = $photo->listing_id;\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n }\n $bodyResponse = $tempResponse = array();\n $listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, \"edit_listtype_$sitereview->listingtype_id\");\n $listingtype_id = $this->_listingType->listingtype_id;\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $photoCount = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id)->photo_count;\n $paginator = $sitereview->getSingletonAlbum()->getCollectiblesPaginator();\n\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo = $allowed_upload_photo;\n if (empty($photoCount))\n $allowed_upload_photo = $allowed_upload_photo;\n elseif ($photoCount <= $paginator->getTotalItemCount())\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = $allowed_upload_photo;\n\n //GET ALBUM\n $album = $sitereview->getSingletonAlbum();\n\n\n /* RETURN THE LIST OF IMAGES, IF FOLLOWED THE FOLLOWING CASES: \n * - IF THERE ARE GET METHOD AVAILABLE.\n * - iF THERE ARE NO $_FILES AVAILABLE.\n */\n if (empty($_FILES) && $this->getRequest()->isGet()) {\n $requestLimit = $this->getRequestParam(\"limit\", 10);\n $page = $requestPage = $this->getRequestParam(\"page\", 1);\n\n //GET PAGINATOR\n $album = $sitereview->getSingletonAlbum();\n $paginator = $album->getCollectiblesPaginator();\n\n $bodyResponse[' totalPhotoCount'] = $totalItemCount = $bodyResponse['totalItemCount'] = $paginator->getTotalItemCount();\n $paginator->setItemCountPerPage($requestLimit);\n $paginator->setCurrentPageNumber($requestPage);\n // Check the Page Number for pass photo_id.\n if (!empty($photo_id)) {\n for ($page = 1; $page <= ceil($totalItemCount / $requestLimit); $page++) {\n $paginator->setCurrentPageNumber($page);\n $tmpGetPhotoIds = array();\n foreach ($paginator as $photo) {\n $tmpGetPhotoIds[] = $photo->photo_id;\n }\n if (in_array($photo_id, $tmpGetPhotoIds)) {\n $bodyResponse['page'] = $page;\n break;\n }\n }\n }\n\n if ($totalItemCount > 0) {\n foreach ($paginator as $photo) {\n $tempImages = $photo->toArray();\n\n // Add images\n $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo);\n $tempImages = array_merge($tempImages, $getContentImages);\n\n $tempImages['user_title'] = $photo->getOwner()->getTitle();\n $tempImages['likes_count'] = $photo->likes()->getLikeCount();\n $tempImages['is_like'] = ($photo->likes()->isLike($viewer)) ? 1 : 0;\n \n //Sitereaction Plugin work start here\n if (Engine_Api::_()->getApi('Siteapi_Feed', 'advancedactivity')->isSitereactionPluginLive()) {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitereaction') && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereaction.reaction.active', 1)) {\n $popularity = Engine_Api::_()->getApi('core', 'sitereaction')->getLikesReactionPopularity($photo);\n $feedReactionIcons = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getLikesReactionIcons($popularity, 1);\n $tempImages['reactions']['feed_reactions'] =$tempImages['feed_reactions'] = $feedReactionIcons;\n\n if (isset($viewer_id) && !empty($viewer_id)) {\n $myReaction = $photo->likes()->getLike($viewer);\n if (isset($myReaction) && !empty($myReaction) && isset($myReaction->reaction) && !empty($myReaction->reaction)) {\n $myReactionIcon = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getIcons($myReaction->reaction, 1);\n $tempImages['reactions']['my_feed_reaction'] =$tempImages['my_feed_reaction'] = $myReactionIcon;\n }\n }\n }\n }\n //Sitereaction Plugin work end here\n if (!empty($viewer) && ($tempMenu = $this->getRequestParam('menu', 1)) && !empty($tempMenu)) {\n $menu = array();\n\n if ($photo->user_id == $viewer_id) {\n $menu[] = array(\n 'label' => $this->translate('Edit'),\n 'name' => 'edit',\n 'url' => 'listings/photo/edit/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Delete'),\n 'name' => 'delete',\n 'url' => 'listings/photo/delete/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n }\n $menu[] = array(\n 'label' => $this->translate('Share'),\n 'name' => 'share',\n 'url' => 'activity/index/share',\n 'urlParams' => array(\n \"type\" => $photo->getType(),\n \"id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Report'),\n 'name' => 'report',\n 'url' => 'report/create/subject/' . $photo->getGuid()\n );\n\n $menu[] = array(\n 'label' => $this->translate('Make Profile Photo'),\n 'name' => 'make_profile_photo',\n 'url' => 'members/edit/external-photo',\n 'urlParams' => array(\n \"photo\" => $photo->getGuid()\n )\n );\n\n $tempImages['menu'] = $menu;\n }\n\n if (isset($tempImages) && !empty($tempImages))\n $bodyResponse['images'][] = $tempImages;\n }\n }\n $bodyResponse['canUpload'] = $allowed_upload_photo;\n $this->respondWithSuccess($bodyResponse, true);\n } else if (isset($_FILES) && $this->getRequest()->isPost()) { // UPLOAD IMAGES TO RESPECTIVE EVENT\n if (empty($viewer_id) || empty($allowed_upload_photo))\n $this->respondWithError('unauthorized');\n $tablePhoto = Engine_Api::_()->getDbtable('photos', 'sitereview');\n $db = $tablePhoto->getAdapter();\n $db->beginTransaction();\n\n try {\n $viewer = Engine_Api::_()->user()->getViewer();\n $album = $sitereview->getSingletonAlbum();\n $rows = $tablePhoto->fetchRow($tablePhoto->select()->from($tablePhoto->info('name'), 'order')->order('order DESC')->limit(1));\n $order = 0;\n if (!empty($rows)) {\n $order = $rows->order + 1;\n }\n $params = array(\n 'collection_id' => $album->getIdentity(),\n 'album_id' => $album->getIdentity(),\n 'listing_id' => $sitereview->getIdentity(),\n 'user_id' => $viewer->getIdentity(),\n 'order' => $order\n );\n $photoCount = count($_FILES);\n if (isset($_FILES['photo']) && $photoCount == 1) {\n $photo_id = Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $_FILES['photo'])->photo_id;\n if (!$sitereview->photo_id) {\n $sitereview->photo_id = $photo_id;\n $sitereview->save();\n }\n } else if (!empty($_FILES) && $photoCount > 1) {\n foreach ($_FILES as $photo) {\n Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $photo);\n }\n }\n\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n }\n }\n }", "public function get_results()\n {\n }", "public function get_results()\n {\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['kind'] = 1;\n $searchData['login_user'] = $this->login_id;\n\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"账号\", \"姓名\", \"角色\", \"新增时间\", \"操作\");\n $cols = 6;\n\n $contentList = $this->user_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有数据.\" : '';\n break;\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "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}", "function item( $args )\n {\n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n\t\t$limit = 10;\n\t\t$offer_page = 0;\n \n // add a test if this listing has already been accepted\n if( $result[0]['status'] ==\n GarageSale\\BaseDatabase::STATUS_ACCEPTED \n ){\n \n // get offer result\n $offers_result = $offer_model->limit(1)->get_accepted( \n (int) $result[0]['id']\n );\n \n // set accepted flag to true\n $accepted = true;\n \n } else {\n \n \n // limit to 10 displayed at a time\n $limit = 10;\n \n // default offer_page to 0\n $offer_page = 0;\n \n // set up offers page\n if( isset( $_GET['offerpage'] ) && \n is_numeric($_GET['offerpage']) \n ){\n \n // set offer_page to the user provided value\n $offer_page = ((int) $_GET['offerpage'] ) - 1;\n }\n \n $offers_result = $offer_model->limit($limit)->\n page($offer_page)->\n get_item_any_offer( (int) $result[0]['id'] );\n }\n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t // load comment form\n\t $comment_form = $this->view->\n\t form('comment','listings/postcomment/'.$postid);\n\t $this->view->add('comment_form',$comment_form);\n\t \n\t \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Images 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}", "public function getResults()\n {\n }", "protected abstract function fetchLists();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['provider_id'] =$this->user_model->getProviderId($this->global['login_id']);\n\n // get top list data in homepage\n switch ($id) {\n case 1:\n if($this->isTicketter() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"配送员\", \"提交时间\", \"操作\");\n $cols = 10;\n }else if($this->isAdmin() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"所属区域总代理\", \"提交时间\", \"操作\");\n $cols = 10;\n }\n\n $contentList = $this->order_model->getItems($searchData);\n// foreach ($contentList as $item){\n// // get activity information\n// $activity = $this->activity_model->getItemById($item->activity_ids);\n// $activity->products = $this->activity_model->getProductsFromIds($activity->product_id, $activity->provider_id);\n//\n// $orderinfo = array(\n// 'id' => $item->id,\n// 'product_info' => json_encode($activity->products)\n// );\n// $this->order_model->update($orderinfo, $item->id);\n// }\n\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有订单.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function get_result($item)\n {\n }", "public function fetchList();", "public function getResults();", "public function getResults(/* ... */)\n {\n return $this->_return;\n }", "function _syndicated_content_listings_page()\n{\n}", "static private function retrieveList() {\n\t\ttry {\n\t\t\t\n\t\t\tif (!isset($_SESSION['starCollection'])) {\n\t\t\t\tthrow new Exception('No list found in memory');\n\t\t\t} else {\n\t\t\t\treturn $_SESSION['starCollection'];\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $ex) {\n\t\t\tthrow $ex;\n\t\t}\n\t}", "public function what_ever_you_want()\n {\n $sql = \"Make a custom sql query for grabbing your data\";\n return static::custom_list($sql);\n }", "public function getListing(){\n $BusInfo = $this->BusinessOwnerModel->getBusinessID();\n \n foreach($BusInfo as $row1){\n $busID = $row1->bid;\n }\n \n $query = $this->db->get_where('BusinessListing', array('bid' => $busID));\n \n if($query->num_rows() > 0){\n foreach($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n return false;\n }", "public function lister()\r\n {\r\n }", "public function list();", "public function list();", "public function list();", "function print_results() {\r\n if ($list = $this->print_list()) {\r\n echo '<p>' . $this->print_count() . '</p>';\r\n echo $list;\r\n echo '<p class=\"more\">' . $this->print_more() . '</p>';\r\n }\r\n else {\r\n echo $this->zero_results;\r\n }\r\n }", "public abstract function getResults();", "public abstract function get_lists();", "function wp_ajax_fetch_list()\n {\n }", "public function index()\n {\n return auth()->user()\n ->wishlist()\n ->with('files')\n ->latest()\n ->paginate(request('per_page', config('fleetcart_api.per_page', 10)));\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n // get top10 datas\n // id: 1-top1, 2-top2, 3-top3, 4-top4, 5-top5\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"轮播图片\", \"类型\", \"单品活动/餐装活动/区域总代理\", \"排序\", \"新增日期\", \"操作\",);\n $cols = 7;\n $contentList = $this->carousel_model->getItems();\n $footer = (count($contentList) == 0||$contentList=='') ? $footer = \"没有轮播图项目.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function getShares();", "public static function add_to_comparison() {\n header( 'HTTP/1.0 200 OK' );\n header( 'Content-Type: application/json' );\n\n if ( ! empty( $_GET['id'] ) ) {\n $compare = Inventor_Visitor::get_data('compare');\n $compare = ! is_array( $compare ) || empty( $compare ) ? array() : $compare;\n\n $post = get_post( $_GET['id'] );\n $post_type = get_post_type( $post->ID );\n\n if ( ! in_array( $post_type, Inventor_Post_Types::get_listing_post_types() ) ) {\n $data = array(\n 'success' => false,\n 'message' => __( 'This is not listing ID.', 'inventor-compare' ),\n );\n } else {\n $found = false;\n\n foreach ( $compare as $listing_id ) {\n if ( $listing_id == $_GET['id']) {\n $found = true;\n break;\n }\n }\n\n if ( ! $found ) {\n $max_compare = 5;\n\n if ( count( $compare ) >= $max_compare ) {\n $data = array(\n 'success' => false,\n 'message' => sprintf( __( 'You can compare at most %d listings', 'inventor-compare' ), $max_compare )\n );\n } else {\n $compare[] = $post->ID;\n $count = count( $compare );\n\n $timeout_in_seconds = apply_filters( 'inventor_compare_timeout', 60*60 );\n Inventor_Visitor::save_data( 'compare', $compare, time() + $timeout_in_seconds );\n\n $data = array(\n 'success' => true,\n 'count' => $count,\n 'text' => sprintf( _n( 'Compare %d item', 'Compare %d items', $count, 'inventor-compare' ), $count )\n );\n }\n\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing is already in list', 'inventor-compare' ),\n );\n }\n }\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing ID is missing.', 'inventor-compare' ),\n );\n }\n\n echo json_encode( $data );\n exit();\n }", "function sold( $args )\n {\n \n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_sold_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n \n \n \n \n\t\t// limit to 10 displayed at a time\n\t\t$limit = 10;\n\t\t\n\t\t// default offer_page to 0\n\t\t$offer_page = 0;\n\t\t\n\t\t// set up offers page\n\t\tif( isset( $_GET['offerpage'] ) && \n\t\t\tis_numeric($_GET['offerpage']) \n\t\t){\n\t\t\t\n\t\t\t// set offer_page to the user provided value\n\t\t\t$offer_page = ((int) $_GET['offerpage'] ) - 1;\n\t\t}\n\t\t\n\t\t$offers_result = $offer_model->limit($limit)->\n\t\t\tpage($offer_page)->\n\t\t\tget_item_any_offer( (int) $result[0]['id'] );\n \n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "function publishResults()\n{\n\n //return\n\n}", "function waiting_list_list(){\r\n\t\t$jenis_rawat = isset($_POST['jenis_rawat']) ? $_POST['jenis_rawat'] : \"\";\r\n\t\t$tgl_app = isset($_POST['wl_tgl_app']) ? $_POST['wl_tgl_app'] : \"\";\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$karyawan_id = isset($_POST['karyawan_id']) ? $_POST['karyawan_id'] : \"\";\r\n\t\t$result=$this->m_waiting_list->waiting_list_list($query,$start,$end,$tgl_app,$jenis_rawat,$karyawan_id);\r\n\t\techo $result;\r\n\t}", "public function doListingsSearch()\r\n\t{\r\n\t\t$searchUrl = $this->dispatchNow(new GenerateSearchUrl(Input::all()));\r\n\r\n\t\treturn redirect()->route('browselistings.index', $searchUrl);\r\n\t}", "public function handel()\n {\n $this->run($this->listKey);\n }", "function wck_refresh_list( $meta = '', $id = '' ){\r\n\t\tif( isset( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\t\r\n\t\tif( isset( $_POST['id'] ) )\r\n\t\t\t$id = absint($_POST['id']);\t\t\r\n\r\n\t\tob_start();\t\t\t\r\n\t\t\techo self::wck_output_meta_content($meta, $id, $this->args['meta_array']);\r\n\t\t\tdo_action( \"wck_refresh_list_{$meta}\", $id );\r\n\t\t$entry_list = ob_get_clean();\r\n\t\t\r\n\t\tif( strpos( current_filter(), 'wp_ajax_wck_refresh_list') === 0 ){\r\n\t\t\techo $entry_list;\t\t\t\r\n\t\t\texit;\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn $entry_list;\r\n\t\t}\r\n\t}", "function getLista(){\n\n }", "function listContent()\n {\n }", "public function run() {\n\t\t$this->db->fetchAll('pundits');\n\t\t$this->response = array(\n\t\t\t'status' => 'success',\n\t\t\t'command'=> 'list',\n\t\t\t'data' => $this->db->get_last_result()\n\t\t);\n\t}", "public function listAction()\n {\n // some logic\n }", "public function listItems()\n {\n return null;\n }", "public function itemreturndetails(){\n\t$sel='ir_id,ir_itemid,ir_mtid,ir_name,ir_qty,ir_desc,ir_staffpfno,ir_staffname,ir_dept,ir_receivername,ir_creatordate';\n\t$whorder='ir_mtid asc,ir_itemid asc';\n\t$data['result'] = $this->picomodel->get_orderlistspficemore('items_return',$sel,'',$whorder);\n $this->logger->write_logmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n\t$this->logger->write_dblogmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n $this->load->view('itemaction/displayreturnitem',$data);\n }", "public function getItems()\n {\n }", "public function listAction() {}", "public function getItemsList(){\n return $this->_get(4);\n }", "public function lst()\n\t{\n\t\t$list = AdminModel::paginate(3);\n\t\t$this->assign('list',$list);\n\t\treturn $this->fetch();\n\t}", "public function returnWebmounts() {}", "public function onRefreshList()\n {\n $this->prepareComponent();\n\n return $this->refreshList();\n }", "public function getEntriesList(){\n return $this->_get(2);\n }", "abstract public function getList();", "public function sales_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/sales_return/list';\n $data['sales_returns'] = $this->MSales_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "public function browseAction() {\n $this->validateRequestMethod();\n // Prepare the response\n $params = $response = array();\n $params = $this->_getAllParams();\n Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n\n //GET PAGINATOR\n $params['pagination'] = 1;\n $paginator = Engine_Api::_()->getDbtable('wishlists', 'sitereview')->getBrowseWishlists($params);\n $page = $this->_getParam('page', 1);\n $limit = $this->_getParam('limit', 20);\n $paginator->setItemCountPerPage($limit);\n $paginator->setCurrentPageNumber($page);\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $totalItemCount = $paginator->getTotalItemCount();\n $totalPages = ceil(($totalItemCount) / $limit);\n $response['totalItemCount'] = $totalItemCount;\n if (!empty($totalItemCount)) {\n foreach ($paginator as $wishlistObj) {\n $wishlist = $wishlistObj->toArray();\n if (isset($wishlist['body']) && !empty($wishlist['body']))\n $wishlist['body'] = strip_tags($wishlist['body']);\n $lists = $wishlistObj->getWishlistMap(array('orderby' => 'listing_id'));\n $count = $lists->getTotalItemCount();\n $tempListings = array();\n $counter = 0;\n if (_ANDROID_VERSION >= '1.8.6' || _IOS_VERSION >= '1.8.0') {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n } else {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n }\n $wishlist = array_merge($wishlist, $tempListings);\n $check_availability = Engine_Api::_()->sitereview()->check_availability('sitereview_wishlist', $wishlistObj->wishlist_id);\n $checkFollowAvailablity = $wishlistObj->follows()->isFollow($viewer);\n $tempMenu = array();\n if (!empty($viewer_id)) {\n if (empty($check_availability)) {\n $wishlist['isLike'] = 0;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Like'),\n 'url' => '/like',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n } else {\n $wishlist['isLike'] = 1;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Unlike'),\n 'url' => '/unlike',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n }\n\n if (!empty($checkFollowAvailablity)) {\n $wishlist['followed'] = 1;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Unfollow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n } else {\n $wishlist['followed'] = 0;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Follow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n }\n\n $wishlist['gutterMenu'] = $tempMenu;\n }\n $tempResponse[] = $wishlist;\n }\n }\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $level_id = Engine_Api::_()->getDbtable('levels', 'authorization')->fetchRow(array('type = ?' => \"public\"))->level_id;\n }\n $can_create = ($viewer_id) ? 1 : 0;\n $response['canCreate'] = $can_create;\n if (!empty($tempResponse))\n $response['response'] = $tempResponse;\n $this->respondWithSuccess($response, true);\n }", "function my_list()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['list'] = $this->_bid->my_list();\n\t\t\n\t\t$this->load->view('bids/my_list', $data);\n\t}", "public function getItems(){\n\t\treturn $this->_makeCall('items?');\n\t}", "function listitems($name)\r\n\t\t{\r\n\t\t \t\r\n\t\t}", "function warkslibsGetCurrentLoans() {\n\trequire_once('simple_html_dom.php');\n\t// get barcode and PIN - just guessing how this works here (from warkslibs.php) - need to find out how to do this properly!\n\t$warkslibs_options = get_option('warkslibs_settings_values');\n\t$warkslibs_user_barcode = $warkslibs_options['warkslibs_user_barcode'];\n\t$warkslibs_user_pin = $warkslibs_options['warkslibs_user_pin'];\n\t$warkslibs_url = \"http://library.warwickshire.gov.uk/vs/Pa.csp?OpacLanguage=eng&Profile=Default\";\n\t$login = getLogin($warkslibs_url,$warkslibs_user_barcode,$warkslibs_user_pin);\n\t$currentLoans = getCurrent($login);\n\t\n\t$html = str_get_html($currentLoans);\n\n\tforeach($html->find('td.listitemOdd',0)->parent()->parent()->find('tr') as $list) {\n\t\t$libItem['title'] = $list->find('td', 1)->plaintext;\n\t\t$libItem['barcode'] = $list->find('td', 2)->plaintext;\n\t\t$libItem['dateBorrowed'] = $list->find('td', 4)->plaintext;\n\t\t$libItem['dateDue']\t= $list->find('td', 5)->plaintext;\n\t\t$libItem['timesRenewed']\t= $list->find('td', 6)->plaintext;\n\t\t$libItem['charge']\t\t= $list->find('td', 7)->plaintext;\n\t\tif ($libItem['title'] === \"Title\") {\n\t\t\tcontinue;\n\t\t}\n\t\t$libItems[] = $libItem;\n\t}\n\n\tforeach($libItems as $libItem) {\n\t\t$title_search = urlencode($libItem['title']);\n\t\tif (strlen($title_search) > 255) {\n\t\t\t$title_search = substr($title_search,0,255); \n\t\t}\n\t\t$xml = searchAquaB($title_search);\n\t\t$doc = new DOMDocument();\n\t\t$doc->loadXML($xml);\n\t\t$xpath = new DOMXPath($doc);\n\t\t$records = $doc->getElementsByTagName(\"record\");\n\t\tforeach($records as $record) {\n\t\t\t$title = aquaBTitle($record,$xpath);\n\t\t\t$titlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$title));\n\t\t\t$searchtitlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$libItem['title']));\n\t\t\tif (strcmp($titlekey,$searchtitlekey) != 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$libItem['title'] = $title;\n\t\t\t$libItem['isbn'] = aquaBISBN($record,$xpath);\n\t\t\t$libItem['auth'] = aquaBAuth($record,$xpath);\n\t\t\t$libItem['image'] = aquaBImage($record,$xpath);\n\t\t\t// ID retrieval not work at the moment\n\t\t\t// Why not?\n\t\t\t$libItem['id'] = aquaBID($record,$xpath);\n\t\t\t//Need to output dates etc. as well if want to preserve these?\n\t\t\t\n\t\t\t$libItems1[] = $libItem;\n\t\t}\n\t}\n\t// At this point we have an array of arrays listing all of the current loans\n\t// Non-unique titles have been expanded into multiple records\n\t// The user can (in theory) choose the ones they actually have (or just the ones they want to blog)\n\t// Then press 'blog these' (or similar) and create multiple blog posts (in draft)\n\t// So at this point want to output stuff to the screen with all information included in form\n\t// Then grab this all back when form submitted?\n\t// Alternative is to just submit the relevant URLs of the form\n\t// http://librarycatalogue.warwickshire.gov.uk/abwarwick/fullrecordinnerframe.ashx?hreciid=|library/vubissmart-marc|494187&output=xml\n\t// And do a further retrieve to get the information needed - but this increases network traffic for no gain?\n\t// See http://www.sitepoint.com/forums/php-34/$_post-ing-checkbox-values-corresponding-form-values-182722.html for how to do this\n\t\n\t// So - try outputting items\n\techo '<form method=\"post\" action=\"\"><input name=\"blogem\" value=\"yes\" id=\"blogem\" type=\"hidden\">';\n\techo '<ul>';\n\t$no_libItems = count($libItems1);\n\tfor($i=0; $i<$no_libItems; $i++){\n\t\techo '<li>';\n\t\techo '<h3>'.$libItems1[$i]['title'].'</h3>';\n\t\t// display cover image\n\t\techo \"<img src=\".$libItems1[$i]['image'].\" alt='Coverimage of \".$libItems1[$i]['title'].\"'>\\n\"; // need to check if it exists, otherwise?\n\t\t// print the item title\n\t\t// Do any of these need encoding? URL?\n\t\techo '<input name=\"libitem['.$i.'][choose]\" value=\"1\" id=\"choose\" type=\"checkbox\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][title]\" value=\"'.$libItems1[$i]['title'].'\" id=\"title\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][isbn]\" value=\"'.$libItems1[$i]['isbn'].'\" id=\"isbn\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][auth]\" value=\"'.$libItems1[$i]['auth'].'\" id=\"auth\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][image]\" value=\"'.$libItems1[$i]['image'].'\" id=\"image\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][id]\" value=\"'.$libItems1[$i]['id'].'\" id=\"id\" type=\"hidden\">'; // is 'id' required?\n\t\techo '</li>';\n }\n\techo '<input type=\"submit\" name=\"itemstoblog\" value=\"Blog these...\" /></form><br />';\n echo '</ul>';\n\t\n/* This is where the Amazon Enhancement could go\n// Some idea of the code might be:\n$no_libItems = count($libItems1);\nfor($i=0; $i<$no_libItems; $i++){\n\t// Do Amazon lookup and enhance item (via function)\n}\n*/\n\n}", "public function getResults(){\n $this->results;\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();", "public function api_entry_list() {\n $data = $this->Mdl_Users->get_list(\n $_POST['rp'],\n $_POST['page'],\n $_POST['query'],\n $_POST['qtype'],\n $_POST['sortname'],\n $_POST['sortorder']);\n\n echo json_encode(array(\n 'page'=>$_POST['page'],\n 'total'=>$this->Mdl_Users->get_length(),\n 'rows'=>$data,\n ));\n }", "private function buildListing(){\n\t\t// link any necessary javascript files\n\t\t$html = Loader::helper('html');\n\t\t$f = Loader::helper('concrete/file');\n\t\t$expensiveCache = \\Core::make('cache/expensive');\n\n\t\t// listing cache file\n\t\t$listCacheFle = DIR_FILES_UPLOADED_STANDARD.'/listingcache.js';\n\t\t\n\t\t// init vars\t\t\n\t\t$movie_data_arr = array();\n\t\t$sel_dates_arr = array();\n\t\t$soon_dates_arr = array();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&movie_id=211358'));\n\t\t\t\t\t\t\t\n\t\t// retrieve cached values\n\t\t$updated_listing = $expensiveCache->getItem('movieFeed');\n\t\t//$updated_listing->clear();\n\t\t$listCheck = $updated_listing;\n\t\t$updated_listing = $updated_listing->get();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&search=AL13222'));\n\t\t\n\t\t// reload listing if cache is found to be empty\n\t\tif($listCheck->isMiss()){\n\n\t\t\t// gather theater movie listing\n\t\t\t$rtsListing = json_decode(json_encode((array) simplexml_load_string($this->getRTSData('ShowTimeXml'))), 1);\n\t\t\t$listing = $this->getWWMListingData();\n\t\t\t//$rtsListing = $this->getRTSListing();\n\t\t\t\n\t\t\t// 11-29-2013 force reload if listing data if blank\n\t//\t\tif(empty($listing)){\n//\t\t\t\t$this->buildListing();\n//\t\t\t}\n\t\t\t\n\t\t\t// convert to PHP array\n\t\t\t$listing = json_decode(json_encode((array) simplexml_load_string($listing)), 1);\n\n\t\t\t// store movie data\n\t\t\t$movie_listing = $listing['house']['schedule']['movie'];\n\t\t\t$updated_listing = $movie_listing;\n\n\t\t\t// walk through all movies per location\n\t\t\tforeach($movie_listing as $movie){\n\t\t\t\t\n\t\t\t\t// check for movie tickets film code\n\t\t\t\tif(!empty($movie['movie_id'])){\n\t\t\t\t\t// gather movie data\n\t\t\t\t\t$movie_data = $expensiveCache->getItem('movieData'.$movie['movie_id']);\n\t\t\t\t\t// store in cache if not found\n\t\t\t\t\tif ($movie_data->isMiss()) {\n\t\t\t\t\t\t$movie_data->lock();\n\t\t\t\t\t\t$movie_data_new = $this->getMovieDataWWM($movie['movie_id']);\n\t\t\t\t\t\t$movie_data->set($movie_data_new,86400);\n\t\t\t\t\t}\n\t\t\t\t\t$movie_data = $movie_data->get();\n\t\t\t\t\t\n\t\t\t\t\t// add to movie data array\n\t\t\t\t\t$movie_data_arr[$movie['movie_id']] = $movie_data;\n\n\t\t\t\t\t// generate selectable date hash\n\t\t\t\t\t// check for show within assigned RTS showtimes\n\t\t\t\t\tforeach($rtsListing['ShowSchedule']['Films']['Film'] as $film){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check cinema source film code vs stored RTS cinema source film code\n\t\t\t\t\t\tif($film['CSCode'] == $movie['movie_id']){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// check for single or multiple shows\n\t\t\t\t\t\t\t$shows = array();\n\t\t\t\t\t\t\tif(empty($film['Shows']['Show']['DT'])){\n\t\t\t\t\t\t\t\t$shows = $film['Shows']['Show'];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$shows[0] = $film['Shows']['Show'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t// add date/time values to selectable date hash\n\t\t\t\t\t\t\tforeach($shows as $curShow){\n\t\t\t\t\t\t\t\t// check for ticket internet availability\n\t\t\t\t\t\t\t\t$tickets = array();\n\t\t\t\t\t\t\t\tif(empty($curShow['TIs']['TI']['C'])){\n\t\t\t\t\t\t\t\t\t$tickets = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$tickets[0] = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tforeach($tickets as $TI){\n\t\t\t\t\t\t\t\t\t$ticket = $this->ticketLookup($rtsListing, $TI['C']);\n\t\t\t\t\t\t\t\t\t// store current showtimes\n\t\t\t\t\t\t\t\t\t// convert date/time\n\t\t\t\t\t\t\t\t\t$showDate = substr($curShow['DT'], 0, 8);\n\t\t\t\t\t\t\t\t\tif(!empty($ticket) && empty($ticket['HideOnInternet'])){\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tforeach($movie['showtimes'] as $curShowTime){\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$curShowTime['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$curShowTime['@attributes']['date']] = strtotime($curShowTime['@attributes']['date']);\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\t\n\t\t\t\t\t\t\t\t\t// store upcoming showtimes\n\t\t\t\t\t\t\t\t\t} elseif (count($tickets) == 1 && !empty($ticket) && $ticket['HideOnInternet'] == 1 && $ticket['Name'] == 'rSupersvr') {\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$soon_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t}\n\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\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\t//print_r($movie_data);\n\t\t\t\t\t\n\t\t\t\t\t// walk through movie data and save images to media library where needed\n\t\t\t\t\tif($movie_data['photos']['photo'] || $movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// download image save to cache then delete\n\t\t\t\t\t\t$myFile = ereg_replace(\"[^A-Za-z0-9-]\", \"_\", trim($movie_data['name'])).'.jpg';\n\t\t\t\t\t\t$myFile = preg_replace('/[_]+/', '_', $myFile);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check for existing poster file\n\t\t\t\t\t\t$db = Loader::db();\n\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\tif (!$det) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// pull remote file\n\t\t\t\t\t\t\tif(count($movie_data['hiphotos']['photo']) > 1){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'];\n\t\t\t\t\t\t\t} elseif(count($movie_data['photos']['photo']) > 0) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['photos']['photo']) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$new_image = $this->get_data($imgLnk);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$myFileLocation = DIR_FILES_UPLOADED_STANDARD.'/cache/'.$myFile;\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation)){\n\t\t\t\t\t\t\t\t$fh = fopen($myFileLocation, 'w');\n\t\t\t\t\t\t\t\t$stringData = $new_image;\n\t\t\t\t\t\t\t\tfwrite($fh, $stringData);\n\t\t\t\t\t\t\t\tfclose($fh);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation) || filesize($myFileLocation) > 0){\n\t\t\t\t\t\t\t\t$error = \\Concrete\\Core\\File\\Importer::E_PHP_FILE_ERROR_DEFAULT;\n\t\t\t\t\t\t\t\t$fi = new \\Concrete\\Core\\File\\Importer();\n\t\t\t\t\t\t\t\t$newFile = $fi->import($myFileLocation,$myFile);\n\t\t\t\t\t\t\t\tif(!is_object($newFile)) {\n\t\t\t\t\t\t\t\t\t$this->set('errorMessage', \\Concrete\\Core\\File\\Importer::getErrorMessage($error)); \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// delete cached file\n\t\t\t\t\t\t\t\tunlink($myFileLocation);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//echo $myFileLocation;\n//\t\t\t\t\t\t\techo $myFile;\n//\t\t\t\t\t\t\tprint_r($movie_data);\n//\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// update poster art to use local relative path\n\t\t\t\t\t\t$movie_data_arr[$movie['movie_id']]['photos']['photo'] = $path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$path = 'null';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// store queried show dates\n\t\t\t$movieFeed = $expensiveCache->getItem('movieFeed');\n\t\t\t// store in cache if not found\n\t\t\tif ($movieFeed->isMiss()) {\n\t\t\t\t$movieFeed->lock();\n\t\t\t\t$movie_feed_new = $updated_listing;\n\t\t\t\t$movieFeed->set($movie_feed_new,7200);\n\t\t\t}\n\t\t\t$movieFeed = $movieFeed->get();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t// convert to JSON\n\t\t\tasort($sel_dates_arr);\n\t\t\t$sel_dates_arr = json_encode($sel_dates_arr);\n\t\t\tasort($soon_dates_arr);\n\t\t\t$soon_dates_arr = json_encode($soon_dates_arr);\n\t\t\t$updated_listing = json_encode($updated_listing);\n\t\t\t$rtsListing = json_encode($rtsListing);\n\t\t\t$movie_data_arr = json_encode($movie_data_arr);\n\t\t\t\n\t\t\t$final_listing = 'var dateOpts = ' . $sel_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var soonDateOpts = ' . $soon_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var listingData = ' . $updated_listing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var rtsListingData = ' . $rtsListing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var movieData = ' . $movie_data_arr . ';';\n\t\t\t\n\t\t\t// save as static file\n\t\t\ttouch($listCacheFle);\n\t\t\t$fh = fopen($listCacheFle, 'w');\n\t\t\tfwrite($fh, $final_listing);\n\t\t\tfclose($fh);\n\n\t\t}\n\t\t\n\t\t// add json variables to footer\n\t\t$this->addFooterItem($html->javascript(DIR_REL.'/application/files/listingcache.js'));\n\t\t\n\t\t// transfer usable variables\n\t\t//$this->set('jsAPI', $updated_listing);\n\t}", "function getListResults ( $ListID, $use_cache = TRUE )\n\t{\n\n\t\t$is_cached = false;\n\t\tif ( $use_cache ) {\n\t\t\t$wishlist = get_option( $this->db_options_name_cached_wishlist );\n\n\t\t\tif ( is_array( $wishlist ) ) {\n\t\t\t\tif ( isset( $wishlist[$ListID] ) ) {\n\t\t\t\t\t//$wishlist = unserialize( $cached_wishlist );\n\t\t\t\t\tif ( (time() - $wishlist[$ListID]['time']) < 60 * 60 * 23 ) {\n\t\t\t\t\t\t$is_cached = true;\n\t\t\t\t\t\t$list = $wishlist[$ListID]['list'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( ! $is_cached ) {\n\t\t\t$list = $this->handleRESTcall( $this->getRestListLookupParams( $ListID ) );\n\n\t\t\tif ( 1 == $list['Lists']['List']['TotalItems'] ) {\n\t\t\t\t$list['Lists']['List']['ListItem'] = array ('0' => $list['Lists']['List']['ListItem'] ); // If one item in the list we need to make it a multi array\n\t\t\t} else {\n\t\t\t\tif ( $list['Lists']['List']['TotalPages'] > 1 ) { // If the list contains over 10 items we need to process the other pages.\n\t\t\t\t\t$page = 2;\n\t\t\t\t\twhile ( $page <= $list['Lists']['List']['TotalPages'] ) {\n\t\t\t\t\t\t$result = $this->handleRESTcall( $this->getRestListLookupParams( $ListID, null, $page ) );\n\t\t\t\t\t\tforeach ( $result['Lists']['List']['ListItem'] as $key => $value ) {\n\t\t\t\t\t\t\t$newkey = 10 * ($page - 1) + $key;\n\t\t\t\t\t\t\t$list['Lists']['List']['ListItem'][$newkey] = $value; //Add the items from the remaining pages to the lists.\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$page ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! (isset( $list['Lists']['Request']['Errors'] ) || isset( $list['Error'] )) ) {\n\t\t\t\t$wishlist[$ListID]['time'] = time();\n\t\t\t\t$wishlist[$ListID]['list'] = $list;\n\t\t\t\tupdate_option( $this->db_options_name_cached_wishlist, $wishlist );\n\t\t\t}\n\t\t}\n\n\t\treturn ($list);\n\t}", "function _ajax_fetch_custom_list_callback() {\n\n\t$wp_list_table = new TT_Example_List_Table();\n\t$wp_list_table->ajax_response();\n}", "public function listings($method='GET')\n\t{\n \n $data_tmp['listing_uri'] = config_item('listing_uri');\n if(empty($data_tmp['listing_uri']))$data_tmp['listing_uri'] = 'property'; \n \n $this->load->model('language_m');\n $this->load->model('estate_m');\n $this->load->model('option_m');\n \n $this->data['message'] = lang_check('Something is wrong with request');\n $this->data['token_available'] = FALSE;\n $POST = $this->input->get_post(NULL, TRUE);\n \n if(isset($POST['lang_code']))\n {\n $lang_id = $this->language_m->get_id($POST['lang_code']);\n }\n \n if(empty($lang_id))$lang_id=$this->language_m->get_default_id();\n $lang_code = $this->language_m->get_code($lang_id);\n \n $token = $this->token_m->get_token($POST);\n if(is_object($token))\n $this->data['token_available'] = TRUE;\n \n if(is_object($token))\n {\n if($method == 'GET')\n {\n $options = $this->option_m->get_field_list($this->language_m->get_default_id());\n $this->db->join('property_user', 'property_user.property_id = property.id', 'right');\n $this->db->where('user_id', $token->user_id);\n $estates = $this->estate_m->get_by(array('language_id'=>$lang_id));\n \n // Set website details\n $json_data = array();\n // Add listings to rss feed \n foreach($estates as $key=>$row){\n $estate_date = array();\n $title = $this->estate_m->get_field_from_listing($row, 10);\n $url = site_url($data_tmp['listing_uri'].'/'.$row->id.'/'.$lang_code.'/'.url_title_cro($title));\n \n $row->json_object = json_decode($row->json_object);\n $row->image_repository = json_decode($row->image_repository);\n $estate_date['url'] = $url;\n $estate_date['listing'] = $row;\n \n $json_data[] = $estate_date;\n }\n \n $this->data['results'] = $json_data;\n \n $this->data['message'] = lang_check('Results available');\n }\n elseif($method == 'DELETE' && isset($POST['property_id']))\n {\n $this->load->library('session');\n $property_id = $POST['property_id'];\n \n $this->data['success'] = false;\n // Check if property_id already saved, stop and write message\n if($this->estate_m->check_user_permission($property_id, $token->user_id)>0)\n {\n $this->estate_m->delete($property_id);\n \n $this->data['message'] = lang_check('Listing removed!');\n $this->data['success'] = true;\n }\n // Save favorites to database\n else\n {\n $this->data['message'] = lang_check('Listing doesnt exists!');\n $this->data['success'] = true;\n }\n }\n }\n\n echo json_encode($this->data);\n exit();\n\t}", "protected function _executeGetList() {\n // Init\n $list = array();\n\n $pid = (int)$this->_postVar['pid'];\n $offset = (int)$this->_postVar['start'];\n $limit = (int)$this->_postVar['limit'];\n $itemsPerPage = (int)$this->_postVar['pagingSize'];\n $depth = (int)$this->_postVar['depth'];\n $sysLanguage = (int)$this->_postVar['sysLanguage'];\n $listType = (string)$this->_postVar['listType'];\n\n // Store last selected language\n $GLOBALS['BE_USER']->setAndSaveSessionData('TQSeo.sysLanguage', $sysLanguage);\n\n if (!empty($pid)) {\n $page = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord('pages', $pid);\n\n $fieldList = array();\n\n switch ($listType) {\n case 'metadata':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'keywords',\n 'description',\n 'abstract',\n 'author',\n 'author_email',\n 'lastupdated',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n\n unset($row);\n foreach ($list as &$row) {\n if (!empty($row['lastupdated'])) {\n $row['lastupdated'] = date('Y-m-d', $row['lastupdated']);\n } else {\n $row['lastupdated'] = '';\n }\n }\n unset($row);\n break;\n\n case 'geo':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_geo_lat',\n 'tx_tqseo_geo_long',\n 'tx_tqseo_geo_place',\n 'tx_tqseo_geo_region'\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'searchengines':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_canonicalurl',\n 'tx_tqseo_is_exclude',\n 'tx_tqseo_priority',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'url':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'title',\n 'url_scheme',\n 'alias',\n 'tx_realurl_pathsegment',\n 'tx_realurl_pathoverride',\n 'tx_realurl_exclude',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitle':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_pagetitle',\n 'tx_tqseo_pagetitle_rel',\n 'tx_tqseo_pagetitle_prefix',\n 'tx_tqseo_pagetitle_suffix',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitlesim':\n $buildTree = FALSE;\n $list = $this->_listPageTitleSim($page, $depth, $sysLanguage);\n break;\n\n default:\n // Not defined\n return;\n break;\n }\n }\n\n $ret = array(\n 'results' => count($list),\n 'rows' => array_values($list),\n );\n\n return $ret;\n }", "function displayCreateListing() {\r\n displayModifyListing(\"processListing.php\", \"createListing\", \"\", \"\", \"\",\"\",\"\", \"\");\r\n}", "public function getArtists($status);", "function getMainActions(){\n $step = $this->getStep($this->listing->user_id);\n $data=[];\n\n /**\n * Hide buttons when listing is not on steps\n */\n if(isset($step) && $step->date_end != '0000-00-00 00:00:00')\n {\n /**\n * APPROVE AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_ACTIVE)\n {\n $data[]=[\n /** Approve and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_approve_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-approve action-btn',\n ];\n }\n /**\n * REJECT AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->featured == \\Orm\\Model\\Listings\\Listings::NOT_FEATURED){\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_DELETED)\n {\n $data[]=[\n /** REJECT and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_reject_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-reject action-btn',\n ];\n }\n }\n return $data;\n }\n }", "public function listing() {\r\n $options = get_option( 'myhome_redux' );\r\n $show_advanced = is_null( $options['mh-listing-show_advanced'] ) ? true : intval( $options['mh-listing-show_advanced'] );\r\n $show_clear = is_null( $options['mh-listing-show_clear'] ) ? true : intval( $options['mh-listing-show_clear'] );\r\n $show_sort_by = is_null( $options['mh-listing-show_sort_by'] ) ? true : intval( $options['mh-listing-show_sort_by'] );\r\n $show_view_types = is_null( $options['mh-listing-show_view_types'] ) ? true : intval( $options['mh-listing-show_view_types'] );\r\n $advanced_number = is_null( $options['mh-listing-search_form_advanced_number'] ) ? 3 : intval( $options['mh-listing-search_form_advanced_number'] );\r\n // settings from Listing options page\r\n $atts = array(\r\n 'lazy_loading' => $options['mh-listing-lazy_loading'] ? 'true' : 'false',\r\n 'lazy_loading_limit' => intval( $options['mh-listing-load_more_button_number'] ),\r\n 'load_more_button' => $options['mh-listing-load_more_button_label'],\r\n 'load_prev_button' => $options['mh-listing-load_prev_button_label'],\r\n 'listing_default_view' => $options['mh-listing-default_view'],\r\n 'estates_per_page' => $options['mh-listing-estates_limit'],\r\n 'search_form_position' => $options['mh-listing-search_form_position'],\r\n 'label' => $options['mh-listing-label'],\r\n 'search_form_advanced_number' => $advanced_number,\r\n 'show_advanced' => $show_advanced ? 'true' : 'false',\r\n 'show_clear' => $show_clear ? 'true' : 'false',\r\n 'show_sort_by' => $show_sort_by ? 'true' : 'false',\r\n 'show_view_types' => $show_view_types ? 'true' : 'false',\r\n 'agent_id' => $this->id, // get estates only from this agent\r\n 'map' => false\r\n );\r\n\r\n // prepare attributes\r\n foreach ( My_Home_Attribute::get_attributes() as $attr ) {\r\n $value = $options['mh-listing-' . $attr->get_slug() . '_show'];\r\n $atts[$attr->get_slug() . '_show'] = $value ? 'true' : 'false';\r\n }\r\n\r\n // initiate listing\r\n $listing = new My_Home_Listing( $atts );\r\n ?>\r\n <div class=\"mh-listing--full-width mh-listing--horizontal-boxed\">\r\n <?php $listing->listing(); ?>\r\n </div>\r\n <?php\r\n }", "public function getList()\n {\n }", "public function purchase_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/purchase_return/list';\n $data['purchase_returns'] = $this->MPurchase_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "function get_results($args)\n {\n }", "function get_results($args)\n {\n }", "function alat_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\r\n\t\t$result=$this->m_alat->alat_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "function booksList($offset, $total_records_per_page, $order, $ascdesc)\n{\n $booksManager = new ListManager();\n\n\n\n if (isset($_GET['search']) && $_GET['search']!='') {\n $search = input(addcslashes($_GET['search'], '_'));\n $search=\"%\".$search.\"%\";\n $books = $booksManager->get_search($offset, $total_records_per_page, $order, $ascdesc, $search);\n } elseif (isset($_GET['cat']) && $_GET['cat']!='') {\n $cat = input($_GET['cat']);\n $books = $booksManager-> get_cat($offset, $total_records_per_page, $order, $ascdesc, $cat);\n } else {\n $books = $booksManager->selectAll($offset, $total_records_per_page, $order, $ascdesc); // Appel la fonction qui renvoie toutes les données sur les livres en bdd\n }\n // require('view/listView.php');\n return $books;\n echo selectAll();\n}", "public function index() {\n $output = $this->verifyProvidedInput(['keywords' => 'Keywords are required to perform a search']);\n\n if (empty($output)) {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n if (!empty($this->request->advancedSearch) && $this->request->advancedSearch) {\n $sortBy = (isset($this->request->sortBy) ? $this->request->sortBy : 'rawListPrice');\n $reverseSort = (isset($this->request->reverseSort) ? boolval($this->request->reverseSort) : false);\n $data = $this->getRETS->getListing()\n ->setSortBy($sortBy)\n ->setReverseSort($reverseSort)\n ->search($preparedKeywords, \n $this->request->extra, \n $this->request->maxPrice, \n $this->request->minPrice, \n $this->request->beds, \n $this->request->baths, \n $this->request->includeResidential, \n $this->request->includeLand, \n $this->request->includeCommercial);\n \n $this->addThumbnails($data);\n $output = $this->respondData($data);\n } else {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n $data = $this->getRETS->getListing()->searchByKeyword($preparedKeywords);\n $this->addThumbnails($data);\n $output = $this->respondData($data);\n }\n }\n\n return $output;\n }", "public function get_json_results() {\n }", "public function index()\n {\n //qui ritorno l'elenco delle liste\n //return TodoList::paginate(20);\n $lists = TodoList::paginate(20);\n return $this->getResult($lists->toArray());\n }", "public function index()\n {\n $data= Pizza::get()->toArray();\n if($data)\n {\n return $this->response(true,'rows successfully listed',$data);\n }\n return $this->response(false,'no rows found',[]);\n }", "function list(){\n $res = $res = $this->client->request('GET',$this->path,[]);\n $this->checkResponse($res,array(200));\n return $res;\n }", "public function action() {\n $this->curPos ++;\n usleep(250000);\n// # advanced finish if you need it for some reason:\n// if($this->curPos>40) return 'We have finished right now!';\n return array('lastItem'=>$this->curPos, 'itemCount'=>$this->count);\n }", "abstract public function getResults(): mixed;" ]
[ "0.69911814", "0.69135123", "0.6191085", "0.61634105", "0.6106261", "0.6106261", "0.60919493", "0.6079555", "0.60730743", "0.60586506", "0.6057292", "0.5979495", "0.59759116", "0.5966504", "0.5867618", "0.58074546", "0.5806632", "0.58025557", "0.5796107", "0.5766682", "0.57637703", "0.57054", "0.5705112", "0.56637645", "0.56479096", "0.5631926", "0.5583362", "0.5580018", "0.5580018", "0.5580018", "0.55795205", "0.5572956", "0.5563976", "0.5549063", "0.5546685", "0.55426294", "0.55390215", "0.552659", "0.55246454", "0.5522747", "0.5511233", "0.548951", "0.5487353", "0.54846007", "0.54828846", "0.54735667", "0.54718083", "0.5470762", "0.5467904", "0.5464692", "0.5455951", "0.545373", "0.54340076", "0.5425628", "0.5422889", "0.5420882", "0.5418302", "0.54169947", "0.5415513", "0.54146254", "0.5407161", "0.5389055", "0.5387423", "0.53825194", "0.5381398", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5375336", "0.536375", "0.53622645", "0.53530973", "0.53520507", "0.5348448", "0.5329882", "0.53291476", "0.53288126", "0.53225636", "0.5321964", "0.53211683", "0.5318913", "0.5318913", "0.53172415", "0.53120136", "0.52992517", "0.5295117", "0.52885616", "0.5285489", "0.5285226", "0.52809364", "0.52773446" ]
0.0
-1
get returns after a listing has been made
public function get_listings_details($dom){ //push each entry into new array $update_item_array = array(); $update_item_array['itemnumber'] = array(); $update_item_array['customlabel'] = array(); $update_item_array['quantity'] = array(); $update_item_array['quantitysoldandavailable'] = array(); $update_item_array['sellprice'] = array(); $update_item_array['starttime'] = array(); $update_item_array['endtime'] = array(); $update_item_array['itemtitle'] = array(); $update_item_array['stockcntrl'] = array(); $update_item_array['listingtype'] = array(); $update_item_response = $dom->getElementsByTagName(DOM_ELEMENT_LISTINGSSHOW_RESPONSE); foreach ($update_item_response as $item){ $activelist = $item->getElementsByTagName(DOM_ELEMENT_LISTINGS_ACTIVELIST); foreach ($activelist as $activelistshow){ $itemarrays = $activelistshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMARRAY); foreach($itemarrays as $itemarray){ $inditems = $itemarray->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMSS); foreach($inditems as $inditemshow){ $costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_LISTINGTYPE)->item(0)->nodeValue) != "" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_LISTINGTYPE)->item(0)->nodeValue) : "Listing Type - Error"; array_push($update_item_array['listingtype'], $costers); $costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMID)->item(0)->nodeValue) != "" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMID)->item(0)->nodeValue) : "Item Num - Error"; array_push($update_item_array['itemnumber'], $costers); $costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_SKU)->item(0)->nodeValue) != "" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_SKU)->item(0)->nodeValue) : "SKU - Error"; array_push($update_item_array['customlabel'], $costers); $costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_QUANTITY)->item(0)->nodeValue) != "" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_QUANTITY)->item(0)->nodeValue) : "0"; array_push($update_item_array['quantity'], $costers); $costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_TOTALQUANTITY)->item(0)->nodeValue) != "" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_TOTALQUANTITY)->item(0)->nodeValue) : "0"; array_push($update_item_array['quantitysoldandavailable'], $costers); $costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_CURRENTPRICE)->item(0)->nodeValue) != "" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_CURRENTPRICE)->item(0)->nodeValue) : "price sold - Error"; array_push($update_item_array['sellprice'], $costers); $costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STARTTIME)->item(0)->nodeValue) != "" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STARTTIME)->item(0)->nodeValue) : "0"; array_push($update_item_array['starttime'], $costers); $costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ENDTIME)->item(0)->nodeValue) != "" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ENDTIME)->item(0)->nodeValue) : ""; array_push($update_item_array['endtime'], $costers); $costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMTITLE)->item(0)->nodeValue) != "" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMTITLE)->item(0)->nodeValue) : ""; array_push($update_item_array['itemtitle'], $costers); $costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STOCKCNTRL)->item(0)->nodeValue) != "" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STOCKCNTRL)->item(0)->nodeValue) : "FALSE"; array_push($update_item_array['stockcntrl'], $costers); } } } //errors $error_messages = $item->getElementsByTagName(DOM_ELEMENT_ERRORS); foreach ($error_messages as $errormsg){ $error = trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) != "" ? trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) : "No Error"; array_push($update_item_array, $error); } } return $update_item_array; //DOM_ELEMENT_SHORT_ERROR_MSG }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listing();", "function listing() {\r\n\r\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}", "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}", "function getItems();", "function getItems();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n\n $header = array(\"优惠券编号\", \"优惠券金额\", \"所属终端便利店账号\", \"终端便利店\", \"状态\", \"赠送时间\", \"使用时间\");\n $cols = 7;\n\n $contentList = $this->coupon_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有优惠券.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "public function listing() {\n $this->response->setData(1);\r\n $this->response->setHeader('__OK', Http::Response(Http::OK));\r\n return TRUE;\r\n }", "public function listAction() {\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $photo_id = (int) $this->_getParam('photo_id');\n\n // CHECK AUTHENTICATION\n // CHECK AUTHENTICATION\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $sitereview = $subject = Engine_Api::_()->core()->getSubject('sitereview_listing');\n } else if (Engine_Api::_()->core()->hasSubject('sitereview_photo')) {\n $photo = $subject = Engine_Api::_()->core()->getSubject('sitereview_photo');\n $listing_id = $photo->listing_id;\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n }\n $bodyResponse = $tempResponse = array();\n $listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, \"edit_listtype_$sitereview->listingtype_id\");\n $listingtype_id = $this->_listingType->listingtype_id;\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $photoCount = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id)->photo_count;\n $paginator = $sitereview->getSingletonAlbum()->getCollectiblesPaginator();\n\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo = $allowed_upload_photo;\n if (empty($photoCount))\n $allowed_upload_photo = $allowed_upload_photo;\n elseif ($photoCount <= $paginator->getTotalItemCount())\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = $allowed_upload_photo;\n\n //GET ALBUM\n $album = $sitereview->getSingletonAlbum();\n\n\n /* RETURN THE LIST OF IMAGES, IF FOLLOWED THE FOLLOWING CASES: \n * - IF THERE ARE GET METHOD AVAILABLE.\n * - iF THERE ARE NO $_FILES AVAILABLE.\n */\n if (empty($_FILES) && $this->getRequest()->isGet()) {\n $requestLimit = $this->getRequestParam(\"limit\", 10);\n $page = $requestPage = $this->getRequestParam(\"page\", 1);\n\n //GET PAGINATOR\n $album = $sitereview->getSingletonAlbum();\n $paginator = $album->getCollectiblesPaginator();\n\n $bodyResponse[' totalPhotoCount'] = $totalItemCount = $bodyResponse['totalItemCount'] = $paginator->getTotalItemCount();\n $paginator->setItemCountPerPage($requestLimit);\n $paginator->setCurrentPageNumber($requestPage);\n // Check the Page Number for pass photo_id.\n if (!empty($photo_id)) {\n for ($page = 1; $page <= ceil($totalItemCount / $requestLimit); $page++) {\n $paginator->setCurrentPageNumber($page);\n $tmpGetPhotoIds = array();\n foreach ($paginator as $photo) {\n $tmpGetPhotoIds[] = $photo->photo_id;\n }\n if (in_array($photo_id, $tmpGetPhotoIds)) {\n $bodyResponse['page'] = $page;\n break;\n }\n }\n }\n\n if ($totalItemCount > 0) {\n foreach ($paginator as $photo) {\n $tempImages = $photo->toArray();\n\n // Add images\n $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo);\n $tempImages = array_merge($tempImages, $getContentImages);\n\n $tempImages['user_title'] = $photo->getOwner()->getTitle();\n $tempImages['likes_count'] = $photo->likes()->getLikeCount();\n $tempImages['is_like'] = ($photo->likes()->isLike($viewer)) ? 1 : 0;\n \n //Sitereaction Plugin work start here\n if (Engine_Api::_()->getApi('Siteapi_Feed', 'advancedactivity')->isSitereactionPluginLive()) {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitereaction') && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereaction.reaction.active', 1)) {\n $popularity = Engine_Api::_()->getApi('core', 'sitereaction')->getLikesReactionPopularity($photo);\n $feedReactionIcons = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getLikesReactionIcons($popularity, 1);\n $tempImages['reactions']['feed_reactions'] =$tempImages['feed_reactions'] = $feedReactionIcons;\n\n if (isset($viewer_id) && !empty($viewer_id)) {\n $myReaction = $photo->likes()->getLike($viewer);\n if (isset($myReaction) && !empty($myReaction) && isset($myReaction->reaction) && !empty($myReaction->reaction)) {\n $myReactionIcon = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getIcons($myReaction->reaction, 1);\n $tempImages['reactions']['my_feed_reaction'] =$tempImages['my_feed_reaction'] = $myReactionIcon;\n }\n }\n }\n }\n //Sitereaction Plugin work end here\n if (!empty($viewer) && ($tempMenu = $this->getRequestParam('menu', 1)) && !empty($tempMenu)) {\n $menu = array();\n\n if ($photo->user_id == $viewer_id) {\n $menu[] = array(\n 'label' => $this->translate('Edit'),\n 'name' => 'edit',\n 'url' => 'listings/photo/edit/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Delete'),\n 'name' => 'delete',\n 'url' => 'listings/photo/delete/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n }\n $menu[] = array(\n 'label' => $this->translate('Share'),\n 'name' => 'share',\n 'url' => 'activity/index/share',\n 'urlParams' => array(\n \"type\" => $photo->getType(),\n \"id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Report'),\n 'name' => 'report',\n 'url' => 'report/create/subject/' . $photo->getGuid()\n );\n\n $menu[] = array(\n 'label' => $this->translate('Make Profile Photo'),\n 'name' => 'make_profile_photo',\n 'url' => 'members/edit/external-photo',\n 'urlParams' => array(\n \"photo\" => $photo->getGuid()\n )\n );\n\n $tempImages['menu'] = $menu;\n }\n\n if (isset($tempImages) && !empty($tempImages))\n $bodyResponse['images'][] = $tempImages;\n }\n }\n $bodyResponse['canUpload'] = $allowed_upload_photo;\n $this->respondWithSuccess($bodyResponse, true);\n } else if (isset($_FILES) && $this->getRequest()->isPost()) { // UPLOAD IMAGES TO RESPECTIVE EVENT\n if (empty($viewer_id) || empty($allowed_upload_photo))\n $this->respondWithError('unauthorized');\n $tablePhoto = Engine_Api::_()->getDbtable('photos', 'sitereview');\n $db = $tablePhoto->getAdapter();\n $db->beginTransaction();\n\n try {\n $viewer = Engine_Api::_()->user()->getViewer();\n $album = $sitereview->getSingletonAlbum();\n $rows = $tablePhoto->fetchRow($tablePhoto->select()->from($tablePhoto->info('name'), 'order')->order('order DESC')->limit(1));\n $order = 0;\n if (!empty($rows)) {\n $order = $rows->order + 1;\n }\n $params = array(\n 'collection_id' => $album->getIdentity(),\n 'album_id' => $album->getIdentity(),\n 'listing_id' => $sitereview->getIdentity(),\n 'user_id' => $viewer->getIdentity(),\n 'order' => $order\n );\n $photoCount = count($_FILES);\n if (isset($_FILES['photo']) && $photoCount == 1) {\n $photo_id = Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $_FILES['photo'])->photo_id;\n if (!$sitereview->photo_id) {\n $sitereview->photo_id = $photo_id;\n $sitereview->save();\n }\n } else if (!empty($_FILES) && $photoCount > 1) {\n foreach ($_FILES as $photo) {\n Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $photo);\n }\n }\n\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n }\n }\n }", "public function get_results()\n {\n }", "public function get_results()\n {\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['kind'] = 1;\n $searchData['login_user'] = $this->login_id;\n\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"账号\", \"姓名\", \"角色\", \"新增时间\", \"操作\");\n $cols = 6;\n\n $contentList = $this->user_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有数据.\" : '';\n break;\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "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}", "function item( $args )\n {\n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n\t\t$limit = 10;\n\t\t$offer_page = 0;\n \n // add a test if this listing has already been accepted\n if( $result[0]['status'] ==\n GarageSale\\BaseDatabase::STATUS_ACCEPTED \n ){\n \n // get offer result\n $offers_result = $offer_model->limit(1)->get_accepted( \n (int) $result[0]['id']\n );\n \n // set accepted flag to true\n $accepted = true;\n \n } else {\n \n \n // limit to 10 displayed at a time\n $limit = 10;\n \n // default offer_page to 0\n $offer_page = 0;\n \n // set up offers page\n if( isset( $_GET['offerpage'] ) && \n is_numeric($_GET['offerpage']) \n ){\n \n // set offer_page to the user provided value\n $offer_page = ((int) $_GET['offerpage'] ) - 1;\n }\n \n $offers_result = $offer_model->limit($limit)->\n page($offer_page)->\n get_item_any_offer( (int) $result[0]['id'] );\n }\n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t // load comment form\n\t $comment_form = $this->view->\n\t form('comment','listings/postcomment/'.$postid);\n\t $this->view->add('comment_form',$comment_form);\n\t \n\t \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Images 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}", "public function getResults()\n {\n }", "protected abstract function fetchLists();", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['provider_id'] =$this->user_model->getProviderId($this->global['login_id']);\n\n // get top list data in homepage\n switch ($id) {\n case 1:\n if($this->isTicketter() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"配送员\", \"提交时间\", \"操作\");\n $cols = 10;\n }else if($this->isAdmin() == FALSE){\n $header = array(\"序号\", \"订单号\", \"终端便利店\", \"收货人\", \"联系电话\", \"付款方式\", \"订单状态\", \"所属区域总代理\", \"提交时间\", \"操作\");\n $cols = 10;\n }\n\n $contentList = $this->order_model->getItems($searchData);\n// foreach ($contentList as $item){\n// // get activity information\n// $activity = $this->activity_model->getItemById($item->activity_ids);\n// $activity->products = $this->activity_model->getProductsFromIds($activity->product_id, $activity->provider_id);\n//\n// $orderinfo = array(\n// 'id' => $item->id,\n// 'product_info' => json_encode($activity->products)\n// );\n// $this->order_model->update($orderinfo, $item->id);\n// }\n\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有订单.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function get_result($item)\n {\n }", "public function fetchList();", "public function getResults();", "public function getResults(/* ... */)\n {\n return $this->_return;\n }", "function _syndicated_content_listings_page()\n{\n}", "static private function retrieveList() {\n\t\ttry {\n\t\t\t\n\t\t\tif (!isset($_SESSION['starCollection'])) {\n\t\t\t\tthrow new Exception('No list found in memory');\n\t\t\t} else {\n\t\t\t\treturn $_SESSION['starCollection'];\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $ex) {\n\t\t\tthrow $ex;\n\t\t}\n\t}", "public function what_ever_you_want()\n {\n $sql = \"Make a custom sql query for grabbing your data\";\n return static::custom_list($sql);\n }", "public function getListing(){\n $BusInfo = $this->BusinessOwnerModel->getBusinessID();\n \n foreach($BusInfo as $row1){\n $busID = $row1->bid;\n }\n \n $query = $this->db->get_where('BusinessListing', array('bid' => $busID));\n \n if($query->num_rows() > 0){\n foreach($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n return false;\n }", "public function lister()\r\n {\r\n }", "public function list();", "public function list();", "public function list();", "function print_results() {\r\n if ($list = $this->print_list()) {\r\n echo '<p>' . $this->print_count() . '</p>';\r\n echo $list;\r\n echo '<p class=\"more\">' . $this->print_more() . '</p>';\r\n }\r\n else {\r\n echo $this->zero_results;\r\n }\r\n }", "public abstract function getResults();", "public abstract function get_lists();", "function wp_ajax_fetch_list()\n {\n }", "public function index()\n {\n return auth()->user()\n ->wishlist()\n ->with('files')\n ->latest()\n ->paginate(request('per_page', config('fleetcart_api.per_page', 10)));\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n // get top10 datas\n // id: 1-top1, 2-top2, 3-top3, 4-top4, 5-top5\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n // get top list data in homepage\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"轮播图片\", \"类型\", \"单品活动/餐装活动/区域总代理\", \"排序\", \"新增日期\", \"操作\",);\n $cols = 7;\n $contentList = $this->carousel_model->getItems();\n $footer = (count($contentList) == 0||$contentList=='') ? $footer = \"没有轮播图项目.\" : '';\n break; // get top1\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\n }\n }", "function getShares();", "public static function add_to_comparison() {\n header( 'HTTP/1.0 200 OK' );\n header( 'Content-Type: application/json' );\n\n if ( ! empty( $_GET['id'] ) ) {\n $compare = Inventor_Visitor::get_data('compare');\n $compare = ! is_array( $compare ) || empty( $compare ) ? array() : $compare;\n\n $post = get_post( $_GET['id'] );\n $post_type = get_post_type( $post->ID );\n\n if ( ! in_array( $post_type, Inventor_Post_Types::get_listing_post_types() ) ) {\n $data = array(\n 'success' => false,\n 'message' => __( 'This is not listing ID.', 'inventor-compare' ),\n );\n } else {\n $found = false;\n\n foreach ( $compare as $listing_id ) {\n if ( $listing_id == $_GET['id']) {\n $found = true;\n break;\n }\n }\n\n if ( ! $found ) {\n $max_compare = 5;\n\n if ( count( $compare ) >= $max_compare ) {\n $data = array(\n 'success' => false,\n 'message' => sprintf( __( 'You can compare at most %d listings', 'inventor-compare' ), $max_compare )\n );\n } else {\n $compare[] = $post->ID;\n $count = count( $compare );\n\n $timeout_in_seconds = apply_filters( 'inventor_compare_timeout', 60*60 );\n Inventor_Visitor::save_data( 'compare', $compare, time() + $timeout_in_seconds );\n\n $data = array(\n 'success' => true,\n 'count' => $count,\n 'text' => sprintf( _n( 'Compare %d item', 'Compare %d items', $count, 'inventor-compare' ), $count )\n );\n }\n\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing is already in list', 'inventor-compare' ),\n );\n }\n }\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing ID is missing.', 'inventor-compare' ),\n );\n }\n\n echo json_encode( $data );\n exit();\n }", "function sold( $args )\n {\n \n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_sold_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n \n \n \n \n\t\t// limit to 10 displayed at a time\n\t\t$limit = 10;\n\t\t\n\t\t// default offer_page to 0\n\t\t$offer_page = 0;\n\t\t\n\t\t// set up offers page\n\t\tif( isset( $_GET['offerpage'] ) && \n\t\t\tis_numeric($_GET['offerpage']) \n\t\t){\n\t\t\t\n\t\t\t// set offer_page to the user provided value\n\t\t\t$offer_page = ((int) $_GET['offerpage'] ) - 1;\n\t\t}\n\t\t\n\t\t$offers_result = $offer_model->limit($limit)->\n\t\t\tpage($offer_page)->\n\t\t\tget_item_any_offer( (int) $result[0]['id'] );\n \n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "function publishResults()\n{\n\n //return\n\n}", "function waiting_list_list(){\r\n\t\t$jenis_rawat = isset($_POST['jenis_rawat']) ? $_POST['jenis_rawat'] : \"\";\r\n\t\t$tgl_app = isset($_POST['wl_tgl_app']) ? $_POST['wl_tgl_app'] : \"\";\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$karyawan_id = isset($_POST['karyawan_id']) ? $_POST['karyawan_id'] : \"\";\r\n\t\t$result=$this->m_waiting_list->waiting_list_list($query,$start,$end,$tgl_app,$jenis_rawat,$karyawan_id);\r\n\t\techo $result;\r\n\t}", "public function doListingsSearch()\r\n\t{\r\n\t\t$searchUrl = $this->dispatchNow(new GenerateSearchUrl(Input::all()));\r\n\r\n\t\treturn redirect()->route('browselistings.index', $searchUrl);\r\n\t}", "public function handel()\n {\n $this->run($this->listKey);\n }", "function wck_refresh_list( $meta = '', $id = '' ){\r\n\t\tif( isset( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\t\r\n\t\tif( isset( $_POST['id'] ) )\r\n\t\t\t$id = absint($_POST['id']);\t\t\r\n\r\n\t\tob_start();\t\t\t\r\n\t\t\techo self::wck_output_meta_content($meta, $id, $this->args['meta_array']);\r\n\t\t\tdo_action( \"wck_refresh_list_{$meta}\", $id );\r\n\t\t$entry_list = ob_get_clean();\r\n\t\t\r\n\t\tif( strpos( current_filter(), 'wp_ajax_wck_refresh_list') === 0 ){\r\n\t\t\techo $entry_list;\t\t\t\r\n\t\t\texit;\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn $entry_list;\r\n\t\t}\r\n\t}", "function getLista(){\n\n }", "function listContent()\n {\n }", "public function run() {\n\t\t$this->db->fetchAll('pundits');\n\t\t$this->response = array(\n\t\t\t'status' => 'success',\n\t\t\t'command'=> 'list',\n\t\t\t'data' => $this->db->get_last_result()\n\t\t);\n\t}", "public function listAction()\n {\n // some logic\n }", "public function listItems()\n {\n return null;\n }", "public function itemreturndetails(){\n\t$sel='ir_id,ir_itemid,ir_mtid,ir_name,ir_qty,ir_desc,ir_staffpfno,ir_staffname,ir_dept,ir_receivername,ir_creatordate';\n\t$whorder='ir_mtid asc,ir_itemid asc';\n\t$data['result'] = $this->picomodel->get_orderlistspficemore('items_return',$sel,'',$whorder);\n $this->logger->write_logmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n\t$this->logger->write_dblogmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n $this->load->view('itemaction/displayreturnitem',$data);\n }", "public function getItems()\n {\n }", "public function listAction() {}", "public function getItemsList(){\n return $this->_get(4);\n }", "public function lst()\n\t{\n\t\t$list = AdminModel::paginate(3);\n\t\t$this->assign('list',$list);\n\t\treturn $this->fetch();\n\t}", "public function returnWebmounts() {}", "public function onRefreshList()\n {\n $this->prepareComponent();\n\n return $this->refreshList();\n }", "public function getEntriesList(){\n return $this->_get(2);\n }", "abstract public function getList();", "public function sales_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/sales_return/list';\n $data['sales_returns'] = $this->MSales_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "public function browseAction() {\n $this->validateRequestMethod();\n // Prepare the response\n $params = $response = array();\n $params = $this->_getAllParams();\n Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n\n //GET PAGINATOR\n $params['pagination'] = 1;\n $paginator = Engine_Api::_()->getDbtable('wishlists', 'sitereview')->getBrowseWishlists($params);\n $page = $this->_getParam('page', 1);\n $limit = $this->_getParam('limit', 20);\n $paginator->setItemCountPerPage($limit);\n $paginator->setCurrentPageNumber($page);\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $totalItemCount = $paginator->getTotalItemCount();\n $totalPages = ceil(($totalItemCount) / $limit);\n $response['totalItemCount'] = $totalItemCount;\n if (!empty($totalItemCount)) {\n foreach ($paginator as $wishlistObj) {\n $wishlist = $wishlistObj->toArray();\n if (isset($wishlist['body']) && !empty($wishlist['body']))\n $wishlist['body'] = strip_tags($wishlist['body']);\n $lists = $wishlistObj->getWishlistMap(array('orderby' => 'listing_id'));\n $count = $lists->getTotalItemCount();\n $tempListings = array();\n $counter = 0;\n if (_ANDROID_VERSION >= '1.8.6' || _IOS_VERSION >= '1.8.0') {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n } else {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n }\n $wishlist = array_merge($wishlist, $tempListings);\n $check_availability = Engine_Api::_()->sitereview()->check_availability('sitereview_wishlist', $wishlistObj->wishlist_id);\n $checkFollowAvailablity = $wishlistObj->follows()->isFollow($viewer);\n $tempMenu = array();\n if (!empty($viewer_id)) {\n if (empty($check_availability)) {\n $wishlist['isLike'] = 0;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Like'),\n 'url' => '/like',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n } else {\n $wishlist['isLike'] = 1;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Unlike'),\n 'url' => '/unlike',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n }\n\n if (!empty($checkFollowAvailablity)) {\n $wishlist['followed'] = 1;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Unfollow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n } else {\n $wishlist['followed'] = 0;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Follow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n }\n\n $wishlist['gutterMenu'] = $tempMenu;\n }\n $tempResponse[] = $wishlist;\n }\n }\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $level_id = Engine_Api::_()->getDbtable('levels', 'authorization')->fetchRow(array('type = ?' => \"public\"))->level_id;\n }\n $can_create = ($viewer_id) ? 1 : 0;\n $response['canCreate'] = $can_create;\n if (!empty($tempResponse))\n $response['response'] = $tempResponse;\n $this->respondWithSuccess($response, true);\n }", "function my_list()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['list'] = $this->_bid->my_list();\n\t\t\n\t\t$this->load->view('bids/my_list', $data);\n\t}", "public function getItems(){\n\t\treturn $this->_makeCall('items?');\n\t}", "function listitems($name)\r\n\t\t{\r\n\t\t \t\r\n\t\t}", "function warkslibsGetCurrentLoans() {\n\trequire_once('simple_html_dom.php');\n\t// get barcode and PIN - just guessing how this works here (from warkslibs.php) - need to find out how to do this properly!\n\t$warkslibs_options = get_option('warkslibs_settings_values');\n\t$warkslibs_user_barcode = $warkslibs_options['warkslibs_user_barcode'];\n\t$warkslibs_user_pin = $warkslibs_options['warkslibs_user_pin'];\n\t$warkslibs_url = \"http://library.warwickshire.gov.uk/vs/Pa.csp?OpacLanguage=eng&Profile=Default\";\n\t$login = getLogin($warkslibs_url,$warkslibs_user_barcode,$warkslibs_user_pin);\n\t$currentLoans = getCurrent($login);\n\t\n\t$html = str_get_html($currentLoans);\n\n\tforeach($html->find('td.listitemOdd',0)->parent()->parent()->find('tr') as $list) {\n\t\t$libItem['title'] = $list->find('td', 1)->plaintext;\n\t\t$libItem['barcode'] = $list->find('td', 2)->plaintext;\n\t\t$libItem['dateBorrowed'] = $list->find('td', 4)->plaintext;\n\t\t$libItem['dateDue']\t= $list->find('td', 5)->plaintext;\n\t\t$libItem['timesRenewed']\t= $list->find('td', 6)->plaintext;\n\t\t$libItem['charge']\t\t= $list->find('td', 7)->plaintext;\n\t\tif ($libItem['title'] === \"Title\") {\n\t\t\tcontinue;\n\t\t}\n\t\t$libItems[] = $libItem;\n\t}\n\n\tforeach($libItems as $libItem) {\n\t\t$title_search = urlencode($libItem['title']);\n\t\tif (strlen($title_search) > 255) {\n\t\t\t$title_search = substr($title_search,0,255); \n\t\t}\n\t\t$xml = searchAquaB($title_search);\n\t\t$doc = new DOMDocument();\n\t\t$doc->loadXML($xml);\n\t\t$xpath = new DOMXPath($doc);\n\t\t$records = $doc->getElementsByTagName(\"record\");\n\t\tforeach($records as $record) {\n\t\t\t$title = aquaBTitle($record,$xpath);\n\t\t\t$titlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$title));\n\t\t\t$searchtitlekey = trim(preg_replace(\"/[^a-zA-Z ]/\",\"\",$libItem['title']));\n\t\t\tif (strcmp($titlekey,$searchtitlekey) != 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$libItem['title'] = $title;\n\t\t\t$libItem['isbn'] = aquaBISBN($record,$xpath);\n\t\t\t$libItem['auth'] = aquaBAuth($record,$xpath);\n\t\t\t$libItem['image'] = aquaBImage($record,$xpath);\n\t\t\t// ID retrieval not work at the moment\n\t\t\t// Why not?\n\t\t\t$libItem['id'] = aquaBID($record,$xpath);\n\t\t\t//Need to output dates etc. as well if want to preserve these?\n\t\t\t\n\t\t\t$libItems1[] = $libItem;\n\t\t}\n\t}\n\t// At this point we have an array of arrays listing all of the current loans\n\t// Non-unique titles have been expanded into multiple records\n\t// The user can (in theory) choose the ones they actually have (or just the ones they want to blog)\n\t// Then press 'blog these' (or similar) and create multiple blog posts (in draft)\n\t// So at this point want to output stuff to the screen with all information included in form\n\t// Then grab this all back when form submitted?\n\t// Alternative is to just submit the relevant URLs of the form\n\t// http://librarycatalogue.warwickshire.gov.uk/abwarwick/fullrecordinnerframe.ashx?hreciid=|library/vubissmart-marc|494187&output=xml\n\t// And do a further retrieve to get the information needed - but this increases network traffic for no gain?\n\t// See http://www.sitepoint.com/forums/php-34/$_post-ing-checkbox-values-corresponding-form-values-182722.html for how to do this\n\t\n\t// So - try outputting items\n\techo '<form method=\"post\" action=\"\"><input name=\"blogem\" value=\"yes\" id=\"blogem\" type=\"hidden\">';\n\techo '<ul>';\n\t$no_libItems = count($libItems1);\n\tfor($i=0; $i<$no_libItems; $i++){\n\t\techo '<li>';\n\t\techo '<h3>'.$libItems1[$i]['title'].'</h3>';\n\t\t// display cover image\n\t\techo \"<img src=\".$libItems1[$i]['image'].\" alt='Coverimage of \".$libItems1[$i]['title'].\"'>\\n\"; // need to check if it exists, otherwise?\n\t\t// print the item title\n\t\t// Do any of these need encoding? URL?\n\t\techo '<input name=\"libitem['.$i.'][choose]\" value=\"1\" id=\"choose\" type=\"checkbox\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][title]\" value=\"'.$libItems1[$i]['title'].'\" id=\"title\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][isbn]\" value=\"'.$libItems1[$i]['isbn'].'\" id=\"isbn\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][auth]\" value=\"'.$libItems1[$i]['auth'].'\" id=\"auth\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][image]\" value=\"'.$libItems1[$i]['image'].'\" id=\"image\" type=\"hidden\">'; // is 'id' required?\n\t\techo '<input name=\"libitem['.$i.'][id]\" value=\"'.$libItems1[$i]['id'].'\" id=\"id\" type=\"hidden\">'; // is 'id' required?\n\t\techo '</li>';\n }\n\techo '<input type=\"submit\" name=\"itemstoblog\" value=\"Blog these...\" /></form><br />';\n echo '</ul>';\n\t\n/* This is where the Amazon Enhancement could go\n// Some idea of the code might be:\n$no_libItems = count($libItems1);\nfor($i=0; $i<$no_libItems; $i++){\n\t// Do Amazon lookup and enhance item (via function)\n}\n*/\n\n}", "public function getResults(){\n $this->results;\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();", "public function api_entry_list() {\n $data = $this->Mdl_Users->get_list(\n $_POST['rp'],\n $_POST['page'],\n $_POST['query'],\n $_POST['qtype'],\n $_POST['sortname'],\n $_POST['sortorder']);\n\n echo json_encode(array(\n 'page'=>$_POST['page'],\n 'total'=>$this->Mdl_Users->get_length(),\n 'rows'=>$data,\n ));\n }", "private function buildListing(){\n\t\t// link any necessary javascript files\n\t\t$html = Loader::helper('html');\n\t\t$f = Loader::helper('concrete/file');\n\t\t$expensiveCache = \\Core::make('cache/expensive');\n\n\t\t// listing cache file\n\t\t$listCacheFle = DIR_FILES_UPLOADED_STANDARD.'/listingcache.js';\n\t\t\n\t\t// init vars\t\t\n\t\t$movie_data_arr = array();\n\t\t$sel_dates_arr = array();\n\t\t$soon_dates_arr = array();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&movie_id=211358'));\n\t\t\t\t\t\t\t\n\t\t// retrieve cached values\n\t\t$updated_listing = $expensiveCache->getItem('movieFeed');\n\t\t//$updated_listing->clear();\n\t\t$listCheck = $updated_listing;\n\t\t$updated_listing = $updated_listing->get();\n\t\t\n\t\t//die($this->get_data('http://webservice.cinema-source.com/3.8/?apikey=THBMB&query=movie&search=AL13222'));\n\t\t\n\t\t// reload listing if cache is found to be empty\n\t\tif($listCheck->isMiss()){\n\n\t\t\t// gather theater movie listing\n\t\t\t$rtsListing = json_decode(json_encode((array) simplexml_load_string($this->getRTSData('ShowTimeXml'))), 1);\n\t\t\t$listing = $this->getWWMListingData();\n\t\t\t//$rtsListing = $this->getRTSListing();\n\t\t\t\n\t\t\t// 11-29-2013 force reload if listing data if blank\n\t//\t\tif(empty($listing)){\n//\t\t\t\t$this->buildListing();\n//\t\t\t}\n\t\t\t\n\t\t\t// convert to PHP array\n\t\t\t$listing = json_decode(json_encode((array) simplexml_load_string($listing)), 1);\n\n\t\t\t// store movie data\n\t\t\t$movie_listing = $listing['house']['schedule']['movie'];\n\t\t\t$updated_listing = $movie_listing;\n\n\t\t\t// walk through all movies per location\n\t\t\tforeach($movie_listing as $movie){\n\t\t\t\t\n\t\t\t\t// check for movie tickets film code\n\t\t\t\tif(!empty($movie['movie_id'])){\n\t\t\t\t\t// gather movie data\n\t\t\t\t\t$movie_data = $expensiveCache->getItem('movieData'.$movie['movie_id']);\n\t\t\t\t\t// store in cache if not found\n\t\t\t\t\tif ($movie_data->isMiss()) {\n\t\t\t\t\t\t$movie_data->lock();\n\t\t\t\t\t\t$movie_data_new = $this->getMovieDataWWM($movie['movie_id']);\n\t\t\t\t\t\t$movie_data->set($movie_data_new,86400);\n\t\t\t\t\t}\n\t\t\t\t\t$movie_data = $movie_data->get();\n\t\t\t\t\t\n\t\t\t\t\t// add to movie data array\n\t\t\t\t\t$movie_data_arr[$movie['movie_id']] = $movie_data;\n\n\t\t\t\t\t// generate selectable date hash\n\t\t\t\t\t// check for show within assigned RTS showtimes\n\t\t\t\t\tforeach($rtsListing['ShowSchedule']['Films']['Film'] as $film){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check cinema source film code vs stored RTS cinema source film code\n\t\t\t\t\t\tif($film['CSCode'] == $movie['movie_id']){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// check for single or multiple shows\n\t\t\t\t\t\t\t$shows = array();\n\t\t\t\t\t\t\tif(empty($film['Shows']['Show']['DT'])){\n\t\t\t\t\t\t\t\t$shows = $film['Shows']['Show'];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$shows[0] = $film['Shows']['Show'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t// add date/time values to selectable date hash\n\t\t\t\t\t\t\tforeach($shows as $curShow){\n\t\t\t\t\t\t\t\t// check for ticket internet availability\n\t\t\t\t\t\t\t\t$tickets = array();\n\t\t\t\t\t\t\t\tif(empty($curShow['TIs']['TI']['C'])){\n\t\t\t\t\t\t\t\t\t$tickets = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$tickets[0] = $curShow['TIs']['TI'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tforeach($tickets as $TI){\n\t\t\t\t\t\t\t\t\t$ticket = $this->ticketLookup($rtsListing, $TI['C']);\n\t\t\t\t\t\t\t\t\t// store current showtimes\n\t\t\t\t\t\t\t\t\t// convert date/time\n\t\t\t\t\t\t\t\t\t$showDate = substr($curShow['DT'], 0, 8);\n\t\t\t\t\t\t\t\t\tif(!empty($ticket) && empty($ticket['HideOnInternet'])){\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tforeach($movie['showtimes'] as $curShowTime){\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$curShowTime['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sel_dates_arr[$curShowTime['@attributes']['date']] = strtotime($curShowTime['@attributes']['date']);\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\t\n\t\t\t\t\t\t\t\t\t// store upcoming showtimes\n\t\t\t\t\t\t\t\t\t} elseif (count($tickets) == 1 && !empty($ticket) && $ticket['HideOnInternet'] == 1 && $ticket['Name'] == 'rSupersvr') {\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\t\t\t\t\t\tif($movie['showtimes']['@attributes']){\n\t\t\t\t\t\t\t\t\t\t\t$stDate = explode('/',$movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t$stDate = $stDate[2] . sprintf(\"%02d\", $stDate[0]) . $stDate[1];\n\t\t\t\t\t\t\t\t\t\t\tif($stDate == $showDate){\n\t\t\t\t\t\t\t\t\t\t\t\t$soon_dates_arr[$movie['showtimes']['@attributes']['date']] = strtotime($movie['showtimes']['@attributes']['date']);\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t}\n\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\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\t//print_r($movie_data);\n\t\t\t\t\t\n\t\t\t\t\t// walk through movie data and save images to media library where needed\n\t\t\t\t\tif($movie_data['photos']['photo'] || $movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// download image save to cache then delete\n\t\t\t\t\t\t$myFile = ereg_replace(\"[^A-Za-z0-9-]\", \"_\", trim($movie_data['name'])).'.jpg';\n\t\t\t\t\t\t$myFile = preg_replace('/[_]+/', '_', $myFile);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check for existing poster file\n\t\t\t\t\t\t$db = Loader::db();\n\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\tif (!$det) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// pull remote file\n\t\t\t\t\t\t\tif(count($movie_data['hiphotos']['photo']) > 1){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['hiphotos']['photo']){\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['hiphotos']['photo'];\n\t\t\t\t\t\t\t} elseif(count($movie_data['photos']['photo']) > 0) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'][0];\n\t\t\t\t\t\t\t} elseif($movie_data['photos']['photo']) {\n\t\t\t\t\t\t\t\t$imgLnk = $movie_data['photos']['photo'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$new_image = $this->get_data($imgLnk);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$myFileLocation = DIR_FILES_UPLOADED_STANDARD.'/cache/'.$myFile;\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation)){\n\t\t\t\t\t\t\t\t$fh = fopen($myFileLocation, 'w');\n\t\t\t\t\t\t\t\t$stringData = $new_image;\n\t\t\t\t\t\t\t\tfwrite($fh, $stringData);\n\t\t\t\t\t\t\t\tfclose($fh);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!file_exists($myFileLocation) || filesize($myFileLocation) > 0){\n\t\t\t\t\t\t\t\t$error = \\Concrete\\Core\\File\\Importer::E_PHP_FILE_ERROR_DEFAULT;\n\t\t\t\t\t\t\t\t$fi = new \\Concrete\\Core\\File\\Importer();\n\t\t\t\t\t\t\t\t$newFile = $fi->import($myFileLocation,$myFile);\n\t\t\t\t\t\t\t\tif(!is_object($newFile)) {\n\t\t\t\t\t\t\t\t\t$this->set('errorMessage', \\Concrete\\Core\\File\\Importer::getErrorMessage($error)); \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// delete cached file\n\t\t\t\t\t\t\t\tunlink($myFileLocation);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//echo $myFileLocation;\n//\t\t\t\t\t\t\techo $myFile;\n//\t\t\t\t\t\t\tprint_r($movie_data);\n//\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$det = $db->GetRow('SELECT * FROM FileVersions WHERE fvIsApproved = 1 AND fvFilename = ? LIMIT 1', array($myFile));\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$f = \\File::getByID($det[fID]);\n\t\t\t\t\t\t\t$fv = $f->getApprovedVersion();\n\t\t\t\t\t\t\t$path = $fv->getRelativePath();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// update poster art to use local relative path\n\t\t\t\t\t\t$movie_data_arr[$movie['movie_id']]['photos']['photo'] = $path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$path = 'null';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// store queried show dates\n\t\t\t$movieFeed = $expensiveCache->getItem('movieFeed');\n\t\t\t// store in cache if not found\n\t\t\tif ($movieFeed->isMiss()) {\n\t\t\t\t$movieFeed->lock();\n\t\t\t\t$movie_feed_new = $updated_listing;\n\t\t\t\t$movieFeed->set($movie_feed_new,7200);\n\t\t\t}\n\t\t\t$movieFeed = $movieFeed->get();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t// convert to JSON\n\t\t\tasort($sel_dates_arr);\n\t\t\t$sel_dates_arr = json_encode($sel_dates_arr);\n\t\t\tasort($soon_dates_arr);\n\t\t\t$soon_dates_arr = json_encode($soon_dates_arr);\n\t\t\t$updated_listing = json_encode($updated_listing);\n\t\t\t$rtsListing = json_encode($rtsListing);\n\t\t\t$movie_data_arr = json_encode($movie_data_arr);\n\t\t\t\n\t\t\t$final_listing = 'var dateOpts = ' . $sel_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var soonDateOpts = ' . $soon_dates_arr . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var listingData = ' . $updated_listing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var rtsListingData = ' . $rtsListing . ';'.\"\\n\\n\";\n\t\t\t$final_listing .= 'var movieData = ' . $movie_data_arr . ';';\n\t\t\t\n\t\t\t// save as static file\n\t\t\ttouch($listCacheFle);\n\t\t\t$fh = fopen($listCacheFle, 'w');\n\t\t\tfwrite($fh, $final_listing);\n\t\t\tfclose($fh);\n\n\t\t}\n\t\t\n\t\t// add json variables to footer\n\t\t$this->addFooterItem($html->javascript(DIR_REL.'/application/files/listingcache.js'));\n\t\t\n\t\t// transfer usable variables\n\t\t//$this->set('jsAPI', $updated_listing);\n\t}", "function getListResults ( $ListID, $use_cache = TRUE )\n\t{\n\n\t\t$is_cached = false;\n\t\tif ( $use_cache ) {\n\t\t\t$wishlist = get_option( $this->db_options_name_cached_wishlist );\n\n\t\t\tif ( is_array( $wishlist ) ) {\n\t\t\t\tif ( isset( $wishlist[$ListID] ) ) {\n\t\t\t\t\t//$wishlist = unserialize( $cached_wishlist );\n\t\t\t\t\tif ( (time() - $wishlist[$ListID]['time']) < 60 * 60 * 23 ) {\n\t\t\t\t\t\t$is_cached = true;\n\t\t\t\t\t\t$list = $wishlist[$ListID]['list'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( ! $is_cached ) {\n\t\t\t$list = $this->handleRESTcall( $this->getRestListLookupParams( $ListID ) );\n\n\t\t\tif ( 1 == $list['Lists']['List']['TotalItems'] ) {\n\t\t\t\t$list['Lists']['List']['ListItem'] = array ('0' => $list['Lists']['List']['ListItem'] ); // If one item in the list we need to make it a multi array\n\t\t\t} else {\n\t\t\t\tif ( $list['Lists']['List']['TotalPages'] > 1 ) { // If the list contains over 10 items we need to process the other pages.\n\t\t\t\t\t$page = 2;\n\t\t\t\t\twhile ( $page <= $list['Lists']['List']['TotalPages'] ) {\n\t\t\t\t\t\t$result = $this->handleRESTcall( $this->getRestListLookupParams( $ListID, null, $page ) );\n\t\t\t\t\t\tforeach ( $result['Lists']['List']['ListItem'] as $key => $value ) {\n\t\t\t\t\t\t\t$newkey = 10 * ($page - 1) + $key;\n\t\t\t\t\t\t\t$list['Lists']['List']['ListItem'][$newkey] = $value; //Add the items from the remaining pages to the lists.\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$page ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! (isset( $list['Lists']['Request']['Errors'] ) || isset( $list['Error'] )) ) {\n\t\t\t\t$wishlist[$ListID]['time'] = time();\n\t\t\t\t$wishlist[$ListID]['list'] = $list;\n\t\t\t\tupdate_option( $this->db_options_name_cached_wishlist, $wishlist );\n\t\t\t}\n\t\t}\n\n\t\treturn ($list);\n\t}", "function _ajax_fetch_custom_list_callback() {\n\n\t$wp_list_table = new TT_Example_List_Table();\n\t$wp_list_table->ajax_response();\n}", "public function listings($method='GET')\n\t{\n \n $data_tmp['listing_uri'] = config_item('listing_uri');\n if(empty($data_tmp['listing_uri']))$data_tmp['listing_uri'] = 'property'; \n \n $this->load->model('language_m');\n $this->load->model('estate_m');\n $this->load->model('option_m');\n \n $this->data['message'] = lang_check('Something is wrong with request');\n $this->data['token_available'] = FALSE;\n $POST = $this->input->get_post(NULL, TRUE);\n \n if(isset($POST['lang_code']))\n {\n $lang_id = $this->language_m->get_id($POST['lang_code']);\n }\n \n if(empty($lang_id))$lang_id=$this->language_m->get_default_id();\n $lang_code = $this->language_m->get_code($lang_id);\n \n $token = $this->token_m->get_token($POST);\n if(is_object($token))\n $this->data['token_available'] = TRUE;\n \n if(is_object($token))\n {\n if($method == 'GET')\n {\n $options = $this->option_m->get_field_list($this->language_m->get_default_id());\n $this->db->join('property_user', 'property_user.property_id = property.id', 'right');\n $this->db->where('user_id', $token->user_id);\n $estates = $this->estate_m->get_by(array('language_id'=>$lang_id));\n \n // Set website details\n $json_data = array();\n // Add listings to rss feed \n foreach($estates as $key=>$row){\n $estate_date = array();\n $title = $this->estate_m->get_field_from_listing($row, 10);\n $url = site_url($data_tmp['listing_uri'].'/'.$row->id.'/'.$lang_code.'/'.url_title_cro($title));\n \n $row->json_object = json_decode($row->json_object);\n $row->image_repository = json_decode($row->image_repository);\n $estate_date['url'] = $url;\n $estate_date['listing'] = $row;\n \n $json_data[] = $estate_date;\n }\n \n $this->data['results'] = $json_data;\n \n $this->data['message'] = lang_check('Results available');\n }\n elseif($method == 'DELETE' && isset($POST['property_id']))\n {\n $this->load->library('session');\n $property_id = $POST['property_id'];\n \n $this->data['success'] = false;\n // Check if property_id already saved, stop and write message\n if($this->estate_m->check_user_permission($property_id, $token->user_id)>0)\n {\n $this->estate_m->delete($property_id);\n \n $this->data['message'] = lang_check('Listing removed!');\n $this->data['success'] = true;\n }\n // Save favorites to database\n else\n {\n $this->data['message'] = lang_check('Listing doesnt exists!');\n $this->data['success'] = true;\n }\n }\n }\n\n echo json_encode($this->data);\n exit();\n\t}", "protected function _executeGetList() {\n // Init\n $list = array();\n\n $pid = (int)$this->_postVar['pid'];\n $offset = (int)$this->_postVar['start'];\n $limit = (int)$this->_postVar['limit'];\n $itemsPerPage = (int)$this->_postVar['pagingSize'];\n $depth = (int)$this->_postVar['depth'];\n $sysLanguage = (int)$this->_postVar['sysLanguage'];\n $listType = (string)$this->_postVar['listType'];\n\n // Store last selected language\n $GLOBALS['BE_USER']->setAndSaveSessionData('TQSeo.sysLanguage', $sysLanguage);\n\n if (!empty($pid)) {\n $page = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord('pages', $pid);\n\n $fieldList = array();\n\n switch ($listType) {\n case 'metadata':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'keywords',\n 'description',\n 'abstract',\n 'author',\n 'author_email',\n 'lastupdated',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n\n unset($row);\n foreach ($list as &$row) {\n if (!empty($row['lastupdated'])) {\n $row['lastupdated'] = date('Y-m-d', $row['lastupdated']);\n } else {\n $row['lastupdated'] = '';\n }\n }\n unset($row);\n break;\n\n case 'geo':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_geo_lat',\n 'tx_tqseo_geo_long',\n 'tx_tqseo_geo_place',\n 'tx_tqseo_geo_region'\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'searchengines':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_canonicalurl',\n 'tx_tqseo_is_exclude',\n 'tx_tqseo_priority',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'url':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'title',\n 'url_scheme',\n 'alias',\n 'tx_realurl_pathsegment',\n 'tx_realurl_pathoverride',\n 'tx_realurl_exclude',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitle':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_pagetitle',\n 'tx_tqseo_pagetitle_rel',\n 'tx_tqseo_pagetitle_prefix',\n 'tx_tqseo_pagetitle_suffix',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitlesim':\n $buildTree = FALSE;\n $list = $this->_listPageTitleSim($page, $depth, $sysLanguage);\n break;\n\n default:\n // Not defined\n return;\n break;\n }\n }\n\n $ret = array(\n 'results' => count($list),\n 'rows' => array_values($list),\n );\n\n return $ret;\n }", "function displayCreateListing() {\r\n displayModifyListing(\"processListing.php\", \"createListing\", \"\", \"\", \"\",\"\",\"\", \"\");\r\n}", "public function getArtists($status);", "function getMainActions(){\n $step = $this->getStep($this->listing->user_id);\n $data=[];\n\n /**\n * Hide buttons when listing is not on steps\n */\n if(isset($step) && $step->date_end != '0000-00-00 00:00:00')\n {\n /**\n * APPROVE AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_ACTIVE)\n {\n $data[]=[\n /** Approve and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_approve_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-approve action-btn',\n ];\n }\n /**\n * REJECT AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->featured == \\Orm\\Model\\Listings\\Listings::NOT_FEATURED){\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_DELETED)\n {\n $data[]=[\n /** REJECT and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_reject_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-reject action-btn',\n ];\n }\n }\n return $data;\n }\n }", "public function listing() {\r\n $options = get_option( 'myhome_redux' );\r\n $show_advanced = is_null( $options['mh-listing-show_advanced'] ) ? true : intval( $options['mh-listing-show_advanced'] );\r\n $show_clear = is_null( $options['mh-listing-show_clear'] ) ? true : intval( $options['mh-listing-show_clear'] );\r\n $show_sort_by = is_null( $options['mh-listing-show_sort_by'] ) ? true : intval( $options['mh-listing-show_sort_by'] );\r\n $show_view_types = is_null( $options['mh-listing-show_view_types'] ) ? true : intval( $options['mh-listing-show_view_types'] );\r\n $advanced_number = is_null( $options['mh-listing-search_form_advanced_number'] ) ? 3 : intval( $options['mh-listing-search_form_advanced_number'] );\r\n // settings from Listing options page\r\n $atts = array(\r\n 'lazy_loading' => $options['mh-listing-lazy_loading'] ? 'true' : 'false',\r\n 'lazy_loading_limit' => intval( $options['mh-listing-load_more_button_number'] ),\r\n 'load_more_button' => $options['mh-listing-load_more_button_label'],\r\n 'load_prev_button' => $options['mh-listing-load_prev_button_label'],\r\n 'listing_default_view' => $options['mh-listing-default_view'],\r\n 'estates_per_page' => $options['mh-listing-estates_limit'],\r\n 'search_form_position' => $options['mh-listing-search_form_position'],\r\n 'label' => $options['mh-listing-label'],\r\n 'search_form_advanced_number' => $advanced_number,\r\n 'show_advanced' => $show_advanced ? 'true' : 'false',\r\n 'show_clear' => $show_clear ? 'true' : 'false',\r\n 'show_sort_by' => $show_sort_by ? 'true' : 'false',\r\n 'show_view_types' => $show_view_types ? 'true' : 'false',\r\n 'agent_id' => $this->id, // get estates only from this agent\r\n 'map' => false\r\n );\r\n\r\n // prepare attributes\r\n foreach ( My_Home_Attribute::get_attributes() as $attr ) {\r\n $value = $options['mh-listing-' . $attr->get_slug() . '_show'];\r\n $atts[$attr->get_slug() . '_show'] = $value ? 'true' : 'false';\r\n }\r\n\r\n // initiate listing\r\n $listing = new My_Home_Listing( $atts );\r\n ?>\r\n <div class=\"mh-listing--full-width mh-listing--horizontal-boxed\">\r\n <?php $listing->listing(); ?>\r\n </div>\r\n <?php\r\n }", "public function getList()\n {\n }", "public function purchase_return_list()\n {\n $data['title'] = 'POS System';\n $data['menu'] = 'inventory';\n $data['content'] = 'admin/inventory/purchase_return/list';\n $data['purchase_returns'] = $this->MPurchase_return_master->get_all();\n $data['privileges'] = $this->privileges;\n $this->load->view('admin/template', $data);\n }", "function get_results($args)\n {\n }", "function get_results($args)\n {\n }", "function alat_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\r\n\t\t$result=$this->m_alat->alat_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "function booksList($offset, $total_records_per_page, $order, $ascdesc)\n{\n $booksManager = new ListManager();\n\n\n\n if (isset($_GET['search']) && $_GET['search']!='') {\n $search = input(addcslashes($_GET['search'], '_'));\n $search=\"%\".$search.\"%\";\n $books = $booksManager->get_search($offset, $total_records_per_page, $order, $ascdesc, $search);\n } elseif (isset($_GET['cat']) && $_GET['cat']!='') {\n $cat = input($_GET['cat']);\n $books = $booksManager-> get_cat($offset, $total_records_per_page, $order, $ascdesc, $cat);\n } else {\n $books = $booksManager->selectAll($offset, $total_records_per_page, $order, $ascdesc); // Appel la fonction qui renvoie toutes les données sur les livres en bdd\n }\n // require('view/listView.php');\n return $books;\n echo selectAll();\n}", "public function index() {\n $output = $this->verifyProvidedInput(['keywords' => 'Keywords are required to perform a search']);\n\n if (empty($output)) {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n if (!empty($this->request->advancedSearch) && $this->request->advancedSearch) {\n $sortBy = (isset($this->request->sortBy) ? $this->request->sortBy : 'rawListPrice');\n $reverseSort = (isset($this->request->reverseSort) ? boolval($this->request->reverseSort) : false);\n $data = $this->getRETS->getListing()\n ->setSortBy($sortBy)\n ->setReverseSort($reverseSort)\n ->search($preparedKeywords, \n $this->request->extra, \n $this->request->maxPrice, \n $this->request->minPrice, \n $this->request->beds, \n $this->request->baths, \n $this->request->includeResidential, \n $this->request->includeLand, \n $this->request->includeCommercial);\n \n $this->addThumbnails($data);\n $output = $this->respondData($data);\n } else {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n $data = $this->getRETS->getListing()->searchByKeyword($preparedKeywords);\n $this->addThumbnails($data);\n $output = $this->respondData($data);\n }\n }\n\n return $output;\n }", "public function get_json_results() {\n }", "public function index()\n {\n //qui ritorno l'elenco delle liste\n //return TodoList::paginate(20);\n $lists = TodoList::paginate(20);\n return $this->getResult($lists->toArray());\n }", "public function index()\n {\n $data= Pizza::get()->toArray();\n if($data)\n {\n return $this->response(true,'rows successfully listed',$data);\n }\n return $this->response(false,'no rows found',[]);\n }", "function list(){\n $res = $res = $this->client->request('GET',$this->path,[]);\n $this->checkResponse($res,array(200));\n return $res;\n }", "public function action() {\n $this->curPos ++;\n usleep(250000);\n// # advanced finish if you need it for some reason:\n// if($this->curPos>40) return 'We have finished right now!';\n return array('lastItem'=>$this->curPos, 'itemCount'=>$this->count);\n }", "abstract public function getResults(): mixed;" ]
[ "0.69911814", "0.69135123", "0.6191085", "0.61634105", "0.6106261", "0.6106261", "0.60919493", "0.6079555", "0.60730743", "0.60586506", "0.6057292", "0.5979495", "0.59759116", "0.5966504", "0.5867618", "0.58074546", "0.5806632", "0.58025557", "0.5796107", "0.5766682", "0.57637703", "0.57054", "0.5705112", "0.56637645", "0.56479096", "0.5631926", "0.5583362", "0.5580018", "0.5580018", "0.5580018", "0.55795205", "0.5572956", "0.5563976", "0.5549063", "0.5546685", "0.55426294", "0.55390215", "0.552659", "0.55246454", "0.5522747", "0.5511233", "0.548951", "0.5487353", "0.54846007", "0.54828846", "0.54735667", "0.54718083", "0.5470762", "0.5467904", "0.5464692", "0.5455951", "0.545373", "0.54340076", "0.5425628", "0.5422889", "0.5420882", "0.5418302", "0.54169947", "0.5415513", "0.54146254", "0.5407161", "0.5389055", "0.5387423", "0.53825194", "0.5381398", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5378635", "0.5375336", "0.536375", "0.53622645", "0.53530973", "0.53520507", "0.5348448", "0.5329882", "0.53291476", "0.53288126", "0.53225636", "0.5321964", "0.53211683", "0.5318913", "0.5318913", "0.53172415", "0.53120136", "0.52992517", "0.5295117", "0.52885616", "0.5285489", "0.5285226", "0.52809364", "0.52773446" ]
0.0
-1
Method to cancel an edit
public function cancelSection() { JRequest::checkToken() or jExit(JText::_('JInvalid_Token')); // Initialize variables. $app = &JFactory::getApplication(); $modelName = $app->getUserState('com_eve.roles.model'); $app->setUserState('com_eve.roles.model', null); $app->setUserState('com_eve.sectionCorporation.corporationID', null); $app->setUserState('com_eve.sectionCorporation.section', null); $model = &$this->getModel($modelName, 'EveModel'); $this->setRedirect(JRoute::_('index.php?option=com_eve&view=access', false)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "public function cancel()\n {\n $this->resetInput();\n $this->updateMode = false;\n }", "public function cancelEdit($data) {\n\t\t\n\t\t// Redirect back to the edit page\n\t\treturn $this->redirect(\"budgeting/edit\");\n\t}", "protected function cancelEdit()\n {\n if ($this->backup == NULL && $this->current) {\n $this->plugins[$this->current] = new $this->current($this->dn, $this);\n $this->plugins[$this->current]->set_acl_base($this->acl_base);\n $this->plugins[$this->current]->set_acl_category(preg_replace(\"/\\/$/\", \"\", $this->acl_category));\n\n } elseif (is_array($this->backup)) {\n foreach ($this->backup as $name => $value) {\n $this->plugins[$this->current]->$name = $value;\n }\n }\n $this->backup = NULL;\n $this->current = \"\";\n $this->closeDialogs();\n }", "function cancel()\n\t{\n\t\t// Initialize some variables\n\t\t$db = & JFactory::getDBO();\n\t\t$user = & JFactory::getUser();\n\n\t\t// Get an article table object and bind post variabes to it [We don't need a full model here]\n\t\t$article = & JTable::getInstance( 'content' );\n\t\t$article->bind( JRequest::get( 'post' ) );\n\n\t\tif ( $user->authorize( 'com_content', 'edit', 'content', 'all' ) || ($user->authorize( 'com_content', 'edit', 'content', 'own' ) && $article->created_by == $user->get( 'id' )) )\n\t\t{\n\t\t\t$article->checkin();\n\t\t}\n\n\t\t// If the task was edit or cancel, we go back to the content item\n\t\t$referer = JRequest::getString( 'ret', base64_encode( JURI::base() ), 'get' );\n\t\t$referer = base64_decode( $referer );\n\t\tif ( !JURI::isInternal( $referer ) )\n\t\t{\n\t\t\t$referer = '';\n\t\t}\n\t\t$this->setRedirect( $referer );\n\n\t}", "public function actionCancel()\n {\n }", "public function cancel()\n {\n }", "public function cancel()\n {\n }", "public function cancel(): void;", "public function Cancel()\n {\n $prevMode = $this->m_Mode;\n $this->SetDisplayMode(MODE_R);\n if ($prevMode == MODE_N) // NEW mode to READ mode, has record change, need to refresh the subforms\n return $this->ReRender(true, true);\n // EDIT to READ, no record change\n return $this->ReRender(true,false);\n }", "public function cancel();", "public function actionCancel()\n {\n $this->render('cancel');\n }", "protected function cancel(): void\n {\n }", "public function cancel()\n\t{\n\t\t// Initialize variables.\n\t\t$app = &JFactory::getApplication();\n\n\t\t// Clear the user edit information from the session.\n\t\t$app->setUserState('com_users.edit.user.id', null);\n\t\t$app->setUserState('com_users.edit.user.data', null);\n\n\t\t// Redirect to the list screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users&view=users', false));\n\t}", "public function cancelAction() \n {\n \t\t$tblVote = Facebook_Vote::Table();\n\t\t$objSession = new App_Session_Namespace( 'facebook' );\n\t\t\n\t\tif ( is_object( $objSession )) {\n\t\t\t$nUserId = $objSession->user->fbu_id;\n\t\t\t$nVoteId = $this->_getIntParam( 'fbv_vote_id', 1 );\n\t\t\t\n\t\t\t$objVote = $tblVote->findVote( $nUserId, $nVoteId );\n\t\t\tif ( is_object( $objVote ) ) {\n \t\t\t\t$objVote->delete();\n\t\t\t}\n\t\t}\n\t\t$this->view->return = $this->_getParam( 'return' );\n }", "public function cancelRecListItem($sender, $param)/*\n Module: cancelRecListItem\n Parameters:\n * $sender -- Page that sent request\n * $param -- Tcontrol that sent request\n Author Name(s): Ashley Prasad\n Date Created: 12/7/2010\n Purpose: Cancels edit command\n */{\n $this->RecipeUserListGrid->EditItemIndex = -1;\n self::ddlRebind($this->User->getUserId());\n self::UserListRebind($this->User->getUserId());\n }", "public function cancel(): int;", "public function cancel()\n {\n $this->confirmationArchived = false;\n }", "protected function _cancelOperation() {}", "function _cancel($info)\n\t{\n\t // Gan trang thai xac thuc\n\t $data = array();\n\t $data['status'] = mod('order')->status('canceled');\n\t\n\t // Cap nhat du lieu vao data\n\t model('user_bank')->update($info->id, $data);\n\t // Gui thong bao\n\t set_message(lang('notice_update_success'));\n\t return TRUE;\n\t}", "public function cancel () {\n\t\t$this->opts['cancel'] = true;\n\t\treturn $this;\n\t}", "function cancel()\n\t{\n\t\tif ($_GET[\"obj_id\"] != 0)\n\t\t{\n\t\t\tif ($_GET[\"new_type\"] == \"pg\")\n\t\t\t{\n\t\t\t\t$this->ctrl->redirect($this, \"view\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ctrl->redirect($this, \"subchap\");\n\t\t\t}\n\t\t}\n\t}", "public function cancelupdate(Request $request)\n {\n //cancel post\n if (Session::has('Upost')) {\n $data = Session::get('Upost');\n }else {\n $data = Session::get('New');\n }\n return view('post.postupdate')->with(['ptt' => $data]);\n }", "public function cancel()\n {\n $user = Auth::user();\n\n if ( $user->cancel_rank() )\n flash('Your place request was canceled.')->success()->important();\n\n if ( $user->cancel_place() )\n flash('Your place as been removed.')->success()->important();\n\n return redirect()->back();\n }", "function cancel() {\n\n\t\tif (KRequest::getVar('return')) {\n\t\t\t$url = KLink::base64UrlDecode(KRequest::getVar('return'));\n\t\t}\n\t\telse {\n\t\t\t$controllerName = KenedoController::getControllerNameFromClass(get_class($this));\n\t\t\t$url = KLink::getRoute('index.php?option='.$this->component.'&controller='.$controllerName, false);\n\t\t}\n\n\t\t$this->setRedirect($url);\n\n\t}", "public function cancelAction() {\n\n return $this->_redirect('/order_basis/payment');\n }", "public function cancel($key = null)\n\t{\n\t\t$this->_result = $result = parent::cancel();\n\t\t$model = $this->getModel();\n\n\t\t//Define the redirections\n\t\tswitch ($this->getLayout() . '.' . $this->getTask())\n\t\t{\n\t\t\tcase 'reservation.cancel':\n\n\t\t\t\t$app = JFactory::getApplication();\n\t\t\t\t$app->redirect(\"index.php\");\n\n\t\t\t\t/*$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t), array(\n\t\t\t\t\t'cid[]' => null\n\t\t\t\t));*/\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t));\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function cancelAction()\n {\n $event = Mage::getModel('payanyway/event')\n ->setEventData($this->getRequest()->getParams());\n $message = $event->cancelEvent();\n\n // set quote to active\n $session = $this->_getCheckout();\n if ($quoteId = $session->getPayanywayQuoteId()) {\n $quote = Mage::getModel('sales/quote')->load($quoteId);\n if ($quote->getId()) {\n $quote->setIsActive(true)->save();\n $session->setQuoteId($quoteId);\n }\n }\n $session->addError($message);\n $this->_redirect('checkout/cart');\n }", "public function cancelAction()\n {\n \n $po_order_id = $this->getRequest()->getParam('po_order_id');\n \n Mage::dispatchEvent('purchase_order_stockmovement_cancel_po', array('po_order_id'=>$po_order_id)); \n \n //move to 'purchase_order_stockmovement_cancel' event to handle.\n /*$collection = mage::getModel('Purchase/StockMovement')\n ->getCollection()\n ->addFieldToFilter('sm_po_num', $po_num);\n foreach ($collection as $item)\n {\n $item->delete();\n }\n */\n /*\n $order = mage::getModel('Purchase/Order')->load($po_num);\n foreach ($order->getProducts() as $item)\n {\n $productId = $item->getpop_product_id();\n Mage::dispatchEvent('purchase_update_supply_needs_for_product', array('product_id'=>$productId));\n }\n */\n \n //Move to order cancel funciton.\n /*$collection = mage::getModel('purchase/orderitem')\n ->getCollection()\n ->addFieldToFilter('pop_order_num', $po_num);\n foreach ($collection as $item)\n {\n $item->delete();\n } */\n \n \n $purchaseOrder = Mage::getModel('purchase/order')->load($po_order_id);\n\n $purchaseOrder->cancel();\n \n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Purchase order successfully Canceled'));\n \n $this->_redirect('purchase/orders/list');\n }", "public function cancelRequest(){\n //the other users Id\n $otherUserId = $_POST[\"otherUserId\"];\n //deletes the record in the database\n $this->individualGroupModel->cancelGroupRequestInvitation($otherUserId); \n //redirects\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }", "public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect($this->getReturnPage());\n\t}", "public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect($this->getReturnPage());\n\t}", "public function cancelar() {\n $this->reabrir();\n\n //Lo unico que cambia es que seteo el estado a cancelado\n $this->estado = self::CANCELADO;\n if (!$this->save())\n throw new Exception('Pedido: '.$this->getNumero().'. Error al procesar pedido: '.Commons::renderError($pedido->getErrors()));\n }", "function handleCancelProgramItemEditor(EventContext $context)\n {\n $context->setForward(dirname(__FILE__) . \"/program_item_selector.php\");\n }", "public function cancelAction()\n\t{\n\t\t$this->_redirect('checkout/onepage/failure');\n\t}", "function cancel()\n\t{\n\t\t// Initialize variables.\n\t\t$app = & JFactory::getApplication();\n\n\t\t// Clear the link id from the session.\n\t\t$app->setUserState('redirect.edit.link.id', null);\n\n\t\t// Redirect to the list screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=links', false));\n\t}", "public function cancelMyReserved($id);", "function cancel(){\n\t\t//echo \"In Cancel\";\n\t\t\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ';\n\t\t//echo JFactory::getDate('now', JFactory::getApplication()->getCfg('offset'))->toFormat() . \"\\n<br/><br/>\";\n\t\t\n\t\t//$date = JFactory::getDate();\n\t\t//$date->setOffset(JFactory::getApplication()->getCfg('offset'));\n\t \n\t \t//echo \"Offset: \" . JFactory::getApplication()->getCfg('offset');\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ' . $date->toFormat() . \"\\n\";\n\t\t$date =& JFactory::getDate($time= 'now', $tzOffset=0);\n\n\t\t//$date->setOffset($mainframe->getCfg('offset'));\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ' . $date->toFormat();\n\t\t\n\t\t//echo \"New date: \" . date('Y-m-d H:i:s');\n\n\t\t//return false;\n\t\t\n\t\t$insData =new stdClass();\n\t\t$insData->idt_drivin_event_apply = $_POST['appCanId'];\n\n\t\t//$date = new DateTime();\n\t\t$insData->dt_cancel = date('Y-m-d H:i:s'); //'CURRENT_TIMESTAMP';//$date->getTimestamp();\n\t\t\n\t\t$db = JFactory::getDBO();\n\t\tif(!$db->updateObject( '#__jevent_events_apply', $insData, 'idt_drivin_event_apply' )){\n\t\t\techo $database->stderr();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;//resendCancelEmailById($insData->idt_drivin_event_apply);\n\t}", "public function actionCancel() {\n $token = trim($_GET['token']);\n// $payerId = trim($_GET['PayerID']);\n $criteria = new CDbCriteria;\n $criteria->condition = 'token=:Tokenw';\n $criteria->params = array(':Tokenw' => $token);\n $orders = Orders::model()->find($criteria);\n if ($orders->status_id == '4') {\n $orders->status_id = '2';\n $orders->save();\n// need to clear cart\n//Yii::app()->shoppingCart->clear();\n }\n $this->render('cancel');\n }", "function cancelar()\r\n\t{\r\n\t\t$this->_log->debug( $this->get_txt() . \"[ cancelar ]\", 'toba');\r\n\t\t$this->limpiar_memoria();\r\n\t}", "public function actionCancel($id)\n {\n // $this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->approved = 'cancelled';\n $model->status = 0;\n if ( $model->save() ) {\n Yii::$app->getSession()->setFlash('success', 'Quotation Cancelled');\n } else {\n Yii::$app->getSession()->setFlash('danger', 'Unable to cancel the Quotation');\n }\n\n return $this->redirect(['index']);\n }", "public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect(JRoute::_($this->getReturnPage()));\n\t}", "public function cancel() {\n\t\t$this->workflowActivitySpecification->setState(WorkflowActivityStateEnum::CANCELLED);\n\n\t\tif ($this->runtimeContext)\n\t\t\t$this->workflowActivity->onCancel($this->runtimeContext);\n\t}", "protected function cancel()\n\t{\n\t\t$this->executeTask('Rollback');\n\n\t\treturn false;\n\t}", "function cancel() {\n if($this->request->isAsyncCall()) {\n if($this->active_invoice->isLoaded()) {\n if($this->active_invoice->canCancel($this->logged_user)) {\n if($this->request->isSubmitted()) {\n try {\n $this->active_invoice->markAsCanceled($this->logged_user);\n \n $issued_to_user = $this->active_invoice->getIssuedTo();\n if ($issued_to_user instanceof User && Invoices::getNotifyClientAboutCanceledInvoice()) {\n $notify_users = array($issued_to_user);\n \t if ($issued_to_user->getId() != $this->logged_user->getId()) {\n \t $notify_users[] = $this->logged_user;\n \t } // if\n\n AngieApplication::notifications()\n ->notifyAbout('invoicing/invoice_canceled', $this->active_invoice, $this->logged_user)\n ->sendToUsers($notify_users);\n } // if\n \n \t\t\t\t\t\t$this->response->respondWithData($this->active_invoice, array(\n \t \t'as' => 'invoice', \n \t 'detailed' => true,\n \t ));\n } catch (Error $e) {\n \t$this->response->exception($e);\n } // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n } else {\n $this->response->badRequest();\n } // if\n }", "public function cancel($reason)\n {\n $this->cancel_time = Format::timestamp2datetime(Format::timestamp());\n\n if ($this->state == self::STATE_COMPLETED) {\n $this->state = self::STATE_CANCELLED_AFTER_COMPLETE;\n } else {\n $this->state = self::STATE_CANCELLED;\n }\n\n if (!$reason) {\n $reason = (($this->state == self::STATE_CANCELLED_AFTER_COMPLETE) ?\n self::REASON_FUND_RETURNED : self::REASON_PROCESSING_EXECUTION_FAILED);\n }\n $this->reason = $reason;\n\n Log::log('transactions_payme', $this->id, 'Reason: '.$reason.PHP_EOL.\n ', State: '.$this->state , 'cancel');\n $this->update(['cancel_time', 'state', 'reason']);\n }", "function handleCancelRelatedPersonEditor(EventContext $context)\n {\n $context->setForward(dirname(__FILE__) . \"/program_item_editor.php\");\n }", "public function cancel()\n {\n $this->_statement =null;\n }", "public function cancel_membership() {\n \t$membership_id = $this->uri->segment(3);\n\n \t$data = [\n \t\t'id' => $membership_id,\n \t\t'status' => 'Cancelled'\n \t];\n\n \t$this->Member_Model->update_membership($data);\n\n \tredirect('members/list/active');\n }", "function cancel() {\r\n\t\t$this->setRedirect ( 'index.php' );\r\n\t}", "public function cancel() {\n $this->__lastActions__[] = array();\n $this->__dbo__->rollback($this->__instanceId__);\n return $this;\n }", "public function cancel_invoice_old_style()\r\n\t{\r\n\t\textract($_POST); //echo $id;\r\n\t\t$data['check'] = $this->My_model->select_any_row('invoice',array('INVOICE_NO' => $student_id)); //print_r($data); exit;\r\n\t\tif($data['check']->STATUS == 1)\r\n\t\t{\r\n\t\t\t$status = 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$status = 1;\r\n\t\t}\r\n\t\t$update = $this->My_model->update_any_table('invoice',array('STATUS' => $status),array('INVOICE_NO ' => $student_id));\r\n\t\tif($update == true):\r\n\t\t\t$data['list'] = $this->My_model->canceling_current_issue_style($student_id); //print_r($data);\r\n\t\t\t\tif(!$data['list'] >0)\r\n\t\t\t{\r\n\t\t\t\techo '<tr><td colspan=\"6\"><h2 style=\"color:#E35240\" align=\"center\">Sorry No record Found !</h2></td></tr>';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$a = 1;\r\n\t\t\t\tforeach($data['list'] as $row){\r\n\t\t\t\t\t\techo '<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>'.$row->REGISTERATION_NO.'</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>'.$row->INVOICE_NO.'</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>'.$row->STUDENT_NAME.'</td>\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\t<td>'.$row->INVOICE_DATE.'</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>'.$row->DUE_DATE.'</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($row->STATUS==1){\r\n\t\t\t\t\t\t\t\t\t\t\techo\t'<div class=\"label label-primary\"> Active...</div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"label label-danger\"> Cancelled...</div>';\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 echo '</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn-group btn-sm\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<button href=\"#\" value=\"'.$row->INVOICE_NO.'\" onClick=\"get_value_invoice(this.value)\" class=\"btn btn-info\" data-toggle=\"modal\" data-target=\".bs-example-modal-lg\"><span class=\"fa fa-eye\"></span>View</button>';\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($row->STATUS == 0){\r\n\t\t\t\t\t\t\t\t\t\t\t\techo\t'<a href=\"#\" class=\" cancelled btn \" style=\"color:#F00;\">Cancelled</a>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<button value=\"'.$row->INVOICE_NO.'\" onClick=\"cancel_the_list(this.value)\" class=\"btn btn-danger\">Cancel</button>';\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 echo' </div>\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t</td>';\r\n\t\t\t\t\t}\r\n\t\t}\r\n\t\tendif;\r\n\t}", "public function cancel()\n {\n $this->canceled = true;\n\n $this->save();\n\n $this->user->notify(new OrderCanceled($this));\n\n }", "public function cancelAction()\n {\n $params = $this->getRequest()->getParams();\n if (array_key_exists('shipment', $params)) {\n $shipment = Mage::getModel('sales/order_shipment')->load($params['shipment']);\n if (Mage::helper('iparcel/api')->cancelShipment($shipment)) {\n Mage::getSingleton('adminhtml/session')->addSuccess('Shipment canceled');\n }\n }\n\n $this->_redirectReferer();\n return true;\n }", "public function cancel( $id )\n\t{\n\t\treturn $this->controller->cancel( $id );\n\t}", "public function handleCancel() {\n // logit('HC: ' . print_r($this->data, true));\n if ($this->data['submit_button'] == 'Cancel') {\n $this->data = array();\n $this->error = array();\n $this->_redirector->gotoUrl($this->mainpage);\n }\n }", "public function cancel()\n\t{\n\t\t$this->pdoStatement = null;\n\t}", "public function massCancelAction()\n {\n $this->_ratepayMassEvent('cancel');\n \n $this->_redirect('*/*/index');\n }", "public function cancelled()\n {\n \n $this->alert('info', 'Understood');\n }", "public function cancelled()\n {\n \n $this->alert('info', 'Understood');\n }", "protected function _actionCancel(KCommandContext $context)\n\t{\n\t\t$post\t= $this->getModel()->getItem();\n\n\t\t$isset\t= array(\n\t\t\t'post'\t=> $post->id,\n\t\t\t'topic' => isset($this->_request->topic) && $this->_request->topic,\n\t\t\t'forum'\t=> isset($this->_request->forum) && $this->_request->forum\n\t\t);\n\n\t\tif($isset['post']) {\n\t\t\t$append = $this->_redirect_hash ? '#p'.$post->id : '';\n\t\t\t$this->_redirect = 'index.php?option=com_ninjaboard&view=topic&id='.$post->ninjaboard_topic_id.'&post='.$post->id.$append;\n\t\t\t\n\t\t} elseif($isset['topic']) {\n\t\t\t$this->_redirect = 'index.php?option=com_ninjaboard&view=topic&id='.$this->_request->topic;\n\t\t} elseif($isset['forum']) {\n\t\t\t$this->_redirect = 'index.php?option=com_ninjaboard&view=forum&id='.$this->_request->forum;\n\t\t} else {\n\t\t\tparent::_actionCancel($context);\n\t\t}\n\t\t\n\t\treturn $post;\n\t}", "function cancel($key=null)\n\t{\n\t\t$this->setRedirect( 'index.php' );\n\t}", "public function cancel($value) {\n return $this->setProperty('cancel', $value);\n }", "public static function cancella()\n {\n $delete_id = $_SESSION['current_user']->getId();\n UtenteFactory::cancellaAzienda($delete_id);\n }", "public function cancel()\n {\n $post = $_REQUEST;\n $model = & $this->getModel('jms');\n $model->cancelSubscription($post);\n $this->setRedirect('index.php?option=com_jms&view=jms&layout=cancel&id=' . $post['id'] . '&plan_id=' . $post['plan_id']);\n }", "public function cancelable()\n {\n $this->status = self::STATUS_CANCELABLE;\n $this->save();\n\t\t\n $this->fireModelEvent('cancelable');\n }", "public function cancel()\n\t{\n\t\t$option = JRequest::getVar('option');\n\t\t$Itemid = JRequest::getVar('Itemid');\n\n\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&Itemid=' . $Itemid, false); ?>\n\t\t<script language=\"javascript\">\n\t\t\twindow.parent.location.href = \"<?php echo $link ?>\";\n\t\t</script>\n\t\t<?php exit;\n\t}", "public function cancelEmail()\n {\n $this->emailUpdate = false;\n $this->email = $this->customer->email;\n }", "function actionCancel($id)\n {\n $order = $this->orderManager->find($id);\n $previousOrderStatus = $order->objednavky_stav_id;\n $affected = $this->orderManager->cancelPendingOrder($id);\n\n if ($affected > 0) {\n try {\n $this->notificationMailer\n ->addTo($order->uzivatele->email)\n ->setTemplateFile('storno.latte')\n ->setSubject('Objednávka byla stornována')\n ->setTemplateVar('order', $order)\n ->send();\n\n if (!$this->isAjax()) {\n $this->flashMessage('Objednávka byla zrušena.', 'info');\n }\n } catch (SmtpException $exception) {\n $this->flashMessage('E-mail se nepodařilo odeslat.', 'danger');\n\n // rollback order status\n $this->orderManager->setStatus($id, $previousOrderStatus);\n }\n }\n\n if (!$this->isAjax()) {\n $ref = $this->getParameter('ref');\n if ($ref) {\n $this->redirect($ref);\n } else {\n $backlink = \"/kryo/orders?ordersGrid-id={$id}&do=ordersGrid-detail\";\n $backlink = $this->appendFlashMessage($backlink);\n $this->redirectUrl($backlink);\n }\n }\n }", "public function cancel()\n\t{\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\t\t$this->setRedirect('index.php');\n\t}", "function cancel($watcherId);", "function cancel() \r\n\t\t{\r\n\t $msg = JText::_('COM_QRCODE_CANCEL');\r\n\t $this->setRedirect(JRoute::_('index.php?option=com_qrcode', false), $msg);\r\n\t }", "function cancelObject($in_rep = false)\n\t{\n\t\tilUtil::sendInfo($this->lng->txt('msg_cancel'), true);\n\t\t// TODO: check this\n\t\tilUtil::redirect('repository.php?cmd=frameset&ref_id='.$_GET['ref_id']);\n\t}", "public function getCancelReason()\n {\n return $this->cancel_reason;\n }", "public function canceled()\n {\n return $this->cancelled();\n }", "public function cancel($id)\n {\n $reservation = $this->repository->makeModel()->find($id);\n\n $reservation->is_canceled = true;\n $reservation->canceled_at = Carbon::now();\n\n $reservation->is_confirmed = null;\n $reservation->confirmed_at = null;\n\n $history = $reservation->history;\n\n $log = [\n 'full_name' => \\Auth::user()->full_name,\n 'action' => 'cancel',\n 'label' => 'Cancelou a reserva',\n 'date' => Carbon::now()->format('Y-m-d H:i:s')\n ];\n\n if (!$history) {\n $history = [$log];\n }else{\n $history = array_prepend($history, $log);\n }\n\n $reservation->history = $history;\n\n $reservation->save();\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'message' => 'PlaceReservations canceled.',\n 'canceled' => $reservation->load('client'),\n ]);\n }\n\n return redirect()->back()->with('message', 'PlaceReservations deleted.');\n }", "function cancel()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t// Checkin the weblink\n\t\t$model = $this->getModel('weblink');\n\t\t$model->checkin();\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "public function cancelUserDeletion(): void\n {\n $this->dispatch('close-modal', id: 'confirmingUserDeletion');\n }", "public function cancelAction() {\n $this->chekcingForMarketplaceSellerOrNot ();\n $orderId = $this->getRequest ()->getParam ( 'id' );\n $produtId = $this->getRequest ()->getParam ( 'item' );\n $sellerId = Mage::getSingleton ( 'customer/session' )->getId ();\n /**\n * Prepare product collection for cancel\n */\n $products = Mage::getModel ( 'marketplace/commission' )->getCollection ();\n $products->addFieldToSelect ( '*' );\n $products->addFieldToFilter ( 'seller_id', $sellerId );\n $products->addFieldToFilter ( 'order_id', $orderId );\n $products->addFieldToFilter ( 'product_id', $produtId );\n $collectionId = $products->getFirstItem ()->getId ();\n $orderStatusFlag = Mage::getStoreConfig ( 'marketplace/admin_approval_seller_registration/order_manage' );\n if (! empty ( $collectionId ) && $orderStatusFlag == 1) {\n try {\n $data = array (\n 'order_status' => 'canceled',\n 'customer_id' => 0,\n 'credited' => 1,\n 'item_order_status' => 'canceled'\n );\n $commissionModel = Mage::getModel ( 'marketplace/commission' )->load ( $collectionId )->addData ( $data );\n $commissionModel->setId ( $collectionId )->save ();\n\n /**\n * Load order details based on the order id.\n */\n $_order = Mage::getModel ( 'sales/order' )->load ( $orderId );\n /**\n * Update order items to cancel status\n */\n foreach ( $_order->getAllItems () as $item ) {\n if ($this->getRequest ()->getParam ( 'item' ) == $item->getId ()) {\n $item->cancel ();\n }\n }\n /**\n * Send cancel notification for admin\n */\n Mage::helper('marketplace/general')->sendCancelOrderAdminNotification($orderId,$produtId,$sellerId);\n\n Mage::helper('marketplace/general')->sendCancelOrderBuyerNotification($_order);\n /**\n * Redirect to order view page\n */\n Mage::getSingleton ( 'core/session' )->addSuccess ( $this->__ ( $this->__ ( 'The item has been cancelled.' ) ) );\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n } catch ( Exception $e ) {\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( $e->getMessage () ) );\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n }\n } else {\n /**\n * Return to order manage page\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'You do not have permission to access this page' ) );\n $this->_redirect ( 'marketplace/order/manage' );\n return false;\n }\n }", "public function editFormCancelled(\\Nette\\Forms\\SubmitButton $btn) {\n $this->redirect('default');\n }", "public function cancelAction() \n {\n if (Mage::getEdition() == Mage::EDITION_ENTERPRISE) {\n $this->helper()->storeCreditSessionUnset();\n $this->helper()->giftCardsSessionUnset();\n }\n\n $this->_redirect('checkout/cart');\n }", "public function cancel($id)\n {\n $rezervacija = Rezervacija::where('zavrsena','0')->findOrFail($id);\n\n $room_id = $rezervacija->id_sobe;\n\n $soba = Soba::where('id', $room_id)->first();\n $soba->status = '0';\n date_default_timezone_set('Europe/Sarajevo');\n $danas = Carbon::now();\n if($danas >= Carbon::parse($rezervacija->datum_od))\n {\n $soba->cistoca = '0';\n }\n\n $soba->save();\n\n $rezervacija->delete();\n \n return back();\n }", "public function cancel_request() {\n\n $pending_request_exists = $this->micro_relation_exists($this->from, $this->to, \"P\");\n\n if($pending_request_exists) {\n $this->delete_relation(\"P\");\n }\n }", "public function cancel ($number)\n {\n $req = new FortieRequest();\n $req->method('PUT');\n $req->path($this->basePath)->path($number)->path('cancel');\n\n return $this->send($req->build());\n }", "protected function cancelLink()\n\t{\n\t\treturn '<p class=\"form-link-cancel\"><a href=\"/journal\">Back to Journal</a></p>';\n\t}", "public function CancelAddEditContentElement(Params $params) {\n $template=$params->getOrFail('id_template','is_not0_integer','Invalid template identifier!');\n $pIndex=$params->getOrFail('pindex','is_integer','Invalid page position!');\n $this->CloseForm();\n $target=$params->safeGet('target','','is_string');\n $cTarget=$params->safeGet('c_target','','is_string');\n $this->Exec('ShowContentTable',['id_template'=>$template,'pindex'=>$pIndex,'target'=>$target,'c_target'=>$cTarget],$target);\n }", "public function cancel( Request $request ) {\n\t\ttry {\n\n\t\t\t( new TripController )->cancel( $request );\n\n\t\t\treturn back()->with( [ 'flash_success' => trans( 'admin.provider_msgs.trip_cancelled' ) ] );\n\t\t} catch ( ModelNotFoundException $e ) {\n\t\t\treturn back()->with( [ 'flash_error' => trans( 'admin.something_wrong' ) ] );\n\t\t}\n\t}", "private function getCancelLink() {\n\t\t$cancelParams = array();\n\n\t\treturn Linker::linkKnown(\n\t\t\t$this->getContext()->getTitle(),\n\t\t\twfMessage( 'cancel' )->parse(),\n\t\t\tarray( 'id' => 'mw-editform-cancel' ),\n\t\t\t$cancelParams\n\t\t);\n\t}", "public function cancel($module, Request $request)\n {\n $input = $request->all();\n\n //Recebe as informações do(s) documento(s) || Normal = 1 , Onda = Vários\n $documents = $input['documents'];\n\n //Valida se usuário possui permissão para retornar documento (ex: documents_prod_ret)\n if(App\\Models\\User::getPermission('documents_'.$module.'_ret',Auth::user()->user_type_code)){\n $retDoc = App\\Models\\Document::cancel($documents, $module); \n if($retDoc['erro'] <> 0){\n //Erro no cancelamento\n Flash::error($retDoc['msg']);\n return array('danger',$retDoc['msg']);\n }else{\n //Sucesso no Cancelamento\n Flash::success($retDoc['msg']);\n return array('success',$retDoc['msg']);\n }\n\n }else{\n //Sem permissão\n Flash::error(Lang::get('validation.permission'));\n return array('danger',Lang::get('validation.permission'));\n }\n\n\n }", "public function cancelDelete($key = null)\n\t{\n\t\tJSession::checkToken() or JSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN'));\n\t\t$this->_result = $result = parent::delete();\n\t\t$model = $this->getModel();\n\n\t\t//Define the redirections\n\t\t$app = JFactory::getApplication();\n\t\t$app->redirect(\"index.php\");\n\t}", "public function cancelThis($id, $data) {\n $this->db->update('tbl_order', array('deliver' => 3, 'cancel_comments' => $data), array('id' => $id));\n }", "public function cancel(Project $project) {\n }", "public function cancel($params)\n { \n return $this->request(Resource::RESOURCE_ORDER_CANCEL, $params);\n }", "public function getCancelType()\n {\n return $this->cancelType;\n }", "public function actionPaypalCancel($payment_id) {\n /*Do what you want*/ \n }", "public function edit()\n {\n abort(404);\n }", "public function cancel()\n {\n session()->flash('warning', trans('saassubscription::app.super-user.plans.payment-cancel'));\n\n return redirect()->route($this->_config['redirect']);\n }", "public function cancelLeaveMember() {\n\n\t\t$del_uid = $_POST['del_uid'];\n\t\tif(sizeof($del_uid) > 0) {\n\t\t\t$db_in = implode(\"','\", $del_uid);\n\n\t\t\t$data_table = $this->get('data_table');\n\t\t\t$pk = $this->get('pk');\n\n\t\t\tdbUpdate($data_table, \"mb_level = '3', lv_time = ''\", \"where $pk in ('$db_in')\");\n\t\t}\n\n\t\tif(sizeof($del_uid) > 0) {\n\t\t\t$this->result['code'] = 'update_ok';\n\t\t\t$this->postDelete();\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->result;\n\t}", "public function cancelBooking($id, BookingCancelRequest $request) {\n $booking = Booking::find($id);\n $dates = $booking->dates;\n $guide_id = $booking->gid;\n $traveler_id = $booking->uid;\n $avails = Availability::where('guide_id', $guide_id)->where('travler_id', $traveler_id)->update(['status' => 'free']);\n $booking->status = 'canceled';\n $booking->save();\n if (is_null($booking))\n throw new GeneralException('This booking does not exist.');\n $booking->status = 'canceled';\n if ($booking->save())\n return redirect()->back()->withFlashSuccess(trans(\"Booking has been canceled\"));\n\n throw new GeneralException(\"There was a problem cancelling this booking. Please try again.\");\n }" ]
[ "0.7971961", "0.7971961", "0.7912603", "0.7880044", "0.77153593", "0.75337124", "0.7409863", "0.7395446", "0.7395446", "0.73497146", "0.7342042", "0.73310894", "0.72818875", "0.7216394", "0.70027643", "0.6968806", "0.6789235", "0.6731828", "0.6706536", "0.6681796", "0.66718715", "0.6668041", "0.6648584", "0.6613475", "0.65860295", "0.65171736", "0.6488101", "0.6424761", "0.64221394", "0.6408233", "0.640076", "0.6400503", "0.6400503", "0.63762355", "0.63583666", "0.6348018", "0.6347981", "0.632172", "0.63075536", "0.6290579", "0.6288189", "0.6286413", "0.6279841", "0.62779355", "0.6250366", "0.624522", "0.62311727", "0.6218207", "0.6200115", "0.6195448", "0.61898845", "0.6187157", "0.6177381", "0.6163969", "0.61299855", "0.6129942", "0.61222595", "0.6100821", "0.609765", "0.60894716", "0.60894716", "0.60870737", "0.60839736", "0.6078526", "0.6075062", "0.6064397", "0.6064366", "0.6034236", "0.6021799", "0.6009444", "0.6009138", "0.599682", "0.59902006", "0.5989762", "0.59845203", "0.59769964", "0.59661585", "0.59423316", "0.5941773", "0.5940565", "0.5934461", "0.5931907", "0.59215313", "0.5919728", "0.59190196", "0.5905092", "0.5890859", "0.5887854", "0.5881014", "0.5869973", "0.582406", "0.5822293", "0.58049875", "0.5795459", "0.57852256", "0.5780402", "0.57783425", "0.5763529", "0.5762529", "0.5754929" ]
0.59457237
77
/ Method to cancel an edit
public function cancelSectionCorporation() { JRequest::checkToken() or jExit(JText::_('JInvalid_Token')); // Initialize variables. $app = &JFactory::getApplication(); $modelName = $app->getUserState('com_eve.roles.model'); $app->setUserState('com_eve.roles.model', null); $app->setUserState('com_eve.section.id', null); $model = &$this->getModel($modelName, 'EveModel'); $this->setRedirect(JRoute::_('index.php?option=com_eve&view=corporation&layout=edit', false)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "public function cancelEdit($data) {\n\t\t\n\t\t// Redirect back to the edit page\n\t\treturn $this->redirect(\"budgeting/edit\");\n\t}", "public function cancel()\n {\n $this->resetInput();\n $this->updateMode = false;\n }", "protected function cancelEdit()\n {\n if ($this->backup == NULL && $this->current) {\n $this->plugins[$this->current] = new $this->current($this->dn, $this);\n $this->plugins[$this->current]->set_acl_base($this->acl_base);\n $this->plugins[$this->current]->set_acl_category(preg_replace(\"/\\/$/\", \"\", $this->acl_category));\n\n } elseif (is_array($this->backup)) {\n foreach ($this->backup as $name => $value) {\n $this->plugins[$this->current]->$name = $value;\n }\n }\n $this->backup = NULL;\n $this->current = \"\";\n $this->closeDialogs();\n }", "function cancel()\n\t{\n\t\t// Initialize some variables\n\t\t$db = & JFactory::getDBO();\n\t\t$user = & JFactory::getUser();\n\n\t\t// Get an article table object and bind post variabes to it [We don't need a full model here]\n\t\t$article = & JTable::getInstance( 'content' );\n\t\t$article->bind( JRequest::get( 'post' ) );\n\n\t\tif ( $user->authorize( 'com_content', 'edit', 'content', 'all' ) || ($user->authorize( 'com_content', 'edit', 'content', 'own' ) && $article->created_by == $user->get( 'id' )) )\n\t\t{\n\t\t\t$article->checkin();\n\t\t}\n\n\t\t// If the task was edit or cancel, we go back to the content item\n\t\t$referer = JRequest::getString( 'ret', base64_encode( JURI::base() ), 'get' );\n\t\t$referer = base64_decode( $referer );\n\t\tif ( !JURI::isInternal( $referer ) )\n\t\t{\n\t\t\t$referer = '';\n\t\t}\n\t\t$this->setRedirect( $referer );\n\n\t}", "public function actionCancel()\n {\n }", "public function Cancel()\n {\n $prevMode = $this->m_Mode;\n $this->SetDisplayMode(MODE_R);\n if ($prevMode == MODE_N) // NEW mode to READ mode, has record change, need to refresh the subforms\n return $this->ReRender(true, true);\n // EDIT to READ, no record change\n return $this->ReRender(true,false);\n }", "public function cancel()\n {\n }", "public function cancel()\n {\n }", "public function cancel();", "public function cancel(): void;", "public function actionCancel()\n {\n $this->render('cancel');\n }", "protected function cancel(): void\n {\n }", "public function cancel()\n\t{\n\t\t// Initialize variables.\n\t\t$app = &JFactory::getApplication();\n\n\t\t// Clear the user edit information from the session.\n\t\t$app->setUserState('com_users.edit.user.id', null);\n\t\t$app->setUserState('com_users.edit.user.data', null);\n\n\t\t// Redirect to the list screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users&view=users', false));\n\t}", "public function cancelAction() \n {\n \t\t$tblVote = Facebook_Vote::Table();\n\t\t$objSession = new App_Session_Namespace( 'facebook' );\n\t\t\n\t\tif ( is_object( $objSession )) {\n\t\t\t$nUserId = $objSession->user->fbu_id;\n\t\t\t$nVoteId = $this->_getIntParam( 'fbv_vote_id', 1 );\n\t\t\t\n\t\t\t$objVote = $tblVote->findVote( $nUserId, $nVoteId );\n\t\t\tif ( is_object( $objVote ) ) {\n \t\t\t\t$objVote->delete();\n\t\t\t}\n\t\t}\n\t\t$this->view->return = $this->_getParam( 'return' );\n }", "public function cancelRecListItem($sender, $param)/*\n Module: cancelRecListItem\n Parameters:\n * $sender -- Page that sent request\n * $param -- Tcontrol that sent request\n Author Name(s): Ashley Prasad\n Date Created: 12/7/2010\n Purpose: Cancels edit command\n */{\n $this->RecipeUserListGrid->EditItemIndex = -1;\n self::ddlRebind($this->User->getUserId());\n self::UserListRebind($this->User->getUserId());\n }", "function _cancel($info)\n\t{\n\t // Gan trang thai xac thuc\n\t $data = array();\n\t $data['status'] = mod('order')->status('canceled');\n\t\n\t // Cap nhat du lieu vao data\n\t model('user_bank')->update($info->id, $data);\n\t // Gui thong bao\n\t set_message(lang('notice_update_success'));\n\t return TRUE;\n\t}", "public function cancel(): int;", "public function cancel()\n {\n $this->confirmationArchived = false;\n }", "protected function _cancelOperation() {}", "public function cancel () {\n\t\t$this->opts['cancel'] = true;\n\t\treturn $this;\n\t}", "function cancel()\n\t{\n\t\tif ($_GET[\"obj_id\"] != 0)\n\t\t{\n\t\t\tif ($_GET[\"new_type\"] == \"pg\")\n\t\t\t{\n\t\t\t\t$this->ctrl->redirect($this, \"view\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ctrl->redirect($this, \"subchap\");\n\t\t\t}\n\t\t}\n\t}", "public function cancelupdate(Request $request)\n {\n //cancel post\n if (Session::has('Upost')) {\n $data = Session::get('Upost');\n }else {\n $data = Session::get('New');\n }\n return view('post.postupdate')->with(['ptt' => $data]);\n }", "public function cancel()\n {\n $user = Auth::user();\n\n if ( $user->cancel_rank() )\n flash('Your place request was canceled.')->success()->important();\n\n if ( $user->cancel_place() )\n flash('Your place as been removed.')->success()->important();\n\n return redirect()->back();\n }", "function cancel() {\n\n\t\tif (KRequest::getVar('return')) {\n\t\t\t$url = KLink::base64UrlDecode(KRequest::getVar('return'));\n\t\t}\n\t\telse {\n\t\t\t$controllerName = KenedoController::getControllerNameFromClass(get_class($this));\n\t\t\t$url = KLink::getRoute('index.php?option='.$this->component.'&controller='.$controllerName, false);\n\t\t}\n\n\t\t$this->setRedirect($url);\n\n\t}", "function handleCancelProgramItemEditor(EventContext $context)\n {\n $context->setForward(dirname(__FILE__) . \"/program_item_selector.php\");\n }", "public function cancelRequest(){\n //the other users Id\n $otherUserId = $_POST[\"otherUserId\"];\n //deletes the record in the database\n $this->individualGroupModel->cancelGroupRequestInvitation($otherUserId); \n //redirects\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }", "public function cancelAction()\n {\n $event = Mage::getModel('payanyway/event')\n ->setEventData($this->getRequest()->getParams());\n $message = $event->cancelEvent();\n\n // set quote to active\n $session = $this->_getCheckout();\n if ($quoteId = $session->getPayanywayQuoteId()) {\n $quote = Mage::getModel('sales/quote')->load($quoteId);\n if ($quote->getId()) {\n $quote->setIsActive(true)->save();\n $session->setQuoteId($quoteId);\n }\n }\n $session->addError($message);\n $this->_redirect('checkout/cart');\n }", "public function cancelAction()\n {\n \n $po_order_id = $this->getRequest()->getParam('po_order_id');\n \n Mage::dispatchEvent('purchase_order_stockmovement_cancel_po', array('po_order_id'=>$po_order_id)); \n \n //move to 'purchase_order_stockmovement_cancel' event to handle.\n /*$collection = mage::getModel('Purchase/StockMovement')\n ->getCollection()\n ->addFieldToFilter('sm_po_num', $po_num);\n foreach ($collection as $item)\n {\n $item->delete();\n }\n */\n /*\n $order = mage::getModel('Purchase/Order')->load($po_num);\n foreach ($order->getProducts() as $item)\n {\n $productId = $item->getpop_product_id();\n Mage::dispatchEvent('purchase_update_supply_needs_for_product', array('product_id'=>$productId));\n }\n */\n \n //Move to order cancel funciton.\n /*$collection = mage::getModel('purchase/orderitem')\n ->getCollection()\n ->addFieldToFilter('pop_order_num', $po_num);\n foreach ($collection as $item)\n {\n $item->delete();\n } */\n \n \n $purchaseOrder = Mage::getModel('purchase/order')->load($po_order_id);\n\n $purchaseOrder->cancel();\n \n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Purchase order successfully Canceled'));\n \n $this->_redirect('purchase/orders/list');\n }", "public function cancel($key = null)\n\t{\n\t\t$this->_result = $result = parent::cancel();\n\t\t$model = $this->getModel();\n\n\t\t//Define the redirections\n\t\tswitch ($this->getLayout() . '.' . $this->getTask())\n\t\t{\n\t\t\tcase 'reservation.cancel':\n\n\t\t\t\t$app = JFactory::getApplication();\n\t\t\t\t$app->redirect(\"index.php\");\n\n\t\t\t\t/*$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t), array(\n\t\t\t\t\t'cid[]' => null\n\t\t\t\t));*/\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t));\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function cancelar() {\n $this->reabrir();\n\n //Lo unico que cambia es que seteo el estado a cancelado\n $this->estado = self::CANCELADO;\n if (!$this->save())\n throw new Exception('Pedido: '.$this->getNumero().'. Error al procesar pedido: '.Commons::renderError($pedido->getErrors()));\n }", "public function cancelAction() {\n\n return $this->_redirect('/order_basis/payment');\n }", "function cancel(){\n\t\t//echo \"In Cancel\";\n\t\t\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ';\n\t\t//echo JFactory::getDate('now', JFactory::getApplication()->getCfg('offset'))->toFormat() . \"\\n<br/><br/>\";\n\t\t\n\t\t//$date = JFactory::getDate();\n\t\t//$date->setOffset(JFactory::getApplication()->getCfg('offset'));\n\t \n\t \t//echo \"Offset: \" . JFactory::getApplication()->getCfg('offset');\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ' . $date->toFormat() . \"\\n\";\n\t\t$date =& JFactory::getDate($time= 'now', $tzOffset=0);\n\n\t\t//$date->setOffset($mainframe->getCfg('offset'));\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ' . $date->toFormat();\n\t\t\n\t\t//echo \"New date: \" . date('Y-m-d H:i:s');\n\n\t\t//return false;\n\t\t\n\t\t$insData =new stdClass();\n\t\t$insData->idt_drivin_event_apply = $_POST['appCanId'];\n\n\t\t//$date = new DateTime();\n\t\t$insData->dt_cancel = date('Y-m-d H:i:s'); //'CURRENT_TIMESTAMP';//$date->getTimestamp();\n\t\t\n\t\t$db = JFactory::getDBO();\n\t\tif(!$db->updateObject( '#__jevent_events_apply', $insData, 'idt_drivin_event_apply' )){\n\t\t\techo $database->stderr();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;//resendCancelEmailById($insData->idt_drivin_event_apply);\n\t}", "function cancel()\n\t{\n\t\t// Initialize variables.\n\t\t$app = & JFactory::getApplication();\n\n\t\t// Clear the link id from the session.\n\t\t$app->setUserState('redirect.edit.link.id', null);\n\n\t\t// Redirect to the list screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=links', false));\n\t}", "public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect($this->getReturnPage());\n\t}", "public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect($this->getReturnPage());\n\t}", "public function actionCancel($id)\n {\n // $this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->approved = 'cancelled';\n $model->status = 0;\n if ( $model->save() ) {\n Yii::$app->getSession()->setFlash('success', 'Quotation Cancelled');\n } else {\n Yii::$app->getSession()->setFlash('danger', 'Unable to cancel the Quotation');\n }\n\n return $this->redirect(['index']);\n }", "protected function cancel()\n\t{\n\t\t$this->executeTask('Rollback');\n\n\t\treturn false;\n\t}", "public function cancelAction()\n\t{\n\t\t$this->_redirect('checkout/onepage/failure');\n\t}", "public function actionCancel() {\n $token = trim($_GET['token']);\n// $payerId = trim($_GET['PayerID']);\n $criteria = new CDbCriteria;\n $criteria->condition = 'token=:Tokenw';\n $criteria->params = array(':Tokenw' => $token);\n $orders = Orders::model()->find($criteria);\n if ($orders->status_id == '4') {\n $orders->status_id = '2';\n $orders->save();\n// need to clear cart\n//Yii::app()->shoppingCart->clear();\n }\n $this->render('cancel');\n }", "public function cancelMyReserved($id);", "function cancelar()\r\n\t{\r\n\t\t$this->_log->debug( $this->get_txt() . \"[ cancelar ]\", 'toba');\r\n\t\t$this->limpiar_memoria();\r\n\t}", "function handleCancelRelatedPersonEditor(EventContext $context)\n {\n $context->setForward(dirname(__FILE__) . \"/program_item_editor.php\");\n }", "public function cancel($reason)\n {\n $this->cancel_time = Format::timestamp2datetime(Format::timestamp());\n\n if ($this->state == self::STATE_COMPLETED) {\n $this->state = self::STATE_CANCELLED_AFTER_COMPLETE;\n } else {\n $this->state = self::STATE_CANCELLED;\n }\n\n if (!$reason) {\n $reason = (($this->state == self::STATE_CANCELLED_AFTER_COMPLETE) ?\n self::REASON_FUND_RETURNED : self::REASON_PROCESSING_EXECUTION_FAILED);\n }\n $this->reason = $reason;\n\n Log::log('transactions_payme', $this->id, 'Reason: '.$reason.PHP_EOL.\n ', State: '.$this->state , 'cancel');\n $this->update(['cancel_time', 'state', 'reason']);\n }", "public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect(JRoute::_($this->getReturnPage()));\n\t}", "public function cancel() {\n\t\t$this->workflowActivitySpecification->setState(WorkflowActivityStateEnum::CANCELLED);\n\n\t\tif ($this->runtimeContext)\n\t\t\t$this->workflowActivity->onCancel($this->runtimeContext);\n\t}", "function cancel() {\n if($this->request->isAsyncCall()) {\n if($this->active_invoice->isLoaded()) {\n if($this->active_invoice->canCancel($this->logged_user)) {\n if($this->request->isSubmitted()) {\n try {\n $this->active_invoice->markAsCanceled($this->logged_user);\n \n $issued_to_user = $this->active_invoice->getIssuedTo();\n if ($issued_to_user instanceof User && Invoices::getNotifyClientAboutCanceledInvoice()) {\n $notify_users = array($issued_to_user);\n \t if ($issued_to_user->getId() != $this->logged_user->getId()) {\n \t $notify_users[] = $this->logged_user;\n \t } // if\n\n AngieApplication::notifications()\n ->notifyAbout('invoicing/invoice_canceled', $this->active_invoice, $this->logged_user)\n ->sendToUsers($notify_users);\n } // if\n \n \t\t\t\t\t\t$this->response->respondWithData($this->active_invoice, array(\n \t \t'as' => 'invoice', \n \t 'detailed' => true,\n \t ));\n } catch (Error $e) {\n \t$this->response->exception($e);\n } // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n } else {\n $this->response->badRequest();\n } // if\n }", "public function cancel_invoice_old_style()\r\n\t{\r\n\t\textract($_POST); //echo $id;\r\n\t\t$data['check'] = $this->My_model->select_any_row('invoice',array('INVOICE_NO' => $student_id)); //print_r($data); exit;\r\n\t\tif($data['check']->STATUS == 1)\r\n\t\t{\r\n\t\t\t$status = 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$status = 1;\r\n\t\t}\r\n\t\t$update = $this->My_model->update_any_table('invoice',array('STATUS' => $status),array('INVOICE_NO ' => $student_id));\r\n\t\tif($update == true):\r\n\t\t\t$data['list'] = $this->My_model->canceling_current_issue_style($student_id); //print_r($data);\r\n\t\t\t\tif(!$data['list'] >0)\r\n\t\t\t{\r\n\t\t\t\techo '<tr><td colspan=\"6\"><h2 style=\"color:#E35240\" align=\"center\">Sorry No record Found !</h2></td></tr>';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$a = 1;\r\n\t\t\t\tforeach($data['list'] as $row){\r\n\t\t\t\t\t\techo '<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>'.$row->REGISTERATION_NO.'</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>'.$row->INVOICE_NO.'</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>'.$row->STUDENT_NAME.'</td>\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\t<td>'.$row->INVOICE_DATE.'</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>'.$row->DUE_DATE.'</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($row->STATUS==1){\r\n\t\t\t\t\t\t\t\t\t\t\techo\t'<div class=\"label label-primary\"> Active...</div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"label label-danger\"> Cancelled...</div>';\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 echo '</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn-group btn-sm\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<button href=\"#\" value=\"'.$row->INVOICE_NO.'\" onClick=\"get_value_invoice(this.value)\" class=\"btn btn-info\" data-toggle=\"modal\" data-target=\".bs-example-modal-lg\"><span class=\"fa fa-eye\"></span>View</button>';\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($row->STATUS == 0){\r\n\t\t\t\t\t\t\t\t\t\t\t\techo\t'<a href=\"#\" class=\" cancelled btn \" style=\"color:#F00;\">Cancelled</a>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<button value=\"'.$row->INVOICE_NO.'\" onClick=\"cancel_the_list(this.value)\" class=\"btn btn-danger\">Cancel</button>';\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 echo' </div>\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t</td>';\r\n\t\t\t\t\t}\r\n\t\t}\r\n\t\tendif;\r\n\t}", "public function cancel()\n {\n $this->_statement =null;\n }", "public function cancel() {\n $this->__lastActions__[] = array();\n $this->__dbo__->rollback($this->__instanceId__);\n return $this;\n }", "public function handleCancel() {\n // logit('HC: ' . print_r($this->data, true));\n if ($this->data['submit_button'] == 'Cancel') {\n $this->data = array();\n $this->error = array();\n $this->_redirector->gotoUrl($this->mainpage);\n }\n }", "public function cancel_membership() {\n \t$membership_id = $this->uri->segment(3);\n\n \t$data = [\n \t\t'id' => $membership_id,\n \t\t'status' => 'Cancelled'\n \t];\n\n \t$this->Member_Model->update_membership($data);\n\n \tredirect('members/list/active');\n }", "public function cancel()\n {\n $this->canceled = true;\n\n $this->save();\n\n $this->user->notify(new OrderCanceled($this));\n\n }", "function cancel() {\r\n\t\t$this->setRedirect ( 'index.php' );\r\n\t}", "public function cancelable()\n {\n $this->status = self::STATUS_CANCELABLE;\n $this->save();\n\t\t\n $this->fireModelEvent('cancelable');\n }", "protected function _actionCancel(KCommandContext $context)\n\t{\n\t\t$post\t= $this->getModel()->getItem();\n\n\t\t$isset\t= array(\n\t\t\t'post'\t=> $post->id,\n\t\t\t'topic' => isset($this->_request->topic) && $this->_request->topic,\n\t\t\t'forum'\t=> isset($this->_request->forum) && $this->_request->forum\n\t\t);\n\n\t\tif($isset['post']) {\n\t\t\t$append = $this->_redirect_hash ? '#p'.$post->id : '';\n\t\t\t$this->_redirect = 'index.php?option=com_ninjaboard&view=topic&id='.$post->ninjaboard_topic_id.'&post='.$post->id.$append;\n\t\t\t\n\t\t} elseif($isset['topic']) {\n\t\t\t$this->_redirect = 'index.php?option=com_ninjaboard&view=topic&id='.$this->_request->topic;\n\t\t} elseif($isset['forum']) {\n\t\t\t$this->_redirect = 'index.php?option=com_ninjaboard&view=forum&id='.$this->_request->forum;\n\t\t} else {\n\t\t\tparent::_actionCancel($context);\n\t\t}\n\t\t\n\t\treturn $post;\n\t}", "public function getCancelReason()\n {\n return $this->cancel_reason;\n }", "public function cancel()\n\t{\n\t\t$this->pdoStatement = null;\n\t}", "public function cancel($value) {\n return $this->setProperty('cancel', $value);\n }", "public function cancelAction()\n {\n $params = $this->getRequest()->getParams();\n if (array_key_exists('shipment', $params)) {\n $shipment = Mage::getModel('sales/order_shipment')->load($params['shipment']);\n if (Mage::helper('iparcel/api')->cancelShipment($shipment)) {\n Mage::getSingleton('adminhtml/session')->addSuccess('Shipment canceled');\n }\n }\n\n $this->_redirectReferer();\n return true;\n }", "public function cancel( $id )\n\t{\n\t\treturn $this->controller->cancel( $id );\n\t}", "public function massCancelAction()\n {\n $this->_ratepayMassEvent('cancel');\n \n $this->_redirect('*/*/index');\n }", "function cancel($key=null)\n\t{\n\t\t$this->setRedirect( 'index.php' );\n\t}", "public function cancelled()\n {\n \n $this->alert('info', 'Understood');\n }", "public function cancelled()\n {\n \n $this->alert('info', 'Understood');\n }", "public static function cancella()\n {\n $delete_id = $_SESSION['current_user']->getId();\n UtenteFactory::cancellaAzienda($delete_id);\n }", "function cancelObject($in_rep = false)\n\t{\n\t\tilUtil::sendInfo($this->lng->txt('msg_cancel'), true);\n\t\t// TODO: check this\n\t\tilUtil::redirect('repository.php?cmd=frameset&ref_id='.$_GET['ref_id']);\n\t}", "public function cancelEmail()\n {\n $this->emailUpdate = false;\n $this->email = $this->customer->email;\n }", "public function cancel()\n {\n $post = $_REQUEST;\n $model = & $this->getModel('jms');\n $model->cancelSubscription($post);\n $this->setRedirect('index.php?option=com_jms&view=jms&layout=cancel&id=' . $post['id'] . '&plan_id=' . $post['plan_id']);\n }", "public function cancel()\n\t{\n\t\t$option = JRequest::getVar('option');\n\t\t$Itemid = JRequest::getVar('Itemid');\n\n\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&Itemid=' . $Itemid, false); ?>\n\t\t<script language=\"javascript\">\n\t\t\twindow.parent.location.href = \"<?php echo $link ?>\";\n\t\t</script>\n\t\t<?php exit;\n\t}", "public function canceled()\n {\n return $this->cancelled();\n }", "private function getCancelLink() {\n\t\t$cancelParams = array();\n\n\t\treturn Linker::linkKnown(\n\t\t\t$this->getContext()->getTitle(),\n\t\t\twfMessage( 'cancel' )->parse(),\n\t\t\tarray( 'id' => 'mw-editform-cancel' ),\n\t\t\t$cancelParams\n\t\t);\n\t}", "public function cancelAction() {\n $this->chekcingForMarketplaceSellerOrNot ();\n $orderId = $this->getRequest ()->getParam ( 'id' );\n $produtId = $this->getRequest ()->getParam ( 'item' );\n $sellerId = Mage::getSingleton ( 'customer/session' )->getId ();\n /**\n * Prepare product collection for cancel\n */\n $products = Mage::getModel ( 'marketplace/commission' )->getCollection ();\n $products->addFieldToSelect ( '*' );\n $products->addFieldToFilter ( 'seller_id', $sellerId );\n $products->addFieldToFilter ( 'order_id', $orderId );\n $products->addFieldToFilter ( 'product_id', $produtId );\n $collectionId = $products->getFirstItem ()->getId ();\n $orderStatusFlag = Mage::getStoreConfig ( 'marketplace/admin_approval_seller_registration/order_manage' );\n if (! empty ( $collectionId ) && $orderStatusFlag == 1) {\n try {\n $data = array (\n 'order_status' => 'canceled',\n 'customer_id' => 0,\n 'credited' => 1,\n 'item_order_status' => 'canceled'\n );\n $commissionModel = Mage::getModel ( 'marketplace/commission' )->load ( $collectionId )->addData ( $data );\n $commissionModel->setId ( $collectionId )->save ();\n\n /**\n * Load order details based on the order id.\n */\n $_order = Mage::getModel ( 'sales/order' )->load ( $orderId );\n /**\n * Update order items to cancel status\n */\n foreach ( $_order->getAllItems () as $item ) {\n if ($this->getRequest ()->getParam ( 'item' ) == $item->getId ()) {\n $item->cancel ();\n }\n }\n /**\n * Send cancel notification for admin\n */\n Mage::helper('marketplace/general')->sendCancelOrderAdminNotification($orderId,$produtId,$sellerId);\n\n Mage::helper('marketplace/general')->sendCancelOrderBuyerNotification($_order);\n /**\n * Redirect to order view page\n */\n Mage::getSingleton ( 'core/session' )->addSuccess ( $this->__ ( $this->__ ( 'The item has been cancelled.' ) ) );\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n } catch ( Exception $e ) {\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( $e->getMessage () ) );\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n }\n } else {\n /**\n * Return to order manage page\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'You do not have permission to access this page' ) );\n $this->_redirect ( 'marketplace/order/manage' );\n return false;\n }\n }", "public function cancel_request() {\n\n $pending_request_exists = $this->micro_relation_exists($this->from, $this->to, \"P\");\n\n if($pending_request_exists) {\n $this->delete_relation(\"P\");\n }\n }", "function cancel() \r\n\t\t{\r\n\t $msg = JText::_('COM_QRCODE_CANCEL');\r\n\t $this->setRedirect(JRoute::_('index.php?option=com_qrcode', false), $msg);\r\n\t }", "function actionCancel($id)\n {\n $order = $this->orderManager->find($id);\n $previousOrderStatus = $order->objednavky_stav_id;\n $affected = $this->orderManager->cancelPendingOrder($id);\n\n if ($affected > 0) {\n try {\n $this->notificationMailer\n ->addTo($order->uzivatele->email)\n ->setTemplateFile('storno.latte')\n ->setSubject('Objednávka byla stornována')\n ->setTemplateVar('order', $order)\n ->send();\n\n if (!$this->isAjax()) {\n $this->flashMessage('Objednávka byla zrušena.', 'info');\n }\n } catch (SmtpException $exception) {\n $this->flashMessage('E-mail se nepodařilo odeslat.', 'danger');\n\n // rollback order status\n $this->orderManager->setStatus($id, $previousOrderStatus);\n }\n }\n\n if (!$this->isAjax()) {\n $ref = $this->getParameter('ref');\n if ($ref) {\n $this->redirect($ref);\n } else {\n $backlink = \"/kryo/orders?ordersGrid-id={$id}&do=ordersGrid-detail\";\n $backlink = $this->appendFlashMessage($backlink);\n $this->redirectUrl($backlink);\n }\n }\n }", "public function cancel()\n\t{\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\t\t$this->setRedirect('index.php');\n\t}", "public function cancelSection()\n\t{\n\t\tJRequest::checkToken() or jExit(JText::_('JInvalid_Token'));\n\n\t\t// Initialize variables.\n\t\t$app\t= &JFactory::getApplication();\n\n\t\t$modelName = $app->getUserState('com_eve.roles.model');\n\t\t$app->setUserState('com_eve.roles.model', null);\n\t\t$app->setUserState('com_eve.sectionCorporation.corporationID', null);\n\t\t$app->setUserState('com_eve.sectionCorporation.section', null);\n\n\t\t$model\t= &$this->getModel($modelName, 'EveModel');\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_eve&view=access', false));\n\t}", "public function cancel($id)\n {\n $reservation = $this->repository->makeModel()->find($id);\n\n $reservation->is_canceled = true;\n $reservation->canceled_at = Carbon::now();\n\n $reservation->is_confirmed = null;\n $reservation->confirmed_at = null;\n\n $history = $reservation->history;\n\n $log = [\n 'full_name' => \\Auth::user()->full_name,\n 'action' => 'cancel',\n 'label' => 'Cancelou a reserva',\n 'date' => Carbon::now()->format('Y-m-d H:i:s')\n ];\n\n if (!$history) {\n $history = [$log];\n }else{\n $history = array_prepend($history, $log);\n }\n\n $reservation->history = $history;\n\n $reservation->save();\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'message' => 'PlaceReservations canceled.',\n 'canceled' => $reservation->load('client'),\n ]);\n }\n\n return redirect()->back()->with('message', 'PlaceReservations deleted.');\n }", "protected function cancelLink()\n\t{\n\t\treturn '<p class=\"form-link-cancel\"><a href=\"/journal\">Back to Journal</a></p>';\n\t}", "public function editFormCancelled(\\Nette\\Forms\\SubmitButton $btn) {\n $this->redirect('default');\n }", "public function CancelAddEditContentElement(Params $params) {\n $template=$params->getOrFail('id_template','is_not0_integer','Invalid template identifier!');\n $pIndex=$params->getOrFail('pindex','is_integer','Invalid page position!');\n $this->CloseForm();\n $target=$params->safeGet('target','','is_string');\n $cTarget=$params->safeGet('c_target','','is_string');\n $this->Exec('ShowContentTable',['id_template'=>$template,'pindex'=>$pIndex,'target'=>$target,'c_target'=>$cTarget],$target);\n }", "function cancel($watcherId);", "function cancel()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t// Checkin the weblink\n\t\t$model = $this->getModel('weblink');\n\t\t$model->checkin();\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "public function cancelUserDeletion(): void\n {\n $this->dispatch('close-modal', id: 'confirmingUserDeletion');\n }", "public function cancel ($number)\n {\n $req = new FortieRequest();\n $req->method('PUT');\n $req->path($this->basePath)->path($number)->path('cancel');\n\n return $this->send($req->build());\n }", "public function cancelThis($id, $data) {\n $this->db->update('tbl_order', array('deliver' => 3, 'cancel_comments' => $data), array('id' => $id));\n }", "public function cancelAction() \n {\n if (Mage::getEdition() == Mage::EDITION_ENTERPRISE) {\n $this->helper()->storeCreditSessionUnset();\n $this->helper()->giftCardsSessionUnset();\n }\n\n $this->_redirect('checkout/cart');\n }", "public function getCancelType()\n {\n return $this->cancelType;\n }", "public function cancel($id)\n {\n $rezervacija = Rezervacija::where('zavrsena','0')->findOrFail($id);\n\n $room_id = $rezervacija->id_sobe;\n\n $soba = Soba::where('id', $room_id)->first();\n $soba->status = '0';\n date_default_timezone_set('Europe/Sarajevo');\n $danas = Carbon::now();\n if($danas >= Carbon::parse($rezervacija->datum_od))\n {\n $soba->cistoca = '0';\n }\n\n $soba->save();\n\n $rezervacija->delete();\n \n return back();\n }", "public function cancel($module, Request $request)\n {\n $input = $request->all();\n\n //Recebe as informações do(s) documento(s) || Normal = 1 , Onda = Vários\n $documents = $input['documents'];\n\n //Valida se usuário possui permissão para retornar documento (ex: documents_prod_ret)\n if(App\\Models\\User::getPermission('documents_'.$module.'_ret',Auth::user()->user_type_code)){\n $retDoc = App\\Models\\Document::cancel($documents, $module); \n if($retDoc['erro'] <> 0){\n //Erro no cancelamento\n Flash::error($retDoc['msg']);\n return array('danger',$retDoc['msg']);\n }else{\n //Sucesso no Cancelamento\n Flash::success($retDoc['msg']);\n return array('success',$retDoc['msg']);\n }\n\n }else{\n //Sem permissão\n Flash::error(Lang::get('validation.permission'));\n return array('danger',Lang::get('validation.permission'));\n }\n\n\n }", "public function cancel( Request $request ) {\n\t\ttry {\n\n\t\t\t( new TripController )->cancel( $request );\n\n\t\t\treturn back()->with( [ 'flash_success' => trans( 'admin.provider_msgs.trip_cancelled' ) ] );\n\t\t} catch ( ModelNotFoundException $e ) {\n\t\t\treturn back()->with( [ 'flash_error' => trans( 'admin.something_wrong' ) ] );\n\t\t}\n\t}", "public function cancelLeaveMember() {\n\n\t\t$del_uid = $_POST['del_uid'];\n\t\tif(sizeof($del_uid) > 0) {\n\t\t\t$db_in = implode(\"','\", $del_uid);\n\n\t\t\t$data_table = $this->get('data_table');\n\t\t\t$pk = $this->get('pk');\n\n\t\t\tdbUpdate($data_table, \"mb_level = '3', lv_time = ''\", \"where $pk in ('$db_in')\");\n\t\t}\n\n\t\tif(sizeof($del_uid) > 0) {\n\t\t\t$this->result['code'] = 'update_ok';\n\t\t\t$this->postDelete();\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->result;\n\t}", "public function cancelDelete($key = null)\n\t{\n\t\tJSession::checkToken() or JSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN'));\n\t\t$this->_result = $result = parent::delete();\n\t\t$model = $this->getModel();\n\n\t\t//Define the redirections\n\t\t$app = JFactory::getApplication();\n\t\t$app->redirect(\"index.php\");\n\t}", "public function cancelBooking($id, BookingCancelRequest $request) {\n $booking = Booking::find($id);\n $dates = $booking->dates;\n $guide_id = $booking->gid;\n $traveler_id = $booking->uid;\n $avails = Availability::where('guide_id', $guide_id)->where('travler_id', $traveler_id)->update(['status' => 'free']);\n $booking->status = 'canceled';\n $booking->save();\n if (is_null($booking))\n throw new GeneralException('This booking does not exist.');\n $booking->status = 'canceled';\n if ($booking->save())\n return redirect()->back()->withFlashSuccess(trans(\"Booking has been canceled\"));\n\n throw new GeneralException(\"There was a problem cancelling this booking. Please try again.\");\n }", "private function cancelConfirmation()\n {\n Chat::$bot->editMessageText([\n 'text' => 'channel removing confirmation canceled',\n 'inline_message_id' => Chat::getCallBackQuery()->getInlineMessageId()\n ]);\n }", "public function cancel($params)\n { \n return $this->request(Resource::RESOURCE_ORDER_CANCEL, $params);\n }", "function cancel_invoice($id)\r\n\t{\r\n\t\t\r\n\t\t$data['check'] = $this->My_model->select_any_row('invoice',array('INVOICE_NO' => $id)); \r\n\t\tif($data['check']->STATUS == 1)\r\n\t\t{\r\n\t\t\t$status = 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$status = 1;\r\n\t\t}\r\n\t\t$this->My_model->update_any_table('invoice',array('STATUS' => $status),array('INVOICE_NO ' => $id));\r\n\t\t$this->session->set_flashdata('msg','<div class=\"alert alert-dark alert-danger\">Invoice Cancelled Successfully</div>');\r\n\t\tredirect('Welcome');\r\n\t}", "public function cancel(Project $project) {\n }", "public function cancelarCita($id){\n $sql =\"update cita set estado='Cancelado' where id =$id\";\n if($this->conn->executeQuery($sql)){\n $this->conn->close();\n return true;\n }\n }" ]
[ "0.7973752", "0.7973752", "0.79198354", "0.79074275", "0.7807706", "0.75633234", "0.73769945", "0.73651814", "0.7357975", "0.7357975", "0.7286203", "0.72808856", "0.72268707", "0.71638274", "0.69999546", "0.69441086", "0.68874484", "0.67438036", "0.67428577", "0.6693798", "0.6683822", "0.667851", "0.6671045", "0.66597587", "0.6563613", "0.65041226", "0.6463202", "0.6462195", "0.6455885", "0.64353055", "0.6431305", "0.6430182", "0.64265174", "0.63926154", "0.63804555", "0.63777643", "0.63777643", "0.6338644", "0.6332229", "0.63299286", "0.63197917", "0.63045603", "0.63023674", "0.6294344", "0.6279666", "0.6257899", "0.6254904", "0.62329996", "0.62322235", "0.62204856", "0.62164205", "0.6210695", "0.619957", "0.6191467", "0.6174758", "0.61525136", "0.61476886", "0.6145746", "0.6137588", "0.61242276", "0.6117581", "0.6116015", "0.6095909", "0.60780996", "0.60692537", "0.60692537", "0.60653055", "0.6053669", "0.6051974", "0.6042239", "0.603202", "0.60239476", "0.60162914", "0.60147303", "0.5984049", "0.59807163", "0.59769964", "0.59767425", "0.5974881", "0.5969318", "0.5967151", "0.5966917", "0.59562296", "0.59525836", "0.5941181", "0.59357256", "0.5920015", "0.59170043", "0.591417", "0.5899104", "0.589709", "0.58887696", "0.58851063", "0.58727896", "0.58506554", "0.57983834", "0.5785408", "0.5784574", "0.5776234", "0.57722396", "0.5766311" ]
0.0
-1
Method to save a Section.
public function saveSection() { // Check for request forgeries. JRequest::checkToken() or jexit(JText::_('JInvalid_Token')); // Initialize variables. $app = &JFactory::getApplication(); $model = $this->getModel('Sectionroles'); $data = JRequest::getVar('jform', array(), 'post', 'array'); // Validate the posted data. $data = $model->validate($data); // Check for validation errors. if ($data === false) { // Get the validation messages. $errors = $model->getErrors(); // Push up to three validation messages out to the user. for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) { if (JError::isError($errors[$i])) { $app->enqueueMessage($errors[$i]->getMessage(), 'notice'); } else { $app->enqueueMessage($errors[$i], 'notice'); } } // Redirect back to the edit screen. $this->setRedirect(JRoute::_('index.php?option=com_eve&view=roles&layout=edit', false)); return false; } // Attempt to save the character. $return = $model->save($data); if ($return === false) { // Save failed, go back to the character and display a notice. $message = JText::sprintf('JError_Save_failed', $model->getError()); $this->setRedirect('index.php?option=com_eve&view=roles&layout=edit', $message, 'error'); return false; } /* // Save succeeded, check-in the character. if (!$model->checkin()) { // Check-in failed, go back to the character and display a notice. $message = JText::sprintf('JError_Checkin_saved', $model->getError()); $this->setRedirect('index.php?option=com_eve&view=character&layout=edit', $message, 'error'); return false; } */ $this->setMessage(JText::_('JController_Save_success')); // Redirect the user and adjust session state based on the chosen task. switch (strtolower($this->_task)) { case 'applysection': // Redirect back to the edit screen. $app->setUserState('com_eve.section.id', $return); $this->setRedirect(JRoute::_('index.php?option=com_eve&view=roles&layout=edit', false)); break; default: // Clear the member id and data from the session. $app->setUserState('com_eve.roles.model', null); $app->setUserState('com_eve.section.id', null); $app->setUserState('com_eve.section.data', null); // Redirect to the list screen. $this->setRedirect(JRoute::_('index.php?option=com_eve&view=access', false)); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n {\n return $this->write($this->filename, $this->sections);\n }", "public function store(SectionRequest $request)\n {\n $section = new Section($request->all());\n $section->school_id = session('current_school');\n $section->save();\n return redirect('/section');\n }", "public function store()\n\t{\n\t\t//\n\t\t\t\t//\n\t\t$validator = Validator::make(Input::all(), Section::$rules);\n\t\n\t if ($validator->passes()) {\n\t\t// validation has passed, save user in DB\n\t\t $sec = new Section;\n\t\t $sec->name = Input::get('name');\n\t\t $sec->description = Input::get('description');\n \t\t $sec->enabled = Input::get('enabled');\n \t\t $sec->category_id = Input::get('category_id');\n\t\t $sec->save();\n\t\t return Redirect::to('sections')\n\t\t\t\t->with('type', 'success')\n\t\t\t\t->with('message', 'New section created');\n\t } else {\n\t\t// validation has failed, display error messages \n\t\treturn Redirect::to('sections/create')\n\t\t\t\t->with('type', 'alert')\n\t\t\t\t->with('message', 'The following errors occurred')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput();\n\n\t }\n\t}", "public function store(CreatesectionRequest $request)\n {\n $input = $request->all();\n\n $section = $this->sectionRepository->create($input);\n\n $content = new content();\n $content->section_id = $section->id;\n $content->fill($input);\n $content->save();\n Flash::success('Section guardada con exito.');\n\n return redirect(route('sections.index'));\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$section = new Section($input);\n\t\t\n\t\tif ($section->save()) {\n\t\t\tFlash::success('Bereich erfolgreich angelegt.');\n\t\t\treturn Redirect::back();\n\t\t}\n\n\t\tFlash::error($section->errors());\n\t\treturn Redirect::back()->withInput();\n\t}", "public function SaveSection($id = null, $data)\n {\n // Only process valid data\n if($this->ValidateSection($data)) {\n\n // Format for update/insert query\n $dbData = Array (\n 'name' => $data->Name,\n );\n\n // Update existing user?\n if($id) {\n $this->Db()->where('id', $id);\n if ($this->Db()->update('Sections', $dbData)) {\n $section = new SectionModel($id, $data->Name);\n } else {\n throw new RestException(500, 'Update mislukt: ' . $this->Db()->getLastError());\n }\n // Add new user\n } else {\n $id = $this->Db()->insert('Sections', $dbData);\n if ($id) {\n $section = new SectionModel($id, $data->Name);\n } else {\n throw new RestException(500, 'Toevoegen mislukt: ' . $this->Db()->getLastError());\n }\n }\n\n return $section>toArray();\n }\n }", "function saveStatisticsSections() {\n\t\t// generate statistics.\n\n\t\tparent::validate();\n\n\t\t$journal = &Request::getJournal();\n\n\t\t$sectionIds = Request::getUserVar('sectionIds');\n\t\tif (!is_array($sectionIds)) {\n\t\t\tif (empty($sectionIds)) $sectionIds = array();\n\t\t\telse $sectionIds = array($sectionIds);\n\t\t}\n\n\t\t$journal->updateSetting('statisticsSectionIds', $sectionIds);\n\t\tRequest::redirect(null, null, 'statistics', null, array('statisticsYear' => Request::getUserVar('statisticsYear')));\n\t}", "public function store(CreateSectionRequest $request)\n {\n $input = $request->all();\n\n $section = $this->sectionRepository->create($input);\n\n\n Log::info('Admin has been create new section like => '.$request->name);\n\n\n Flash::success('Section saved successfully.');\n\n return redirect(route('sections.index'));\n }", "public function save() {\n $keys = $this->requirement->snid ? array('snid') : array();\n return drupal_write_record('course_outline', $this->requirement, $keys);\n }", "public function store(SchoolSectionsCreateRequest $request)\n {\n $section = new SchoolSection;\n\n $section->course_id = $request->input('course_id');\n $section->fork_id = $request->input('fork_id');\n $section->title = $request->input('title');\n\n // Save section\n if($section->save()){\n // If everything is ok, return category list\n return $this\n ->responseSuccess(\n [],\n 'Sections save successfully'\n );\n } else {\n // Error if section don't save\n return $this->responseError('Error. Section don\\'t save');\n }\n }", "public function store(Request $request)\n {\n //\n $section = new section();\n $section->name = $request['section'];\n $section->save();\n\n return redirect('/section');\n }", "protected function flagForSave() {\n $this->setTemporaryValue('sections', $this->sectionStorage->getSections());\n return $this;\n }", "public function store($resourceable, $id, Section $section, Request $request)\n {\n $resource = Str::plural($resourceable);\n\n if (request()->file('media') === null) {\n $attributes = request()->validate(Arr::except(Content::$rules, 'media'),\n Content::$messages);\n }\n else {\n $attributes = request()->validate(Content::$rules, Content::$messages);\n\n $media = $this->moveAndCreatePhoto($attributes['media'], $size = ['l' => Content::$LARGE_SIZE, 's' => Content::$THUMB_SIZE]);\n if ($media) {\n $attributes['media'] = $media;\n }\n }\n\n $sectionContent = $this->createEntry(Content::class, $attributes);\n $sectionContent->sections()->syncWithoutDetaching([$section->id]);\n\n return redirect('admin/'.$resource.'/' . $id . '/sections/'.$request->section_id.'/content/' . $sectionContent->id . '/edit');\n }", "public function insertSection()\n\t{\n\t\t$data = [\n\t\t\t'nama_section' => $this->input->post('nama_section', true),\n\t\t\t'konten_section' => $this->input->post('konten_section')\n\t\t];\n\n\t\t$this->db->insert('section', $data);\n\t\t$this->lomo->insertLog('Section <b>' . $data['nama_section'] . '</b> berhasil ditambahkan');\n\t\t$this->session->set_flashdata('message-success', 'Section ' . $data['nama_section'] . ' berhasil ditambahkan');\n\t\tredirect('section/index');\n\t}", "public function doSave(array $sections) {\n if ($this->isTemporary()) {\n $this->saveAsTemporary($sections);\n }\n else {\n $this->saveAsLive($sections);\n }\n }", "public function store(Request $request)\n {\n $this->validate(\n $request,\n [\n 'title' => 'required|max:100',\n 'content' => 'nullable|string',\n 'alignment_type' => [\n 'required',\n Rule::in(\n [\n Section::ALIGNMENT_TYPE_LEFT,\n Section::ALIGNMENT_TYPE_CENTER,\n Section::ALIGNMENT_TYPE_RIGHT,\n ]\n ),\n ],\n 'background_type' => [\n 'required',\n Rule::in(\n [\n Section::BACKGROUND_TYPE_WHITE,\n Section::BACKGROUND_TYPE_SOFT_GRAY,\n Section::BACKGROUND_TYPE_BRAND_COLOR,\n ]\n ),\n ],\n 'image_url' => 'nullable|max:300',\n 'listable_bonus' => 'nullable|array',\n 'listable_bonus.*' => 'nullable|max:300',\n 'button_label' => 'nullable|max:300',\n 'button_url' => 'nullable|max:300',\n 'site_id' => 'required|exists:site,id',\n ]\n );\n\n $section = Section::create(\n $request->all()\n );\n\n return new SectionResource($section);\n }", "public function create(Section $section){\n if(empty($section->section_adviser) || $section->section_adviser == 1){\n throw new Exception(\"Invalid Advisor ID\");\n }\n\n $stmt = $this->db->prepare(\"SELECT * FROM `sections` WHERE curr_id = :curr_id AND level_id = :level_id AND section_adviser = :section_adviser\");\n $stmt->execute([':curr_id'=>$section->curr,\n\t ':section_adviser'=>$section->section_adviser,\n\t ':level_id'=>$section->level_id]);\n $result = $stmt->fetchAll();\n\n if($result){\n \treturn false;\n }\n $stmt = $this->db->prepare(\"INSERT INTO `sections`\n (\n `section_name`,\n `section_adviser`,\n `level_id`,\n `curr_id`\n )\n\n VALUES (\n :section_name,\n :section_adviser,\n :level_id,\n :curr_id\n )\n \n \");\n\n\n $stmt->execute([\n \"section_name\" => $section->section_name,\n \"section_adviser\" => $section->section_adviser,\n \"level_id\" => $section->level_id,\n \"curr_id\" => $section->curr\n ]);\n\n if($stmt->rowCount() > 0){\n return true;\n }\n\n return false;\n }", "public function save(BookableArea $bookableArea);", "public function addSection($sectionId);", "public function addSectionData()\n\t\t{\n\t\t\t_is_logged_in();\n\n\t\t\t$data = array();\n\n\t\t\tif ($_POST) {\n\n\t\t\t\tforeach ($this->input->post() as $key => $value) {\n\n\t\t\t\t\tif ($key == 'section_name') {\n\t\t\t\t\t\t$data['section_slug'] = url_title(convert_accented_characters($value));\n\t\t\t\t\t}\n\t\t\t\t\t$data[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\t$data['language'] = $this->session->userdata('language');\n\t\t\t}\n\n\t\t\t// Send data\n\t\t\t$query = $this->co_pages_model->add_section($data);\n\n\t\t\tif ($query > 0) {\n\t\t\t\tredirect('admin/co_pages/add_section?action=success');\n\t\t\t} else {\n\t\t\t\tredirect('admin/co_pages/add_section?action=error');\n\t\t\t}\n\n\t\t}", "public final function save() {\n }", "public function on_course_section_end() {\n\n $this->converter->set_stash('sectioninfo', $this->currentsection, $this->currentsection['id']);\n $this->open_xml_writer('sections/section_' . $this->currentsection['id'] . '/section.xml');\n $this->write_xml('section', $this->currentsection);\n $this->close_xml_writer();\n unset($this->currentsection);\n }", "public function store(Request $request)\n { $validatedData = $request->validate([\n 'name' => 'required',\n 'name_abbreviation' => 'required',\n \n ]);\n \n $section = new Section();\n $section->name = $request['name'];\n $section->name_abbreviation = $request['name_abbreviation'];\n $section->department_id = $request['department_id'];\n\n $already_section_name = Section::where('name', $request['name'])->count();\n $already_section_abbr = Section::where('name_abbreviation', $request['name_abbreviation'])->count();\n \n if($already_section_name > 0){\n return redirect()->route('sectioning')->withErrors('section name entered already exists.');\n } \n elseif($already_section_abbr > 0){\n return redirect()->route('sectioning')->withErrors('section abbreviation entered already exists.');\n }\n else {\n $section -> save();\n }\n\n /* $section->save(); */\n return redirect()->route('sectioning')->with('success','Section added successfully.');\n \n }", "public function store(Request $request)\n {\n $rules = \n [\n 'name' => 'required'\n ];\n $this->validate($request, $rules);\n $data = $request->all();\n $section = Section::create($data);\n return $this->showOne($section, 200);\n }", "public function store(Request $request)\n {\n\n $validatedData = $request->validate([\n 'section_name' => ['required', 'unique:sections', 'max:255'],\n ],\n [\n 'section_name.required' => 'اسم القسم مطلوب',\n 'section_name.unique' => 'قيمة حقل القسم مُستخدمة من قبل'\n ]);\n\n Section::create([\n 'section_name' => $request->section_name,\n 'description' => $request->description,\n 'created_by' => (Auth::user()->name),\n ]);\n\n return redirect()->back()->with('add', 'اضافة قسم');\n\n }", "public function store(Request $request)\n {\n $validator= Validator::make($request->all(), Section::$rules);\n if ($validator->fails()) {\n return response()->json([\"errors\"=>$validator->errors(), 400]);\n }else{\n $section = new Section();\n $section->classId = $request->classId;\n $section->bId = Auth::guard('web')->user()->bId;\n $section->sessionYearId = $request->sessionYearId;\n $section->sectionName = $request->sectionName;\n $section->shift = $request->shift;\n $section->save();\n return Response()->json([\"success\"=>'Stored', \"data\"=>$section,201]);\n }\n }", "public function store(StoreSectionPageRequest $request)\n {\n try {\n SectionPage::create($request->store());\n $data = SectionPage::all();\n return response()->json($this->notification->storeSuccess($data));\n } catch (\\Throwable $th) {\n return response()->json($this->notification->storeFailed($th));\n }\n }", "public function store(Course $course)\n {\n $this->validate(request(), [\n 'title' => 'required|spamfree'\n ]);\n\n $section = Section::add([\n 'title' => request('title'),\n 'course_id' => $course->id,\n 'description' => request('description')\n ], $course);\n\n return $section;\n }", "public final function save()\n {\n }", "public function store(Request $request)\n {\n $section = Section::create([\n 'section_name' => $request->section_name,\n 'room_number' => $request->room_number\n ]);\n\n return redirect()->route('section.index');\n }", "public function save()\n {\n parent::save();\n\n $soxId = $this->getEditObjectId();\n $aParams = oxRegistry::getConfig()->getRequestParameter(\"editval\");\n\n // shopid\n $sShopID = oxRegistry::getSession()->getVariable(\"actshop\");\n $aParams['oxarticles__oxshopid'] = $sShopID;\n\n $oArticle = oxNew(\"oxarticle\");\n $oArticle->loadInLang($this->_iEditLang, $soxId);\n\n $oArticle->setLanguage(0);\n\n // checkbox handling\n if (!$oArticle->oxarticles__oxparentid->value && !isset($aParams['oxarticles__oxremindactive'])) {\n $aParams['oxarticles__oxremindactive'] = 0;\n }\n\n $oArticle->assign($aParams);\n\n //tells to article to save in different language\n $oArticle->setLanguage($this->_iEditLang);\n $oArticle = oxRegistry::get(\"oxUtilsFile\")->processFiles($oArticle);\n\n $oArticle->resetRemindStatus();\n\n $oArticle->updateVariantsRemind();\n\n $oArticle->save();\n }", "public function store(Request $request)\n {\n\n \t//Log::info($request);\n\n \t$user = Auth::user();\n\n \tif ($request['section_id']) {\n\n \t\t$templateSection = TemplateSection::find($request['section_id']);\n\n\t\t\tif ($request['section_title']) {\n\t\t\t\tif ($request['section_title'] != $templateSection->section_title) {\n\t\t\t\t\t$this->validate($request, [\n \t'section_title' => 'filled|unique:template_sections,section_title,NULL,id,template_id,'.$request['template_id'].'' \n \t\t]); \n\t\t\t\t\t$templateSection->section_title = $request['section_title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($request['section_description']) $templateSection->description = $request['section_description'];\n\n\t\t\t$templateSection->save();\n \t}\n \telse {\n\n \t\t$this->validate($request, [\n 'section_title' => 'required|unique:template_sections,section_title,NULL,id,template_id,'.$request['template_id'].''\n ]); \n\n $templateSection = TemplateSection::create([\n 'section_title' => $request['section_title'],\n 'template_id' => $request['template_id'],\n 'order' => $request['order'],\n 'created_by_user_id' => $user->id,\n 'updated_by_user_id' => $user->id,\n ]);\n \t}\n\n \treturn $templateSection;\n\n }", "function save() {\n $keys = $this->fulfillment['sfid'] ? array('sfid') : array();\n $ret = drupal_write_record('course_outline_fulfillment', $this->fulfillment, $keys);\n\n // Create a Course to track the user's progress.\n $course = new Course($this->getCourseObject()->getCourseNid(), $this->fulfillment['uid']);\n $course->track();\n\n return $ret;\n }", "public function store(Request $request)\n {\n\n $validate = $request->validate([\n 'section_name' => 'required | unique:sections',\n 'description' => 'required'\n ], [\n 'section_name.required' => 'يرجي ادخال اسم القسم ',\n 'section_name.unique' => 'هذا القسم موجود مسبقا',\n 'description.required' => 'يرجي ادخال وصف للقسم '\n ]);\n\n\n Section::create([\n 'section_name' => $request->section_name,\n 'description' => $request->description,\n 'created_by' => (Auth::user()->name)\n ]);\n session()->flash('insert', 'تم اضافة القسم نجاح');\n return redirect()->route('sections.index');\n }", "public function store(Request $request)\n {\n $rules = [\n 'name' => ['required', 'string', 'max:255'],\n ];\n\n $this->validate($request, $rules);\n\n $data = $request->all();\n // if need fix any data do: $data['xxx'] = 'zzz';\n\n /** @var Model $section */\n $section = Section::create($data);\n\n return $this->showOne($section, 201);\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function saveSectionCorporation()\n\t{\n\t\t// Check for request forgeries.\n\t\tJRequest::checkToken() or jexit(JText::_('JInvalid_Token'));\n\n\t\t// Initialize variables.\n\t\t$app\t= &JFactory::getApplication();\n\t\t$model\t= $this->getModel('SectionCorporationRoles');\n\t\t$data\t= JRequest::getVar('jform', array(), 'post', 'array');\n\n\t\t// Validate the posted data.\n\t\t$data\t= $model->validate($data);\n\n\t\t// Check for validation errors.\n\t\tif ($data === false)\n\t\t{\n\t\t\t// Get the validation messages.\n\t\t\t$errors\t= $model->getErrors();\n\n\t\t\t// Push up to three validation messages out to the user.\n\t\t\tfor ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) {\n\t\t\t\tif (JError::isError($errors[$i])) {\n\t\t\t\t\t$app->enqueueMessage($errors[$i]->getMessage(), 'notice');\n\t\t\t\t} else {\n\t\t\t\t\t$app->enqueueMessage($errors[$i], 'notice');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Redirect back to the edit screen.\n\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_eve&view=roles&layout=edit', false));\n\t\t\treturn false;\n\t\t}\n\n\t\t// Attempt to save the character.\n\t\t$return = $model->save($data);\n\n\t\tif ($return === false) {\n\t\t\t// Save failed, go back to the character and display a notice.\n\t\t\t$message = JText::sprintf('JError_Save_failed', $model->getError());\n\t\t\t$this->setRedirect('index.php?option=com_eve&view=roles&layout=edit', $message, 'error');\n\t\t\treturn false;\n\t\t}\n\n\t\t/*\n\t\t // Save succeeded, check-in the character.\n\t\t if (!$model->checkin()) {\n\t\t\t// Check-in failed, go back to the character and display a notice.\n\t\t\t$message = JText::sprintf('JError_Checkin_saved', $model->getError());\n\t\t\t$this->setRedirect('index.php?option=com_eve&view=character&layout=edit', $message, 'error');\n\t\t\treturn false;\n\t\t\t}\n\t\t\t*/\n\n\t\t$this->setMessage(JText::_('JController_Save_success'));\n\n\t\t// Redirect the user and adjust session state based on the chosen task.\n\t\tswitch (strtolower($this->_task)) {\n\t\t\tcase 'applysectioncorporation':\n\t\t\t\t// Redirect back to the edit screen.\n\t\t\t\t$app->setUserState('com_eve.sectionCorporation.corporationID', $data['corporationID']);\n\t\t\t\t$app->setUserState('com_eve.sectionCorporation.section', $data['section']);\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_eve&view=roles&layout=edit', false));\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// Clear the member id and data from the session.\n\t\t\t\t$app->setUserState('com_eve.roles.model', null);\n\t\t\t\t$app->setUserState('com_eve.sectionCorporation.corporationID', null);\n\t\t\t\t$app->setUserState('com_eve.sectionCorporation.section', null);\n\n\t\t\t\t// Redirect to the list screen.\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_eve&task=corporation.edit&corporationID='.$data['corporationID'], false));\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function store(Request $request, $id_section)\n {\n $quiz = new quiz;\n $quiz->title = $request->title;\n $quiz->id_section = $id_section;\n $quiz->can_bet = 1;\n $quiz->isOpen = 0;\n if($quiz->save()){\n return redirect()->to('professor/courses/'.$id_section.'/quiz');\n }else{\n return \"Failed\";\n }\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'name' => 'required',\n 'priority' => 'required',\n \n ]);\n \n $section =new Section();\n $section->name = $request->name;\n $section->priority = $request->priority;\n $section->save();\n return back();\n }", "public abstract function save();", "public function saved(Chapter $chapter)\n {\n //\n }", "public function store(Request $request,Section $section)\n {\n $register_no = $section->next_register_no;\n Register::create([\n 'section_id' => $section->id,\n 'member_id' =>$request->member_id,\n 'reservation_no'=> $register_no,\n 'reminding_time' =>null,\n 'reminding_no' =>null,\n 'status' => 0,\n ]);\n $section->next_register_no= $register_no+1;\n $section->save();\n return redirect()->route('register.index');\n }", "public function save() {\n\n $data = array(\n 'name' => $this->getName(),\n 'description' => $this->getDescription(),\n 'metatitle' => $this->getMetatitle(),\n 'metakeywords' => $this->getMetakeywords(),\n 'metadescription' => $this->getMetadescription()\n );\n $data['parent_id'] = 0; // by default it is 0, becouse right now there is no use of parent id in this application\n if (null === ($id = $this->getId())) {\n unset($data['id']);\n $data['status'] = 1;\n return $this->getMapper()->getDbTable()->insert($data);\n } else {\n $data['status'] = $this->getStatus();\n return $this->getMapper()->getDbTable()->update($data, array('id = ?' => $id));\n }\n\n }", "public function store(Request $request)\n {\n $input = Input::all();\n $validation=Validator::make($input,Section::$rules);\n if($validation->fails())\n {\n return(Redirect::back()->withErrors($validation)->withInput());\n }\n $data = [\n 'name'=>$request ->name,\n 'description'=>$request->description,\n \n ];\n $sections=Section::create($data);\n return(redirect('sections'));\n }", "public function saveAction()\n {\n $pageCode = $this->getRequest()->getParam('page_code');\n\n $config = $this->initConfig($pageCode);\n\n\n $session = Mage::getSingleton('adminhtml/session');\n\n try {\n\n $section = $config->getData('codes/section');\n $website = $this->getRequest()->getParam('website');\n $store = $this->getRequest()->getParam('store');\n $groups = $this->getRequest()->getPost('groups');\n $configData = Mage::getModel('adminhtml/config_data');\n $configData->setSection($section)\n ->setWebsite($website)\n ->setStore($store)\n ->setGroups($groups)\n ->save();\n\n $session->addSuccess(Mage::helper('novalnet_payment')->__('The configuration has been saved.'));\n } catch (Mage_Core_Exception $e) {\n foreach (explode(\"\\n\", $e->getMessage()) as $message) {\n $session->addError($message);\n }\n } catch (Exception $e) {\n $msg = Mage::helper('novalnet_payment')->__('An error occurred while saving:') . ' ' . $e->getMessage();\n $session->addException($e, $msg);\n }\n\n $this->_redirectByPageConfig();\n }", "public function save()\n\t\t{\n#DS_Database_Archive::_log(__METHOD__.'()');\n\t\t\tif ( $this->_dirty ) {\n#DS_Database_Archive::_log(__METHOD__.'() data is dirty');\n\t\t\t\tif ( NULL !== $this->option_name ) {\n\t\t\t\t\tset_option( $this->option_name, $this->_options );\n\t\t\t\t} else if ( NULL !== $this->filename ) {\n\t\t\t\t\t// save to filesystem\n#DS_Database_Archive::_log(__METHOD__.'() saving to file ' . $this->filename);\n\t\t\t\t\t$output = json_encode( $this->_options, JSON_PRETTY_PRINT );\n#DS_Database_Archive::_log(__METHOD__.'() contents: ' . $output);\n\t\t\t\t\tfile_put_contents( $this->filename, $output );\n\t\t\t\t}\n\t\t\t\t$this->_dirty = FALSE;\n\t\t\t}\n\t\t}", "public function save($persistenceIdentifier, array $formDefinition);", "public function save()\n {\n if ( !$this->unsaved ) {\n // either nothing has been changed, or data has not been loaded, so\n // do nothing by returning early\n return;\n }\n\n $this->write();\n $this->unsaved = false;\n }", "public function store(SectionRequest $request, $company_id, $department_id )\n {\n \n $this->validate($request, [\n 'shortname' => 'required',\n 'fullname' => 'required',\n ]);\n\n $input = $request->all();\n\n $section = new \\App\\Section($input);\n \n $section->save();\n\n Session::flash('flash_message', 'section hinzugefügt!');\n\n //get the data to fill lists & dropdowns\n $company_list = Lists::companies();\n\n $department_list = Lists::departments($company_id);\n\n if($department_id == 0) $department_id = Lists::firstdepartment_id($company_id);\n\n $sections = Lists::sections($department_id);\n \n return view('admin/section', compact('company_list', 'company_id', 'department_list', 'department_id', 'sections'));\n \n //return ($input['department_id']);\n }", "public function save(BannerInterface $page);", "public function addNewSection()\n {\n if($this::check_session()){\n $this->form_validation->set_rules('newSection', 'Section', 'required');\n $formData = ['ex_section' => $this->input->post('newSection')];\n\n if($this->form_validation->run()) { \n $this->Admin_model->addNewSection($formData);\n $this->addSectionQuestionsTab();\n }else{\n $this->addSectionQuestionsTab();\n } \n }\n }", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public function store(Request $request, $division_id, $department_id)\n {\n $section = new Section();\n $section->name = $request->name;\n $section->department_id = $department_id;\n $section->save();\n\n return redirect()->route('admin.divisions.departments.sections.index', [$division_id, $department_id]);\n }", "public function save()\n {\n $data = $this->read_file();\n\n if (( ! $data))\n {\n $data = array();\n }\n\n $data[$this->id] = array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'password' => $this->password,\n 'token' => $this->token,\n 'logins' => $this->logins,\n );\n\n $this->write_file($data);\n }", "public function update(Section $section)\n {\n $this->validate(request(), [\n 'title' => 'required|spamfree'\n ]);\n\n $section->update([\n 'title' => request('title'),\n 'description' => request('description')\n ]);\n }", "public function store(Request $request)\n {\n $section = $request->validate([\n 'title' => ['required']\n ]);\n\n Section::create($section);\n\n session()->flash('msg' , 's: section created successfully');\n return redirect(route('admin.sections.index'));\n }", "protected function postSectionRequest(Requests\\PostSectionRequest $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 postSection');\n }\n // verify the required parameter 'section_name' is set\n if ($request->sectionName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $sectionName when calling postSection');\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 postSection');\n }\n\n $resourcePath = '/slides/{name}/sections';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->sectionName !== null) {\n $queryParams['sectionName'] = ObjectSerializer::toQueryValue($request->sectionName);\n }\n // query params\n if ($request->slideIndex !== null) {\n $queryParams['slideIndex'] = ObjectSerializer::toQueryValue($request->slideIndex);\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 $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'POST');\n }", "public function update(SectionRequest $request, Section $section)\n {\n $section->update($request->all());\n return redirect('/section');\n }", "public function save() {}", "public function save() {}", "public function save() {}", "protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}", "public function edit(Section $section)\n {\n }", "public function edit(Section $section)\n {\n //\n }", "public function setSection($section) {\n $this->section = $section;\n }", "public function update(Request $request, Section $section)\n {\n // /** @var Section $section */\n // $section = Section::findOrFail($id);\n\n $rules = [\n 'name' => ['string', 'max:255'],\n ];\n\n $this->validate($request, $rules);\n\n if ($request->has('name'))\n {\n $section->name = $request->name;\n }\n\n if (!$section->isDirty())\n {\n return $this->errorUpdateNoChanges();\n }\n\n $section->save();\n\n return $this->showOne($section);\n }", "public function store(Request $request)\n {\n // Validate the post\n $this->validate($request, [\n 'section-name' => 'required',\n 'section-image' => 'required|image|nullable|max:1999'\n ],[\n 'section-name.required' => 'Section Name is Required',\n 'section=image.required' => 'Image is Required',\n 'section=image.image' => 'Must be an Image.',\n ]);\n \n // Handle file upload\n if ($request->hasFile('section-image')) {\n // Get file with the extention\n $fileNameWithExt = $request->file('section-image')->getClientOriginalName();\n // Get just name of image\n $fileName = pathinfo($fileNameWithExt, PATHINFO_FILENAME);\n // Get extention of image\n $extension = $request->file('section-image')->getClientOriginalExtension();\n // Filename to store the image\n $fileNameToStore = $fileName.'-'.time().'.'.$extension;\n // Upload image\n $path = $request->file('section-image')->storeAs('public/images', $fileNameToStore);\n }\n \n // Create Section\n $section = new HomePage;\n $section->section_name = $request->input('section-name');\n $section->section_content = $request->input('section-content');\n $section->section_image = $fileNameToStore;\n $section->save();\n \n $request->session()->flash('success', 'Section Created!');\n \n return redirect('/admin/home/');\n }", "public function save() {\n\t\t\t\n\t\t}", "function save() {\r\n\t\t$this->log .= \"save() called<br />\";\r\n\t\tif (count($this->data) < 1) {\r\n\t\t\t$this->log .= \"Nothing to save.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//create file pointer\r\n\t\tif (!$fp=@fopen($this->filename,\"w\")) {\r\n\t\t\t$this->log .= \"Could not create or open \".$this->filename.\"<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//write to file\r\n\t\tif (!@fwrite($fp,serialize($this->data))) {\r\n\t\t\t$this->log .= \"Could not write to \".$this->filename.\"<br />\";\r\n\t\t\tfclose($fp);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//close file pointer\r\n\t\tfclose($fp);\r\n\t\treturn true;\r\n\t}", "public function save(){\n\t\t$sql = new Sql();\n\n\t\t$results = $sql->select(\"CALL sp_categories_save(:idcategory, :descategory)\", array(\n\t\t\t\":idcategory\"=>$this->getidcategory(),\n\t\t\t\":descategory\"=>$this->getdescategory()\n\t\t));\n\n\t\t$this->setData($results[0]);\n\n\n\t\tCategory::updateFile();\n\n\t}", "public final function save() {\n\t\t\treturn SERIA_Meta::save($this);\n\t\t}", "public function saveNew(&$section_rating_view)\n\t{\n\t\treturn false;\n\t}", "public function update($id)\n\t{\n\t\t//\n\t\t$sec = Section::find($id);\n\t\t$validator = Validator::make(Input::all(), Section::$rules);\n\t\n\t if ($validator->passes()) {\n\t\t// validation has passed, save user in DB\n\t\t $sec->name = Input::get('name');\n\t\t $sec->description = Input::get('description');\n \t\t $sec->enabled = Input::get('enabled');\n \t\t $sec->category_id = Input::get('category_id');\n\t\t $sec->save();\n\t\t return Redirect::to('sections')\n\t\t\t\t->with('type', 'success')\n\t\t\t\t->with('message', 'Section edited');\n\t } else {\n\t\t// validation has failed, display error messages \n\t\treturn Redirect::to('sections/'.$id.'/edit')\n\t\t\t\t->with('type', 'alert')\n\t\t\t\t->with('message', 'The following errors occurred')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput();\n\n\t }\n\t}", "public function store(Page $page, PageSectionFormRequest $request)\n {\n $section = $this->repository->create($request->all());\n Pages::forgetCache();\n\n return $this->redirect($request, $section);\n }", "public function saveLayout(){\n\t\t$request\t = $this->getRequest();\n\t\t$sections = $request->getParam('sections', array());\n\t\t$items = $request->getParam('items', array());\n\t\t$template_id = $request->getParam('template_id', null);\n\t\t$page_id = $request->getParam('page_id', null);\n\t\t$table = $this->_getParam('table');\n\n\t\t$sections = array_filter($sections);\n\t\t$items = array_filter($items);\n\n\t\t$sectionAdd\t = array();\n\t\t$itemAdd = array();\n\n\t\tforeach($sections as $sequence => $data){\n\t\t\t$sxnId = intval($this->_utility->getPiece($data));\n\t\t\tif(isset($items[$sxnId])){\n\t\t\t\t$itemAdd[$sxnId] \t= $this->processField($items[$sxnId]);\n\t\t\t\t$sectionAdd[$sxnId] = intval($sequence);\n\t\t\t}\n\t\t}\n\n\t\t$itemAdd = array_filter($itemAdd);\n\n\t\tAdmin_Model_TemplateSection::saveSectionOrder($template_id, $sectionAdd);\n\t\tAdmin_Model_PageLayout::updateLayout($page_id, $template_id, $table, $itemAdd, $sectionAdd);\n\t}", "public function edit(section $section)\n {\n //\n }", "public function update_section(Request $request, $id)\n {\n $this->validate($request, [\n 'section_name' => 'required||unique:quality_document_sections',\n ], $this->custom_messages);\n \n $old_section = QualityDocumentSection::find($id);\n QualityManualDocumentation::where('section',$old_section->section_name)->update(array(\n 'section' => $request->section_name,\n ));\n\n $log = new Log;\n $log->name = Auth::user()->name;\n $log->action = 'EDIT';\n $log->module = 'QMSD-SECTION';\n $log->description = 'Updated section from ' . $old_section->name . 'to ' .$request->name;\n $log->save();\n\n QualityDocumentSection::where('id',$id)->update(array(\n 'section_name' => $request->section_name,\n ));\n\n \n\n return redirect('/qmsd/sections/idx');\n }", "public function update(Section $section){\n if(empty($section->section_id)){\n return false;\n }\n\n\t $stmt = $this->db->prepare(\"SELECT * FROM `sections` WHERE curr_id = :curr_id AND level_id = :level_id AND section_adviser = :section_adviser AND section_name = :section_name\");\n\t $stmt->execute([':curr_id'=>$section->curr,\n\t\t ':section_adviser'=>$section->section_adviser,\n\t\t ':level_id'=>$section->level_id,\n\t\t ':section_name'=>$section->section_name]);\n\t $result = $stmt->fetchAll();\n\n\t if($result){\n\t\t return false;\n\t }\n $stmt = $this->db->prepare(\"UPDATE `sections` \n SET \n `section_name`=:section_name , \n `section_adviser`=:section_adviser , \n `level_id` = :level_id ,\n `curr_id` = :curr_id\n\n WHERE `section_id` = :section_id\");\n\n $result = $stmt->execute([\n \"section_name\" => $section->section_name,\n \"section_adviser\" => $section->section_adviser,\n \"level_id\" => $section->level_id,\n \"curr_id\" => $section->curr,\n \"section_id\" => $section->section_id\n ]);\n\n if($stmt->rowCount() > 0 || $result == true){\n return true;\n }\n\n return false;\n }", "protected function save() {\n $values = $this->values;\n\n $values[self::METADATA_NAMESPACE] = array(\n 'first_trace' => $this->getFirstTrace(),\n 'last_trace' => $this->getLastTrace(),\n 'regeneration_trace' => $this->getRegenerationTrace(),\n 'requests_count' => $this->getRequestsCounter(),\n 'fingerprint' => $this->getFingerprint(),\n );\n\n return $this->getStorage()->store($this->getId(), $values);\n }" ]
[ "0.7178136", "0.6470738", "0.637008", "0.63407415", "0.6306735", "0.62149984", "0.60658956", "0.6033704", "0.6002403", "0.58844393", "0.5856264", "0.5821594", "0.5803537", "0.5745109", "0.5741303", "0.5741133", "0.5724405", "0.57226545", "0.5715549", "0.56910145", "0.56159", "0.5612447", "0.56069016", "0.5600152", "0.55917484", "0.55849195", "0.5579182", "0.5543843", "0.55411637", "0.55266905", "0.55231637", "0.5522736", "0.5522346", "0.550412", "0.5488159", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.54651827", "0.5441169", "0.54331243", "0.5426439", "0.5423747", "0.5404209", "0.54018813", "0.53987956", "0.5377851", "0.5372492", "0.5355584", "0.53481865", "0.5346078", "0.5331889", "0.5319898", "0.5316273", "0.5316273", "0.5316273", "0.5316273", "0.5316273", "0.53071123", "0.53061527", "0.5301244", "0.5291082", "0.5259899", "0.5257507", "0.5256818", "0.52565336", "0.52565336", "0.52531", "0.52518916", "0.52396655", "0.5237507", "0.52335143", "0.5229341", "0.52066886", "0.5200975", "0.519283", "0.5186385", "0.5181762", "0.5178918", "0.51726866", "0.51668984", "0.516416", "0.5163424", "0.5163217", "0.5157241" ]
0.6468554
2
Method to save a Section.
public function saveSectionCorporation() { // Check for request forgeries. JRequest::checkToken() or jexit(JText::_('JInvalid_Token')); // Initialize variables. $app = &JFactory::getApplication(); $model = $this->getModel('SectionCorporationRoles'); $data = JRequest::getVar('jform', array(), 'post', 'array'); // Validate the posted data. $data = $model->validate($data); // Check for validation errors. if ($data === false) { // Get the validation messages. $errors = $model->getErrors(); // Push up to three validation messages out to the user. for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) { if (JError::isError($errors[$i])) { $app->enqueueMessage($errors[$i]->getMessage(), 'notice'); } else { $app->enqueueMessage($errors[$i], 'notice'); } } // Redirect back to the edit screen. $this->setRedirect(JRoute::_('index.php?option=com_eve&view=roles&layout=edit', false)); return false; } // Attempt to save the character. $return = $model->save($data); if ($return === false) { // Save failed, go back to the character and display a notice. $message = JText::sprintf('JError_Save_failed', $model->getError()); $this->setRedirect('index.php?option=com_eve&view=roles&layout=edit', $message, 'error'); return false; } /* // Save succeeded, check-in the character. if (!$model->checkin()) { // Check-in failed, go back to the character and display a notice. $message = JText::sprintf('JError_Checkin_saved', $model->getError()); $this->setRedirect('index.php?option=com_eve&view=character&layout=edit', $message, 'error'); return false; } */ $this->setMessage(JText::_('JController_Save_success')); // Redirect the user and adjust session state based on the chosen task. switch (strtolower($this->_task)) { case 'applysectioncorporation': // Redirect back to the edit screen. $app->setUserState('com_eve.sectionCorporation.corporationID', $data['corporationID']); $app->setUserState('com_eve.sectionCorporation.section', $data['section']); $this->setRedirect(JRoute::_('index.php?option=com_eve&view=roles&layout=edit', false)); break; default: // Clear the member id and data from the session. $app->setUserState('com_eve.roles.model', null); $app->setUserState('com_eve.sectionCorporation.corporationID', null); $app->setUserState('com_eve.sectionCorporation.section', null); // Redirect to the list screen. $this->setRedirect(JRoute::_('index.php?option=com_eve&task=corporation.edit&corporationID='.$data['corporationID'], false)); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n {\n return $this->write($this->filename, $this->sections);\n }", "public function store(SectionRequest $request)\n {\n $section = new Section($request->all());\n $section->school_id = session('current_school');\n $section->save();\n return redirect('/section');\n }", "public function saveSection()\n\t{\n\t\t// Check for request forgeries.\n\t\tJRequest::checkToken() or jexit(JText::_('JInvalid_Token'));\n\n\t\t// Initialize variables.\n\t\t$app\t= &JFactory::getApplication();\n\t\t$model\t= $this->getModel('Sectionroles');\n\t\t$data\t= JRequest::getVar('jform', array(), 'post', 'array');\n\n\t\t// Validate the posted data.\n\t\t$data\t= $model->validate($data);\n\n\t\t// Check for validation errors.\n\t\tif ($data === false)\n\t\t{\n\t\t\t// Get the validation messages.\n\t\t\t$errors\t= $model->getErrors();\n\n\t\t\t// Push up to three validation messages out to the user.\n\t\t\tfor ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) {\n\t\t\t\tif (JError::isError($errors[$i])) {\n\t\t\t\t\t$app->enqueueMessage($errors[$i]->getMessage(), 'notice');\n\t\t\t\t} else {\n\t\t\t\t\t$app->enqueueMessage($errors[$i], 'notice');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Redirect back to the edit screen.\n\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_eve&view=roles&layout=edit', false));\n\t\t\treturn false;\n\t\t}\n\n\t\t// Attempt to save the character.\n\t\t$return = $model->save($data);\n\n\t\tif ($return === false) {\n\t\t\t// Save failed, go back to the character and display a notice.\n\t\t\t$message = JText::sprintf('JError_Save_failed', $model->getError());\n\t\t\t$this->setRedirect('index.php?option=com_eve&view=roles&layout=edit', $message, 'error');\n\t\t\treturn false;\n\t\t}\n\n\t\t/*\n\t\t // Save succeeded, check-in the character.\n\t\t if (!$model->checkin()) {\n\t\t\t// Check-in failed, go back to the character and display a notice.\n\t\t\t$message = JText::sprintf('JError_Checkin_saved', $model->getError());\n\t\t\t$this->setRedirect('index.php?option=com_eve&view=character&layout=edit', $message, 'error');\n\t\t\treturn false;\n\t\t\t}\n\t\t\t*/\n\n\t\t$this->setMessage(JText::_('JController_Save_success'));\n\n\t\t// Redirect the user and adjust session state based on the chosen task.\n\t\tswitch (strtolower($this->_task)) {\n\t\t\tcase 'applysection':\n\t\t\t\t// Redirect back to the edit screen.\n\t\t\t\t$app->setUserState('com_eve.section.id', $return);\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_eve&view=roles&layout=edit', false));\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// Clear the member id and data from the session.\n\t\t\t\t$app->setUserState('com_eve.roles.model', null);\n\t\t\t\t$app->setUserState('com_eve.section.id', null);\n\t\t\t\t$app->setUserState('com_eve.section.data', null);\n\n\t\t\t\t// Redirect to the list screen.\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_eve&view=access', false));\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function store()\n\t{\n\t\t//\n\t\t\t\t//\n\t\t$validator = Validator::make(Input::all(), Section::$rules);\n\t\n\t if ($validator->passes()) {\n\t\t// validation has passed, save user in DB\n\t\t $sec = new Section;\n\t\t $sec->name = Input::get('name');\n\t\t $sec->description = Input::get('description');\n \t\t $sec->enabled = Input::get('enabled');\n \t\t $sec->category_id = Input::get('category_id');\n\t\t $sec->save();\n\t\t return Redirect::to('sections')\n\t\t\t\t->with('type', 'success')\n\t\t\t\t->with('message', 'New section created');\n\t } else {\n\t\t// validation has failed, display error messages \n\t\treturn Redirect::to('sections/create')\n\t\t\t\t->with('type', 'alert')\n\t\t\t\t->with('message', 'The following errors occurred')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput();\n\n\t }\n\t}", "public function store(CreatesectionRequest $request)\n {\n $input = $request->all();\n\n $section = $this->sectionRepository->create($input);\n\n $content = new content();\n $content->section_id = $section->id;\n $content->fill($input);\n $content->save();\n Flash::success('Section guardada con exito.');\n\n return redirect(route('sections.index'));\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$section = new Section($input);\n\t\t\n\t\tif ($section->save()) {\n\t\t\tFlash::success('Bereich erfolgreich angelegt.');\n\t\t\treturn Redirect::back();\n\t\t}\n\n\t\tFlash::error($section->errors());\n\t\treturn Redirect::back()->withInput();\n\t}", "public function SaveSection($id = null, $data)\n {\n // Only process valid data\n if($this->ValidateSection($data)) {\n\n // Format for update/insert query\n $dbData = Array (\n 'name' => $data->Name,\n );\n\n // Update existing user?\n if($id) {\n $this->Db()->where('id', $id);\n if ($this->Db()->update('Sections', $dbData)) {\n $section = new SectionModel($id, $data->Name);\n } else {\n throw new RestException(500, 'Update mislukt: ' . $this->Db()->getLastError());\n }\n // Add new user\n } else {\n $id = $this->Db()->insert('Sections', $dbData);\n if ($id) {\n $section = new SectionModel($id, $data->Name);\n } else {\n throw new RestException(500, 'Toevoegen mislukt: ' . $this->Db()->getLastError());\n }\n }\n\n return $section>toArray();\n }\n }", "function saveStatisticsSections() {\n\t\t// generate statistics.\n\n\t\tparent::validate();\n\n\t\t$journal = &Request::getJournal();\n\n\t\t$sectionIds = Request::getUserVar('sectionIds');\n\t\tif (!is_array($sectionIds)) {\n\t\t\tif (empty($sectionIds)) $sectionIds = array();\n\t\t\telse $sectionIds = array($sectionIds);\n\t\t}\n\n\t\t$journal->updateSetting('statisticsSectionIds', $sectionIds);\n\t\tRequest::redirect(null, null, 'statistics', null, array('statisticsYear' => Request::getUserVar('statisticsYear')));\n\t}", "public function store(CreateSectionRequest $request)\n {\n $input = $request->all();\n\n $section = $this->sectionRepository->create($input);\n\n\n Log::info('Admin has been create new section like => '.$request->name);\n\n\n Flash::success('Section saved successfully.');\n\n return redirect(route('sections.index'));\n }", "public function save() {\n $keys = $this->requirement->snid ? array('snid') : array();\n return drupal_write_record('course_outline', $this->requirement, $keys);\n }", "public function store(SchoolSectionsCreateRequest $request)\n {\n $section = new SchoolSection;\n\n $section->course_id = $request->input('course_id');\n $section->fork_id = $request->input('fork_id');\n $section->title = $request->input('title');\n\n // Save section\n if($section->save()){\n // If everything is ok, return category list\n return $this\n ->responseSuccess(\n [],\n 'Sections save successfully'\n );\n } else {\n // Error if section don't save\n return $this->responseError('Error. Section don\\'t save');\n }\n }", "public function store(Request $request)\n {\n //\n $section = new section();\n $section->name = $request['section'];\n $section->save();\n\n return redirect('/section');\n }", "protected function flagForSave() {\n $this->setTemporaryValue('sections', $this->sectionStorage->getSections());\n return $this;\n }", "public function store($resourceable, $id, Section $section, Request $request)\n {\n $resource = Str::plural($resourceable);\n\n if (request()->file('media') === null) {\n $attributes = request()->validate(Arr::except(Content::$rules, 'media'),\n Content::$messages);\n }\n else {\n $attributes = request()->validate(Content::$rules, Content::$messages);\n\n $media = $this->moveAndCreatePhoto($attributes['media'], $size = ['l' => Content::$LARGE_SIZE, 's' => Content::$THUMB_SIZE]);\n if ($media) {\n $attributes['media'] = $media;\n }\n }\n\n $sectionContent = $this->createEntry(Content::class, $attributes);\n $sectionContent->sections()->syncWithoutDetaching([$section->id]);\n\n return redirect('admin/'.$resource.'/' . $id . '/sections/'.$request->section_id.'/content/' . $sectionContent->id . '/edit');\n }", "public function insertSection()\n\t{\n\t\t$data = [\n\t\t\t'nama_section' => $this->input->post('nama_section', true),\n\t\t\t'konten_section' => $this->input->post('konten_section')\n\t\t];\n\n\t\t$this->db->insert('section', $data);\n\t\t$this->lomo->insertLog('Section <b>' . $data['nama_section'] . '</b> berhasil ditambahkan');\n\t\t$this->session->set_flashdata('message-success', 'Section ' . $data['nama_section'] . ' berhasil ditambahkan');\n\t\tredirect('section/index');\n\t}", "public function doSave(array $sections) {\n if ($this->isTemporary()) {\n $this->saveAsTemporary($sections);\n }\n else {\n $this->saveAsLive($sections);\n }\n }", "public function store(Request $request)\n {\n $this->validate(\n $request,\n [\n 'title' => 'required|max:100',\n 'content' => 'nullable|string',\n 'alignment_type' => [\n 'required',\n Rule::in(\n [\n Section::ALIGNMENT_TYPE_LEFT,\n Section::ALIGNMENT_TYPE_CENTER,\n Section::ALIGNMENT_TYPE_RIGHT,\n ]\n ),\n ],\n 'background_type' => [\n 'required',\n Rule::in(\n [\n Section::BACKGROUND_TYPE_WHITE,\n Section::BACKGROUND_TYPE_SOFT_GRAY,\n Section::BACKGROUND_TYPE_BRAND_COLOR,\n ]\n ),\n ],\n 'image_url' => 'nullable|max:300',\n 'listable_bonus' => 'nullable|array',\n 'listable_bonus.*' => 'nullable|max:300',\n 'button_label' => 'nullable|max:300',\n 'button_url' => 'nullable|max:300',\n 'site_id' => 'required|exists:site,id',\n ]\n );\n\n $section = Section::create(\n $request->all()\n );\n\n return new SectionResource($section);\n }", "public function create(Section $section){\n if(empty($section->section_adviser) || $section->section_adviser == 1){\n throw new Exception(\"Invalid Advisor ID\");\n }\n\n $stmt = $this->db->prepare(\"SELECT * FROM `sections` WHERE curr_id = :curr_id AND level_id = :level_id AND section_adviser = :section_adviser\");\n $stmt->execute([':curr_id'=>$section->curr,\n\t ':section_adviser'=>$section->section_adviser,\n\t ':level_id'=>$section->level_id]);\n $result = $stmt->fetchAll();\n\n if($result){\n \treturn false;\n }\n $stmt = $this->db->prepare(\"INSERT INTO `sections`\n (\n `section_name`,\n `section_adviser`,\n `level_id`,\n `curr_id`\n )\n\n VALUES (\n :section_name,\n :section_adviser,\n :level_id,\n :curr_id\n )\n \n \");\n\n\n $stmt->execute([\n \"section_name\" => $section->section_name,\n \"section_adviser\" => $section->section_adviser,\n \"level_id\" => $section->level_id,\n \"curr_id\" => $section->curr\n ]);\n\n if($stmt->rowCount() > 0){\n return true;\n }\n\n return false;\n }", "public function save(BookableArea $bookableArea);", "public function addSection($sectionId);", "public function addSectionData()\n\t\t{\n\t\t\t_is_logged_in();\n\n\t\t\t$data = array();\n\n\t\t\tif ($_POST) {\n\n\t\t\t\tforeach ($this->input->post() as $key => $value) {\n\n\t\t\t\t\tif ($key == 'section_name') {\n\t\t\t\t\t\t$data['section_slug'] = url_title(convert_accented_characters($value));\n\t\t\t\t\t}\n\t\t\t\t\t$data[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\t$data['language'] = $this->session->userdata('language');\n\t\t\t}\n\n\t\t\t// Send data\n\t\t\t$query = $this->co_pages_model->add_section($data);\n\n\t\t\tif ($query > 0) {\n\t\t\t\tredirect('admin/co_pages/add_section?action=success');\n\t\t\t} else {\n\t\t\t\tredirect('admin/co_pages/add_section?action=error');\n\t\t\t}\n\n\t\t}", "public final function save() {\n }", "public function on_course_section_end() {\n\n $this->converter->set_stash('sectioninfo', $this->currentsection, $this->currentsection['id']);\n $this->open_xml_writer('sections/section_' . $this->currentsection['id'] . '/section.xml');\n $this->write_xml('section', $this->currentsection);\n $this->close_xml_writer();\n unset($this->currentsection);\n }", "public function store(Request $request)\n { $validatedData = $request->validate([\n 'name' => 'required',\n 'name_abbreviation' => 'required',\n \n ]);\n \n $section = new Section();\n $section->name = $request['name'];\n $section->name_abbreviation = $request['name_abbreviation'];\n $section->department_id = $request['department_id'];\n\n $already_section_name = Section::where('name', $request['name'])->count();\n $already_section_abbr = Section::where('name_abbreviation', $request['name_abbreviation'])->count();\n \n if($already_section_name > 0){\n return redirect()->route('sectioning')->withErrors('section name entered already exists.');\n } \n elseif($already_section_abbr > 0){\n return redirect()->route('sectioning')->withErrors('section abbreviation entered already exists.');\n }\n else {\n $section -> save();\n }\n\n /* $section->save(); */\n return redirect()->route('sectioning')->with('success','Section added successfully.');\n \n }", "public function store(Request $request)\n {\n $rules = \n [\n 'name' => 'required'\n ];\n $this->validate($request, $rules);\n $data = $request->all();\n $section = Section::create($data);\n return $this->showOne($section, 200);\n }", "public function store(Request $request)\n {\n\n $validatedData = $request->validate([\n 'section_name' => ['required', 'unique:sections', 'max:255'],\n ],\n [\n 'section_name.required' => 'اسم القسم مطلوب',\n 'section_name.unique' => 'قيمة حقل القسم مُستخدمة من قبل'\n ]);\n\n Section::create([\n 'section_name' => $request->section_name,\n 'description' => $request->description,\n 'created_by' => (Auth::user()->name),\n ]);\n\n return redirect()->back()->with('add', 'اضافة قسم');\n\n }", "public function store(Request $request)\n {\n $validator= Validator::make($request->all(), Section::$rules);\n if ($validator->fails()) {\n return response()->json([\"errors\"=>$validator->errors(), 400]);\n }else{\n $section = new Section();\n $section->classId = $request->classId;\n $section->bId = Auth::guard('web')->user()->bId;\n $section->sessionYearId = $request->sessionYearId;\n $section->sectionName = $request->sectionName;\n $section->shift = $request->shift;\n $section->save();\n return Response()->json([\"success\"=>'Stored', \"data\"=>$section,201]);\n }\n }", "public function store(StoreSectionPageRequest $request)\n {\n try {\n SectionPage::create($request->store());\n $data = SectionPage::all();\n return response()->json($this->notification->storeSuccess($data));\n } catch (\\Throwable $th) {\n return response()->json($this->notification->storeFailed($th));\n }\n }", "public function store(Course $course)\n {\n $this->validate(request(), [\n 'title' => 'required|spamfree'\n ]);\n\n $section = Section::add([\n 'title' => request('title'),\n 'course_id' => $course->id,\n 'description' => request('description')\n ], $course);\n\n return $section;\n }", "public final function save()\n {\n }", "public function store(Request $request)\n {\n $section = Section::create([\n 'section_name' => $request->section_name,\n 'room_number' => $request->room_number\n ]);\n\n return redirect()->route('section.index');\n }", "public function save()\n {\n parent::save();\n\n $soxId = $this->getEditObjectId();\n $aParams = oxRegistry::getConfig()->getRequestParameter(\"editval\");\n\n // shopid\n $sShopID = oxRegistry::getSession()->getVariable(\"actshop\");\n $aParams['oxarticles__oxshopid'] = $sShopID;\n\n $oArticle = oxNew(\"oxarticle\");\n $oArticle->loadInLang($this->_iEditLang, $soxId);\n\n $oArticle->setLanguage(0);\n\n // checkbox handling\n if (!$oArticle->oxarticles__oxparentid->value && !isset($aParams['oxarticles__oxremindactive'])) {\n $aParams['oxarticles__oxremindactive'] = 0;\n }\n\n $oArticle->assign($aParams);\n\n //tells to article to save in different language\n $oArticle->setLanguage($this->_iEditLang);\n $oArticle = oxRegistry::get(\"oxUtilsFile\")->processFiles($oArticle);\n\n $oArticle->resetRemindStatus();\n\n $oArticle->updateVariantsRemind();\n\n $oArticle->save();\n }", "public function store(Request $request)\n {\n\n \t//Log::info($request);\n\n \t$user = Auth::user();\n\n \tif ($request['section_id']) {\n\n \t\t$templateSection = TemplateSection::find($request['section_id']);\n\n\t\t\tif ($request['section_title']) {\n\t\t\t\tif ($request['section_title'] != $templateSection->section_title) {\n\t\t\t\t\t$this->validate($request, [\n \t'section_title' => 'filled|unique:template_sections,section_title,NULL,id,template_id,'.$request['template_id'].'' \n \t\t]); \n\t\t\t\t\t$templateSection->section_title = $request['section_title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($request['section_description']) $templateSection->description = $request['section_description'];\n\n\t\t\t$templateSection->save();\n \t}\n \telse {\n\n \t\t$this->validate($request, [\n 'section_title' => 'required|unique:template_sections,section_title,NULL,id,template_id,'.$request['template_id'].''\n ]); \n\n $templateSection = TemplateSection::create([\n 'section_title' => $request['section_title'],\n 'template_id' => $request['template_id'],\n 'order' => $request['order'],\n 'created_by_user_id' => $user->id,\n 'updated_by_user_id' => $user->id,\n ]);\n \t}\n\n \treturn $templateSection;\n\n }", "function save() {\n $keys = $this->fulfillment['sfid'] ? array('sfid') : array();\n $ret = drupal_write_record('course_outline_fulfillment', $this->fulfillment, $keys);\n\n // Create a Course to track the user's progress.\n $course = new Course($this->getCourseObject()->getCourseNid(), $this->fulfillment['uid']);\n $course->track();\n\n return $ret;\n }", "public function store(Request $request)\n {\n\n $validate = $request->validate([\n 'section_name' => 'required | unique:sections',\n 'description' => 'required'\n ], [\n 'section_name.required' => 'يرجي ادخال اسم القسم ',\n 'section_name.unique' => 'هذا القسم موجود مسبقا',\n 'description.required' => 'يرجي ادخال وصف للقسم '\n ]);\n\n\n Section::create([\n 'section_name' => $request->section_name,\n 'description' => $request->description,\n 'created_by' => (Auth::user()->name)\n ]);\n session()->flash('insert', 'تم اضافة القسم نجاح');\n return redirect()->route('sections.index');\n }", "public function store(Request $request)\n {\n $rules = [\n 'name' => ['required', 'string', 'max:255'],\n ];\n\n $this->validate($request, $rules);\n\n $data = $request->all();\n // if need fix any data do: $data['xxx'] = 'zzz';\n\n /** @var Model $section */\n $section = Section::create($data);\n\n return $this->showOne($section, 201);\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function store(Request $request, $id_section)\n {\n $quiz = new quiz;\n $quiz->title = $request->title;\n $quiz->id_section = $id_section;\n $quiz->can_bet = 1;\n $quiz->isOpen = 0;\n if($quiz->save()){\n return redirect()->to('professor/courses/'.$id_section.'/quiz');\n }else{\n return \"Failed\";\n }\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'name' => 'required',\n 'priority' => 'required',\n \n ]);\n \n $section =new Section();\n $section->name = $request->name;\n $section->priority = $request->priority;\n $section->save();\n return back();\n }", "public abstract function save();", "public function saved(Chapter $chapter)\n {\n //\n }", "public function store(Request $request,Section $section)\n {\n $register_no = $section->next_register_no;\n Register::create([\n 'section_id' => $section->id,\n 'member_id' =>$request->member_id,\n 'reservation_no'=> $register_no,\n 'reminding_time' =>null,\n 'reminding_no' =>null,\n 'status' => 0,\n ]);\n $section->next_register_no= $register_no+1;\n $section->save();\n return redirect()->route('register.index');\n }", "public function save() {\n\n $data = array(\n 'name' => $this->getName(),\n 'description' => $this->getDescription(),\n 'metatitle' => $this->getMetatitle(),\n 'metakeywords' => $this->getMetakeywords(),\n 'metadescription' => $this->getMetadescription()\n );\n $data['parent_id'] = 0; // by default it is 0, becouse right now there is no use of parent id in this application\n if (null === ($id = $this->getId())) {\n unset($data['id']);\n $data['status'] = 1;\n return $this->getMapper()->getDbTable()->insert($data);\n } else {\n $data['status'] = $this->getStatus();\n return $this->getMapper()->getDbTable()->update($data, array('id = ?' => $id));\n }\n\n }", "public function store(Request $request)\n {\n $input = Input::all();\n $validation=Validator::make($input,Section::$rules);\n if($validation->fails())\n {\n return(Redirect::back()->withErrors($validation)->withInput());\n }\n $data = [\n 'name'=>$request ->name,\n 'description'=>$request->description,\n \n ];\n $sections=Section::create($data);\n return(redirect('sections'));\n }", "public function saveAction()\n {\n $pageCode = $this->getRequest()->getParam('page_code');\n\n $config = $this->initConfig($pageCode);\n\n\n $session = Mage::getSingleton('adminhtml/session');\n\n try {\n\n $section = $config->getData('codes/section');\n $website = $this->getRequest()->getParam('website');\n $store = $this->getRequest()->getParam('store');\n $groups = $this->getRequest()->getPost('groups');\n $configData = Mage::getModel('adminhtml/config_data');\n $configData->setSection($section)\n ->setWebsite($website)\n ->setStore($store)\n ->setGroups($groups)\n ->save();\n\n $session->addSuccess(Mage::helper('novalnet_payment')->__('The configuration has been saved.'));\n } catch (Mage_Core_Exception $e) {\n foreach (explode(\"\\n\", $e->getMessage()) as $message) {\n $session->addError($message);\n }\n } catch (Exception $e) {\n $msg = Mage::helper('novalnet_payment')->__('An error occurred while saving:') . ' ' . $e->getMessage();\n $session->addException($e, $msg);\n }\n\n $this->_redirectByPageConfig();\n }", "public function save()\n\t\t{\n#DS_Database_Archive::_log(__METHOD__.'()');\n\t\t\tif ( $this->_dirty ) {\n#DS_Database_Archive::_log(__METHOD__.'() data is dirty');\n\t\t\t\tif ( NULL !== $this->option_name ) {\n\t\t\t\t\tset_option( $this->option_name, $this->_options );\n\t\t\t\t} else if ( NULL !== $this->filename ) {\n\t\t\t\t\t// save to filesystem\n#DS_Database_Archive::_log(__METHOD__.'() saving to file ' . $this->filename);\n\t\t\t\t\t$output = json_encode( $this->_options, JSON_PRETTY_PRINT );\n#DS_Database_Archive::_log(__METHOD__.'() contents: ' . $output);\n\t\t\t\t\tfile_put_contents( $this->filename, $output );\n\t\t\t\t}\n\t\t\t\t$this->_dirty = FALSE;\n\t\t\t}\n\t\t}", "public function save($persistenceIdentifier, array $formDefinition);", "public function save()\n {\n if ( !$this->unsaved ) {\n // either nothing has been changed, or data has not been loaded, so\n // do nothing by returning early\n return;\n }\n\n $this->write();\n $this->unsaved = false;\n }", "public function store(SectionRequest $request, $company_id, $department_id )\n {\n \n $this->validate($request, [\n 'shortname' => 'required',\n 'fullname' => 'required',\n ]);\n\n $input = $request->all();\n\n $section = new \\App\\Section($input);\n \n $section->save();\n\n Session::flash('flash_message', 'section hinzugefügt!');\n\n //get the data to fill lists & dropdowns\n $company_list = Lists::companies();\n\n $department_list = Lists::departments($company_id);\n\n if($department_id == 0) $department_id = Lists::firstdepartment_id($company_id);\n\n $sections = Lists::sections($department_id);\n \n return view('admin/section', compact('company_list', 'company_id', 'department_list', 'department_id', 'sections'));\n \n //return ($input['department_id']);\n }", "public function save(BannerInterface $page);", "public function addNewSection()\n {\n if($this::check_session()){\n $this->form_validation->set_rules('newSection', 'Section', 'required');\n $formData = ['ex_section' => $this->input->post('newSection')];\n\n if($this->form_validation->run()) { \n $this->Admin_model->addNewSection($formData);\n $this->addSectionQuestionsTab();\n }else{\n $this->addSectionQuestionsTab();\n } \n }\n }", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public function store(Request $request, $division_id, $department_id)\n {\n $section = new Section();\n $section->name = $request->name;\n $section->department_id = $department_id;\n $section->save();\n\n return redirect()->route('admin.divisions.departments.sections.index', [$division_id, $department_id]);\n }", "public function save()\n {\n $data = $this->read_file();\n\n if (( ! $data))\n {\n $data = array();\n }\n\n $data[$this->id] = array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'password' => $this->password,\n 'token' => $this->token,\n 'logins' => $this->logins,\n );\n\n $this->write_file($data);\n }", "public function update(Section $section)\n {\n $this->validate(request(), [\n 'title' => 'required|spamfree'\n ]);\n\n $section->update([\n 'title' => request('title'),\n 'description' => request('description')\n ]);\n }", "public function store(Request $request)\n {\n $section = $request->validate([\n 'title' => ['required']\n ]);\n\n Section::create($section);\n\n session()->flash('msg' , 's: section created successfully');\n return redirect(route('admin.sections.index'));\n }", "protected function postSectionRequest(Requests\\PostSectionRequest $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 postSection');\n }\n // verify the required parameter 'section_name' is set\n if ($request->sectionName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $sectionName when calling postSection');\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 postSection');\n }\n\n $resourcePath = '/slides/{name}/sections';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->sectionName !== null) {\n $queryParams['sectionName'] = ObjectSerializer::toQueryValue($request->sectionName);\n }\n // query params\n if ($request->slideIndex !== null) {\n $queryParams['slideIndex'] = ObjectSerializer::toQueryValue($request->slideIndex);\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 $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'POST');\n }", "public function update(SectionRequest $request, Section $section)\n {\n $section->update($request->all());\n return redirect('/section');\n }", "public function save() {}", "public function save() {}", "public function save() {}", "protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}", "public function edit(Section $section)\n {\n }", "public function edit(Section $section)\n {\n //\n }", "public function setSection($section) {\n $this->section = $section;\n }", "public function update(Request $request, Section $section)\n {\n // /** @var Section $section */\n // $section = Section::findOrFail($id);\n\n $rules = [\n 'name' => ['string', 'max:255'],\n ];\n\n $this->validate($request, $rules);\n\n if ($request->has('name'))\n {\n $section->name = $request->name;\n }\n\n if (!$section->isDirty())\n {\n return $this->errorUpdateNoChanges();\n }\n\n $section->save();\n\n return $this->showOne($section);\n }", "public function store(Request $request)\n {\n // Validate the post\n $this->validate($request, [\n 'section-name' => 'required',\n 'section-image' => 'required|image|nullable|max:1999'\n ],[\n 'section-name.required' => 'Section Name is Required',\n 'section=image.required' => 'Image is Required',\n 'section=image.image' => 'Must be an Image.',\n ]);\n \n // Handle file upload\n if ($request->hasFile('section-image')) {\n // Get file with the extention\n $fileNameWithExt = $request->file('section-image')->getClientOriginalName();\n // Get just name of image\n $fileName = pathinfo($fileNameWithExt, PATHINFO_FILENAME);\n // Get extention of image\n $extension = $request->file('section-image')->getClientOriginalExtension();\n // Filename to store the image\n $fileNameToStore = $fileName.'-'.time().'.'.$extension;\n // Upload image\n $path = $request->file('section-image')->storeAs('public/images', $fileNameToStore);\n }\n \n // Create Section\n $section = new HomePage;\n $section->section_name = $request->input('section-name');\n $section->section_content = $request->input('section-content');\n $section->section_image = $fileNameToStore;\n $section->save();\n \n $request->session()->flash('success', 'Section Created!');\n \n return redirect('/admin/home/');\n }", "public function save() {\n\t\t\t\n\t\t}", "function save() {\r\n\t\t$this->log .= \"save() called<br />\";\r\n\t\tif (count($this->data) < 1) {\r\n\t\t\t$this->log .= \"Nothing to save.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//create file pointer\r\n\t\tif (!$fp=@fopen($this->filename,\"w\")) {\r\n\t\t\t$this->log .= \"Could not create or open \".$this->filename.\"<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//write to file\r\n\t\tif (!@fwrite($fp,serialize($this->data))) {\r\n\t\t\t$this->log .= \"Could not write to \".$this->filename.\"<br />\";\r\n\t\t\tfclose($fp);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//close file pointer\r\n\t\tfclose($fp);\r\n\t\treturn true;\r\n\t}", "public function save(){\n\t\t$sql = new Sql();\n\n\t\t$results = $sql->select(\"CALL sp_categories_save(:idcategory, :descategory)\", array(\n\t\t\t\":idcategory\"=>$this->getidcategory(),\n\t\t\t\":descategory\"=>$this->getdescategory()\n\t\t));\n\n\t\t$this->setData($results[0]);\n\n\n\t\tCategory::updateFile();\n\n\t}", "public final function save() {\n\t\t\treturn SERIA_Meta::save($this);\n\t\t}", "public function saveNew(&$section_rating_view)\n\t{\n\t\treturn false;\n\t}", "public function update($id)\n\t{\n\t\t//\n\t\t$sec = Section::find($id);\n\t\t$validator = Validator::make(Input::all(), Section::$rules);\n\t\n\t if ($validator->passes()) {\n\t\t// validation has passed, save user in DB\n\t\t $sec->name = Input::get('name');\n\t\t $sec->description = Input::get('description');\n \t\t $sec->enabled = Input::get('enabled');\n \t\t $sec->category_id = Input::get('category_id');\n\t\t $sec->save();\n\t\t return Redirect::to('sections')\n\t\t\t\t->with('type', 'success')\n\t\t\t\t->with('message', 'Section edited');\n\t } else {\n\t\t// validation has failed, display error messages \n\t\treturn Redirect::to('sections/'.$id.'/edit')\n\t\t\t\t->with('type', 'alert')\n\t\t\t\t->with('message', 'The following errors occurred')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput();\n\n\t }\n\t}", "public function store(Page $page, PageSectionFormRequest $request)\n {\n $section = $this->repository->create($request->all());\n Pages::forgetCache();\n\n return $this->redirect($request, $section);\n }", "public function saveLayout(){\n\t\t$request\t = $this->getRequest();\n\t\t$sections = $request->getParam('sections', array());\n\t\t$items = $request->getParam('items', array());\n\t\t$template_id = $request->getParam('template_id', null);\n\t\t$page_id = $request->getParam('page_id', null);\n\t\t$table = $this->_getParam('table');\n\n\t\t$sections = array_filter($sections);\n\t\t$items = array_filter($items);\n\n\t\t$sectionAdd\t = array();\n\t\t$itemAdd = array();\n\n\t\tforeach($sections as $sequence => $data){\n\t\t\t$sxnId = intval($this->_utility->getPiece($data));\n\t\t\tif(isset($items[$sxnId])){\n\t\t\t\t$itemAdd[$sxnId] \t= $this->processField($items[$sxnId]);\n\t\t\t\t$sectionAdd[$sxnId] = intval($sequence);\n\t\t\t}\n\t\t}\n\n\t\t$itemAdd = array_filter($itemAdd);\n\n\t\tAdmin_Model_TemplateSection::saveSectionOrder($template_id, $sectionAdd);\n\t\tAdmin_Model_PageLayout::updateLayout($page_id, $template_id, $table, $itemAdd, $sectionAdd);\n\t}", "public function edit(section $section)\n {\n //\n }", "public function update_section(Request $request, $id)\n {\n $this->validate($request, [\n 'section_name' => 'required||unique:quality_document_sections',\n ], $this->custom_messages);\n \n $old_section = QualityDocumentSection::find($id);\n QualityManualDocumentation::where('section',$old_section->section_name)->update(array(\n 'section' => $request->section_name,\n ));\n\n $log = new Log;\n $log->name = Auth::user()->name;\n $log->action = 'EDIT';\n $log->module = 'QMSD-SECTION';\n $log->description = 'Updated section from ' . $old_section->name . 'to ' .$request->name;\n $log->save();\n\n QualityDocumentSection::where('id',$id)->update(array(\n 'section_name' => $request->section_name,\n ));\n\n \n\n return redirect('/qmsd/sections/idx');\n }", "public function update(Section $section){\n if(empty($section->section_id)){\n return false;\n }\n\n\t $stmt = $this->db->prepare(\"SELECT * FROM `sections` WHERE curr_id = :curr_id AND level_id = :level_id AND section_adviser = :section_adviser AND section_name = :section_name\");\n\t $stmt->execute([':curr_id'=>$section->curr,\n\t\t ':section_adviser'=>$section->section_adviser,\n\t\t ':level_id'=>$section->level_id,\n\t\t ':section_name'=>$section->section_name]);\n\t $result = $stmt->fetchAll();\n\n\t if($result){\n\t\t return false;\n\t }\n $stmt = $this->db->prepare(\"UPDATE `sections` \n SET \n `section_name`=:section_name , \n `section_adviser`=:section_adviser , \n `level_id` = :level_id ,\n `curr_id` = :curr_id\n\n WHERE `section_id` = :section_id\");\n\n $result = $stmt->execute([\n \"section_name\" => $section->section_name,\n \"section_adviser\" => $section->section_adviser,\n \"level_id\" => $section->level_id,\n \"curr_id\" => $section->curr,\n \"section_id\" => $section->section_id\n ]);\n\n if($stmt->rowCount() > 0 || $result == true){\n return true;\n }\n\n return false;\n }", "protected function save() {\n $values = $this->values;\n\n $values[self::METADATA_NAMESPACE] = array(\n 'first_trace' => $this->getFirstTrace(),\n 'last_trace' => $this->getLastTrace(),\n 'regeneration_trace' => $this->getRegenerationTrace(),\n 'requests_count' => $this->getRequestsCounter(),\n 'fingerprint' => $this->getFingerprint(),\n );\n\n return $this->getStorage()->store($this->getId(), $values);\n }" ]
[ "0.7178136", "0.6470738", "0.6468554", "0.637008", "0.63407415", "0.6306735", "0.62149984", "0.60658956", "0.6033704", "0.6002403", "0.58844393", "0.5856264", "0.5821594", "0.5803537", "0.5745109", "0.5741303", "0.5741133", "0.5724405", "0.57226545", "0.5715549", "0.56910145", "0.56159", "0.5612447", "0.56069016", "0.5600152", "0.55917484", "0.55849195", "0.5579182", "0.5543843", "0.55411637", "0.55266905", "0.55231637", "0.5522736", "0.5522346", "0.550412", "0.5488159", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.547888", "0.5441169", "0.54331243", "0.5426439", "0.5423747", "0.5404209", "0.54018813", "0.53987956", "0.5377851", "0.5372492", "0.5355584", "0.53481865", "0.5346078", "0.5331889", "0.5319898", "0.5316273", "0.5316273", "0.5316273", "0.5316273", "0.5316273", "0.53071123", "0.53061527", "0.5301244", "0.5291082", "0.5259899", "0.5257507", "0.5256818", "0.52565336", "0.52565336", "0.52531", "0.52518916", "0.52396655", "0.5237507", "0.52335143", "0.5229341", "0.52066886", "0.5200975", "0.519283", "0.5186385", "0.5181762", "0.5178918", "0.51726866", "0.51668984", "0.516416", "0.5163424", "0.5163217", "0.5157241" ]
0.54651827
54
/ viewAddResources Renders the add resources page
public function viewAddResources() { echo Template::instance()->render('view/include/head.php'); echo Template::instance()->render('view/include/top-nav.php'); echo Template::instance()->render('view/edit-resources.php'); echo Template::instance()->render('view/include/footer.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_resources()\n\t{\n\t\t\n\t}", "public function actionAdd()\n\t{\n\t\t$this->render('add');\n\t}", "public function postAddResource()\n {\n\n $errors = validateAddResources();\n\n if(!($errors === true)) {\n\n $this->_f3->set('errors', $errors);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n } else {\n $this->_f3->reroute('/Admin');\n }\n\n }", "public function resources(){\n\t\t$this->verify();\n\t\t$data['title']=\"Resources\";\n\t\t$data['category']=$this->admin_model->fetch_rescources_cat();\n\t\t$this->load->view('parts/head', $data);\n\t\t$this->load->view('resources/resources', $data);\n\t\t$this->load->view('parts/javascript', $data);\n\t}", "public function addAction()\n {\n $this->templatelang->load($this->_controller.'.'.$this->_action);\n\n // Rendering view page\n $this->_view();\n }", "public function get_add()\n { \n // Render the page\n View::make($this->bundle . '::product.add')->render();\n }", "public function add()\n\t{\n\t\t$this->template('crud/add');\t\n\t}", "public function add_new_resource() {\n // @codingStandardsIgnoreLine\n $add_resource_name = wc_clean( $_POST['add_resource_name'] );\n\n if ( empty( $add_resource_name ) ) {\n wp_send_json_error();\n }\n\n $resource = array(\n 'post_title' => $add_resource_name,\n 'post_content' => '',\n 'post_status' => 'publish',\n 'post_author' => dokan_get_current_user_id(),\n 'post_type' => 'bookable_resource',\n );\n $resource_id = wp_insert_post( $resource );\n $edit_url = dokan_get_navigation_url( 'booking' ) . 'resources/edit/?id=' . $resource_id;\n ob_start();\n ?>\n <tr>\n <td><a href=\"<?php echo $edit_url; ?>\"><?php echo $add_resource_name; ?></a></td>\n <td><?php esc_attr_e( 'N/A', 'dokan' ); ?></td>\n <td>\n <a class=\"dokan-btn dokan-btn-sm dokan-btn-theme\" href =\"<?php echo $edit_url; ?>\"><?php esc_attr_e( 'Edit', 'dokan' ); ?></a>\n <button class=\"dokan-btn dokan-btn-theme dokan-btn-sm btn-remove\" data-id=\"<?php echo $resource_id; ?>\"><?php esc_attr_e( 'Remove', 'dokan' ); ?></button>\n </td>\n </tr>\n\n <?php\n $output = ob_get_clean();\n wp_send_json_success( $output );\n }", "public function add()\n {\n //renderView('add');\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 addAction() {\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function renderAdd()\r\n\t{\r\n\t\t$this['itemForm']['save']->caption = 'Přidat';\r\n $this->template->titul = self::TITUL_ADD;\r\n\t\t$this->template->is_addon = TRUE;\r\n\r\n\t}", "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}", "public function addView()\n {\n return $this->render('Add');\n }", "public function addAction()\n {\n $post_request = (array) $this->postZingRequest();\n\n /** Handle the request */\n $errors = $this->_handleRequest($post_request);\n\n return $this->renderAdmin('ZingComponentGoogleMapsBundle:Default:form.html.twig', array_merge(\n array(\n 'zing_form_action' => 'Create',\n 'zing_form_errors' => $errors\n ),\n $post_request\n ));\n\n }", "public function actionAdd() {\n $this->setView('edit');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "private function _addResource()\n {\n //Add Resource\n $this->assets->collection('css_header')\n ->addCss('/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css');\n\n $this->assets->collection('js_footer')\n ->addJs('/plugins/nestable/jquery.nestable.js')\n ->addJs('/plugins/nestable/ui-nestable.js')\n ->addJs('/plugins/bootstrap-modal/js/bootstrap-modal.js')\n ->addJs('/plugins/bootstrap-modal/js/bootstrap-modalmanager.js')\n ->addJs('/templates/backend/default/js/ui-modals.js');\n }", "public function addRessources()\n {\n // $this->context->controller->addCss(($this->_path . '/views/css/tab.css'), 'all');\n // $this->context->controller->addJquery();\n // $this->context->controller->addJS(($this->_path . '/views/js/script.js'));\n // $this->context->controller->addJS(($this->_path . '/views/js/configuration.js'));\n }", "public function resourceTemplateTeamsAdd(Event $event)\n {\n $view = $event->getTarget();\n\n if ($has_team = $this->currentTeam()){\n $team_id = $has_team->getId();\n\n } else {\n $messanger = new Messenger();\n $messanger->addError(\"You can only make a resource template after you have been added to a team\");\n $team_id = 0;\n echo '<script>$(\\'button:contains(\"Add\")\\').prop(\"disabled\",true);</script>';\n\n }\n echo $view->partial('teams/partial/resource-template/add', ['team_id' => $team_id]);\n\n }", "public function add() {\n if($this->user->access_level != 3) {\n # If not, redirect them to the films index\n\t \tRouter::redirect(\"/films\");\n }\n \n # Setup view\n $this->template->content = View::instance('v_films_add');\n $this->template->title = \"DER | Add New Film\";\n \n # Pass in template-specific CSS files\n\t $this->template->client_files_head = '<link rel=\"stylesheet\" href=\"/css/bootstrap.css\" type=\"text/css\">\n\t \t<link rel=\"stylesheet\" href=\"/css/signin.css\" type=\"text/css\">\n\t \t<script type=\"text/javascript\" src=\"/js/app.js\"></script>';\n\n # Render template\n echo $this->template;\n }", "public function addAction()\n {\n $manager = $this->getDI()->get('core_category_manager');\n $this->view->form = $manager->getForm();\n }", "public function addAction()\n {\n// $m = $this->baseView('view',['lside','passportAdmin'],['lside'=>['list' => $this->names,'base' => ''],'cont' => ['fsd']]);\n// $p = $cr->render($m,[]);\n $p = $this->add($this->model);\n return $this->baseView('view',['admin/lside','passport/admin/add'],['lside'=>['list' => $this->names,'base' => ''],'cont' => $p]);\n }", "public function addAction()\n {\n return $this->render('OCPlatformBundle:Default:index.html.twig', ['value' => 0]);\n }", "public function addRequiredResources() {\n // None\n }", "function showLevelResources()\n\t{\n\t\tglobal $tpl, $ilTabs, $ilToolbar, $lng, $ilCtrl;\n\n\t\t$ilToolbar->addButton(\n\t\t\t$lng->txt(\"skmg_add_resource\"),\n\t\t\t$ilCtrl->getLinkTarget($this, \"addLevelResource\"));\n\t\t\n\t\t$this->setLevelHead();\n\t\t$ilTabs->activateTab(\"level_resources\");\n\t\t\n\t\tinclude_once(\"./Services/Skill/classes/class.ilSkillLevelResourcesTableGUI.php\");\n\t\t$tab = new ilSkillLevelResourcesTableGUI($this, \"showLevelResources\",\n\t\t\t$this->base_skill_id, $this->tref_id, (int) $_GET[\"level_id\"]);\n\t\t\n\t\t$tpl->setContent($tab->getHTML());\n\t}", "public function addAction()\n {\n \t$form = MediaForm::create($this->get('form.context'), 'media');\n\n \treturn $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => new Media()));\n }", "public function add() {\r\n\t\t$model = $this->getModel('languages');\r\n\t\t$model->add();\r\n\t\t\r\n\t\t$this->view = $this->getView(\"languages\");\r\n\t\t$this->view->setModel($model, true);\r\n\t\t$this->view->display();\r\n\t}", "public function add()\n\t{\n\t\treturn view('pages.add');\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 }", "function add()\n\t{\n\t\t// hien thi form them san pham\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/add');\n\t}", "public function add() {\n\t\t\n\t\t$this->template->content = View::instance(\"v_posts_add\");\n\t\t\n\t\t$client_files_body = Array(\n\t\t\t'/js/jquery.form.js',\n\t\t\t'/js/posts_add.js'\n\t\t);\n\t\t\n\t\t$this->template->client_files_body = Utils::load_client_files($client_files_body);\n\n\t\techo $this->template;\n\t\t\n\t}", "public function addAction() {\n\t\t$this->view->addLayoutVar(\"onglet\", 2);\n\t\t$uid = Annuaire_User::getCurrentUserId();\n\t\t$this->view->title = t_('Add');\n\t\t$db = Gears_Db::getDb();\n\t\t$clients = Array();\n\t\t$result = $db->fetchAll(\"SELECT * FROM ANNUAIRE_SOCIETE WHERE USER_ID = ?\", Array($uid));\n\t\tforeach ($result as $info) {\n\t\t\t$clients[$info['SOCIETE_ID']][0] = $info['SOCIETE_ID'];\n\t\t\t$clients[$info['SOCIETE_ID']][1] = $info['SOCIETE_NOM'];\n\t\t}\n\t\t$this->view->clients = ($clients);\n\t\t$this->view->addcontact = t_(\"Add a contact\");\n\t\t$this->view->name = t_(\"Name\");\n\t\t$this->view->firstname = t_(\"First Name\");\n\t\t$this->view->address = t_(\"Address\");\n\t\t$this->view->mail = t_(\"Mail\");\n\t\t$this->view->phone = t_(\"Phone Number\");\n\t\t$this->view->cell = t_(\"Cellphone number\");\n\t\t$this->view->fax = t_(\"Fax\");\n\t\t$this->view->site = t_(\"Website\");\n\t\t$this->view->comment = t_(\"Comment\");\n\t\t$this->view->society = t_(\"Companie\");\n\t\t$this->view->none = t_(\"none\");\n\t\t$this->view->send = t_(\"Send\");\n\t\t$this->view->addsociety = t_(\"Add a companie\");\n\t\t$this->view->activity = t_(\"Activity\");\n\t}", "function add() \n {\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n \n // Render the action with template\n $this->renderWithTemplate('users/add', 'AdminPageBaseTemplate');\n }", "public function showAddPage(){\n return view('add');\n }", "public function add() {\n\t\n\t\t# Make sure user is logged in if they want to use anything in this controller\n\t\tif(!$this->user) {\n\t\t\tRouter::redirect(\"/index/unauthorized\");\n\t\t}\n\t\t\n\t\t# Setup view\n\t\t$this->template->content = View::instance('v_teachers_add');\n\n\t\t$this->template->title = \"Add Teacher\";\n\n\t\t$client_files_head = array(\"/css/teachers_add.css\");\n\t\t$this->template->client_files_head = Utils::load_client_files($client_files_head);\n\n\t\t#$client_files_body = array(\"/js/ElementValidation.js\", \"/js/shout_out_utils.js\");\n\t\t#$this->template->client_files_body = Utils::load_client_files($client_files_body);\n\n\t\t# Render template\n\t\techo $this->template;\n\t\t\n\t}", "public function getAdd()\n\t{\n\t $form = \\FormBuilder::create($this->form, [\n 'method' => 'POST',\n 'model' => $this->getModelInstance(),\n 'url' => ($this->url_prefix.'/add')\n ]);\n return view($this->tpl_prefix.'add',array('catalog'=>$this), compact('form'));\n\t}", "public function addNewAction()\n {\n // echo 'Hello from the addNew action in the Books controller!';\n View::renderTemplate('Books/addBook.html');\n }", "public function addResources(RouteCollection $i18nRouteCollection);", "public function add(){\n $outData['script']= CONTROLLER_NAME.\"/add\";\n $this->assign('output',$outData);\n $this->display();\n }", "public function add() {\n // Load add template\n $add = new Views('templates/add.tpl.php');\n // Add header and footer template\n $add->set('header', $add->addHeader());\n $add->set('footer', $add->addFooter());\n $add->set('error', '');\n $add->set('success', '');\n\n //Check if user posted form\n if (isset($_POST['name'])) {\n $name = htmlspecialchars($_POST['name'], ENT_QUOTES);\n $file = new Files($_FILES['file']);\n //Manage uploaded file. If is something wrong with file return error\n if ($destination = $file->manageUploadedFile()) {\n $this->db->addProject($name, $destination);\n $add->set('success', ' <span class=\"button\">Your project has been created, go to project list page and start your scan!</span>');\n }\n else {\n $add->set('error', ' <span class=\"button error_button\">File error: Cannot extract file. Check archive or directory permissions.</span>');\n }\n }\n return $add->render();\n }", "public function add()\n { \n return view('admin.control.add_career',[\n 'jobs'=> Career::all(),\n 'categories'=>Category::all(),\n 'contents'=>Content::all(),\n ]);\n }", "public function add_record()\n {\n $data['main_content'] = $this->type.'/'.$this->viewname.'/add';\n\t $this->load->view($this->type.'/assets/template',$data);\n }", "function lb_show_add_record_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'add',\n\t\t)\n\t);\n}", "public function addAction() {\n $this->form = new \\Application\\Form\\AddParentStudyForm($this->serviceLocator);\n $this->studyDataSave();\n return array('form' => $this->form, 'id' => 0, 'associateCompanyIds' => array(), 'submittedTo' => array());\n }", "public function add(): void\n {\n $exerciseforms = $this->exerciseformBLL->getAllExcerciseforms();\n\n $data = [\n 'exerciseforms' => $exerciseforms,\n 'name' => '',\n 'description' => '',\n 'repetitions' => '',\n 'sets' => ''\n ];\n\n $this->view('exercises/add', $data);\n }", "public function add(){\n\t\t\t\n\t\t\trequire_once('views/category/add.php');\n\t\t}", "public function create()\n {\n return view('restful.add');\n }", "public function addAction()\r\n {\r\n $form = $this->getEditItemForm();\r\n $response = $this->getResponse();\r\n $content = $this->renderViewModel('dots-nav-block/item-add', array('form' => $form));\r\n $response->setContent($content);\r\n return $response;\r\n }", "function add_resource($resource, $id) {\n\t//Create the HTML content for the resource page\n\t$content = '';\n\tif (isset($resource['description']))\n\t\t$content .= '<p>' . esc_attr($resource['description']) . '</p>';\n\t\n\t$content .= '<p><b>URL:</b> <a href=\"' . $resource['url'] . '\" target=\"_blank\">' . $resource['url'] . '</a><br/>';\n\tif (isset($resource['about'])) \n\t\t$content .= '<b>Keywords:</b> ' . join(\", \", $resource['about']) . '<br/>';\n\tif (isset($resource['author'])) \n\t\t$content .= '<b>Author:</b> ' . $resource['author'] . '<br/>';\n\tif (isset($resource['publisher'])) \n\t\t$content .= '<b>Publisher:</b> ' . $resource['publisher'] . '<br/>';\n\tif (isset($resource['dateCreated'])) \n\t\t$content .= '<b>Date created:</b> ' . $resource['dateCreated'] . '<br/>';\n\tif (isset($resource['language'])) \n\t\t$content .= '<b>Language:</b> ' . $resource['language'] . '<br/>';\n\tif (isset($resource['timeRequired'])) \n\t\t$content .= '<b>Time required:</b> ' . $resource['timeRequired'] . '<br/>';\n\tif (isset($resource['educationalUse'])) {\n\t\tcheck_term($resource['educationalUse'], \"asn_educational_use\");\n\t\t$content .= '<b>Educational use: </b><a href=\"'. get_term_link($resource['educationalUse'], \"asn_educational_use\") . '\">' . $resource['educationalUse'] . '</a><br/>';\n\t}\n\tif (isset($resource['educationalAudience'])) {\n\t\tcheck_term($resource['educationalAudience'], \"asn_educational_audience\");\n\t\t$content .= '<b>Educational audience: </b><a href=\"'. get_term_link($resource['educationalAudience'], \"asn_educational_audience\") . '\">' . $resource['educationalAudience'] . '</a><br/>';\n\t}\n\tif (isset($resource['interactivityType'])) {\n\t\tcheck_term($resource['interactivityType'], \"asn_interactivity_type\");\n\t\t$content .= '<b>Interactivity type: </b><a href=\"'. get_term_link($resource['interactivityType'], \"asn_interactivity_type\") . '\">' . $resource['interactivityType'] . '</a><br/>';\n\t}\n\tif (isset($resource['proficiencyLevel'])) {\n\t\tcheck_term($resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\t$content .= '<b>Proficiency level: </b><a href=\"'. get_term_link($resource['proficiencyLevel'], \"asn_proficiency_level\") . '\">' . $resource['proficiencyLevel'] . '</a><br/>';\n\t}\n\t\n\t$content .= '</p>';\n\t//Prepare the post attributes\t\n\t$post = array(\n\t 'post_content' => $content,\n\t 'post_name' => sanitize_title(str_replace('-', ' ',$resource['title'])),\n\t 'post_title' => esc_attr($resource['title']),\n\t 'post_status' => 'publish',\n\t 'post_type' => 'learning_resource'\n\t);\n\t\n\n\t//Update existing post if appropriate\n\tif ($id >= 0) {\n\t\t$post['ID'] = $id;\n\t\twp_update_post($post);\n\t\twp_set_post_terms( $id, $resource['competencies'], \"asn_index\" );\n\t\twp_set_post_terms( $id, $resource['topics'], \"asn_topic_index\" );\n\t\tif (isset($resource['interactivityType'])) \n\t\t\twp_set_post_terms($id, $resource['interactivityType'], \"asn_interactivity_type\");\n\t\tif (isset($resource['educationalAudience'])) \n\t\t\twp_set_post_terms($id, $resource['educationalAudience'], \"asn_educational_audience\");\n\t\tif (isset($resource['educationalUse'])) \n\t\t\twp_set_post_terms($id, $resource['educationalUse'], \"asn_educational_use\");\n\t\tif (isset($resource['proficiencyLevel'])) \n\t\t\twp_set_post_terms($id, $resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\t//$content .= '<b>Interactivity type:</b> ' . $resource['interactivityType'];\n\t\tif(get_post_meta($id, 'resource_uri', true)==\"\") {\n\t\t\tadd_post_meta($id, 'resource_uri', rawurlencode($resource['url']), true);\n\t\t}\n\t}\n\t//Create new post if appropriate\n\telse {\n\t\t$post_id = wp_insert_post( $post);\n\t\twp_set_post_terms( $post_id, $resource['competencies'], \"asn_index\" );\n\t\twp_set_post_terms( $post_id, $resource['topics'], \"asn_topic_index\" );\n\t\tif (isset($resource['interactivityType'])) \n\t\t\twp_set_post_terms($post_id, $resource['interactivityType'], \"asn_interactivity_type\");\n\t\tif (isset($resource['educationalAudience'])) \n\t\t\twp_set_post_terms($post_id, $resource['educationalAudience'], \"asn_educational_audience\");\n\t\tif (isset($resource['educationalUse'])) \n\t\t\twp_set_post_terms($post_id, $resource['educationalUse'], \"asn_educational_use\");\n\t\tif (isset($resource['proficiencyLevel'])) \n\t\t\twp_set_post_terms($post_id, $resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\tadd_post_meta($post_id, 'resource_uri', rawurlencode($resource['url']), true);\n\t}\n\t\n}", "private function add()\n {\n return $this->app->renderView(\n 'campaigns.add',\n array(\n 'flashMessages' => $this->flashMessages\n )\n );\n }", "public function add()\n {\n return view('add_project');\n }", "public function actionAdd()\n {\n $this->adminOnly();\n\n $model = new AddPageForm(['class' => $this->getPageClassName()]);\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n return $this->redirect($this->contentContainer->createUrl('edit', ['type' => $model->type]));\n }\n\n return $this->render('@custom_pages/views/common/add', [\n 'model' => $model,\n 'subNav' => \\humhub\\modules\\custom_pages\\widgets\\ContainerPageMenu::widget()]);\n }", "public function action_add()\n\t{\n\t\t$this->template = View::forge('template-admin');\n\n\t\t//return Response::forge(View::forge('event/add'));\n\t\t$data[\"category\"] = Model_Category::find_all();\n\t\t$this->template->title = \"イベント追加\";\n\t\t$this->template->content = View::forge('event/add',$data);\n\t}", "public function add() \r\n\t{\r\n\t\t$data['header']['title'] = 'Add a new country';\r\n\t\t$data['footer']['scripts']['homescript.js'] = 'home';\r\n\t\t$data['view_name'] = 'country/country_add_view';\r\n\t\t$data['view_data'] = '';\r\n\t\t$this->load->view('country/page_view', $data);\r\n\t}", "public function add()\n\t{\n\n\t\t$this->data['_pageview'] = $this->data[\"_directory\"] . \"edit\";\n\t\t$this->data['option'] \t\t= \"add\";\n\n\t\treturn view($this->constants[\"ADMINCMS_TEMPLATE_VIEW\"], $this->data);\n\t}", "public function postEditResources()\n {\n $id = $this->_params['id'];\n\n $errors = validateEditResource($id);\n\n if(!($errors === true)) {\n $database = new Database();\n\n $resource = $database->getResourceById($id);\n /*construct($resourceID = \"0\", $resourceName = \"Resource\", $description = \"Info\",\n $contactName =\"\",$contactEmail = \"\",$contactPhone = \"\",$link = \"\", $active = \"1\" )*/\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 $this->_f3->set('errors', $errors);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n } else {\n // fixme add routing\n $this->_f3->reroute('/Admin');\n }\n\n }", "public function add(){\n return view('survey::survey-add');\n\n }", "public function addAction() {\n\t\t$this->_forward('edit', null, null, array('id' => 0, 'model' => $this->_getParam('model')));\n\t}", "public function getAdd()\n {\n return view(\"Policy::add-edit\");\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 renderAdd()\r\n\t{\r\n\t\t$this['tarifForm']['save']->caption = 'Přidat';\r\n\t}", "public function add()\n {\n $categories = Category::all();\n return view('admin.product.add',compact('categories'));\n }", "public function addCoursesPage(){\n return View('admin.addcourse');\n }", "public function create()\n {\n return view(self::$folder . 'add')->withTitle(self::$mainTitle)->with('link', self::$link);\n }", "public function add()\n {\n $data = [\n 'property' => [\n 'template' => 'extracurricular_add',\n 'title' => 'Tambah Ekstrakurikuler',\n 'menu' => $this->menu->read(),\n ],\n 'data' => [],\n ];\n\n $this->load->view('template', $data);\n }", "public function add()\n {\n $this->view->state = $this->request->has('id') ? 'Edit Row' : 'Add Row';\n return $this->view('add');\n }", "public function add(){\n\n\t $this->load->view('layouts/header');\n\t\t$this->load->view('layouts/aside');\n\t\t$this->load->view('admin/usuarios/add'); // se envia a la vista admin/laptops/add\n\t\t$this->load->view('layouts/footer');\n}", "function insert_resouces($resources) {\r\n foreach ($resources['css'] as $css) {\r\n echo '<link rel=\"stylesheet\" href=\"'. $css .'\">';\r\n }\r\n foreach ($resources['js'] as $js) {\r\n echo '<script src=\"'. $js .'\"></script>';\r\n }\r\n }", "public function render(): void\n {\n $this->prepare_items();\n $this->handleFormAction();\n $this->loadAssets();\n\n $action = $_REQUEST['action'] ?? null;\n $primaryKey = $this->model->getPrimaryColumn();\n $resourceId = $_REQUEST[$this->singular]\n ?? $this->model->{$primaryKey}\n ?? null;\n\n echo $action && in_array($action, ['edit', 'create'])\n ? $this->getFormView($resourceId)\n : $this->getDefaultView();\n\n do_action('print_resource_page_assets');\n }", "public function addAction(){\n\t\t$this->assign('roots', $this->roots);\n\t\t$this->assign('parents', $this->parents);\n\t}", "function studentResources(){\n // show the student resources page\n echo Template::instance()->render('views/studentResources.php');\n}", "function add()\r\n\t{\r\n\t\t$data['main_content'] = 'policy_add';\r\n\t\t$opt_load = array(\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/dashboardui.css\" />',\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/css3-buttons.css\" />',\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/progress.css\" />',\r\n\t\t\t'<script type=\"text/javascript\" src=\"http://www.datalabsecurity.com/webscan/resources/js/jquery-1.6.4.min.js\"></script>',\r\n\t\t\t'<script src=\"http://www.datalabsecurity.com/webscan/resources/js/jquery.easytabs.min.js\" type=\"text/javascript\"></script>',\r\n\t\t\t'<script type=\"text/javascript\" src=\"http://www.datalabsecurity.com/webscan/resources/js/progress.js\"></script>',\r\n\t\t\t);\r\n\t\t$opt_head = array(\r\n\t\t\t\"title\" => \"Policies\",\r\n\t\t\t\"opt_load\" => $opt_load,\r\n\t\t\t);\r\n\t\t$data['opt_head'] = $opt_head;\r\n\t\t$this->load->view('includes/template-beta', $data);\t\r\n\t}", "public function index() {\n $data = array();\n \n //Create the scripts array\n $scripts = array();\n \n //Add script to the scripts array\n $scripts[] = base_url('js/add.js');\n \n //Add scripts array to the data array\n $data['scripts'] = $scripts;\n \n //Get modules\n $modules = $this->_getModules();\n $data['modules'] = $modules;\n \n //Get categories\n $users = $this->_getUsers();\n $data['users'] = $users;\n \n //Load the header\n $this->load->view('page/header',$data);\n \n //Load the page view\n $this->load->view('add',$data);\n \n //Load the footer\n $this->load->view('page/footer',$data);\n }", "public function addAction() {\n\t\t$this->assign('ad_types', $this->ad_types);\n\t\tlist(, $subjects) = Client_Service_Subject::getAllSubject();\n\t\t$this->assign('subjects', $subjects);\n\t}", "public function addAction()\n {\n $this->getServiceLocator()->get('permissions')->enforce('projectAddAllowed');\n\n // force the 'id' field to have the value of name\n // the input filtering will reformat it for us.\n $request = $this->getRequest();\n $request->getPost()->set('id', $request->getPost('name'));\n\n return $this->doAddEdit(ProjectFilter::MODE_ADD);\n }", "public function index ()\n {\n return view('layouts.add');\n }", "public function add() {\n\n $this->set('add', true);\n\n if($this->request->is('post')){\n\n $result = $this->Task->save($this->request->data);\n if($result){\n $this->_setFlash('Task added successfully.', 'success');\n $this->redirect('/tasks');\n }\n else {\n $valError = $this->Task->validationErrorsAsString();\n $this->_setFlash(\"Unable to save this task. ${valError}\");\n }\n }\n\n $this->render('add-edit');\n }", "public function addView()\n {\n $translate = $this->getTranslate('CodeAddView');\n $this->setParam('translate', $translate);\n\n $codeModel = new codeModel();\n\n $statusList = $codeModel->getStatusList();\n $this->setParam('statusList', $statusList);\n\n $moldRefSpecs = $codeModel->getRefSpecsPossible('R1');\n $this->setParam('refSpecs', $moldRefSpecs);\n\n // traduction des statuts\n $translateStatusList = $this->getTranslate('Status_List');\n $this->setParam('translateStatusList', $translateStatusList);\n\n\n // Récupération de la liste des données avec leurs descriptions\n $dataModel = new dataModel();\n\n $dataList = $dataModel->getDataList('Code_App');\n $this->setParam('dataList', $dataList);\n\n $dataCategoryList = $dataModel->getDataCategoryListUser('Code_App');\n $this->setParam('dataCategoryList', $dataCategoryList);\n\n // traduction des données et des catégories\n $translateData = $this->getTranslate('Data_List');\n $this->setParam('translateData', $translateData);\n $translateDataCategory = $this->getTranslate('Data_Category_List');\n $this->setParam('translateDataCategory', $translateDataCategory);\n\n\n $this->setParam('titlePage', $this->getVerifyTranslate($translate, 'pageTitle'));\n $this->setView('codeAdd');\n $this->setApp('Code_App');\n\n\n // Vérification des droits utilisateurs\n if (frontController::haveRight('add', 'Code_App'))\n $this->showView();\n else\n header('Location: /code');\n }", "public function get_add(){\n return View::make('stance.add')->with('title', 'Submit a Stance')->with('subtitle', 'Try to make your views official party Stances');;\n }", "public function add()\n\t{\t\n\t\t//Carrega o Model Categorias\t\t\t\n\t\t$this->load->model('CategoriasModel', 'Categorias');\n\t\n\t\t$data['categorias'] = $this->Categorias->getCategorias();\t\n\n\t\t// Editando texto do titulo do header\n\t\t$data['pagecfg']['Title'] = \"Adicionar Pessoa\";\t\t\n\n\t\t// Alterando o Estado da View Para Adicionar Pessoa\n\t\t$data['pagecfg']['viewState'] = \"Adicionar Pessoa\";\n\t\t$data['pagecfg']['btnState'] = \"Adicionar\";\n\t\t$data['pagecfg']['inputState'] = \"enable\";\n\t\t$data['pagecfg']['actionState'] = \"/ListarPessoas/salvar\";\n\t\t\n\t\t//Carrega a View\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('PessoaView', $data);\n\t\t$this->load->view('templates/footer', $data);\n\t}", "function add()\n\t{\n\t\t$companies = $this->company_model->get_many_by(array('active_status' => 1));\n\t\t$violation_levels = $this->violation_level_model->get_many_by(array('active_status' => 1));\n\t\t$violation_types = $this->violation_type_model->get_many_by(array('active_status' => 1));\n\t\t\n\t\t$this->data = array(\n 'page_header' \t=> 'Add New Violation',\n 'notification' \t=> array(\"sound\"=>false),\n\t\t\t'companies'\t\t=> $companies,\n\t\t\t'violation_levels'\t=>$violation_levels,\n\t\t\t'violation_types'\t=>$violation_types\n );\n\t\t$this->load_view('forms/violation-add');\n\t}", "public function add()\n {\n $title = 'Add Tags';\n return view('admin.modules.tags.edit',['title' => $title]);\n }", "public function add()\n {\n\n return view('admin.add_role',\n [ \n 'activeTab' => 'users', \n 'activeLink' => 'addRole',\n 'userRoles' => Role::get() \n ] \n );\n }", "public function add_asset_form(){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$categories = Category::all();\n \t\treturn view('storage.add_asset', compact('categories'));\n \t}", "public function showAdd()\n {\n return View::make('honeys.add');\n }", "public function addAction()\n {\n\n $this->view->headTitle()->prepend('Add Product');\n\n $this->_helper->viewRenderer->setRender('form');\n\n $request = $this->getRequest();\n\n $form = new Application_Form_Product();\n \n if ($request->isPost()) {\n if ($form->isValid($request->getPost())) {\n\n $this->loadModel('product');\n $this->modelProduct->insert($form->getValues());\n\n $this->view->success = true;\n $this->view->productName = $form->getValues()['name'];\n $this->view->actionPerformed = 'added';\n $form->reset();\n }\n }\n \n $this->view->form = $form;\n }", "public function action_add()\n\t{\n $data = $this->addSelectBoxMongoData();\n\t\tif (count(input::post()) > 0) {\n\t\t\t$params = input::post();\n\t\t\t$data['val'] = $params;\n\t\t\tif (empty($params['c_logo']) === false) {\n\t\t\t\tunlink(IMAGE_TEMP_PATH. $params['c_logo']);\n\t\t\t}\n\t\t}\n\t\t$this->common_view->set('content', View::forge('career/add', $data));\n\t\treturn $this->common_view;\n\t}", "public function getAdd()\n {\n return view('manage.content.help.action.add');\n }", "public function add() {\n\t\t$this->display ( 'admin/tag/add.html' );\n\t}", "public function addAction(){\n return view('admin::service-group.add', [\n\n 'TITLE' =>'Thêm nhóm dich vụ',\n\n ]);\n }", "public function add() {\n return view('admin/screenshot/add');\n }", "protected function addResource(Resource $resource)\n {\n $this->view->addResource($resource);\n }", "public function addAction() {\n\t\tlist(, $groups) = Resource_Service_Pgroup::getAllPgroup();\n\t\t$this->assign('groups', $groups);\n\t\t$this->assign('ntype', $this->ntype);\n\t\t$this->assign('btype', $this->btype);\n\t}", "public function add()\n {\n $listCategories = Category::all();\n return view('admin.categories.add_category',compact('listCategories'));\n }", "public function view_adding_instruction(){\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/add_instructions';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Add Instructions',\n\t\t\t'courselist' => $this->setting_model->Get_All('course'),\n\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "function showCompany_ADD() \n\t{\n\t\treturn view('company_add');\n \t\n\t}", "public function addAction()\n {\n $entity = new Feed();\n // \\Doctrine\\Common\\Util\\Debug::dump($entity);\n $form = $this->createCreateForm($entity);\n\n return $this->render('APiszczekDemoBundle:Feeds:add.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function add()\n {\n $Categories = Category::all();\n return view('crud.categories.add')->with(compact('Categories'));\n }", "public function companyadd() {\r\n $contragent_types = $this->model->getContragentTypes();\r\n return $this->view('company/companyadd', $contragent_types);\r\n }" ]
[ "0.70956415", "0.686092", "0.67862123", "0.66067195", "0.65433717", "0.6538168", "0.6532919", "0.6522265", "0.6388805", "0.63888025", "0.62770903", "0.6261078", "0.62582153", "0.6235059", "0.6217802", "0.6195584", "0.61924314", "0.6179709", "0.61661065", "0.6148068", "0.61478364", "0.61468506", "0.6139856", "0.61157244", "0.6103925", "0.60861903", "0.605729", "0.604674", "0.60456693", "0.6045604", "0.60113037", "0.6009641", "0.6007848", "0.60033756", "0.5986209", "0.59769917", "0.5967128", "0.59651756", "0.59554464", "0.59449935", "0.59197515", "0.59187585", "0.5889137", "0.58870184", "0.58758956", "0.58752185", "0.5875078", "0.58727884", "0.58447593", "0.5842163", "0.5841493", "0.58329463", "0.58123595", "0.581068", "0.58089274", "0.5806043", "0.5797699", "0.579672", "0.5782064", "0.5778929", "0.57592875", "0.5757851", "0.5757312", "0.5752248", "0.5743069", "0.5739254", "0.5739168", "0.5728254", "0.57275856", "0.5719102", "0.57095313", "0.5694566", "0.56898236", "0.5676084", "0.56757593", "0.5671385", "0.56651586", "0.5663626", "0.5648344", "0.5627558", "0.5623491", "0.5615165", "0.5612353", "0.56057364", "0.5597028", "0.5585109", "0.55813223", "0.5578719", "0.5573362", "0.5570049", "0.5569074", "0.55689687", "0.55598557", "0.55568475", "0.55534834", "0.5549325", "0.5549106", "0.5536394", "0.55355465", "0.5533849" ]
0.79143375
0
/ viewEditResources Loads a specific resource for editing and renders the edit resources page
public function viewEditResources() { $database = new Database(); $id = $this->_params['id']; $resource = $database->getResourceById($id); $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description'] , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] , $resource['Link'], $resource['active']); $this->_f3->set('Resource', $availableResource); echo Template::instance()->render('view/include/head.php'); echo Template::instance()->render('view/include/top-nav.php'); echo Template::instance()->render('view/edit-resources.php'); echo Template::instance()->render('view/include/footer.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postEditResources()\n {\n $id = $this->_params['id'];\n\n $errors = validateEditResource($id);\n\n if(!($errors === true)) {\n $database = new Database();\n\n $resource = $database->getResourceById($id);\n /*construct($resourceID = \"0\", $resourceName = \"Resource\", $description = \"Info\",\n $contactName =\"\",$contactEmail = \"\",$contactPhone = \"\",$link = \"\", $active = \"1\" )*/\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 $this->_f3->set('errors', $errors);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n } else {\n // fixme add routing\n $this->_f3->reroute('/Admin');\n }\n\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function edit(Resource $resource)\n {\n //\n }", "public function editAction() {\n $model = new Application_Model_Compromisso();\n //busco no banco o quem eu quero editar\n $comp = $model->find($this->_getParam('id'));\n // renderiso uma view com os dados\n $this->view->assign(\"compromisso\", $comp);\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 editAction()\n {\n $curriculumdocId = $this->getRequest()->getParam('id');\n $curriculumdoc = $this->_initCurriculumdoc();\n if ($curriculumdocId && !$curriculumdoc->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_curriculumdoc')->__('This curriculum doc no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getCurriculumdocData(true);\n if (!empty($data)) {\n $curriculumdoc->setData($data);\n }\n Mage::register('curriculumdoc_data', $curriculumdoc);\n $this->loadLayout();\n\n $this->_title(Mage::helper('bs_curriculumdoc')->__('Training List'))\n ->_title(Mage::helper('bs_curriculumdoc')->__('Curriculum Documents'));\n if ($curriculumdoc->getId()) {\n $this->_title($curriculumdoc->getCdocName());\n } else {\n $this->_title(Mage::helper('bs_curriculumdoc')->__('Add curriculum doc'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Client_Service_Ad::getAd(intval($id));\n\t\t$game_info = Resource_Service_Games::getResourceGames($info['link']);\n\t\t$this->assign('game_info', $game_info);\n\t\t$this->assign('ad_types', $this->ad_types);\n\t\t$this->assign('info', $info);\n\t}", "public function editAction()\n {\n $tiles = [];\n // Reuse the parameters from $_REQUEST\n // If we are going to render a full page for edit form, we shall also render the _form_controls\n $tiles[] = Region::create($this->getEditRegionPath(), array_merge($_REQUEST, [\n '_form_controls' => true,\n ]));\n return $this->render($this->findTemplatePath('page.html') , array( 'tiles' => $tiles ));\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() {\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 editAction() {}", "public function edit()\n {\n if (!isset($_GET['id'])) {\n call('pages', 'error');\n return;\n }\n\n $project = Project::find($_GET['id']);\n require_once('views/projects/edit.php');\n }", "public function edit($id)\n {\n // include view file\n }", "public function editAction(): object\n {\n // Sets webpage title\n $title = \"Edit content\";\n\n // Sets extended webpage title\n $titleExtended = \" | Eshop\";\n\n // Framework variables\n $response = $this->app->response;\n $session = $this->app->session;\n\n // Verifies if user is logged in\n if (!$session->get(\"loggedIn\")) {\n $response->redirect(\"eshop/login\");\n };\n\n // Connects to db\n $this->app->db->connect();\n\n // Retrieve content id\n $contentId = getGet(\"id\");\n\n // SQL statement\n $sql = \"SELECT * FROM content WHERE id = ?;\";\n\n // Fetches data from db and stores in $resultset\n $content = $this->app->db->executeFetch($sql, [$contentId]);\n\n // Data array\n $data = [\n \"title\" => $title,\n \"titleExtended\" => $titleExtended,\n \"contentId\" => $contentId,\n \"content\" => $content,\n // \"filters\" => $filters\n ];\n\n // Includes admin header\n $this->app->page->add(\"content/header_admin\");\n\n // Adds route and sends data array to view\n $this->app->page->add(\"content/edit\", $data);\n\n // Renders page\n return $this->app->page->render($data);\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(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function editAction()\n {\n $coursedocId = $this->getRequest()->getParam('id');\n $coursedoc = $this->_initCoursedoc();\n if ($coursedocId && !$coursedoc->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_coursedoc')->__('This course doc no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getCoursedocData(true);\n if (!empty($data)) {\n $coursedoc->setData($data);\n }\n Mage::register('coursedoc_data', $coursedoc);\n $this->loadLayout();\n $this->_title(Mage::helper('bs_coursedoc')->__('Course Document'))\n ->_title(Mage::helper('bs_coursedoc')->__('Course Documents'));\n if ($coursedoc->getId()) {\n $this->_title($coursedoc->getCourseDocName());\n } else {\n $this->_title(Mage::helper('bs_coursedoc')->__('Add course doc'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "abstract protected function renderEdit();", "public function actionEdit($id) { }", "public function editAction() {\n\t\t// Get all todos\n\t\t$todo = new todo;\n\t\t$todo = $todo->Get($this->get['id']);\n\t\t// Filter by passing an argument as array(array('done', '=', '0')) to\n\t\t// GetList. This would for example only select todos that are done.\n\n\t\t// Get template\n\t\t$template = $this->getTemplate('todo_edit');\n\n\t\t// Render template\n\t\treturn $template->render(array('todo' => $todo));\n\t}", "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}", "public function editAction(){\n\t\t$id = $this->getInput('id');\n\t\t$info = Ola_Service_Area::get(intval($id)); \n\t\t$this->assign('roots', $this->roots);\n\t\t$this->assign('parents', $this->parents);\n\t $this->assign('info', $info);\t\n\t}", "public function edit()\n {\n // get resources for display \n $website = Website::where('name','flooflix')->first();\n if (!is_null($website) && !empty($website)) {\n $page = Page::where('website_id', $website->id)->where('name','modifier_carte')->first();\n if(!is_null($page) && !empty($page)){\n $datas = $page->getResourcesToDisplayPage($page);\n } \n }else{\n return view('errors.404');\n }\n return view('Flooflix.forms.editBankCard', compact('datas'));\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function editAction(): void {\n View::renderTemplate('Profile/edit.twig', [\n 'user' => $this->user\n ]);\n }", "public function editAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$layoutName = $this->_request->getParam('layout'); \n\t\t$this->view->objLayout = $model->getLayout($layoutName);\n\t }", "public function edit(){\n $factura = parent::find($_GET['id']);\n require_once 'views/employee/layouts/header.php';\n require_once 'views/employee/factura/edit.php';\n require_once 'views/employee/layouts/footer.php';\n\n }", "public function edit()\n {\n $userId = Helper::getIdFromUrl('user');\n\n Helper::checkUrlIdAgainstLoginId($userId);\n\n View::render('users/edit.view', [\n 'method' => 'POST',\n 'action' => '/user/' . $userId . '/update',\n 'user' => UserModel::load()->get($userId),\n 'roles' => RoleModel::load()->all(),\n ]);\n }", "public function edit($module_id, $id)\n {\n $module = Module::find($module_id);\n $resource = Resource::find($id);\n if ($resource == null) {\n return back();\n }else{\n return view('resources/edit-resource-title', compact('resource', 'module'));\n }\n }", "public function editView() {\n Template_Module::setFullWidth(true);\n $this->edit = true;\n $this->addView();\n // cestak obrázků\n $this->imagePath = $this->category()->getModule()->getDataDir(true);\n }", "function edit() {\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->getDefaultViewForm();\n\n\t\tif (!$view) {\n\t\t\tthrow new Exception('Edit task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t// Hint the view that it's not a listing, but a form (KenedoView::display() uses it to set the right template file)\n\t\t$view->listing = false;\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 edit()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_GET['id']);\n $data = array(\n 'title' => 'edit',\n 'tacgia' => $tacgia\n );\n\n // Load view\n $this->view->load('tacgias/edit', $data);\n }", "public function editAction($id = null)\r\n {\r\n $all = $this->users->findAll();\r\n\r\n $this->theme->setTitle(\"Visa fråga\");\r\n $this->views->add('question/listbyId', [\r\n 'users' => $this->users,\r\n 'title' => \"Visa fråga\",\r\n ]);\r\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function editAction($id)\n {\n }", "public function action_edit()\n\t{\n\t\t$view = View::factory('story/incomplete');\n\t\t$this->response->body($view);\n\t}", "public function editAction() {\n if ($this->getRequest()->isPost()) {\n // Save changes\n $this->_savePanel();\n } else {\n $panelsModel = new Datasource_Cms_Panels();\n $id = $this->getRequest()->getParam('id');\n $panel = $panelsModel->getByID($id);\n\n $passThrough = $this->_helper->getHelper('FlashMessenger')->getMessages();\n if (count($passThrough)>0) {\n if (isset($passThrough[0]['saved'])) {\n if ($passThrough[0]['saved'] == true) $this->view->saved=true;\n }\n if (isset($passThrough[0]['errorMessage'])) {\n $this->view->errorMessage = $passThrough[0]['errorMessage'];\n }\n }\n\n $this->view->key = $panel['key'];\n $this->view->description = $panel['description'];\n $this->view->content = $panel['content'];\n $this->view->id = $panel['id'];\n }\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 editAction()\n {\n parent::editAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\r\n\t{\r\n\t\t$model = $this->getProfileView();\r\n\t\t$data = array('model'=> $model);\r\n\t\t\r\n\t\treturn $this->render($data);\r\n\r\n\t}", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n {\n return $this->editor($isEditAction=true);\n }", "public function resourceTemplateTeamsEdit(Event $event)\n {\n $view = $event->getTarget();\n $rt_id = $view->vars()->resourceTemplate->id();\n $entityManager = $this->getServiceLocator()->get('Omeka\\EntityManager');\n $rt_teams = $entityManager->getRepository('Teams\\Entity\\TeamResourceTemplate')->findBy(['resource_template'=>$rt_id]);\n\n $team_ids = array();\n foreach ($rt_teams as $rt_team):\n $team_ids[] = $rt_team->getTeam()->getId();\n endforeach;\n echo $view->partial('teams/partial/resource-template/edit', ['rt_teams' => $rt_teams, 'team_ids' => $team_ids]);\n }", "public function editAction() {\n $id = $this->getInput('id');\n $info = Client_Service_Ad::getAd(intval($id));\n \n $this->assign('ad_type', self::AD_TYPE);\n $this->assign('ad_ptypes', $this->ad_ptypes);\n $this->assign('info', $info);\n }", "public function edit() {\n\t\t$data['pagetitle'] = 'Dashboard - Edit Posts';\n\n\t\t$data['postid'] = $viewmodel->getPostById($postid['id'] );\n\t\tView::renderAdminTemplate($data, \"App/Views/admin/edit/index.php\") ;\n\t}", "public function edit()\n {\n return view('common::edit');\n }", "public function editAction()\n {\n echo 'Hello from the edit action in the Books controller!';\n echo '<p>Route parameters: <pre>' .\n htmlspecialchars(print_r($this->route_params, true)) . '</pre></p>';\n }", "public function _editAction() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\tif (array_key_exists ( 'cid', $args )) {\n\t\t\t$action_id = $args ['cid'] [0];\n\t\t} else {\n\t\t\t$action_id = @$args [3] ? @$args [3] : $args [1];\n\t\t}\n\t\t\n\t\t$field = $this->getModel ( 'field' );\n\t\t$field->getAllWhere ( 'form_id = \"' . ( int ) $this->_getFormId () . '\"' );\n\t\t\n\t\t$action = $this->getModel ( 'action' );\n\t\t$action->get ( ( int ) $action_id );\n\t\t\n\t\t$this->loadPluginModel ( 'actions' );\n\t\t\n\t\t$this->setView ( 'edit_action' );\n\t\n\t}", "public function action_editar() {\r\n\t\tif(!Session::instance()->GetUsuario())\r\n \treturn $this->redirect(\"/\");\r\n $links = new Model_Link();\r\n $template = View::factory(\"base/menu\");\r\n $template->set(\"usuario\", Session::instance()->GetUsuario());\r\n $template->set(\"links\", $links->ObtenerLinks(Session::instance()->GetUsuario()));\r\n\t\t/***************************************/\r\n\t\t$template->body = View::factory(\"compromiso/editar\");\r\n\t\t\r\n\t\t$compromisoId = $this->request->param('id');\r\n\t\t$compromiso = new Model_Compromiso($compromisoId);\r\n\t\t$template->body->set(\"compromiso\", $compromiso);\r\n\t\t$template->set(\"scripts\", $this->scripts);\r\n\t \t$template->set(\"styles\", $this->styles);\r\n\t\t\r\n\t\t$this->response->body($template);\r\n\t}", "public function resourcecontentAction() {\n\t$resource_type = $this->_getParam('resource_type');\n\t$resource_id = $this->_getParam('resource_id');\n\t$is_spocerdStory = $this->_getParam('is_spocerdStory', null);\n\n\t$is_document = 0;\n\tif ($resource_type == 'document') {\n\t $is_document = 1;\n\t}\n \n if( strstr($resource_type, \"sitereview\") ) {\n // $resource_type = \"sitereview\";\n\n $sitereviewExplode = explode(\"_\", $resource_type);\n $tempAdModId = $sitereviewExplode[1];\n $module_info = Engine_Api::_()->getItem(\"communityad_module\", $tempAdModId);\n $tempModName = strtolower($module_info->module_title);\n $tempModName = ucfirst($module_info->module_title);\n \n $content_table = \"sitereview_listing\";\n $sub_title = \"View\" . \" \" . $tempModName;\n $content_data = Engine_Api::_()->getItem($content_table, $resource_id);\n }else {\n $field_info = Engine_Api::_()->getDbTable('modules', 'communityad')->getModuleInfo($resource_type);\n\n if (!empty($field_info)) {\n $content_data = Engine_Api::_()->getItem($field_info['table_name'], $resource_id);\n }\n }\n\n $base_url = Zend_Controller_Front::getInstance()->getBaseUrl();\n if( empty($sub_title) ) {\n $sub_title = Engine_Api::_()->communityad()->viewType($resource_type);\n }\n\t$photo_id_filepath = 0;\n\n\tif (empty($is_document)) {\n\t $photo_id_filepath = $content_data->getPhotoUrl('thumb.normal');\n\t} else {\n\t $photo_id_filepath = $content_data->thumbnail;\n\t}\n\n\tif (strstr($photo_id_filepath, '?')) {\n\t $explode_array = explode(\"?\", $photo_id_filepath);\n\t $photo_id_filepath = $explode_array[0];\n\t}\n\n\t$isCDN = Engine_Api::_()->seaocore()->isCdn();\n\n\tif (empty($isCDN)) {\n\t if (!empty($base_url)) {\n\t\t$photo_id_filepath = str_replace($base_url . '/', '', $photo_id_filepath);\n\t } else {\n\t\t$arrqay = explode('/', $photo_id_filepath);\n\t\tunset($arrqay[0]);\n\t\t$photo_id_filepath = implode('/', $arrqay);\n\t }\n\t}\n\n\tif (!empty($photo_id_filepath)) {\n\t if (strstr($photo_id_filepath, 'application/')) {\n\t\t$photo_id_filepath = 0;\n\t } else {\n\t\t$content_photo = $this->upload($photo_id_filepath, $is_document, $isCDN);\n\t }\n\t}\n\t// Set \"Title width\" acording to the module.\n\t$getStoryContentTitle = $title = $content_data->getTitle();\n\t$title_lenght = strlen($title);\n\t$tmpTitle = strip_tags($content_data->getTitle());\n\t$titleTruncationLimit = $title_truncation_limit = Engine_Api::_()->getApi('settings', 'core')->getSetting('ad.char.title', 25);\n\tif ($title_lenght > $title_truncation_limit) {\n\t $title_truncation_limit = $title_truncation_limit - 2;\n\t $title = Engine_String::strlen($tmpTitle) > $title_truncation_limit ? Engine_String::substr($tmpTitle, 0, $title_truncation_limit) : $tmpTitle;\n\t $title = $title . '..';\n\t}\n\n\t// Set \"Body width\" acording to the module.\n\t$body = $content_data->getDescription();\n\t$body_lenght = strlen($body);\n\t$tmpBody = strip_tags($content_data->getDescription());\n\t$body_truncation_limit = Engine_Api::_()->getApi('settings', 'core')->getSetting('ad.char.body', 135);\n\tif ($body_lenght > $body_truncation_limit) {\n\t $body_truncation_limit = $body_truncation_limit - 2;\n\t $body = Engine_String::strlen($tmpBody) > $body_truncation_limit ? Engine_String::substr($tmpBody, 0, $body_truncation_limit) : $tmpBody;\n\t $body = $body . '..';\n\t}\n\n\n\n\n\t$preview_title = $title . '<div class=\"cmaddis_adinfo\"><a href=\"javascript:void(0);\">' . $sub_title . '</a></div>';\n \t//$preview_title = $title . '<div class=\"cmaddis_adinfo cmad_show_tooltip_wrapper\" style=\"clear:none;\"><a href=\"javascript:void(0);\">' . $sub_title . '</a><div class=\"cmad_show_tooltip\"> <img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" />Viewers will be able to like this ad and its content. They will also be able to see how many people like this ad, and which friends like this ad.</div></div>';\n\n\t$remaning_body_limit = $body_truncation_limit - strlen($body);\n\tif ($remaning_body_limit < 0) {\n\t $remaning_body_limit = 0;\n\t}\n\t$remaning_title_limit = $title_truncation_limit - strlen($title);\n\tif ($remaning_title_limit < 0) {\n\t $remaning_title_limit = 0;\n\t}\n\n\t// Set the default image if no image selected.\n\tif (empty($content_photo)) {\n\t if (empty($is_spocerdStory)) {\n\t\t$path = $this->view->layout()->staticBaseUrl . '/application/modules/Communityad/externals/images/blankImage.png';\n\t\t$content_photo = '<img src=\"' . $path . '\" alt=\" \" />';\n\t } else {\n\t $content_photo = $this->view->itemPhoto($content_data, 'thumb.profile');\n\t if( in_array('music', array('music')) && in_array('blog', array('blog')) ) {\n\t $content_photo = $this->view->itemPhoto($content_data, 'thumb.icon');\n\t }\n\t }\n\t}\n\t$viewerTruncatedTitle = Engine_Api::_()->communityad()->truncation($this->_viewer->getTitle(), $titleTruncationLimit);\n\t\n\tif ($is_spocerdStory == 1) {\n\t $storyTrunLimit = Engine_Api::_()->getApi('settings', 'core')->getSetting('story.char.title', 35);\n\t $getStoryContentTitle = Engine_Api::_()->communityad()->truncation($getStoryContentTitle, $storyTrunLimit);\n\t $getTooltipTitle = $this->view->translate(\"_sponsored_viewer_title_tooltip\");\n\t $getContentTooltipTitle = $this->view->translate(\"_sponsored_content_title_tooltip\");\n\t $viewerTruncatedTitle = '<span class=\"cmad_show_tooltip_wrapper\"><b><a href=\"javascript:void(0);\">' . $viewerTruncatedTitle . '</a></b><div class=\"cmad_show_tooltip\"><img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" style=\"width:13px;height:9px;\" />'.$getTooltipTitle.'</div></span>';\n\t $main_div_title = $this->view->translate('%s likes <a href=\"javascript:void(0);\">%s.</a>', $viewerTruncatedTitle, $getStoryContentTitle);\n\t $footer_comment = '';\n\n$content_photo = '<a href=\"javascript:void(0);\">' . $content_photo . '</a><div class=\"cmad_show_tooltip\">\n\t\t\t\t\t\t\t<img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" />\n\t\t\t\t\t\t\t'. $this->view->translate(\"_sponsored_content_photo_tooltip\") .'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>';\n\t}else {\n\t $title = Engine_Api::_()->communityad()->truncation($title, $titleTruncationLimit);\n\t}\n\n\tif (empty($is_spocerdStory)) {\n\t $this->view->id = $content_data->getIdentity();\n\t $this->view->title = $title;\n\t $this->view->resource_type = $resource_type;\n\t $this->view->des = $body;\n\t $this->view->page_url = $content_data->getHref();\n\t $this->view->photo = $content_photo;\n\t $this->view->preview_title = $preview_title;\n\t $this->view->remaning_body_text = $remaning_body_limit;\n\t $this->view->remaning_title_text = $remaning_title_limit;\n\t $this->view->photo_id_filepath = $photo_id_filepath;\n\t} else {\n\t $this->view->main_div_title = $main_div_title;\n\t $this->view->photo = $content_photo;\n\t $this->view->temp_pre_title = $getStoryContentTitle; \n\t $getStoryContentTitle = str_replace(' ', '&nbsp;', $getStoryContentTitle);\n\t $this->view->preview_title = $getStoryContentTitle; \n\t $this->view->footer_comment = $footer_comment;\n\t $this->view->remaning_title_text = $remaning_title_limit;\n\t $this->view->modTitle = $field_info['module_title'];\n\t}\n }", "public function editAction()\n {\t\n $auth = Zend_Auth::getInstance();\n \tif($auth->hasIdentity())\n {\n $loginUserId = $auth->getStorage()->read()->id;\n $businessunit_id = $auth->getStorage()->read()->businessunit_id;\n $department_id = $auth->getStorage()->read()->department_id; \n $loginuserRole = $auth->getStorage()->read()->emprole;\n $loginuserGroup = $auth->getStorage()->read()->group_id;\n }\n\t \t\n $id = $this->getRequest()->getParam('id');\n try\n {\n if($id != '')\n {\n //$id = sapp_Global::_decrypt($id);\n if(is_numeric($id) && $id>0)\n {\n $app_manager_model = new Default_Model_Appraisalmanager();\n $appraisal_init_model = new Default_Model_Appraisalinit();\n $appraisalQsModel = new Default_Model_Appraisalquestions();\n $tablename = 'main_pa_questions_privileges';\n \n $appraisal_data = $appraisal_init_model->getappdata_forview($id);\n if($appraisal_data['status'] == 1 && $appraisal_data['enable_step'] == 1)\n {\n\t \t$appraisal_data['process_status'] = '';\n\t if(!empty($appraisal_data))\n\t {\n\t \tif($appraisal_data['initialize_status'] == 1)\n\t \t{\n\t \t\tif($appraisal_data['enable_step'] == 1)\n\t \t\t\t$appraisal_data['process_status'] = 'Enabled to Managers';\n\t \t\tif($appraisal_data['enable_step'] == 2)\n\t \t\t\t$appraisal_data['process_status'] = 'Enabled to Employees';\t\n\t \t}\n\t \telse if($appraisal_data['initialize_status'] == 2)\n\t \t{\n\t \t\t$appraisal_data['process_status'] = 'Initialize Later';\n\t \t}else\n\t\t\t\t\t {\n\t\t\t\t\t \t $appraisal_data['process_status'] = 'In progress';\t\n\t\t\t\t\t }\n\t }\n\t $EmpCountArr = $app_manager_model->getManagerGroupCount($id,$loginUserId);\n\t\t\t\t\t\tif(!empty($EmpCountArr))\n\t\t\t\t\t\t\t$appraisal_data['empcount'] = $EmpCountArr[0]['empcount'];\n\t $manager_groups = $app_manager_model->getManagergroups($id,$loginUserId);\n\t \n\t $questionsArr = $appraisalQsModel->getQuestionsByCategory($appraisal_data['category_id'],'');\n\t \n\t $view = $this->getHelper('ViewRenderer')->view;\n\t $view->previ_data = 'no'; \n\t $view->data = $appraisal_data;\n\t $text = $view->render('appraisalinit/view.phtml');\n\t $this->view->appraisal_id = $id;\n\t $this->view->manager_id = $loginUserId;\n\t $this->view->manager_groups = $manager_groups;\n\t $this->view->appraisal_data = $appraisal_data;\n\t $this->view->app_text = $text; \n\t $this->view->questionsArr = $questionsArr;\n }\n else\n {\n \t$this->view->ermsg = 'nodata';\n } \n\n }\n else \n {\n $this->view->ermsg = 'nodata';\n }\n }\n else\n {\n $this->view->ermsg = 'nodata';\n }\n } \n catch (Exception $ex) \n {\n $this->view->ermsg = 'nodata';\n }\n }", "public function edit()\n {\n return view(\"web_admin.books.edit\");\n }", "public function edit()\n {\n abort(404);\n }", "public function edit_action() {\n Utils\\verifyPermission($this->edit_permission);\n $this->actionHeader();\n $this->addScript('jquery.autosize-min.js');\n $this->addScript('vendor/jquery.ui.widget.js');\n $this->addScript('jquery.iframe-transport.js');\n $this->addScript('jquery.fileupload.js');\n $this->addScript('ckeditor/ckeditor.js');\n $this->renderBodyTemplate('edit');\n }", "public function editAction()\r\n {\r\n }", "protected function actionEdit() {\r\n\r\n //try 1: get the object type and names based on the current object\r\n $objInstance = class_objectfactory::getInstance()->getObject($this->getSystemid());\r\n if($objInstance != null) {\r\n $strObjectTypeName = uniSubstr($this->getActionNameForClass(\"edit\", $objInstance), 4);\r\n if($strObjectTypeName != \"\") {\r\n $strType = get_class($objInstance);\r\n $this->setCurObjectClassName($strType);\r\n $this->setStrCurObjectTypeName($strObjectTypeName);\r\n }\r\n }\r\n\r\n //try 2: regular, oldschool resolving based on the current action-params\r\n $strType = $this->getCurObjectClassName();\r\n\r\n if(!is_null($strType)) {\r\n\r\n $objEdit = new $strType($this->getSystemid());\r\n $objForm = $this->getAdminForm($objEdit);\r\n $objForm->addField(new class_formentry_hidden(\"\", \"mode\"))->setStrValue(\"edit\");\r\n\r\n return $objForm->renderForm(getLinkAdminHref($this->getArrModule(\"modul\"), \"save\".$this->getStrCurObjectTypeName()));\r\n }\r\n else\r\n throw new class_exception(\"error editing current object type not known \", class_exception::$level_ERROR);\r\n }", "public function edit(Resena $resena)\n {\n //\n }", "public function edit()\n {\n $roles = new Role();\n $account = new User();\n\n if (!$account->find($_SESSION['user'])) {\n Abort::notFound();\n }\n\n $view = new View('account/edit.twig');\n return $view->setData([\n 'roles' => $roles->get(),\n 'account' => $account->find($_SESSION['user'])\n ])->build();\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editActionGet($id) : object\n {\n $title = \"Uppdatera innehåll\";\n\n // Check if not logged in, redirect to login page\n if (!$this->app->session->get('user')) {\n return $this->app->response->redirect(\"content/login\");\n }\n\n // Prepare and execute sql-statement\n $sql = \"SELECT * FROM content WHERE id = ?;\";\n $res = $this->app->db->executeFetch($sql, [$id]);\n\n // Save resultset\n $data[\"res\"] = $res;\n\n // Add and render page to edit content\n $this->app->page->add(\"content/edit\", $data);\n return $this->app->page->render([\"title\" => $title,]);\n }", "public function viewAddResources()\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($id)\n {\n $category = Programs::all();\n $data = Actions::where(\"id\", $id)->first();\n $files = Uploads::where(\"action_id\", $id)->get();\n $problems = Problem::where(\"actions_id\", $id)->get();\n return view(\n \"admin/action/edit\",\n compact(\"category\", \"data\", \"files\", \"problems\")\n );\n }", "public static function BackDisplayEdit()\n\t{\n\t\t$Object = Object::getById(\n\t\t\t$options = array(\n\t\t\t\t'object_id'\t => Util::getvalue('id'),\n\t\t\t\t'model' => 'ArticleModel',\n\t\t\t\t'table' => ArticleModel::$table,\n\t\t\t\t'state'\t\t => false, \n\t\t\t\t'relations'\t => true,\n\t\t\t\t'multimedas' => true,\n\t\t\t\t'categories' => true\n\t\t\t)\n\t\t);\n\n\t\tif(!$Object) Application::Route(array('modulename'=>'article'));\n\t\t\n\t\t$Locations = Location::getList($parent=0);\n\n\t\tparent::loadAdminInterface();\n\t\tself::$template->setcontent($Object, null, 'object');\n\t\tself::$template->setcontext($Locations, null, 'locations');\n\t\tself::$template->add(\"article.templates.xsl\");\n\t\tself::$template->add(\"article.edit.xsl\");\n\t\tself::$template->display();\n\t}", "public function testEditGet() {\n\t\tRolesControllerTest::login($this);\n\n\t\t$this->testAction(\n\t\t\t'/rss_readers/rss_readers/edit/181',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'return' => 'contents'\n\t\t\t)\n\t\t);\n\t\t$this->assertTextEquals('edit', $this->controller->view);\n\n\t\tAuthGeneralControllerTest::logout($this);\n\t}", "public function edit($id)\n {\n $obj= Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n if($obj)\n return view('appl.'.$this->app.'.'.$this->module.'.createedit')\n ->with('stub','Update')\n ->with('obj',$obj)\n ->with('editor',true)\n ->with('app',$this);\n else\n abort(404);\n }", "public function editAction()\n {\n $module = $this->getModule();\n $config = Pi::config('', $module);\n $apps = $this->_getAppsList();\n $cases = $this->_getCasesList();\n\n $solution_apps = $data = array();\n\n if ($this->request->isPost()) {\n $data = $this->request->getPost();\n\n $id = $data['id'];\n $row = $this->getModel($module)->find($id);\n\n // Set form\n $form = new SolutionForm('solution-form');\n $form->setInputFilter(new SolutionFilter);\n $form->setData($data);\n if ($form->isValid()) {\n $values = $form->getData();\n\n if (empty($values['name'])) {\n $values['name'] = null;\n }\n if (empty($values['slug'])) {\n $values['slug'] = null;\n }\n\n $values['time_updated'] = time();\n\n // Fix upload icon url\n $iconImages = $this->setIconPath(array($data));\n\n if (isset($iconImages[0]['filename'])) {\n $values['icon'] = $iconImages[0]['filename'];\n }\n\n // Save\n $row->assign($values);\n $row->save();\n\n Pi::service('cache')->flush('module', $this->getModule());\n Pi::registry('solution', $this->getModule())->clear($this->getModule());\n Pi::registry('nav', $this->getModule())->flush();\n\n $message = _a('Solution data saved successfully.');\n\n // Try save apps.\n $apps = $data[SOLUTION_APP];\n foreach ($apps as $app) {\n $result = $this->_saveSolutionApp($id, $app);\n if ($result['message']) {\n $message .= '<li>' . $app['title'] . _a(' can\\'t save;') . '</li>';\n $message .= $result['message'];\n }\n }\n\n // Try save cases.\n $cases = $data[SOLUTION_CASE];\n foreach ($cases as $case) {\n $result = $this->_saveSolutionCase($id, $case);\n if ($result['message']) {\n $message .= '<li>' . $app['title'] . _a(' can\\'t save;') . '</li>';\n $message .= $result['message'];\n }\n }\n\n return $this->jump(array('action' => 'index'), $message);\n\n } else {\n $form_info = $this->_newSolutionForm($form, $data);\n $formGroups = $form_info['formGroups'];\n\n $data['image'] = $data['icon'];\n $json_data = json_encode($data);\n\n $message = _a('Invalid data, please check and re-submit.');\n }\n } else {\n $id = $this->params('id');\n $row = $this->getModel($module)->find($id);\n $data = $row->toArray();\n // Solution apps list.\n $solution_apps = $this->_getSolutionApps($id);\n $data[SOLUTION_APP] = $solution_apps;\n // Solution cases list.\n $solution_cases = $this->_getSolutionCases($id);\n $data[SOLUTION_CASE] = $solution_cases;\n\n $form = new SolutionForm('solution-edit-form');\n // Rebuild form.\n $form_info = $this->_newSolutionForm($form, $data);\n $form = $form_info['form'];\n $formGroups = $form_info['formGroups'];\n\n $form->setData($data);\n $form->setAttribute(\n 'action',\n $this->url('', array('action' => 'edit'))\n );\n $message = '';\n\n $rootUrl = $this->rootUrl();\n $data['image'] = $rootUrl . '/' . $data['icon'];\n $json_data = json_encode($data);\n }\n\n $this->view()->assign('formGroups', $formGroups);\n $this->view()->assign('solution_apps', $solution_apps);\n $this->view()->assign('solution_cases', $solution_cases);\n $this->view()->assign('module', $this->getModule());\n $this->view()->assign('form', $form);\n $this->view()->assign('content', $json_data);\n $this->view()->assign('title', _a('Solution Edit'));\n $this->view()->assign('message', $message);\n $this->view()->setTemplate('solution-edit');\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "public function edititemAction()\n {\n $this->defaultNoItemRoute = $this->toolboxRoute;\n\n //Run the editItem action method\n $viewList = parent::edititemAction();\n\n //Return the result\n return $viewList;\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "function edit($request){\r\n //get edit\r\n\r\n \t$obj= new $this->model;\r\n $validate=new Validator();\r\n $validate->validate($request->get,['id'=>'Requierd|Integer']);\r\n\r\n\r\n\r\n $data= $obj::find($request->get['id']);\r\n\r\n if(!$data){\r\n header(\"HTTP/1.0 404 Not Found\");\r\n if($request->UseApi())\r\n {\r\n return json_error(\"Not found item\");\r\n }\r\n\r\n return $this->view(\"Error/index\",['ErrorNumber'=>404]);\r\n }\r\n $data->mode='edit';\r\n\r\n if($request->UseApi())\r\n {\r\n return json_success(\"Getting success\",$data);\r\n }\r\n return $this->view(compact('data'));\r\n\r\n\r\n\r\n }", "public function resources(){\n\t\t$this->verify();\n\t\t$data['title']=\"Resources\";\n\t\t$data['category']=$this->admin_model->fetch_rescources_cat();\n\t\t$this->load->view('parts/head', $data);\n\t\t$this->load->view('resources/resources', $data);\n\t\t$this->load->view('parts/javascript', $data);\n\t}", "public function edit_book_resault()\n\t{\n\t\t$this->edit_book_model->editBook();\n\t\t$this->load->view('edit_book_resault');\n\t}", "public function edit($id)\n\t{\n\t\t$nontax = Employeenontaxable::find($id);\n\t\t$employees = Employee::all();\n $nontaxables = Nontaxable::all();\n $currency = Currency::find(1);\n\t\treturn View::make('employeenontaxables.edit', compact('nontax','employees','nontaxables','currency'));\n\t}", "public function edit($id) {\r\n $model = TodoItemModel::findById($id);\r\n require $this->views_folder . 'edit.php';\r\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function getEdit(){\n return view(\"admin.product.edit\" );\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 editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Ad::getAd(intval($id));\r\n\t\t$this->assign('ad_types', $this->ad_types[$info['channel_id']]);\r\n\t\t\r\n\t\tlist($info['module_id'], $info['cid']) = explode('_', $info['module_channel']);\r\n\t\t$this->assign('info', $info);\r\n\t\t\r\n\t\tif($info['channel_id'] == 2 || $info['channel_id'] == 6) {\r\n\t\t list(, $ptypes) = Type_Service_Ptype::getsBy(array('status'=>1,'pid'=>0), array('sort'=>'DESC', 'id'=>'DESC'));\r\n\t\t $this->assign('ptype', $ptypes);\r\n\t\t}\r\n\t\t\r\n\t if($info['channel_id'] == 2) {\r\n\t\t $this->assign('actions', $this->client_actions);\r\n\t\t}\r\n\r\n $this->assign('channel_id', $info['channel_id']);\r\n $this->assign('ad_type', $info['ad_type']);\r\n\r\n\t\t//module channel\r\n\t\tlist($modules, $channel_names) = Gou_Service_ChannelModule::getsModuleChannel();\r\n\t\t$this->assign('modules', $modules);\r\n\t\t$this->assign('channel_names', $channel_names);\r\n\t}", "public function edit($edit_id)\n\t{\n\n\t\t\n\t\t$this->data['_pageview'] = $this->data[\"_directory\"] . \"edit\";\n $this->data[\"edit_id\"] = $edit_id;\n\n\t\n $_USER_DETAILS \t= RolePermissions::where(\"pilot_role_id\", $edit_id);\n\t\t\n\t\t\n if ( $_USER_DETAILS -> count() <= 0 )\n {\n return GeneralHelper::show_error_page(\"404\");\n }\n\n\n \n \n\t\t$TMP_data\t\t\t\t\t\t\t\t\t\t= $_USER_DETAILS->get()->first()->toArray();\n $TMP_data['redirect_after_login']\t\t\t\t= \"\";\n\t\t\n\t\t\n\t\t$tmp_where\t\t\t\t\t\t\t\t\t\t= array('pilot_role_id'\t\t=> $edit_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 'project_id'\t\t\t=> $TMP_project_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'operation'\t\t\t\t=> 'redirect_after_login');\t\n\t\t$_redirect_to\t\t\t\t\t\t\t\t\t= RolePermissions::where( $tmp_where );\n\t\tif ( $_redirect_to -> count() > 0 )\n\t\t{\n\t\t\t$TMP_data['redirect_after_login']\t\t\t= $_redirect_to->get()->first()->directory;\n\t\t}\n\t\t\n\t\t\n \n \t$TMP_data[\"option\"]\t\t\t\t\t\t\t= \"edit\";\n\t\t$TMP_data[\"unique_formid\"]\t\t\t\t\t\t= \"\";\n\n\t\tGeneralHelper::form_fields_generator($this->data, true, $TMP_data, $this->input_fields, $this->fillable_inputs);\n $this->_create_child_for_form(true, $this->data, $_USER_DETAILS->get()->toArray() );\n\n\t\treturn view($this->constants[\"ADMINCMS_TEMPLATE_VIEW\"], $this->data);\n\t}", "public function editAction()\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 $tagNames = array();\n foreach ($model->fetchTags($photo) as $tag) {\n $tagNames[] = $tag->name;\n }\n\n $form = $model->getForm();\n $form->setAction($this->_helper->url('update', null, null, array('id' => $photo->id)));\n $form->setDefault('tags', implode(',', $tagNames));\n $form->populate($photo->toArray());\n\n $this->view->photo = $photo;\n $this->view->photoForm = $form;\n }", "public function editAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid()) {\n return;\n }\n\n //GET LISTING ID\n $listing_id = $this->_getParam('listing_id', 0);\n\n $listingtype_id = $this->_listingType->listingtype_id;\n\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n //GET VIDEO OBJECT\n $sitereview_video = Engine_Api::_()->getItem('sitereview_video', $this->_getParam('video_id'));\n\n //GET TAB ID\n $this->view->tab_selected_id = $this->_getParam('content_id');\n\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $this->view->can_edit = $canEdit = $sitereview->authorization()->isAllowed($viewer, \"edit_listtype_$sitereview->listingtype_id\");\n\n //SUPERADMIN, VIDEO OWNER AND LISTING OWNER CAN EDIT VIDEO\n if ($viewer_id != $sitereview_video->owner_id && $canEdit != 1) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n //GET NAVIGATION\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitereview_main');\n\n //FORM GENERATION\n $this->view->form = $form = new Sitereview_Form_Editvideo();\n\n //PREPARE TAGS\n $sitereviewTags = $sitereview_video->tags()->getTagMaps();\n $tagString = '';\n foreach ($sitereviewTags as $tagmap) {\n if ($tagString !== '') {\n $tagString .= ', ';\n }\n $tagString .= $tagmap->getTag()->getTitle();\n }\n $this->view->tagNamePrepared = $tagString;\n $form->tags->setValue($tagString);\n\n //IF NOT POST OR FORM NOT VALID THAN RETURN\n if (!$this->getRequest()->isPost()) {\n $form->populate($sitereview_video->toArray());\n return;\n }\n\n //IF NOT POST OR FORM NOT VALID THAN RETURN\n if (!$form->isValid($this->getRequest()->getPost())) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('Invalid data');\n return;\n }\n\n //GET FORM VALUES\n $values = $form->getValues();\n\n //PROCESS\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n $sitereview_video->setFromArray($values);\n\n // Add tags\n $tags = preg_split('/[,]+/', $values['tags']);\n $sitereview_video->tags()->setTagMaps($viewer, $tags);\n $sitereview_video->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview_video->getSlug(), 'video_id' => $sitereview_video->getIdentity(), 'user_id' => $sitereview_video->owner_id, 'content_id' => $this->view->tab_selected_id), \"sitereview_video_view_listtype_$listingtype_id\", true);\n }", "public function editAction() {\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t$model = Mage::getModel('offermanager/offermanager')->load($id);\n\n\t\tif ($model->getId() || $id == 0) {\n\t\t\t$data = Mage::getSingleton('adminhtml/session')->getFormData(true);\n\t\t\tif (!empty($data)) {\n\t\t\t\t$model->setData($data);\n\t\t\t}\n\t\t\tMage::register('offermanager_data', $model);\n\n\t\t\t$this->loadLayout();\n\t\t\t$this->_setActiveMenu('offermanager/items');\n\t\t\t$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Offer Manager'), Mage::helper('adminhtml')->__('Offer Manager'));\n\t\t\t$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Offer News'), Mage::helper('adminhtml')->__('Offer News'));\n\t\t\t$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);\n\t\t\t$this->_addContent($this->getLayout()->createBlock('offermanager/adminhtml_offermanager_edit'))\n\t\t\t\t->_addLeft($this->getLayout()->createBlock('offermanager/adminhtml_offermanager_edit_tabs'));\n\t\t\t$this->renderLayout();\n\t\t} else {\n\t\t\tMage::getSingleton('adminhtml/session')->addError(Mage::helper('offermanager')->__('Offer does not exist'));\n\t\t\t$this->_redirect('*/*/');\n\t\t}\n\t}", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n $userId = Helper::getIdFromUrl('user');\n \n $user = UserModel::load()->get($userId);\n\n return View::render('users/edit.view', [\n 'method' => 'POST',\n 'action' => '/user/' . $userId . '/update',\n 'user' => $user,\n 'roles' => RoleModel::load()->all(),\n ]);\n }", "public function edit($id){\n\t\t@$this->loadModel(\"Products\");\n $this->view->myproduct = $this->model->getById($id) ;\n\t\t$this->view->render(\"products/edit\");\n\t}", "public function executeEdit()\n {\n $this->role = RolePeer::retrieveByPk($this->getRequestParameter('id'));\n $this->forward404Unless($this->role);\n\n $this->langs = sfConfig::get('app_lang_array', array('es')); \n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EquipoBundle:CaracteristicasEquipo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find CaracteristicasEquipo entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EquipoBundle:CaracteristicasEquipo:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id, HAsistenciaR $hAsistenciaR)\n\t{\n\t\t$hAsistenciaR=$hAsistenciaR->find($id);\n\t\treturn view('hAsistenciaRs.edit', compact('hAsistenciaR'))\n\t\t\t->with( 'list', HAsistenciaR::getListFromAllRelationApps() );\n\t}", "public function edit($id) {\n\t\t//\n\t\t$categories = $this->content->meta();\n\t\t$article = $this->content->edit($id, 'article');\n\t\t//已经findOrFail处理,如果不存在该id资源会抛出异常,再加is_null判定无意义\n\t\t//is_null($article) and abort(404);\n\t\t$flags = $this->flag->index();\n\t\treturn view('back.opera.edit', ['data' => $article, 'categories' => $categories, 'flags' => $flags]);\n\t}", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function editaAction(){\n $tarefa = $this->getEm()->getRepository('MyClasses\\Entities\\Tarefa')\n ->findOneBy(array(\"id\"=>$this->Params(\"id\")));\n return new ViewModel(array(\n \"tarefa\"=>$tarefa,\n \"usuarios\"=>$this->getEm()->getRepository('MyClasses\\Entities\\AclUsuario')->findAll(),\n \"projetos\"=>$this->getEm()->getRepository('MyClasses\\Entities\\Projeto')->findAll()\n ));\n }", "public function editAction() {\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n //GET SITEREVIEW SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject();\n\n $this->view->listingtype_id = $listingtype_id = $this->_listingType->listingtype_id;\n\n $this->view->slideShowEnanle = $this->slideShowEnable($listingtype_id);\n\n $this->view->listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $this->view->listing_singular_lc = strtolower($this->_listingType->title_singular);\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n $this->view->content_id = Engine_Api::_()->sitereview()->getTabId($listingtype_id, 'sitereview.video-sitereview');\n\n //SELECTED TAB\n $this->view->TabActive = \"video\";\n\n if (!Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n $this->_helper->content\n ->setContentName(\"sitereview_videoedit_edit_listtype_$listingtype_id\")\n //->setNoRender()\n ->setEnabled();\n }\n\n //GET VIDEOS\n $this->view->type_video = $type_video = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview.show.video');\n\n if ($type_video && isset($sitereview->main_video['corevideo_id'])) {\n $this->view->main_video_id = $sitereview->main_video['corevideo_id'];\n } elseif (isset($sitereview->main_video['reviewvideo_id'])) {\n $this->view->main_video_id = $sitereview->main_video['reviewvideo_id'];\n }\n\n $this->view->videos = $videos = array();\n $this->view->integratedWithVideo = false;\n $sitevideoEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitevideo');\n if ($sitevideoEnabled && (Engine_Api::_()->getDbtable('modules', 'sitevideo')->getIntegratedModules(array('enabled' => 1, 'item_type' => \"sitereview_listing_$sitereview->listingtype_id\", 'item_module' => 'sitereview')))) {\n $params = array();\n $params['parent_type'] = $sitereview->getType() . '_' . $sitereview->listingtype_id;\n $params['parent_id'] = $sitereview->listing_id;\n $this->view->videos = $videos = Engine_Api::_()->getDbTable('videos', 'sitevideo')->getVideoPaginator($params);\n $this->view->integratedWithVideo = true;\n } else {\n if (Engine_Api::_()->sitereview()->enableVideoPlugin() && !empty($type_video)) {\n $this->view->videos = $videos = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview')->getListingVideos($sitereview->listing_id, 0, 1);\n } elseif (empty($type_video)) {\n $this->view->videos = $videos = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview')->getListingVideos($sitereview->listing_id, 0, 0);\n }\n }\n\n $allowed_upload_video = Engine_Api::_()->sitereview()->allowVideo($sitereview, $viewer, count($videos), $uploadVideo = 1);\n $this->view->upload_video = 1;\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $this->view->upload_video = $allowed_upload_video;\n } else {\n if (empty($allowed_upload_video)) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n }\n\n $this->view->count = count($videos);\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Video_Editvideo();\n\n foreach ($videos as $video) {\n\n $subform = new Sitereview_Form_Video_Edit(array('elementsBelongTo' => $video->getGuid()));\n\n if ($video->status != 1) {\n if ($video->status == 0 || $video->status == 2):\n $msg = $this->view->translate(\"Your video is currently being processed - you will be notified when it is ready to be viewed.\");\n elseif ($video->status == 3):\n $msg = $this->view->translate(\"Video conversion failed. Please try again.\");\n elseif ($video->status == 4):\n $msg = $this->view->translate(\"Video conversion failed. Video format is not supported by FFMPEG. Please try again.\");\n elseif ($video->status == 5):\n $msg = $this->view->translate(\"Video conversion failed. Audio files are not supported. Please try again.\");\n elseif ($video->status == 7):\n $msg = $this->view->translate(\"Video conversion failed. You may be over the site upload limit. Try a smaller file, or delete some files to free up space.\");\n endif;\n\n $subform->addElement('dummy', 'mssg' . $video->video_id, array(\n 'description' => $msg,\n 'decorators' => array(\n 'ViewHelper',\n array('HtmlTag', array('tag' => 'div', 'class' => 'tip')),\n array('Description', array('tag' => 'span', 'placement' => 'APPEND')),\n array('Description', array('placement' => 'APPEND')),\n ),\n ));\n $t = 'mssg' . $video->video_id;\n $subform->$t->getDecorator(\"Description\")->setOption(\"placement\", \"append\");\n }\n $subform->populate($video->toArray());\n $form->addSubForm($subform, $video->getGuid());\n }\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //GET FORM VALUES\n $values = $form->getValues();\n\n if (isset($_POST['corevideo_cover']) && !empty($_POST['corevideo_cover'])) {\n if (isset($sitereview->main_video) && !empty($sitereview->main_video)) {\n $sitereview->main_video = array_merge((array) $sitereview->main_video, array('corevideo_id' => $_POST['corevideo_cover']));\n } else {\n $sitereview->main_video = array('corevideo_id' => $_POST['corevideo_cover']);\n }\n } elseif (isset($_POST['reviewvideo_cover']) && $_POST['reviewvideo_cover']) {\n if (isset($sitereview->main_video) && !empty($sitereview->main_video)) {\n $sitereview->main_video = array_merge((array) $sitereview->main_video, array('reviewvideo_id' => $_POST['reviewvideo_cover']));\n } else {\n $sitereview->main_video = array('reviewvideo_id' => $_POST['reviewvideo_cover']);\n }\n }\n\n $sitereview->save();\n\n //VIDEO SUBFORM PROCESS IN EDITING\n foreach ($videos as $video) {\n $subform = $form->getSubForm($video->getGuid());\n\n $values = $subform->getValues();\n $values = $values[$video->getGuid()];\n if (isset($values['delete']) && $values['delete'] == '1') {\n Engine_Api::_()->getDbtable('videos', 'sitereview')->delete(array('video_id = ?' => $video->video_id, 'listing_id = ?' => $sitereview->listing_id));\n Engine_Api::_()->getDbtable('actions', 'activity')->delete(array('type = ?' => 'video_sitereview_listtype_' . $listingtype_id, 'object_id = ?' => $sitereview->listing_id));\n } else {\n $video->setFromArray($values);\n $video->save();\n }\n }\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'edit', 'listing_id' => $sitereview->listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n }", "public function editAction() {\n# process the edit form.\n# check the post data and filter it.\n\t\tif(isset($_POST['cancel'])) {\n\t\t\tAPI::Redirect(API::printUrl($this->_redirect));\n\t\t}\n\t\t$input_check = $this->_model->check_input($_POST);\n\t\tif(is_array($input_check)) {\n\t\t\tAPI::Error($input_check);\n\t\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t\t}\n\t\t// all hooks will stack their errors onto the API::Error stack\n\t\t// but WILL NOT redirect.\n\t\tAPI::callHooks(self::$module, 'validate', 'controller', $_POST);\n\t\tif(API::hasErrors()) {\n\t\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t\t}\n\n\t\t$this->_model->set_data($_POST);\n\n\t\t// auto call the hooks for this module/action\n\t\tAPI::callHooks(self::$module, 'save', 'controller');\n\n\t\tAPI::redirect(API::printUrl($this->_redirect));\n\n\n\t}", "public function render(): void\n {\n $this->prepare_items();\n $this->handleFormAction();\n $this->loadAssets();\n\n $action = $_REQUEST['action'] ?? null;\n $primaryKey = $this->model->getPrimaryColumn();\n $resourceId = $_REQUEST[$this->singular]\n ?? $this->model->{$primaryKey}\n ?? null;\n\n echo $action && in_array($action, ['edit', 'create'])\n ? $this->getFormView($resourceId)\n : $this->getDefaultView();\n\n do_action('print_resource_page_assets');\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_template()\n\t{\n\t\t// Get post ID to edit\n\t\t$edit_id = ee()->input->get_post('id');\n\n\t\t// Get template data for edit_id\n\t\t$template_data = ee()->jsonld->template(NULL, $edit_id);\n\n\t\t$this->_data['template_id'] = $template_data['id'];\n\t\t$this->_data['template_name'] = $template_data['template_name'];\n\t\t$this->_data['template_data'] = $template_data['template_text'];\n\t\t$this->_data['action_url'] = ee('CP/URL')->make('addons/settings/json_ld/resavetemplate');\n\t\t$this->_data['types'] = ee()->jsonld->types();\n\t\t$this->_data['templates'] = ee()->jsonld->templates();\n\t\t\n\t\t// Load helpers, libraries, and theme stuff\n\t\tee()->load->library('table');\n\t\tee()->cp->add_to_head('<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css\">');\n\t\tee()->cp->add_to_head('<link rel=\"stylesheet\" href=\"'.$this->theme_url.'css/app.css\" type=\"text/css\" media=\"screen\">');\n\n\t\tee()->cp->add_to_foot('<script type=\"text/javascript\">var $token = 1;</script>');\n\t\tee()->cp->add_to_foot('<script src=\"'.$this->theme_url.'js/app.js\" type=\"text/javascript\" charset=\"utf-8\"></script>');\n\t\t// Load edit form js\n\t\tee()->cp->add_to_foot('<script src=\"'.$this->theme_url.'js/load_edit_form.js\" type=\"text/javascript\" charset=\"utf-8\"></script>');\n\t\tee()->cp->add_to_foot('<script src=\"'.$this->theme_url.'js/draganddrop.js\" type=\"text/javascript\" charset=\"utf-8\"></script>');\n\n\t\t// Send data to view\n\t\treturn ee('View')->make('json_ld:edit')->render($this->_data);\n\n\t}", "public function editar()\n {\n //Pega o id a partir da URL\n $id = $this->uri->segment(3);\n\n //Se o id for nulo, redireciona para a página inicial\n if(is_null($id))\n redirect();\n\n //Utitiliza o método getById para obter as informações da empresa\n $resultado = $this->EmpresasModel->getById($id);\n\n $dados['empresaid'] = $resultado; \n\n //Carrega a tela passando os dados da consulta\n $this->load->view(\"Empresas/altera\", $dados);\n }", "public function editAction()\n {\n // project exists and the user has rights to edit it.\n $project = $this->getRequestedProject();\n if (!$project) {\n return;\n }\n\n // ensure only admin/super or project members/owners can edit the entry\n $checks = $project->hasOwners()\n ? array('admin', 'owner' => $project)\n : array('admin', 'member' => $project);\n $this->getServiceLocator()->get('permissions')->enforceOne($checks);\n\n // ensure the id in the post is the value passed in the url.\n // we don't want to risk having differing opinions.\n $this->getRequest()->getPost()->set('id', $project->getId());\n\n return $this->doAddEdit(ProjectFilter::MODE_EDIT, $project);\n }" ]
[ "0.7460722", "0.69512355", "0.68485713", "0.6796208", "0.67901796", "0.67579526", "0.67425245", "0.6713578", "0.6629987", "0.6572274", "0.6498282", "0.64602315", "0.6423282", "0.6422785", "0.6415895", "0.6414357", "0.64009565", "0.63885695", "0.63796145", "0.6374096", "0.6373489", "0.6361037", "0.6314739", "0.6312496", "0.631174", "0.63032657", "0.628961", "0.62786764", "0.62737644", "0.627167", "0.6270579", "0.62576646", "0.62557536", "0.6244578", "0.6244578", "0.62360394", "0.62098587", "0.62094676", "0.62085986", "0.62082034", "0.62057835", "0.62034357", "0.61960495", "0.6194219", "0.61925775", "0.6190134", "0.6184987", "0.6184097", "0.6178696", "0.61770916", "0.61507595", "0.61467314", "0.6125236", "0.6122501", "0.6113627", "0.6112571", "0.6112403", "0.6111517", "0.6103155", "0.60921603", "0.6070964", "0.60616696", "0.60615337", "0.6060848", "0.6059265", "0.60574365", "0.6055394", "0.60517687", "0.60482293", "0.6046539", "0.6046008", "0.60439414", "0.60435176", "0.6034611", "0.60296494", "0.6024806", "0.6023382", "0.60230833", "0.60130346", "0.60118175", "0.6010419", "0.6005451", "0.60052836", "0.600164", "0.60005164", "0.59997654", "0.59985894", "0.5996618", "0.5977823", "0.59774846", "0.5973005", "0.59685117", "0.59683603", "0.59653735", "0.5958711", "0.59562206", "0.5952809", "0.59525084", "0.5952439", "0.5946517" ]
0.8596455
0
/ postAddResource Checks to see if the user data is valid if so it will add it to the DB if the user data is invalid will reload the add user page.
public function postAddResource() { $errors = validateAddResources(); if(!($errors === true)) { $this->_f3->set('errors', $errors); echo Template::instance()->render('view/include/head.php'); echo Template::instance()->render('view/include/top-nav.php'); echo Template::instance()->render('view/edit-resources.php'); echo Template::instance()->render('view/include/footer.php'); } else { $this->_f3->reroute('/Admin'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function post_add_users() {\n\t}", "public function action_add()\r\n\t{\r\n\t\tif ( Request::current()->method() == Request::POST )\r\n\t\t{\r\n\t\t\treturn $this->_add();\r\n\t\t}\r\n\t\t\r\n\t\t$this->template->title = __('Add user');\r\n\t\t$this->breadcrumbs\r\n\t\t\t->add($this->template->title);\r\n\r\n\t\t// check if user have already enter something\r\n\t\t$data = Flash::get( 'post_data', array() );\r\n\r\n\t\t$user = new User( $data );\r\n\r\n\t\t$this->template->content = View::factory( 'user/edit', array(\r\n\t\t\t'action' => 'add',\r\n\t\t\t'user' => $user,\r\n\t\t\t'permissions' => Model_Permission::get_all()\r\n\t\t) );\r\n\t}", "public function add()\n {\n $this->request->allowMethod(['post']);\n\n $user = $this->Users->newEmptyEntity();\n\n if ($this->request->is('post')) {\n $user = $this->Users->patchEntity($user, $this->request->getData());\n\n if (!$this->Users->save($user)) {\n throw new ValidationErrorException($user);\n }\n }\n\n $this->set('data', $user);\n }", "public function add(){\n\t\t// if we got a post information, do add else do nothing\n\t\tif($this->request->is('post')){\n\t\t\t$this->User->create();\n\t\t\tif($this->User->save($this->request->data)){\n\t\t\t\t// if the information is successfully saved\n\t\t\t\t$this->Session->setFlash(__('Congratulation, the user has been created.'));\n\t\t\t\t$this->redirect(array('controller'=>'jobs', 'action'=>'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Sorry, the user can not be created.'));\n\t\t\t}\n\t\t}\n\t}", "public function add() {\n $user = $this->Users->newEntity();\n if ($this->request->is('post')) {\n $user = $this->Users->patchEntity($user, $this->request->data);\n if ($this->Users->save($user)) {\n $this->Flash->success(__('The user has been saved.'));\n \n return $this->redirect(['action' => 'login']);\n } else {\n $this->Flash->error(__('The user could not be saved. Please, try again.'));\n }\n }\n \n $this->set(compact('user'));\n $this->set('_serialize', ['user']);\n }", "public static function addUser()\n {\n // ADD NEW DATA TO A TABLE\n // MAKE SURE TO SEND USERS TO THE /users page when a user is added\n }", "function add() {\n $this->layout = \"no_header\";\n if (!empty($this->data)) {\n if ($this->User->save($this->data)) {\n $this->Session->setFlash(\"Your account has been created successfully\");\n $this->go_back(\"login\");\n }\n }\n }", "public function createUser(){\n $post = $this->_app->request->post();\n \n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-create.json\");\n \n // Get the alert message stream\n $ms = $this->_app->alerts; \n \n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_account')){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n\n // Set up Fortress to process the request\n $rf = new \\Fortress\\HTTPRequestFortress($ms, $requestSchema, $post); \n \n // Sanitize data\n $rf->sanitize();\n \n // Validate, and halt on validation errors.\n $error = !$rf->validate(true);\n \n // Get the filtered data\n $data = $rf->data(); \n \n // Remove csrf_token, password confirmation from object data\n $rf->removeFields(['csrf_token, passwordc']);\n \n // Perform desired data transformations on required fields. Is this a feature we could add to Fortress?\n $data['user_name'] = strtolower(trim($data['user_name']));\n $data['display_name'] = trim($data['display_name']);\n $data['email'] = strtolower(trim($data['email']));\n $data['active'] = 1;\n \n // Check if username or email already exists\n if (UserLoader::exists($data['user_name'], 'user_name')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_USERNAME_IN_USE\", $data);\n $error = true;\n }\n\n if (UserLoader::exists($data['email'], 'email')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_EMAIL_IN_USE\", $data);\n $error = true;\n }\n \n // Halt on any validation errors\n if ($error) {\n $this->_app->halt(400);\n }\n \n // Get default primary group (is_default = GROUP_DEFAULT_PRIMARY)\n $primaryGroup = GroupLoader::fetch(GROUP_DEFAULT_PRIMARY, \"is_default\");\n \n // Set default values if not specified or not authorized\n if (!isset($data['locale']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"locale\"]))\n $data['locale'] = $this->_app->site->default_locale;\n \n if (!isset($data['title']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"title\"])) {\n // Set default title for new users\n $data['title'] = $primaryGroup->new_user_title;\n }\n \n if (!isset($data['primary_group_id']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"primary_group_id\"])) {\n $data['primary_group_id'] = $primaryGroup->id;\n }\n \n // Set groups to default groups if not specified or not authorized to set groups\n if (!isset($data['groups']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"groups\"])) {\n $default_groups = GroupLoader::fetchAll(GROUP_DEFAULT, \"is_default\");\n $data['groups'] = [];\n foreach ($default_groups as $group_id => $group){\n $data['groups'][$group_id] = \"1\";\n }\n }\n \n // Hash password\n $data['password'] = Authentication::hashPassword($data['password']);\n \n // Create the user\n $user = new User($data);\n\n // Add user to groups, including selected primary group\n $user->addGroup($data['primary_group_id']);\n foreach ($data['groups'] as $group_id => $is_member) {\n if ($is_member == \"1\"){ \n $user->addGroup($group_id); \n }\n }\n \n // Store new user to database\n $user->store(); \n \n // Success message\n $ms->addMessageTranslated(\"success\", \"ACCOUNT_CREATION_COMPLETE\", $data);\n }", "public function admin_add() {\n if ($this->isAuthorized()) {\n if ($this->request->is('post')) {\n $this->User->create();\n if ($this->User->save($this->request->data)) {\n $this->Session->setFlash(__('The user has been created'));\n return $this->redirect(array(\n 'action' => 'index',\n ));\n } else {\n $this->Session->setFlash(__('The user could not be created. Please, try again.'));\n }\n }\n } else {\n $this->Session->setFlash(__('You do not have permission to do this'));\n return $this->redirect(array(\n 'action' => 'admin_dashboard',\n ));\n }\n }", "public function add() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The user has been saved'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t} else {\n\t\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t\t$lookupSupported = isset($queryURL) && \"\" <> $queryURL;\r\n\t\t\t$this->set('lookupSupported', $lookupSupported);\n\t\t\t$this->set('userType', $user['User']['type']);\n\t\t}\n\t}", "public function add(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['role'] = 'user';\n\t\t\tif($this->User->save($this->request->data))\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario creado');\n\t\t\t\treturn $this-redirect(array('action' =>'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario no creado');\n\t\t\t}\n\t\t}\n\n\t}", "public function add()\n\t{\n\t\t// TODO\n\t\t// if(user has permissions){}\n\t\t$this -> loadModel('User');\n\t\tif($this -> request -> is('post') && !$this -> User -> exists($this -> request -> data['SgaPerson']['user_id']))\n\t\t{\n\t\t\t$this -> Session -> setFlash(\"Please select a valid JacketPages user to add.\");\n\t\t\t$this -> redirect(array('action' => 'index',$id));\n\t\t}\n\t\t$this -> loadModel('User');\n\t\tif ($this -> request -> is('post'))\n\t\t{\n\t\t\t$this -> SgaPerson -> create();\n\t\t\tif ($this -> SgaPerson -> save($this -> data))\n\t\t\t{\n\t\t\t\t$user = $this -> User -> read(null, $this -> data['SgaPerson']['user_id']);\n\t\t\t\t$this -> User -> set('level', 'sga_user');\n\t\t\t\t$this -> User -> set('sga_id', $this -> SgaPerson -> getInsertID());\n\t\t\t\t$this -> User -> save();\n\t\t\t\t$this -> Session -> setFlash(__('The user has been added to SGA.', true));\n\t\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> Session -> setFlash(__('Invalid user. User may already be assigned a role in SGA. Please try again.', true));\n\t\t\t}\n\t\t}\n\t}", "public function addUserAction()\n\t{\n\t\t$user = new User();\n\n\t\t$form = $this->createForm(new UserType, $user);\n\t\t\n\t\t$request = $this->get('request');\n\n\t\tif ($request->getMethod() == 'POST') {\n\t\t\t$form->bind($request);\n\n // Checking the validity of the submission\n\t\t\tif ($form->isValid()) {\n\t\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t\t$em->persist($user);\n\t\t\t\t$em->flush();\n\n // Redirection to the homepage of Bundle\n\t\t\t\treturn $this->redirect($this->generateUrl('valentin_films_manager_index'));\n\t\t\t}\n\t\t}\n\t\treturn $this->render('ValentinFilmsManagerBundle:Manager:addUser.html.twig', array(\n\t\t\t'form' => $form->createView(),\n\t\t\t));\n\t\t\n\t}", "public function addUser()\n {\n $categoryList = $this->itemModel->getCategories();\n\n //Check that register button exists and was clicked\n if (isset($_POST[\"user_submit\"])) { \n\n //Insert new row in Account and setting the User's name in database using values inputted in the HTML form\n $username = $_POST['username']; \n\n $newly_registered_account_id = $this->accountModel->registerAccount($username,$_POST[\"password\"],$_POST[\"sfsu_id\"]);\n\n $this->userModel->setUser($newly_registered_account_id,$_POST[\"firstname\"], \n $_POST[\"lastname\"],$_POST[\"country\"],$_POST[\"state\"],\n $_POST[\"address\"],$_POST[\"city\"],$_POST[\"zipcode\"],$_POST[\"phoneNumber\"]);\n\n } else {\n echo '<script language=\"javascript\">';\n echo 'alert(\"accounts.php registerUser bad.\")';\n echo '</script>';\n }\n\n header('location: ' . URL . 'home/index');\n }", "public static function addUser()\r\n { \r\n $app = \\Slim\\Slim::getInstance();\r\n $request = (object)$app->request->post();\r\n //validate input\r\n $validata = $app->validata;\r\n $validator = $validata::key('email', $validata::email()->notEmpty())\r\n ->key('first_name', $validata::stringType()->notEmpty())\r\n ->key('last_name', $validata::stringType()->notEmpty())\r\n ->key('password', $validata::stringType()->notEmpty())\r\n ->key('company', $validata::intVal())\r\n ->key('city', $validata::stringType()->notEmpty())\r\n ->key('province', $validata::stringType()->notEmpty())\r\n ->key('zip_code', $validata::stringType()->notEmpty())\r\n ->key('address', $validata::stringType()->notEmpty());\r\n $errors = array();\r\n try{\r\n $validator->assert((array) $request);\r\n } catch (\\InvalidArgumentException $e) {\r\n $errors = $e->findMessages(array(\r\n 'email' => '{{name}} must be a valid email',\r\n 'first_name' => '{{name}} is required',\r\n 'last_name' => '{{name}} is required',\r\n 'password' => 'Password is required',\r\n 'company' => 'Company is required',\r\n 'city' => 'City is required',\r\n 'province' => 'State/Province is required',\r\n 'address' => 'Address is required',\r\n 'zip_code' => 'Zipcode is required'\r\n ));\r\n }\r\n\r\n if ($validator->validate((array)$request)) {\r\n if(!PasswordController::isValid($request->password,$request->email)){\r\n $app->halt('400',json_encode(\"Password Formart Wrong\"));\r\n }\r\n \r\n if(!Company::find($request->company)){\r\n $app->halt('400',json_encode(\"Company does not exist\"));\r\n }\r\n if (self::isExist($request->email)){\r\n $app->response->setStatus(400);\r\n return json_encode(\"Email already taken\");\r\n }\r\n\r\n $user = new User;\r\n //$user->name = $request->name;\r\n $user->email = $request->email;\r\n $user->password = PasswordController::encryptPassword($request->password);\r\n $user->first_name = $request->first_name;\r\n $user->last_name = $request->last_name;\r\n if(isset($request->phone))$user->phone = $request->phone;\r\n $user->city = $request->city;\r\n $user->address = $request->address;\r\n $user->province = $request->province;\r\n $user->zip_code = $request->zip_code;\r\n $user->country = $request->country;\r\n $user->active = 0;\r\n $user->save();\r\n $app->response->setStatus(200);\r\n\r\n //send confirm email\r\n if ($user->id) {\r\n $user->companies()->attach($request->company);\r\n $link = WEBSITELINK.'/'.self::$active_api.openssl_encrypt ($user->id, 'AES-256-CBC', self::$pass, 0, self::$iv);\r\n EmailController::newUserConfirmation($user->id,$request->password,$link);\r\n }\r\n return $user->id;\r\n } else {\r\n $app->response->setStatus(400);\r\n $return = [];\r\n foreach (array_values($errors) as $key => $error) {\r\n if($error!=\"\") \r\n array_push($return,array(\"code\"=>$key,\"data\"=>$error));\r\n }\r\n return json_encode($return);\r\n }\r\n\r\n }", "function __addUser()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //flow control\n $next = true;\n\n if (!isset($_POST['submit'])) {\n //redirect to 'view' url instead\n $this_url = uri_string();\n $redirect = str_replace('add-user', 'view', $this_url);\n redirect($redirect);\n }\n\n //validate form & display any errors\n $validation = $this->__flmFormValidation('add_user');\n if (!$validation) {\n //show error\n $this->notices('error', $this->form_processor->error_message, 'html');\n //halt\n $next = false;\n }\n\n //add to database\n if ($next) {\n $new_users_id = $this->users_model->addUser($this->client_id);\n $this->data['debug'][] = $this->users_model->debug_data;\n\n //was adding successful\n if (!$new_users_id) {\n //show error\n $this->notices('error', $this->data['lang']['lang_request_could_not_be_completed'], 'html');\n //halt\n $next = false;\n }\n }\n\n //update primary contact if selected\n if ($next) {\n if ($this->input->post('client_users_main_contact') == 'on') {\n $this->users_model->updatePrimaryContact($this->client_id, $new_users_id);\n $this->data['debug'][] = $this->users_model->debug_data;\n }\n }\n\n //all is ok\n if ($next) {\n //success\n $this->notices('success', $this->data['lang']['lang_request_has_been_completed'], 'noty');\n\n /*EMAIL - send user an email*/\n $this->__emailer('new_user');\n\n /*EMAIL - send admin notifications*/\n $this->__emailer('admin_notification_new_user');\n\n } else {\n $this->notices('error', $this->data['lang']['lang_request_could_not_be_completed'], 'html');\n }\n\n //load user page\n $this->__clientUsers();\n }", "function admin_add_user()\n{\n global $app;\n\n $user_data = $app->request()->post();\n $app->getLog()->debug('admin_add_user: ' . var_export($user_data, true));\n try {\n $user = $app->bbs->addUser($user_data['username'], $user_data['password']);\n } catch (Exception $e) {\n $app->getLog()->error('admin_add_user: error for adding user ' . var_export($user_data, true));\n $app->getLog()->error('admin_add_user: exception ' . $e->getMessage());\n $user = null;\n }\n $resp = $app->response();\n if (isset($user) && !is_null($user)) {\n $resp->status(200);\n $msg = getMessageString('admin_modified');\n $answer = json_encode(['user' => $user->getProperties(), 'msg' => $msg]);\n $resp->header('Content-type', 'application/json');\n } else {\n $resp->status(500);\n $resp->header('Content-type', 'text/plain');\n $answer = getMessageString('admin_modify_error');\n }\n $resp->header('Content-Length', strlen($answer));\n $resp->body($answer);\n}", "public function addAction() {\n $form = new Admin_Form_CreateAdminUser();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $values = $form->getValues();\n $adminMapper = new Application_Model_Table_AdminUsers();\n $userFound = $adminMapper->fetchByUsername($values['username']);\n if(!$userFound){\n $values['is_active'] = 1;\n $values['is_admin'] = 1;\n $adminUser = $adminMapper->createRow($values);\n $adminUser->hashPassword($values['new_password']);\n $adminUser->save();\n $this->_helper->FlashMessenger->addMessage('The user has been created' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-users', true);\n } else {\n $this->view->messages['error'] = \"This username already exists\";\n }\n }\n }\n $this->view->form = $form;\n }", "public function addAction() {\r\n\t\tif ($this->request->isPost ()) {\r\n\t\t\t$user = new Users ();\r\n\t\t\t$user->firstname = $this->request->get ( \"first_name\" );\r\n\t\t\t$user->lastname = $this->request->get ( \"last_name\" );\r\n\t\t\t$user->bithday = $this->request->get ( \"date\" );\r\n\t\t\t$user->save ();\r\n\t\t}\r\n\t}", "protected function _addUser($data = null){\n $this->tempData['User'] = $data['User'];\n unset($this->tempData['User']['id']);\n if($this->tempData['User']) {\n return array('success' => true);\n } else {\n return array('success' => false);\n }\n }", "public function addUserAction()\n {\n $form = new Application_Form_UserEdit();\n $this->view->form = $form;\n\n if ($this->getRequest()->isPost())\n {\n $formData = $this->getRequest()->getPost();\n if ($form->isValid($formData))\n {\n $username = $form->getValue('username');\n $password = $form->getValue('password');\n $role = $form->getValue('role');\n $first_name = $form->getValue('first_name');\n $last_name = $form->getValue('last_name');\n $email = $form->getValue('email'); \n $user = new Application_Model_DbTable_Users();\n $user->addUser($username, $password, $first_name,\n $last_name, $email, $role);\n $this->_helper->redirector('index', 'index');\n }\n else\n {\n $form->populate($formData);\n }\n }\n }", "public function addUser($data)\n{\n\t$this->insert($data);\n}", "public function ajaxUserAdd() {\n if (!empty($_POST)) {\n $username = $_POST['username'];\n $password = $_POST['password'];\n $password_second = $_POST['password_second'];\n /** @var User $user */\n foreach ($this->entityManager->getRepository('Entity\\\\User')->findAll() as $user) {\n if (strtolower($user->getUsername()) == strtolower($username)) {\n header('HTTP/1.0 409 Conflict');\n echo 'Username already taken';\n exit();\n }\n }\n if ($password == $password_second) {\n $user = new User();\n $user->setUsername($username);\n $user->setPassword(password_hash($password, PASSWORD_ARGON2ID));\n\n $this->entityManager->persist($user);\n $this->entityManager->flush();\n\n $user_data = [\n 'id' => $user->getId(),\n 'username' => $user->getUsername(),\n ];\n header('HTTP/1.0 200 OK');\n header('Content-Type: application/json');\n echo json_encode($user_data);\n } else {\n header('HTTP/1.0 418 Password');\n echo 'Passwords should be the same';\n exit();\n }\n } else {\n header('HTTP/1.0 400 Bad Request');\n echo 'Post Data is empty';\n exit();\n }\n }", "public function addAction()\n {\n $viewModel = new ViewModel(['title' => 'add a user']);\n // if they are trying to add a user account for an existing person...\n $person_id = $this->params()->fromRoute('id');\n // or if there's no person_id route parameter...\n if (! $person_id && isset($this->params()->fromPost()['user'])) {\n // try post parameters\n $user = $this->params()->fromPost()['user'];\n if (isset($user['person']) && ! empty($user['person']['id'])) {\n $person_id = $user['person']['id'];\n }\n }\n $options = [\n 'action' => 'create',\n 'auth_user_role' => $this->auth_user_role,\n 'constrain_email' => true,\n ];\n\n if ($person_id) {\n /** @todo better db efficiency... */\n $person = $this->entityManager\n ->find('InterpretersOffice\\Entity\\Person', $person_id);\n if (! $person) {\n return $viewModel->setVariables(\n ['errorMessage' => \"person with id $person_id not found\"]\n );\n }\n $options['existing_person'] = $person;\n } else {\n $person = null;\n }\n $form = new UserForm($this->entityManager, $options);\n $user = new Entity\\User();\n if ($person) {\n $this->events->trigger(\n 'load-person',\n $this,\n compact('person', 'form')\n );\n $user->setPerson($person);\n $form->get('user')->get('person')->setObject($person);\n }\n\n $form->bind($user);\n $viewModel->form = $form;\n $request = $this->getRequest();\n\n if ($request->isPost()) {\n $form->setData($request->getPost());\n if (! $form->isValid()) {\n return new JsonModel(['status' => 'error',\n 'validation_errors' => $form->getMessages()]);\n }\n $user->setCreated(new \\DateTime());\n $this->entityManager->persist($user);\n if (! $person_id) {\n $this->entityManager->persist($user->getPerson());\n }\n // we could do this in the model instead, with lifecycle callback (?)\n $user->setPassword(bin2hex(openssl_random_pseudo_bytes(8)));\n $this->entityManager->flush();\n $person = $user->getPerson();\n $this->flashMessenger()->addSuccessMessage(\n sprintf(\n 'A user account has been created for %s <strong>%s %s</strong>.',\n $user->getRole(),\n $person->getFirstName(),\n $person->getLastname()\n )\n );\n return new JsonModel(['status' => 'success','validation_errors' => null]);\n }\n\n return $viewModel;\n }", "protected function _post_validate ($obj)\n {\n parent::_post_validate ($obj);\n\n if (sizeof ($this->_errors) == 0)\n {\n if (! $this->object_exists () || $this->app->user_options->users_can_change_name)\n {\n $name = $this->value_for ('title');\n if (empty ($obj->title) || (strcasecmp ($obj->title, $name) != 0))\n {\n // new user or name has been changed\n\n $user_query = $this->app->user_query ();\n $existing_user = $user_query->object_at_name ($name);\n\n // see if there is a user with that name\n\n if ($existing_user)\n {\n $this->record_error ('title', \"Someone is already using that name.\");\n }\n }\n }\n\n if (! $obj->exists ())\n {\n $password1 = $this->value_for ('password1');\n $password2 = $this->value_for ('password2');\n if (strcasecmp ($password1, $password2))\n {\n $this->record_error ('password2', \"Please make sure the passwords are the same.\");\n }\n }\n }\n }", "public function postRegister()\n {\n if ($this->request->is('post')) {\n $input = $this->request->getData();\n $validate = $this->Client->newEntity($input);\n\n if ($validate->errors()) {\n $this->set($validate->errors());\n } else {\n $this->Client->insert($input);\n $this->Flash->success('Sign up success');\n }\n $this->register();\n }\n }", "public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function add(){\n Auth::checkUserLogin();\n\t\t// Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('Add', 'Users');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = '';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Users';\n\t\t// Set Page Sub Section\n\t\t$this->_view->pageSubSection = 'Add';\n\n $this->_view->error = array();\n\n // If Form has been submitted process it\n\t\tif(!empty($_POST)){\n //if user selected cancel\n if(!empty($_POST['cancel'])){\n\t\t\t Url::redirect('users/index');\n\t\t }\n\n // Create new user\n $createData = $this->_model->createData($_POST);\n if(isset($createData['error']) && $createData['error'] != null){\n foreach($createData['error'] as $key => $error){\n $this->_view->error[$key] = $error;\n }\n }else{\n $this->_view->flash[] = \"User added successfully.\";\n Session::set('backofficeFlash', array($this->_view->flash, 'success'));\n Url::redirect('users/index');\n }\n\t\t}\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('users/add', 'layout');\n\t}", "public function addUser(){}", "public function addUser( $userdata ) {\r\n /* $userdata = [\r\n [ProductCode] => IG7985\r\n [ClientMemberID] => R27586351\r\n [FirstName] => TEST\r\n [LastName] => MURRAY\r\n [Address] => Abb\r\n [City] => Abbivlie\r\n [State] => AL\r\n [Zipcode] => 36310\r\n [Phone] => 3017874905\r\n [Email] => [email protected]\r\n [DOB] => 1938-02-19\r\n [Gender] => M\r\n [RepID] => E104509\r\n [ocenture] => stdClass Object\r\n (\r\n [Status] => Account Created\r\n [ClientMemberID] => R27586351\r\n [MembershipID] => 111849849\r\n [ProductCode] => IG7985\r\n )\r\n ]\r\n */\r\n Logger::log(\"Adding ocenture user to db\"); \r\n\r\n $ocentureData = $userdata['ocenture'];\r\n //ocenture sends us following in case of error, please note spelling of error, it should be Error but it is Erorr from Ocenture.\r\n /*\r\n stdClass::__set_state(array(\r\n 'Status' => 'Erorr',\r\n 'Erorr' => 'DuplicateRecordFault',\r\n ))\r\n */\r\n \r\n if ($ocentureData->Status != 'Erorr') \r\n {\r\n try {\r\n\r\n //insert new user as post \r\n $postId = wp_insert_post([\r\n 'post_title' => \"[{$ocentureData->MembershipID} - {$ocentureData->ProductCode}] {$userdata['FirstName']} {$userdata['LastName']}\", \r\n 'post_type'=>'ocenture',\r\n 'post_status' => 'publish',\r\n ]);\r\n\r\n //adding user meta, to avoid it showing as custom fields \r\n add_post_meta($postId, '_membership_id', $ocentureData->MembershipID);\r\n add_post_meta($postId, '_product_code', $ocentureData->ProductCode);\r\n add_post_meta($postId, '_status', $ocentureData->Status == 'Account Created' ? 1 : 0);\r\n add_post_meta($postId, '_client_member_id', $ocentureData->ClientMemberID); //youngevity id\r\n\r\n add_post_meta($postId, '_rep_id', $userdata['RepID']); \r\n add_post_meta($postId, '_fname', $userdata['FirstName']);\r\n add_post_meta($postId, '_lname', $userdata['LastName']);\r\n add_post_meta($postId, '_email', $userdata['Email']);\r\n add_post_meta($postId, '_phone', $userdata['Phone']);\r\n add_post_meta($postId, '_address', $userdata['Address']);\r\n add_post_meta($postId, '_city', $userdata['City']);\r\n add_post_meta($postId, '_state', $userdata['State']);\r\n add_post_meta($postId, '_zip', $userdata['Zipcode']);\r\n add_post_meta($postId, '_date', time());\r\n\r\n Logger::log(\"Ocenture user added to db, post_id : $postId\");\r\n \r\n } catch (Exception $e) {\r\n\r\n }\r\n }\r\n }", "public function doRegister()\n {\n\n //check if all the fields are 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 based on filled data\n $userEntity = new User(Request::postData());\n\n //check if the user exists and get it as entity if exists\n if ($this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username/email already exists!\", \"type\" => \"error\")));\n exit;\n }\n\n //add the user into DB\n $this->repository->addUser($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"Your account has been created!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }", "public function add()\n {\n $storedPassword = password_hash($_POST['password'], PASSWORD_DEFAULT);\n\n $data = [];\n $data['username'] = $_POST[\"username\"];\n $data['password'] = $storedPassword;\n $data['email'] = $_POST['email'];\n $data['profile_picture'] = $_FILES['profile']['tmp_name'];\n $data['mime'] = $_FILES['profile']['type'];\n $data['phone_num'] = $_POST['phone-number'];\n\n if ($this->model('User')->addNewUser($data) > 0) {\n $this->redirect(BASE_URL . \"/home/index/{$data['username']}\");\n }\n }", "public function registerUserAction() {\n\t\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\t\tif ($request->isPost()) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// get the json raw data\n\t\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t\t$http_raw_post_data = '';\n\t\t\t\t\n\t\t\t\twhile (!feof($handle)) {\n\t\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t\t}\n\t\t\t\tfclose($handle); \n\t\t\t\t\n\t\t\t\t// convert it to a php array\n\t\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\n\t\t\t\t//echo json_encode($json_data);\n\t\t\t\t\n\t\t\t\tif (is_array($json_data)) {\n\t\t\t\t\t// convert it back to json\n\t\t\t\t\t\n\t\t\t\t\t// write the user back to database\n\t\t\t\t\t$registered = Application_Model_User::registerUser($json_data);\n\t\t\t\t\t\n\t\t\t\t\tif($registered) {\n\t\t\t\t\t\techo json_encode($registered);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\techo 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t}", "function addUser(){\n\t$conn = db_connect();\n\n\tif(isset($_GET['id']) && (int)$_GET['id'] > 0){#proper data must be on querystring\n\t\t$myID = (int)$_GET['id']; #Convert to integer, will equate to zero if fails\n\t}\n \n\tif(isset($_POST['firstname'])){$firstName=$_POST['firstname'];}else{$firstName = '';}\n if(isset($_POST['lastName'])){$lastName=$_POST['lastName'];}else{$lastName = '';}\n if(isset($_POST['userPhone'])){$userPhone=$_POST['userPhone'];}else{$firstName = '';}\n if(isset($_POST['userEmail'])){$userEmail=$_POST['userEmail'];}else{$lastName = '';}\n if(isset($_POST['type'])){$type=$_POST['type'];}else{$type = '';}\n \n if(strlen($firstName) >=3)#check if users last name is smaller than 3 characters\n { \n $userName = substr($firstName,0,3) . substr($lastName,0,2);\n }else{#if first name is shorter use as is for username\n $userName = $firstName . substr($lastName,0,2);\n }\n $userName = strtolower($userName); #format users name to site standards\n $userPW = $userName; #default pw is userName\n \n\t$sql = \"INSERT INTO users(FirstName,LastName,PhoneNumber,EmailAddress,TypeId,UserName,UserPassword) VALUES('%s','%s','%s','%s',%d,'%s','%s')\";\n\t$sql = sprintf($sql,$firstName,$lastName,$userPhone,$userEmail,$type,$userName,$userPW);\n\t$result = mysqli_query($conn,$sql); \n\n\tif ($result)\n\t{#successful update!\n\t\t$newURL = 'list.php';\n\t}else{\n\t\t$newURL = 'add.php';\n\t}\n\theader('Location: '.$newURL);\n\tdie();\n}", "public function addResourceUserAction(Request $request, $userId)\n {\n\n $em = $this->getDoctrine()->getManager();\n $form = $request->get(\"form\");\n $base = $this->getBaseById(intval($form['base']));\n $resource = new Resource();\n $baseId = strval($form['base']);\n\n if ($em->getRepository('GrtResBundle:Resource')->getFindUserBase($baseId,$userId)){\n $this->addFlash('warning', $this->get('translator')->trans('Base already exist!'));\n return $this->redirect($this->generateUrl('grt_user_show',array('userId' => $userId)));\n }\n\n //$form = $this->createForm(ResourceType::class, $resource);\n $formRes = $this->createFormBuilder($resource);\n\n $fields = explode(\",\", $base->getFields());\n foreach ($fields as $field){\n if ($field == 'term'){\n $formRes->add('term', DateType::class, array('label' => 'Срок действия(YYYY-MM-DD)',\n 'widget' => 'single_text','format' => 'yyyy-mm-dd','attr'=> array('class'=>'input-group date form-control')));\n } else {\n $formRes->add($field,TextType::class, array('label' => $field,'attr'=> array('class'=>'form-control')));\n }\n }\n\n\n return $this->render('GrtResBundle:Resource:form.html.twig', array(\n 'form' => $formRes->getForm()->createView(),\n 'userId' => $userId,\n 'baseId' => $baseId,\n\n ));\n }", "public function add_user() {\n try {\n //Retrieve user details.\n if (filter_has_var(INPUT_POST, 'username') && filter_has_var(INPUT_POST, 'password') && filter_has_var(INPUT_POST, 'firstname') && filter_has_var(INPUT_POST, 'lastname')) {\n $firstname = trim(filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING));\n $lastname = trim(filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING));\n $username = trim(filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING));\n $password = trim(filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING));\n }\n\n if ($firstname == \"\" || $lastname == \"\" || $username == \"\" || $password == \"\") {\n throw new DataMissingException(\"Please fill in all fields.\");\n }\n //Hash password.\n $hashed_password = password_hash($password, PASSWORD_DEFAULT);\n\n //Add user details to database.\n $sql = \"INSERT INTO \" . $this->tblUser . \" VALUES (NULL, 2, '$firstname', '$lastname', '$username', '$hashed_password')\";\n\n\n //Execute the insert query.\n $query = $this->dbConnection->query($sql);\n\n //If the query failed, return false. \n if (!$query) {\n throw new DatabaseException(\"There was an error adding the user.\");\n }\n //Return true if successful.\n return true;\n } catch (DataMissingException $e) {\n return $e->getMessage();\n } catch (DatabaseException $e) {\n return $e->getMessage();\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "public function add(){\n\t\t// Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('Add', 'Users');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = '';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Users';\n\t\t// Set Page Sub Section\n\t\t$this->_view->pageSubSection = 'Users';\n\n\t\t// Set default variables\n\t\t$this->_view->error = array();\n\n\t\t$userTypes = explode(',', USERS);\n $userTypesStore = array_pop($userTypes);\n\t\t$this->_view->userTypes = $userTypes;\n\n // If Form has been submitted process it\n\t\tif(!empty($_POST)){\n //if user selected cancel\n if(!empty($_POST['cancel'])){\n Url::redirect('backoffice/users/index');\n }\n $_POST['salt'] = null;\n\n if(!isset($_FILES) || empty($_FILES['image']['name'])){\n $_POST['image'] = null;\n }else{\n $this->uploadFile($_FILES);\n }\n\n // Create new user\n $createData = $this->_model->createData($_POST);\n if(isset($createData['error']) && $createData['error'] != null){\n foreach($createData['error'] as $key => $error){\n $this->_view->error[$key] = $error;\n }\n }else {\n $this->_view->flash[] = \"User added successfully.\";\n Session::set('backofficeFlash', array($this->_view->flash, 'success'));\n Url::redirect('backoffice/users/');\n }\n\t\t}\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('users/add', 'layout', 'backoffice');\n\t}", "public function add($id=null){\n \t$this->layout = 'largeLayout';\n \t\n if($this->request->is('post')){\n $this->User->create();\n\n //Add missing data on the request object before save to the database\n //Set default user role when register is: author.\n $this->request->data['User']['role']= 'author';\n\n // Set default user status is: 1(actived) 1(deleted)\n $this->request->data['User']['status'] = 1;\n\n //Set default user ban status is: 0 (actived) 1(banned)\n $this->request->data['User']['banned'] = 0;\n\n //If user is not submit an avatar then set avatar to default\n // if(isset($this->request->data['User']['avatar'])){\n // $this->request->data['User']['avatar']='avatar.png';\n // $this->request->data['User']['avatar_dir']='default';\n // }\n\n if($this->User->save($this->request->data)){\n\n $this->Session->setFlash(__('User have been saved'));\n $this->redirect(array('action'=>'login'));\n\n } else {\n $this->Session->setFlash(__('User cannot be saved'));\n }\n\n }\n\n }", "function admin_insert_new_user(){\r\n\t\tif(isset($_POST['doctor_create_user'])){\r\n\t\t\t$result['insert_new_user_data'] = $this->model->insert_new_user();\r\n\t\t\tredirect('Doctor_control/admin_create_new_user'); \r\n\t\t}\r\n\t\tif(isset($_POST['doctor_update_user'])){\r\n\t\t\tif($this->model->update_new_user_record()){\r\n\t\t\t\tredirect('Doctor_control/admin_create_new_user'); \r\n\t\t\t} \r\n\t\t} \r\n\t}", "function add() {\n RR_Session::start();\n $get = RR_Session::get('loggedin');\n if ($get == true) {\n // blijf op de pagina\n // en laad de admin view\n $this->validateUser(true, 'newuser');\n } else {\n // anders redirect trug naar de login pagina\n $this->validateUser(false);\n }\n }", "function addsubmit() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\n \n // Use the add action's post form variables and the current precise time to insert an article.\n // validate all post variables before inserting them to avoid a\n // SQL Injection attack and ensure that we've working with clean data. \n\t\t$email=$_POST['email'];\n\t\t$password=$_POST['password'];\n\t\ttry\n\t\t{\n\t\t if (!empty($_POST['username'])&& !empty($_POST['firstname'])&& !empty( $_POST['role']) && !empty($_POST['email']) && !empty($_POST['password']))\n\t\t { \n\t\t\t$result= UserModel::Create()->InsertUser($_POST['username'],$_POST['email'], $password, $_POST['firstname'],$_POST['middlename'],$_POST['lastname'],$_POST['role'], $_POST['phoneres'], $_POST['phonecell'], $_POST['status'], $_POST['comments']);\n\t\t\t\n\t\t\tif(empty($result))\n\t\t\t{\n\t\t\t\t$this->viewData['module']=\"Add User\";\n\t\t\t\t$this->viewData['error']= \"Failed to Add the user\";\n\t\t\t\t$this->renderWithTemplate('common/error', 'AdminPageBaseTemplate');\n\t\t\t}\n\t\t\telse // invite the user by sending email \n\t\t\t{\n\t\t\t\tMailModel::SendInvitation($_POST['email'], $_POST['firstname'],$result);\n\t\t\t\t$this->renderWithTemplate('users/addsubmit', 'AdminPageBaseTemplate');\n\t\t\t}\n\t\t }\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\t$this->viewData['module']=\"Add User\";\n\t\t\t$this->viewData['error']= $ex->getMessage();\n\t\t\t$this->renderWithTemplate('common/error', 'AdminPageBaseTemplate');\n\t\t}\n\t\t\n\t}", "public function addUser() {\n\t\tif (!empty($_POST['username']) AND !empty($_POST['password']) AND !empty($_POST['email']) AND !empty($_POST['nom']) AND !empty($_POST['prenom']) AND !empty($_POST['adresse']) AND !empty($_POST['code_postal'])) {\n\t\t\t$errors = array();\n\t\t\t$username = $_POST['username'];\n\t\t\t$password = sha1($_POST['password']);\n\t\t\t$email = $_POST['email'];\n\t\t\t$nom = $_POST['nom'];\n\t\t\t$prenom = $_POST['prenom'];\n\t\t\t$adresse = $_POST['adresse'];\n\t\t\t$code_postal = $_POST['code_postal'];\n\n\t\t\t$users = new Model_Users();\n\t\t\t\n\t\t\tif(empty($_POST['username']) || !preg_match('/^[a-zA-Z0-9_]+$/', $_POST['username'])) {\n\t\t\t\t$errors['username'] = \"Votre pseudo n'est pas valide (alphanumérique)\";\n\t\t\t} else {\n\t\t\t\t$userExist = $users->userExist($username);\n\t\t\t\tif($userExist == true) {\n\t\t\t\t\t$errors['username'] = \"Ce pseudo est déjà pris\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (empty($_POST['email']) || !filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t$errors['email'] = \"Votre email n'est pas valide\";\n\t\t\t} else {\n\t\t\t\t$emailExist = $users->emailExist($email);\n\t\t\t\tif($emailExist == true) {\n\t\t\t\t\t$errors['email'] = \"Cet email est déjà utilisée\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (empty($_POST['password']) || $_POST['password'] != $_POST['password_confirm']) {\n\t\t\t\t$errors['password'] = \"Vous devez rentrer un mot de passe valide\";\n\t\t\t}\n\t\t\t$utilisateurDetails = $users->newUsers($username, $password, $email, $nom, $prenom, $adresse, $code_postal, $errors);\n\t\t\theader('Location: /ecommerce/admin/users/list');\n\t\t}\n\t\t\n\t\trequire_once ($_SERVER['DOCUMENT_ROOT'].\"/ecommerce/views/admin/users/create_users.php\");\n\t}", "public function admin_add()\n {\n if ($this->request->is('post')) {\n $this->User->create();\n\n $this->request->data['Impi']['auth_scheme'] = 127;\n\n if ($this->User->saveAll($this->request->data)) {\n $this->Session->setFlash(__('The user has been saved'));\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n }\n }\n $utilityFunctions = $this->User->UtilityFunction->find('list');\n\n $this->set(compact('utilityFunctions', 'utilityFunctionsParameters'));\n }", "private function preAddUser(){\n $LMS = new LMS();\n $api = $LMS->getDataXUserPass($this->_user, $this->_pass, 'https://www.sistemauno.com/source/ws/uno_wsj_login.php');\n $this->_person = \"\";\n if ($this->isObjectAPI($api)) {\n //validar Permisos\n $FilterAPI = new FilterAPI($api);\n $this->_datPerson = $FilterAPI->runFilter($this->_user, $this->_pass);\n if (is_array($this->_datPerson)) {\n //si el usuario cuenta con un perfil apropiado se le pide que valide sus coreo\n $this->validateEmailUser();\n if($this->validUniqueMail()){\n $this->sendMail();\n $this->_response = \"1|\" . $this->_datPerson[email] . \"|\" . $this->_datPerson[personId] . \"|\" . $this->_code . \"|\" . $this->_datPerson['name'];\n }else{\n $this->_response = \"2|\" . $this->_datPerson[email] . \"|\" . $this->_datPerson[personId] . \"|\" . $this->_code . \"|\" . $this->_datPerson['name'];\n }\n } else {\n $this->_response = $this->_datPerson;\n }\n } else {\n $this->_response = $api;\n }\n }", "public static function addUser()\n {\n if(empty($_POST))\n {\n require_once(__DIR__.'/../views/form.php');\n exit;\n }\n\n // add user to database\n $user = UserModel::addUser();\n\n if (!$user)\n {\n session_start();\n $_SESSION['message'] = 'Error occurred while saving user. Please try again later.';\n header('Location: /form');\n exit;\n }\n\n // update text file\n if (!self::updateTextFile($_SERVER['DOCUMENT_ROOT'] . $user['about'], $user['euro2016']))\n {\n header('Location: /form');\n exit;\n }\n\n session_start();\n $_SESSION['message'] = 'Successfully saved user';\n\n require_once(__DIR__.'/../views/form.php');\n }", "public function postAdd() {\n try {\n $this->_adminUserRepository->addOrUpdateUsers ();\n } catch ( Exception $e ) {\n $this->logger->error ( $e->getMessage () );\n }\n \n return redirect ( StringLiterals::ADMIN_USERS )->withSuccess ( trans ( 'user::adminuser.success' ) );\n }", "public function add(){\n\t\tif($_POST){\n\n\n\t\t$filter = new validations;\n\t\tvar_dump($filter->isInt($_POST['age' ], 18, 99));\n\t}\n/*\n\t\t$groups = $this->User->find(\"groups\", \"all\");\t\n\t\t$this->set(\"groups\", $groups);\n\t\tif($_POST){\n\t\t\tif($this->User->save(\"users\", $_POST)){\n\t\t\t\t$this->redirect(array(\"controller\"=>\"users\", \"action\"=>\"index\"));\n\t\t\t}else{\n\t\t\t\t$this->redirect(array(\"controller\"=>\"users\", \"action\"=>\"add\"));\n\t\t\t}\n\t\t}\n\t\t*/\n\t}", "protected function loadObjects() { \n parent::loadObjects(); \n $factory = I2CE_FormFactory::instance();\n $user = null;\n $user_map = null;\n if ($this->isPost()) {\n if ($this->creatingNewUser()) {\n if (! ($user = $factory->createContainer( 'user')) instanceof I2CE_User_Form) {\n I2CE::raiseError(\"bad user form\");\n return false;\n }\n $user->load( $this->post );\n $user_map = $factory->createContainer( 'user_map');\n $user_map->load( $this->post );\n if ( !($username = $user->username) ) {\n I2CE::raiseError(\"bad user name\");\n return false;\n }\n $this->setEditing();\n if ( !$this->isSave(false) ) {\n $user->tryGeneratePassword();\n }\n $this->getPrimary()->username = array('user' , $username);\n }\n } else {\n $this->parent = $this->getParent();\n $user = $factory->createContainer( \"user\".'|0');\n if (( ($personObj = $this->getParent()) instanceof iHRIS_Person) && ($personObj->surname)) {\n $username = $this->generateUserName($personObj);\n $accessMech = I2CE::getUserAccess();\n $details = $accessMech->getAllowedDetails();\n $user->username = $username;\n if (in_array('lastname',$details)) {\n $user->lastname = $personObj->surname;\n }\n $role = false;\n if (I2CE::getConfig()->setIfIsSet($role,\"/modules/SelfService/default_user_role\") && I2CE_MagicDataNode::checkKey($role) && I2CE::getConfig()->is_parent(\"/I2CE/formsData/forms/role/$role\")) {\n $user->getField('role')->setFromDB('role|' . $role);\n }\n foreach($details as $detail) {\n if ($personObj->hasField($detail)) {\n $user->getField($detail)->setFromDB( $personObj->getField($detail)->getDBValue());\n }\n }\n if (I2CE_ModuleFactory::instance()->isEnabled('PersonContact')) {\n $contact_form = false;\n if (I2CE::getConfig()->setIfIsSet($contact_form,\"/modules/SelfService/default_user_contact_form\") && $contact_form) {\n $personObj->populateChildren($contact_form);\n foreach ($personObj->getChildren($contact_form) as $contactObj) {\n foreach($details as $detail) {\n if ($contactObj->hasField($detail)) {\n $user->getField($detail)->setFromDB( $contactObj->getField($detail)->getDBValue());\n }\n } \n break;\n }\n }\n }\n }\n }\n if ($user instanceof I2CE_User_Form) {\n $this->userObj = $user;\n $this->userMapObj = $user_map;\n $this->setObject( $user, I2CE_PageForm::EDIT_SECONDARY, 'user_fields');\n } \n return true;\n }", "public function add_new_resource() {\n // @codingStandardsIgnoreLine\n $add_resource_name = wc_clean( $_POST['add_resource_name'] );\n\n if ( empty( $add_resource_name ) ) {\n wp_send_json_error();\n }\n\n $resource = array(\n 'post_title' => $add_resource_name,\n 'post_content' => '',\n 'post_status' => 'publish',\n 'post_author' => dokan_get_current_user_id(),\n 'post_type' => 'bookable_resource',\n );\n $resource_id = wp_insert_post( $resource );\n $edit_url = dokan_get_navigation_url( 'booking' ) . 'resources/edit/?id=' . $resource_id;\n ob_start();\n ?>\n <tr>\n <td><a href=\"<?php echo $edit_url; ?>\"><?php echo $add_resource_name; ?></a></td>\n <td><?php esc_attr_e( 'N/A', 'dokan' ); ?></td>\n <td>\n <a class=\"dokan-btn dokan-btn-sm dokan-btn-theme\" href =\"<?php echo $edit_url; ?>\"><?php esc_attr_e( 'Edit', 'dokan' ); ?></a>\n <button class=\"dokan-btn dokan-btn-theme dokan-btn-sm btn-remove\" data-id=\"<?php echo $resource_id; ?>\"><?php esc_attr_e( 'Remove', 'dokan' ); ?></button>\n </td>\n </tr>\n\n <?php\n $output = ob_get_clean();\n wp_send_json_success( $output );\n }", "public function addUser(){\n $mysqli = $this->Connect();\n\n //if the register button is clicked proceed with adding the user\n if(isset($_POST['register'])){\n\n //real_escape_string to prevent sql injection\n $email = $mysqli->real_escape_string($_POST['email']);\n $password = $mysqli->real_escape_string($_POST['password']);\n $repeated = $mysqli->real_escape_string($_POST['repeatpass']);\n $firstname = $mysqli->real_escape_string($_POST['firstname']);\n $prepos = $mysqli->real_escape_string($_POST['preposition']);\n $lastname = $mysqli->real_escape_string($_POST['lastname']);\n $telnumber = $mysqli->real_escape_string($_POST['telnumber']);\n $city = $mysqli->real_escape_string($_POST['city']);\n $address = $mysqli->real_escape_string($_POST['address']);\n $zipcode = $mysqli->real_escape_string($_POST['zipcode']);\n $userlvl = $mysqli->real_escape_string($_POST['userlvl']);\n\n //check if the passwords match\n if ($password === $repeated) {\n //hashing the password\n $password = hash('sha512', $password);\n\n //check if mail exists\n $checkEmail = $mysqli->query(\"SELECT email FROM tbl_users WHERE email = '$email'\");\n\n //check if the email/user already exists\n if($checkEmail->num_rows === 0){\n $prepos = !empty($prepos) ? \"'$prepos'\" : \"NULL\";\n\n $insertUser = $mysqli->query(\"INSERT INTO tbl_users (email, password, userlevel, tel, firstName, lastName, preposition, city, address, zipCode) \n VALUES ('$email','$password','$userlvl','$telnumber','$firstname',$lastname,$prepos,$city,$address,$zipcode)\");\n\n header('Location: index.php');\n } else {\n $this->alert('Het email dat u heeft ingevoerd bestaat al.','danger');\n }\n } else {\n $this->alert('De wachtwoorden komen niet overeen, probeer het opnieuw.','danger');\n }\n }\n }", "function RegisterUser(){\r\n\t\tif(!isset($_POST['submitted'])){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$formvars = array();\r\n\r\n\t\tif(!$this->ValidateRegistrationSubmission()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$itemPicture = $this->upLoadUserPic();\r\n\t\tif($itemPicture != false){\r\n\t\t\t$formvars['Upic'] = $this->upLoadUserPic();\r\n\t\t}\r\n\t\t\r\n\t\t$this->CollectRegistrationSubmission($formvars);\r\n\t\t\r\n\t\tif(!$this->comparePswd($formvars)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(!$this->SaveToEventAdvDatabase($formvars)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t/*if(!$this->sendConfimMail($formvars)){\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\r\n\t\t//$this->SendAdminIntimationEmail($formvars);\r\n\r\n\t\treturn true;\r\n\t}", "public function add($data)\r\n {\r\n // Adds a user into the database.\r\n global $db;\r\n // Get what we need.\r\n $stamp = time();\r\n if (isset($_SERVER['REMOTE_ADDR'])) {\r\n $user_ip = $_SERVER['REMOTE_ADDR'];\r\n } else {\r\n $user_ip = false;\r\n }\r\n if (!isset($data['admin'])) {\r\n $admin = false;\r\n } else {\r\n $admin = $data['admin'];\r\n }\r\n $name = $data['name'];\r\n $username = $data['username'];\r\n $email = $data['email'];\r\n $password = $data['password'];\r\n $key = md5($email . $stamp . rand(0, 999));\r\n\r\n // Play with our food.\r\n $salted = $this->salt($password);\r\n // We only want letters and numbers.\r\n $username = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $username);\r\n\r\n // Scrub up and clean up.\r\n $sql = array();\r\n $sql['name'] = $name;\r\n $sql['username'] = $username;\r\n $sql['email'] = $email;\r\n $sql['password'] = $salted;\r\n $sql['regstamp'] = $stamp;\r\n $sql['regip'] = $user_ip;\r\n $sql['verified'] = false;\r\n $sql['verifykey'] = $key;\r\n\r\n $users_uname = db::get_array(\"users\", array(\"username\" => $username));\r\n $users_email = db::get_array(\"users\", array(\"email\" => $email));\r\n $users = (count($users_uname) + count($users_email));\r\n\r\n if ($users > 0) {\r\n if (count($users_uname) > 0) {\r\n return array(\"res\" => false, \"msg\" => \"A user with that Username already exists!\");\r\n } else {\r\n return array(\"res\" => false, \"msg\" => \"A user with that E-Mail already exists!\");\r\n }\r\n } else {\r\n // Insert the data.\r\n db::insert(\"users\", $sql);\r\n do_email($email, $username, \"Email Validation\", \"To begin using your SmallURL account, you need your email verifying. <br /> Please visit <a href='http://account.smallurl.in/verify/{$key}'> http://account.smallurl.in/verify/{$key} </a> to validate your account.\");\r\n\t\t\treturn array(\"res\" => true, \"msg\" => \"Registered!\");\r\n }\r\n }", "function addUser($data){\n\t$username = secure($data['username']);\n\t$password = secure($data['password']);\n\t$level = secure($data['level']);\n\t$users = getJSON(USERS);\n\t$id = getId($users);\n\t$callback = \"LOGIN_CHECKCHAR_FAILED\";\n\tif(!checkChar($username)){\n\t\n\t\t$salt = \"bb764938100a6ee139c04a52613bd7c1\";\n\t\t//password encryption\t\t\n\t\t$password= md5($password.$salt);\n\t\t$newUser= array(\n\t\t\t\"id\" => $id,\n\t\t\t\"username\" => $username,\n\t\t\t\"password\" => $password,\n\t\t\t\"level\" => $level\n\t\t);\n\t\tarray_push($users,$newUser);\n\t\texport($users, USERS);\n\t\t$callback=\"\";\n\t}\n\treturn $callback; \n}", "public function addUser(){\n\n\t\ttry {\n\n\t\t\t$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\n\t\t\t$password = $_POST['password'];\n\n\t\t\t$password = hash('sha256', $password);\n\n\n\t\t\trequire CONTROLLER_DIR . '/dbConnecterController.php';\n\n\t\t\t$result = $db->query('SELECT * FROM users WHERE username=\"'.$username.'\"');\n\n\t\t\tif ($username && $password) {\n\n\t\t\t\t$row = $result->fetchColumn();\n\t\t\t\tif($row == 0){\n\t\t\t\t\t$statement = $db->query(\"INSERT INTO users (username,password) VALUES ('$username', '$password')\" );\n\t\t\t\t\t$db = null;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tdie(\"Username already taken, pick something else! <br><a href='/userlist'> Go back to user list\");\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t} catch (PDOException $e) {\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t\tdie();\n\t\t}\n\t}", "public function add_postAction() {\n $info = $this->getPost(array('username', 'password', 'r_password', 'email', 'groupid'));\n if (strlen($info['username']) < 5 || strlen($info['username']) > 16) $this->output(-1, '用户名长度5-16位之间');\n if (strlen($info['password']) < 5 || strlen($info['password']) > 16) $this->output(-1, '用户密码长度5-16位之间.');\n if ($info['password'] !== $info['r_password']) $this->output(-1, '两次密码输入不一致.');\n if ($info['email'] == '') $this->output(-1, '用户EMAIL必填.');\n if (Admin_Service_User::getUserByName($info['username'])) $this->output(-1, '用户名已经存在.');\n if (Admin_Service_User::getUserByEmail($info['email'])) $this->output(-1, '邮件地址已经存在.');\n $info['registerip'] = Util_Http::getClientIp();\n $result = Admin_Service_User::addUser($info);\n if (!$result) $this->output(-1, '操作失败');\n $this->output(0, '操作成功');\n }", "public function addUser(){\n\t}", "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 postSaveuser(){\n\n $validator4 = Validator::make(Input::all(), User::$userRules);\n $userMail = Input::get('useremail');\n \n if ($validator4->passes()) {\n $user = new User;\n $user->email = Input::get('useremail');\n $user->fullname = Input::get('fullname');\n $user->userType = \"user\";\n $user->save();\n\n return Redirect::to('admin/userlist')->with('message', 'User added succesfully!');\n }else{\n return Redirect::to('admin/newuser')->with('message', 'The following errors occurred')\n ->withErrors($validator4)->withInput(); \n }\n }", "public function initializeCreateAction() {\n\t\t$fieldConfigurationWithValues = $this->fieldConfiguration;\n\t\tif ($this->request->hasArgument('frontendUser')) {\n\t\t\t$frontendUserData = $this->request->getArgument('frontendUser');\n\t\t\t$errors = 0;\n\t\t\tforeach ($frontendUserData as $fieldName => $value) {\n\t\t\t\t// XSS sanitation\n\t\t\t\t$value = htmlspecialchars(strip_tags(trim($value)));\n\t\t\t\tif (array_key_exists($fieldName, $this->fieldConfiguration)) {\n\t\t\t\t\t// the field is allowed\n\t\t\t\t\t$fieldConfigurationWithValues[$fieldName]['value'] = $value;\n\t\t\t\t\tif ($this->fieldConfiguration[$fieldName]['mandatory']) {\n\t\t\t\t\t\t// the field is mandatory, thus it must not be empty\n\t\t\t\t\t\tif (empty($value)) {\n\t\t\t\t\t\t\t// Error: Empty mandatory field\n\t\t\t\t\t\t\t$fieldConfigurationWithValues[$fieldName]['cssClasses'] = 'has-error';\n\t\t\t\t\t\t\t$errors++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Validate e-mail address\n\t\t\t\t\t\t\tif ($fieldName === 'email' && GeneralUtility::validEmail($value) === FALSE) {\n\t\t\t\t\t\t\t\t// Error: Invalid e-mail address\n\t\t\t\t\t\t\t\t$fieldConfigurationWithValues[$fieldName]['cssClasses'] = 'has-error';\n\t\t\t\t\t\t\t\t$errors++;\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} else {\n\t\t\t\t\t// Unset fields that are not allowed for security reasons\n\t\t\t\t\tunset($frontendUserData[$fieldName]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($errors > 0) {\n\t\t\t\t$this->forward('new', NULL, NULL, array('fieldConfiguration' => $fieldConfigurationWithValues));\n\t\t\t} else {\n\t\t\t\t$this->forward('addAccountAndLogin', NULL, NULL, array('frontendUserData' => $frontendUserData));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->forward('new');\n\t\t}\n\n\t}", "public function postRegister()\n\t{\n\t\t$user = new \\User;\n\n\t\t$user->email = \\Input::get( 'email' );\n\t\t$user->password = \\Input::get( 'password' );\n\n\t\t// The password confirmation will be removed from model\n\t\t// before saving. This field will be used in Ardent's\n\t\t// auto validation.\n\t\t$user->password_confirmation = \\Input::get( 'password_confirmation' );\n\n\t\t// Save if valid. Password field will be hashed before save\n\t\t$user->save();\n\n\t\tif ( $user->id )\n\t\t{\n\t\t\t//Assign the company role to this person\n\t\t\t$roleId = \\Role::where('name', '=', 'Company')->first()->id;\n\t\t\t$user->attachRole($roleId);\n\n\t\t\t// Redirect with success message, You may replace \"Lang::get(...\" for your custom message.\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getLogin')\n\t\t\t\t->with( 'notice', \\Lang::get('confide::confide.alerts.account_created') );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get validation errors (see Ardent package)\n\t\t\t$error = $user->errors()->all(':message');\n\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getRegister')\n\t\t\t\t->withInput(\\Input::except('password'))\n\t\t\t\t->with( 'error', $error );\n\n\t\t}\n\n\t}", "function procAddUser() {\n\t\tglobal $session, $database, $form;\n\t\t/* Convert username to all lowercase (by option) */\n\t\tif(ALL_LOWERCASE){\n\t\t $_POST['user'] = strtolower($_POST['user']);\n\t\t}\n\t\t/* Registration attempt */\n\t\t$retval = $session->register($_POST['user'], $_POST['pass'], $_POST['email'], $_POST['fullname'], $_POST['ulevel']);\n\n\t\t/* Registration Successful */\n\t\tif($retval == 0){\n\t\t $_SESSION['reguname'] = $_POST['user'];\n\t\t $_SESSION['regsuccess'] = true;\n\t\t header(\"Location: \".$session->referrer);\n\t\t}\n\t\t/* Error found with form */\n\t\telse if($retval == 1){\n\t\t $_SESSION['value_array'] = $_POST;\n\t\t $_SESSION['error_array'] = $form->getErrorArray();\n\t\t header(\"Location: \".$session->referrer);\n\t\t}\n\t\t/* Registration attempt failed */\n\t\telse if($retval == 2){\n\t\t $_SESSION['reguname'] = $_POST['user'];\n\t\t $_SESSION['regsuccess'] = false;\n\t\t header(\"Location: \".$session->referrer);\n\t\t}\n }", "public function doRegister(){\n\t\t\t$requestUser = $this->registerView->getRequestUserName();\n\t\t\t$requestPassword = $this->registerView->getRequestPassword();\n\t\t\t$requestRePassword = $this->registerView->getRequestRePassword();\n\t\t\t\n\t\t\tif($this->registerView->didUserPressRegister() ){\n\t\t\t\ttry{\n\t\t\t\tif($this->checkUsername($requestUser) && $this->checkPassword($requestPassword,$requestRePassword)){\n\t\t\t\t\t//create and add new user\n\t\t\t\t\t$newUser = new User($requestUser,$requestPassword);\n\t\t\t\t\t$this->userList->add($newUser);\n\t\t\t\t\t\n\t\t\t\t\t$this->model->toggleJustRegistered();\n\t\t\t\t\t$this->model->setSessionUsername($requestUser);\n\t\t\t\t\t$this->navView->clearURL();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch (UserFewCharException $ufce){\n\t\t\t\t\t$this->registerView->setErrorUsernameFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (UserBadCharException $udce){\n\t\t\t\t\t$this->registerView->setErrorUsernameInvalidChar();\n\t\t\t\t\t$this->registerView->setUsernameField(strip_tags($requestUser));\n\t\t\t\t} \n\t\t\t\tcatch (UserExistsException $uee){\n\t\t\t\t\t$this->registerView->setErrorUsernameExists();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordLenException $ple){\n\t\t\t\t\t$this->registerView->setErrorPasswordFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordMissmatchException $pme){\n\t\t\t\t\t$this->registerView->setErrorPasswordMatch();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t}\n\t\t\t\tif(empty($requestUser) && empty($requestPassword) && empty($requestRePassword))\n\t\t\t\t\t$this->registerView->setErrorMissingFields();\t\t\n\t\t\t}\n\t\t}", "public function addAction() \n { \n $user = $this->currentUser();\n // Check the post limit and redirect accordingly.\n// if($this->postManager->postLimitReached($user)){\n// // Redirect the user to the \"membership\" page.\n// return $this->redirect()->toRoute('membership');\n// }\n \n $stepParam = $this->params()->fromRoute('step', 1);\n // Determine the current step.\n $step = 1;\n if ((isset($this->sessionContainer->addUserChoices['addStepCount']))&&($stepParam==2)) {\n $step = $this->sessionContainer->addUserChoices['addStepCount']; \n }\n \n // Ensure the step is correct (between 1 and 2).\n if ($step<1 || $step>4)\n $step = 1;\n \n if ($step==1) {\n // Init user choices.\n $this->sessionContainer->addUserChoices = [];\n $this->sessionContainer->addUserChoices['addStep2Dirty'] = false;\n $this->sessionContainer->addUserChoices['addStep3Dirty'] = false;\n $this->sessionContainer->addUserChoices['addStep4Dirty'] = false;\n $this->sessionContainer->addUserChoices['addParentPostId'] = \n $this->params()->fromQuery('id', false);\n }\n \n // Create image holder.\n $files = null;\n $fileTitles = null;\n \n // Create the form.\n $form = new AddPostForm($step, $user->getId(), $this->translator);\n \n // Check whether this post is a POST request.\n if ($this->getRequest()->isPost()) {\n \n // Make certain to merge the files info!\n $request = $this->getRequest();\n $data = array_merge_recursive(\n $request->getPost()->toArray(),\n $request->getFiles()->toArray()\n );\n \n // Fill form with data.\n $form->setData($data);\n if ($form->isValid()) {\n \n // Get validated form data.\n $data = $form->getData();\n \n // Save user choices in session.\n $this->sessionContainer->addUserChoices[\"addStep$step\"] = $data;\n \n // Increase step if photo has not been selected.\n $fileExists = $this->postManager->checkFileExists($data); \n \n if($fileExists == false){\n $step ++;\n $this->sessionContainer->addUserChoices['addStepCount'] = $step;\n } else{\n // Create the title file.\n $this->imageManager->createAddTitleFile($user->getId(), $data);\n }\n \n if ($step>4) {\n \n // Use post manager service to add new post to database.\n $data = $this->sessionContainer->addUserChoices['addStep1'];\n $this->postManager->addNewPost(\n $data, $user, $this->sessionContainer->addUserChoices['addParentPostId']);\n $posts = $this->entityManager->getRepository(Post::class)\n ->findPostsByUser($user);\n $post = $posts[0]; \n $postId = $post->getId();\n $this->imageManager->saveAddTempFiles($post, $user->getId());\n $this->videoManager->saveAddTempFiles($post, $user->getId());\n $this->audioManager->saveAddTempFiles($post, $user->getId());\n \n // Redirect the user to \"admin\" page.\n return $this->redirect()->toRoute('posts', ['action'=>'admin']);\n }\n \n // Go to the next step.\n return $this->redirect()->toRoute('posts', ['action'=>'add', \n 'id'=>0, 'step'=>2]);\n }\n } \n\n if ($step==2) {\n\n // Get the list of already saved files.\n $files = $this->imageManager->getAddTempFiles($user->getId(), \n $this->sessionContainer->addUserChoices['addStep2Dirty']);\n $fileTitles = $this->imageManager->getAddTempFileTitles($user->getId(), \n $this->sessionContainer->userChoices['step2Dirty']);\n $this->sessionContainer->addUserChoices['addStep2Dirty'] = true; \n }\n\n if ($step==3) {\n\n // Get the list of already saved files.\n $files = $this->videoManager->getAddTempFiles($user->getId(), \n $this->sessionContainer->addUserChoices['addStep3Dirty']);\n $this->sessionContainer->addUserChoices['addStep3Dirty'] = true; \n } \n \n if ($step==4) {\n\n // Get the list of already saved files.\n $files = $this->audioManager->getAddTempFiles($user->getId(), \n $this->sessionContainer->addUserChoices['addStep4Dirty']);\n $this->sessionContainer->addUserChoices['addStep4Dirty'] = true; \n } \n \n \n \n // Render the view template.\n $viewModel = new ViewModel([\n 'files' => $files,\n 'fileTitles' => $fileTitles,\n 'form' => $form,\n 'user' => $user\n ]);\n $viewModel->setTemplate(\"application/post/add$step\");\n \n return $viewModel;\n }", "public function add()\n\t{\n\t\t// Initialize variables.\n\t\t$app = &JFactory::getApplication();\n\n\t\t// Clear the level edit information from the session.\n\t\t$app->setUserState('com_users.edit.user.id', null);\n\t\t$app->setUserState('com_users.edit.user.data', null);\n\n\t\t// Redirect to the edit screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users&view=user&layout=edit', false));\n\t}", "public function addSecondaryUver() {\n $this->autoRender = false;\n if ($this->request->is('post')) {\n $this->GeneralFunctions = $this->Components->load('GeneralFunctions');\n $company = $this->Session->read('CompanyLoggedIn');\n $password = $this->GeneralFunctions->generateRandomPassword();\n $param['SecondaryUser']['name'] = $this->request->data['SecondaryUser']['name'];\n $param['SecondaryUser']['email'] = $this->request->data['SecondaryUser']['email'];\n $param['SecondaryUser']['type'] = $this->request->data['SecondaryUser']['type'];\n $param['SecondaryUser']['company_id'] = $company['Company']['id'];\n $param['SecondaryUser']['normalPass'] = $password;\n $param['SecondaryUser']['hashPass'] = md5($password);\n\n $query = \"INSERT INTO secondary_users(name, email, password, company_id, secondary_type_id)\"\n . \" VALUES('\" . $param['SecondaryUser']['name'] . \"'\"\n . \",'\" . $param['SecondaryUser']['email'] . \"'\"\n . \",'\" . $param['SecondaryUser']['hashPass'] . \"'\"\n . \",\" . $param['SecondaryUser']['company_id'] . \"\"\n . \",\" . $param['SecondaryUser']['type'] . \");\";\n $params = array(\n 'User' => array(\n 'query' => $query\n )\n );\n $addUserOffer = $this->AccentialApi->urlRequestToGetData('users', 'query', $params);\n\t\t\t\n\t\t\t$this->sendEmailNewUserTWO($param['SecondaryUser']['email'], $password);\n\t\t\t\n if (is_null($addUserOffer)) {\n //TODO: enviar email ao adicionar o usuario com sucesso.\n $data['normalPass'] = $param['SecondaryUser']['normalPass'];\n $data['name'] = $param['SecondaryUser']['name'];\n $data['email'] = $param['SecondaryUser']['email'];\n $msgReturn = $this->GeneralFunctions->postEmail('companies', 'secondaryUser', $data);\n $newUser = $this->getSecundaryUserByLoginAndPassword($param['SecondaryUser']['email'], $param['SecondaryUser']['hashPass'], $company['Company']['id']);\n return json_encode($newUser[0]);\n }\n\n // $this->sendEmail(\"[email protected]\", \"esse é o corpo do email\", \"esse é o assunto\");\n }\n return 0;\n }", "public function registerPost()\n {\n $this->response->getHeaders()->setStatusCode(302);\n\n $regForm = $this->_getRegisterForm();\n $request = $this->getRequest();\n\n $failRedirect = $this->_router->assemble(\n array('controller' => 'user', 'action' => 'register'), \n array('name' => 'default')\n );\n\n if (!$this->getRequest()->isPost() || !$regForm->isValid($request->post()->toArray())) {\n $this->_flashMessenger->addMessage($regForm);\n $this->response->getHeaders()->addHeader('Location', $failRedirect);\n return $this->response;\n }\n $user = self::$di->get('userService')->createFromForm($regForm);\n var_dump($user);\n die('success!');\n }", "public function add($data, Resource $resource);", "function add_user(){\n //data is retrieved from the POST array, It is passed to here from the index/register page.\n //check if we have a full array => expecting 9 entities, at least 2 will be \"\" strings.\n //this is due to the hidden field and the cancel button. so we will verify if the register button is been clicked.\n //this will be done in the index/register page...\n\n //setting vars\n global $db;\n\n //validating passed data to ensure that all fields are entered and all match the needed requirements\n if (strlen($_POST[\"Username\"]) > 4){\n $uName = $_POST[\"Username\"];\n }else{\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n if (strlen($_POST[\"Password\"]) > 5){\n $pw1 = $_POST[\"Password\"]; //unsalted yet\n }else{\n $pw1 = \"b\";\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n if(strlen($_POST[\"Passwordconf\"])>5){\n $pw2 = $_POST[\"Passwordconf\"]; //pw verification\n }else{\n $pw2 =\"a\";\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n if(strlen($_POST[\"emailAddress\"])>8){\n $email = $_POST[\"emailAddress\"];\n }else{\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n if(strlen($_POST[\"Fname\"])>0){\n $firstName = $_POST[\"Fname\"]; //users first name\n }else{\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n if(strlen($_POST[\"Lname\"])>0){\n $lastName = $_POST[\"Lname\"]; //obviously the last name\n }else{\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n $encoded = \"\"; //empty string here - dont need to validate it.\n //The following is just a test... I want to see if i can catch this error and spit it back out...\n if ($pw1 === $pw2){\n $salt = bin2hex(random_bytes(256));\n @ $encoded = crypt($_POST[\"Password\"],$salt);\n }else{\n //var_dump($message);\n //this should catch any messages and force an exit code with errors...\n if (empty($message)){\n $message = \"The two password fields must be the same. Please start over.\";\n }\n //var_dump($message);\n include(\"partial/user/_register.php\");\n exit(); //jic something goes wrong we do not want to have the script resume.\n }\n //final catch for the $message string being full... meaning that there was an error and to halt code... even if passwords match.\n if (!empty($message)){\n include(\"partial/user/_register.php\");\n exit(); //jic something goes wrong we do not want to have the script resume.\n }\n\n @ $query = \"INSERT INTO users\n (\n Username , Password , pwsecret , emailAddress , Fname , Lname , Joined_Date , HelpVotes , NegVotes , Posts, WarnCnt\n )\n VALUES\n (\n ? , ?, ? , ? , ? , ?, CURRENT_TIMESTAMP,0,0,0,0\n )\";\n\n $stmnt = $db -> prepare($query);\n @ $stmnt -> bind_param(\"ssssss\",$uName,$encoded,$salt,$email,$firstName,$lastName);\n $resultQ1 = $stmnt -> execute();\n\n if (!$resultQ1){\n $error_message = \"There was a problem when attempting to add you as a user, please try again and if the issue persists please contact the webadmin.\";\n //clear vars for reuse::\n $_POST = array(); //should stop data from persisting.\n $uName = \"\";\n $pw1 = \"\";\n $pw2 = \"\";\n $encoded = \"\";\n $email = \"\";\n $firstName = \"\";\n $lastName = \"\";\n include(\"partial/user/_register.php\");\n exit(); //jic something goes wrong we do not want to have the script resume.\n }else{\n //the following should add a newly generated user to the roles table.\n $select=\"(SELECT userID FROM users WHERE Username = ?)\"; //sub query to return a user ID\n $insert=\"INSERT INTO roles (userID , isAdmin , isMod , isFormerStaff , isUser , isBanned) VALUES (? , 0 , 0 , 0 , 1 , 0)\"; //insert query to add user to roles table\n //I tested this code in mysql phpmyAdmin and it worked with out error...\n $stmnt = $db -> prepare($select);\n @ $stmnt -> bind_param(\"s\",$uName);\n $resultQ2 = $stmnt -> execute();\n\n if (!$resultQ2){\n echo \"<p class='alert alert-danger'>User role not created - please add user manually.</p>\";\n }else{\n $resultQ2 = $stmnt -> get_result();\n $data = $resultQ2 -> fetch_assoc();\n $newUser = $data[\"userID\"];\n $stmnt2 = $db -> prepare($insert);\n $stmnt2 -> bind_param(\"i\",$newUser);\n $resultQ3 = $stmnt2 -> execute();\n\n if (!$resultQ3){\n echo \"<p class='alert alert-danger'>There was an error while attempting to update user role table for userID: \" . $newUser . \" please verify that the data is correct, or contact your webadmin.</p>\";\n }else {\n echo \"<p class='alert alert-success'>User and user roles updated successfully!</p>\";\n }\n }\n\n //clear vars for reuse::\n $_POST = array(); //should stop data from persisting.\n $uName = \"\";\n $pw1 = \"\";\n $pw2 = \"\";\n $encoded = \"\";\n $email = \"\";\n $firstName = \"\";\n $lastName = \"\";\n }\n}", "public function registerAction(){\n\t\t$user = new User();\n\t\n\t \tif ($this->_request->isPost()) {\n\t\n\t\t\t$data = $this->_validateUser();\n\t\t\t//if no errors validating fields insert user\n\t\t\tif ($this->view->errorMsg == null) {\n\t\n\t\t\t\t//verify user is not already registered\n\t\t\t\t$user_row = $user->fetchRow($user->select()->where('email = ?', $data['email']));\n\t\t\t\n\t\t\t\t//user already registered\n\t\t\t\tif($user_row != null){\n\t\t\t\t\t$this->view->errorMsg = 'Email address has already been registered.';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$user_data = array(\n\t\t\t\t\t\t'email' => $data['email'],\n\t\t\t\t\t\t'pass' => $data['pass'],\n\t\t\t\t 'name' => $data['name'],\n\t\t\t\t\t\t'url' => $data['url']\n\t\t\t\t\t);\n\t\t\n\t\t\t\t\t$user_id = $user->insert($user_data);\n\t\t\t\t\t$user_data['id'] = $user_id;\n\t\t\t\t\t\n\t\t\t\t\t//create default options\n\t\t\t\t\t$options = new Options();\n\t\t\t\t\t//breakfast\n\t\t\t\t\t$options_data = array();\n\t\t\t\t\t$options_data['user_id'] = $user_id;\n\t\t\t\t\t$options_data['meal_type'] = 'B';\n\t\t\t\t\t$options_data['meal_generation'] = 'A';\n\t\t\t\t\t$options_data['auto_options'] = 'C';\n\t\t\t\t\t$options->insert($options_data);\n\t\t\t\t\t//lunch\n\t\t\t\t\t$options_data['meal_type'] = 'L';\n\t\t\t\t\t$options->insert($options_data);\n\t\t\t\t\t//dinner\n\t\t\t\t\t$options_data['meal_type'] = 'D';\n\t\t\t\t\t$options->insert($options_data);\n\t\t\t\t\t\n\t\t\t\t\t//if successful, redirect to main page\n\t\t\t\t\t$this->session->user_email = $data['email'];\n\t\t\t\t\t$this->session->user_id = $user_id;\n\t\t\t\t \t$this->_redirect($this->baseUrl.'/main');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t$this->view->user_data = $data;\n\t\t\t\n\t\t}\n\t\n\t\n\t\t// additional view fields required by form\n\t\t$this->view->action = 'register';\n\t\t$this->view->buttonText = 'Register';\n\n }", "public function add_user($id) {\n UserToPres::create_entry($id,$this->id);\n }", "public function addUser($data) {\n\t\tglobal $db;\n\t\t$db->type = 'site';\n\t\t\n\t\tforeach ($data as $key=>$val) {\n\t\t\tif ($key != 'password') {\n\t\t\t\t$values[$key] = $db->sqlify($val);\n\t\t\t} else {\n\t\t\t\t$values[$key] = $db->sqlify(crypt($val)); \n\t\t\t}\n\t\t}\n\t\t$values['date_created'] = $db->sqlify(date('Y-m-d H:i:s')); \n\t\t\n\t\t$check = false;\n\t\tif (!empty($data['email'])) {\n\t\t\t$check = $this->getUserByEmail($data['email']);\n\t\t} elseif (!empty($data['twitter_id'])) {\n\t\t\t$check = $this->getUserByTwitterId($data['twitter_id']);\n\t\t}\n\t\t\n\t\tif (!$check) {\n\t\t\t$db->insert('users', $values);\n\t\t\t$db->doCommit();\n\t\t}\n\t}", "public function add_user_get(){\r\n if (!$this->pronet_model->add_user('Fname Lname', '7711223344553', '[email protected]', '31111225', '1990-01-01','134091830-2')) {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n } else {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => TRUE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_OK);\r\n }\r\n }", "public function route_useradd(array $args) {\n\t\tif (!self::$ctrl->get_user_data())\n\t\t\treturn self::$core::pj([Error::USER_NOT_LOGGED_IN], 401);\n\t\treturn self::$core::pj(\n\t\t\tself::$manage->add($args['post'], false, true, true), 403);\n\t}", "function register(){\n\t\t\t$this->__dataDecode();\n\t\t\t\t$data = $this->data;\n\t\t\t\t$username = $data['User']['userName'];\n\t\t\t\t$response\t= array();\n\t\t\t\t$emptyuserName = $this->User->findByUsername($username);\n\t\t\t \t$emptyEmail = $this->User->findByEmail($this->data['User']['email']);\n\t\t\t\n\t\t\t \t\n\t\t\tif(isset($this->data['User']['password']))\n\t\t\t{\n\t\t\t\t$this->data['User']['confirm_password'] = $this->data['User']['password'] \t= md5($this->data['User']['password']);\n\t\t\t\t$this->data['User']['email_confirmation']\t= 1;\n\t\t\t\t$this->data['User']['status']\t\t\t= 1;\n\t\t\t\t$data = $this->data;\n\t\t\t\t$data['User']['firstname']=$this->data['User']['firstName'];\n\t\t\t\t$data['User']['lastname']=$this->data['User']['lastName'];\n\t\t\t\t$data['User']['username']=$this->data['User']['userName'];\n\t\t\t\t}\n\n\t\t\tif(!($this->__validEmail($this->data['User']['email'])) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Please enter a valid email.';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t \t}\n\t\t\tif(!empty($emptyuserName) && !empty($data['User']['username']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'userName Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\n\t\t\t}\n\t\t\tif(!empty($emptyuserName) && !empty($data['User']['username']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'userName Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\n\t\t\tif(!empty($emptyEmail) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Email Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\n\t\t\t}\n\t\t\tif(!empty($emptyemail) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'email Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\tif(!($this->validateUSAZip($this->data['User']['zip'])) && !empty($this->data['User']['zip']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Please enter a valid Zip Code.';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t \t}\n\t\t\n\t\t\telse if($this->User->save($data))\n\t\t\t{\n\t\t\t\t$message\t= \"registered successfully\";\n\t\t\t\t$response['error']\t= 0;\n\t\t\t\t$response['response']['result'] = 'success';\n\t\t\t\t$response['response']['message'] = 'registered successfully';\n\t\t\t\t$this->set('response', $response);\t\t\t\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['result'] = 'failure';\n\t\t\t\t$response['response']['message']\t= 'registered unsuccessfully';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\n\t\t\techo json_encode($response);\n\t\t\tdie();\n\t\t}", "function admin_add() {\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t$this->User->create();\n\n\t\t\t/**\n\t\t\t * Save new user.\n\t\t\t */\n\t\t\tif ($this->User->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * If the new user is saved, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has been saved.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the user is not saved, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has not been saved.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Select all profiles (Administrator or Member).\n\t\t * @var array\n\t\t */\n\t\t$profiles = $this->User->Profile->find('list');\n\n\t\t/**\n\t\t * Select all offers enabled.\n\t\t * @var array\n\t\t */\n\t\t$offers = $this->User->Offer->find('list');\n\n\t\t/**\n\t\t * Put all profiles in \"profiles\" and offers in \"offers\".\n\t\t * $profiles and $offers will be available in the view.\n\t\t */\n\t\t$this->set(compact('profiles', 'offers'));\n\n\t}", "public function registerAction()\n {\n // specify required fields\n $requirements = array(\n 'userName',\n 'password',\n 'email'\n );\n\n // fech post json data\n $post = $this->fetchRequestData($requirements);\n\n //we need to match what's in the database\n $fields = array(\n 'yourEmail' => 'email',\n 'yourUserName' => 'userName',\n 'yourPassword' => 'password',\n 'fname' => 'fname',\n 'lname' => 'lname',\n 'yourIP' => 'ip',\n 'yourCountry' => 'countryAbbreviation',\n 'yourBday' => 'birthdate',\n 'accountId' => 'accountId',\n 'gender' => 'gender',\n 'cmsUserGroupId' => 'userRole',\n 'isChannel' => 'isChannel',\n );\n\n $params = array();\n $params['userId'] = 0;\n\n foreach ($fields as $key => $val) {\n if (isset($post[$val]) && $post[$val]) $params[$key] = $post[$val];\n }\n\n if (isset($params['yourEmail']) && $params['yourEmail']) {\n if ($this->get('UserServices')->checkDuplicateUserEmail($params['userId'], $params['yourEmail'])) {\n throw new HttpException(422, $this->translator->trans('This email address belongs to an existing Tourist Tuber.'));\n }\n }\n\n if (isset($params['yourUserName']) && $params['yourUserName']) {\n if ($this->get('UserServices')->checkDuplicateUserName($params['userId'], $params['yourUserName'])) {\n $suggestedNewUserNames = $this->get('UserServices')->suggestUserNameNew($params['yourUserName']);\n throw new HttpException(422, $this->translator->trans('Your username is already taken. try:') . ' ' . implode(' or ', $suggestedNewUserNames));\n }\n }\n\n if (isset($params['yourPassword']) && $params['yourPassword']) {\n //validate first for invalid password\n $validatePass = $this->get('UserServices')->validateUserLengthPassword($params['yourPassword']);\n if (isset($validatePass['success']) && $validatePass['success'] == false) {\n throw new HttpException(422, $validatePass['message']);\n }\n }\n\n if ((isset($params['fname']) && $params['fname']) || (isset($params['lname']) && $params['lname'])) {\n $fullname = '';\n if ($params['fname']) {\n $fullname .= $params['fname'];\n }\n if ($params['lname']) {\n $fullname .= $params['lname'];\n }\n } else {\n $fullname = $params['fname'] = $params['yourUserName'];\n }\n\n $params['fullName'] = $fullname;\n $params['defaultPublished'] = 0;\n $result = array();\n\n\n\n $insert = $this->get('UserServices')->generateUser($params);\n\n if (is_array($insert) && isset($insert['error']) && !empty($insert['error'])) {\n throw new HttpException(422, $insert['error']);\n } else {\n $this->get('UserServices')->sendRegisterActivationEmail(array('userId' => $insert->getId(), 'activationLink' => '/api/users/activate/'));\n $result['status'] = \"success\";\n $result['message'] = $this->translator->trans('An email is sent to you to activate your account.');\n }\n\n $response = new Response(json_encode($result));\n $response->setStatusCode(200);\n return $response;\n }", "function addUser(){\n\t$request = Slim::getInstance()->request();\n\t$evaluation = $request->getBody();\n\t$user = array(\"user_id\"=>\"\", \"user_name\"=>\"\", \"user_image\"=>\"\", \"user_twitterhandle\"=>\"\", \"user_facebookid\"=>\"\", \"user_active\"=>\"\");\n\t\n\t// construct data object\n\tforeach (explode('&', $evaluation) as $chunk) {\n\t $param = explode(\"=\", $chunk);\n\n\t if ($param) {\n\t \t$user[$param[0]] = $param[1];\n\t }\n\t}\n\n\t// check if the user exists\n\t$sql = \"SELECT * FROM mercury_users WHERE user_name = :user_name\";\n\ttry {\n\t\t$db = getConnection();\n\t\t$stmt = $db->prepare($sql); \n\t\t$stmt->bindParam(\"user_name\", $user[\"user_name\"]);\n\t\t$stmt->execute();\n\t\t$matchingEvaluation = $stmt->fetchObject(); \n\n\t\tif($matchingEvaluation){\n\n\t\t}else{\n\t\t\t$sql = \"INSERT INTO mercury_users (user_name, user_image, user_twitterhandle, user_facebookid) VALUES (:user_name, :user_image, :user_twitterhandle, :user_facebookid)\";\n\t\t\ttry {\n\t\t\t\t$db = getConnection();\n\t\t\t\t$stmt = $db->prepare($sql); \n\t\t\t\t$stmt->bindParam(\"user_name\", $user[\"user_name\"]);\n\t\t\t\t$stmt->bindParam(\"user_image\", $user[\"user_image\"]);\n\t\t\t\t$stmt->bindParam(\"user_twitterhandle\", $user[\"user_twitterhandle\"]);\n\t\t\t\t$stmt->bindParam(\"user_facebookid\", $user[\"user_facebookid\"]);\n\t\t\t\t$stmt->execute();\n\t\t\t\t$user[\"user_id\"] = $db->lastInsertId();\n\t\t\t\t$db = null;\n\t\t\t\techo json_encode($user); \n\t\t\t} catch(PDOException $e) {\n\t\t\t\terror_log($e->getMessage(), 3, '/var/tmp/php.log');\n\t\t\t\techo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n\t\t\t}\n\t\t}\n\t}catch(PDOException $e) {\n\t\terror_log($e->getMessage(), 3, '/var/tmp/php.log');\n\t\techo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n\t}\n}", "public function add() {\n if ($_POST){\n \n $username = filter_input(INPUT_POST, 'username');\n $password = filter_input(INPUT_POST, 'password');\n $password2 = filter_input(INPUT_POST, 'password2');\n $fullname = filter_input(INPUT_POST, 'fullname');\n $email = filter_input(INPUT_POST, 'email');\n \n if (!preg_match('/^[a-z0-9]{4,}$/', $username) or !preg_match('/[A-z 0-9\\-]+$/', $fullname) or $email == '' or $password != $password2) {\n $this->setData('message', 'Podaci nisu tačno uneti.');\n } else {\n $passwordHash = hash('sha512', $password . Configuration::SALT);\n $res = HomeModel::add($username, $passwordHash , $fullname, $email);\n if ($res){\n Misc::redirect('successfull_registration');\n } else {\n $this->setData('message', 'Došlo je do greške prilikom dodavanja. Korisničko ime je verovatno zauzeto.');\n }\n } \n }\n }", "function action_register() {\n if(model_user::userLoggedIn()) {\n header('Location: /home/track');\n }\n $jobs = model_job::getAllJobs();\n $displayError = FALSE;\n\n if (isset($_POST['btn-register'])) {\n $user_data = array(\n 'lastname' => model_user::sanitizeInput($_POST['form']['lastname']),\n 'firstname' => model_user::sanitizeInput($_POST['form']['firstname']),\n 'email' => $_POST['form']['email'],\n 'password' => $_POST['form']['password'],\n 'confirmPassword' => $_POST['form']['confirmPass'],\n 'job' => $_POST['form']['job'],\n );\n\n $form_errors = array(\n 'emailMessage' => '',\n 'limitMessage' => '',\n 'errorEmail' => FALSE,\n 'errorPassword' => FALSE,\n 'errorConfirmPass' => FALSE,\n 'errorLastName' => FALSE,\n 'errorFirstName' => FALSE,\n 'isPasswordNotMatching' => FALSE,\n );\n\n // Check user's lastname and firstname.\n model_user::validateUserName($form_errors, $user_data, $displayError);\n\n // Check user's email.\n model_user::validateUserEmail($form_errors, $user_data, $displayError);\n\n // Check user's password and user's confirm password.\n model_user::validatePassword($form_errors, $user_data, $displayError);\n\n // If there are no errors displayed, attempt to add the user.\n if (!$displayError) {\n try {\n $user = model_user::addUser(\n $user_data['lastname'],\n $user_data['firstname'],\n $user_data['email'],\n $user_data['password'],\n $user_data['job']\n );\n header('Location: /home/login');\n } catch (Exception $e) {\n header('Location: /500/index');\n }\n }\n }\n @include_once APP_PATH . 'view/user_register.tpl.php';\n }", "public function postCreate() {\n \t$validator = Validator::make(Input::all(), User::$rules);\n\n \t// i made a user with [email protected], goodbye\n \tif ($validator->passes()) {\n \t\t// validation has passed, save user in DB\n \t\t$user = new User;\n \t\t$user->first_name = Input::get('first_name');\n \t\t$user->last_name = Input::get('last_name');\n \t\t$user->email = Input::get('email');\n \t\t$user->password = Hash::make(Input::get('password'));\n \t\t$user->save();\n\n \t\treturn Redirect::to('users/login')->with('message', '<div class=\"alert alert-success\" role=\"alert\">Thanks for registering!</div>');\n \t}\n \telse {\n \t\t// validation has failed, display error messages\n \t\treturn Redirect::to('users/register')->with('message', '<div class=\"alert alert-warning\" role=\"alert\">The following errors occurred</div>')->withErrors($validator)->withInput();\n \t}\n }", "public function store($user_data)\n\t{\n\t\t$new_user = new User;\n\t\t$new_user->role_id \t\t\t= $user_data['role_id'];\n\t\t$new_user->first_name \t\t= (isset($user_data['first_name']) && !empty($user_data['first_name'])) \t\t? $user_data['first_name'] \t: null;\n\t\t$new_user->last_name \t\t= (isset($user_data['last_name']) && !empty($user_data['last_name'])) \t\t\t? $user_data['last_name'] \t: null;\n\t\t$new_user->username \t\t= $user_data['username'];\n\t\t$new_user->password \t\t= (Hash::needsRehash($user_data['password'])) ? Hash::make($user_data['password']) : $user_data['password'];\n\t\t$new_user->email \t\t\t= $user_data['email'];\n\t\t$new_user->birthdate \t\t= (isset($user_data['birthdate']) && !empty($user_data['birthdate'])) \t\t\t? $user_data['birthdate'] \t\t: null;\n\t\t$new_user->phone \t\t\t= (isset($user_data['phone']) && !empty($user_data['phone'])) \t\t\t\t\t? $user_data['phone'] \t\t\t: null;\n\t\t$new_user->facebook \t\t= (isset($user_data['facebook']) && !empty($user_data['facebook']))\t\t\t\t? $user_data['facebook'] \t\t: null;\n\t\t$new_user->twitter \t\t\t= (isset($user_data['twitter']) && !empty($user_data['twitter'])) \t\t\t\t? $user_data['twitter'] \t\t: null;\n\t\t$new_user->profile_image \t= (isset($user_data['profile_image']) && !empty($user_data['profile_image'])) \t? $user_data['profile_image'] \t: null;\n\t\t$new_user->cover_image \t\t= (isset($user_data['cover_image']) && !empty($user_data['cover_image'])) \t\t? $user_data['cover_image'] \t: null;\n\t\t$new_user->cover_text \t\t= (isset($user_data['cover_text']) && !empty($user_data['cover_text']))\t\t\t? $user_data['cover_text'] \t\t: null;\n\t\tif($new_user->save())\n\t\t\treturn $new_user;\n\t\telse\n\t\t\treturn false;\n\t}", "public function userAdd($userModel) {\n // Validating the input on back-end\n $validateEmail = $this->validate->validateEmail($userModel->getEmail());\n $validateUsername = $this->validate->validateInput($userModel->getUsername(), \"/^[a-zA-Z0-9_.-]*$/\", 1, 25);\n $validatePassword = $this->validate->validateInput($userModel->getPassword(), \"/^[a-zA-Z0-9@+_.!?|]*$/\", 8, 20);\n\n // Checking if they all return true\n if ($validateEmail && $validateUsername && $validatePassword) {\n // Checking if email or username is already used\n $emailExist = $this->userDB->checkUserEmailUsed($userModel->getEmail());\n $usernameExist = $this->userDB->checkUsernameUsed($userModel->getUsername());\n\n if ($emailExist != 1) {\n // Returning error if one or more failes\n header(\"Location: create-account?error=3\");\n } else if ($usernameExist != 1) {\n // Returning error if one or more failes\n header(\"Location: create-account?error=4\");\n } else {\n // Sending the model to the database layer create the account\n if ($this->userDB->userAdd($userModel)) {\n // Getting the user info by username and filling the userModel with it\n $userModel = $this->userDB->getUserByUsername($userModel);\n\n // Achievements ophalen\n $achievementList = $this->achievementDB->getAchievements();\n\n // Checking if achievements are connected\n if($this->userDB->connectAchievementsToUser($userModel, $achievementList)) {\n // Logging the user in with session\n session_start();\n $_SESSION['userID'] = $userModel->getID();\n\n // Sending user to home page\n header(\"Location: index\");\n } else {\n // Returning with error\n header(\"Location: create-account?error=5\");\n }\n } else {\n // Returning error if user account is not added\n header(\"Location: create-account?error=5\");\n }\n }\n } else {\n // Returning error if one or more failes\n header(\"Location: create-account?error=5\");\n } \n }", "function add()\n { \n\t\tif ($this->auth->loggedin()) {\n\t\t\t$id = $this->auth->userid();\n\t\t\tif(!($this->User_model->hasPermission('add',$id)&&($this->User_model->hasPermission('person',$id)||$this->User_model->hasPermission('WILD_CARD',$id)))){\n\t\t\t\tshow_error('You Don\\'t have permission to perform this operation.');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->form_validation->set_rules('username', '<b>Username</b>', 'trim|required|min_length[5]|max_length[12]');\n\t\t\t$this->form_validation->set_rules('password', '<b>Password</b>', 'trim|required');\n\t\t\t$this->form_validation->set_rules('first_name', '<b>First Name</b>', 'trim|required|min_length[2]|max_length[12]');\n\t\t\t$this->form_validation->set_rules('Last_name', '<b>Last Name</b>', 'trim|required|min_length[2]|max_length[12]');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('gender', '<b>Gender</b>', 'trim|required');\n\t\t\t$this->form_validation->set_rules('mobile', '<b>Mobile</b>', 'trim|required|integer|min_length[10]|max_length[11]');\n\t\t\t$this->form_validation->set_rules('role_id', '<b>Role</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t$this->form_validation->set_rules('location_id', '<b>Location</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t$this->form_validation->set_rules('status_id', '<b>Status</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t\t\t\t\n\t\t\tif(isset($_POST) && count($_POST) > 0 && $this->form_validation->run()) \n\t\t\t{ \n\t\t\t\t$person_id = $this->User_model->register_user(); \n\t\t\t\t//$person_id = $this->Person_model->add_person($params);\n\t\t\t\t$params1 = array(\n\t\t\t\t\t\t\t'person_id' => $person_id,\n\t\t\t\t\t\t\t'role_id' => $this->input->post('role_id'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->Person_role_model->update_person_role($person_id,$params1);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$params2 = array(\n\t\t\t\t\t\t\t'person_id' => $person_id,\n\t\t\t\t\t\t\t'location_id' => $this->input->post('location_id'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->Person_location_model->update_person_location($person_id,$params2);\t\n\t\t\t\tredirect('person/index');\n\t\t\t}\n\t\t\telse\n\t\t\t{ \n\t\t\t\t\n\t\t\t\t$user = $this->User_model->get('person_id', $id);\n\t\t\t\tunset($user['password']);\n\t\t\t\t\n\t\t\t\t$user_role = $this->User_model->loadRoles($user['person_id']);\n\t\t\t\t\t$this->data['user'] = $user['username'];\n\t\t\t\t\t$this->data['role'] = $user_role;\n\t\t\t\t\t$this->data['gender'] = $user['gender'];\n\t\t\t\t\t$specialPerm = $this->User_model->loadSpecialPermission($id);\n\t\t\t\t\t\n\t\t\t\t\t$this->data['pp'] = $specialPerm;\n\t\t\t\t\t$this->data['p_role'] = $this->Person_role_model->get_person_role($id);\n\t\t\t\t\t$this->data['role'] = $this->Role_model->get_all_role();\n\t\t\t\t\t$this->data['location'] = $this->Location_model->get_all_location();\n\t\t\t\t\t$this->data['status'] = $this->Statu_model->get_all_status();\n\t\t\t\t\t\n\t\t\t\t$this->template\n\t\t\t\t\t->title('Welcome','My Aapp')\n\t\t\t\t\t->build('person/add',$this->data);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->template\n\t\t\t\t\t->title('Login Admin','Login Page')\n\t\t\t\t\t->set_layout('access')\n\t\t\t\t\t->build('access/login');\n\t\t}\n }", "public function addUser($data)\n {\n $request = $this->bdd->prepare('INSERT INTO users(Name, FirstName, Mail, Password, Phone, Subcription_ID) VALUES (:name, :firstname, :mail, :password, :phone, :subid)');\n $request->execute([\n 'name' => $data['lastName'],\n 'firstname' => $data['firstName'],\n 'mail' => $data['mail'],\n 'password' => sha1($data['password']),\n 'phone' => $data['tel'],\n 'subid' => (int) $data['radio']\n ]);\n return true;\n }", "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "public function register()\n {\n // Invoke the base class save method to do any preparation work\n parent::save(\"\");\n \n /************ VALIDATION **************/\n $profile = new \\DataFilter\\Profile();\n \n // Set global validation checks\n $profile->addPreFilters(['Trim', 'StripHtml']);\n $profile->setAttribs($this->getValidationAttribs(true));\n \n // Perform validation checks\n if (!$profile->check($_POST)) {\n // The form is NOT valid.\n $message = \"Validation Error:\\n\";\n $res = $profile->getLastResult();\n foreach ($res->getAllErrors() as $error) {\n $message .= \"Err: $error\\n\";\n } \n \n // Send the validation errors back to the browser\n $this->result[\"message\"] = $message;\n $this->send();\n }\n \n // The form was valid. Get the validated and transformed data from the profile.\n $data = $profile->getLastResult()->getValidData();\n \n // If we're adding a new user, ensure this email address does NOT already exist\n $email = INPUT::post(\"email\");\n $users = $this->model->getList(array(\"email\" => $email));\n if(count($users) > 0) {\n $this->result[\"message\"] = \"Sorry, an account with this email address already exists\";\n $this->send(); \n }\n \n // Hash the password\n $this->model->hashPassword($data[\"password\"], $hashed_password, $salt);\n $data[\"password\"] = $hashed_password;\n $data[\"salt\"] = $salt;\n \n // Save the client record (if id = 0 then a new record will be created)\n $id = $this->model->save(0, $data);\n \n // If we're adding a new user, we also need to add the user role.\n // Tthe role is set as the DEFAULT user role which is MYNDIE_ROLE_MEMBER (id 2) as we can't allow\n // unsecure sources to add ADMIN user roles. \n\n // Load the user bean\n $user = $this->model->get($id);\n if(!$user) {\n $this->result[\"message\"] = \"Your account could not be created\";\n $this->send(); \n }\n \n // Create the default role.\n $objRole = new \\Myndie\\Model\\Role($this->app);\n $roleBean = $objRole->get(MYNDIE_DEFAULT_USER_ROLE);\n if(!$roleBean) {\n $this->result[\"message\"] = \"Default role is invalid\";\n $this->send(); \n }\n \n $user->sharedRole[] = $roleBean; // Users to Roles is a many to many relationship so we use a shared list.\n R::store($user);\n\n // Send the OK result back, along with the ID of the new user.\n $this->OK($id); \n }", "public function saveAction(){\n\t\t$request = $this->_request->getParams();\n\t\t$oValidationHelper = new Helpers_Usermanagement_Validate();\n\t\t\n\t\t$error = false;\n\t\tif(!$oValidationHelper->ifEmailAvailable($request['user_email'],$this->_auth->user_id)){\n\t\t\t$error = true;\n\t\t\t$this->_messages->setMessage('User with such email already exists','error','user_email');\n\t\t}\n\n\t\tif(!$oValidationHelper->ifUsernameAvailable($request['user_login'],$this->_auth->user_id)){\n\t\t\t$this->_messages->setMessage('User with such username already exists','error','user_login');\n\t\t\t$error = true;\n\t\t}\n\t\t\t\t\n\t\tif($this->_validator->validate('registration_form',$request) && !$error){\n\t\t\t\n\t\t\tif($request['user_email']!=$this->_auth->user_email){\n\t\t\t\t$request['user_confirmation_code'] = md5(time()+rand(10000,99999));\n\t\t\t\t$request['user_active'] = 0;\n\t\t\t\t$this->_sendConfirmationEmail($request['user_email'],$request['user_login'],$request['user_confirmation_code']);\n\t\t\t\t$this->_messages->setMessage('WARNING!!! Your email has been changed and your account has been disabled. Instructions on how to activate account were sent to you','error');\n\t\t\t}\n\t\t\t\n\t\t\t$request['user_id'] = $this->_auth->user_id;\n\t\t\t$oUsers = new Models_Usermanagement_Users();\n\t\t\t$oUsers->updateEntry($request);\t\t\t\n\t\t\t\n\t\t\t$this->_messages->setMessage('Account has been updated');\n\t\t\t$this->_redirect('/usermanagement/profile/generaldataform/');\n\t\t}else{\n\t\t\tforeach ( $this->_validator->getErrors () as $field=>$error ) {\n\t\t\t\t$this->_messages->setMessage ( $error, 'error' , $field);\n\t\t\t}\n\t\t\t$this->_redirect('/usermanagement/profile/generaldataform/?error=1');\n\t\t}\n\t}", "function newuser(){\n\t\t\tif(!empty($_POST['newemail']) && !empty($_POST['newpassword']) && !empty($_POST['newnombre']) && !empty($_POST['newpoblacion']) && !empty($_POST['newrol'])){\n\t\t\t\t$poblacion = filter_input(INPUT_POST,'newpoblacion',FILTER_SANITIZE_STRING);\n\t\t\t\t$nombre = filter_input(INPUT_POST,'newnombre',FILTER_SANITIZE_STRING);\n\t\t\t\t$password = filter_input(INPUT_POST,'newpassword',FILTER_SANITIZE_STRING);\n\t\t\t\t$email = filter_input(INPUT_POST,'newemail',FILTER_SANITIZE_STRING);\n\t\t\t\t$rol = filter_input(INPUT_POST,'newrol',FILTER_SANITIZE_STRING);\n\t\t\t\t$list = $this -> model -> adduser($nombre,$password,$email,$poblacion,$rol);\n \t\t$this -> ajax_set(array('redirect'=>APP_W.'admin'));\n\t\t\t}\n\t\t}", "public function add()\n {\n admin_session_check();\n $this->form_validation->set_rules('username', $this->lang->line('validation_username'), 'trim|required|callback_username_check');\n $this->form_validation->set_rules('email', $this->lang->line('validation_email_address'), 'trim|required|valid_email|callback_email_check');\n $this->form_validation->set_rules('usertype', $this->lang->line('validation_usertype'), 'trim|required');\n $this->form_validation->set_rules('password', $this->lang->line('validation_password'), 'trim|required|callback_password_check');\n $this->form_validation->set_rules('confirm_password', $this->lang->line('validation_confirm_password'), 'trim|required');\n $this->form_validation->set_rules('page_limit', $this->lang->line('validation_page_limit'), 'trim|required|numeric');\n $this->form_validation->set_message('required','%s '.$this->lang->line('validation_required'));\n $this->form_validation->set_message('valid_email', $this->lang->line('validation_invalid_email'));\n if(!$this->form_validation->run())\n {\n $data['page_title'] = $this->lang->line('add_user_title');\n $data['view'] = 'add_user';\n $this->load->view('template', $data);\n }else\n {\n $this->users_model->insert();\n $user_data = array(\n 'email' => $this->input->post('email', TRUE),\n 'username' => $this->input->post('username', TRUE),\n 'password' => $this->input->post('password', TRUE)\n );\n send_email($user_data['email'], $this->lang->line('email_signup_welcome').' '.$this->config->item('site_name'), 'signup', $user_data );\n $this->session->set_flashdata('alert', get_alert_html($this->lang->line('success_user_created'), ALERT_TYPE_SUCCESS));\n redirect('users/list_users');\n }\n }", "public function registerAction()\n\t{\n\t\tif($this->loggedEmail){\n\t\t\t$this->_redirect('/');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//get referrer\n\t\t$ns = new Zend_Session_Namespace('referrer');\n\t\t$this->view->referby = $ns->referrer;\n\t\t\t\n\t\tif($this->getRequest()->isPost()){\n\t\t\t//Validation\n\t\t\t// Valid email address?\n\t\t\tif (! Zend_Validate::is($this->_request->getPost('email'), 'EmailAddress')\n\t\t\t\t&& $this->_request->getPost('email') != 'me2@localhost'){\n\t\t\t\t$this->view->errors[] = \"Invalid e-mail address.\";\n\t\t\t} \n\t\t\t//E-mail cannot already exist in the database\n\t\t\t$user = new Default_Model_User();\n\t\t\t$foundUser = $user->getUserByEmail($this->_request->getPost('email'));\n\t\t\tif(isset($foundUser->id)){\n\t\t\t\t$this->view->errors[] = \"Email address already in database.\";\n\t\t\t}\n\t\t\t\n\t\t\t//Handle must be between 2-20 characters\n\t\t\t$validator = new Zend_Validate_StringLength(2, 20);\n\t\t\tif(! $validator->isValid($this->_request->getPost('handle'))){\n\t\t\t\t$this->view->errors[] = \"Handle must be between 2 and 14 characters.\";\n\t\t\t}\n\t\t\t\n\t\t\t// Handle must consist solely of alphanumeric characters\n\t\t\t$validHandle = new Zend_Validate_Alnum();\n\t\t\tif (! $validHandle->isValid($this->_request->getPost('handle'))) {\n\t\t\t\t$this->view->errors[] = \"Handle must consist of letters and numbers.\";\n\t\t\t} // end valid handle\n\t\t\t\n\t\t\t// Handle cannot already exist in database\n\t\t\t$foundUser = $user->getUserByHandle($this->_request->getPost('handle'));\n\t\t\tif (isset($foundUser->id)) {\n\t\t\t\t$this->view->errors[] = \"Handle already exists in database.\";\n\t\t\t}\n\t\t\t\n\t\t\t// Password must between 6 to 20 characters\n\t\t\t$validPswd = new Zend_Validate_StringLength(6,20);\n\t\t\tif (! $validPswd->isValid($this->_request->getPost('password'))) {\n\t\t\t\t$this->view->errors[] = \"Password must be at least 6 characters.\";\n\t\t\t} // end valid password\n\t\t\t\n\t\t\t// First name must not be empty\n\t\t\t$validFirstName = new Zend_Validate_NotEmpty();\n\t\t\tif (! $validFirstName->isValid($this->_request->getPost('first_name'))) {\n\t\t\t\t$this->view->errors[] = \"Please provide your first name.\";\n\t\t\t} // end valid first name\n\t\t\t\n\t\t\t// Last name must not be empty\n\t\t\t$validLastName = new Zend_Validate_NotEmpty();\n\t\t\tif (! $validLastName->isValid($this->_request->getPost('last_name'))) {\n\t\t\t\t$this->view->errors[] = \"Please provide your last name.\";\n\t\t\t} // end valid last name\n\t\t\t\n\t\t\t// Valid gender?\n\t\t\tif (! Zend_Validate::is($this->_request->getPost('gender'), 'NotEmpty')) {\n\t\t\t\t$this->view->errors[] = \"Please identify your gender.\";\n\t\t\t} // end valid gender\n\t\t\t\n\t\t\t//Address not empty?\n\t\t\tif(! Zend_Validate::is($this->_request->getPost('address'), 'NotEmpty')){\n\t\t\t\t$this->view->errors[] = \"Please enter your address.\";\n\t\t\t}\n\t\t\t\n\t\t\t\t//if errors exist, prepopulate the form\n\t\t\t\tif(count($this->view->errors) > 0){\n\t\t\t\t$this->view->email = $this->_request->getPost('email');\n\t\t\t \t$this->view->handle = $this->_request->getPost('handle');\n\t\t\t \t$this->view->first_name = $this->_request->getPost('first_name');\n\t\t\t \t$this->view->last_name = $this->_request->getPost('last_name');\n\t\t\t \t$this->view->gender = $this->_request->getPost('gender');\n\t\t\t\t$this->view->address = $this->_request->getPost('address');\n\t\t\t\t}else{ //No errors, add user to the database and send confirmation e-mail\n\t\t\t\t\n\t\t\t\t//Generate random keys used for registration confirmation\n\t\t\t\t$registrationKey = $this->_helper->generator(32, 'alpha');\n\t\t\t\t\n\t\t\t\t// Prepare the data array for database insertion\n\t\t\t\t$data = array (\n\t\t\t\t\t'email' => $this->_request->getPost('email'),\n\t\t\t\t\t'password' => md5($this->_request->getPost('password')),\n\t\t\t\t\t'registration_key' => $registrationKey,\n\t\t\t\t\t'handle' => $this->_request->getPost('handle'),\n\t\t\t\t\t'first_name' => $this->_request->getPost('first_name'),\n\t\t\t\t\t'last_name' => $this->_request->getPost('last_name'),\n\t\t\t\t\t'gender' => $this->_request->getPost('gender'),\n\t\t\t\t\t'address' => $this->_request->getPost('address'),\n\t\t\t\t\t'created_at' => date('Y-m-d H:i:s'),\n\t\t\t\t\t'updated_at' => date('Y-m-d H:i:s'),\n\t\t\t\t\t'last_login' => date('Y-m-d H:i:s'),\n\t\t\t\t\t'referby' => $this->_request->getPost('referrer')\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t//Create a new mail object\n\t\t\t\t try {\n\t\t\t\t\t $mail = new Zend_Mail();\n\t\t\t\t\t\n\t\t\t\t\t // Set the From, To, and Subject headers\n\t\t\t\t\t $mail->setFrom($this->config->email->from_admin);\n\t\t\t\t\t $mail->addTo($this->_request->getPost('email'),\n\t\t\t\t\t \"{$this->_request->getPost('first_name')}\n\t\t\t\t\t {$this->_request->getPost('last_name')}\");\n\t\t\t\t\t $mail->setSubject('Your game account has been created');\n\t\t\t\t\t\n\t\t\t\t\t // Retrieve the e-mail template\n\t\t\t\t\t include \"emailTemplates/_email-confirm-registration.phtml\";\n\t\t\t\t\t\n\t\t\t\t\t // Attach the e-mail template to the e-mail and send it\n\t\t\t\t\t $mail->setBodyText($email);\n\t\t\t\t\t $mail->send();\n\t\t\t\t\t\n\t\t\t\t\t $this->view->success = 1;\n\t\t\t\t\t } catch (Exception $e) {\n\t\t\t\t\t\t $this->view->errors[] = \"We were unable to send your confirmation \t\t\n\t\t\t\t\t\t e-mail.\n\t\t\t\t\tPlease contact {$this->config->email->support}.\";\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t //If succcessful at sending mail, insert into database\n\t\t\t\t if($this->view->success == 1){\n\t\t\t\t\t// Insert the registration data into the database\n\t\t\t\t\t$user = new Default_Model_User();\n\t\t\t\t\t$user->insert($data);\n\t\t\t\t }\n\t\t\t\t\n\t\t\t\n\t\t\t\t} //end else (w/ no errors)\n\t\t} //end if isPost()\n\t}", "function createUser()\n{\n $userCheck = UsersQuery::create()->findOneByUsername($_POST['username']);\n if ($userCheck == \"\") {\n // next add user to db\n $user = new Users();\n $user->setUsername($_POST['username']);\n $user->setPassword($_POST['password']);\n $user->setName($_POST['name']);\n $user->setEmail($_POST['email']);\n $user->setStatus(\"active\");\n $user->setPicture(\"none\");\n $user->setCreated(time());\n $user->setModified(time());\n\n $user->save();\n\n if ($user != null) {\n echo \"user added successfully\";\n }\n } else {\n echo \"user already registered\";\n }\n}", "public function add() {\n if ($this->User->isLoggedIn() && $this->User->isAdmin()) {\n $flash = null;\n if (isset($_POST['email'])&&isset($_POST['password'])) {\n if ($this->User->insert(\n $_POST['email'],\n $_POST['password']\n )) {\n $flash = \"User {$_POST['email']} added.\";\n }\n }\n return array(\n 'flash' => $flash,\n 'title' => 'Add user'\n );\n } else {\n header(\"Location: \".app::site_url(array('users','login')));\n exit(0);\n }\n }", "public function register () : void\n {\n $this->getHttpReferer();\n\n // if the user is already logged in,\n // redirection to the previous page\n if ($this->session->exist(\"auth\")) {\n $url = $this->router->url(\"admin\");\n Url::redirect(301, $url);\n }\n\n $errors = []; // form errors\n $flash = null; // flash message\n\n $tableUser = new UserTable($this->connection);\n $tableRole = new RoleTable($this->connection);\n\n // form validator\n $validator = new RegisterValidator(\"en\", $_POST, $tableUser);\n\n // check that the form is valid and add the new user\n if ($validator->isSubmit()) {\n if ($validator->isValid()) {\n $role = $tableRole->find([\"name\" => \"author\"]);\n\n $user = new User();\n $user\n ->setUsername($_POST[\"username\"])\n ->setPassword($_POST[\"password\"])\n ->setSlug(str_replace(\" \", \"-\", $_POST[\"username\"]))\n ->setRole($role);\n\n $tableUser->createUser($user, $role);\n\n $this->session->setFlash(\"Congratulations {$user->getUsername()}, you are now registered\", \"success\", \"mt-5\");\n $this->session\n ->write(\"auth\", $user->getId())\n ->write(\"role\", $user->getRole());\n\n // set the token csrf\n if (!$this->session->exist(\"token\")) {\n $csrf = new Csrf($this->session);\n $csrf->setSessionToken(175, 658, 5);\n }\n\n $url = $this->router->url(\"admin\") . \"?user=1&create=1\";\n Url::redirect(301, $url);\n } else {\n $errors = $validator->getErrors();\n $errors[\"form\"] = true;\n }\n }\n\n // form\n $form = new RegisterForm($_POST, $errors);\n\n // url of the current page\n $url = $this->router->url(\"register\");\n\n // flash message\n if (array_key_exists(\"form\", $errors)) {\n $this->session->setFlash(\"The form contains errors\", \"danger\", \"mt-5\");\n $flash = $this->session->generateFlash();\n }\n\n $title = App::getInstance()\n ->setTitle(\"Register\")\n ->getTitle();\n\n $this->render(\"security.auth.register\", $this->router, $this->session, compact(\"form\", \"url\", \"title\", \"flash\"));\n }", "function users_beforeForm($data,$db){\n\tif(empty($data->user['id'])){\n\t\tcommon_loadPhrases($data,$db,'users');\n\t\t$data->output['responseMessage']=\n\t\t\tsprintf($data->phrases['users']['requiresLogin'],$data->phrases['users']['updateProfile']);\n\t\treturn FALSE;\n\t}\n\t$data->output['editingField']=TRUE;\n}", "function registerAction() {\n if ($this->request->isPost() && $this->request->isAjax()) {\n try {\n $userObj = new User(\n $this->request->getQuery('username')\n , $this->request->getQuery('password')\n );\n $userObj->save();\n\n return parent::httpResponse(json_encode($userObj));\n } catch (Exception $e) {\n return parent::httpResponse($e->getMessage());\n }\n }\n }", "function sdds_add_new_member()\n{\n if (isset($_POST['aff-user-email']) && wp_verify_nonce($_POST['aff-register-nonce'], 'aff-reg-nonce'))\n {\n $user_email = $_POST['aff-user-email'];\n $user_first = $_POST['aff-user-first'];\n $user_last = $_POST['aff-user-last'];\n $user_phone = $_POST['aff-user-phone'];\n\n //required for username checks\n // require_once(ABSPATH . WPINC . '/registration.php');\n if ($user_email == '')\n {\n aff_errors()->add('email_empty', __('Please enter your email address'));\n }\n if ($user_first == '')\n {\n aff_errors()->add('name_empty', __('Please enter your first name'));\n }\n if ($user_last == '')\n {\n aff_errors()->add('name_empty', __('Please enter your last name'));\n }\n if ($user_phone == '')\n {\n aff_errors()->add('phone_empty', __('Please enter your phone number'));\n }\n if (!is_email($user_email))\n {\n aff_errors()->add('email_invalid', __('Looks like this email address is not valid!'));\n }\n if (email_exists($user_email))\n {\n aff_errors()->add('email_used', __('Looks like this email address is already registered! Please login to access your dashboard'));\n }\n\n $errors = aff_errors()->get_error_messages();\n\n //only create user if errors are empty\n $user_pass = \"6Tr%#lKG_#@$%%7\";\n if (empty($errors))\n {\n $new_user_id = wp_insert_user(array(\n 'user_login' => $user_email, //idk if an email can be a valid username\n 'user_pass' => $user_pass, //autogenerate?\n 'user_email' => $user_email,\n 'first_name' => $user_first,\n 'last_name' => $user_last, //maybe separate first and last to avoid explosion\n 'user_registered' => date('Y-m-d H:i:s') ,\n 'role' => 'affiliate'\n ));\n\n if ($new_user_id)\n {\n //send alert to admin\n wp_new_user_notification($new_user_id, null, 'both');\n //log new user in\n wp_set_auth_cookie($user_email, true);\n wp_set_current_user($new_user_id, $user_email);\n do_action('wp_login', $user_email, $new_user_id);\n\n //send user to dashboard page\n wp_redirect(home_url() . '/affiliate-thank-you');\n exit;\n }\n }\n }\n}", "function validate_form() \n{\n $firstname = $_POST[\"fname\"];\n $lastname = $_POST[\"lname\"];\n $username = $_POST[\"uname\"];\n $email = $_POST[\"email\"];\n $password = $_POST[\"pword\"];\n\n $user = new userClass($firstname, $lastname, $username, $email, $password);\n $count = countUser($user);\n include 'header.php'; ?>\n\n <body>\n <div class=\"w3-container logisTixContainerAlpha\">\n <div class=\"w3-container w3-center logisTixBorderLineDGray\">\n <img class=\"w3-center\" src=\"images/logistixlogotrue.png\" width=\"50%\"><br><?php\n if ($count == 0) {\n $res = createUser($user); \n if ($res) { ?>\n <span><strong><?php echo $username; ?></strong> has been added successfully</span><?php \n } else { ?>\n <span><strong><?php echo $username; ?></strong> was not added. There was an error please try again.</span><?php \n }\n } else { ?>\n <span>User already exists.</span><?php \n } ?>\n </div>\n </div><?php\n}", "public function register(){\n if(Input::has('username') && Input::has('name') && Input::has('email') && Input::has('password')){\n\n $comprobate = DB::collection('users')->where('username', Input::get('username'))->orWhere('email', Input::get('email'))->first();\n\n \n if($comprobate == null){\n $user = new User;\n $user->username = Input::get('username');\n $user->name = Input::get('name');\n $user->email = Input::get('email');\n $user->password = Hash::make(Input::get('password'));\n $user->isCompleted = false;\n $user->card = null;\n $user->activeEvent = null;\n\n $user->save();\n\n return Response::json(array(\n 'reason' => 'user add succesfully', 'status' => 0 ))->setCallback(Input::get('callback'));\n }\n return Response::json(array(\n 'reason' => 'username or email are being used', 'status' => 1 ))->setCallback(Input::get('callback'));\n }\n\n return Response::json(array(\n 'reason' => 'fields arguments are icorrect', 'status' => 2 ))->setCallback(Input::get('callback'));\n }", "public function add()\n\t{\n\n\t\t$this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]');\n\t\t$this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[5]');\n\t\t$this->form_validation->set_rules('name', 'Name', 'trim|required|min_length[5]');\n\t\t$this->form_validation->set_rules('email', 'E-mail', 'trim|required|min_length[5]');\n\t\t$this->form_validation->set_rules('confpassword','Confirm Password'\n\t\t\t, 'trim|required|min_length[5]|matches[password]');\n\n\n\t\t$data=$this->input->post();\n\t\t\n\n\t\t$username=$data['username'];\n\t\t$password=md5($data['password']);\n\t\t$name=$data['name'];\n\t\t$email=$data['email'];\n\t\t$phone=$data['phone'];\n\t\t\n\n\t\t$new_user = [\n\t\t\t'username' => $username,\n\t\t\t'password' => $password,\n\t\t\t'hoten' => $name,\n\t\t\t'email' => $email,\n\t\t\t'sdt' => $phone,\n\t\t];\n\n\t\tif ($this->form_validation->run() == TRUE) {\n\n\t\t\t$chk_username=$this->User_Model->check_username($username);\n\t\t\t$chk_email=$this->User_Model->check_mail($email);\n\n\t\t\tif ($chk_username==true&&$chk_email==true) {\n\t\t\t\t$this->session->set_flashdata('Mail','This email already exists');\n\t\t\t\t$this->session->set_flashdata('UserWel','');\n\t\t\t\t$this->session->set_flashdata('UserEx','This user already exists');\n\n\t\t\t\t$this->toList_userview();\n\t\t\t}\n\t\t\telse if ($chk_username==true&&$chk_email==false) {\n\n\t\t\t\t$this->session->set_flashdata('UserWel','');\n\t\t\t\t$this->session->set_flashdata('Mail','');\n\t\t\t\t$this->session->set_flashdata('UserEx','This user already exists');\n\t\t\t\t\n\t\t\t\t$this->toList_userview();\n\t\t\t}\n\t\t\telse if ($chk_username==false&&$chk_email==true) {\n\n\t\t\t\t$this->session->set_flashdata('UserWel','');\n\t\t\t\t$this->session->set_flashdata('Mail','This email already exists');\n\t\t\t\t$this->session->set_flashdata('UserEx','');\n\t\t\t\t\n\t\t\t\t$this->toList_userview();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->User_Model->insert($new_user);\n\n\t\t\t\t$this->session->set_flashdata('UserEx','');\n\t\t\t\t$this->session->set_flashdata('Mail','');\n\t\t\t\t$this->session->set_flashdata('UserWel','Success !!! '.$username.' is new member');\n\n\t\t\t\t$this->addNotification($_SESSION['user'].' đã thêm 1 tài khoản',$_SESSION['username']);\n\n\t\t\t\t$this->toList_userview();\n\t\t\t}\n\n\t\t} else {\n\t\t\t$this->toList_userview();\n\t\t}\n\n\t}", "public function doCreate() {\n if(\n isset($_POST['email']) &&\n isset($_POST['password']) &&\n isset($_POST['lastName']) &&\n isset($_POST['firstName']) &&\n isset($_POST['address']) &&\n isset($_POST['postalCode']) &&\n isset($_POST['city'])\n ) {\n $alreadyExist = $this->userManager->findByEmail($_POST['email']);\n\n if(!$alreadyExist) {\n $newUser = new User($_POST);\n $this->userManager->create($newUser);\n $page = 'login';\n }\n else {\n $error = \"ERROR : This email (\".$_POST['email'].\") is used by another user\";\n $page = 'create';\n }\n }\n\n require('./View/default.php');\n }" ]
[ "0.6500552", "0.6489134", "0.6451038", "0.6303201", "0.61842513", "0.6104865", "0.6099151", "0.605396", "0.6046741", "0.603245", "0.59373516", "0.59210557", "0.59074485", "0.59061795", "0.59047186", "0.5889217", "0.58758897", "0.5873581", "0.58488464", "0.5834428", "0.5826928", "0.58244485", "0.5815354", "0.58090633", "0.58026814", "0.5785692", "0.57701486", "0.5743747", "0.5733868", "0.5708594", "0.5702965", "0.5701556", "0.57009906", "0.56760097", "0.565578", "0.56533355", "0.56518686", "0.5646584", "0.5643843", "0.5631552", "0.56266594", "0.56217915", "0.56183726", "0.5609993", "0.5605404", "0.56026924", "0.560014", "0.55995256", "0.55885327", "0.55879533", "0.5582089", "0.55718994", "0.55635154", "0.5562261", "0.55560315", "0.55463415", "0.55450016", "0.55251634", "0.5517131", "0.5511158", "0.5508142", "0.5502025", "0.550022", "0.54967433", "0.5490055", "0.5483878", "0.548205", "0.5481223", "0.5468905", "0.5467179", "0.54579145", "0.545545", "0.54515046", "0.54499793", "0.5447225", "0.54385155", "0.54326886", "0.54291505", "0.5423758", "0.5417794", "0.5415175", "0.5412705", "0.54102206", "0.5408808", "0.5408488", "0.54061997", "0.5405981", "0.5405842", "0.5405186", "0.5404415", "0.5403582", "0.5402698", "0.540248", "0.539754", "0.5396162", "0.5390704", "0.53880936", "0.5382874", "0.5381379", "0.5380859" ]
0.70471954
0